code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/app/shared/actions/accounts.js b/app/shared/actions/accounts.js @@ -433,7 +433,7 @@ export function getCurrencyBalance(account, requestedTokens = false) { payload: { account_name: account, contract, - precision: formatPrecisions(results), + precision: formatPrecisions(results, connection), symbol, tokens: formatBalances(results, symbol) }
1
diff --git a/map.html b/map.html <head> <title>Webaverse Map</title> <link rel=stylesheet type='text/css' href="map.css"> -</head> + <meta name=viewport content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0'></head> <body> <div id=container class=container></div>
0
diff --git a/CHANGELOG.md b/CHANGELOG.md # Changelog +## v1.8.7 (2020-6-23) + +### Bug Fixes + +* TestCafe now shows the emulated device's name in the report when tests run in Chrome Emulation Mode ([#3290](https://github.com/DevExpress/testcafe/issues/3290)) +* Event simulation for Knockout.js inputs has been enhanced ([#4881](https://github.com/DevExpress/testcafe/issues/4881)) +* Fixed authentication issues for specific web apps ([testcafe-hammerhead/#2344](https://github.com/DevExpress/testcafe-hammerhead/issues/2344)) +* Enhanced interoperability for pages that use ES6 destructuring ([testcafe-hammerhead/#642](https://github.com/DevExpress/testcafe-hammerhead/issues/642)) +* Fixed `<title>` element handling in iframes ([testcafe-hammerhead/#2340](https://github.com/DevExpress/testcafe-hammerhead/issues/2340)) +* Enhanced compatibility with the `axe` accessibility testing library ([testcafe-hammerhead/#2350](https://github.com/DevExpress/testcafe-hammerhead/issues/2350)) + ## v1.8.6 (2020-6-1) ### Bug Fixes
0
diff --git a/src/LambdaProxyIntegrationEvent.js b/src/LambdaProxyIntegrationEvent.js @@ -11,7 +11,8 @@ const { const { byteLength } = Buffer; const { parse } = JSON; -// Mimicks the Lambda Proxy Event +// https://serverless.com/framework/docs/providers/aws/events/apigateway/ +// https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html // http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-create-api-as-simple-proxy-for-lambda.html module.exports = class LambdaProxyIntegrationEvent { constructor(request, options, stageVariables) {
0
diff --git a/.travis.yml b/.travis.yml @@ -14,11 +14,9 @@ env: - PACKAGE=idyll-layouts - PACKAGE=idyll-themes -before_install: - - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.0.1 - - export PATH="$HOME/.yarn/bin:$PATH" - install: - yarn install +cache: yarn + script: cd packages/$PACKAGE && npm test
3
diff --git a/config/canonical.json b/config/canonical.json "tags": { "brand": "Shaw's", "name": "Shaw's", - "brand:wikidata": "Q3992174", + "brand:wikidata": "Q578387", "brand:wikipedia": "en:Shaw%27s and Star Market", "shop": "supermarket" }
12
diff --git a/src/Private/requests.js b/src/Private/requests.js @@ -20,7 +20,7 @@ module.exports = class Requests { if (!options.noCaching && this.options.cache && this.options.cacheFilter(url.split('?')[0].slice(1))) { if (this.options.cacheSize < cached.size) cached.delete(cached.keys().next().value); // Map and its special "iterators" cached.set(url, parsedRes); - setTimeout(() => cached.delete(url), 1000 * this.options.cacheTime); + if (this.options.cacheTime >= 0) setTimeout(() => cached.delete(url), 1000 * this.options.cacheTime); } return (url === '/key' ? [parsedRes, res.headers] : parsedRes); }
11
diff --git a/package.json b/package.json "@types/node": "13.13.4", "JSONStream": "1.3.5", "bluebird": "3.7.2", - "coveralls": "3.1.0", + "coveralls": "3.0.13", "eslint": "6.8.0", "tslint": "6.1.2", "istanbul": "0.4.5",
13
diff --git a/workshops.md b/workshops.md @@ -16,7 +16,7 @@ Tuesday, July 17 <br>3:15-3:30 Break <br>3:45-4:45 Topic #3: Optech community and communication <br>4:45-5:00 Wrap up -<br><br>5:30-7:30 Dinner at TBD nearby restaurant +<br><br>5:30-7:30 Dinner # Format: - Each topic will be a roundtable discussion in which every participant has an equal opportunity to engage.
2
diff --git a/lib/cartodb/models/mapconfig/adapter/aggregation-mapconfig-adapter.js b/lib/cartodb/models/mapconfig/adapter/aggregation-mapconfig-adapter.js @@ -86,7 +86,7 @@ module.exports = class AggregationMapConfigAdapter { } else if (aggregation === undefined) { if (mapConfig.isVectorOnlyMapConfig()) { shouldAdapt = true; - } else if (this._hasAggregation(requestMapConfig)){ + } else if (this._hasAnyLayerAggregation(requestMapConfig)){ shouldAdapt = true; } } @@ -94,7 +94,7 @@ module.exports = class AggregationMapConfigAdapter { return shouldAdapt; } - _hasAggregation (requestMapConfig) { + _hasAnyLayerAggregation (requestMapConfig) { for (const layer of requestMapConfig.layers) { if (this._hasLayerAggregation(layer)) { return true; @@ -111,7 +111,6 @@ module.exports = class AggregationMapConfigAdapter { _adaptLayers (connection, mapConfig, requestMapConfig, context, callback) { const isVectorOnlyMapConfig = mapConfig.isVectorOnlyMapConfig(); - const adaptLayerPromises = requestMapConfig.layers.map((layer, index) => { return this._adaptLayer(connection, layer, index, isVectorOnlyMapConfig, mapConfig); });
7
diff --git a/src/components/Recaptcha.js b/src/components/Recaptcha.js @@ -176,7 +176,7 @@ export class Recaptcha extends Component { ref={(ref) => this.setCaptchaRef(ref)} onChange={this.handleOnChange} asyncScriptOnLoad={this.handleOnLoad} - class='recaptcha-widget' + className='recaptcha-widget' />} {loaded && <RecaptchaString className='recaptcha-disclaimer'>
10
diff --git a/components/Partners.js b/components/Partners.js @@ -55,6 +55,22 @@ export const PartnerInfo = ({ t }) => { to millions of customers worldwide.` })} </ExpandCollapse> + </div> + <div> + <a href="https://www.tokenpay.com/"> + <img src="/static/img/partners/tokenpay.png" alt="tokenpay" /> + </a> + <ExpandCollapse {...options}> + {t('home:partnership.tpay', { + defaultValue: `TokenPay was created with the fundamental desire to bridge + modern-day financial institutions with the benefits of the + blockchain space. TPAY is an open-sourced, decentralized, and + self-verifying payment platform project with a passionate + community following with a focus on adoption, decentralization and + ease of use for digital currencies in todays mixed currency global + financial system.` + })} + </ExpandCollapse> </div> <div> <a href="https://www.plaak.com/">
14
diff --git a/token-metadata/0xF629cBd94d3791C9250152BD8dfBDF380E2a3B9c/metadata.json b/token-metadata/0xF629cBd94d3791C9250152BD8dfBDF380E2a3B9c/metadata.json "symbol": "ENJ", "address": "0xF629cBd94d3791C9250152BD8dfBDF380E2a3B9c", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/contribs/gmf/src/objectediting/toolsComponent.js b/contribs/gmf/src/objectediting/toolsComponent.js @@ -26,8 +26,8 @@ import {getUid as olUtilGetUid} from 'ol/util.js'; /** * Additional configuration options for the object editing tools directive. * @typedef {Object} ObjectEditingToolsOptions - * @property {number} [regularPolygonRadius] The radius of the shapes created by the regular polygon - * radius creation tool. Default value is `100`. The value is in map units. + * @property {number} [regularPolygonRadius=100] The radius of the shapes created by the regular polygon + * radius creation tool. The value is in map units. * }} */
12
diff --git a/phpcs.xml b/phpcs.xml <file>.</file> <!-- Rule specific exclusions --> + <rule ref="WordPress.DB.SlowDBQuery"> + <exclude-pattern>tests/*</exclude-pattern> + </rule> <rule ref="WordPress.NamingConventions"> <exclude-pattern>tests/*</exclude-pattern> </rule>
8
diff --git a/token-metadata/0x4a57E687b9126435a9B19E4A802113e266AdeBde/metadata.json b/token-metadata/0x4a57E687b9126435a9B19E4A802113e266AdeBde/metadata.json "symbol": "FXC", "address": "0x4a57E687b9126435a9B19E4A802113e266AdeBde", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/example/ios/RNMapboxGLExample.xcodeproj/project.pbxproj b/example/ios/RNMapboxGLExample.xcodeproj/project.pbxproj remoteGlobalIDString = 3DBE0D0D1F3B181C0099AA32; remoteInfo = "fishhook-tvOS"; }; + E96E1A3B2229747000A128F5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = C412411D1F4D4CF80008C81E /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = EBF21BDC1FC498900052F4D5; + remoteInfo = jsinspector; + }; + E96E1A3D2229747000A128F5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = C412411D1F4D4CF80008C81E /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = EBF21BFA1FC4989A0052F4D5; + remoteInfo = "jsinspector-tvOS"; + }; + E96E1A3F2229747000A128F5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = C412411D1F4D4CF80008C81E /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 9936F3131F5F2E4B0010BF04; + remoteInfo = privatedata; + }; + E96E1A412229747000A128F5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = C412411D1F4D4CF80008C81E /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 9936F32F1F5F2E5B0010BF04; + remoteInfo = "privatedata-tvOS"; + }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ C41241371F4D4CF80008C81E /* libcxxreact.a */, C41241391F4D4CF80008C81E /* libjschelpers.a */, C412413B1F4D4CF80008C81E /* libjschelpers.a */, + E96E1A3C2229747000A128F5 /* libjsinspector.a */, + E96E1A3E2229747000A128F5 /* libjsinspector-tvOS.a */, C412413D1F4D4CF80008C81E /* libthird-party.a */, C412413F1F4D4CF80008C81E /* libthird-party.a */, C41241411F4D4CF80008C81E /* libdouble-conversion.a */, C41241431F4D4CF80008C81E /* libdouble-conversion.a */, + E96E1A402229747000A128F5 /* libprivatedata.a */, + E96E1A422229747000A128F5 /* libprivatedata-tvOS.a */, ); name = Products; sourceTree = "<group>"; ORGANIZATIONNAME = Facebook; TargetAttributes = { 13B07F861A680F5B00A75B9A = { - DevelopmentTeam = E5WAB34727; LastSwiftMigration = 830; }; }; remoteRef = C4E90D571F99239E003C80E2 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; + E96E1A3C2229747000A128F5 /* libjsinspector.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libjsinspector.a; + remoteRef = E96E1A3B2229747000A128F5 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + E96E1A3E2229747000A128F5 /* libjsinspector-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libjsinspector-tvOS.a"; + remoteRef = E96E1A3D2229747000A128F5 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + E96E1A402229747000A128F5 /* libprivatedata.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libprivatedata.a; + remoteRef = E96E1A3F2229747000A128F5 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + E96E1A422229747000A128F5 /* libprivatedata-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libprivatedata-tvOS.a"; + remoteRef = E96E1A412229747000A128F5 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = 1; DEAD_CODE_STRIPPING = NO; - DEVELOPMENT_TEAM = E5WAB34727; + DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/../node_modules/@mapbox/react-native-mapbox-gl/ios", CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = E5WAB34727; + DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/../node_modules/@mapbox/react-native-mapbox-gl/ios",
2
diff --git a/collections/_programs/hacktoberfest.html b/collections/_programs/hacktoberfest.html @@ -8,7 +8,7 @@ link: /programs/hacktoberfest permalink: /programs/hacktoberfest excerpt: "Layer5 - Hacktoberfest" --- -<img src="https://user-images.githubusercontent.com/7570704/94851172-b1336500-03ed-11eb-917c-9bdb67ba8684.png" class="image-center" /> +<img src="https://user-images.githubusercontent.com/7570704/94851172-b1336500-03ed-11eb-917c-9bdb67ba8684.png" alt="Hacktoberfest and Layer5 logo" class="image-center" /> <h4 class="black-text center">Hacktoberfest 2020 with Layer5</h4>
14
diff --git a/test/sp.client_test.js b/test/sp.client_test.js @@ -1047,7 +1047,7 @@ describe('Client', function () { before(function (done) { sandbox = sinon.sandbox.create(); cbSpy = sandbox.spy(); - href = 'https://api.stormpath.com/v1/apiKeys/foo'; + href = '/apiKeys/foo'; client = makeTestClient(); @@ -1072,7 +1072,7 @@ describe('Client', function () { it('should get account', function () { getResourceStub.should.have.been - .calledWith(href, null, ApiKey, cbSpy); + .calledWith(client._dataStore.requestExecutor.baseUrl + href, null, ApiKey, cbSpy); }); });
1
diff --git a/src/entities/EntityForm.js b/src/entities/EntityForm.js @@ -65,13 +65,13 @@ export default class EntityForm extends Component { let result = {} let schema = this._getSchema() - forEach(schema.properties, (property) => { + for (let property of schema) { const name = property.name let input = this.refs[name] if (input) { result[name] = input.getValue() } - }) + } return result }
4
diff --git a/src/components/Header/Header.js b/src/components/Header/Header.js @@ -67,11 +67,11 @@ const Header = ({ const headerTitle = css` position: relative; margin-bottom: ${marginBottom}; + padding: 0 20px; line-height: 48px; font-size: 39px; font-weight: ${weights.medium}; letter-spacing: -0.45px; - width: 80%; text-align: center; color: ${isLightBackground(color) ? colors.darkgray : colors.lightgray}; transition: 0.4s ease-out all;
14
diff --git a/src/browser/nw_chrome_browser_hooks.cc b/src/browser/nw_chrome_browser_hooks.cc @@ -355,7 +355,7 @@ int MainPartsPreCreateThreadsHook() { #endif } - return service_manager::RESULT_CODE_NORMAL_EXIT; + return content::RESULT_CODE_NORMAL_EXIT; } void MainPartsPreMainMessageLoopRunHook() {
10
diff --git a/src/parser/enum.js b/src/parser/enum.js module.exports = { /* - * reading a class + * reading an enum * ```ebnf - * class ::= class_scope? T_CLASS T_STRING (T_EXTENDS NAMESPACE_NAME)? (T_IMPLEMENTS (NAMESPACE_NAME ',')* NAMESPACE_NAME)? '{' CLASS_BODY '}' + * enum ::= enum_scope? T_ENUM T_STRING (':' NAMESPACE_NAME)? (T_IMPLEMENTS (NAMESPACE_NAME ',')* NAMESPACE_NAME)? '{' ENUM_BODY '}' * ``` */ read_enum_declaration_statement: function () { @@ -41,9 +41,9 @@ module.exports = { }, /* - * Reads a class body + * Reads an enum body * ```ebnf - * class_body ::= (member_flags? (T_VAR | T_STRING | T_FUNCTION))* + * enum_body ::= (member_flags? (T_VAR | T_STRING | T_FUNCTION))* * ``` */ read_enum_body: function () {
1
diff --git a/packages/lib-classifier/src/plugins/tasks/experimental/textFromSubject/models/TextFromSubjectAnnotation.spec.js b/packages/lib-classifier/src/plugins/tasks/experimental/textFromSubject/models/TextFromSubjectAnnotation.spec.js @@ -14,14 +14,13 @@ describe('Model > TextFromSubjectAnnotation', function () { ] }) - const taskSnapshot = Task.TaskModel.create({ + const workflowSnapshot = WorkflowFactory.build({ + tasks: { + T0: { instruction: 'Correct the text', - taskKey: 'T0', type: 'textFromSubject' - }) - - const workflowSnapshot = WorkflowFactory.build({ - tasks: [taskSnapshot] + } + } }) let textFromSubjectAnnotation
1
diff --git a/Gulpfile.js b/Gulpfile.js @@ -751,8 +751,10 @@ gulp.task('docker-build', function (done) { done(); }); -gulp.step('docker-publish-run', function () { +gulp.step('docker-publish-run', function (done) { childProcess.execSync('docker push testcafe/testcafe:' + PUBLISH_TAG, { stdio: 'inherit', env: process.env }); + + done(); }); gulp.task('docker-publish', gulp.series('docker-build', 'docker-publish-run'));
0
diff --git a/index.js b/index.js @@ -135,6 +135,7 @@ exports.login = async function(options) { output: process.stdout }); rl.question('Please enter the accountId that you logged in with:', async (accountId) => { + try { // check that the key got added const near = await connect(options); let account = await near.account(accountId); @@ -146,6 +147,9 @@ exports.login = async function(options) { } else { console.log('Log in did not succeed. Please try again.') } + } catch (_) { + console.log('Log in did not succeed. Please try again.') + } rl.close(); }); }
7
diff --git a/packages/imba/src/compiler/nodes.imba1 b/packages/imba/src/compiler/nodes.imba1 @@ -5475,7 +5475,7 @@ export class LocalVarAccess < Access if right isa Variable and right.type == 'meth' return "{right.c}()" unless up isa Call - right.c + return right.c def variable right @@ -7813,8 +7813,15 @@ export class Catch < ControlFlowStatement def visit @scope.visit @variable = @scope.register(@varname,self,type: 'let', pool: 'catchvar') + if @body.len == 0 - @body.push(@variable.accessor) + # @variable.datatype = 'Something' + let node = @variable.accessor + let accessor = node + if STACK.tsc + node = IF(LIT("{node.c} instanceof Error"),node) + + @body.push(node) @body.traverse
7
diff --git a/lib/services/livesync/livesync-service.ts b/lib/services/livesync/livesync-service.ts @@ -49,6 +49,9 @@ class LiveSyncService implements ILiveSyncService { public liveSync(platform: string, applicationReloadAction?: (deviceAppData: Mobile.IDeviceAppData) => IFuture<void>): IFuture<void> { return (() => { + if (this.$options.justlaunch) { + this.$options.watch = false; + } let liveSyncData: ILiveSyncData[] = []; if (platform) { this.$devicesService.initialize({ platform: platform, deviceId: this.$options.device }).wait(); @@ -109,9 +112,6 @@ class LiveSyncService implements ILiveSyncService { this.$hooksService.executeBeforeHooks('watch').wait(); this.partialSync(liveSyncData[0].syncWorkingDirectory, watchForChangeActions); } - if (this.$options.justlaunch) { - process.kill(process.pid); - } }).future<void>()(); }
7
diff --git a/src/style_manager/view/PropertyCompositeView.js b/src/style_manager/view/PropertyCompositeView.js @@ -11,18 +11,13 @@ export default PropertyView.extend({ `; }, - inputValueChanged(...args) { - // If it's not detached (eg. 'padding: 1px 2px 3px 4px;') it will follow the same flow of the PropertyView - if (!this.model.isDetached()) { - PropertyView.prototype.inputValueChanged.apply(this, args); - } - }, - remove() { this.props?.remove(); PropertyView.prototype.remove.apply(this, arguments); }, + onValueChange() {}, + onRender() { const { model, pfx } = this; const props = model.getProperties();
8
diff --git a/contribs/gmf/apps/mobile_alt/index.html b/contribs/gmf/apps/mobile_alt/index.html <!DOCTYPE html> <html lang="{{mainCtrl.lang}}" ng-app="app" ng-controller="AlternativeMobileController as mainCtrl"> <head> - <title ng-bind-template="{{'Mobile Application'|translate}}">GeoMapFish</title> + <title ng-bind-template="{{'Alternative Mobile Application'|translate}}">GeoMapFish</title> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width"> <meta name="mobile-web-app-capable" content="yes"> module.constant('gmfSearchGroups', []); // Requires that the gmfSearchGroups is specified module.constant('gmfSearchActions', []); + module.constant('gmfTreeManagerModeFlush', false); module.value('ngeoWfsPermalinkOptions', /** @type {ngeox.WfsPermalinkOptions} */ ({ url: 'https://geomapfish-demo.camptocamp.net/2.2/wsgi/mapserv_proxy',
12
diff --git a/server/services/getPDF.php b/server/services/getPDF.php @@ -9,6 +9,8 @@ require 'helper.php'; use headstart\library; +$USER_AGENT = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13'; + $INI_DIR = dirname(__FILE__) . "/../preprocessing/conf/"; $ini_array = library\Toolkit::loadIni($INI_DIR); @@ -35,7 +37,7 @@ library\CommUtils::echoOrCallback(json_encode(array("status" => "success", "file function getPDFLinkforBASE($url) { $link_list = preg_split("/;/", $url); //Remove all entries that are not URLs - $link_list = array_filter($link_list, function($item) { return filter_var($item, FILTER_VALIDATE_URL); }); + //$link_list = array_filter($link_list, function($item) { return filter_var($item, FILTER_VALIDATE_URL); }); $matches_pdf = array_filter($link_list, function($item) { return substr($item, -strlen(".pdf")) === ".pdf"; }); if(count($matches_pdf) != 0) { @@ -44,12 +46,12 @@ function getPDFLinkforBASE($url) { $matches_doi = array_filter($link_list, function($item) { return strpos($item, "dx.doi.org"); }); if(count($matches_doi) != 0) { - return getRedirectURL($matches_doi[0]); + return getRedirectURL(array_values($matches_doi)[0]); } $matches_doaj = array_filter($link_list, function($item) { return strpos($item, "doaj.org"); }); if(count($matches_doaj) != 0) { - $url = getRedirectDOAJ($matches_doaj[0]); + $url = getRedirectDOAJ(array_values($matches_doaj)[0]); if($url != false) { return getRedirectURL($url); } @@ -77,33 +79,52 @@ function getRedirectDOAJ($doaj_url) { return ($fulltext_link === null)?(false):($fulltext_link); } -function getRedirectURL($doi_link) { +function getContentFromURL($link) { $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $doi_link); + curl_setopt($ch, CURLOPT_URL, $link); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt($ch, CURLOPT_VERBOSE, true); + curl_setopt($ch, CURLOPT_USERAGENT, $GLOBALS["USER_AGENT"]); $response = curl_exec($ch); $redir = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL); curl_close($ch); - return parsePDFLink($response); + return array($response, $redir); +} + +function getRedirectURL($link) { + $response = getContentFromURL($link); + + return parsePDFLink($response[0], $response[1]); } -function parsePDFLink($source) { - $has_match = preg_match_all('/["\']?([^"\'>]+(?:\.pdf))["\']?/', $source, $matches); +function parsePDFLink($source, $url) { + $has_match = preg_match_all('/["\']?([^"\'\s>]+(?:\.pdf))["\']?/i', $source, $matches); if($has_match) { - return $matches[1][0]; + $best_match = $matches[1][0]; + if(!startsWith($best_match, "http://") || !startsWith($best_match, "https://") || !startsWith($best_match, "ftp://")) { + return substr($url, 0, strrpos( $url, '/')) . $best_match; + } else { + return $best_match; + } } else { return false; } } +function startsWith($haystack, $needle) { + $length = strlen($needle); + return (substr($haystack, 0, $length) === $needle); +} + function getPDFAndDownload($url, $images_path, $filename) { $output_path = $images_path . $filename; - $pdf = file_get_contents($url); + $pdf = getContentFromURL($url)[0]; if ($pdf !== false) { file_put_contents($output_path, $pdf);
7
diff --git a/README.md b/README.md @@ -105,7 +105,7 @@ The CCU platform allows to enhance the functionality of a CCU by installing so-c * [HomeMatic Check_MK](https://github.com/alexreinert/homematic_check_mk) * [hm-tools](https://github.com/fhetty/hm-tools) * [HB-UW-Sen-THPL Universalsensor](https://github.com/jp112sdl/Wettersensor/tree/master/Contrib/CCURM) -* [Node-RED](https://github.com/hobbyquaker/ccu-addon-node-red) +* [RedMatic](https://github.com/hobbyquaker/RedMatic) ## :cloud: Installation The installation of RaspberryMatic is quite straight forward as it is delivered as a full SD card image that can be directly flashed onto a microSD card and put into the corresponding RaspberryPi. As such the installation consists of the following basic steps:
10
diff --git a/src/views/teachers/faq/faq.jsx b/src/views/teachers/faq/faq.jsx @@ -17,7 +17,7 @@ const TeacherFaq = props => ( <h2><FormattedMessage id="teacherfaq.title" /></h2> <dl> <dt><FormattedMessage id="teacherfaq.teacherWhatTitle" /></dt> - <dd><FormattedHTMLMessage id="teacherfaq.teacherWhatBody" /></dd> + <dd><FormattedMessage id="teacherfaq.teacherWhatBody" /></dd> <iframe allowFullscreen mozallowfullscreen @@ -30,7 +30,7 @@ const TeacherFaq = props => ( <dt><FormattedMessage id="teacherfaq.teacherSignUpTitle" /></dt> <dd><FormattedHTMLMessage id="teacherfaq.teacherSignUpBody" /></dd> <dt><FormattedMessage id="teacherfaq.teacherWaitTitle" /></dt> - <dd><FormattedHTMLMessage id="teacherfaq.teacherWaitBody" /></dd> + <dd><FormattedMessage id="teacherfaq.teacherWaitBody" /></dd> <dt><FormattedMessage id="teacherfaq.classMultipleTeachersTitle" /></dt> <dd><FormattedMessage id="teacherfaq.classMultipleTeachersBody" /></dd> <dt><FormattedMessage id="teacherfaq.convertToTeacherTitle" /></dt> @@ -53,9 +53,9 @@ const TeacherFaq = props => ( </ul> <dt><FormattedMessage id="teacherfaq.teacherPersonalTitle" /></dt> - <dd><FormattedHTMLMessage id="teacherfaq.teacherPersonalBody" /></dd> + <dd><FormattedMessage id="teacherfaq.teacherPersonalBody" /></dd> <dt><FormattedMessage id="teacherfaq.teacherGoogleTitle" /></dt> - <dd><FormattedHTMLMessage id="teacherfaq.teacherGoogleBody" /></dd> + <dd><FormattedMessage id="teacherfaq.teacherGoogleBody" /></dd> <dt><FormattedMessage id="teacherfaq.studentDiscussTitle" /></dt> <dd> <FormattedMessage @@ -81,17 +81,17 @@ const TeacherFaq = props => ( <h2><FormattedMessage id="teacherfaq.studentAccountsTitle" /></h2> <dl> <dt><FormattedMessage id="teacherfaq.studentVerifyTitle" /></dt> - <dd><FormattedHTMLMessage id="teacherfaq.studentVerifyBody" /></dd> + <dd><FormattedMessage id="teacherfaq.studentVerifyBody" /></dd> <dt><FormattedMessage id="teacherfaq.studentAddExistingTitle" /></dt> - <dd><FormattedHTMLMessage id="teacherfaq.studentAddExistingBody" /></dd> + <dd><FormattedMessage id="teacherfaq.studentAddExistingBody" /></dd> <dt><FormattedMessage id="teacherfaq.studentForgetTitle" /></dt> - <dd><FormattedHTMLMessage id="teacherfaq.studentForgetBody" /></dd> + <dd><FormattedMessage id="teacherfaq.studentForgetBody" /></dd> <dt><FormattedMessage id="teacherfaq.studentUnsharedTitle" /></dt> - <dd><FormattedHTMLMessage id="teacherfaq.studentUnsharedBody" /></dd> + <dd><FormattedMessage id="teacherfaq.studentUnsharedBody" /></dd> <dt><FormattedMessage id="teacherfaq.studentDeleteTitle" /></dt> - <dd><FormattedHTMLMessage id="teacherfaq.studentDeleteBody" /></dd> + <dd><FormattedMessage id="teacherfaq.studentDeleteBody" /></dd> <dt><FormattedMessage id="teacherfaq.studentMultipleTitle" /></dt> - <dd><FormattedHTMLMessage id="teacherfaq.studentMultipleBody" /></dd> + <dd><FormattedMessage id="teacherfaq.studentMultipleBody" /></dd> <dt><FormattedMessage id="teacherfaq.studentTransferTitle" /></dt> <dd><FormattedMessage id="teacherfaq.studentTransferBody" /></dd> <dt><FormattedMessage id="teacherfaq.studentEndTitle" /></dt> @@ -131,9 +131,9 @@ const TeacherFaq = props => ( <h2><FormattedMessage id="teacherfaq.commTitle" /></h2> <dl> <dt><FormattedMessage id="teacherfaq.commHiddenTitle" /></dt> - <dd><FormattedHTMLMessage id="teacherfaq.commHiddenBody" /></dd> + <dd><FormattedMessage id="teacherfaq.commHiddenBody" /></dd> <dt><FormattedMessage id="teacherfaq.commWhoTitle" /></dt> - <dd><FormattedHTMLMessage id="teacherfaq.commWhoBody" /></dd> + <dd><FormattedMessage id="teacherfaq.commWhoBody" /></dd> <dt><FormattedMessage id="teacherfaq.commTurnOffCommentsTitle" /></dt> <dd> <FormattedMessage @@ -148,10 +148,10 @@ const TeacherFaq = props => ( /> </dd> <dt><FormattedMessage id="teacherfaq.commBlockGamesTitle" /></dt> - <dd><FormattedHTMLMessage id="teacherfaq.commBlockGamesBody1" /></dd> - <dd><FormattedHTMLMessage id="teacherfaq.commBlockGamesBody2" /></dd> + <dd><FormattedMessage id="teacherfaq.commBlockGamesBody1" /></dd> + <dd><FormattedMessage id="teacherfaq.commBlockGamesBody2" /></dd> <dt><FormattedMessage id="teacherfaq.commInappropriateTitle" /></dt> - <dd><FormattedHTMLMessage id="teacherfaq.commInappropriateBody" /></dd> + <dd><FormattedMessage id="teacherfaq.commInappropriateBody" /></dd> </dl> </section> </div>
14
diff --git a/packages/webpack-plugin/lib/json-compiler/index.js b/packages/webpack-plugin/lib/json-compiler/index.js @@ -356,6 +356,10 @@ module.exports = function (raw = '{}') { ...queryObj } + if (content.plugins) { + subPackage.plugins = content.plugins + } + processSubPackagesQueue.push((callback) => { processSubPackage(subPackage, context, callback) })
1
diff --git a/packages/driver/src/cy/commands/actions/scroll.coffee b/packages/driver/src/cy/commands/actions/scroll.coffee @@ -223,8 +223,17 @@ module.exports = (Commands, Cypress, cy, state, config) -> if options.log deltaOptions = $utils.filterOutOptions(options, {duration: 0, easing: 'swing'}) + messageArgs = [] + if !position + messageArgs.push(x) + messageArgs.push(y) + else + messageArgs.push(position) + if deltaOptions + messageArgs.push($utils.stringify(deltaOptions)) + log = { - message: deltaOptions + message: messageArgs.join(', '), consoleProps: -> obj = { ## merge into consoleProps without mutating it
0
diff --git a/articles/policies/data-transfer.md b/articles/policies/data-transfer.md @@ -19,7 +19,7 @@ Auth0 will transfer customer data from one account to another in the following s * If you are opting to move out from our service, then you might want to check [this section](/moving-out). Please notice that in order to make this request you must be signed in to the Silver plan for one month. -## Frequently asked requests that are not allowed: +## Frequently asked requests that are not allowed * Transfer of data from one non-production account to a production account prior to transition to production status.
2
diff --git a/Bundle/BlogBundle/Resources/views/Blog/Tabs/_articles.html.twig b/Bundle/BlogBundle/Resources/views/Blog/Tabs/_articles.html.twig </a> {% if article.author is not null %} - <em>{{ article.author.firstname }} {{ article.author.lastname }}</em> + <em>{{ article.author }}</em> {% endif %} <time datetime="{{ article.publishedAt|date("Y-m-d") }}" class="vic-panelBlog-date">{{ article.publishedAt|localizeddate("medium", "none", locale, null, "cccc d LLLL yyyy") }}</time>
11
diff --git a/src/containers/pointsContainer.js b/src/containers/pointsContainer.js @@ -209,9 +209,7 @@ const PointsContainer = ({ }; const _getESTMPrice = (points) => { - const { base, quote } = globalProps; - - return points * 0.00442 * (base / quote); + return points / 150; }; return (
4
diff --git a/email-templates/newThreadNotification.html b/email-templates/newThreadNotification.html <table width="100%" cellpadding="0" cellspacing="0" class="thread-body"> <tr width="100%" cellpadding="0" cellspacing="0"> <td valign="middle"> - <a href="https://spectrum.chat/thread/{{../id}}" class="block"> + <a href="https://spectrum.chat/thread/{{../../id}}" class="block"> <p>{{.}}</p> </a> </td>
1
diff --git a/src/test/system_tests/mongodb_defaults.js b/src/test/system_tests/mongodb_defaults.js @@ -12,8 +12,11 @@ db.datablocks.remove({}); db.datachunks.remove({}); db.objectparts.remove({}); db.objectmds.remove({}); +db.namespace_resources.remove({}); db.func_code_gridfs.chunks.remove({}); db.func_code_gridfs.files.remove({}); +db.mongo_internal_agent.chunks.remove({}); +db.mongo_internal_agent.files.remove({}); db.funcs.remove({}); db.tiers.update({ name: { @@ -80,7 +83,8 @@ db.buckets.updateMany({}, { last_update: Date.now() - 600000 }, stats: { - reads: 0, writes: 0 + reads: 0, + writes: 0 }, lambda_triggers: [], versioning: 'DISABLED'
3
diff --git a/src/encoded/static/components/auditmatrix.js b/src/encoded/static/components/auditmatrix.js @@ -141,6 +141,7 @@ class AuditMatrix extends React.Component { }); } +/* eslint no-loop-func: 0 */ render() { const context = this.props.context; const matrix = context.matrix;
0
diff --git a/src/components/DateRangePicker/DefaultRanges.js b/src/components/DateRangePicker/DefaultRanges.js const PropTypes = require('prop-types'); const Radium = require('radium'); -const keycode = require('keycode'); const React = require('react'); const Icon = require('../Icon'); @@ -22,7 +21,7 @@ class DefaultRanges extends React.Component { range.getEndDate() === selectedEndDate; return ( - <div + <button aria-pressed={isSelectedRange} className='mx-default-ranges-range' key={range.displayValue + range.getStartDate()} @@ -30,15 +29,7 @@ class DefaultRanges extends React.Component { handleDefaultRangeSelection(range); this.setState({ selectedOption: index }); }} - onKeyUp={(e) => { - if (keycode(e) === 'enter') { - handleDefaultRangeSelection(range); - this.setState({ selectedOption: index }); - } - }} - role='button' style={styles.rangeOption} - tabIndex={0} > <div> <Icon @@ -52,7 +43,7 @@ class DefaultRanges extends React.Component { <div> {range.displayValue} </div> - </div> + </button> ); })} </div>
4
diff --git a/edit.js b/edit.js @@ -218,9 +218,15 @@ function animate(timestamp, frame) { .multiply(localMatrix2.getInverse(xrCamera.matrix)); pe.setMatrix(localMatrix); }; - if (axes[0] < -0.5 && !(lastAxes[index][0] < -0.5)) { + if ( + (axes[0] < -0.5 && !(lastAxes[index][0] < -0.5)) || + (axes[2] < -0.5 && !(lastAxes[index][2] < -0.5)) + ) { _applyRotation(-Math.PI * 0.2); - } else if (axes[0] > 0.5 && !(lastAxes[index][0] > 0.5)) { + } else if ( + (axes[0] > 0.5 && !(lastAxes[index][0] > 0.5) || + (axes[2] > 0.5 && !(lastAxes[index][2] > 0.5) + ) { _applyRotation(Math.PI * 0.2); } }
0
diff --git a/common/components/chrome/MainHeader.jsx b/common/components/chrome/MainHeader.jsx @@ -72,7 +72,10 @@ class MainHeader extends React.Component<{||}, State > { <Navbar collapseOnSelect expand="lg" bg="navlight" variant="light"> <Navbar.Brand><a href="/index/?section=Home"><img src={cdn.image("dl_logo.png")} alt="DemocracyLab" /></a></Navbar.Brand> <Navbar.Toggle aria-controls="nav-pagenav-container" /> - <Navbar.Collapse id="nav-pagenav-container"> + <Navbar.Collapse id="nav-pagenav-container" className="flex-column"> + <Nav className="MainHeader-usernav ml-auto"> + {this._renderUserSection()} + </Nav> <Nav className="MainHeader-pagenav mr-auto"> <NavDropdown title="Projects" id="nav-projects"> <NavDropdown.Item href="#action/3.1">Action</NavDropdown.Item> @@ -91,9 +94,6 @@ class MainHeader extends React.Component<{||}, State > { <NavDropdown.Item href="#action/3.2">Another action</NavDropdown.Item> </NavDropdown> </Nav> - <Nav className="MainHeader-usernav"> - {this._renderUserSection()} - </Nav> </Navbar.Collapse> </Navbar> )
12
diff --git a/tools/make/lib/notes/Makefile b/tools/make/lib/notes/Makefile @@ -28,6 +28,7 @@ notes: --exclude-dir "$(REPORTS_DIR)/*" \ --exclude-dir "$(DEPS_TMP_DIR)/*" \ --exclude-dir "$(DEPS_BUILD_DIR)/*" \ + --exclude-dir "$(DOCS_DIR)/**/$(NODE_MODULES_FOLDER)/*" \ --exclude "$(this_file)" \ --exclude "$(ROOT_DIR)/.*" \ --exclude "**/$(BUILD_FOLDER)/*" \
8
diff --git a/src/kiri-dev/cam/Makera.Carvera b/src/kiri-dev/cam/Makera.Carvera "bedWidth": 360, "bedDepth": 240, "originCenter": false, - "spindleMax": 12000, + "spindleMax": 20000, "gcodePre": [ "G21 ; set units to MM (required)", "G90 ; absolute position mode (required)", "G0 F2000 ; default rapid move speed", - "G1 F250 ; default cutting speed" + "G1 F1000 ; default cutting speed" ], "gcodePost": [ + "M5 ; spindle off", + "G0 F4000 ; default rapid move speed", + "G1 F1000 ; default cutting speed", "M30 ; program end" ], "gcodeDwell": [ "G4 P{time} ; dwell for {time}ms" ], "gcodeSpindle": [ - "S{spindle}" + "M3 S{spindle}" ], "gcodeChange": [ "M6 T{tool} ; change tool to '{tool_name}'" "gcodeSpace": true, "gcodeStrip": false, "new": false, - "deviceName": "Makera Carvera", + "deviceName": "My Makera Carvera", "maxHeight": 150, "useLaser": true, "imageURL": "", "camLevelSpindle": 1000, "camLevelOver": 0, "camLevelSpeed": 1000, - "camLevelDown": 1, - "camRoughTool": 1001, - "camRoughSpindle": 1000, + "camLevelDown": 0, + "camRoughTool": 1666284436865, + "camRoughSpindle": 20000, "camRoughDown": 3, - "camRoughOver": 0.5, + "camRoughOver": 0.25, "camRoughSpeed": 1000, "camRoughPlunge": 250, "camRoughStock": 0, "camRoughVoid": false, "camRoughFlat": false, - "camRoughTop": true, - "camRoughIn": true, + "camRoughTop": false, + "camRoughIn": false, "camRoughOn": true, - "camOutlineTool": 1000, - "camOutlineSpindle": 1000, + "camOutlineTool": 1665437735549, + "camOutlineSpindle": 0, "camOutlineDown": 1, "camOutlineOver": 0.4, - "camOutlineSpeed": 800, - "camOutlinePlunge": 250, + "camOutlineSpeed": 2000, + "camOutlinePlunge": 500, "camOutlineWide": false, "camOutlineDogbone": false, "camOutlineOmitThru": false, - "camOutlineOut": true, + "camOutlineOut": false, "camOutlineIn": false, "camOutlineOn": true, - "camContourTool": 1001, - "camContourSpindle": 1000, - "camContourOver": 0.25, - "camContourSpeed": 1000, + "camContourTool": 1666284436865, + "camContourSpindle": 20000, + "camContourOver": 0.15, + "camContourSpeed": 1500, "camContourAngle": 85, "camContourCurves": true, - "camContourIn": true, + "camContourIn": false, "camContourXOn": true, "camContourYOn": true, - "camTraceTool": 1000, + "camTraceTool": 1002, "camTraceSpindle": 1000, "camTraceType": "clear", "camTraceOver": 0.5, - "camTraceDown": 50, + "camTraceDown": 1, "camTraceSpeed": 750, "camTracePlunge": 200, "camTraceLines": false, "camZBottom": 0, "camZClearance": 1, "camZThru": 0, - "camFastFeed": 4000, - "camFastFeedZ": 250, - "camTolerance": 0.03, - "camStockX": 30, - "camStockY": 30, - "camStockZ": 1, + "camFastFeed": 3000, + "camFastFeedZ": 500, + "camTolerance": 0, + "camStockX": 0, + "camStockY": 0, + "camStockZ": 0, "camStockOffset": true, "camStockClipTo": false, "camStockOn": true, "outputInvertY": false, "camExpertFast": false, "ops": [], - "op2": [], + "op2": [ + { + "type": "flip", + "axis": "X", + "invert": true, + "disabled": false + } + ], "camTrueShadow": false, "camDrillMark": true, - "camPocketSpindle": 1000, - "camPocketTool": 1000, - "camPocketOver": 0.15, - "camPocketDown": 1, - "camPocketSpeed": 250, - "camPocketPlunge": 200, + "camPocketSpindle": 10000, + "camPocketTool": 1001, + "camPocketOver": 0.25, + "camPocketDown": 5, + "camPocketSpeed": 2000, + "camPocketPlunge": 500, "camPocketExpand": 0, "camContourBottom": false, "camTraceBottom": false, "cmaPocketOutline": false, "camRegisterThru": 5, - "camFlatness": 0, + "camFlatness": 0.001, "camContourBridge": 10, "camForceZMax": false, - "camPocketSmooth": 0, + "camPocketSmooth": 1, + "camPocketContour": true, "cmaPocketRefine": 20, - "camPocketContour": false, "camPocketEngrave": false, - "camLaserEnable": "M321", + "camLaserEnable": [ + "M321" + ], "camLaserDisable": "M322", - "camLaserOn": "M3", - "camLaserOff": "M5", + "camLaserOn": [ + "M3" + ], + "camLaserOff": [ + "M5" + ], "camLaserSpeed": 100, - "camLaserPower": 0.5 + "camLaserPower": 1, + "camLaserAdaptive": true, + "camLaserAdaptMod": true, + "camLaserFlatten": false, + "camLaserFlatZ": 0, + "camLaserPowerMin": 1, + "camLaserPowerMax": 0.1, + "camLaserZMin": 0, + "camLaserZMax": 0, + "camOutlineTop": false, + "X": "X" } ] } \ No newline at end of file
3
diff --git a/src/agent/fs.js b/src/agent/fs.js @@ -101,12 +101,14 @@ class FridaFS { const actualPath = this.transform.toActual(path); if (actualPath !== null) { + const entryBuf = Memory.alloc(Process.pageSize); + const resultPtr = Memory.alloc(Process.pointerSize); const dir = this.api.opendir(actualPath); if (dir === null) { return ''; } let entry; - while ((entry = this.api.readdir(dir)) !== null) { + while ((entry = this.api.readdir(dir, entryBuf, resultPtr)) !== null) { if (!this._excludeSet.has(entry.name)) { result.push(`${this._getEntryType(entry.type)} ${entry.name}`); } @@ -349,7 +351,7 @@ class PosixFSApi { get api () { if (this._api === null) { - const exports = resolveExports(['opendir', 'readdir', 'closedir', 'fopen', 'fclose', 'fread']); + const exports = resolveExports(['opendir', 'readdir_r', 'closedir', 'fopen', 'fclose', 'fread']); const available = Object.keys(exports).filter(name => exports[name] === null).length === 0; if (!available) { throw new Error('ERROR: is this a POSIX system?'); @@ -357,7 +359,7 @@ class PosixFSApi { this._api = { opendir: new NativeFunction(exports.opendir, 'pointer', ['pointer']), - readdir: new NativeFunction(exports.readdir, 'pointer', ['pointer']), + readdir: new NativeFunction(exports.readdir_r, 'int', ['pointer', 'pointer', 'pointer']), closedir: new NativeFunction(exports.closedir, 'int', ['pointer']), fopen: new NativeFunction(exports.fopen, 'pointer', ['pointer', 'pointer']), fclose: new NativeFunction(exports.fclose, 'int', ['pointer']), @@ -387,8 +389,9 @@ class PosixFSApi { return result; } - readdir (dir) { - const result = this.api.readdir(dir); + readdir (dir, entryBuf, resultPtr) { + const success = this.api.readdir(dir, entryBuf, resultPtr); + const result = resultPtr.readPointer(); if (result.isNull()) { return null; } @@ -545,7 +548,6 @@ function encodeBuf (buf, size, encoding) { const result = []; - console.error('ENCODE BUF'); for (let i = 0; i < size; i++) { const val = Memory.readU8(buf.add(i)); const valHex = val.toString(16);
1
diff --git a/shared/js/ui/templates/shared/grade-scorecard-reasons.es6.js b/shared/js/ui/templates/shared/grade-scorecard-reasons.es6.js const statusList = require('./status-list.es6.js') +const trackerNetworksText = require('./tracker-networks-text.es6.js') module.exports = function (site) { const reasons = getReasons(site) @@ -31,15 +32,12 @@ function getReasons (site) { }) } - // tracking networks blocked, - // only show a message if there's any blocked - const numTrackerNetworks = site.trackerNetworks.length - const foundOrBlocked = site.isWhitelisted || numTrackerNetworks === 0 ? 'Found' : 'Blocked' - const networkOrNetworks = (site.totalTrackersCount === 1) ? 'Network' : 'Networks' - if (numTrackerNetworks) { + // tracking networks blocked or found, + // only show a message if there's any + if (site.totalTrackerNetworks !== 0) { reasons.push({ modifier: 'bad', - msg: `${numTrackerNetworks} Tracker ${networkOrNetworks} ${foundOrBlocked}` + msg: `${trackerNetworksText(site)}` }) }
4
diff --git a/packages/node_modules/@node-red/runtime/lib/nodes/flows/Subflow.js b/packages/node_modules/@node-red/runtime/lib/nodes/flows/Subflow.js @@ -228,7 +228,7 @@ class Subflow extends Flow { this.node.on("close", function() { this.status({}); }) this.node.status = status => this.parent.handleStatus(this.node,status); // Create a context instance - console.log("Node.context",this.type,"id:",this._alias||this.id,"z:",this.z) + // console.log("Node.context",this.type,"id:",this._alias||this.id,"z:",this.z) this._context = context.get(this._alias||this.id,this.z);
2
diff --git a/src/index.js b/src/index.js @@ -234,7 +234,6 @@ function drawTrendChart(sheetTrend) { } function drawTrendChart2(sheetTrend) { - console.log(sheetTrend) var cols = { Date: ['Date'], @@ -283,12 +282,11 @@ function drawTrendChart2(sheetTrend) { tooltip: { format: { value: function (value, ratio, id, index) { - console.log('--') - console.log(ratio) - console.log(id) - console.log(index) + if(index){ return value + ' (+' + (parseInt(value) - cols[id][index]) + ')' - //return ratio; + }else{ + return value + } } } },
9
diff --git a/src/components/PDFView/index.js b/src/components/PDFView/index.js @@ -9,6 +9,7 @@ import CONST from '../../CONST'; import PDFPasswordForm from './PDFPasswordForm'; import * as pdfViewPropTypes from './pdfViewPropTypes'; import withWindowDimensions from '../withWindowDimensions'; +import Text from '../Text'; class PDFView extends Component { constructor(props) { @@ -125,6 +126,7 @@ class PDFView extends Component { onLayout={event => this.setState({windowWidth: event.nativeEvent.layout.width})} > <Document + error={<Text style={[styles.textLabel, styles.textLarge]}>Failed to load PDF file.</Text>} loading={<FullScreenLoadingIndicator />} file={this.props.sourceURL} options={{
9
diff --git a/src/lib/data/getNavigationTree.js b/src/lib/data/getNavigationTree.js @@ -23,12 +23,8 @@ export default async function getNavigationTree(client) { } // Get defaultNavigationTree - const navigationTreeByIdVariables = { id: defaultNavigationTreeId }; - const { data: { navigationTreeById } } = await client.query({ query: navigationQuery, navigationTreeByIdVariables }); - - if (!navigationTreeById) { - throw new Error("navigationTreeById query result was null"); - } + const variables = { id: defaultNavigationTreeId }; + const { data: { navigationTreeById } } = await client.query({ query: navigationQuery, variables }); return navigationTreeById; }
10
diff --git a/token-metadata/0xac3211a5025414Af2866FF09c23FC18bc97e79b1/metadata.json b/token-metadata/0xac3211a5025414Af2866FF09c23FC18bc97e79b1/metadata.json "symbol": "DOV", "address": "0xac3211a5025414Af2866FF09c23FC18bc97e79b1", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/includes/Core/Assets/Assets.php b/includes/Core/Assets/Assets.php @@ -250,14 +250,13 @@ final class Assets { $action = 'wp_head'; } - add_action( - $action, - function() use ( $font_families ) { - ?> - <script> + $fonts = sprintf( "'%s'", implode( "','", $font_families ) ); + + $fonts_script = sprintf( + " WebFontConfig = { - google: { families: [<?php echo "'" . implode( "','", $font_families ) . "'"; /* phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped */ ?>] } + google: { families: [%s] } }; ( function() { @@ -269,8 +268,14 @@ final class Assets { s.parentNode.insertBefore( wf, s ); } )(); - </script> - <?php + ", + $fonts + ); + + add_action( + $action, + function() use ( $fonts_script ) { + BC_Functions::wp_print_inline_script_tag( $fonts_script ); } ); }
4
diff --git a/source/Overture/parser/DateParser.js b/source/Overture/parser/DateParser.js @@ -99,12 +99,17 @@ const generateLocalisedDateParser = function ( locale, mode ) { ]); const searchMethod = anyInLocale( 'searchMethod', 'past future' ); - const dateDelimiter = define( 'dateDelimiter', - ( /^(?:[\s\-.,'/]|of)+/ ) ); + const dateDelimiter = define( 'dateDelimiter', /^(?:[\s\-.,'/]|of)+/ ); const relativeDate = anyInLocale( 'relativeDate', 'yesterday tomorrow today now' ); + const adjustSign = define( 'adjustSign', /^[+-]/ ); + const adjustUnit = define( 'adjustUnit', + /^[dwmy]|(?:day|week|month|year)/i ); + const adjustNumber = define( 'adjustNumber', /^\d+/ ); + const adjust = sequence([ adjustSign, adjustNumber, adjustUnit ]); + const standardDate = sequence( locale.dateFormats.date.split( /%-?([dmbY])/ ).map( ( part, i ) => { @@ -213,6 +218,7 @@ const generateLocalisedDateParser = function ( locale, mode ) { monthname, day, relativeDate, + adjust, searchMethod, whitespace, ]); @@ -226,6 +232,7 @@ const generateLocalisedDateParser = function ( locale, mode ) { monthname, day, relativeDate, + adjust, searchMethod, whitespace, ]); @@ -258,6 +265,13 @@ const dayNameToIndex = { sat: 6, }; +const letterToUnit = { + d: 'day', + w: 'week', + m: 'month', + y: 'year', +}; + const isLeapYear = Date.isLeapYear; const getDaysInMonth = Date.getDaysInMonth; @@ -302,6 +316,7 @@ const interpreter = { let month = constraints.month; let year = constraints.year; const weekday = constraints.weekday; + const adjust = constraints.adjust; const hasMonth = !!( month || month === 0 ); const hasWeekday = !!( weekday || weekday === 0 ); @@ -446,6 +461,14 @@ const interpreter = { date.setTime( date.getTime() + ( dayInMs * ( weekday - date.getDay() ).mod( 7 ) ) ); } + } else /* Default to today */ { + date.setDate( currentDay ); + } + + if ( adjust ) { + for ( let i = 0, l = adjust.length; i < l; i += 1 ) { + date.add( adjust[i][0], adjust[i][1] ); + } } return date; @@ -518,6 +541,20 @@ const interpreter = { date.month = now.getMonth(); date.year = now.getFullYear(); }, + adjustSign ( date, sign ) { + if ( !date.adjust ) { + date.adjust = []; + } + date.adjust.push([ sign === '+' ? 1 : -1, 'day' ]); + }, + adjustNumber ( date, number ) { + date.adjust.last()[0] *= number; + }, + adjustUnit ( date, unit ) { + unit = unit.toLowerCase(); + unit = letterToUnit[ unit ] || unit; + date.adjust.last()[1] = unit; + }, }; // ---
0
diff --git a/public/javascripts/Progress/src/Progress.js b/public/javascripts/Progress/src/Progress.js @@ -312,7 +312,7 @@ function Progress (_, $, c3, L, role, difficultRegionIds) { }) .addTo(map); - // Calculate total distance audited in (mi) + // Calculate total distance audited in kilometers/miles depending on the measurement system used in the user's country. for (var i = data.features.length - 1; i >= 0; i--) { distanceAudited += turf.length(data.features[i], {units: i18next.t('common:unit-distance')}); }
3
diff --git a/buildspec.yml b/buildspec.yml version: 0.2 + phases: - install: - runtime-versions: - nodejs: 15 pre_build: + commands: + - REPOSITORY_URI=907263135169.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/ecrrepository-app-$AWS_DEFAULT_REGION + - COMMIT_HASH=$(echo $CODEBUILD_RESOLVED_SOURCE_VERSION | cut -c 1-7) + - IMAGE_TAG=${COMMIT_HASH:=latest} + build: + commands: + - echo Build started on `date` + - echo Building the Docker image... + - echo Logging in to Docker Hub... + - echo "${DOCKERHUB_PASSWORD}" | docker login -u "${DOCKERHUB_USERNAME}" --password-stdin + - docker build -t $REPOSITORY_URI:latest . + - docker tag $REPOSITORY_URI:latest $REPOSITORY_URI:$IMAGE_TAG + post_build: + commands: + - echo Build completed on `date` + - echo Pushing the Docker images... + - echo Logging in to Amazon ECR... + - aws --version + - aws ecr get-login-password --region $AWS_DEFAULT_REGION | docker login --username AWS --password-stdin 907263135169.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com + - docker push $REPOSITORY_URI:latest + - docker push $REPOSITORY_URI:$IMAGE_TAG + - echo Writing image definitions file... + - printf '[{"name":"ECSContainer-app-'$AWS_DEFAULT_REGION'","imageUri":"%s"}]' $REPOSITORY_URI:$IMAGE_TAG > imagedefinitions.json artifacts: - files: - - '**/*' + files: imagedefinitions.json
3
diff --git a/source/pool/test/Pool-unit.js b/source/pool/test/Pool-unit.js @@ -118,7 +118,6 @@ contract('Pool Unit Tests', async accounts => { }, ], feeToken.address, - { from: aliceAddress, } @@ -158,7 +157,6 @@ contract('Pool Unit Tests', async accounts => { }, ], feeToken.address, - { from: aliceAddress, } @@ -186,7 +184,6 @@ contract('Pool Unit Tests', async accounts => { }, ], feeToken.address, - { from: aliceAddress, } @@ -201,7 +198,6 @@ contract('Pool Unit Tests', async accounts => { }, ], feeToken.address, - { from: aliceAddress, } @@ -231,7 +227,6 @@ contract('Pool Unit Tests', async accounts => { }, ], feeToken.address, - { from: aliceAddress, }
2
diff --git a/assets/js/components/notifications/ZeroDataStateNotifications.js b/assets/js/components/notifications/ZeroDataStateNotifications.js @@ -38,16 +38,16 @@ export default function ZeroDataStateNotifications() { const isAnalyticsConnected = useSelect( ( select ) => select( CORE_MODULES ).isModuleConnected( 'analytics' ) ); - const hasAnalyticsZeroData = useInViewSelect( ( select ) => + const analyticsHasZeroData = useInViewSelect( ( select ) => isAnalyticsConnected ? select( MODULES_ANALYTICS ).hasZeroData() : false ); - const hasSearchConsoleZeroData = useInViewSelect( ( select ) => + const searchConsoleHasZeroData = useInViewSelect( ( select ) => select( MODULES_SEARCH_CONSOLE ).hasZeroData() ); return ( <Fragment> - { hasAnalyticsZeroData || hasSearchConsoleZeroData ? ( + { analyticsHasZeroData || searchConsoleHasZeroData ? ( <BannerNotification id="zero-data-notification" title={ __(
10
diff --git a/src/checkout.js b/src/checkout.js @@ -180,5 +180,14 @@ export function renderCheckout(props : Object = {}) : ZalgoPromise<mixed> { nonce: getNonce() }) - ]); + + ]).catch(err => { + + if (err instanceof window.paypal.PopupOpenError) { + window.paypal.Checkout.contexts.iframe = true; + return renderCheckout(props); + } + + throw err; + }); }
9
diff --git a/src/components/annotations/attributes.js b/src/components/annotations/attributes.js @@ -316,7 +316,7 @@ module.exports = templatedArray('annotation', { valType: 'enumerated', values: [ 'paper', - cartesianConstants.idRegex.x.toString() + cartesianConstants.idRegex.x.toString()+"( domain)?" ], role: 'info', editType: 'calc', @@ -379,7 +379,7 @@ module.exports = templatedArray('annotation', { valType: 'enumerated', values: [ 'paper', - cartesianConstants.idRegex.y.toString() + cartesianConstants.idRegex.y.toString()+"( domain)?" ], role: 'info', editType: 'calc',
0
diff --git a/tests/qunit/assets/js/util/index.js b/tests/qunit/assets/js/util/index.js @@ -261,7 +261,7 @@ var gtag = function( type, name, sendto, category, label, value ) { }; }; -var sendAnalyticsTrackingEventExpected = '{"type":"event","name":"name","sendto":{"event_category":"category","event_label":"label","event_value":"value","dimension1":"","dimension2":"true"}}no'; +var sendAnalyticsTrackingEventExpected = '{"type":"event","name":"name","sendto":{"event_category":"category","event_label":"label","event_value":"value","dimension1":"","dimension2":"true"}}'; QUnit.test( 'sendAnalyticsTrackingEvent', function ( assert ) { window.googlesitekit.admin.trackingOptin = true; const value = JSON.stringify( testFunctions.sendAnalyticsTrackingEvent( 'category', 'name', 'label', 'value' ) );
2
diff --git a/edit.js b/edit.js @@ -4489,24 +4489,6 @@ const cubeMesh = (() => { cubeMesh.frustumCulled = false; scene.add(cubeMesh); -const PEEK_FACES = { - FRONT: 1, - BACK: 2, - LEFT: 3, - RIGHT: 4, - TOP: 5, - BOTTOM: 6, -}; -const PEEK_DIRECTIONS = [ - [new THREE.Vector3(0, 0, 1), PEEK_FACES.FRONT], - [new THREE.Vector3(0, 0, -1), PEEK_FACES.BACK], - [new THREE.Vector3(-1, 0, 0), PEEK_FACES.LEFT], - [new THREE.Vector3(1, 0, 0), PEEK_FACES.RIGHT], - [new THREE.Vector3(0, 1, 0), PEEK_FACES.TOP], - [new THREE.Vector3(0, -1, 0), PEEK_FACES.BOTTOM], -]; -const PEEK_FACE_INDICES = Int32Array.from([255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,1,2,3,4,255,255,255,255,255,255,255,255,255,255,0,255,5,6,7,8,255,255,255,255,255,255,255,255,255,255,1,5,255,9,10,11,255,255,255,255,255,255,255,255,255,255,2,6,9,255,12,13,255,255,255,255,255,255,255,255,255,255,3,7,10,12,255,14,255,255,255,255,255,255,255,255,255,255,4,8,11,13,14,255]); - const velocity = new THREE.Vector3(); const lastGrabs = [false, false]; const lastAxes = [[0, 0], [0, 0]];
2
diff --git a/test/type/unit/Unit.test.js b/test/type/unit/Unit.test.js @@ -253,10 +253,10 @@ describe('Unit', function() { assert.deepEqual(u.toNumeric('mm'), math.fraction(10,3)); }); it ('should simplify units before returning a numeric value', function () { - var cm = new Unit(1, 'cm'); - var m = new Unit(1, 'm'); + var cm = new Unit(1, 'gram'); + var m = new Unit(1, 'kilogram'); var product = cm.multiply(m) - assert.deepEqual(product.toNumeric(), 0.01); + assert.deepEqual(product.toNumeric(), 0.001); }); });
4
diff --git a/packages/app/src/server/routes/login-passport.js b/packages/app/src/server/routes/login-passport.js @@ -468,7 +468,7 @@ module.exports = function(crowi, app) { const providerId = 'saml'; const strategyName = 'saml'; const attrMapId = crowi.configManager.getConfig('crowi', 'security:passport-saml:attrMapId'); - const attrMapUsername = crowi.configManager.getConfig('crowi', 'security:passport-saml:attrMapUsername'); + const attrMapUsername = crowi.configManager.getConfig('crowi', 'security:passport-saml:attrMapUsername') || 'username'; const attrMapMail = crowi.configManager.getConfig('crowi', 'security:passport-saml:attrMapMail'); const attrMapFirstName = crowi.configManager.getConfig('crowi', 'security:passport-saml:attrMapFirstName') || 'firstName'; const attrMapLastName = crowi.configManager.getConfig('crowi', 'security:passport-saml:attrMapLastName') || 'lastName';
12
diff --git a/js/variant/variantTrack.js b/js/variant/variantTrack.js @@ -99,9 +99,10 @@ var igv = (function (igv) { } function getCallsetsLength() { - var length = 0, callSets = this.callSets; + var length = 0, + callSets = this.callSets; Object.keys(callSets).forEach(function(key) { - length += callSets[key].length; + if(callSets[key]) length += callSets[key].length; }); return length; }
9
diff --git a/components/Gallery/Gallery.js b/components/Gallery/Gallery.js @@ -70,8 +70,14 @@ const Gallery = ({ items, onClose, startItemSrc, children, t }) => { item.w = maxWidth item.h = aspectRatio * maxWidth }) - gallery.listen('close', e => console.log('close', e)) - gallery.listen('pswpTap', e => console.log('tap', e, e.detail)) + gallery.listen('close', () => { + // workaround bug opening nav when closing gallery on touch devices + // - defer onClose one render frame (1000ms/30frames) + // - othwise the component would already be unmounted when the click reaches the React event system and trigger a event on whatever is underneath + setTimeout(() => { + onClose() + }, 33) + }) gallery.init() } }, [items])
13
diff --git a/userscript.user.js b/userscript.user.js @@ -67469,15 +67469,23 @@ var $$IMU_EXPORT$$; } if (domain === "d7hftxdivxxvm.cloudfront.net") { + // artsy.net // https://d7hftxdivxxvm.cloudfront.net/?resize_to=fit&width=430&height=640&quality=80&src=https%3A%2F%2Fd32dm0rphc51dk.cloudfront.net%2FRWSMPU07Uk_utF8h-uENMg%2Flarge.jpg // https://d32dm0rphc51dk.cloudfront.net/RWSMPU07Uk_utF8h-uENMg/large.jpg return decodeURIComponent(src.replace(/^[a-z]+:\/\/[^/]*\/.*?[?&]src=([^&]*).*?$/, "$1")); } if (domain === "d32dm0rphc51dk.cloudfront.net") { + // artsy.net // https://d32dm0rphc51dk.cloudfront.net/RWSMPU07Uk_utF8h-uENMg/large.jpg // https://d32dm0rphc51dk.cloudfront.net/RWSMPU07Uk_utF8h-uENMg/larger.jpg - return src.replace(/\/large(\.[^/.]*)(?:[?#].*)?$/, "/larger$1"); + // https://d32dm0rphc51dk.cloudfront.net/RWSMPU07Uk_utF8h-uENMg/normalized.jpg -- 1907x2835 + // thanks to Johnny on discord + // https://d32dm0rphc51dk.cloudfront.net/C5lzx8iv9A3BwiBsNXQG1A/larger.jpg -- 783x1024 + // https://d32dm0rphc51dk.cloudfront.net/C5lzx8iv9A3BwiBsNXQG1A/normalized.jpg -- 3000x3922 + return src + .replace(/\/larger(\.[^/.]*)(?:[?#].*)?$/, "/normalized$1") + .replace(/\/large(\.[^/.]*)(?:[?#].*)?$/, "/larger$1"); } if (domain_nowww === "royalparks.org.uk") { @@ -73175,6 +73183,9 @@ var $$IMU_EXPORT$$; } if (domain === "nnimgt-a.akamaihd.net" || + // https://www.illawarramercury.com.au/images/transform/v1/crop/frm/silverstone-feed-data/59393c2f-d099-44c8-8770-26fdeaf9aea6.jpg/r0_0_4288_2849_w1200_h678_fmax.jpg + // https://www.illawarramercury.com.au/images/transform/v1/resize/frm/silverstone-feed-data/59393c2f-d099-44c8-8770-26fdeaf9aea6.jpg/w0_h0_fscale.jpg + domain_nowww === "illawarramercury.com.au" || // https://www.northweststar.com.au/images/transform/v1/crop/frm/Y5kUJ9Q7iPMNzBC9i5WqCU/a68e9967-e0cd-4818-a227-878719e98f65.jpg/r0_0_1200_677_w1200_h678_fmax.jpg // https://www.northweststar.com.au/images/transform/v1/resize/frm/Y5kUJ9Q7iPMNzBC9i5WqCU/a68e9967-e0cd-4818-a227-878719e98f65.jpg/w0_h0_fscale.jpg domain_nowww === "northweststar.com.au") {
7
diff --git a/pages/_app.js b/pages/_app.js -import React from 'react' import App from 'next/app' const PIWIK_URL = process.env.NEXT_PUBLIC_PIWIK_URL const PIWIK_SITE_ID = process.env.NEXT_PUBLIC_PIWIK_SITE_ID class MyApp extends App { - static async getInitialProps({Component, ctx}) { - let pageProps = {} - - if (Component.getInitialProps) { - pageProps = await Component.getInitialProps(ctx) - } - - return {pageProps} - } - logPageView() { if (window.Piwik) { const tracker = window.Piwik.getTracker(`${PIWIK_URL}/piwik.php`, PIWIK_SITE_ID) @@ -34,12 +23,6 @@ class MyApp extends App { this.logPageView() }, 400) } - - render() { - const {Component, pageProps} = this.props - - return <Component {...pageProps} /> - } } export default MyApp
2
diff --git a/src/components/m-table-detailpanel.js b/src/components/m-table-detailpanel.js @@ -10,27 +10,28 @@ function MTableDetailPanel(props) { ); setTimeout(() => { setOpen(shouldOpen); - setTimeout(() => { - if (!shouldOpen) { - renderRef.current = null; - } - }, 100); }, 5); - if (shouldOpen) { + }, [props.data.tableData.showDetailPanel]); + + let renderFunction; if (typeof props.detailPanel === 'function') { - renderRef.current = props.detailPanel; + renderFunction = props.detailPanel; } else { - renderRef.current = props.detailPanel + renderFunction = props.detailPanel ? props.detailPanel.find( (panel) => panel.render.toString() === (props.data.tableData.showDetailPanel || '').toString() ) : undefined; - renderRef.current = renderRef.current ? renderRef.current.render : null; + renderFunction = renderFunction ? renderFunction.render : null; } + React.useEffect(() => { + if (renderFunction) { + renderRef.current = renderFunction; } - }, [props.data.tableData.showDetailPanel]); + }); + return ( <TableCell size={props.size} @@ -41,8 +42,10 @@ function MTableDetailPanel(props) { } padding="none" > - <Collapse in={isOpen} timeout="auto" unmountOnExit> - {renderRef.current && renderRef.current(props.data)} + <Collapse in={isOpen} timeout="auto" unmountOnExit mountOnEnter> + {renderFunction + ? renderFunction(props.data) + : renderRef.current && renderRef.current(props.data)} </Collapse> </TableCell> );
7
diff --git a/src/components/auth/hooks/useCheckExisting.js b/src/components/auth/hooks/useCheckExisting.js @@ -8,7 +8,7 @@ const log = logger.child({ from: 'useCheckExisting' }) //check if email/mobile was used to register before and offer user to login instead const useCheckExisting = () => { - const { setAlreadySignedUp } = useContext(AuthContext) + const { activeStep, setAlreadySignedUp } = useContext(AuthContext) const checkExisting = useCallback(async (torusProvider, torusUser, eventVars = {}) => { const checkResult = (await userExists(torusUser).catch(e => { @@ -17,14 +17,14 @@ const useCheckExisting = () => { const { exists, provider } = checkResult - log.debug('checking userAlreadyExist', { exists }) + log.debug('checking userAlreadyExist', { exists, activeStep }) if (!exists) { return 'signup' } - // User exists an it is the correct login - if (torusProvider === provider) { + // User exists, it is not the number check and it is the correct login + if (torusProvider === provider && !activeStep) { return 'login' }
1
diff --git a/test/MUIDataTableFooter.test.js b/test/MUIDataTableFooter.test.js @@ -5,6 +5,7 @@ import { assert } from 'chai'; import MuiTableFooter from '@material-ui/core/TableFooter'; import getTextLabels from '../src/textLabels'; import TableFooter from '../src/components/TableFooter'; +import JumpToPage from '../src/components/JumpToPage'; describe('<TableFooter />', function() { let options; @@ -87,4 +88,26 @@ describe('<TableFooter />', function() { const actualResult = mountWrapper.find(MuiTableFooter); assert.strictEqual(actualResult.length, 0); }); + + it('should render a JumpToPage component', () => { + const options = { + rowsPerPageOptions: [5, 10, 15], + textLabels: getTextLabels(), + jumpToPage: true + }; + + const mountWrapper = mount( + <TableFooter + options={options} + rowCount={100} + page={1} + rowsPerPage={10} + changeRowsPerPage={changeRowsPerPage} + changePage={changePage} + />, + ); + + const actualResult = mountWrapper.find(JumpToPage); + assert.strictEqual(actualResult.length, 1); + }); });
0
diff --git a/core/server/api/v2/posts.js b/core/server/api/v2/posts.js const models = require('../../models'); -const i18n = require('../../../shared/i18n'); +const tpl = require('@tryghost/tpl'); const errors = require('@tryghost/errors'); const getPostServiceInstance = require('../../services/posts/posts-service'); const allowedIncludes = ['tags', 'authors', 'authors.roles']; const unsafeAttrs = ['status', 'authors', 'visibility']; +const messages = { + postNotFound: 'Post not found.' +}; + const postsService = getPostServiceInstance('v2'); module.exports = { @@ -73,7 +77,7 @@ module.exports = { .then((model) => { if (!model) { throw new errors.NotFoundError({ - message: i18n.t('errors.api.posts.postNotFound') + message: tpl(messages.postNotFound) }); } @@ -180,7 +184,7 @@ module.exports = { .then(() => null) .catch(models.Post.NotFoundError, () => { return Promise.reject(new errors.NotFoundError({ - message: i18n.t('errors.api.posts.postNotFound') + message: tpl(messages.postNotFound) })); }); }
14
diff --git a/server/app/app.py b/server/app/app.py @@ -13,7 +13,7 @@ from .web import webapp REACTIVE_LIMIT = 1_000_000 -app = Flask(__name__) +app = Flask(__name__, static_folder="web/static") cache = Cache(app, config={"CACHE_TYPE": "simple", "CACHE_DEFAULT_TIMEOUT": 860000}) Compress(app) CORS(app)
12
diff --git a/src/charts/common/bar/DataLabels.js b/src/charts/common/bar/DataLabels.js @@ -65,13 +65,10 @@ export default class BarDataLabels { height: 0 } if (w.config.dataLabels.enabled) { - const longestStr = - String(w.globals.minY).length > String(w.globals.maxY).length - ? w.globals.minY - : w.globals.maxY + const yLabel = String(this.barCtx.series[i][j]); textRects = graphics.getTextRects( - w.globals.yLabelFormatters[0](longestStr), + w.globals.yLabelFormatters[0](yLabel), parseFloat(dataLabelsConfig.style.fontSize) ) } @@ -279,7 +276,10 @@ export default class BarDataLabels { if (valIsNegative) { dataLabelsX = newX + barWidth / 2 - offX } else { - dataLabelsX = newX - barWidth / 2 + offX + dataLabelsX = Math.max( + textRects.width / 2, + newX - barWidth / 2 + ) + offX } break case 'bottom':
1
diff --git a/src/webroutes/authentication/verifyZapToken.js b/src/webroutes/authentication/verifyZapToken.js @@ -19,13 +19,13 @@ const isUndefined = (x) => { return (typeof x === 'undefined'); }; //The actual key const zapPublicKey = JWK.asKey(`-----BEGIN PUBLIC KEY----- -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArrztSUnu8Mv7AdwLjton -iyTMfk2zhQbVFDNOBAPXAZiU/3uTtyQH3cIs0UjVE66QiwRParENlJ+bOOICSOC+ -jbwK/H4bE1uTpC0vbclsyXv6cVUyokoh4tuKr8P3RbQS2zViPUL4K0tCBn9Wo/VI -BKY5Jn8ZnnQn0fUeIWD5HFzNGSPO/bHHaRYDitpwbq4zdi5dRbXKgxc9MxigYYBi -ajuNtvCudG2/oK/BdmYIt6M3uXz2SOv6hKKGUUizLuiGQEJkg6VgaPd/3RNf+XlU -NUDBmW4S6ByK4V/OWmJV+uIUTbi03TmRDPF4/uDF8ljxlT0XHgvJ0d2a9ec1ulqv -hwIDAQAB +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA47Uk3Ly5lWE0PGvF2Uno +xjyN/37+fbtgW7gWnRzfh1hdr7cYk8h+qhtTpP/gjJPLVOTS0FV0zwnWxZaGwgTm +UpjI1Ik2M+wUlvKpcEvFz30fj5/GnzRH5nU1JLSD26qwRCVqzxNrrxS7J+BtNfVC +KK8s/iPYG6TZp/ONyoAt0hicYFnHtoxkcXh+B7xV1AY8drwo287nOAcrXcVQ3wy3 +MVNEXJjaF2Y4AcOclRu2kp4tNmyzi4+fVIMuAeUJn4dy7rBa46MDOQQEyu3NdNzt +ef3OFncqQH5WIymLzUSe1UjPbT8iXxVuZVz4JBmDvJv5JnCfp5QVILGzGioP+B3L +0QIDAQAB -----END PUBLIC KEY-----`); //NOTE: the routes SHOULD not have any persistent data, but meh...
3
diff --git a/src/ApiGatewayWebSocket.js b/src/ApiGatewayWebSocket.js @@ -380,18 +380,13 @@ module.exports = class ApiGatewayWebSocket { debugLog(functionName, 'runtime', this._provider.runtime) // TODO Remove (already in LambdaFunction) - Object.assign(process.env, this._env) - - // TODO Remove (already in LambdaFunction) - Object.assign( - process.env, - { AWS_REGION: this._provider.region }, - this._provider.environment, - this._service.functions[functionName].environment, - ) - - // TODO Remove (already in LambdaFunction) - process.env._HANDLER = functionObj.handler + process.env = { + _HANDLER: functionObj.handler, + ...this._env, + ...{ AWS_REGION: this._provider.region }, + ...this._provider.environment, + ...this._service.functions[functionName].environment, + } // TODO REMOVE use LambdaFunction class const handler = createHandler(funOptions, this._options)
2
diff --git a/index.js b/index.js @@ -16,9 +16,6 @@ try { } catch(err) { console.warn(err); } -if (!openAiKey) { - throw new Error('fail'); -} const aiPrefix = fs.readFileSync('./ai/ai-prefix.js'); // const htmlRenderIframeString = fs.readFileSync('./html_render_iframe.html', 'utf8');
2
diff --git a/app/webpack/taxa/photos/ducks/photos.js b/app/webpack/taxa/photos/ducks/photos.js @@ -303,7 +303,7 @@ export function reloadPhotos( ) { export function hydrateFromUrlParams( params ) { return function ( dispatch ) { if ( params.grouping ) { - const match = params.grouping.match( /terms:([0-9])/ ); + const match = params.grouping.match( /terms:([0-9]+)$/ ); if ( match ) { dispatch( setGrouping( params.grouping, Number( match[1] ) ) ); } else {
1
diff --git a/AUTHORS.rst b/AUTHORS.rst @@ -44,6 +44,7 @@ and agreed to irrevocably license their contributions under the Duktape * Romero Malaquias ([email protected]) * Michael Drake <[email protected]> * Steven Don (https://github.com/shdon) +* Simon Stone (https://github.com/sstone1) Other contributions =================== @@ -82,7 +83,6 @@ bugs, provided ideas, etc; roughly in order of appearance): * https://github.com/chris-y * Laurent Zubiaur (https://github.com/lzubiaur) * Neil Kolban (https://github.com/nkolban) -* Simon Stone (https://github.com/sstone1) If you are accidentally missing from this list, send me an e-mail (``[email protected]``) and I'll fix the omission.
5
diff --git a/gears/carto_gears_api/README.md b/gears/carto_gears_api/README.md @@ -73,6 +73,8 @@ have several limitations: - If you specify a runtime dependency of a gem already existing at Gemfile, it must have the exact version. - Although the private gem itself doesn't appear in `Gemfile` or `Gemfile.lock`, dependencies do, because they need to be installed. +- You should avoid adding paths to the `$LOAD_PATH` from the Gemfile. An alternative is to add them in the +initialization code. #### Generating a clean Gemfile.lock @@ -94,7 +96,17 @@ bundle exec rails plugin new gears/my_component --full --mountable It will be mounted at root (`/`) and automatically loaded. -Automatic reload for development is supported right out of the box. +To enable automatic reload for development, you should add the `lib` path to the `autoload_path` in your `Engine` +subclass: +``` +module MyComponent + class Engine < ::Rails::Engine + isolate_namespace MyComponent + + config.autoload_paths << config.root.join('lib').to_s + end +end +``` You must use only classes under `CartoGearsApi` namespace. _It's currently under `/gears/carto_gears_api/lib`, but it will be documented before first public release._ @@ -175,8 +187,19 @@ end ## Extension points -Most extension points require a registration during intialization. A good -place to put the code it is inside a file in +config/initializers+. +Most extension points require a registration during intialization. Although you can use initializers for your gear, +everything that depends upon CARTO should be run in an `after_initialize` hook, to ensure it is loaded after CARTO. e.g: +``` +module MyComponent + class Engine < ::Rails::Engine + isolate_namespace MyComponent + + config.after_initialize do + # Your initialization code + end + end +end +``` ### Adding links to profile page
7
diff --git a/assets/src/dashboard/app/views/my-stories/index.js b/assets/src/dashboard/app/views/my-stories/index.js @@ -56,15 +56,15 @@ function MyStories() { <div> <ViewHeader>{__('My Stories', 'web-stories')}</ViewHeader> <FilterContainer> - {STORY_STATUSES.map((currentStatus) => ( + {STORY_STATUSES.map((storyStatus) => ( <FloatingTab - key={currentStatus.value} + key={storyStatus.value} onClick={(_, value) => setStatus(value)} name="all-stories" - value={currentStatus.value} - isSelected={status === currentStatus.value} + value={storyStatus.value} + isSelected={status === storyStatus.value} > - {currentStatus.label} + {storyStatus.label} </FloatingTab> ))} </FilterContainer>
10
diff --git a/sketches/axes.js b/sketches/axes.js @@ -29,7 +29,7 @@ function() { this.afterSketch(function() { var e = this.pointToPixelMatrix.elements; var showZ = tmp.set(e[8],e[9],e[10]).normalize().z < .975; - var i, V, x, y, z, inValue, edges; + var c, i, V, x, y, z, inValue, edges; textHeight(this.mScale(.1)); mText("x=-1",[-1.2,0,0],.5,.5);
1
diff --git a/src/lib/notifications/backgroundActions.native.js b/src/lib/notifications/backgroundActions.native.js @@ -71,10 +71,18 @@ export const useNotifications = navigation => { const onForeground = (notification, completion) => { log.info(`Notification received in foreground: ${notification.title} : ${notification.body}`) + // should call completion otherwise notifications won't receive completion({ alert: false, sound: false, badge: false }) } + const onBackground = (notification, completion) => { + log.info(`Notification received in background: ${notification.title} : ${notification.body}`) + + // should call completion otherwise notifications won't receive in background + completion({ alert: true, sound: false, badge: true }) + } + const onOpened = async (notification, completion) => { const navigation = getNavigation() const { category } = notification?.payload || {} @@ -92,6 +100,7 @@ export const useNotifications = navigation => { const subscriptions = [ events.registerNotificationReceivedForeground(onForeground), + events.registerNotificationReceivedBackground(onBackground), events.registerNotificationOpened(onOpened), ]
0
diff --git a/test/routes/v2-errors.test.js b/test/routes/v2-errors.test.js @@ -12,8 +12,7 @@ beforeAll((done) => { // 404 Test //------------------------------------------------------------ -test('It should return 404 error', () => { - return request(app).get('/v1').then((response) => { +test('It should return 404 error', async () => { + const response = await request(app).get('/v1'); expect(response.statusCode).toBe(404); }); -});
3
diff --git a/lib/cartodb/middleware/context/db-conn-setup.js b/lib/cartodb/middleware/context/db-conn-setup.js @@ -5,7 +5,7 @@ module.exports = function dbConnSetup (pgConnection) { const { user } = res.locals; pgConnection.setDBConn(user, res.locals, (err) => { - req.profiler.done('setDBConn'); + req.profiler.done('dbConnSetup'); if (err) { if (err.message && -1 !== err.message.indexOf('name not found')) {
4
diff --git a/userscript.user.js b/userscript.user.js @@ -243,9 +243,10 @@ var $$IMU_EXPORT$$; can_use_remote = true; } + // todo: rename to something better, like should_popout_of_iframes var should_use_remote = function() { return can_use_remote && settings.mouseover_use_remote; - } + }; var do_request_browser = function (request) { if (_nir_debug_) { @@ -60053,7 +60054,8 @@ var $$IMU_EXPORT$$; }; var keyevent_remote = function(event) { - if (should_use_remote()) { + // use can_use_remote instead of should_use_remote because this doesn't necessarily pop out of iframes + if (can_use_remote) { if (!("remote_info" in event)) { event.remote_info = get_frame_info(); @@ -60602,7 +60604,7 @@ var $$IMU_EXPORT$$; event.pageY = event.clientY + scrollTop(); } - if (should_use_remote()) { + if (can_use_remote) { if (!("remote_info" in event)) { event.remote_info = get_frame_info(); }
7
diff --git a/grocy.openapi.json b/grocy.openapi.json ], "responses": { "200": { - "description": "An array of Task objects", + "description": "An array of CurrentTaskResponse objects", "content": { "application/json": { "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/Task" + "$ref": "#/components/schemas/CurrentTaskResponse" } } } "chore_id": { "type": "integer" }, + "chore_name": { + "type": "string" + }, "last_tracked_time": { "type": "string", "format": "date-time" }, + "track_date_only": { + "type": "boolean" + }, "next_estimated_execution_time": { "type": "string", "format": "date-time", "description": "The next estimated execution time of this chore, 2999-12-31 23:59:59 when the given chore has a period_type of manually" + }, + "next_execution_assigned_to_user_id": { + "type": "integer" + }, + "next_execution_assigned_user": { + "$ref": "#/components/schemas/UserDto" } } }, } } }, + "TaskCategory": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "row_created_timestamp": { + "type": "string", + "format": "date-time" + } + } + }, + "CurrentTaskResponse": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "due_date": { + "type": "string", + "format": "date-time" + }, + "done": { + "type": "integer" + }, + "done_timestamp": { + "type": "string", + "format": "date-time" + }, + "category_id": { + "type": "integer" + }, + "assigned_to_user_id": { + "type": "integer" + }, + "row_created_timestamp": { + "type": "string", + "format": "date-time" + }, + "assigned_to_user": { + "$ref": "#/components/schemas/UserDto" + }, + "category": { + "$ref": "#/components/schemas/TaskCategory" + } + } + }, "DbChangedTimeResponse": { "type": "object", "properties": {
0
diff --git a/bin/resources/app/misc/splitter.js b/bin/resources/app/misc/splitter.js var eq = document.getElementById("tree-td") || document.getElementById("editor-td"); var gq = document.getElementById("main"); var ls = window.localStorage; - if (ls) eq.style.width = Math.max(0|(ls.getItem("splitter-width") || "200"), 50) + "px"; + var lsk = "splitter-width"; + var lw = !!document.getElementById("game"); + if (lw) lsk = "lw-" + lsk; + if (ls) eq.style.width = Math.max(0|(ls.getItem(lsk) || (lw ? "520" : "200")), 50) + "px"; eq.style.setProperty("flex-grow", "inherit") var sp_mousemove, sp_mouseup, sp_x, sp_y; sp_mousemove = function(e) { document.removeEventListener("mousemove", sp_mousemove); document.removeEventListener("mouseup", sp_mouseup); gq.classList.remove("resizing"); - if (ls) ls.setItem("splitter-width", "" + parseFloat(eq.style.width)); + if (ls) ls.setItem(lsk, "" + parseFloat(eq.style.width)); }; sp.addEventListener("mousedown", function(e) { sp_x = e.pageX; sp_y = e.pageY;
4
diff --git a/item-spec/json-schema/datetime.json b/item-spec/json-schema/datetime.json ], "properties": { "datetime": { - "$ref": "#/definitions/datetime_string" + "$ref": "#/definitions/datetime" }, "start_datetime": { "$ref": "#/definitions/start_datetime" "datetime": { "oneOf": [ { - "$ref": "#/definitions/datetime_string" + "$ref": "#/definitions/datetime" }, { "type": ["null"], } ], "definitions": { + "datetime": { + "title": "Date and Time", + "description": "The searchable date/time of the assets, in UTC (Formatted in RFC 3339) ", + "type": "string", + "format": "date-time" + }, + "start_datetime": { + "title": "Start Date and Time", + "description": "The searchable start date/time of the assets, in UTC (Formatted in RFC 3339) ", + "type": "string", + "format": "date-time" + }, + "end_datetime": { + "title": "End Date and Time", + "description": "The searchable end date/time of the assets, in UTC (Formatted in RFC 3339) ", + "type": "string", + "format": "date-time" + }, "created": { "title": "Creation Time", "type": "string",
0
diff --git a/modules/hooks/combat.js b/modules/hooks/combat.js @@ -6,7 +6,7 @@ export default function() { Hooks.on("deleteCombat", CombatHelpers.endCombat) Hooks.on("preCreateCombatant", (combat, data) => { - let mask = canvas.tokens.get(data.tokenId).getFlag("wfrp4e", "mask") + let mask = canvas.tokens.get(data.tokenId).document.getFlag("wfrp4e", "mask") if (mask) { data.img = "systems/wfrp4e/tokens/unknown.png"
1
diff --git a/src/branch_view.js b/src/branch_view.js @@ -95,7 +95,6 @@ branch_view.shouldDisplayJourney = function(eventResponse, options, journeyInTes if ( !eventResponse['branch_view_data']['id'] || - isJourneyDismissed(eventResponse['branch_view_data'], journeys_utils.branch) || options['no_journeys'] || _areJourneysDismissedGlobally(journeys_utils.branch) ) {
2
diff --git a/package.json b/package.json "test-dump": "rm -rf volumetests/ && ./node_modules/.bin/mocha --exit tests/dump_tests/*.js --require @babel/register", "test-rpki": "./node_modules/.bin/mocha --exit tests/rpki_tests/tests.default.js --require @babel/register && ./node_modules/.bin/mocha --exit tests/rpki_tests/tests.external.js --require @babel/register && ./node_modules/.bin/mocha --exit tests/rpki_tests/tests.external-missing-roas.js --require @babel/register && rm -f -R .cache/ && ./node_modules/.bin/mocha --exit tests/rpki_tests/tests.external-roas.js --require @babel/register && ./node_modules/.bin/mocha --exit tests/rpki_tests/tests.api.js --require @babel/register", "build": "./build.sh", - "compile": "rm -rf dist/ && ./node_modules/.bin/babel index.js -d dist && ./node_modules/.bin/babel src -d dist/src && cp package.json dist/package.json && cp README.md dist/README.md && cp .npm* dist/", + "compile": "rm -rf dist/ && ./node_modules/.bin/babel index.js -d dist && ./node_modules/.bin/babel src -d dist/src && cp package.json dist/package.json && cp package-lock.json dist/package-lock.json && cp README.md dist/README.md && cp AUTHORS dist/AUTHORS && cp .npm* dist/", "serve": "babel-node index.js", "inspect": "node --inspect --require @babel/register index.js", "update": "git update-index --assume-unchanged config.yml && git update-index --assume-unchanged prefixes.yml && git pull",
7
diff --git a/lib/plugins/output-filter/dropEventsFilter.js b/lib/plugins/output-filter/dropEventsFilter.js @@ -6,8 +6,8 @@ function testCondition (data, fieldName, condition) { } function logStatus (debug, a, b, c, d) { - if (debug === 'true') { - consoleLogger.log(JSON.stringify(['drop-filter-events plugin:', a, b, c])) + if (debug != false) { + consoleLogger.debug(`drop-events plugin: ${a} ${b} ${c} ${d}`.replace(/undefined/g, '-')) } } @@ -26,23 +26,27 @@ function dropEventsFilter (context, config, eventEmitter, data, callback) { var exclude = config.filters[config.keys[i]].exclude if (config.filters[config.keys[i]].include) { drop = (!testCondition(data, config.keys[i], include)) || drop - logStatus(debug, config.keys[i], 'include', drop) + logStatus(debug, config.keys[i], 'include', drop, config.filters[config.keys[i]].include) } if (config.filters[config.keys[i]].exclude) { drop = testCondition(data, config.keys[i], exclude) || drop - logStatus(debug, config.keys[i], 'exclude', drop) + logStatus(debug, config.keys[i], 'exclude', drop, config.filters[config.keys[i]].exclude) } } - logStatus('filter result', drop) + logStatus(debug, 'filter result', drop) if (drop) { - logStatus(debug, 'drop', data) + if (debug) { + logStatus(debug, 'drop', JSON.stringify(data)) + } return callback(new Error('drop filter')) } else { - logStatus(debug, 'pass', data) + if (debug) { + logStatus(debug, 'pass', JSON.stringify(data)) + } return callback(null, data) } } catch (ex) { - logStatus(debug, ex) + logStatus(debug, 'exceptoion', ex) // pass events in case of error return callback(null, data) }
7
diff --git a/packages/build/lib/renderer.js b/packages/build/lib/renderer.js @@ -12,6 +12,7 @@ var createMiddleware = require('./middleware'); module.exports = function createRenderer(webpackConfig, watchOptions) { var router = new express.Router(); + router.use(hopsExpressUtils.timings); hopsExpressUtils.bootstrap(router, hopsConfig); hopsExpressUtils.registerMiddleware( router,
1
diff --git a/scripts/remove-large-object.sh b/scripts/remove-large-object.sh @@ -31,7 +31,7 @@ chmod +x .git/hooks/post-rewrite COMMIT_TO_EDIT=$(git log --find-object=${1} --reverse --pretty=tformat:"%H" --topo-order | head -n1) SHORT_COMMIT=${COMMIT_TO_EDIT:0:7} # Automatically edit the right commit during the rebase -GIT_SEQUENCE_EDITOR="sed -i 's/^pick ${SHORT_COMMIT}/edit ${SHORT_COMMIT}/;'" +export GIT_SEQUENCE_EDITOR="sed -i 's/^pick ${SHORT_COMMIT}/edit ${SHORT_COMMIT}/;'" # --strategy-option theirs = accept the working tree (original) changes over any files edited in this rebase git rebase --strategy-option=theirs -i $COMMIT_TO_EDIT~1 # Remove from commit index but keep file
1
diff --git a/edit.js b/edit.js @@ -619,9 +619,13 @@ window.send2 = async () => { // The unique ID that differentiates each NFT pub let id: UInt64 + // String mapping to hold metadata + pub var metadata: {String: String} + // Initialize both fields in the init function init(initID: UInt64) { self.id = initID + self.metadata = {} } } @@ -1016,6 +1020,8 @@ window.send2 = async () => { let receiverRef = recipient.getCapability(/public/NFTReceiver)! .borrow<&{NonFungibleToken.NFTReceiver}>()! + self.transferToken.metadata["lol"] = "zol"; + // Deposit the NFT in the receivers collection receiverRef.deposit(token: <-self.transferToken)
0
diff --git a/README.md b/README.md @@ -79,6 +79,11 @@ An installation walkthrough, how-to guides for adding new operations, descriptio - Submit a pull request. +## Licencing + +CyberChef is released under the [Apache 2.0 Licence](https://www.apache.org/licenses/LICENSE-2.0) and is covered by [Crown Copyright](https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/). + + [1]: https://gchq.github.io/CyberChef [2]: https://gchq.github.io/CyberChef/?recipe=%5B%7B%22op%22%3A%22From%20Base64%22%2C%22args%22%3A%5B%22A-Za-z0-9%2B%2F%3D%22%2Ctrue%5D%7D%5D&input=VTI4Z2JHOXVaeUJoYm1RZ2RHaGhibXR6SUdadmNpQmhiR3dnZEdobElHWnBjMmd1 [3]: https://gchq.github.io/CyberChef/?recipe=%5B%7B%22op%22%3A%22Translate%20DateTime%20Format%22%2C%22args%22%3A%5B%22Standard%20date%20and%20time%22%2C%22DD%2FMM%2FYYYY%20HH%3Amm%3Ass%22%2C%22UTC%22%2C%22dddd%20Do%20MMMM%20YYYY%20HH%3Amm%3Ass%20Z%20z%22%2C%22Australia%2FQueensland%22%5D%7D%5D&input=MTUvMDYvMjAxNSAyMDo0NTowMA
0
diff --git a/src/ngFormBuilder.js b/src/ngFormBuilder.js @@ -36,6 +36,13 @@ app.directive('formBuilderDraggable', function() { event.dataTransfer.setData('Text', JSON.stringify(dragData)); return false; }, false); + el.addEventListener('dragend', function(event) { + var dropZone = document.getElementById('fb-drop-zone'); + if (dropZone) { + dropZone.style.zIndex = 0; + } + return false; + }, false); } }; });
1
diff --git a/packages/mjml-validator/src/dependencies.js b/packages/mjml-validator/src/dependencies.js -import merge from 'lodash/merge' +import { mergeWith, isArray } from 'lodash' + +function mergeArrays(objValue, srcValue) { + if (isArray(objValue) && isArray(srcValue)) { + return objValue.concat(srcValue) + } +} const dependencies = {} -export const registerDependencies = dep => merge(dependencies, dep) +export const registerDependencies = dep => mergeWith(dependencies, dep, mergeArrays) export default dependencies
11