code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/assets/js/components/notifications/EnableAutoUpdateBannerNotification/index.test.js b/assets/js/components/notifications/EnableAutoUpdateBannerNotification/index.test.js @@ -28,7 +28,6 @@ import {
fireEvent,
provideUserCapabilities,
provideSiteInfo,
- freezeFetch,
} from '../../../../../tests/js/test-utils';
import { CORE_SITE } from '../../../googlesitekit/datastore/site/constants';
import EnableAutoUpdateBannerNotification from '.';
@@ -127,34 +126,6 @@ describe( 'EnableAutoUpdateBannerNotification', () => {
expect( container ).toBeEmptyDOMElement();
} );
- it( 'should set a dismissed item when dismissed', async () => {
- provideSiteInfo( registry, {
- changePluginAutoUpdatesCapacity: true,
- siteKitAutoUpdatesEnabled: false,
- } );
-
- provideUserCapabilities( registry, {
- googlesitekit_update_plugins: true,
- } );
-
- render( <EnableAutoUpdateBannerNotification />, {
- registry,
- } );
-
- expect(
- await screen.findByText( 'Keep Site Kit up-to-date' )
- ).toBeInTheDocument();
-
- freezeFetch( new RegExp( 'core/user/data/dismiss-item' ) );
-
- fireEvent.click( screen.getByText( 'Dismiss' ) );
-
- expect( fetchMock ).toHaveFetchedTimes( 1 );
- expect( fetchMock ).toHaveFetched(
- new RegExp( 'core/user/data/dismiss-item' )
- );
- } );
-
it( 'should not show the notification when auto updates are already enabled for Site Kit', async () => {
await registry.dispatch( CORE_SITE ).receiveSiteInfo( {
changePluginAutoUpdatesCapacity: true,
| 2 |
diff --git a/api/ubiquity/services/twilio/index.js b/api/ubiquity/services/twilio/index.js @@ -59,11 +59,12 @@ module.exports = {
//This causes validation to fail. For now forcing https.
//console.log(request.connection.info)
//Validate Request
- const url = 'https://'
- + request.info.host
- + request.url.path;
- const twilioSignature = request.headers['x-twilio-signature'];
- let validation = Twilio.validateRequest(channel.authToken, twilioSignature, url, payload)
+ const url = (request.headers.schema || "https") + "://"
+ + (request.headers.host || request.info.host)
+ + (request.headers.basePath || "")
+ + (request.headers.path || request.url.path);
+ const twilioSignature = request.headers["x-twilio-signature"];
+ const validation = Twilio.validateRequest(channel.authToken, twilioSignature, url, payload);
if (validation) {
if (payload.From && payload.Body) {
| 11 |
diff --git a/test/unit/message-manager-test.js b/test/unit/message-manager-test.js const assert = require('assert')
const MessageManger = require('../../app/scripts/lib/message-manager')
-describe('Transaction Manager', function () {
+describe('Message Manager', function () {
let messageManager
beforeEach(function () {
| 10 |
diff --git a/Specs/Scene/B3dmParserSpec.js b/Specs/Scene/B3dmParserSpec.js @@ -50,7 +50,7 @@ describe("Scene/B3dmParser", function () {
it("throws on invalid byteOffset", function () {
expect(function () {
B3dmParser.parse(new ArrayBuffer(1), "a");
- }).toThrowRuntimeError();
+ }).toThrowDeveloperError();
expect(function () {
B3dmParser.parse(new ArrayBuffer(1), -1);
}).toThrowRuntimeError();
| 1 |
diff --git a/OurUmbraco/Repository/Services/PackageRepositoryService.cs b/OurUmbraco/Repository/Services/PackageRepositoryService.cs @@ -156,7 +156,7 @@ namespace OurUmbraco.Repository.Services
/// </returns>
public PackageDetails GetDetails(Guid id, System.Version version)
{
- if (version == null) throw new ArgumentNullException(nameof(version));
+ if (version == null) throw new ArgumentNullException("version");
// [LK:2016-06-13@CGRT16] We're using XPath as we experienced issues with query Examine for GUIDs,
// (it might worth but we were up against the clock).
@@ -201,7 +201,7 @@ namespace OurUmbraco.Repository.Services
/// </returns>
private PackageDetails MapContentToPackageDetails(IPublishedContent content, System.Version currentUmbracoVersion)
{
- if (currentUmbracoVersion == null) throw new ArgumentNullException(nameof(currentUmbracoVersion));
+ if (currentUmbracoVersion == null) throw new ArgumentNullException("currentUmbracoVersion");
if (content == null) return null;
var package = MapContentToPackage(content);
| 2 |
diff --git a/src/libs/actions/IOU.js b/src/libs/actions/IOU.js @@ -251,7 +251,7 @@ function createSplitsAndOnyxData(participants, currentUserLogin, amount, comment
? chatReports[`${ONYXKEYS.COLLECTION.REPORT}${existingGroupChatReportID}`]
: ReportUtils.getChatByParticipants(participantLogins);
const groupChatReport = existingGroupChatReport || ReportUtils.buildOptimisticChatReport(participantLogins);
- const groupCreatedReportAction = existingGroupChatReport ? {} : ReportUtils.buildOptimisticCreatedReportAction(currentUserEmail);
+ const groupCreatedReportActionData = existingGroupChatReport ? {} : ReportUtils.buildOptimisticCreatedReportAction(currentUserEmail);
const groupChatReportMaxSequenceNumber = lodashGet(groupChatReport, 'maxSequenceNumber', 0);
const groupIOUReportAction = ReportUtils.buildOptimisticIOUReportAction(
groupChatReportMaxSequenceNumber + 1,
@@ -287,7 +287,7 @@ function createSplitsAndOnyxData(participants, currentUserLogin, amount, comment
onyxMethod: existingGroupChatReport ? CONST.ONYX.METHOD.MERGE : CONST.ONYX.METHOD.SET,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${groupChatReport.reportID}`,
value: {
- ...groupCreatedReportAction,
+ ...groupCreatedReportActionData,
[groupIOUReportAction.sequenceNumber]: groupIOUReportAction,
},
},
@@ -365,7 +365,7 @@ function createSplitsAndOnyxData(participants, currentUserLogin, amount, comment
oneOnOneChatReport.iouReportID = oneOnOneIOUReport.reportID;
}
- const oneOnOneCreatedReportAction = existingOneOnOneChatReport ? {} : ReportUtils.buildOptimisticCreatedReportAction(currentUserEmail);
+ const oneOnOneCreatedReportActionData = existingOneOnOneChatReport ? {} : ReportUtils.buildOptimisticCreatedReportAction(currentUserEmail);
const oneOnOneChatReportMaxSequenceNumber = lodashGet(oneOnOneChatReport, 'maxSequenceNumber', 0);
const oneOnOneIOUReportAction = ReportUtils.buildOptimisticIOUReportAction(
oneOnOneChatReportMaxSequenceNumber + 1,
@@ -399,7 +399,7 @@ function createSplitsAndOnyxData(participants, currentUserLogin, amount, comment
onyxMethod: existingOneOnOneChatReport ? CONST.ONYX.METHOD.MERGE : CONST.ONYX.METHOD.SET,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${oneOnOneChatReport.reportID}`,
value: {
- ...oneOnOneCreatedReportAction,
+ ...oneOnOneCreatedReportActionData,
[oneOnOneIOUReportAction.sequenceNumber]: oneOnOneIOUReportAction,
},
},
@@ -464,7 +464,7 @@ function createSplitsAndOnyxData(participants, currentUserLogin, amount, comment
amount: splitAmount,
iouReportID: oneOnOneIOUReport.reportID,
chatReportID: oneOnOneChatReport.reportID,
- createdReportActionID: oneOnOneCreatedReportAction.reportActionID,
+ createdReportActionID: oneOnOneCreatedReportActionData[0].reportActionID,
transactionID: oneOnOneIOUReportAction.originalMessage.IOUTransactionID,
reportActionID: oneOnOneIOUReportAction.reportActionID,
clientID: oneOnOneIOUReportAction.clientID.toString(),
@@ -474,7 +474,7 @@ function createSplitsAndOnyxData(participants, currentUserLogin, amount, comment
return {
groupData: {
chatReportID: groupChatReport.reportID,
- createdReportActionID: groupCreatedReportAction.reportActionID,
+ createdReportActionID: groupCreatedReportActionData[0].reportActionID,
transactionID: groupIOUReportAction.originalMessage.IOUTransactionID,
reportActionID: groupIOUReportAction.reportActionID,
clientID: groupIOUReportAction.clientID.toString(),
| 10 |
diff --git a/assets/js/modules/adsense/components/module/ModuleTopEarningPagesWidget/Table.js b/assets/js/modules/adsense/components/module/ModuleTopEarningPagesWidget/Table.js @@ -32,7 +32,7 @@ import Data from 'googlesitekit-data';
import ReportTable from '../../../../../components/ReportTable';
import TableOverflowContainer from '../../../../../components/TableOverflowContainer';
import Link from '../../../../../components/Link';
-import { MODULES_ADSENSE } from '../../../datastore/constants';
+import { STORE_NAME } from '../../../datastore/constants';
import { MODULES_ANALYTICS, DATE_RANGE_OFFSET } from '../../../../analytics/datastore/constants';
import { CORE_USER } from '../../../../../googlesitekit/datastore/user/constants';
import { generateDateRangeArgs } from '../../../../analytics/util/report-date-range-args';
@@ -47,7 +47,7 @@ export default function Table( { report } ) {
const { startDate, endDate } = select( CORE_USER ).getDateRangeDates( {
offsetDays: DATE_RANGE_OFFSET,
} );
- const adsenseData = select( MODULES_ADSENSE ).getReport( {
+ const adsenseData = select( STORE_NAME ).getReport( {
startDate,
endDate,
metrics: 'EARNINGS',
| 10 |
diff --git a/lore-ai.js b/lore-ai.js @@ -348,9 +348,7 @@ class LoreAI {
const query = {};
query.prompt = prompt;
query.max_tokens = max_tokens;
- if (typeof end !== 'undefined') {
query.stop = stop;
- }
if (typeof temperature === 'number') {
query.temperature = temperature;
}
| 0 |
diff --git a/scripts/pkg/config.js b/scripts/pkg/config.js @@ -11,6 +11,8 @@ module.exports = {
'../../lib/plugins/aws/package/lib/*.json',
// Service templates
'../../lib/plugins/create/templates',
+ // Dashboard policies
+ '../../node_modules/@serverless/enterprise-plugin/lib/safeguards/policies',
// Dashboard wrappers
'../../node_modules/@serverless/enterprise-plugin/sdk-js/dist/index.js',
'../../node_modules/@serverless/enterprise-plugin/sdk-py',
| 1 |
diff --git a/src/pages/ReportSettingsPage.js b/src/pages/ReportSettingsPage.js @@ -115,20 +115,10 @@ class ReportSettingsPage extends Component {
errors: {},
};
- this.setRoomNameInputRef = this.setRoomNameInputRef.bind(this);
this.resetToPreviousName = this.resetToPreviousName.bind(this);
this.validateAndUpdatePolicyRoomName = this.validateAndUpdatePolicyRoomName.bind(this);
}
- /**
- * Set the room name input ref
- *
- * @param {Element} el
- */
- setRoomNameInputRef(el) {
- this.roomNameInputRef = el;
- }
-
/**
* When the user dismisses the error updating the policy room name,
* reset the report name to the previously saved name and clear errors.
@@ -238,7 +228,7 @@ class ReportSettingsPage extends Component {
)
: (
<RoomNameInput
- ref={this.setRoomNameInputRef}
+ ref={el => this.roomNameInputRef = el}
initialValue={this.state.newRoomName}
policyID={linkedWorkspace && linkedWorkspace.id}
errorText={this.state.errors.newRoomName}
| 12 |
diff --git a/README.md b/README.md @@ -109,7 +109,7 @@ When picking a name for your custom element [there are a few naming conventions]
`<hello-world>` has one **live `{token}`** named `{planet}` and a global event handler named `onclick`.
-### `Element` definition
+### `Element` Definition
```javascript
Element `hello-world`
| 3 |
diff --git a/packages/app/src/services/renderer/renderer.tsx b/packages/app/src/services/renderer/renderer.tsx @@ -246,7 +246,7 @@ const commonSanitizeOption: SanitizeOption = deepmerge(
sanitizeDefaultSchema,
{
attributes: {
- '*': ['class', 'className'],
+ '*': ['class', 'className', 'style'],
},
},
);
| 11 |
diff --git a/apps/circlesclock/app.js b/apps/circlesclock/app.js @@ -97,8 +97,9 @@ const circlePosX = [
Math.round(7 * w / parts), // circle4
];
-const radiusOuter = circleCount == 3 ? 25 : 20;
+const radiusOuter = circleCount == 3 ? 25 : 19;
const radiusInner = circleCount == 3 ? 20 : 15;
+const circleFontSmall = circleCount == 3 ? "Vector:14" : "Vector:11";
const circleFont = circleCount == 3 ? "Vector:15" : "Vector:12";
const circleFontBig = circleCount == 3 ? "Vector:16" : "Vector:13";
const iconOffset = circleCount == 3 ? 6 : 8;
@@ -638,8 +639,8 @@ function radians(a) {
*/
function drawGauge(cx, cy, percent, color) {
const offset = 15;
- const end = 345;
- const radius = radiusInner + 3;
+ const end = 360 - offset;
+ const radius = radiusInner + (circleCount == 3 ? 3 : 2);
const size = radiusOuter - radiusInner - 2;
if (percent <= 0) return;
@@ -659,7 +660,8 @@ function drawGauge(cx, cy, percent, color) {
function writeCircleText(w, content) {
if (content == undefined) return;
- g.setFont(content.length < 4 ? circleFontBig : circleFont);
+ const font = String(content).length > 3 ? circleFontSmall : String(content).length > 2 ? circleFont : circleFontBig;
+ g.setFont(font);
g.setFontAlign(0, 0);
g.setColor(colorFg);
| 7 |
diff --git a/.circleci/config.yml b/.circleci/config.yml @@ -106,6 +106,28 @@ jobs:
yarn ganache > /dev/null &
cd source/delegate-factory && yarn test
+ order_utils_tests:
+ <<: *container_config
+ steps:
+ - attach_workspace:
+ at: *working_directory
+ - run:
+ name: Run Tests
+ command: |
+ yarn ganache > /dev/null &
+ cd utils/order-utils && yarn test
+
+ pre_swap_checker_tests:
+ <<: *container_config
+ steps:
+ - attach_workspace:
+ at: *working_directory
+ - run:
+ name: Run Tests
+ command: |
+ yarn ganache > /dev/null &
+ cd utils/pre-swap-checker && yarn test
+
types_tests:
<<: *container_config
steps:
@@ -206,6 +228,14 @@ workflows:
context: Development
requires:
- setup
+ - order_utils_tests:
+ context: Development
+ requires:
+ - setup
+ - pre_swap_checker_tests:
+ context: Development
+ requires:
+ - setup
- types_tests:
context: Development
requires:
@@ -222,9 +252,11 @@ workflows:
- index_tests
- delegate_tests
- delegate_factory_tests
+ - order_utils_tests
- types_tests
- wrapper_tests
filters:
branches:
only:
- master
+order_utils_tests
\ No newline at end of file
| 3 |
diff --git a/docs/_about/quickstart.md b/docs/_about/quickstart.md @@ -32,23 +32,31 @@ content_markdown: |-
Example with Node.js: suppose we have a file `make-request.js` with a function that calls `fetch`:
```js
+ require('isomorphic-fetch');
module.exports = function makeRequest() {
- return fetch('http://httpbin.org/get').then(function(response) {
+ return fetch('http://httpbin.org/my-url', {
+ headers: {
+ user: 'me'
+ }
+ }).then(function(response) {
return response.json();
});
};
```
-
We can use fetch-mock to mock `fetch`. In `mocked.js`:
```js
- var fetchMock = require('fetch-mock');
var makeRequest = require('./make-request');
+ var fetchMock = require('fetch-mock');
- // Mock the fetch() global to always return the same value for GET
- // requests to all URLs.
- fetchMock.get('*', { hello: 'world' });
+ // Mock the fetch() global to return a response
+ fetchMock.get('http://httpbin.org/my-url', { hello: 'world' }, {
+ delay: 1000, // fake a slow network
+ headers: {
+ user: 'me' // only match requests with certain headers
+ }
+ });
makeRequest().then(function(data) {
console.log('got data', data);
| 7 |
diff --git a/package.json b/package.json "Graphics",
"Canvas"
],
- "homepage": "https://1stop-st.github.io/vue-gl/",
+ "homepage": "https://vue-gl.github.io/vue-gl/",
"repository": {
"type": "git",
- "url": "https://github.com/1stop-st/vue-gl.git"
+ "url": "https://github.com/vue-gl/vue-gl.git"
},
"bugs": {
- "url": "https://github.com/1stop-st/vue-gl/issues"
+ "url": "https://github.com/vue-gl/vue-gl/issues"
},
"license": "MIT",
"main": "docs/js/vue-gl.js",
| 5 |
diff --git a/devices/namron.js b/devices/namron.js @@ -17,7 +17,6 @@ module.exports = [
model: '4512700',
vendor: 'Namron',
description: 'ZigBee dimmer 400W',
- whiteLabel: [{vendor: 'Sunricher', model: 'SR-ZG9101SAC-HP'}],
extend: extend.light_onoff_brightness({noConfigure: true}),
configure: async (device, coordinatorEndpoint, logger) => {
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
@@ -31,7 +30,6 @@ module.exports = [
model: '4512704',
vendor: 'Namron',
description: 'Zigbee switch 400W',
- whiteLabel: [{vendor: 'Sunricher', model: 'SR-ZG9101SAC-HP-Switch'}],
extend: extend.switch(),
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1) || device.getEndpoint(3);
@@ -57,7 +55,6 @@ module.exports = [
model: '4512703',
vendor: 'Namron',
description: 'Zigbee 4 channel switch K8 (white)',
- whiteLabel: [{vendor: 'Sunricher', model: 'SR-ZG9001K8-DIM'}],
fromZigbee: [fz.command_on, fz.command_off, fz.battery, fz.command_move, fz.command_stop],
exposes: [e.battery(), e.action([
'on_l1', 'off_l1', 'brightness_move_up_l1', 'brightness_move_down_l1', 'brightness_stop_l1',
@@ -76,7 +73,6 @@ module.exports = [
model: '4512721',
vendor: 'Namron',
description: 'Zigbee 4 channel switch K8 (black)',
- whiteLabel: [{vendor: 'Sunricher', model: 'SR-ZG9001K8-DIM'}],
fromZigbee: [fz.command_on, fz.command_off, fz.battery, fz.command_move, fz.command_stop],
toZigbee: [],
meta: {multiEndpoint: true},
@@ -94,7 +90,6 @@ module.exports = [
model: '4512701',
vendor: 'Namron',
description: 'Zigbee 1 channel switch K2',
- whiteLabel: [{vendor: 'Sunricher', model: 'SR-ZG9001K2-DIM'}],
fromZigbee: [fz.command_on, fz.command_off, fz.battery, fz.command_move, fz.command_stop],
exposes: [e.battery(), e.action(['on', 'off', 'brightness_move_up', 'brightness_move_down', 'brightness_stop'])],
toZigbee: [],
@@ -104,7 +99,6 @@ module.exports = [
model: '4512702',
vendor: 'Namron',
description: 'Zigbee 1 channel switch K4',
- whiteLabel: [{vendor: 'Sunricher', model: 'SR-ZG9001K4-DIM'}],
fromZigbee: [fz.command_on, fz.command_off, fz.battery, fz.command_move, fz.command_stop, fz.command_step],
exposes: [e.battery(), e.action([
'on', 'off', 'brightness_move_up', 'brightness_move_down', 'brightness_stop', 'brightness_step_up', 'brightness_step_down'])],
@@ -115,7 +109,6 @@ module.exports = [
model: '4512719',
vendor: 'Namron',
description: 'Zigbee 2 channel switch K4 white',
- whiteLabel: [{vendor: 'Sunricher', model: 'SR-ZG9001K4-DIM2'}],
fromZigbee: [fz.command_on, fz.command_off, fz.battery, fz.command_move, fz.command_stop],
meta: {multiEndpoint: true},
exposes: [e.battery(), e.action(['on_l1', 'off_l1', 'brightness_move_up_l1', 'brightness_move_down_l1', 'brightness_stop_l1',
@@ -130,7 +123,6 @@ module.exports = [
model: '4512726',
vendor: 'Namron',
description: 'Zigbee 4 in 1 dimmer',
- whiteLabel: [{vendor: 'Sunricher', model: 'SR-ZG2835'}],
fromZigbee: [fz.battery, fz.command_on, fz.command_off, fz.command_move_to_level, fz.command_move_to_color_temp,
fz.command_move_to_hue, fz.ignore_genOta],
toZigbee: [],
@@ -150,7 +142,6 @@ module.exports = [
model: '4512729',
vendor: 'Namron',
description: 'Zigbee 2 channel switch K4 white',
- whiteLabel: [{vendor: 'Sunricher', model: 'SR-ZG9001K4-DIM2'}],
fromZigbee: [fz.command_on, fz.command_off, fz.battery, fz.command_move, fz.command_stop],
meta: {multiEndpoint: true},
exposes: [e.battery(), e.action(['on_l1', 'off_l1', 'brightness_move_up_l1', 'brightness_move_down_l1', 'brightness_stop_l1',
@@ -165,7 +156,6 @@ module.exports = [
model: '4512706',
vendor: 'Namron',
description: 'Remote control',
- whiteLabel: [{vendor: 'Sunricher', model: 'SR-ZG2868'}],
fromZigbee: [fz.command_on, fz.command_off, fz.command_step, fz.command_step_color_temperature, fz.command_recall,
fz.command_move_to_color_temp, fz.battery],
exposes: [e.battery(), e.action(['on', 'off', 'brightness_step_up', 'brightness_step_down', 'color_temperature_step_up',
@@ -181,7 +171,6 @@ module.exports = [
model: '4512705',
vendor: 'Namron',
description: 'Zigbee 4 channel remote control',
- whiteLabel: [{vendor: 'Sunricher', model: 'SR-ZG9001K12-DIM-Z4'}],
fromZigbee: [fz.command_on, fz.command_off, fz.battery, fz.command_move, fz.command_stop, fz.command_recall],
toZigbee: [],
exposes: [e.battery(), e.action([
@@ -215,7 +204,6 @@ module.exports = [
model: '89665',
vendor: 'Namron',
description: 'LED Strip RGB+W (5m) IP20',
- whiteLabel: [{vendor: 'Sunricher', model: 'DIY-ZG9101-RGBW'}],
meta: {turnsOffAtBrightness1: true},
extend: extend.light_onoff_brightness_colortemp_color(),
},
| 13 |
diff --git a/packages/spark/components/_masthead.scss b/packages/spark/components/_masthead.scss border-bottom: $sprk-masthead-border-bottom-wide;
}
}
+.sprk-c-Masthead__nav-item {
+ display: flex;
+ justify-content: flex-end;
+}
// Hide menu element and additional nav link on larger views
.sprk-c-Masthead__menu,
}
}
-.sprk-c-Masthead__nav-item {
- text-align: right;
-}
-
// Add sizing range for logo
.sprk-c-Masthead__logo {
max-width: $sprk-masthead-logo-max-width;
| 3 |
diff --git a/README.md b/README.md @@ -653,7 +653,7 @@ Use the `url` method with an `img` element in your markup:
Notes:
* `{{this.url}}` will assume the first store in your `stores` array. In this example, we're displaying the image from the "thumbs" store but wrapping it in a link that will load the image from the primary store (for example, the original image or a large image).
* The `uploading` and `storing` options allow you to specify a static image that will be shown in place of the real image while it is being uploaded and stored. You can alternatively use `if` blocks like `{{#if this.isUploaded}}` and `{{#if this.hasStored 'thumbs'}}` to display something different until upload and storage is complete.
-* These helpers are actually just instance methods on the `FS.File` instances, so there are others you can use, such as `this.isImage`. See [the API documentation](https://github.com/CollectionFS/Meteor-cfs-file/blob/master/api.md). The `url` method is documented separately [here](https://github.com/CollectionFS/Meteor-cfs-access-point/blob/master/api.md#fsfileurloptionsanywhere).
+* These helpers are actually just instance methods on the `FS.File` instances, so there are others you can use, such as `this.isImage`. See [the API documentation](https://github.com/CollectionFS/Meteor-CollectionFS/blob/master/packages/file/api.md). The `url` method is documented separately [here](https://github.com/CollectionFS/Meteor-CollectionFS/blob/master/packages/access-point/api.md#fsfileurloptionsanywhere).
@@ -686,7 +686,7 @@ specify the store name, the URL will be for the copy in the first defined store.
{{/each}}
```
-This is actually using the [url method](https://github.com/CollectionFS/Meteor-cfs-access-point/blob/master/api.md#fsfileurloptionsanywhere), which is added to the `FS.File` prototype by the `cfs:access-point` package. You can use any of the options mentioned in the API documentation, and you can call it from client and server code.
+This is actually using the [url method](https://github.com/CollectionFS/Meteor-CollectionFS/blob/master/packages/access-point/api.md#fsfileurloptionsanywhere), which is added to the `FS.File` prototype by the `cfs:access-point` package. You can use any of the options mentioned in the API documentation, and you can call it from client and server code.
### isImage
| 1 |
diff --git a/src/components/_classes/component/Component.js b/src/components/_classes/component/Component.js @@ -615,11 +615,13 @@ export default class Component extends Element {
}
get labelWidth() {
- return this.component.labelWidth || 30;
+ const width = this.component.labelWidth;
+ return width >= 0 ? width : 30;
}
get labelMargin() {
- return this.component.labelMargin || 3;
+ const margin = this.component.labelMargin;
+ return margin >= 0 ? margin : 3;
}
get isAdvancedLabel() {
| 11 |
diff --git a/js/templates/userPage/categoryFilter.html b/js/templates/userPage/categoryFilter.html <%
ob.categories.slice(0, ob.maxInitiallyVisibleCats - 1).forEach((cat, index) => {
+ valueCat = cat.replace(/&/g, "&");
var flatCat = cat.replace(/\s/g, '-'); // remove spaces
%>
<div class="btnRadio">
<input type="radio"
name="filterShippingCategory"
- value="<%= cat %>"
+ value="<%= valueCat %>"
id="<%= `filterShippingCategory${flatCat}` %>"
<% if (ob.selected === cat) print('checked') %>>
<label for="<%= `filterShippingCategory${flatCat}` %>"><%= cat %></label>
| 9 |
diff --git a/includes/Modules/Analytics.php b/includes/Modules/Analytics.php @@ -126,6 +126,80 @@ final class Analytics extends Module
},
0
);
+
+ add_action(
+ 'admin_init',
+ function() {
+ $this->handle_provisioning_callback();
+ }
+ );
+ }
+
+ /**
+ * Handles the provisioning callback after the user completes the terms of service.
+ *
+ * @since 1.0.0
+ */
+ private function handle_provisioning_callback() {
+ if ( defined( 'WP_CLI' ) && WP_CLI ) {
+ return;
+ }
+
+ $input = $this->context->input();
+
+ if ( $input->filter( INPUT_GET, 'gatoscallback' ) ) {
+ // The handler should check the received Account Ticket id parameter against the id stored in the provisioning step.
+ $account_ticket_id = $this->context->input()->filter( INPUT_GET, 'accountTicketId', FILTER_SANITIZE_STRING );
+ $stored_account_ticket_id = get_transient( PROVISION_ACCOUNT_TICKET_ID . '::' . get_current_user_id() );
+ delete_transient( PROVISION_ACCOUNT_TICKET_ID . '::' . get_current_user_id() );
+
+ if ( $stored_account_ticket_id !== $account_ticket_id ) {
+ wp_safe_redirect(
+ $this->context->admin_url(
+ 'module-analytics',
+ array(
+ 'error_code' => 'account_ticket_id_mismatch',
+ )
+ )
+ );
+ exit;
+ }
+
+ $account_id = $this->context->input()->filter( INPUT_GET, 'accountId', FILTER_SANITIZE_STRING );
+ $web_property_id = $this->context->input()->filter( INPUT_GET, 'webPropertyId', FILTER_SANITIZE_STRING );
+ $profile_id = $this->context->input()->filter( INPUT_GET, 'profileId', FILTER_SANITIZE_STRING );
+
+ if ( empty( $account_id ) || empty( $web_property_id ) || empty( $profile_id ) ) {
+ wp_safe_redirect(
+ $this->context->admin_url(
+ 'module-analytics',
+ array(
+ 'slug' => 'analytics',
+ 'error_code' => 'callback_missing_parameter',
+ )
+ )
+ );
+ exit;
+ }
+
+ $this->get_settings()->merge(
+ array(
+ 'accountId' => $account_id,
+ 'webPropertyId' => $web_property_id,
+ 'profileID' => $profile_id,
+ )
+ );
+
+ wp_safe_redirect(
+ $this->context->admin_url(
+ 'dashboard',
+ array(
+ 'notification' => 'authentication_success',
+ )
+ )
+ );
+ exit;
+ }
}
/**
| 9 |
diff --git a/src/js/services/rateService.js b/src/js/services/rateService.js @@ -12,6 +12,8 @@ angular.module('canoeApp.services')
var root = {}
+ root.rates = null
+
root.updateRates = function (rates) {
root.alternatives = []
root.rates = rates
@@ -37,14 +39,19 @@ angular.module('canoeApp.services')
root.getRate = function (code) {
if (root.isAvailable()) {
- return root.rates[code].rate
+ var rate = root.rates[code]
+ if (rate) {
+ return rate.rate
+ } else {
+ return 0
+ }
} else {
return 0
}
}
root.isAvailable = function () {
- return !!root.rates
+ return root.rates !== null
}
root.whenAvailable = function (callback) {
| 9 |
diff --git a/token-metadata/0x062f90480551379791FBe2ED74C1fe69821b30d3/metadata.json b/token-metadata/0x062f90480551379791FBe2ED74C1fe69821b30d3/metadata.json "symbol": "YMAX",
"address": "0x062f90480551379791FBe2ED74C1fe69821b30d3",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/tests/Unit/CrudPanel/CrudPanelTest.php b/tests/Unit/CrudPanel/CrudPanelTest.php @@ -46,13 +46,17 @@ class CrudPanelTest extends BaseCrudPanelTest
public function testSync()
{
- // TODO: find out what sync method does
$this->markTestIncomplete();
+
+ // TODO: the sync method should not be in the CrudPanel class and should not be exposed in the public API.
+ // it is an utility method and should be refactored.
}
public function testSort()
{
- // TODO: find out what sort method does
$this->markTestIncomplete();
+
+ // TODO: the sort method should not be in the CrudPanel class and should not be exposed in the public API.
+ // it is an utility method and should be refactored.
}
}
| 3 |
diff --git a/site/rabbit.ent b/site/rabbit.ent @@ -21,7 +21,7 @@ limitations under the License.
<!ENTITY version-server-series "v3.7.x">
<!ENTITY version-erlang-client "3.7.3">
<!ENTITY version-server-tag "v3.7.3">
-<!ENTITY standalone-otp-version "20.1">
+<!ENTITY standalone-otp-version "20.2.3">
<!ENTITY serverDebMinorVersion "1">
<!ENTITY serverRPMMinorVersion "1">
| 12 |
diff --git a/src/components/ThumbnailImage.js b/src/components/ThumbnailImage.js @@ -53,9 +53,10 @@ class ThumbnailImage extends PureComponent {
* @param {Number} height - Height of the original image.
* @returns {Object} - Object containing thumbnails width and height.
*/
-
calculateThumbnailImageSize(width, height) {
- if (!width || !height) { return {}; }
+ if (!width || !height) {
+ return {};
+ }
// Width of the thumbnail works better as a constant than it does
// a percentage of the screen width since it is relative to each screen
@@ -75,6 +76,12 @@ class ThumbnailImage extends PureComponent {
return {thumbnailWidth: thumbnailScreenWidth, thumbnailHeight: Math.max(40, thumbnailScreenHeight)};
}
+ /**
+ * Update the state with the computed thumbnail sizes.
+ *
+ * @param {{ width: number, height: number }} Params - width and height of the original image.
+ * @returns {void}
+ */
updateImageSize({width, height}) {
const {thumbnailWidth, thumbnailHeight} = this.calculateThumbnailImageSize(width, height);
this.setState({thumbnailWidth, thumbnailHeight});
| 9 |
diff --git a/lib/plugins/package/lib/validate.test.js b/lib/plugins/package/lib/validate.test.js @@ -19,6 +19,7 @@ describe('#validate()', () => {
});
it('should resolve if servicePath is given', (done) => {
+ packageService.serverless.config.servicePath = true;
packageService.validate().then(() => done());
});
});
| 1 |
diff --git a/test/v3/response.test.js b/test/v3/response.test.js @@ -77,25 +77,25 @@ describe('v3/response', () => {
it('valid code and content type omitted', () => {
const req = request({});
- const res = instance.response(req, 200, { date: new Date(d) });
+ const res = instance.response(req).serialize(200, { date: new Date(d) });
expect(res.value.body).to.deep.equal({ date: '2000-01-01' });
});
it('valid code and content type', () => {
const req = request({});
- const res = instance.response(req, 200, { date: new Date(d) }, { 'content-type': 'application/json' });
+ const res = instance.response(req).serialize(200, { date: new Date(d) }, { 'content-type': 'application/json' });
expect(res.value.body).to.deep.equal({ date: '2000-01-01' });
});
it('valid code and invalid content type', () => {
const req = request({});
- expect(instance.response(req, 200, { date: new Date(d) }, { 'content-type': 'text/plain' }).value.body)
+ expect(instance.response(req).serialize(200, { date: new Date(d) }, { 'content-type': 'text/plain' }).value.body)
.to.deep.equal({ date: new Date(d) });
});
it('invalid code uses default', () => {
const req = request({});
- const res = instance.response(req, 400, { date: new Date(d) }, { 'content-type': 'application/json' });
+ const res = instance.response(req).serialize(400, { date: new Date(d) }, { 'content-type': 'application/json' });
expect(res.value.body).to.deep.equal({ date: '2000-01-01' });
});
@@ -106,13 +106,13 @@ describe('v3/response', () => {
it('header with schema', () => {
const req = request({});
- const res = instance.response(req, 200, {}, { 'x-date': new Date(d) });
+ const res = instance.response(req).serialize(200, {}, { 'x-date': new Date(d) });
expect(res.value.header['x-date']).to.equal('2000-01-01');
});
it('header without schema', () => {
const req = request({});
- const res = instance.response(req, 200, {}, { 'x-abc': new Date(d) });
+ const res = instance.response(req).serialize(200, {}, { 'x-abc': new Date(d) });
expect(res.value.header['x-abc']).to.deep.equal(new Date(d));
});
| 3 |
diff --git a/kitty-items-js/README.md b/kitty-items-js/README.md @@ -7,7 +7,7 @@ This API currently supports:
- Minting Kitty Items (non-fungible token)
- Creating Sale Offers for Kitty Items
-### Setup / Running the API
+## Setup / Running the API
- Install npm dependencies:
@@ -34,8 +34,9 @@ npm run start:dev
```
Note that when the API starts, it will automatically run the database migrations for the configured `DATABASE_URL` url.
+Try out the endpoints at the `Sample Endpoints` section. Note that in order to
-### Running Worker / Event consumer
+## Running Worker / Event consumer
- Run docker:
@@ -54,7 +55,7 @@ docker-compose up -d
npm run workers:dev
```
-### Creating a new Flow Account on Testnet
+## Creating a new Flow Account on Testnet
In order to create an account on Testnet to deploy the smart contracts and mint Kibbles or Kitty Items, follow these
steps:
@@ -70,10 +71,45 @@ steps:
- When the account is approved, you will receive an e-mail with your newly created Flow account ID. This account ID will
be used as the environment variable for `MINTER_FLOW_ADDRESS`.
+## Sample endpoints
-### Sample endpoints
+For a list of endpoints available on the API, look into the `routes` folder.
-For a list of endpoints available on the API, look into the `routes` folder. Here are a few examples to get started:
+### Setup Resources
+
+Before you can mint Kibbles and Kitty Items, you should run the requests in this section. They will initialize the
+collections and vaults that your account (`MINTER_FLOW_ADDRESS`) needs in order to hold fungible and non-fungible
+tokens.
+
+- **POST /v1/kibbles/setup** : Creates a resource that holds Kibbles in the `MINTER_FLOW_ADDRESS` account.
+
+ - Example:
+
+```
+ curl --request POST \
+ --url http://localhost:3000/v1/kibbles/setup \
+ --header 'Content-Type: application/json'
+```
+
+- **POST /v1/kitty-items/setup** : Creates a resource that holds Kitty Items in the `MINTER_FLOW_ADDRESS` account.
+ - Example:
+
+```
+ curl --request POST \
+ --url http://localhost:3000/v1/kitty-items/setup \
+ --header 'Content-Type: application/json'
+```
+
+- **POST /v1/market/setup**: Creates a resource that allows the `MINTER_FLOW_ADDRESS` to hold sale offers for Kitty Items.
+ - Example:
+
+```
+ curl --request POST \
+ --url http://localhost:3000/v1/market/setup \
+ --header 'Content-Type: application/json'
+ ```
+
+### Mint Kibbles and Kitty Items
- **POST /v1/kibbles/mint** - mints Kibbles (fungible token) to the specified Flow Address.
@@ -85,6 +121,7 @@ For a list of endpoints available on the API, look into the `routes` folder. Her
}
```
- Example:
+
```
curl --request POST \
--url http://localhost:3000/v1/kibbles/mint \
@@ -123,7 +160,6 @@ curl --request POST \
'
```
-
## Etc
### Creating a new database migration:
@@ -131,5 +167,3 @@ curl --request POST \
```shell
npm run migrate:make
```
-
-Migrations are run automatically when the app initializes.
| 0 |
diff --git a/assets/js/modules/adsense/components/settings/SettingsView.js b/assets/js/modules/adsense/components/settings/SettingsView.js @@ -121,7 +121,7 @@ export default function SettingsView() {
}
let autoAdsDisabledMessage = __(
- 'Ads are currently displayed for all visitors.',
+ 'Ads are currently displayed for all visitors',
'google-site-kit'
);
if (
| 2 |
diff --git a/blocks/init/src/Blocks/components/button/manifest.json b/blocks/init/src/Blocks/components/button/manifest.json "buttonWidth": {
"default": [
{
- "inverse": true,
"variable": {
"button-display": "inline-flex",
- "aaa": "aaa"
- }
- },
- {
- "inverse": true,
- "breakpoint": "tablet",
- "variable": {
- "button-display": "inline-flex",
- "bbb": "bbb"
- }
- },
- {
- "inverse": true,
- "breakpoint": "desktop",
- "variable": {
- "button-display": "inline-flex",
- "ccc": "ccc"
- }
- },
- {
- "breakpoint": "mobile",
- "variable": {
- "button-display": "inline-flex",
- "button-width": "auto",
- "ddd": "ddd"
- }
- },
- {
- "breakpoint": "tablet",
- "variable": {
- "button-display": "inline-flex",
- "button-width": "auto2",
- "eee": "eee"
- }
- },
- {
- "breakpoint": "desktop",
- "variable": {
- "button-display": "inline-flex",
- "button-width": "auto3",
- "fff": "fff"
+ "button-width": "auto"
}
}
],
{
"variable": {
"button-display": "flex",
- "button-width": "100%",
- "ggg": "ggg"
+ "button-width": "100%"
}
}
]
| 13 |
diff --git a/lib/xlsx/xform/sheet/cell-xform.js b/lib/xlsx/xform/sheet/cell-xform.js @@ -65,6 +65,7 @@ class CellXform extends BaseXform {
switch (model.type) {
case Enums.ValueType.String:
+ case Enums.ValueType.RichText:
if (options.sharedStrings) {
model.ssId = options.sharedStrings.add(model.value);
}
@@ -225,6 +226,7 @@ class CellXform extends BaseXform {
break;
case Enums.ValueType.String:
+ case Enums.ValueType.RichText:
if (model.ssId !== undefined) {
xmlStream.addAttribute('t', 's');
xmlStream.leafNode('v', null, model.ssId);
| 9 |
diff --git a/contracts/HavvenEscrow.sol b/contracts/HavvenEscrow.sol @@ -41,6 +41,20 @@ contract HavvenEscrow is Owned, SafeDecimalMath {
return nomin.balanceOf(this);
}
+ function setHavven(Havven newHavven)
+ public
+ onlyOwner
+ {
+ havven = newHavven;
+ }
+
+ function setNomin(EtherNomin newNomin)
+ public
+ onlyOwner
+ {
+ nomin = newNomin;
+ }
+
function sweepFees()
public
onlyOwner
| 12 |
diff --git a/packages/component-library/stories/lineChart.notes.md b/packages/component-library/stories/lineChart.notes.md @@ -20,9 +20,11 @@ These properties can be set in the Standard story:
## Custom
-The Custom story shows all possible properties that can be passed to the LineChart component for customization. An additional property is added to the properties listed in the Standard story.
+The Custom story shows all possible properties that can be passed to the LineChart component for customization. Three additional properties are added to the properties listed in the Standard story.
- domain: The domain property describes the range of data the component will include. This prop is given as an object that specifies separate arrays for the dependent and independent variables. If this prop is not provided, as in the Standard story, a domain will be calculated from data, or other available information. In line charts, the x value corresponds to the independent variable, shown on the x-axis, and the dependent variable corresponds to the y value, shown on the y-axis.
+- Data key label
+- Data value label
The Custom story also shows the use of a custom legend, which is a separate component.
@@ -30,8 +32,8 @@ The Custom story also shows the use of a custom legend, which is a separate comp
The example Simple story shows the minimal properties needed for the LineChart.
-- Title
-- Subtitle
+- X-axis label
+- Y-axis label
- Data
## Many Data Points
| 3 |
diff --git a/packages/node_modules/@node-red/runtime/lib/nodes/context/index.js b/packages/node_modules/@node-red/runtime/lib/nodes/context/index.js @@ -210,12 +210,26 @@ function createContext(id,seed) {
insertSeedValues = function(keys,values) {
if (!Array.isArray(keys)) {
if (values[0] === undefined) {
+ try {
values[0] = util.getObjectProperty(seed,keys);
+ } catch(err) {
+ if (err.code === "INVALID_EXPR") {
+ throw err;
+ }
+ value[0] = undefined;
+ }
}
} else {
for (var i=0;i<keys.length;i++) {
if (values[i] === undefined) {
+ try {
values[i] = util.getObjectProperty(seed,keys[i]);
+ } catch(err) {
+ if (err.code === "INVALID_EXPR") {
+ throw err;
+ }
+ value[i] = undefined;
+ }
}
}
}
@@ -257,7 +271,12 @@ function createContext(id,seed) {
return;
}
var results = Array.prototype.slice.call(arguments,[1]);
+ try {
insertSeedValues(key,results);
+ } catch(err) {
+ callback.apply(err);
+ return
+ }
// Put the err arg back
results.unshift(undefined);
callback.apply(null,results);
@@ -270,7 +289,14 @@ function createContext(id,seed) {
if (Array.isArray(key)) {
insertSeedValues(key,results);
} else if (results === undefined){
+ try {
results = util.getObjectProperty(seed,key);
+ } catch(err) {
+ if (err.code === "INVALID_EXPR") {
+ throw err;
+ }
+ results = undefined;
+ }
}
}
return results;
| 9 |
diff --git a/src/server/routes/login-passport.js b/src/server/routes/login-passport.js @@ -321,7 +321,7 @@ module.exports = function(crowi, app) {
passport.authenticate('saml')(req, res);
};
- const loginPassportSamlCallback = async(req, res, next) => {
+ const loginPassportSamlCallback = async(req, res) => {
const providerId = 'saml';
const strategyName = 'saml';
const attrMapId = config.crowi['security:passport-saml:attrMapId'];
@@ -329,7 +329,8 @@ module.exports = function(crowi, app) {
const attrMapMail = config.crowi['security:passport-saml:attrMapMail'];
const attrMapFirstName = config.crowi['security:passport-saml:attrMapFirstName'] || 'firstName';
const attrMapLastName = config.crowi['security:passport-saml:attrMapLastName'] || 'lastName';
- const response = await promisifiedPassportAuthentication(req, res, next, strategyName);
+
+ const response = await promisifiedPassportAuthentication(req, res, loginFailure, strategyName);
const userInfo = {
'id': response[attrMapId],
'username': response[attrMapUsername],
@@ -343,16 +344,19 @@ module.exports = function(crowi, app) {
userInfo['name'] = `${response[attrMapFirstName]} ${response[attrMapLastName]}`.trim();
}
- const externalAccount = await getOrCreateUser(req, res, next, userInfo, providerId);
+ const externalAccount = await getOrCreateUser(req, res, loginFailure, userInfo, providerId);
if (!externalAccount) {
- return loginFailure(req, res, next);
+ return loginFailure(req, res);
}
const user = await externalAccount.getPopulatedUser();
// login
req.logIn(user, err => {
- if (err) { return next(err) }
+ if (err != null) {
+ logger.error(err);
+ return loginFailure(req, res);
+ }
return loginSuccess(req, res, user);
});
};
@@ -368,13 +372,13 @@ module.exports = function(crowi, app) {
if (err) {
logger.error(`'${strategyName}' passport authentication error: `, err);
- req.flash('warningMessage', `Error occured in '${strategyName}' passport authentication`);
- return next(); // pass and the flash message is displayed when all of authentications are failed.
+ req.flash('warningMessage', `Error occured in '${strategyName}' passport authentication`); // pass and the flash message is displayed when all of authentications are failed.
+ return next(req, res);
}
// authentication failure
if (!response) {
- return next();
+ return next(req, res);
}
logger.debug('response', response);
| 9 |
diff --git a/lib/node_modules/@stdlib/array/complex64/lib/main.js b/lib/node_modules/@stdlib/array/complex64/lib/main.js @@ -810,14 +810,14 @@ Object.defineProperty( Complex64Array.prototype, 'length', {
*
* ## Notes
*
-* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are only concerned with the following scenario:
+* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:
*
* ```text
* buf: ---------------------
* src: ---------------------
* ```
*
-* In the above, as we copy over values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.
+* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.
*
* In the other overlapping scenario,
*
@@ -922,9 +922,9 @@ Object.defineProperty( Complex64Array.prototype, 'set', {
)
) {
// We need to copy source values...
- tmp = [];
+ tmp = new Float32Array( N );
for ( i = 0; i < N; i++ ) {
- tmp.push( sbuf[ i ] );
+ tmp[ i ] = sbuf[ i ];
}
sbuf = tmp;
}
@@ -967,9 +967,9 @@ Object.defineProperty( Complex64Array.prototype, 'set', {
)
) {
// We need to copy source values...
- tmp = [];
+ tmp = new Float32Array( N );
for ( i = 0; i < N; i++ ) {
- tmp.push( sbuf[ i ] );
+ tmp[ i ] = sbuf[ i ];
}
sbuf = tmp;
}
| 4 |
diff --git a/src/components/Icon/BankIcons.js b/src/components/Icon/BankIcons.js @@ -123,8 +123,8 @@ export default function getBankIcon(bankName, isCard) {
bankIcon.icon = getAssetIcon(bankName.toLowerCase(), isCard);
}
- // For default icon & expensify (for now) the icon size should not be set.
- if (![Expensify, CreditCard, Bank].includes(bankIcon.icon)) {
+ // For default icons the icon size should not be set.
+ if (![CreditCard, Bank].includes(bankIcon.icon)) {
bankIcon.iconSize = variables.iconSizeExtraLarge;
}
| 11 |
diff --git a/package.json b/package.json },
"dependencies": {
"@11ty/dependency-tree": "^2.0.0",
- "@11ty/eleventy-dev-server": "^1.0.0-canary.1",
+ "@11ty/eleventy-dev-server": "^1.0.0-canary.2",
"@11ty/eleventy-utils": "^1.0.0",
"@iarna/toml": "^2.2.5",
"@sindresorhus/slugify": "^1.1.2",
| 3 |
diff --git a/api/server/package.json b/api/server/package.json "start": "npm run build && node ./dist/index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
- "author": "Sacha Bron",
+ "author": "AXA rev",
"license": "ISC",
"dependencies": {
"@types/multer": "^1.3.7",
| 2 |
diff --git a/packages/inertia/src/types.ts b/packages/inertia/src/types.ts @@ -3,7 +3,7 @@ import { CancelTokenSource } from 'axios'
export type Errors = Record<string, string>
export type ErrorBag = Record<string, Errors>
-export type FormDataConvertible = Date|File|Blob|boolean|string|number|null|undefined
+export type FormDataConvertible = Date|File|Blob|Array<any>|boolean|string|number|null|undefined
export enum Method {
GET = 'get',
| 11 |
diff --git a/edit.js b/edit.js @@ -1807,6 +1807,7 @@ function animate(timestamp, frame) {
if (isFinite(d)) {
cubeMesh.position.copy(localVector3)
.add(localVector4.set(-width/2 + 0.5/10*width + x/10*width, -height/2 + 0.5/10*height + y/10*height, -d).applyQuaternion(localQuaternion2));
+ cubeMesh.quaternion.setFromUnitVectors(localVector4.set(0, 1, 0), collisionRaycaster.normals[i]);
cubeMesh.visible = true;
} else {
cubeMesh.visible = false;
| 0 |
diff --git a/Calculus.js b/Calculus.js */
if((typeof module) !== 'undefined' && typeof nerdamer === 'undefined') {
- nerdamer = require('./nerdamer.core.js');
+ var nerdamer = require('./nerdamer.core.js');
require('./Algebra.js');
}
| 0 |
diff --git a/runtime.js b/runtime.js @@ -856,7 +856,7 @@ const _loadWebBundle = async (file, {instanceId = null, monetizationPointer = nu
monetizationPointer,
});
};
-const _loadScn = async (file, opts) => {
+const _loadScene = async (file, {files = null}) => {
let srcUrl = file.url || URL.createObjectURL(file);
const res = await fetch(srcUrl);
@@ -1226,7 +1226,7 @@ const typeHandlers = {
'js': _loadScript,
'json': _loadManifestJson,
'wbn': _loadWebBundle,
- 'scn': _loadScn,
+ 'scn': _loadScene,
'url': _loadPortal,
'iframe': _loadIframe,
'mediastream': _loadMediaStream,
| 10 |
diff --git a/edit.js b/edit.js @@ -774,6 +774,9 @@ let buildMode = null;
let platformMesh = null;
let stairsMesh = null;
let wallMesh = null;
+let woodMesh = null;
+let stoneMesh = null;
+let metalMesh = null;
(async () => {
const buildModels = await _loadGltf('./build.glb');
stairsMesh = buildModels.children.find(c => c.name === 'Node_1003');
@@ -785,6 +788,15 @@ let wallMesh = null;
wallMesh = buildModels.children.find(c => c.name === 'SM_Prop_Wall_Junk_06');
wallMesh.visible = false;
worldContainer.add(wallMesh);
+ woodMesh = buildModels.children.find(c => c.name === 'SM_Prop_Plank_01');
+ woodMesh.visible = false;
+ worldContainer.add(woodMesh);
+ stoneMesh = buildModels.children.find(c => c.name === 'SM_Env_Rock_01');
+ stoneMesh.visible = false;
+ worldContainer.add(stoneMesh);
+ metalMesh = buildModels.children.find(c => c.name === 'SM_Prop_MetalSheet_01');
+ metalMesh.visible = false;
+ worldContainer.add(metalMesh);
})();
const redBuildMeshMaterial = new THREE.ShaderMaterial({
vertexShader: `
@@ -1879,6 +1891,14 @@ function animate(timestamp, frame) {
const itemMesh = (() => {
const object = new THREE.Object3D();
+ const matMeshes = [woodMesh, stoneMesh, metalMesh];
+ const matIndex = Math.floor(Math.random()*matMeshes.length);
+ const matMesh = matMeshes[matIndex];
+ const matMeshClone = matMesh.clone();
+ matMeshClone.position.y = 0.5;
+ matMeshClone.visible = true;
+ object.add(matMeshClone);
+
const skirtGeometry = new THREE.CylinderBufferGeometry(radius, radius, radius, segments, 1, true)
.applyMatrix4(new THREE.Matrix4().makeTranslation(0, radius/2, 0));
const ys = new Float32Array(skirtGeometry.attributes.position.array.length/3);
@@ -1936,6 +1956,7 @@ function animate(timestamp, frame) {
object.update = () => {
const now = Date.now();
skirtMaterial.uniforms.uAnimation.value = (now%60000)/60000;
+ matMeshClone.rotation.y = (now%5000)/5000*Math.PI*2;
};
return object;
| 0 |
diff --git a/plugins/continuous-toolbox/src/ContinuousFlyout.js b/plugins/continuous-toolbox/src/ContinuousFlyout.js @@ -51,6 +51,12 @@ export class ContinuousFlyout extends Blockly.VerticalFlyout {
this.workspace_.setMetricsManager(
new ContinuousFlyoutMetrics(this.workspace_, this));
+ this.workspace_.addChangeListener((e) => {
+ if (e.type === Blockly.Events.VIEWPORT_CHANGE) {
+ this.selectCategoryByScrollPosition_(-this.workspace_.scrollY);
+ }
+ });
+
this.autoClose = false;
}
@@ -183,14 +189,6 @@ export class ContinuousFlyout extends Blockly.VerticalFlyout {
return 0;
}
- /** @override */
- setMetrics_(xyRatio) {
- super.setMetrics_(xyRatio);
- if (this.scrollPositions) {
- this.selectCategoryByScrollPosition_(-this.workspace_.scrollY);
- }
- }
-
/**
* Overrides the position function solely to change the x coord in RTL mode.
* The base function allows the workspace to go "under" the flyout, so
| 1 |
diff --git a/instancing.js b/instancing.js @@ -5,6 +5,9 @@ import {getRenderer} from './renderer.js';
const localVector2D = new THREE.Vector2();
const localVector2D2 = new THREE.Vector2();
+const localMatrix = new THREE.Matrix4();
+const localSphere = new THREE.Sphere();
+const localFrustum = new THREE.Frustum();
const localDataTexture = new THREE.DataTexture();
const maxNumDraws = 1024;
@@ -130,7 +133,7 @@ export class GeometryAllocator {
this.drawStarts = new Int32Array(maxNumDraws);
this.drawCounts = new Int32Array(maxNumDraws);
- this.boundingSpheres = new Int32Array(maxNumDraws * 4);
+ this.boundingSpheres = new Float32Array(maxNumDraws * 4);
this.numDraws = 0;
}
alloc(numPositions, numIndices, sphere) {
@@ -142,9 +145,7 @@ export class GeometryAllocator {
this.drawStarts[this.numDraws] = slot.start * this.geometry.index.array.BYTES_PER_ELEMENT;
this.drawCounts[this.numDraws] = slot.count;
if (sphere) {
- this.boundingSpheres[this.numDraws * 4] = sphere.x;
- this.boundingSpheres[this.numDraws * 4 + 1] = sphere.y;
- this.boundingSpheres[this.numDraws * 4 + 2] = sphere.z;
+ sphere.center.toArray(this.boundingSpheres, this.numDraws * 4);
this.boundingSpheres[this.numDraws * 4 + 3] = sphere.radius;
} else {
this.boundingSpheres[this.numDraws * 4] = 0;
@@ -179,13 +180,25 @@ export class GeometryAllocator {
this.positionFreeList.free(geometryBinding.positionFreeListEntry);
this.indexFreeList.free(geometryBinding.indexFreeListEntry);
}
- getDrawSpec(drawStarts, drawCounts) {
+ getDrawSpec(camera, drawStarts, drawCounts) {
drawStarts.length = 0;
drawCounts.length = 0;
+ const projScreenMatrix = localMatrix.multiplyMatrices(camera.projectionMatrix, camera.matrixWorldInverse);
+ localFrustum.setFromProjectionMatrix(projScreenMatrix);
+
for (let i = 0; i < this.numDraws; i++) {
- drawStarts[i] = this.drawStarts[i];
- drawCounts[i] = this.drawCounts[i];
+ const boundingSphereRadius = this.boundingSpheres[i * 4 + 3];
+ if (boundingSphereRadius > 0) {
+ localSphere.center.fromArray(this.boundingSpheres, i * 4);
+ localSphere.radius = boundingSphereRadius;
+
+ // frustum culling
+ if (localFrustum.intersectsSphere(localSphere)) {
+ drawStarts.push(this.drawStarts[i]);
+ drawCounts.push(this.drawCounts[i]);
+ }
+ }
}
}
}
@@ -427,7 +440,7 @@ export class InstancedGeometryAllocator {
getTexture(name) {
return this.textures[name];
}
- getDrawSpec(multiDrawStarts, multiDrawCounts, multiDrawInstanceCounts) {
+ getDrawSpec(camera, multiDrawStarts, multiDrawCounts, multiDrawInstanceCounts) {
multiDrawStarts.length = this.drawStarts.length;
multiDrawCounts.length = this.drawCounts.length;
multiDrawInstanceCounts.length = this.drawInstanceCounts.length;
@@ -447,8 +460,8 @@ export class BatchedMesh extends THREE.Mesh {
this.isBatchedMesh = true;
this.allocator = allocator;
}
- getDrawSpec(drawStarts, drawCounts) {
- this.allocator.getDrawSpec(drawStarts, drawCounts);
+ getDrawSpec(camera, drawStarts, drawCounts) {
+ this.allocator.getDrawSpec(camera, drawStarts, drawCounts);
}
}
@@ -459,7 +472,7 @@ export class InstancedBatchedMesh extends THREE.InstancedMesh {
this.isBatchedMesh = true;
this.allocator = allocator;
}
- getDrawSpec(multiDrawStarts, multiDrawCounts, multiDrawInstanceCounts) {
- this.allocator.getDrawSpec(multiDrawStarts, multiDrawCounts, multiDrawInstanceCounts);
+ getDrawSpec(camera, multiDrawStarts, multiDrawCounts, multiDrawInstanceCounts) {
+ this.allocator.getDrawSpec(camera, multiDrawStarts, multiDrawCounts, multiDrawInstanceCounts);
}
}
\ No newline at end of file
| 0 |
diff --git a/style/monogatari.css b/style/monogatari.css @@ -104,12 +104,13 @@ section > div:not(.row) {
**/
#game {
- height: 100vh;
- max-height: 100vh;
- max-width: 100vw;
+ height: 100%;
+ max-height: 100%;
+ max-width: 100%;
overflow: hidden;
- width: 100vw;
+ width: 100%;
display: none;
+ position: relative;
}
#game img {
@@ -163,8 +164,8 @@ section > div:not(.row) {
[data-component="modal"] {
height: auto;
- max-height: 70vh;
- width: 80vw;
+ max-height: 70%;
+ width: 80%;
margin: 0 auto;
background: #fff;
z-index: 15;
@@ -281,14 +282,14 @@ textarea {
[data-ui="face"] {
display: inline-block;
float: left;
- max-height: 20vh !important;
+ max-height: 20% !important;
position: initial !important;
}
[data-ui="text"] {
background-color: rgba(0, 0, 0, 0.5);
- min-height: 20vh;
- max-height: 25vh;
+ min-height: 20%;
+ max-height: 25%;
overflow-y: scroll;
width: 100%;
z-index: 10;
@@ -389,14 +390,14 @@ textarea {
}
[data-ui="particles"] {
- width: 100vw;
- height: 100vh;
+ width: 100%;
+ height: 100%;
position: absolute;
}
[data-ui="background"] {
- width: 100vw;
- height: 100vh;
+ width: 100%;
+ height: 100%;
}
/**
@@ -509,6 +510,6 @@ input[type=range] {
}
[data-ui="load-progress"] {
- width: 80vw;
+ width: 80%;
}
}
\ No newline at end of file
| 7 |
diff --git a/avatars/avatars.js b/avatars/avatars.js @@ -26,7 +26,6 @@ import {
import {FixedTimeStep} from '../interpolants.js';
import * as avatarCruncher from '../avatar-cruncher.js';
import * as avatarSpriter from '../avatar-spriter.js';
-import game from '../game.js';
import {
idleFactorSpeed,
walkFactorSpeed,
@@ -3316,7 +3315,7 @@ class Avatar {
if (metaversefile.isDebugMode()) {
this.debugMesh.setFromAvatar(this);
}
- this.debugMesh.visible = game.debugMode;
+ this.debugMesh.visible = metaversefile.isDebugMode();
}
}
| 2 |
diff --git a/packages/main/test/sap/ui/webcomponents/main/pages/MultiComboBox.html b/packages/main/test/sap/ui/webcomponents/main/pages/MultiComboBox.html </ui5-multi-combobox>
</div>
- <div class="demo-section" allow-custom-values>
+ <div class="demo-section">
<span>MultiComboBox n more</span> </br>
<ui5-multi-combobox style="width: 320px" placeholder="Some initial text" id="more-mcb">
| 3 |
diff --git a/src/lib/Notification/PushNotification/index.native.js b/src/lib/Notification/PushNotification/index.native.js +import {AppState} from 'react-native';
import {UrbanAirship, EventType} from 'urbanairship-react-native';
import Ion from '../../Ion';
import IONKEYS from '../../../IONKEYS';
@@ -17,8 +18,13 @@ function setupPushNotificationCallbacks() {
payload: ${notification.payload}
}`);
+ // If app is in foreground, we'll assume pusher is connected so we'll ignore this push notification
+ if (AppState.currentState === 'active') {
+ console.debug('[PUSH_NOTIFICATION] App is in foreground, ignoring push notification.');
+ return;
+ }
if (!notification.payload.type) {
- console.debug('[PUSH_NOTIFICATION] Notification of unknown type received...ignoring.');
+ console.debug('[PUSH_NOTIFICATION] Notification of unknown type received, ignoring.');
return;
}
if (!notificationTypeActionMap[notification.payload.type]) {
| 8 |
diff --git a/package.json b/package.json "disc": "^1.3.3",
"enzyme": "^3.7.0",
"enzyme-adapter-react-16": "^1.6.0",
- "es6-promise": "^4.2.5",
"eslint": "^3.19.0",
"eslint-config-standard": "^10.2.1",
"eslint-config-standard-preact": "^1.1.6",
| 2 |
diff --git a/src/traces/pie/plot.js b/src/traces/pie/plot.js @@ -239,18 +239,10 @@ function plot(gd, cdModule) {
transform = positionTitleOutside(cd0, gs);
}
- var scale = Math.min(1, transform.scale);
-
- if(scale) {
titleText.attr('transform',
strTranslate(transform.x, transform.y) +
- strScale(scale) +
+ strScale(Math.min(1, transform.scale)) +
strTranslate(transform.tx, transform.ty));
-
- titleText.style('display', null);
- } else {
- titleText.style('display', 'none');
- }
});
// now make sure no labels overlap (at least within one pie)
| 13 |
diff --git a/token-metadata/0x26CE25148832C04f3d7F26F32478a9fe55197166/metadata.json b/token-metadata/0x26CE25148832C04f3d7F26F32478a9fe55197166/metadata.json "symbol": "DEXT",
"address": "0x26CE25148832C04f3d7F26F32478a9fe55197166",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/packages/fela-dom/src/dom/connection/insertRule.js b/packages/fela-dom/src/dom/connection/insertRule.js @@ -30,11 +30,9 @@ export default function insertRule(
if (score === 0) {
if (renderer.scoreIndex[nodeReference] === undefined) {
- renderer.scoreIndex[nodeReference] = 0
index = 0
} else {
- ++renderer.scoreIndex[nodeReference]
- index = renderer.scoreIndex[nodeReference]
+ index = renderer.scoreIndex[nodeReference] + 1;
}
} else {
// we start iterating from the last score=0 entry
@@ -58,6 +56,10 @@ export default function insertRule(
node.sheet.insertRule(cssRule, index)
}
+ if (score === 0) {
+ renderer.scoreIndex[nodeReference] = index;
+ }
+
cssRules[index].score = score
} catch (e) {
// We're disabled these warnings due to false-positive errors with browser prefixes
| 12 |
diff --git a/test/backend/lib.process-manager.test.js b/test/backend/lib.process-manager.test.js @@ -38,14 +38,14 @@ var Report = require('../../models/report');
*/
describe('Process manager', function() {
before('Let API server start listening', function(done) {
- processManager.fork('../../lib/api');
+ processManager.fork('/lib/api');
setTimeout(done, 500);
});
it('should fork a process', function() {
expect(processManager.children).to.be.an.instanceOf(Array);
var children = processManager.children.length;
- var child = processManager.fork('../../lib/fetching');
+ var child = processManager.fork('/lib/fetching');
expect(child).to.have.property('pid');
expect(child.pid).to.be.above(process.pid);
expect(processManager.children).to.have.length(children + 1);
@@ -76,7 +76,7 @@ describe('Process manager', function() {
done();
});
// "API" module to send
- var api = processManager.fork('../../lib/api');
+ var api = processManager.fork('/lib/api');
process.nextTick(function() {
api.send('ping');
});
| 14 |
diff --git a/quasar/src/components/table/QTable.json b/quasar/src/components/table/QTable.json "request": {
"desc": "Emitted when a server request is triggered",
"params": {
+ "requestProp": {
+ "type": "Object",
+ "desc": "Props of the request",
+ "definition": {
"pagination": {
"type": "Object",
"desc": "Pagination object",
}
}
}
+ }
+ }
},
"update:pagination": {
| 1 |
diff --git a/app/webpack.common.js b/app/webpack.common.js @@ -18,7 +18,8 @@ module.exports = {
new CleanWebpackPlugin(['dist']),
new HtmlWebpackPlugin({
title: 'OpenNeuro',
- template: path.resolve(__dirname, 'src/index.html')
+ template: path.resolve(__dirname, 'src/index.html'),
+ favicon: './assets/favicon.ico'
}),
new webpack.DefinePlugin({
'process.env': {
| 1 |
diff --git a/js/search.js b/js/search.js @@ -92,9 +92,25 @@ async function search(browser, string) {
function parseLocusString(browser, locus) {
+ // Check for tab delimited locus string
+ const tabTokens = locus.split('\t')
+ if (tabTokens.length >= 3) {
+ // Possibly a tab-delimited locus
+ try {
+ const chr = browser.genome.getChromosomeName(tabTokens[0])
+ const start = parseInt(tabTokens[1].replace(/,/g, ''), 10) - 1
+ const end = parseInt(tabTokens[2].replace(/,/g, ''), 10)
+ if (!isNaN(start) && !isNaN(end)) {
+ return {chr, start, end}
+ }
+ } catch (e) {
+ // Not a tab delimited locus, apparently, but not really an error as that was a guess
+ }
+
+ }
+
const a = locus.split(':')
const chr = a[0]
-
if ('all' === chr && browser.genome.getChromosome(chr)) {
return {chr, start: 0, end: browser.genome.getChromosome(chr).bpLength}
| 11 |
diff --git a/generators/server/templates/src/test/java/package/service/UserServiceIT.java.ejs b/generators/server/templates/src/test/java/package/service/UserServiceIT.java.ejs @@ -503,7 +503,7 @@ public class UserServiceIT <% if (databaseType === 'cassandra') { %>extends Abst
<%_ if (databaseType === 'sql') { _%>
@Transactional
<%_ } _%>
- public void testUserDetailsWithUSLocale() {
+ public void testUserDetailsWithUSLocaleUnderscore() {
userDetails.put("locale", "en_US");
OAuth2AuthenticationToken authentication = createMockOAuth2AuthenticationToken(userDetails);
@@ -516,7 +516,7 @@ public class UserServiceIT <% if (databaseType === 'cassandra') { %>extends Abst
<%_ if (databaseType === 'sql') { _%>
@Transactional
<%_ } _%>
- public void testUserDetailsWithUSLocale2() {
+ public void testUserDetailsWithUSLocaleDash() {
userDetails.put("locale", "en-US");
OAuth2AuthenticationToken authentication = createMockOAuth2AuthenticationToken(userDetails);
| 10 |
diff --git a/articles/quickstart/spa/vuejs/_includes/_centralized_login.md b/articles/quickstart/spa/vuejs/_includes/_centralized_login.md @@ -66,7 +66,6 @@ class AuthService {
} else if (err) {
router.replace('home')
console.log(err)
- alert(`Error: <%= "${err.error}" %>. Check the console for further details.`)
}
})
}
@@ -109,9 +108,7 @@ class AuthService {
}
isAuthenticated () {
- // Check whether the current time is past the
- // access token's expiry time
- return new Date().getTime() < this.expiresAt && localStorage.getItem('loggedIn') === 'true'
+ return localStorage.getItem('loggedIn') === 'true'
}
}
@@ -125,7 +122,7 @@ The service now includes several other methods for handling authentication.
* `setSession` - sets the user's Access Token, ID Token, and a time at which the Access Token will expire
* `renewSession` - uses the `checkSession` method from auth0.js to renew the user's authentication status, and calls `setSession` if the login session is still valid
* `logout` - removes the user's tokens from browser storage
-* `isAuthenticated` - checks whether the expiry time for the Access Token has passed
+* `isAuthenticated` - checks for the presence of the `loggedIn` flag in local storage
### About the Authentication Service
| 3 |
diff --git a/app/modules/main/containers/Sections/Home/Setup/Elements/Words.js b/app/modules/main/containers/Sections/Home/Setup/Elements/Words.js @@ -6,7 +6,7 @@ import { connect } from 'react-redux';
import { withRouter } from 'react-router-dom';
import compose from 'lodash/fp/compose';
-import { Button, Segment } from 'semantic-ui-react';
+import { Button, Dimmer, Loader, Segment } from 'semantic-ui-react';
import AccountSetupElementsWordsComplete from './Words/Complete';
import AccountSetupElementsWordsConfirm from './Words/Confirm';
@@ -37,11 +37,31 @@ class AccountSetupElementsWords extends Component<Props> {
break;
}
case 'verify': {
+ if (words) {
content = <AccountSetupElementsWordsConfirm onVerified={this.onVerified} words={words} />;
+ } else {
+ content = (
+ <Segment>
+ <Dimmer active>
+ <Loader>Loading encryption words...</Loader>
+ </Dimmer>
+ </Segment>
+ );
+ }
break;
}
default: {
+ if (words) {
content = <AccountSetupElementsWordsWrite words={words} />;
+ } else {
+ content = (
+ <Segment>
+ <Dimmer active>
+ <Loader>Loading encryption words...</Loader>
+ </Dimmer>
+ </Segment>
+ );
+ }
break;
}
}
| 9 |
diff --git a/PostIdsEverywhere.user.js b/PostIdsEverywhere.user.js // @description Inserts post IDs everywhere where there's a post or post link
// @homepage https://github.com/samliew/SO-mod-userscripts
// @author @samliew
-// @version 1.7.1
+// @version 1.8
//
// @include https://*stackoverflow.com/*
// @include https://*serverfault.com/*
// @include https://*.stackexchange.com/*
//
// @exclude https://stackoverflow.com/c/*
+//
+// @require https://github.com/samliew/SO-mod-userscripts/raw/master/lib/common.js
// ==/UserScript==
(function() {
// Lists
$('a.question-hyperlink, a.answer-hyperlink, .js-post-title-link').each((i,el) => {
if(el.href.includes('/election')) return;
- let pid = el.href.match(/(?<=[/#])(\d+)/g);
- pid = $(this).hasClass('answer-hyperlink') ? pid.pop() : pid.shift();
- $('<input class="post-id" title="double click to view timeline" value="'+el.href.match(/(?<=[/#])(\d+)/g).pop() +'" readonly />').insertAfter(el)
+ let pid = getPostId(el.href);
+ $(`<input class="post-id" title="double click to view timeline" value="${pid}" readonly />`).insertAfter(el)
});
// Q&A
| 2 |
diff --git a/apps.json b/apps.json {"name":"lifeclk.app.js","url":"app.js"},
{"name":"lifeclk.img","url":"app-icon.js","evaluate":true}
]
+},
+{ "id": "gpsservice",
+ "name": "Low power GPS Service",
+ "shortName":"GPS Service",
+ "icon": "gpsservice.png",
+ "version":"0.01",
+ "description": "low power GPS widget",
+ "tags": "gps outdoors navigation",
+ "readme": "README.md",
+ "storage": [
+ {"name":"gpsservice.app.js","url":"app.js"},
+ {"name":"gpsservice.settings.js","url":"settings.js"},
+ {"name":"gpsservice.settings.json","url":"settings.json"},
+ {"name":"gpsservice.wid.js","url":"widget.js"},
+ {"name":"gpsservice.img","url":"gpsservice-icon.js","evaluate":true}
+ ]
}
]
| 3 |
diff --git a/Specs/Scene/SceneSpec.js b/Specs/Scene/SceneSpec.js @@ -1351,10 +1351,10 @@ describe(
s.initializeFrame();
s.render();
- expect(spyListener.calls.count()).toBe(1);
+ expect(spyListener.calls.count()).toBe(2);
var args = spyListener.calls.allArgs();
- expect(args.length).toEqual(1);
+ expect(args.length).toEqual(2);
expect(args[0].length).toEqual(1);
expect(args[0][0]).toBeGreaterThan(s.camera.percentageChanged);
| 3 |
diff --git a/core/algorithm-builder/environments/nodejs/wrapper/package.json b/core/algorithm-builder/environments/nodejs/wrapper/package.json "author": "",
"license": "ISC",
"dependencies": {
- "@hkube/nodejs-wrapper": "^2.0.35"
+ "@hkube/nodejs-wrapper": "^2.0.38"
},
"devDependencies": {}
}
\ No newline at end of file
| 3 |
diff --git a/lib/cartodb/models/dataview/base.js b/lib/cartodb/models/dataview/base.js @@ -45,10 +45,7 @@ var columnTypeQueryTpl = ctx => `SELECT pg_typeof(${ctx.column})::oid FROM (${ct
BaseDataview.prototype.getColumnType = function (psql, column, query, callback) {
var readOnlyTransaction = true;
- var columnTypeQuery = columnTypeQueryTpl({
- column: column,
- query: query
- });
+ var columnTypeQuery = columnTypeQueryTpl({ column, query });
psql.query(columnTypeQuery, function(err, result) {
if (err) {
| 4 |
diff --git a/demo/views/pages/home/home.js b/demo/views/pages/home/home.js import React from 'react';
-import Sectioniser from './sectioniser';
-import ScrollableList from '../../../../src/components/scrollable-list';
+import AlertBanner from './alert-banner';
+import ComponentShowcase from './component-showcase';
+import GetStarted from './get-started';
+import PageHeaderLarge from '../../common/page-header-large';
+import SageLovesCarbon from './sage-loves-carbon';
+import SellingPoints from './selling-points';
+import Sectioniser from './sectioniser';
+import Wrapper from './../../common/wrapper';
import './demo-site.scss';
class Home extends React.Component {
@@ -10,16 +16,17 @@ class Home extends React.Component {
*/
render() {
return (
- <div style={{ height: '400px', width: '500px'}}>
-
- <ScrollableList
- onLazyLoad={() => console.log('lazy load now')}
- keyNavigation
+ <Sectioniser
+ minDepth='0'
+ maxDepth='0'
>
- {[...Array(15).keys()].map(i => <div>{`Item: ${i}`}</div>)}
- </ScrollableList>
- </div>
-
+ <AlertBanner />
+ <PageHeaderLarge />
+ <ComponentShowcase />
+ <SellingPoints />
+ <SageLovesCarbon />
+ <GetStarted />
+ </Sectioniser>
);
}
}
| 14 |
diff --git a/src/scripting/ScriptingMemory.js b/src/scripting/ScriptingMemory.js @@ -4,6 +4,7 @@ const randomize = require('randomatic')
const uuidv1 = require('uuid/v1')
const moment = require('moment')
const vm = require('vm')
+const _ = require('lodash')
const Capabilities = require('../Capabilities')
@@ -154,15 +155,14 @@ const _apply = (scriptingMemory, str) => {
const fill = (container, scriptingMemory, result, utterance, scriptingEvents) => {
debug(`fill start: ${util.inspect(scriptingMemory)}`)
const varRegex = (container.caps[Capabilities.SCRIPTING_MEMORY_MATCHING_MODE] !== 'word') ? '(\\S+)' : '(\\w+)'
- if (result && typeof(result) === 'string' && utterance && container.caps[Capabilities.SCRIPTING_ENABLE_MEMORY]) {
+ if (result && _.isString(result) && utterance && container.caps[Capabilities.SCRIPTING_ENABLE_MEMORY]) {
const utterances = scriptingEvents.resolveUtterance({ utterance })
utterances.forEach(expected => {
- const isExpectedAString = typeof(expected) === 'string'
let reExpected = expected
if (container.caps[Capabilities.SCRIPTING_MATCHING_MODE] !== 'regexp') {
- reExpected = isExpectedAString ? expected.replace(/[-\\^*+?.()|[\]{}]/g, '\\$&') : expected
+ reExpected = _.isString(expected) ? expected.replace(/[-\\^*+?.()|[\]{}]/g, '\\$&') : expected
}
- const varMatches = ((isExpectedAString ? expected.match(/\$\w+/g) : false) || []).sort(_longestFirst)
+ const varMatches = ((_.isString(expected) ? expected.match(/\$\w+/g) : false) || []).sort(_longestFirst)
for (let i = 0; i < varMatches.length; i++) {
reExpected = reExpected.replace(varMatches[i], varRegex)
}
| 4 |
diff --git a/README.md b/README.md @@ -855,7 +855,7 @@ Future.of(1)
//> 2
```
-For comparison, the equivalent with Promises is:
+For comparison, an approximation with Promises is:
```js
Promise.resolve(1)
@@ -890,12 +890,18 @@ Future.reject('error')
//! "error!"
```
-For comparison, the equivalent with Promises is:
+For comparison, an approximation with Promises is:
```js
Promise.resolve(1)
-.then(x => x + 1, x => x + '!')
+.then(x => x + 1, x => Promise.reject(x + '!'))
.then(console.log, console.error);
+//> 2
+
+Promise.reject('error')
+.then(x => x + 1, x => Promise.reject(x + '!'))
+.then(console.log, console.error);
+//! "error!"
```
#### chain
@@ -927,12 +933,13 @@ Future.of(1)
//> 2
```
-For comparison, the equivalent with Promises is:
+For comparison, an approximation with Promises is:
```js
Promise.resolve(1)
.then(x => Promise.resolve(x + 1))
.then(console.log, console.error);
+//> 2
```
#### swap
@@ -977,12 +984,13 @@ Future.reject(new Error('It broke!'))
//! [Oh No! It broke!]
```
-For comparison, the equivalent with Promises is:
+For comparison, an approximation with Promises is:
```js
-Promise.resolve(1)
+Promise.reject(new Error('It broke!'))
.then(null, err => Promise.reject(new Error('Oh No! ' + err.message)))
.then(console.log, console.error);
+//! [Oh No! It broke!]
```
#### chainRej
@@ -1006,7 +1014,7 @@ Future.reject(new Error('It broke!'))
//> "It broke! But it's all good."
```
-For comparison, the equivalent with Promises is:
+For comparison, an approximation with Promises is:
```js
Promise.reject(new Error('It broke!'))
@@ -1044,12 +1052,18 @@ Future.reject('it broke')
//> Left('it broke')
```
-For comparison, the equivalent with Promises is:
+For comparison, an approximation with Promises is:
```js
Promise.resolve('hello')
.then(S.Right, S.Left)
.then(console.log);
+//> Right('hello')
+
+Promise.reject('it broke')
+.then(S.Right, S.Left)
+.then(console.log);
+//> Left('it broke')
```
### Combining Futures
| 7 |
diff --git a/src/ApiGateway.js b/src/ApiGateway.js @@ -991,7 +991,6 @@ module.exports = class ApiGateway {
response.header('Content-Type', 'application/json');
- /* eslint-disable no-param-reassign */
response.statusCode = 200; // APIG replies 200 by default on failures;
response.source = {
errorMessage: message,
@@ -1000,7 +999,6 @@ module.exports = class ApiGateway {
'If you believe this is an issue with serverless-offline please submit it, thanks. https://github.com/dherault/serverless-offline/issues',
stackTrace: this._getArrayStackTrace(error.stack),
};
- /* eslint-enable no-param-reassign */
return response;
}
| 2 |
diff --git a/source/pool/test/unit.js b/source/pool/test/unit.js @@ -532,6 +532,12 @@ describe('Pool Unit Tests', () => {
).to.be.revertedWith('Ownable: caller is not the owner')
})
+ it('Test addAdmin reverts with zero address', async () => {
+ await expect(
+ pool.connect(deployer).addAdmin('0x0000000000000000000000000000000000000000')
+ ).to.be.revertedWith('INVALID_ADDRESS')
+ })
+
it('Test removeAdmin is successful', async () => {
await pool.addAdmin(alice.address)
await pool.removeAdmin(alice.address)
@@ -545,6 +551,12 @@ describe('Pool Unit Tests', () => {
).to.be.revertedWith('Ownable: caller is not the owner')
})
+ it('Test removeAdmin executed by non-admin reverts', async () => {
+ await expect(
+ pool.connect(deployer).removeAdmin(alice.address)
+ ).to.be.revertedWith('ADMIN_NOT_SET')
+ })
+
it('enable successful with admin', async () => {
await pool.addAdmin(alice.address)
const root = getRoot(tree)
@@ -580,6 +592,40 @@ describe('Pool Unit Tests', () => {
)
).to.be.revertedWith('CLAIM_ALREADY_MADE')
})
+
+ it('Test setclaimed with non-admin reverts', async () => {
+ await feeToken.mock.balanceOf.returns('100000')
+ await feeToken.mock.transfer.returns(true)
+
+ const root = getRoot(tree)
+
+ await expect(
+ pool
+ .connect(alice)
+ .setClaimed(
+ root,
+ [bob.address]
+ )
+ ).to.be.revertedWith('NOT_ADMIN')
+ })
+
+ it('Test setclaimed reverts with claim already made', async () => {
+ await feeToken.mock.balanceOf.returns('100000')
+ await feeToken.mock.transfer.returns(true)
+
+ const root = getRoot(tree)
+
+ await pool.connect(deployer).setClaimed(root, [bob.address])
+
+ await expect(
+ pool
+ .connect(deployer)
+ .setClaimed(
+ root,
+ [bob.address]
+ )
+ ).to.be.revertedWith('CLAIM_ALREADY_MADE')
+ })
})
describe('Test drain to', async () => {
| 7 |
diff --git a/lib/jsonwp-proxy/proxy.js b/lib/jsonwp-proxy/proxy.js @@ -8,7 +8,7 @@ import { routeToCommandName } from '../protocol/routes';
import ProtocolConverter from './protocol-converter';
-const log = logger.getLogger('JSONWP Proxy');
+const log = logger.getLogger('WD Proxy');
// TODO: Make this value configurable as a server side capability
const LOG_OBJ_LENGTH = 1024; // MAX LENGTH Logged to file / console
const DEFAULT_REQUEST_TIMEOUT = 240000;
| 10 |
diff --git a/token-metadata/0xaeC2E87E0A235266D9C5ADc9DEb4b2E29b54D009/metadata.json b/token-metadata/0xaeC2E87E0A235266D9C5ADc9DEb4b2E29b54D009/metadata.json "symbol": "SNGLS",
"address": "0xaeC2E87E0A235266D9C5ADc9DEb4b2E29b54D009",
"decimals": 0,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb @@ -334,7 +334,6 @@ class ProjectsController < ApplicationController
format.json do
@project_users = @selected_user.project_users.joins(:project).
includes({:project => [:project_list, {:project_observation_fields => :observation_field}]}, :user).
- where("projects.project_type IS NULL OR (projects.project_type != 'umbrella' AND projects.project_type != 'collection')").
order("lower(projects.title)").
limit(1000)
project_options = Project.default_json_options.update(
| 13 |
diff --git a/packages/build/src/core/main.js b/packages/build/src/core/main.js @@ -99,13 +99,12 @@ const build = async function(flags = {}) {
return { success: true, logs }
} catch (error) {
await maybeCancelBuild({ error, api, deployId })
- logOldCliVersionError({ mode, testOpts })
error.netlifyConfig = netlifyConfig
error.childEnv = childEnv
throw error
}
} catch (error) {
- await handleBuildFailure({ error, errorMonitor, logs, testOpts })
+ await handleBuildFailure({ error, errorMonitor, mode, logs, testOpts })
return { success: false, logs }
}
}
@@ -285,10 +284,11 @@ const handleBuildSuccess = async function({
}
// Logs and reports that a build failed
-const handleBuildFailure = async function({ error, errorMonitor, logs, testOpts }) {
+const handleBuildFailure = async function({ error, errorMonitor, mode, logs, testOpts }) {
removeErrorColors(error)
await reportBuildError({ error, errorMonitor, logs, testOpts })
logBuildError({ error, logs })
+ logOldCliVersionError({ mode, testOpts })
}
module.exports = build
| 5 |
diff --git a/modules/Cockpit/rest-api.php b/modules/Cockpit/rest-api.php @@ -48,7 +48,12 @@ $this->on("before", function() {
$params = isset($parts[1]) ? explode('/', $parts[1]) : [];
$output = false;
- if (isset($routes[$resource])) {
+ if ($resourcefile = $this->path("#config:api/{$resource}.php")) {
+
+ $user = $this->module('cockpit')->getUser();
+ $output = include($resourcefile);
+
+ } elseif (isset($routes[$resource])) {
try {
| 11 |
diff --git a/ChatImprovements.user.js b/ChatImprovements.user.js // @description New responsive userlist with usernames and total count, more timestamps, use small signatures only, mods with diamonds, message parser (smart links), timestamps on every message, collapse room description and room tags, mobile improvements, expand starred messages on hover, highlight occurances of same user link, room owner changelog, pretty print styles, and more...
// @homepage https://github.com/samliew/SO-mod-userscripts
// @author @samliew
-// @version 2.5.6
+// @version 2.5.7
//
// @include https://chat.stackoverflow.com/*
// @include https://chat.stackexchange.com/*
@@ -1948,11 +1948,15 @@ div.dialog-message > .meta {
#sidebar #present-users-list li.inactive {
opacity: 0.7 !important;
}
+ #sidebar #starred-posts ul.collapsible,
#sidebar #starred-posts ul.collapsible.expanded {
max-height: none;
padding-bottom: 0;
overflow: visible;
}
+ #chat-body #container {
+ padding-top: 50px;
+ }
#chat {
padding-bottom: 20px;
}
| 1 |
diff --git a/views/stats.ejs b/views/stats.ejs @@ -1356,7 +1356,7 @@ twitterDescription += '. Click to view more stats!'
<div class="stat-anchor"></div>
<div class="stat-header"><span>Slayer</span></div>
<div class="stat-content">
- <% if(calculated.slayer_coins_spent.total == 0){ %>
+ <% if(calculated.slayer_coins_spent.total == 0 || calculated.slayer_coins_spent.total === undefined){ %>
<p class="stat-raw-values">
<%= calculated.display_name %> hasn't played any Slayer yet.
</p>
| 8 |
diff --git a/elasticdump.js b/elasticdump.js @@ -170,7 +170,17 @@ class elasticdump extends EventEmitter {
}
offset += data.length
+ try {
await delay(self.options.throttleInterval || 0)
+ } catch (err) {
+ self.emit('error', err)
+
+ if (!ignoreErrors) {
+ self.log('Total Writes: ' + totalWrites)
+ self.log('dump ended with error (get phase) => ' + String(err))
+ throw err
+ }
+ }
}
return queue.onIdle()
| 9 |
diff --git a/src/commands/LFG/LFG.js b/src/commands/LFG/LFG.js @@ -17,7 +17,7 @@ class AddLFG extends Command {
* @param {Genesis} bot The bot object
*/
constructor(bot) {
- super(bot, 'lfg.add', 'lfg', 'Submit an LFG request.');
+ super(bot, 'lfg.add', 'lfg|h|lfm', 'Submit an LFG request.');
this.regex = new RegExp(`^${this.call}\\s?(.+)?`, 'i');
this.usages = [
@@ -27,9 +27,9 @@ class AddLFG extends Command {
'place',
'time',
'for',
- 'platform *',
- 'expiry*',
- 'members*',
+ 'platform\\*',
+ 'expiry\\*',
+ 'members\\*',
],
separator: ' | ',
},
@@ -70,6 +70,27 @@ class AddLFG extends Command {
lfg.types.push('LFG');
}
+ const typeMatches = message.strippedContent.match(/^(lfg|h|lfm)/ig);
+ if (typeMatches.length > 0) {
+ typeMatches.forEach((type) => {
+ switch (type.toLowerCase()) {
+ case 'h':
+ lfg.types.push('Hosting');
+ break;
+ case 'lfm':
+ lfg.types.push('LFM');
+ break;
+ case 'lfg':
+ lfg.types.push('LFG');
+ break;
+ default:
+ break;
+ }
+ });
+
+ lfg.types = Array.from(new Set(lfg.types));
+ }
+
// save params based on order
const embed = new LFGEmbed(this.bot, lfg);
try {
| 11 |
diff --git a/validators/tsv.js b/validators/tsv.js @@ -143,15 +143,15 @@ module.exports = function TSV (file, contents, fileList, callback) {
}
// check partcipants.tsv for age 89+
- var headers = rows[0].split('\t');
+
if (file.name === 'participants.tsv'){
+ var header = rows[0].replace(/(\r\n|\n|\r)/gm,"").split('\t'); //remove EOL character if any
+ var ageIdColumn = header.indexOf("age");
for (var i = 0; i < rows.length; i++) {
var row = rows[i];
- var row = row.slice(0,-1) // remove /r after every row
- var values = row.split('\t');
- var ageIdColumn = headers.indexOf("age\r");
+ var values = row.replace(/(\r\n|\n|\r)/gm,"").split('\t');//remove EOL character if any
age = values[ageIdColumn]
- if (age == 89 || age > 89) {
+ if (age >= 89) {
issues.push(new Issue({
file: file,
evidence: row,
| 9 |
diff --git a/components/Frame/HeaderNew.js b/components/Frame/HeaderNew.js @@ -10,7 +10,7 @@ import {
HeaderHeightProvider
} from '@project-r/styleguide'
-import { Router, matchPath } from '../../lib/routes'
+import { Router } from '../../lib/routes'
import { withMembership } from '../Auth/checkRoles'
import withT from '../../lib/withT'
import withInNativeApp, { postMessage } from '../../lib/withInNativeApp'
@@ -193,7 +193,7 @@ const HeaderNew = ({
<div {...styles.primary}>
<div {...styles.navBarItem}>
<div {...styles.leftBarItem}>
- {backButton && (
+ {true && (
<a
{...styles.back}
style={{
@@ -378,7 +378,7 @@ const styles = {
}),
back: css({
display: 'block',
- padding: '10px 0px 10px 10px',
+ padding: '12px 0px 12px 12px',
[mediaQueries.mUp]: {
top: -1 + 8
}
| 1 |
diff --git a/test/models/behaviors/shellTransformTest.js b/test/models/behaviors/shellTransformTest.js const assert = require('assert'),
behaviors = require('../../../src/models/behaviors'),
Logger = require('../../fakes/fakeLogger'),
- fs = require('fs');
+ fs = require('fs-extra'),
+ filename = '_shellTransform.js';
describe('behaviors', function () {
describe('#shellTransform', function () {
afterEach(function () {
- if (fs.existsSync('shellTransformTest.js')) {
- fs.unlinkSync('shellTransformTest.js');
+ if (fs.existsSync(filename)) {
+ fs.unlinkSync(filename);
}
});
@@ -30,9 +31,9 @@ describe('behaviors', function () {
shellFn = function exec () {
console.log(JSON.stringify({ data: 'CHANGED' }));
},
- config = { shellTransform: 'node shellTransformTest.js' };
+ config = { shellTransform: `node ${filename}` };
+ fs.writeFileSync(filename, `${shellFn.toString()}\nexec();`);
- fs.writeFileSync('shellTransformTest.js', `${shellFn.toString()}\nexec();`);
const actualResponse = await behaviors.execute(request, response, [config], logger);
assert.deepEqual(actualResponse, { data: 'CHANGED' });
@@ -50,9 +51,9 @@ describe('behaviors', function () {
shellResponse.requestData = shellRequest.data;
console.log(JSON.stringify(shellResponse));
},
- config = { shellTransform: 'node shellTransformTest.js' };
+ config = { shellTransform: `node ${filename}` };
+ fs.writeFileSync(filename, `${shellFn.toString()}\nexec();`);
- fs.writeFileSync('shellTransformTest.js', `${shellFn.toString()}\nexec();`);
const actualResponse = await behaviors.execute(request, response, [config], logger);
assert.deepEqual(actualResponse, { data: 'UNCHANGED', requestData: 'FROM REQUEST' });
@@ -82,9 +83,8 @@ describe('behaviors', function () {
console.error('BOOM!!!');
process.exit(1); // eslint-disable-line no-process-exit
},
- config = { shellTransform: 'node shellTransformTest.js' };
-
- fs.writeFileSync('shellTransformTest.js', `${shellFn.toString()}\nexec();`);
+ config = { shellTransform: `node ${filename}` };
+ fs.writeFileSync(filename, `${shellFn.toString()}\nexec();`);
try {
await behaviors.execute(request, response, [config], logger);
@@ -103,9 +103,8 @@ describe('behaviors', function () {
shellFn = function exec () {
console.log('This is not JSON');
},
- config = { shellTransform: 'node shellTransformTest.js' };
-
- fs.writeFileSync('shellTransformTest.js', `${shellFn.toString()}\nexec();`);
+ config = { shellTransform: `node ${filename}` };
+ fs.writeFileSync(filename, `${shellFn.toString()}\nexec();`);
try {
await behaviors.execute(request, response, [config], logger);
@@ -136,9 +135,9 @@ describe('behaviors', function () {
shellResponse.requestData = shellRequest.body;
console.log(JSON.stringify(shellResponse));
},
- config = { shellTransform: 'node shellTransformTest.js' };
+ config = { shellTransform: `node ${filename}` };
+ fs.writeFileSync(filename, `${shellFn.toString()}\nexec();`);
- fs.writeFileSync('shellTransformTest.js', `${shellFn.toString()}\nexec();`);
const actualResponse = await behaviors.execute(request, response, [config], logger);
assert.deepEqual(actualResponse, { requestData: '{"fastSearch": "abctef abc def"}' });
@@ -154,9 +153,9 @@ describe('behaviors', function () {
shellResponse.added = new Array(1024 * 1024 * 2).join('x');
console.log(JSON.stringify(shellResponse));
},
- config = { shellTransform: 'node shellTransformTest.js' };
+ config = { shellTransform: `node ${filename}` };
+ fs.writeFileSync(filename, `${shellFn.toString()}\nexec();`);
- fs.writeFileSync('shellTransformTest.js', `${shellFn.toString()}\nexec();`);
const actualResponse = await behaviors.execute(request, response, [config], logger);
assert.deepEqual(actualResponse, {
| 10 |
diff --git a/packages/idyll-document/src/utils/schema2element.js b/packages/idyll-document/src/utils/schema2element.js @@ -7,7 +7,6 @@ const _componentMap = new WeakMap();
class ReactJsonSchema {
constructor(componentMap) {
if (componentMap) this.setComponentMap(componentMap);
-
}
parseSchema(schema) {
@@ -25,10 +24,11 @@ class ReactJsonSchema {
const Components = [];
let index = 0;
for (const subSchema of subSchemas) {
- if (typeof subSchema === "string") {
+ if (typeof subSchema === 'string') {
Components.push(subSchema);
} else {
- subSchema.key = typeof subSchema.key !== 'undefined' ? subSchema.key : index;
+ subSchema.key =
+ typeof subSchema.key !== 'undefined' ? subSchema.key : index;
Components.push(this.parseSchema(subSchema));
index++;
}
@@ -38,11 +38,11 @@ class ReactJsonSchema {
createComponent(schema) {
if (schema.type) {
- if(schema.type === 'textnode') return schema.value;;
+ if (schema.type === 'textnode') return schema.value;
}
- const { component, children, text, ...rest } = schema;
+ const { component, children, ...rest } = schema;
const Component = this.resolveComponent(schema);
- const Children = typeof text !== 'undefined' ? text : this.resolveComponentChildren(schema);
+ const Children = this.resolveComponentChildren(schema);
return createElement(Component, rest, Children);
}
@@ -51,7 +51,9 @@ class ReactJsonSchema {
let Component;
// bail early if there is no component name
if (!schema.hasOwnProperty('component')) {
- throw new Error('ReactJsonSchema could not resolve a component due to a missing component attribute in the schema.');
+ throw new Error(
+ 'ReactJsonSchema could not resolve a component due to a missing component attribute in the schema.'
+ );
}
// if it's already a ref bail early
@@ -77,12 +79,14 @@ class ReactJsonSchema {
if (DOM.hasOwnProperty(name)) {
Component = schema.component;
} else {
- console.warn(`Could not find an implementation for: ${schema.component}`);
+ console.warn(
+ `Could not find an implementation for: ${schema.component}`
+ );
return () => (
<div style={{ color: 'black', border: 'solid 1px red' }}>
<pre>Could not find an implementation for: {schema.component}</pre>
</div>
- )
+ );
}
}
@@ -91,7 +95,9 @@ class ReactJsonSchema {
}
resolveComponentChildren(schema) {
- const children = (schema.hasOwnProperty('children')) ? this.parseSchema(schema.children) : [];
+ const children = schema.hasOwnProperty('children')
+ ? this.parseSchema(schema.children)
+ : [];
return children.length ? children : undefined;
}
| 2 |
diff --git a/packages/app/src/services/cdn-resources-service.js b/packages/app/src/services/cdn-resources-service.js @@ -57,16 +57,6 @@ class CdnResourcesService {
const outDir = resolveFromRoot(cdnLocalScriptRoot);
return new CdnResource(manifest.name, manifest.url, outDir);
});
-
- const cdnGzResources = this.cdnManifests.gz.map((manifest) => {
- const outDir = resolveFromRoot(cdnLocalScriptRoot);
- return new CdnResource(manifest.name, manifest.url, outDir);
- });
-
- const gzExtensionOptions = {
- ext: 'gz',
- };
-
const cdnStyleResources = this.cdnManifests.style.map((manifest) => {
const outDir = resolveFromRoot(cdnLocalStyleRoot);
return new CdnResource(manifest.name, manifest.url, outDir);
@@ -80,7 +70,6 @@ class CdnResourcesService {
return Promise.all([
cdnResourceDownloader.downloadScripts(cdnScriptResources),
- cdnResourceDownloader.downloadScripts(cdnGzResources, gzExtensionOptions),
cdnResourceDownloader.downloadStyles(cdnStyleResources, dlStylesOptions),
]);
}
| 13 |
diff --git a/js/webcomponents/bisweb_mainviewerapplication.js b/js/webcomponents/bisweb_mainviewerapplication.js @@ -767,7 +767,6 @@ class ViewerApplicationElement extends HTMLElement {
webutil.createMenuItem(gmenu,'');
}
-
if (this.num_independent_viewers > 1) {
webutil.createMenuItem(gmenu, extra+'Both Viewers', function () { self.VIEWERS[1].setDualViewerMode(0.5); });
webutil.createMenuItem(gmenu, extra+'Viewer 1 Only', function () { self.VIEWERS[1].setDualViewerMode(1.0); });
@@ -1051,6 +1050,7 @@ class ViewerApplicationElement extends HTMLElement {
webutil.runAfterAllLoaded( () => {
this.parseQueryParameters();
+ document.body.style.zoom = 1.0;
});
}
| 12 |
diff --git a/ui/js/page/publish/view.jsx b/ui/js/page/publish/view.jsx @@ -134,8 +134,8 @@ class PublishPage extends React.Component {
if (this.state.isFee) {
lbry.wallet_unused_address().then((address) => {
- metadata.fee = {};
- metadata.fee[this.state.feeCurrency] = {
+ metadata.fee = {
+ currency: this.state.feeCurrency,
amount: parseFloat(this.state.feeAmount),
address: address,
};
| 4 |
diff --git a/graphic_templates/ai2html_graphic/js/graphic.js b/graphic_templates/ai2html_graphic/js/graphic.js @@ -8,8 +8,6 @@ var isMobile = false;
var onWindowLoaded = function() {
pymChild = new pym.Child({});
- //artboardResizer();
-
pymChild.onMessage('on-screen', function(bucket) {
ANALYTICS.trackEvent('on-screen', bucket);
});
@@ -18,50 +16,6 @@ var onWindowLoaded = function() {
});
}
-/*
- * Hide/show artboards based on min/max width.
- * Use if you have weird sizes and the CSS is too cumbersome to edit.
- */
-var artboardResizer = function() {
- // only want one resizer on the page
- if (document.documentElement.className.indexOf('g-resizer-v3-init') > -1) return;
- document.documentElement.className += ' g-resizer-v3-init';
- // require IE9+
- if (!('querySelector' in document)) return;
- function resizer() {
- var elements = Array.prototype.slice.call(document.querySelectorAll('.g-artboard[data-min-width]')),
- widthById = {};
- elements.forEach(function(el) {
- var parent = el.parentNode,
- width = widthById[parent.id] || parent.getBoundingClientRect().width,
- minwidth = el.getAttribute('data-min-width'),
- maxwidth = el.getAttribute('data-max-width');
- widthById[parent.id] = width;
- if (+minwidth <= width && (+maxwidth >= width || maxwidth === null)) {
- el.style.display = 'block';
- } else {
- el.style.display = 'none';
- }
- });
- try {
- if (window.parent && window.parent.$) {
- window.parent.$('body').trigger('resizedcontent', [window]);
- }
- if (window.require) {
- require(['foundation/main'], function() {
- require(['shared/interactive/instances/app-communicator'], function(AppCommunicator) {
- AppCommunicator.triggerResize();
- });
- });
- }
- } catch(e) { console.log(e); }
- pymChild.sendHeight();
- }
- document.addEventListener('DOMContentLoaded', resizer);
- // feel free to replace throttle with _.throttle, if available
- window.addEventListener('resize', _.throttle(resizer, 200));
-}
-
/*
* Initially load the graphic
* (NB: Use window.load to ensure all images have loaded)
| 2 |
diff --git a/content/en/guide/v10/upgrade-guide.md b/content/en/guide/v10/upgrade-guide.md @@ -188,12 +188,12 @@ In Preact X the state of a component will no longer be mutated synchronously. Th
this.state = { counter: 0 };
// Preact 8.x
-this.setState({ counter: this.state.counter++ });
+this.setState({ counter: ++this.state.counter });
// Preact X
this.setState(prevState => {
// Alternatively return `null` here to abort the state update
- return { counter: prevState.counter++ };
+ return { counter: ++prevState.counter };
});
```
| 1 |
diff --git a/app/authenticated/project/api/hooks/index/controller.js b/app/authenticated/project/api/hooks/index/controller.js @@ -28,9 +28,6 @@ export default Ember.Controller.extend({
translationKey: 'hookPage.fields.url.label',
width: '100'
},
- {
- width: '75'
- },
],
});
| 2 |
diff --git a/README.md b/README.md -<div align="center">
- <img src="https://avatars1.githubusercontent.com/u/20690665?v=3&s=200" alt="fly logo" width="80">
-</div>
-
-<h1 align="center">fly</h1>
-
-<div align="center">
- <!-- NPM version -->
- <a href="https://npmjs.org/package/fly">
- <img src="https://img.shields.io/npm/v/fly.svg" alt="NPM version"/>
- </a>
- <!-- Build Status -->
- <a href="https://travis-ci.org/flyjs/fly">
- <img src="https://img.shields.io/travis/flyjs/fly.svg" alt="Build Status"/>
- </a>
- <!-- Test Coverage -->
- <!-- <a href="https://codecov.io/github/flyjs/fly"> -->
- <!-- <img src="https://img.shields.io/codecov/c/github/flyjs/fly/master.svg" alt="Test Coverage"/> -->
- <!-- </a> -->
- <!-- AppVeyor -->
- <a href="https://ci.appveyor.com/project/lukeed/fly/branch/master">
- <img src="https://ci.appveyor.com/api/projects/status/jjw7gor0edirylu5/branch/master?svg=true" alt="Windows Status"/>
- </a>
- <!-- Downloads -->
- <a href="https://npmjs.org/package/fly">
- <img src="https://img.shields.io/npm/dm/fly.svg" alt="Downloads"/>
- </a>
-</div>
-
-<div align="center">
- A generator & coroutine-based task runner.
-</div>
-
-<div align="center">
- <strong>Fasten your seatbelt. :rocket:</strong>
-</div>
-
-<br />
+# fly
+[](https://npmjs.org/package/fly)
+[](https://travis-ci.org/flyjs/fly)
+[](https://ci.appveyor.com/project/lukeed/fly/branch/master)
+[](https://cdnjs.com/libraries/hyperapp)
Fly is a highly performant task automation tool, much like Gulp or Grunt, but written with concurrency in mind. With Fly, everything is a [coroutine](https://medium.com/@tjholowaychuk/callbacks-vs-coroutines-174f1fe66127#.vpryf5tyb), which allows for cascading and composable tasks; but unlike Gulp, it's not limited to the stream metaphor.
Fly is extremely extensible, so _anything_ can be a task. Our core system will accept whatever you throw at it, resulting in a modular system of reusable plugins and tasks, connected by a declarative `flyfile.js` that's easy to read.
<h2>Table of Contents</h2>
-<details>
-<summary>Table of Contents</summary>
- [Features](#features)
- [Example](#example)
@@ -63,7 +28,6 @@ Fly is extremely extensible, so _anything_ can be a task. Our core system will a
* [Getting Started](#getting-started)
* [Programmatic](#programmatic)
- [Ecosystem](#ecosystem)
-</details>
## Features
- **lightweight:** with `5` dependencies, [installation](#installation) takes seconds
| 4 |
diff --git a/src/components/dragelement/index.js b/src/components/dragelement/index.js @@ -85,6 +85,23 @@ dragElement.init = function init(options) {
initialTarget,
rightClick;
+ if(options.dragmode === false) {
+ if(element.onmousedown) {
+ element.onmousedown = undefined;
+ }
+ if(!supportsPassive) {
+ if(element.ontouchstart) {
+ element.ontouchstart = undefined;
+ }
+ } else {
+ if(element._ontouchstart) {
+ element.removeEventListener('touchstart', element._ontouchstart);
+ element._ontouchstart = undefined;
+ }
+ }
+ return;
+ }
+
if(!gd._mouseDownTime) gd._mouseDownTime = 0;
element.style.pointerEvents = 'all';
| 2 |
diff --git a/translations/en-us.yaml b/translations/en-us.yaml @@ -525,7 +525,7 @@ authPage:
label: "Azure AD is not configured"
enabled:
header: 'Danger Zone™'
- reallyDisable: 'Are you sure? Click again to really disable access control'
+ reallyDisable: 'Are you sure? Click again to disable access control'
promptDisable: Disable Azure AD
general:
header: General
@@ -584,7 +584,7 @@ authPage:
header: 'Danger Zone™'
warning: '<b class="text-danger">Caution:</b> Disabling access control will give complete control over {appName} to anyone that can reach this page or the API.'
buttonText:
- disable: 'Are you sure? Click again to really disable access control'
+ disable: 'Are you sure? Click again to disable access control'
prompt: Disable access control
accessDisabled:
header: '1. Setup an Admin user'
| 2 |
diff --git a/src/js/services/incomingData.js b/src/js/services/incomingData.js @@ -16,7 +16,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
noPrefixInAddress = 1;
}
- if (typeof(data) == 'string' && (data.toLowerCase().indexOf('bitcoincash:') >= 0 || data[0] == 'q' || data[0] == 'p' || data[0] == 'C' || data[0] == 'H')) {
+ if (typeof(data) == 'string' && !(/^bitcoin(cash)?:\?r=[\w+]/).exec(data) && (data.toLowerCase().indexOf('bitcoincash:') >= 0 || data[0] == 'q' || data[0] == 'p' || data[0] == 'C' || data[0] == 'H')) {
try {
noPrefixInAddress = 0;
@@ -109,7 +109,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
}
// data extensions for Payment Protocol with non-backwards-compatible request
if ((/^bitcoin(cash)?:\?r=[\w+]/).exec(data)) {
- var c = data.indexOf('bitcoincash') >= 0 ? 'bch' : 'btc';
+ var coin = data.indexOf('bitcoincash') >= 0 ? 'bch' : 'btc';
data = decodeURIComponent(data.replace(/bitcoin(cash)?:\?r=/, ''));
payproService.getPayProDetails(data, coin, function(err, details) {
if (err) {
@@ -136,7 +136,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
if (err) {
if (addr && amount) goSend(addr, amount, message, coin, shapeshiftData);
else popupService.showAlert(gettextCatalog.getString('Error'), err);
- } else handlePayPro(details);
+ } else handlePayPro(details, coin);
});
} else {
goSend(addr, amount, message, coin, shapeshiftData);
@@ -214,7 +214,6 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
return true;
// Plain URL
} else if (/^https?:\/\//.test(data)) {
-
payproService.getPayProDetails(data, coin, function(err, details) {
if (err) {
root.showMenu({
| 1 |
diff --git a/src/constants.js b/src/constants.js @@ -383,6 +383,11 @@ module.exports = {
mob_names: {
unburried_zombie: "Crypt Ghoul",
zealot_enderman: "Zealot",
+ invisible_creeper: "Sneaky Creeper",
+ generator_ghast: "Minion Ghast",
+ generator_magma_cube: "Minion Magma Cube",
+ generator_slime: "Minion Slime",
+ brood_mother_spider: "Brood Mother"
},
area_names: {
| 10 |
diff --git a/test/configCases/plugins/banner-plugin-hashing/webpack.config.js b/test/configCases/plugins/banner-plugin-hashing/webpack.config.js +"use strict";
+
const webpack = require("../../../../");
-const path = require("path");
module.exports = {
node: {
@@ -7,7 +8,7 @@ module.exports = {
__filename: false
},
entry: {
- 'dist/banner': ["./index.js"],
+ "dist/banner": ["./index.js"],
vendors: ["./vendors.js"]
},
output: {
| 2 |
diff --git a/app.js b/app.js @@ -18,10 +18,43 @@ if (!semver.satisfies(nodejsVersion, '>=6.9.0')) {
// See https://github.com/CartoDB/support/issues/984
// CartoCSS properties text-wrap-width/text-wrap-character not working
-// This function should be called as soon as possible.
+// This function should be called before the require('yargs').
function setICUEnvVariable() {
if (process.env.ICU_DATA === undefined) {
- process.env.ICU_DATA = __dirname + '/node_modules/mapnik/lib/binding/node-v48-linux-x64/share/mapnik/icu';
+ // There are 3 ways to set the env variable. Option 1 doesn't work. Option 2 is the best alternative.
+
+ // 1
+ // The best approach to generate the path where the ICU DATA is stored is by calling binary.find()
+ // Sadly, it fails. It generates the correct path, but mapnik raises "could not create BreakIterator: U_MISSING_RESOURCE_ERROR"
+ const binary = require('node-pre-gyp');
+ let binding_path = binary.find(path.resolve(path.join(__dirname, 'node_modules/mapnik/package.json')));
+ binding_path = path.dirname(binding_path);
+ // If we hardcode de path, it works. the call to binary.find seems to be the problem here.
+ // var binding_path = __dirname + '/node_modules/mapnik/lib/binding/node-v48-linux-x64/';
+ process.env.ICU_DATA1 = path.join(binding_path, 'share/mapnik/icu/');
+ console.log('process.env.ICU_DATA1: ', process.env.ICU_DATA1);
+
+ // 2
+ // Alternative to 1 using glob module.
+ const glob = require('glob');
+ let directory = glob.sync(__dirname + '/node_modules/mapnik/lib/binding/*/share/mapnik/icu/');
+
+ if (directory && directory.length > 0) {
+ process.env.ICU_DATA2 = directory[0];
+ }
+ console.log('process.env.ICU_DATA2: ', process.env.ICU_DATA2);
+
+ // 3
+ // hardcoded. not multiplatform (just works in some linuxes)
+ process.env.ICU_DATA3 = __dirname + '/node_modules/mapnik/lib/binding/node-v48-linux-x64/share/mapnik/icu/';
+ console.log('process.env.ICU_DATA3: ', process.env.ICU_DATA3);
+
+
+ console.log(process.env.ICU_DATA1 === process.env.ICU_DATA2);
+ console.log(process.env.ICU_DATA2 === process.env.ICU_DATA3);
+
+ process.env.ICU_DATA = process.env.ICU_DATA3;
+ console.log(process.env.ICU_DATA)
}
}
setICUEnvVariable();
| 12 |
diff --git a/assets/js/containers/Home/index.js b/assets/js/containers/Home/index.js @@ -137,7 +137,7 @@ class Home extends Component {
</a>
</h2>
</div>
- <p>
+ <div>
<Like id={this.props.feeds[0].feed.id} />
<SocialSharing
url={this.props.feeds[0].object.articleUrl}
@@ -153,7 +153,7 @@ class Home extends Component {
<span> <span className="pipe">|</span> <a href={this.props.feeds[0].object.secondaryUrl} target="_blank" className="secondary-url">View Comments</a></span>
) : null
}
- </p>
+ </div>
</div>
</div>
<div className="col-xl-3 col-lg-3 col-md-12 col-sm-12 col-xs-12" onClick={() => this.trackEngagement(this.props.feeds[1].object.id, 1)}>
| 14 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.