code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/test/player_integration.js b/test/player_integration.js @@ -166,8 +166,13 @@ describe('Player', function() { describe('plays', function() { it('while external text tracks', function(done) { player.load('test:sintel_no_text_compiled').then(function() { - player.addTextTrack('/base/test/test/assets/text-clip.vtt', 'en', - 'subtitles', 'text/vtt'); + // For some reason, using path-absolute URLs (i.e. without the hostname) + // like this doesn't work on Safari. So manually resolve the URL. + var locationUri = new goog.Uri(location.href); + var partialUri = new goog.Uri('/base/test/test/assets/text-clip.vtt'); + var absoluteUri = locationUri.resolve(partialUri); + player.addTextTrack(absoluteUri.toString(), 'en', 'subtitles', + 'text/vtt'); video.play(); return Util.delay(5);
1
diff --git a/source/light/contracts/Light.sol b/source/light/contracts/Light.sol @@ -68,7 +68,7 @@ contract Light is ILight, Ownable { uint256 public signerFee; uint256 public conditionalSignerFee; // size of fixed array that holds max returning error messages - uint256 internal constant MAX_ERROR_COUNT = 8; + uint256 internal constant MAX_ERROR_COUNT = 6; /** * @notice Double mapping of signers to nonce groups to nonce states @@ -190,33 +190,20 @@ contract Light is ILight, Ownable { } } //accounts & balances check - uint256 senderBalance = IERC20(details.senderToken).balanceOf( - details.senderWallet - ); uint256 signerBalance = IERC20(details.signerToken).balanceOf( details.signerWallet ); - uint256 senderAllowance = IERC20(details.senderToken).allowance( - details.senderWallet, - address(this) - ); + uint256 signerAllowance = IERC20(details.signerToken).allowance( details.signerWallet, address(this) ); - if (senderAllowance < details.senderAmount) { - errors[errCount] = "SENDER_ALLOWANCE_LOW"; - errCount++; - } if (signerAllowance < details.signerAmount + swapFee) { errors[errCount] = "SIGNER_ALLOWANCE_LOW"; errCount++; } - if (senderBalance < details.senderAmount) { - errors[errCount] = "SENDER_BALANCE_LOW"; - errCount++; - } + if (signerBalance < details.signerAmount + swapFee) { errors[errCount] = "SIGNER_BALANCE_LOW"; errCount++;
2
diff --git a/edit.js b/edit.js @@ -633,6 +633,25 @@ document.getElementById('export-scene-button').addEventListener('click', async e }); downloadFile(b, 'scene.wbn'); }); +const _makeLoadMesh = (() => { + const geometry = new THREE.RingBufferGeometry(0.08, 0.1, 6, 0, 0, Math.PI*2*0.9); + const material = new THREE.MeshBasicMaterial({ + color: 0xef5350, + side: THREE.DoubleSide, + }); + return() => { + const mesh = new THREE.Mesh(geometry, material); + // mesh.frustumCulled = false; + return mesh; + }; +})(); +const _ensureLoadMesh = p => { + if (!p.loadMesh) { + p.loadMesh = _makeLoadMesh(); + p.loadMesh.matrix.copy(p.matrix).decompose(p.loadMesh.position, p.loadMesh.quaternion, p.loadMesh.scale); + scene.add(p.loadMesh); + } +}; const _ensurePlaceholdMesh = p => { if (!p.placeholderBox) { p.placeholderBox = _makeTargetMesh(); @@ -706,6 +725,7 @@ const _packageadd = async e => { reason, } = e.data; + _ensureLoadMesh(p); _ensurePlaceholdMesh(p); await _ensureVolumeMesh(p); _renderObjects(); @@ -723,6 +743,10 @@ const _packageremove = e => { reason, } = e.data; + if (p.loadMesh) { + scene.remove(p.loadMesh); + } + if (p.placeholderBox) { scene.remove(p.placeholderBox); }
0
diff --git a/doc/developer-center/auth-api/guides/03-types-of-API-Keys.md b/doc/developer-center/auth-api/guides/03-types-of-API-Keys.md @@ -17,8 +17,9 @@ For example one API key can provide access to: - the SQL API - the World_Population dataset with select permission - the Liked_Cities dataset with select/insert permissions +- The privilege of creating new datasets in the user account -With this API Key you can access the SQL API but not the Maps API. You also can run a `SELECT SQL` query to the `World_Population` dataset, but not an `UPDATE`, `DELETE` or `INSERT`. Nevertheless, you can run an `INSERT` to the `Liked_Cities` dataset. Access to the dataset `National_Incomes` is denied. +With this API Key you can access the SQL API but not the Maps API. You also can run a `SELECT SQL` query to the `World_Population` dataset, but not an `UPDATE`, `DELETE` or `INSERT`. Nevertheless, you can run an `INSERT` to the `Liked_Cities` dataset. Access to the dataset `National_Incomes` is denied. Last but not least you can run `CREATE TABLE AS...` SQL queries to create new tables in the user account. It's possible to create as many regular API Keys as you want. Moreover, to enforce security, we encourage you to create as many regular API Keys as apps/maps you produce. Since regular API Keys can be independently revoked, you have complete control of the lifecycle of your API credentials.
3
diff --git a/src/utils/class.js b/src/utils/class.js @@ -7,6 +7,7 @@ class SwiperClass { // Events self.eventsListeners = {}; + self.allEventsListeners = []; if (self.params && self.params.on) { Object.keys(self.params.on).forEach((eventName) => { @@ -26,6 +27,26 @@ class SwiperClass { return self; } + onEvent(handler, priority) { + const self = this; + if (typeof handler !== 'function') return self; + const method = priority ? 'unshift' : 'push'; + if (self.allEventsListeners.indexOf(handler) < 0) { + self.allEventsListeners[method](handler); + } + return self; + } + + offEvent(handler) { + const self = this; + if (!self.allEventsListeners) return self; + const index = self.allEventsListeners.indexOf(handler); + if (index >= 0) { + self.allEventsListeners.splice(index, 1); + } + return self; + } + once(events, handler, priority) { const self = this; if (typeof handler !== 'function') return self; @@ -77,6 +98,11 @@ class SwiperClass { } const eventsArray = Array.isArray(events) ? events : events.split(' '); eventsArray.forEach((event) => { + if (self.allEventsListeners && self.allEventsListeners.length) { + self.allEventsListeners.forEach((allHandler) => { + allHandler.apply(context, [event, ...data]); + }); + } if (self.eventsListeners && self.eventsListeners[event]) { const handlers = []; self.eventsListeners[event].forEach((eventHandler) => {
0
diff --git a/scripts/helpers/injectDependencies.js b/scripts/helpers/injectDependencies.js @@ -5,7 +5,8 @@ const docHead = document.querySelector('head'); const injectScript = Array .from(document.querySelectorAll('script')) - .find(domEl => domEl.getAttribute('src').endsWith('injectDependencies.js')); + .find(domEl => domEl.getAttribute('src') + && domEl.getAttribute('src').endsWith('injectDependencies.js')); const polyfillScript = document.createElement('script'); polyfillScript.src = '../../../polyfills/webcomponents-bundle-2.0.2.js';
7
diff --git a/doc/DEVELOPMENT_NOTES.md b/doc/DEVELOPMENT_NOTES.md @@ -26,6 +26,7 @@ v4l2-ctl --list-devices ## Stuff to do with releasing a new version +- Make sure that config.json has the TO_REPLACE_VIDEO_INPUT, TO_REPLACE_VIDEO_INPUT values - Set correct version in package.json - Set correct VERSION in /docker/run-jetson/install-opendatacam.sh - Tag version on github
1
diff --git a/.circleci/config.yml b/.circleci/config.yml @@ -52,6 +52,8 @@ jobs: - run: name: Creator Dashboard stories command: scripts/storybook.sh unlock-app "$CIRCLE_BRANCH" + environment: + CHROMATIC_APP_CODE: swpc6wf70qp smart-contracts-tests: machine: true
12
diff --git a/packages/diffhtml-components/lib/render-component.js b/packages/diffhtml-components/lib/render-component.js @@ -23,8 +23,8 @@ const { createTree } = diff; * @returns {VTree | null} */ export default function renderComponent(vTree, transaction) { - const RawComponent = vTree.rawNodeName; const props = vTree.attributes; + const RawComponent = vTree.rawNodeName; const isNewable = RawComponent.prototype && RawComponent.prototype.render; /** @type {VTree|null} */ @@ -106,7 +106,9 @@ export default function renderComponent(vTree, transaction) { * @param {any} state */ render(props, state) { - return createTree(RawComponent(props, state)); + // Always render the latest `rawNodeName` of a VTree in case of + // hot-reloading the cached value above wouldn't be correct. + return createTree(vTree.rawNodeName(props, state)); } /** @type {VTree | null} */
4
diff --git a/token-metadata/0xdA6cb58A0D0C01610a29c5A65c303e13e885887C/metadata.json b/token-metadata/0xdA6cb58A0D0C01610a29c5A65c303e13e885887C/metadata.json "symbol": "CV", "address": "0xdA6cb58A0D0C01610a29c5A65c303e13e885887C", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/fixtures/browser/karma.sauce.conf.js b/fixtures/browser/karma.sauce.conf.js @@ -30,13 +30,14 @@ const customLaunchers = { browserName: 'chrome', browserVersion: 'latest', platform: 'macOS 12' - }, - slFirefox: { - base: 'SauceLabs', - browserName: 'firefox', - platform: "Windows 11", - browserVersion: 'latest' } + // TODO: https://github.com/infernojs/inferno/issues/1611 + // slFirefox: { + // base: 'SauceLabs', + // browserName: 'firefox', + // platform: "Windows 11", + // browserVersion: 'latest' + // } }; module.exports = function (config) {
8
diff --git a/lib/modules/transactionTracker/index.js b/lib/modules/transactionTracker/index.js @@ -4,6 +4,7 @@ class TransactionTracker { this.events = embark.events; this.transactions = {}; this.embark = embark; + this.startTimestamp = Date.now() / 1000; embark.events.on("block:pending:transaction", this.onPendingTransaction.bind(this)); embark.events.on("block:header", this.onBlockHeader.bind(this)); @@ -31,6 +32,19 @@ class TransactionTracker { } }); this.events.emit('blockchain:gas:oracle:new'); + this.cullOldTransactions(); + }); + } + + cullOldTransactions() { + const timeLimit = (Date.now() / 1000) - 600; // Transactions old of 10 minutes are not to be counted anymore + if (this.startTimestamp > timeLimit) { + return; + } + Object.keys(this.transactions).forEach(transactionHash => { + if (this.transactions[transactionHash].startTimestamp < timeLimit) { + delete this.transactions[transactionHash]; + } }); }
2
diff --git a/app.json b/app.json { - "name": "SpaceX-API", + "name": "SpaceX-API-Review", "scripts": { }, "env": { "formation": { }, "addons": [ - "graphenedb", - "jawsdb", - "jawsdb-maria", - "heroku-redis" ], "buildpacks": [ {
3
diff --git a/Source/Scene/ScreenSpaceCameraController.js b/Source/Scene/ScreenSpaceCameraController.js @@ -1820,14 +1820,35 @@ define([ var endPos = look3DEndPos; endPos.x = movement.endPosition.x; endPos.y = 0.0; - var start = camera.getPickRay(startPos, look3DStartRay).direction; - var end = camera.getPickRay(endPos, look3DEndRay).direction; + var startRay = camera.getPickRay(startPos, look3DStartRay); + var endRay = camera.getPickRay(endPos, look3DEndRay); var angle = 0.0; + var start; + var end; + + if (camera.frustum instanceof OrthographicFrustum) { + start = startRay.origin; + end = endRay.origin; + + Cartesian3.add(camera.direction, start, start); + Cartesian3.add(camera.direction, end, end); + + Cartesian3.subtract(start, camera.position, start); + Cartesian3.subtract(end, camera.position, end); + + Cartesian3.normalize(start, start); + Cartesian3.normalize(end, end); + } else { + start = startRay.direction; + end = endRay.direction; + } + var dot = Cartesian3.dot(start, end); if (dot < 1.0) { // dot is in [0, 1] angle = Math.acos(dot); } + angle = (movement.startPosition.x > movement.endPosition.x) ? -angle : angle; var horizontalRotationAxis = controller._horizontalRotationAxis; @@ -1843,10 +1864,28 @@ define([ startPos.y = movement.startPosition.y; endPos.x = 0.0; endPos.y = movement.endPosition.y; - start = camera.getPickRay(startPos, look3DStartRay).direction; - end = camera.getPickRay(endPos, look3DEndRay).direction; + startRay = camera.getPickRay(startPos, look3DStartRay); + endRay = camera.getPickRay(endPos, look3DEndRay); angle = 0.0; + + if (camera.frustum instanceof OrthographicFrustum) { + start = startRay.origin; + end = endRay.origin; + + Cartesian3.add(camera.direction, start, start); + Cartesian3.add(camera.direction, end, end); + + Cartesian3.subtract(start, camera.position, start); + Cartesian3.subtract(end, camera.position, end); + + Cartesian3.normalize(start, start); + Cartesian3.normalize(end, end); + } else { + start = startRay.direction; + end = endRay.direction; + } + dot = Cartesian3.dot(start, end); if (dot < 1.0) { // dot is in [0, 1] angle = Math.acos(dot);
1
diff --git a/lib/process-manager.js b/lib/process-manager.js @@ -58,8 +58,8 @@ ProcessManager.prototype.getChild = function(moduleName) { ProcessManager.prototype.removeChild = function(moduleName) { var self = this; _.each(this.children, function(child, index) { - if (child.moduleName === moduleName) { - delete self.children[index]; + if (typeof child === 'object' && child.moduleName === moduleName) { + delete self.children[index] } }); };
8
diff --git a/core/src/navigation/LeftNav.html b/core/src/navigation/LeftNav.html 0 2px 8px 0 var(--fd-color-neutral-2) ); border: 1px solid var(--fd-color-neutral-3); - background: white; opacity: 0; animation-name: flyoutAnimation; animation-duration: 0.3s; animation-fill-mode: forwards; + .lui-flyout-sublist__title { + background: var(--sapList_Background,#fff); + } @-webkit-keyframes flyoutAnimation { 0% {
14
diff --git a/shared/middlewares/security.js b/shared/middlewares/security.js @@ -78,7 +78,7 @@ function securityMiddleware( // Defines the origins from which images can be loaded. // @note: Leave open to all images, too much image coming from different servers. - imgSrc: ['https:', 'http:'], + imgSrc: ['https:', 'http:', "'self'", 'data:'], // Defines valid sources of stylesheets. styleSrc: ["'self'", "'unsafe-inline'"],
11
diff --git a/docs/.eleventy.js b/docs/.eleventy.js @@ -77,8 +77,9 @@ module.exports = function (eleventyConfig) { // } // }); + eleventyConfig.on('beforeWatch', () => { - child_process.execSync('cat docs/* > index.md').toString('UTF-8') + child_process.execSync('cat docs/* > index.md', { encoding: 'utf8'} ) }); eleventyConfig.addPlugin(syntaxHighlight); eleventyConfig.addPlugin(pluginTOC, {
4
diff --git a/src/pages/tag.js b/src/pages/tag.js @@ -33,25 +33,18 @@ export default class TagShop extends Component { return ( <Helmet> <title>{pageTitle}</title> - <meta name="description" content={shop.description} /> + <meta name="description" content={shop && shop.description} /> </Helmet> ); } render() { - const { shop } = this.props; - const meta = { - description: shop.description, - siteName: shop.name, - title: shop.name - }; + const { catalogItems } = this.props; return ( <Layout title="Reaction Shop"> {this.renderHelmet()} - <FacebookSocial meta={meta} /> - <TwitterSocial meta={meta} /> - <ProductGrid catalogItems={this.props.catalogItems} /> + <ProductGrid catalogItems={catalogItems} /> </Layout> ); }
2
diff --git a/src/components/selections/select.js b/src/components/selections/select.js @@ -377,6 +377,8 @@ function prepSelect(evt, startX, startY, dragOptions, mode) { throttle.done(throttleID).then(function() { throttle.clear(throttleID); + // Only points selected by the new selection are presented in eventData here + // Should we provide all the selected points instead? dragOptions.gd.emit('plotly_selected', eventData); if(!immediateSelect && currentPolygon && dragOptions.selectionDefs) {
0
diff --git a/mesh-lodder.js b/mesh-lodder.js @@ -5,6 +5,7 @@ import {alea} from './procgen/procgen.js'; // import {getRenderer} from './renderer.js'; import {mod, modUv, getNextPhysicsId} from './util.js'; import physicsManager from './physics-manager.js'; +import * as BufferGeometryUtils from 'three/examples/jsm/utils/BufferGeometryUtils.js'; const bufferSize = 2 * 1024 * 1024; const chunkWorldSize = 30; @@ -506,11 +507,67 @@ class MeshLodder { start: indexIndex, count: g.index.count, }, + cloneItemDiceMesh: () => { + const geometry = g.clone(); + + const planePosition = new THREE.Vector3(0, 0, 0); + const planeQuaternion = new THREE.Quaternion(0, 1, 0, 0); + const planeScale = new THREE.Vector3(1, 1, 1); + + planeQuaternion.setFromAxisAngle(new THREE.Vector3(1, 0, 0), -Math.PI*0.2); + + const res = physicsManager.cutMesh( + geometry.attributes.position.array, + geometry.attributes.position.count * 3, + geometry.attributes.normal.array, + geometry.attributes.normal.count * 3, + geometry.attributes.uv.array, + geometry.attributes.uv.count * 2, + geometry.index.array, + geometry.index.count, + planePosition, + planeQuaternion, + planeScale + ); + const { + numOutNormals, + numOutPositions, + numOutUvs, + // numOutIndices, + outNormals, + outPositions, + outUvs, + // outIndices, + } = res; + + const geometries = [ + new THREE.BufferGeometry(), + new THREE.BufferGeometry(), + ]; + for (let n = 0; n < geometries.length; n++) { + const positions = new Float32Array(numOutPositions[n]); + const normals = new Float32Array(numOutNormals[n]); + const uvs = new Float32Array(numOutUvs[n]); + + const startPositions = n === 0 ? 0 : numOutPositions[n-1]; + positions.set(outPositions.subarray(startPositions, startPositions + numOutPositions[n])); + const startNormals = n === 0 ? 0 : numOutNormals[n-1]; + normals.set(outNormals.subarray(startNormals, startNormals + numOutNormals[n])); + const startUvs = n === 0 ? 0 : numOutUvs[n-1]; + uvs.set(outUvs.subarray(startUvs, startUvs + numOutUvs[n])); + + const localGeometry = geometries[n]; + localGeometry.setAttribute('position', new THREE.BufferAttribute(positions, 3)); + localGeometry.setAttribute('normal', new THREE.BufferAttribute(normals, 3)); + localGeometry.setAttribute('uv', new THREE.BufferAttribute(uvs, 2)); + } + return BufferGeometryUtils.mergeBufferGeometries(geometries); + }, cloneItemMesh: () => { const geometry = g.clone(); - _mapUvs(g, geometry, 'originalUv', 'uv', 0, g.attributes.originalUv.count); - _mapUvs(g, geometry, 'originalUv2', 'uv2', 0, g.attributes.originalUv2.count); + _mapUvs(g.attributes.originalUv, geometry.attributes.uv, 0, g.attributes.originalUv.count); + _mapUvs(g.attributes.originalUv2, geometry.attributes.uv2, 0, g.attributes.originalUv2.count); const {material} = this; const cloned = new THREE.Mesh(geometry, material);
0
diff --git a/modules/@apostrophecms/page-type/index.js b/modules/@apostrophecms/page-type/index.js @@ -392,6 +392,9 @@ module.exports = { }, extendMethods(self) { return { + enableAction() { + self.action = self.apos.modules['@apostrophecms/page'].action; + }, copyForPublication(_super, req, from, to) { _super(req, from, to); const newMode = to.aposLocale.endsWith(':published') ? ':published' : ':draft';
12
diff --git a/codegens/java-okhttp/lib/parseRequest.js b/codegens/java-okhttp/lib/parseRequest.js @@ -85,8 +85,11 @@ function parseBody (requestBody, indentString, trimFields) { variables: graphqlVariables }), trimFields)}");\n`; case 'formdata': - return 'RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)\n' + - `${parseFormData(requestBody, indentString, trimFields)};\n`; + return requestBody.formdata.length ? + 'RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)\n' + + `${parseFormData(requestBody, indentString, trimFields)};\n` : + 'MediaType JSON = MediaType.parse("application/json; charset=utf-8");\n' + + 'RequestBody body = RequestBody.create(JSON, "{}");\n'; /* istanbul ignore next */ case 'file': // return 'RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)\n' +
9
diff --git a/src/lib/client.js b/src/lib/client.js @@ -72,7 +72,7 @@ StreamClient.prototype = { this.appId = appId; this.options = options; this.version = this.options.version || 'v1.0'; - this.fayeUrl = this.options.fayeUrl || 'https://faye.getstream.io/faye'; + this.fayeUrl = this.options.fayeUrl || 'https://faye-us-east.stream-io-api.com/faye'; this.fayeClient = null; this.request = request; // track a source name for the api calls, ie get started or databrowser
4
diff --git a/src/content/developers/docs/evm/index.md b/src/content/developers/docs/evm/index.md @@ -60,7 +60,7 @@ Over Ethereum's 5 year history, the EVM has undergone several revisions, and the All [Ethereum clients](/developers/docs/nodes-and-clients/#clients) include an EVM implementation. Additionally there are multiple standalone implementations, including: - [Py-EVM](https://github.com/ethereum/py-evm) - _Python_ -- [EVMC](https://github.com/ethereum/evmc) - _C++, C_ +- [evmone](https://github.com/ethereum/evmone) - _C++_ - [ethereumjs-vm](https://github.com/ethereumjs/ethereumjs-vm) - _JavaScript_ - [eEVM](https://github.com/microsoft/eevm) - _C++_ - [Hyperledger Burrow](https://github.com/hyperledger/burrow) - _Go_
14
diff --git a/assets/js/googlesitekit/data/create-fetch-store.js b/assets/js/googlesitekit/data/create-fetch-store.js @@ -26,6 +26,14 @@ import invariant from 'invariant'; */ import { stringifyObject } from '../../util'; +const defaultReducerCallback = ( state ) => { + return { ...state }; +}; + +const defaultArgsToParams = () => { + return {}; +}; + /** * Creates a store object implementing the necessary infrastructure for a * single fetch action. @@ -79,24 +87,22 @@ import { stringifyObject } from '../../util'; export const createFetchStore = ( { baseName, controlCallback, - reducerCallback, - argsToParams, + reducerCallback = defaultReducerCallback, + argsToParams = defaultArgsToParams, } ) => { invariant( baseName, 'baseName is required.' ); - invariant( 'function' === typeof controlCallback, 'controlCallback is required.' ); + invariant( 'function' === typeof controlCallback, 'controlCallback is required and must be a function.' ); + invariant( 'function' === typeof reducerCallback, 'reducerCallback must be a function.' ); + invariant( 'function' === typeof argsToParams, 'argsToParams must be a function.' ); - if ( 'function' !== typeof reducerCallback ) { - reducerCallback = ( state ) => { - return { ...state }; - }; - } - - let requiresParams = true; - if ( 'function' !== typeof argsToParams ) { + // If argsToParams without any arguments does not result in an error, we + // know params is okay to be empty. + let requiresParams; + try { + argsToParams(); requiresParams = false; - argsToParams = () => { - return {}; - }; + } catch ( error ) { + requiresParams = true; } const pascalCaseBaseName = baseName.charAt( 0 ).toUpperCase() + baseName.slice( 1 );
7
diff --git a/README.md b/README.md Check the stack and try it online [https://ng-fullstack.surge.sh](https://ng-fullstack.surge.sh). - -### Dependencies - -You'll need the latest version of `Node.js` and `npm`. You'll also need `yo` installed globally. - ### Getting Started If you already have Node/Go setup, all you have to do is run:
2
diff --git a/src/pages/settings/Profile/LoginField.js b/src/pages/settings/Profile/LoginField.js @@ -41,6 +41,7 @@ class LoginField extends Component { }; this.timeout = null; this.onResendClicked = this.onResendClicked.bind(this); + this.getTitle = this.getTitle.bind(this); } /** @@ -63,6 +64,17 @@ class LoginField extends Component { } } + getTitle() { + if(!this.props.login.partnerUserID) { + return this.props.label; + } + if (this.props.type === CONST.LOGIN_TYPE.PHONE) { + return this.props.toLocalPhone(this.props.login.partnerUserID); + } else { + return this.props.login.partnerUserID; + } + } + render() { let note; if (this.props.login.partnerUserID && !this.props.login.validatedDate) { @@ -81,9 +93,7 @@ class LoginField extends Component { {!this.props.login.partnerUserID || this.props.login.validatedDate ? ( <View style={[styles.mln8, styles.mrn8]}> <MenuItemWithTopDescription - title={this.props.login.partnerUserID ? (this.props.type === CONST.LOGIN_TYPE.PHONE - ? this.props.toLocalPhone(this.props.login.partnerUserID) - : this.props.login.partnerUserID) : this.props.label} + title={this.getTitle()} description={this.props.login.partnerUserID ? this.props.label : undefined} interactive={Boolean(!this.props.login.partnerUserID)} onPress={this.props.login.partnerUserID ? () => { } : () => Navigation.navigate(ROUTES.getSettingsAddLoginRoute(this.props.type))}
7
diff --git a/src/components/CheckoutButtons/CheckoutButtons.js b/src/components/CheckoutButtons/CheckoutButtons.js @@ -9,10 +9,6 @@ export default class CheckoutButtons extends Component { * Set to `true` to prevent the button from calling `onClick` when clicked */ isDisabled: PropTypes.bool, - /** - * On click function to pass to the Button component. Not handled internally, directly passed - */ - onClick: PropTypes.func.isRequired, /** * The NextJS route name for the primary checkout button. */ @@ -32,10 +28,6 @@ export default class CheckoutButtons extends Component { primaryButtonText: "Checkout" }; - handleOnClick = () => { - this.props.onClick(); - } - render() { const { isDisabled, @@ -52,7 +44,6 @@ export default class CheckoutButtons extends Component { actionType="important" className={primaryClassName} isDisabled={isDisabled} - onClick={this.handleOnClick} isFullWidth > {primaryButtonText}
2
diff --git a/package.json b/package.json { "name": "grid-apps", - "version": "2.4.4.D", + "version": "2.4.4D", "description": "grid.space 3d slice & modeling tools", "author": "Stewart Allen <[email protected]>", "license": "MIT", "earcut": "^2.2.2", "express-useragent": "^1.0.13", "level": "^6.0.1", - "leveldown": "^5.5.1", - "levelup": "^4.3.2", + "leveldown": "^5.6.0", + "levelup": "^4.4.0", "moment": "^2.24.0", "pixi.js": "^4.8.9", "serve-static": "^1.14.1", "three": "^0.122.0", "tween.js": "^0.14.0", - "uglify-es": "^3.3.10", + "uglify-es": "3.3.9", "validator": "^8.2.0", "ws": "^7.2.3" }
3
diff --git a/core/task-executor/lib/helpers/kubernetes.js b/core/task-executor/lib/helpers/kubernetes.js @@ -34,7 +34,7 @@ class KubernetesApi { return res; } catch (error) { - log.error(`unable to create job ${spec.metadata.name}. error: ${error.message}`, { component }, error); + log.throttle.error(`unable to create job ${spec.metadata.name}. error: ${error.message}`, { component }, error); } return null; }
0
diff --git a/lib/plugins/crux/pug/index.pug b/lib/plugins/crux/pug/index.pug @@ -43,6 +43,8 @@ if experiences if (crux[experience][formFactor] && crux[experience][formFactor].data) a(id=experience + '-' + formFactor) h3 Form Factor #{formFactor} + - const collectionPeriod = crux[experience][formFactor].data.record.collectionPeriod; + p Data collected between #{collectionPeriod.firstDate.year}-#{collectionPeriod.firstDate.month}-#{collectionPeriod.firstDate.day} and #{collectionPeriod.lastDate.year}-#{collectionPeriod.lastDate.month}-#{collectionPeriod.lastDate.day} table thead tr
4
diff --git a/src/inner-slider.js b/src/inner-slider.js @@ -368,7 +368,9 @@ export class InnerSlider extends React.Component { window.ontouchmove = null } swipeStart = (e) => { + if (this.props.verticalSwiping) { this.disableBodyScroll() + } let state = swipeStart(e, this.props.swipe, this.props.draggable) state !== '' && this.setState(state) } @@ -400,8 +402,10 @@ export class InnerSlider extends React.Component { this.setState(state) if (triggerSlideHandler === undefined) return this.slideHandler(triggerSlideHandler) + if (this.props.verticalSwiping) { this.enableBodyScroll() } + } slickPrev = () => { // this and fellow methods are wrapped in setTimeout // to make sure initialize setState has happened before
1
diff --git a/test/index.js b/test/index.js @@ -58,7 +58,8 @@ async function createPostGISRaster ({ name = TEST_DB } = {}) { const { stdout } = await exec(getPostGISVersionCmd, { env: Object.assign({ PGUSER }, process.env) }); - const postgisVersion = stdout.trim(); + + const { version: postgisVersion } = semver.coerce(stdout.trim()); if (semver.lt(postgisVersion, '3.0.0')) { return;
11
diff --git a/tools/make/lib/addons/Makefile b/tools/make/lib/addons/Makefile @@ -10,6 +10,15 @@ NODE_GYP ?= $(BIN_DIR)/node-gyp # Define command-line options when invoking node-gyp. NODE_GYP_FLAGS ?= +NODE_GYP_FLAGS += -Dfortran_compiler=$(FC) + +ifneq (, $(BLAS)) + NODE_GYP_FLAGS += -Dblas=$(BLAS) +ifneq (, $(BLAS_DIR)) + NODE_GYP_FLAGS += -Dblas_dir=$(BLAS_DIR) +endif +endif + # TARGETS # @@ -24,13 +33,7 @@ install-addons: clean-addons fi; \ echo ''; \ echo "Building add-on: $$pkg"; \ - cd $$pkg && \ - FC=$(FC) \ - fPIC=$(fPIC) \ - BLAS=$(BLAS) \ - BLAS_DIR=$(BLAS_DIR) \ - $(NODE_GYP) $(NODE_GYP_FLAGS) rebuild \ - || exit 1; \ + cd $$pkg && $(NODE_GYP) $(NODE_GYP_FLAGS) rebuild || exit 1; \ done .PHONY: install-addons @@ -47,11 +50,8 @@ clean-addons: fi; \ echo ''; \ echo "Cleaning add-on: $$pkg"; \ - cd $$pkg/src && \ - $(MAKE) clean && \ - cd $$pkg && \ - $(NODE_GYP) $(NODE_GYP_FLAGS) clean \ - || exit 1; \ + cd $$pkg/src && $(MAKE) clean && \ + cd $$pkg && $(NODE_GYP) clean || exit 1; \ done .PHONY: clean-addons
12
diff --git a/assets/js/modules/analytics/components/dashboard/DashboardOverallPageMetricsWidget.js b/assets/js/modules/analytics/components/dashboard/DashboardOverallPageMetricsWidget.js @@ -196,7 +196,7 @@ function calculateOverallPageMetricsData( report ) { const lastMonth = totals[ 0 ]?.values || []; const previousMonth = totals[ 1 ]?.values || []; - Object.values( metricsData ).forEach( ( metricData, index ) => { + metricsData.forEach( ( metricData, index ) => { // We only want half the date range, having a comparison date range in the query doubles the range. for ( let i = Math.ceil( rows.length / 2 ); i < rows.length; i++ ) { const { values } = rows[ i ].metrics[ 0 ];
2
diff --git a/shared/js/ui/templates/site.es6.js b/shared/js/ui/templates/site.es6.js @@ -2,6 +2,7 @@ const bel = require('bel') const toggleButton = require('./shared/toggle-button.es6.js') const ratingHero = require('./shared/rating-hero.es6.js') const trackerNetworksIcon = require('./shared/tracker-network-icon.es6.js') +const trackerNetworksText = require('./shared/tracker-networks-text.es6.js') module.exports = function () { const tosdrMsg = (this.model.tosdr && this.model.tosdr.message) || @@ -39,10 +40,7 @@ module.exports = function () { </li> <li class="site-info__li--trackers padded border--bottom"> <a href="#" class="js-site-tracker-networks link-secondary bold"> - ${renderTrackerNetworks( - this.model.siteRating, - this.model.totalTrackersCount, - this.model.isWhitelisted)} + ${renderTrackerNetworks(this.model)} </a> </li> <li class="site-info__li--privacy-practices padded border--bottom"> @@ -57,15 +55,13 @@ module.exports = function () { </ul> </section>` - function renderTrackerNetworks (site, trackersCount, isWhitelisted) { - const isActive = !isWhitelisted ? 'is-active' : '' - const foundOrBlocked = isWhitelisted || trackersCount === 0 ? 'Found' : 'Blocked' - const networkOrNetworks = (trackersCount === 1) ? 'Network' : 'Networks' + function renderTrackerNetworks (model) { + const isActive = !model.isWhitelisted ? 'is-active' : '' return bel`<a href="#" class="js-site-show-page-trackers site-info__trackers link-secondary bold"> <span class="site-info__trackers-status__icon - icon-${trackerNetworksIcon(site, isWhitelisted)}"></span> - <span class="${isActive} text-line-after-icon"> ${trackersCount} Tracker ${networkOrNetworks} ${foundOrBlocked}</span> + icon-${trackerNetworksIcon(model.siteRating, model.isWhitelisted)}"></span> + <span class="${isActive} text-line-after-icon"> ${trackerNetworksText(model)} </span> <span class="icon icon__arrow pull-right"></span> </a>` }
4
diff --git a/packages/volto-slate/src/editor/config.jsx b/packages/volto-slate/src/editor/config.jsx @@ -337,4 +337,4 @@ export const runtimeDecorators = [highlightSelection]; // , highlightByType export const allowedHeadlineElements = ['em', 'i']; // Scroll into view when typing -export const scrollIntoView = false; +export const scrollIntoView = true;
12
diff --git a/test/tests-collection.js b/test/tests-collection.js @@ -622,6 +622,10 @@ asyncTest("Promise chain from within each() operation", 2, function () { }); promisedTest("Issue 1381: Collection.filter().primaryKeys() on virtual index", async () => { + if (!supports("compound")) { + ok(true, "Skipping this test as the browser does not support compound indexes"); + return; + } // The original repro: https://jsitor.com/qPJXVESEcb failed when using Collection.delete(). // Debugging it led me to that there is a general problem with virtual cursor's primaryKey property. // So that's what we're testing here:
8
diff --git a/src/model/immutable/DraftBlockRenderConfig.js b/src/model/immutable/DraftBlockRenderConfig.js 'use strict'; -const React = require('React'); +import type React from 'React'; export type DraftBlockRenderConfig = { element: string, wrapper?: React.Node, aliasedElements?: Array<string>, - ... };
7
diff --git a/assets/js/components/setup/CompatibilityChecks/index.test.js b/assets/js/components/setup/CompatibilityChecks/index.test.js @@ -96,9 +96,6 @@ describe( 'CompatibilityChecks', () => { // Expect neither error nor incomplete text to be displayed. expect( container ).toHaveTextContent( 'Your site may not be ready for Site Kit' ); - - // Expect a Google Site Kit API Error. - expect( console ).toHaveErrored(); } ); it( 'should make API requests to "setup-checks, health-checks and AMP Project test URL', async () => {
2
diff --git a/factory-ai-vision/EdgeSolution/modules/WebModule/ui/src/components/LabelingPage/Scene.tsx b/factory-ai-vision/EdgeSolution/modules/WebModule/ui/src/components/LabelingPage/Scene.tsx import React, { FC, useState, useEffect, useCallback, useRef, Dispatch, useMemo } from 'react'; -import { Text, Button, CloseIcon } from '@fluentui/react-northstar'; -import { Stage, Layer, Image, Group } from 'react-konva'; +import { Button, CloseIcon } from '@fluentui/react-northstar'; +import { Stage, Layer, Image, Group, Text as KonvaText } from 'react-konva'; import { KonvaEventObject } from 'konva/types/Node'; import { useDispatch } from 'react-redux'; @@ -111,12 +111,7 @@ const Scene: FC<SceneProps> = ({ url = '', labelingType, annotations, workState, scale.current = outcomeScale; }, [size, resizeImage]); - if (status === 'loading' || (imageSize.height === 0 && imageSize.width === 0)) - return ( - <Text align="center" color="red"> - Loading... - </Text> - ); + const isLoading = status === 'loading' || (imageSize.height === 0 && imageSize.width === 0); return ( <div style={{ margin: '0.2em' }}> @@ -151,7 +146,8 @@ const Scene: FC<SceneProps> = ({ url = '', labelingType, annotations, workState, }} > <Image image={image} /> - {annotations.map((annotation, i) => ( + {!isLoading && + annotations.map((annotation, i) => ( <Group key={i}> <RemoveBoxButton imageSize={imageSize} @@ -174,6 +170,15 @@ const Scene: FC<SceneProps> = ({ url = '', labelingType, annotations, workState, /> </Group> ))} + {isLoading && ( + <KonvaText + x={imageSize.width / 2 - 50} + y={imageSize.height / 2 - 25} + fontSize={50} + text="Loading..." + fill="rgb(255, 0, 0)" + /> + )} </Layer> </Stage> </div>
7
diff --git a/docs/src/components/page-parts/umd/UmdTags.vue b/docs/src/components/page-parts/umd/UmdTags.vue @@ -128,7 +128,7 @@ export default { <body> <!-- example of injection point where you write your app template --> - <div id="q-app></div> + <div id="q-app"></div> <!-- Add the following at the end of your body tag --> ${this.body}
1
diff --git a/cypress/integration/modal_routes_spec.js b/cypress/integration/modal_routes_spec.js @@ -9,7 +9,7 @@ const communityBeforeUrlIsValid = () => const channelBeforeUrlIsValid = () => cy.url().should('eq', 'http://localhost:3000/spectrum/general?tab=posts'); -describe('thread modal route', () => { +describe.skip('thread modal route', () => { const threadSlider = () => cy.get('[data-cy="modal-container"]'); const threadSliderClose = () => cy.get('[data-cy="thread-slider-close"]');
8
diff --git a/svc/web.js b/svc/web.js @@ -58,8 +58,11 @@ app.use('/apps', (req, res) => { }); // Proxy to serve team logos over https app.use('/ugc', (req, res) => { - res.set('Content-Type', 'image/png'); - request(`http://cloud-3.steamusercontent.com/${req.originalUrl}`).pipe(res); + request(`http://cloud-3.steamusercontent.com/${req.originalUrl}`) + .on('response', (resp) => { + resp.headers['content-type'] = 'image/png'; + }) + .pipe(res); }); // Session/Passport middleware app.use(session(sessOptions));
12
diff --git a/.travis.yml b/.travis.yml @@ -38,12 +38,12 @@ branches: # Before install, failures in this section will result in build status 'errored' before_install: - | - if [[ "$JS" == "1" ]] || [[ "$E2E" == "1" ]] || [[ "$SNIFF" == "1" ]]; then + if [[ "$JS" == "1" ]] || [[ "$E2E" == "1" ]]; then nvm install npm ci fi - | - if [[ "$PHP" == "1" ]] || [[ "$E2E" == "1" ]] || [[ "$SNIFF" == "1" ]]; then + if [[ "$PHP" == "1" ]] || [[ "$E2E" == "1" ]]; then docker run --rm -v "$PWD:/app" -v "$HOME/.cache/composer:/tmp/cache" composer install fi - | @@ -57,12 +57,6 @@ before_install: fi script: - - | - if [[ "$SNIFF" == "1" ]]; then - composer lint || exit 1 - npm run lint:js || exit 1 - npm run lint:css || exit 1 - fi - | if [[ "$JS" == "1" ]]; then npm run test:js || exit 1 # JS unit tests @@ -86,9 +80,6 @@ jobs: - env: PHP=1 WP_VERSION=nightly - env: E2E=1 WP_VERSION=nightly include: - - name: Lint - php: 7.4 - env: SNIFF=1 WP_VERSION=4.7 PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true - name: PHP Tests (PHP 5.6, WordPress 4.7) php: 5.6 env: PHP=1 WP_VERSION=4.7
2
diff --git a/src/pages/home/sidebar/ChatSwitcherView.js b/src/pages/home/sidebar/ChatSwitcherView.js @@ -359,7 +359,9 @@ class ChatSwitcherView extends React.Component { .map(report => ({ text: report.reportName, alternateText: report.reportName, - searchText: report.reportName ?? '', + searchText: report.participants.length < 10 + ? `${report.reportName} ${report.participants.join(' ')}` + : report.reportName ?? '', reportID: report.reportID, type: OPTION_TYPE.REPORT, participants: report.participants,
11
diff --git a/src/components/Story/StoryLoading.less b/src/components/Story/StoryLoading.less .StoryLoading { position: relative; - border-radius: 4px; background-color: @white; color: #353535; - border: solid 1px #e9e7e7; + border-top: solid 1px #e9e7e7; + border-bottom: solid 1px #e9e7e7; margin-bottom: 12px; + @media @small { + border-radius: 4px; + border: solid 1px #e9e7e7; + } + &:not(:first-child) { margin-top: 12px; }
1
diff --git a/bin/near-cli.js b/bin/near-cli.js @@ -34,7 +34,7 @@ const deleteAccount = { desc: 'delete an account and transfer funds to beneficiary account.', builder: (yargs) => yargs .option('accountId', { - desc: 'Account to view', + desc: 'Account to delete', type: 'string', required: true })
1
diff --git a/src/pages/using-spark/components/input.mdx b/src/pages/using-spark/components/input.mdx @@ -117,7 +117,7 @@ used for stand-alone question flows. - A list of two to six options, each with a concise label, all the same size. <ComponentPreview - componentName="input-huge-checkbox--default-story" + componentName="input-checkbox--huge" hasHTML hasAngular hasReact @@ -369,7 +369,7 @@ used for stand-alone question flows. - A list of two to six options, each with a concise label, all the same size. <ComponentPreview - componentName="components-input-radio--huge" + componentName="input-radio--huge" hasHTML hasReact hasAngular
3
diff --git a/articles/sso/oidc/single-page-apps-sso.md b/articles/sso/oidc/single-page-apps-sso.md @@ -82,6 +82,29 @@ For requests received with the parameter `prompt=none`, Auth0 redirects to the ` Regardless of which outcome occurs, the sample app's [`postMessage` function](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage) sends Auth0's response from the iframe back to the main page, allowing it to act based on the response. +### Using the Auth0.js library + +Users of the `Auth0.js` library have access to [the `renewAuth` method](https://github.com/auth0/auth0.js#api), which attempts to get a new token from Auth0 by using silent authentication or invokes callback with an error if the user does not have an active SSO session at your Auth0 domain. + +This method can be used to detect a locally unauthenticated user's SSO session status, or to renew an authenticated user's access token. The actual redirect to `/authorize` happens inside an iframe, so it will not reload your application or redirect away from it. + +```js +auth0.renewAuth({ + audience: 'https://mystore.com/api/v2', + scope: 'read:order write:order', + redirectUri: 'https://example.com/auth/silent-callback', + + // this will use postMessage to comunicate between the silent callback + // and the SPA. When false the SDK will attempt to parse the url hash + // should ignore the url hash and no extra behaviour is needed. + usePostMessage: true + }, function (err, authResult) { + // Renewed tokens or error +}); +``` + +#### Run the Sample Application + When you run the sample app for the first time, you will not have a valid access token. As such, the SSO login process errors when attempting silent authentication. ![Prompt to begin silent authentication](/media/articles/sso/v2/spa/begin-silent-auth.png)
0
diff --git a/src/lib/contract/method.js b/src/lib/contract/method.js @@ -101,6 +101,11 @@ export default class Method { if (!this.contract.deployed) return callback('Calling smart contracts requires you to load the contract first'); + const {stateMutability} = this.abi; + + if (!['pure', 'view'].includes(stateMutability.toLowerCase())) + return callback(`Methods with state mutability "${stateMutability}" must use send()`); + options = { ...this.defaultOptions, from: this.tronWeb.defaultAddress.hex,
13
diff --git a/generators/generator-constants.js b/generators/generator-constants.js @@ -60,7 +60,7 @@ const DOCKER_MONGODB = 'mongo:4.2.7'; const DOCKER_COUCHBASE = 'couchbase:6.5.1'; const DOCKER_CASSANDRA = 'cassandra:3.11.5'; // issues upgrading to 3.11.6 const DOCKER_MSSQL = 'mcr.microsoft.com/mssql/server:2017-latest-ubuntu'; -const DOCKER_NEO4J = 'neo4j:4.0.4'; +const DOCKER_NEO4J = 'neo4j:4.1.0'; const DOCKER_HAZELCAST_MANAGEMENT_CENTER = 'hazelcast/management-center:3.12.9'; // waiting for https://github.com/jhipster/generator-jhipster/issues/11244 const DOCKER_MEMCACHED = 'memcached:1.6.6-alpine'; const DOCKER_REDIS = 'redis:6.0.4';
3
diff --git a/pages/search.js b/pages/search.js @@ -19,6 +19,7 @@ import Layout from '../components/Layout' import ResultsList from '../components/search/results-list' import FilterSidebar from '../components/search/filter-sidebar' import { Loader } from '../components/search/loader' +import OONI404 from '../static/images/OONI_404.svg' import { sortByKey } from '../utils' @@ -88,8 +89,23 @@ const ErrorBox = ({ error }) => { return ( <div> - <Heading h={2}>Error</Heading> - <p>{formatError(error)}</p> + <Flex justifyContent='center'> + <Box width={[1, 1/4]} my={5}> + <OONI404 /> + </Box> + </Flex> + <Flex justifyContent='center'> + <Box px={[1, 4]}> + <Heading h={4} my={4}> + We encountered an error. Please try again or change the filters to get different results. + </Heading> + <Box p={[1, 3]} bg='gray3'> + <pre> + {JSON.stringify(error, null, ' ')} + </pre> + </Box> + </Box> + </Flex> </div> ) } @@ -122,20 +138,38 @@ class Search extends React.Component { query.until = today } - [msmtR, testNamesR, countriesR] = await Promise.all([ - getMeasurements(query), + [testNamesR, countriesR] = await Promise.all([ client.get('/api/_/test_names'), client.get('/api/_/countries') ]) - const measurements = msmtR.data - let countries = countriesR.data.countries - countries.sort(sortByKey('name')) - let testNames = testNamesR.data.test_names + testNames.sort(sortByKey('name')) + let testNamesKeyed = {} testNames.forEach(v => testNamesKeyed[v.id] = v.name) - testNames.sort(sortByKey('name')) + + let countries = countriesR.data.countries + countries.sort(sortByKey('name')) + + + try { + msmtR = await getMeasurements(query) + } catch (error) { + if (error.response) { + delete error.response['request'] + } + return { + error, + results: [], + nextURL: null, + testNamesKeyed, + testNames, + countries + } + } + + const measurements = msmtR.data return { results: measurements.results, @@ -232,7 +266,8 @@ class Search extends React.Component { }) .catch((err) => { this.setState({ - error: err + error: err, + loading: false }) }) })
7
diff --git a/Source/DataSources/KmlDataSource.js b/Source/DataSources/KmlDataSource.js @@ -3521,7 +3521,7 @@ function load(dataSource, entityCollection, data, options) { * KML support in Cesium is incomplete, but a large amount of the standard, * as well as Google's <code>gx</code> extension namespace, is supported. See Github issue * {@link https://github.com/CesiumGS/cesium/issues/873|#873} for a - * detailed list of what is and isn't support. Cesium will also write information to the + * detailed list of what is and isn't supported. Cesium will also write information to the * console when it encounters most unsupported features. * </p> * <p>
1
diff --git a/spec/helpers/carto_db_spec.rb b/spec/helpers/carto_db_spec.rb @@ -28,24 +28,27 @@ describe 'CartoDB' do describe 'extract_subdomain' do it 'extracts subdomain without subdomainless_urls' do - CartoDB::Cartodb.stubs(:config).returns({ subdomainless_urls: false }) + CartoDB::Cartodb.stubs(:config).returns(subdomainless_urls: false) CartoDB.stubs(:session_domain).returns('.localhost.lan') CartoDB.extract_subdomain(OpenStruct.new(host: 'localhost.lan', params: { user_domain: '' })).should == '' + CartoDB.extract_subdomain(OpenStruct.new(host: 'localhost.lan', params: { user_domain: nil })).should == '' CartoDB.extract_subdomain(OpenStruct.new(host: 'auser.localhost.lan', params: { user_domain: 'auser' })).should == 'auser' CartoDB.extract_subdomain(OpenStruct.new(host: 'localhost.lan', params: { user_domain: 'auser' })).should == 'auser' CartoDB.extract_subdomain(OpenStruct.new(host: 'auser.localhost.lan', params: { user_domain: 'otheruser' })).should == 'otheruser' end it 'extracts subdomain with subdomainless_urls' do - CartoDB::Cartodb.stubs(:config).returns(subdomainless_urls: false) - CartoDB.stubs(:session_domain).returns('.localhost.lan') + CartoDB::Cartodb.stubs(:config).returns(subdomainless_urls: true) + CartoDB.stubs(:session_domain).returns('localhost.lan') CartoDB.extract_subdomain(OpenStruct.new(host: 'localhost.lan', params: { user_domain: '' })).should == '' + CartoDB.extract_subdomain(OpenStruct.new(host: 'localhost.lan', params: { user_domain: nil })).should == '' CartoDB.extract_subdomain(OpenStruct.new(host: 'auser.localhost.lan', params: { user_domain: 'auser' })).should == 'auser' CartoDB.extract_subdomain(OpenStruct.new(host: 'localhost.lan', params: { user_domain: 'auser' })).should == 'auser' CartoDB.extract_subdomain(OpenStruct.new(host: 'auser.localhost.lan', params: { user_domain: 'otheruser' })).should == 'otheruser' CartoDB.extract_subdomain(OpenStruct.new(host: '192.168.1.1', params: { user_domain: '' })).should == '' + CartoDB.extract_subdomain(OpenStruct.new(host: '192.168.1.1', params: { user_domain: nil })).should == '' CartoDB.extract_subdomain(OpenStruct.new(host: '192.168.1.1', params: { user_domain: 'otheruser' })).should == 'otheruser' end end
1
diff --git a/packages/slackbot-proxy/src/controllers/slack.ts b/packages/slackbot-proxy/src/controllers/slack.ts @@ -79,23 +79,19 @@ export class SlackCtrl { @Post('/commands') @UseBefore(AuthorizeCommandMiddleware) - async handleCommand(@Req() req: AuthedReq, @Res() res: Res): Promise<void|string> { + async handleCommand(@Req() req: AuthedReq, @Res() res: Res): Promise<void|string|Res> { const { body, authorizeResult } = req; if (body.text == null) { return 'No text.'; } - // Send response immediately to avoid opelation_timeout error - // See https://api.slack.com/apis/connections/events-api#the-events-api__responding-to-events - res.send(); - const growiCommand = parseSlashCommand(body); // register if (growiCommand.growiCommandType === 'register') { await this.registerService.process(growiCommand, authorizeResult, body as {[key:string]:string}); - return; + return res.send(); } /* @@ -106,6 +102,19 @@ export class SlackCtrl { const installation = await this.installationRepository.findByTeamIdOrEnterpriseId(installationId!); const relations = await this.relationRepository.find({ installation: installation?.id }); + if (relations.length === 0) { + return res.json({ + blocks: [ + generateMarkdownSectionBlock('*No relation found.*'), + generateMarkdownSectionBlock('Run `/growi register` first.'), + ], + }); + } + + // Send response immediately to avoid opelation_timeout error + // See https://api.slack.com/apis/connections/events-api#the-events-api__responding-to-events + res.send(); + const promises = relations.map((relation: Relation) => { // generate API URL const url = new URL('/_api/v3/slack-bot/commands', relation.growiUri);
9
diff --git a/app/src/renderer/components/govern/ChartVotes.vue b/app/src/renderer/components/govern/ChartVotes.vue .kv.no: .container .key No .value {{ votes.no }} - .chart-label(v-else :class="chartLabelClass") {{ chartLabel }} + .chart-legend(v-else :class="chartLabelClass") + .kv.abstain {{ votes.abstain }} + .kv.yes {{ votes.yes }} + .kv.reject {{ votes.reject }} + .kv.no {{ votes.no }} </template> <script> @@ -57,10 +61,16 @@ export default { borderWidth: 0, data: this.chartValues, backgroundColor: [ - 'hsl(120,100%,50%)', - 'hsl(30,100%,50%)', - 'hsl(0,100%,50%)', + 'hsl(0,0%,100%)', + 'hsl(233,96%,60%)', + 'hsl(326,96%,59%)', + 'hsl(233,13%,50%)' + /* + 'hsl(326,96%,59%)', + 'hsl(279,96%,62%)', + 'hsl(233,96%,65%)', 'hsl(0,0%,50%)' + */ ] } ] @@ -118,7 +128,7 @@ export default { height 4rem // border-radius 2rem - .chart-label + .chart-legend position absolute top 0 left 0 @@ -127,17 +137,26 @@ export default { height 4rem display flex + flex-flow row wrap align-items center justify-content center - font-size xl - font-weight 300 + padding 1rem + + .kv + width 1rem + height 1rem + font-size xs + font-weight 500 + text-align center + &.abstain + color dim &.yes - color success + color bright &.no - color warning + color link &.reject - color danger + color mc &.chart-votes-size-lg
3
diff --git a/src/core/createConfig.js b/src/core/createConfig.js @@ -13,7 +13,7 @@ governing permissions and limitations under the License. import { assign, getNestedObject, setNestedObject } from "../utils"; const CONFIG_DOC_URI = - "https://launch.gitbook.io/adobe-experience-platform-web-sdk/get-started/getting-started#configuration"; + "https://launch.gitbook.io/adobe-experience-platform-web-sdk/fundamentals/configuring-the-sdk"; const createConfig = config => { const cfg = {
3
diff --git a/js/webcomponents/bisweb_filetreepanel.js b/js/webcomponents/bisweb_filetreepanel.js @@ -547,11 +547,31 @@ class FileTreePanel extends HTMLElement { let handleRightClick = (data) => { + let tree = this.fileTree.jstree(true); + let existingTreeSettings = tree.settings.contextmenu.items; + let enabledButtons = { 'RenameTask': true }; + + console.log('node', tree.get_node(data.node.parent), data.node, existingTreeSettings); + //dual viewer applications have a 'load to viewer 1' and 'load to viewer 2' button instead of just one load + if (existingTreeSettings.Load) { + enabledButtons.Load = true; + } else { + enabledButtons.Viewer1 = true; + enabledButtons.Viewer2 = true; + } + if (data.node.original.type === 'directory') { - this.toggleContextMenuLoadButtons(tree, 'off'); + if (enabledButtons.Load) { + enabledButtons.Load = false; } else { - this.toggleContextMenuLoadButtons(tree, 'on'); + enabledButtons.Viewer1 = false; + enabledButtons.Viewer2 = false; } + } if (tree.get_node(data.node.parent).original.text !== 'func') { + enabledButtons.RenameTask = false; + } + + this.toggleContextMenuLoadButtons(tree, enabledButtons); }; let handleDblClick = () => { @@ -1087,9 +1107,19 @@ class FileTreePanel extends HTMLElement { } - toggleContextMenuLoadButtons(tree, toggle) { - let existingTreeSettings = tree.jstree(true).settings.contextmenu.items; - if (toggle === 'on') { + /** + * Changes the context menu buttons (right-click menu) for the file tree currently being displayed according to the keys specified in settings. + * + * @param {jstree} tree - The file tree that is currently displayed on screen. + * @param {Object} settings - An object containing the list of settings to set or unset. These keys must be identical to the keys designated for the buttons in the contextmenu. + */ + toggleContextMenuLoadButtons(tree, settings) { + let existingTreeSettings = tree.settings.contextmenu.items; + for (let key of Object.keys(settings)) { + existingTreeSettings[key]._disabled = !settings[key]; //settings are provided as 'which ones should be enabled' + } + + /*if (toggle === 'on') { if (existingTreeSettings.Load) { existingTreeSettings.Load._disabled = false; } else { @@ -1103,7 +1133,7 @@ class FileTreePanel extends HTMLElement { existingTreeSettings.Viewer1._disabled = true; existingTreeSettings.Viewer2._disabled = true; } - } + }*/ } /**
10
diff --git a/elements/WrappedStandardElement.js b/elements/WrappedStandardElement.js @@ -294,6 +294,22 @@ class WrappedStandardElement extends ElementBase { Object.defineProperty(Wrapped.prototype, name, delegate); }); + // Special case for IE 11, which mysteriously doesn't expose `disabled` as a + // property on HTMLButtonElement, but nevertheless *does* provide a disabled + // property on buttons anyhow. + if (extendsTag === 'button' && names.indexOf('disabled') === -1) { + Object.defineProperty(Wrapped.prototype, 'disabled', { + get: function() { + return this.inner.disabled; + }, + set: function(value) { + safelySetInnerProperty(this, 'disabled', value); + }, + enumerable: true, + configurable: true + }); + } + return Wrapped; }
1
diff --git a/core/pipeline-driver/lib/tasks/task-runner.js b/core/pipeline-driver/lib/tasks/task-runner.js @@ -13,7 +13,6 @@ const log = require('@hkube/logger').GetLogFromContainer(); const components = require('common/consts/componentNames'); const { metricsNames } = require('../consts/metricsNames'); const metrics = require('@hkube/metrics'); -//let total = 0; class TaskRunner { @@ -44,12 +43,10 @@ class TaskRunner { }) stateManager.on(Events.TASKS.SUCCEED, (data) => { this._setTaskState(data.taskId, { status: data.status, result: data.result }); - //console.log('SUCCEED ' + (++total)) this._taskComplete(data.taskId); }); stateManager.on(Events.TASKS.FAILED, (data) => { this._setTaskState(data.taskId, { status: data.status, error: data.error }); - //console.log('FAILED ' + (++total)) this._taskComplete(data.taskId); }); metrics.addTimeMeasure({ @@ -60,7 +57,6 @@ class TaskRunner { } async _startPipeline(job) { - //total = 0; this._job = job; this._jobId = job.id; log.info(`pipeline started ${this._jobId}`, { component: components.TASK_RUNNER }); @@ -119,7 +115,7 @@ class TaskRunner { status = States.FAILED; log.error(`pipeline failed ${error.message}`, { component: components.TASK_RUNNER }); progress.error({ jobId: this._jobId, pipeline: this._pipeline.name, status, error: error.message }); - stateManager.setJobResults({ jobId: this._jobId, pipeline: this._pipeline.name, data: { error: error.message } }); + stateManager.setJobResults({ jobId: this._jobId, pipeline: this._pipeline.name, data: { error: error.message, status } }); this._job.done(error.message); } else { @@ -127,14 +123,14 @@ class TaskRunner { status = States.STOPPED; log.info(`pipeline stopped ${this._jobId}. ${reason}`, { component: components.TASK_RUNNER }); progress.info({ jobId: this._jobId, pipeline: this._pipeline.name, status }); - stateManager.setJobResults({ jobId: this._jobId, pipeline: this._pipeline.name, data: { error: reason } }); + stateManager.setJobResults({ jobId: this._jobId, pipeline: this._pipeline.name, data: { reason, status } }); } else { status = States.COMPLETED; log.info(`pipeline completed ${this._jobId}`, { component: components.TASK_RUNNER }); progress.info({ jobId: this._jobId, pipeline: this._pipeline.name, status }); const result = this._nodes.nodesResults(); - stateManager.setJobResults({ jobId: this._jobId, pipeline: this._pipeline.name, data: { result } }); + stateManager.setJobResults({ jobId: this._jobId, pipeline: this._pipeline.name, data: { result, status } }); } this._job.done(); }
0
diff --git a/lib/util.js b/lib/util.js @@ -41,22 +41,46 @@ util.retry = async (fn, thisArg, args = [], maxRetries = 5, returnValMatch = nul } util.channelMentionToId = (mention) => { - if(!/^<#\d+>$/.test(mention) && !/^\d+$/.test(mention)) + if (/^<#\d+>$/.test(mention)) { + return mention.replace('<@!','').replace('>',''); + } + else if(/^\d+$/.test(mention)) { + return mention; + } + else { return null; - return mention.replace('<#','').replace('>',''); + } } util.roleMentionToId = (mention) => { - if(!/^<@&\d+>$/.test(mention) && !/^\d+$/.test(mention)) - return null; + if (/^<@&\d+>$/.test(mention)) { return mention.replace('<@&','').replace('>',''); } + else if (/^<@\d+>$/) { + return mention.replace('<@','').replace('>',''); + } + else if(/^\d+$/.test(mention)) { + return mention; + } + else { + return null; + } +} util.userMentionToId = (mention) => { - if(!/^<@!\d+>$/.test(mention) && !/^\d+$/.test(mention)) - return null; + if (/^<@!\d+>$/.test(mention)) { return mention.replace('<@!','').replace('>',''); } + else if (/^<@\d+>$/) { + return mention.replace('<@','').replace('>',''); + } + else if(/^\d+$/.test(mention)) { + return mention; + } + else { + return null; + } +} util.timeToSec = (time) => { //Convert time to s
7
diff --git a/token-metadata/0x821144518dfE9e7b44fCF4d0824e15e8390d4637/metadata.json b/token-metadata/0x821144518dfE9e7b44fCF4d0824e15e8390d4637/metadata.json "symbol": "ATIS", "address": "0x821144518dfE9e7b44fCF4d0824e15e8390d4637", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/src/index.js b/src/index.js @@ -730,7 +730,7 @@ class Offline { response.statusCode = statusCode; if (contentHandling === 'CONVERT_TO_BINARY') { response.encoding = 'binary'; - response.source = new Buffer(result, 'base64'); + response.source = Buffer.from(result, 'base64'); response.variety = 'buffer'; } else { @@ -746,7 +746,7 @@ class Offline { if (!_.isUndefined(result.body)) { if (result.isBase64Encoded) { response.encoding = 'binary'; - response.source = new Buffer(result.body, 'base64'); + response.source = Buffer.from(result.body, 'base64'); response.variety = 'buffer'; } else {
14
diff --git a/src/components/ReportActionItem/IOUAction.js b/src/components/ReportActionItem/IOUAction.js @@ -65,7 +65,7 @@ const IOUAction = (props) => { const shouldShowIOUPreview = ( props.isMostRecentIOUReportAction && Boolean(props.action.originalMessage.IOUReportID) - ) || props.action.originalMessage.type === 'pay'; + ) || props.action.originalMessage.type === CONST.IOU.REPORT_ACTION_TYPE.PAY; let shouldShowPendingConversionMessage = false; if (
4
diff --git a/src/components/lazy/lazy.js b/src/components/lazy/lazy.js @@ -27,6 +27,7 @@ const Lazy = { const src = $imageEl.attr('data-src'); const srcset = $imageEl.attr('data-srcset'); const sizes = $imageEl.attr('data-sizes'); + const picture = $($imageEl[0]).parent(); swiper.loadImage($imageEl[0], (src || background), srcset, sizes, false, () => { if (typeof swiper === 'undefined' || swiper === null || !swiper || (swiper && !swiper.params) || swiper.destroyed) return; @@ -42,6 +43,17 @@ const Lazy = { $imageEl.attr('sizes', sizes); $imageEl.removeAttr('data-sizes'); } + if (picture && picture[0].tagName === 'PICTURE') { + const sources = Array.from(picture[0].querySelectorAll('source')); + sources.forEach(source => { + const $source = $(source); + + if ($source.attr('data-srcset')) { + $source.attr('srcset', $source.attr('data-srcset')); + $source.removeAttr('data-srcset'); + } + }); + } if (src) { $imageEl.attr('src', src); $imageEl.removeAttr('data-src'); @@ -90,6 +102,7 @@ const Lazy = { } else if (slides[index]) return true; return false; } + function slideIndex(slideEl) { if (isVirtual) { return $(slideEl).attr('data-swiper-slide-index');
0
diff --git a/src/cachers/redis.js b/src/cachers/redis.js @@ -12,6 +12,8 @@ const BaseCacher = require("./base"); const { METRIC } = require("../metrics"); const { BrokerOptionsError } = require("../errors"); +let Redis, Redlock; + /** * Cacher factory for Redis * @@ -46,7 +48,6 @@ class RedisCacher extends BaseCacher { */ init(broker) { super.init(broker); - let Redis, Redlock; try { Redis = require("ioredis"); } catch (err) { @@ -359,20 +360,18 @@ class RedisCacher extends BaseCacher { }); stream.on("error", (err) => { - console.error("Error occured while deleting keys from node"); + this.logger.error(`Error occured while deleting keys '${pattern}' from node.`, err); reject(err); }); stream.on("end", () => { - // console.log('End deleting keys from node') + // End deleting keys from node resolve(); }); }); } _scanDel(pattern) { - let Redis = require("ioredis"); - if (this.client instanceof Redis.Cluster) { return this._clusterScanDel(pattern); } else {
7
diff --git a/articles/integrations/aws-api-gateway-2/part-3.md b/articles/integrations/aws-api-gateway-2/part-3.md @@ -5,53 +5,3 @@ description: How to set your API methods to use your custom authorizer # AWS Part 3: Secure the API Using Custom Authorizers In [part 1](/integrations/aws-api-gateway-2/part-1), you configured an API using API Gateway, and in [part 2](/integrations/aws-api-gateway-2/part-2), you created the custom authorizer that can be used to retrieve the appropriate policies when your API receives an access request. In this part of the tutorial, we will show you how to use the custom authorizer to secure your API's endpoints. \ No newline at end of file - -## Configure API Gateway Resources to use the Custom Authorizer - -Log in to AWS and navigate to the [API Gateway Console](http://console.aws.amazon.com/apigateway). - -![](/media/articles/integrations/aws-api-gateway-2/part-3/pt3-1.png) - -::: note -Custom authorizers are set on a method by method basis; if you want to secure multiple methods using a single authorizer, you'll need to repeat the following instructions for each method. -::: - -Open the **PetStore** API we created in [part 1](/integrations/aws-api-gateway-2/part-1) of this tutorial. Under the **Resource** tree in the center pane, select the **GET** method under the `/pets` resource. - -![](/media/articles/integrations/aws-api-gateway-2/part-3/pt3-2.png) - -Select **Method Request**. - -![](/media/articles/integrations/aws-api-gateway-2/part-3/pt3-3.png) - -Under **Settings**, click the **pencil** icon to the right **Authorization** and choose the `jwt-rsa-custom-authorizer` custom authorizer you created in [part 2](/integrations/aws-api-gateway-2/part-2). - -![](/media/articles/integrations/aws-api-gateway-2/part-3/pt3-4.png) - -Click the **check mark** icon to save your choice of custom authorizer. Make sure the **API Key Required** field is set to `false`. - -![](/media/articles/integrations/aws-api-gateway-2/part-3/pt3-5.png) - -## Deploy the API - -To make your changes public, you'll need to [deploy your API](/integrations/aws-api-gateway-2/part-1#deploy-the-api). - -If successful, you'll be redirected to the **Test Stage Editor**. Copy down the **Invoke URL** provided in the blue ribbon at the top, since you'll need this to test your deployment. - -![](/media/articles/integrations/aws-api-gateway-2/part-3/pt3-8.png) - -## Test Your Deployment - -You can test your deployment by making a `GET` call to the **Invoke URL** you copied in the previous step. - -## Summary - -In this tutorial, you have - -1. Imported an API for use with API Gateway -2. Created a custom authorizer to secure your API's endpoints, which required working with AWS IAM and Lambda -3. Secured your API with your custom authorizer - -<%= include('./_stepnav', { - prev: ["2. Create the Custom Authorizers", /integrations/aws-api-gateway-2/part-2"] -}) %> \ No newline at end of file
2
diff --git a/.github/workflows/contributor_spec.yaml b/.github/workflows/contributor_spec.yaml @@ -20,7 +20,3 @@ jobs: key: ${{ runner.os }}-${{ hashFiles('**/package.lock.json') }} - run: npm i - run: NEW_USER=$(git show main:contributors.json | jq -r --argjson new "$(cat contributors.json)" '. | keys - ($new | keys) | join(",")') npm run test - - env: - GITHUB_TOKEN: ${{ secrets.USER_TOKEN }} - ENV_TYPE: mock - run: npm run build
2
diff --git a/src/components/Match/matchColumns.jsx b/src/components/Match/matchColumns.jsx @@ -1056,10 +1056,13 @@ export default (strings) => { if (field) { return <TargetsBreakdown field={field} />; } + if (row.damage_inflictor) { // backwards compatibility 2018-03-17 return Object.keys(row.damage_inflictor) .sort((a, b) => (row.damage_inflictor[b] - (row.damage_inflictor[a]))) .map(inflictor => inflictorWithValue(inflictor, abbreviateNumber((row.damage_inflictor[inflictor])))); + } + return null; }, }, {
1
diff --git a/generators/server/templates/src/main/java/package/domain/AbstractAuditingEntity.java.ejs b/generators/server/templates/src/main/java/package/domain/AbstractAuditingEntity.java.ejs @@ -22,9 +22,6 @@ package <%=packageName%>.domain; import com.couchbase.client.java.repository.annotation.Field; <%_ } _%> import com.fasterxml.jackson.annotation.JsonIgnore; -<%_ if (databaseType === 'sql') { _%> -import org.hibernate.envers.Audited; -<%_ } _%> <%_ if (!reactive) { _%> import org.springframework.data.annotation.CreatedBy; <%_ } _%> @@ -54,7 +51,6 @@ import javax.persistence.MappedSuperclass; */ <%_ if (databaseType === 'sql') { _%> @MappedSuperclass -@Audited @EntityListeners(AuditingEntityListener.class) <%_ } _%> public abstract class AbstractAuditingEntity implements Serializable {
2
diff --git a/tools/make/lib/benchmark/fortran.mk b/tools/make/lib/benchmark/fortran.mk @@ -12,6 +12,7 @@ benchmark-fortran: cd `dirname $$file` && \ $(MAKE) clean && \ $(MAKE) && \ + FORTRAN_COMPILER="$(FC)" \ $(MAKE) run || exit 1; \ done @@ -29,6 +30,7 @@ benchmark-fortran-files: cd `dirname $$file` && \ $(MAKE) clean && \ $(MAKE) && \ + FORTRAN_COMPILER="$(FC)" \ $(MAKE) run || exit 1; \ done
12
diff --git a/world.js b/world.js @@ -32,11 +32,26 @@ const localMatrix = new THREE.Matrix4(); const localMatrix2 = new THREE.Matrix4(); const localRaycaster = new THREE.Raycaster(); +let pendingAnalyticsData = {}; +setInterval(() => { + Object.keys(pendingAnalyticsData).map(item => { + fetch(item, { method: 'POST', body: JSON.stringify(pendingAnalyticsData[item]) }).then(res => { + return res.json(); + }).then(data => { + console.log(data); + }).catch(err => { + console.error(err); + }); + delete pendingAnalyticsData[item]; + }); +}, 10000); + let pointers = []; let currentIndex = 0; setInterval(() => { if (pointers.length <= 0 && document.querySelector("meta[name=monetization]")) { document.querySelector("meta[name=monetization]").remove(); + document.monetization.removeEventListener('monetizationprogress', monetizationProgress); } if (pointers.length <= 0 || !document.monetization) return; @@ -45,6 +60,25 @@ setInterval(() => { monetizationTag.name = 'monetization'; monetizationTag.content = pointers[currentIndex].monetizationPointer; document.head.appendChild(monetizationTag); + document.monetization.addEventListener('monetizationprogress', function monetizationProgress (e) { + const current = pointers[currentIndex]; + const currentMonetizationPointer = encodeURIComponent(current.monetizationPointer); + const apiUrl = `https://api.metaverse.website/monetization/${current.contentId}/${current.ownerAddress}/${currentMonetizationPointer}`; + if (pendingAnalyticsData[apiUrl]) { + const existing = pendingAnalyticsData[apiUrl]; + pendingAnalyticsData[apiUrl] = { + amount: parseFloat(existing.amount) + parseFloat(e.detail.amount), + assetCode: existing.assetCode, + assetScale: existing.assetScale + }; + } else { + pendingAnalyticsData[apiUrl] = { + amount: parseFloat(e.detail.amount), + assetCode: e.detail.assetCode, + assetScale: e.detail.assetScale + }; + } + }); } else if (document.querySelector("meta[name=monetization]")) { document.querySelector("meta[name=monetization]").setAttribute("content", pointers[currentIndex].monetizationPointer); } @@ -958,10 +992,10 @@ world.addEventListener('trackedobjectadd', async e => { const minimapObject = minimap.addObject(mesh); mesh.minimapObject = minimapObject; - if (token.owner.address && token.owner.monetizationPointer && token.owner.monetizationPointer[0] === "$") { + if (contentId && instanceId && token.owner.address && token.owner.monetizationPointer && token.owner.monetizationPointer[0] === "$") { const monetizationPointer = token.owner.monetizationPointer; const ownerAddress = token.owner.address.toLowerCase(); - pointers.push({ "instanceId": instanceId, "monetizationPointer": monetizationPointer, "ownerAddress": ownerAddress }); + pointers.push({ contentId, instanceId, monetizationPointer, ownerAddress }); } objects.push(mesh);
0
diff --git a/packages/fether-react/src/Send/Sent/Sent.js b/packages/fether-react/src/Send/Sent/Sent.js // SPDX-License-Identifier: BSD-3-Clause import React, { Component } from 'react'; -import { chainName$ } from '@parity/light.js'; +import { chainName$, withoutLoading } from '@parity/light.js'; import { inject, observer } from 'mobx-react'; import light from '@parity/light.js-react'; @@ -15,7 +15,7 @@ import loading from '../../assets/img/icons/loading.svg'; const MIN_CONFIRMATIONS = 6; @light({ - chainName: chainName$ + chainName: () => chainName$().pipe(withoutLoading()) }) @inject('sendStore') @observer
1
diff --git a/docs/stateDiagram.md b/docs/stateDiagram.md @@ -30,7 +30,7 @@ In state diagrams systems are described in terms of its states and how the syste ## States -A state can be declares in multiple ways. The simplest way is to define a state id as a description. +A state can be declared in multiple ways. The simplest way is to define a state id as a description. ```markdown stateDiagram
1
diff --git a/src/api.js b/src/api.js @@ -116,17 +116,27 @@ class DockAPI { } /** - * Helper function to sign and send an extrinsic with the default account + * Signs an extrinsic with either the set account or a custom sign method (see constructor) * @param {object} extrinsic - Extrinsic to send * @return {Promise} */ - async signAndSend(extrinsic, resolve, reject) { + async signExtrinsic(extrinsic) { if (this.customSignTx) { - this.customSignTx(extrinsic, this); + await this.customSignTx(extrinsic, this); } else { await extrinsic.signAsync(this.getAccount()); } + } + /** + * Helper function to send transaction + * @param {object} extrinsic - Extrinsic to send + * @return {Promise} + */ + async sendTransaction(extrinsic) { + await this.signExtrinsic(extrinsic); + const promise = new Promise((resolve, reject) => { + try { let unsubFunc = null; return extrinsic.send(({ events = [], status }) => { if (status.isFinalized) { @@ -143,20 +153,11 @@ class DockAPI { .then((unsub) => { unsubFunc = unsub; }); - } - - /** - * Helper function to send transaction - * @param {object} extrinsic - Extrinsic to send - * @return {Promise} - */ - async sendTransaction(extrinsic) { - const promise = new Promise((resolve, reject) => { - try { - this.signAndSend(extrinsic, resolve, reject); } catch (error) { reject(error); } + + return this; }); const result = await promise;
10
diff --git a/resources/js/backButton.js b/resources/js/backButton.js @@ -3,25 +3,13 @@ try { if (!document.querySelector('#backButton')) { const backButtonStyle = `background-color: rgb(0 0 0 / 0%); width: 9px; margin: -43px 8px 8px 228px; -webkit-app-region: no-drag;`; - document.getElementById('green').insertAdjacentHTML("afterend", ` + document.getElementsByClassName('loading-inner')[0].insertAdjacentHTML("afterbegin", ` <div id="backButton" onclick="ipcRenderer.send('back');" style="${backButtonStyle}"> <img src="https://beta.music.apple.com/assets/shelf/paddle-dark.svg" alt="nope"> </div> `); } - /* Keep this to remember the class and location for where we need to put it if we want it to look like mac - if (!document.querySelector('#backButton')) { - const backButtonStyle = `position: absolute; left: 0; float: left; border: 3px solid var(--searchBarBorderColor); background-color: rgba(60, 60, 67, 0.45); width: 20px`; - - document.getElementsByClassName('loading-inner')[0].insertAdjacentHTML("afterbegin", ` - <div id="backButton" onclick="ipcRenderer.send('back');" style="${backButtonStyle}"> - <p> < </p> - </div> - `); - }*/ - - } catch (e) { console.error("[JS] Error while trying to apply backButton.js", e); } \ No newline at end of file
5
diff --git a/assets/js/modules/analytics/common/property-select.js b/assets/js/modules/analytics/common/property-select.js @@ -31,9 +31,15 @@ import { isValidAccountID } from '../util'; export const PROPERTY_CREATE = 'property_create'; export default function PropertySelect( { useSelect, useDispatch } ) { - const accountID = useSelect( ( select ) => select( STORE_NAME ).getAccountID() ); + const { + accountID: existingTagAccountID, + propertyID: existingTagPropertyID, + } = useSelect( ( select ) => select( STORE_NAME ).getExistingTag() ) || {}; + const currentAccountID = useSelect( ( select ) => select( STORE_NAME ).getAccountID() ); + const accountID = existingTagAccountID || currentAccountID; + const currentPropertyID = useSelect( ( select ) => select( STORE_NAME ).getPropertyID() ); + const propertyID = existingTagPropertyID || currentPropertyID; const properties = useSelect( ( select ) => select( STORE_NAME ).getProperties( accountID ) ) || []; - const propertyID = useSelect( ( select ) => select( STORE_NAME ).getPropertyID() ); const hasExistingTag = useSelect( ( select ) => select( STORE_NAME ).hasExistingTag() ); const { setPropertyID } = useDispatch( STORE_NAME );
12
diff --git a/src/encoded/visualization.py b/src/encoded/visualization.py @@ -2180,6 +2180,10 @@ def vis_format_external_url(browser, hub_url, assembly, position=None): if ensembl_host is not None: external_url = 'http://' + ensembl_host + '/Trackhub?url=' external_url += hub_url + ';species=' + mapped_assembly.get('species').replace(' ','_') + ### TODO: remove redirect=no when Ensembl fixes their mirrors + external_url += ';redirect=no' + ### TODO: remove redirect=no when Ensembl fixes their mirrors + if position is not None: if position.startswith('chr'): position = position[3:] # ensembl position r=19:7069444-7087968
0
diff --git a/src/index.ts b/src/index.ts @@ -64,8 +64,10 @@ export async function cli(args: string[]) { process.exit(1); } + const cmd = cliFlags['_'][2]; + // Set this early - before config loading - so that plugins see it. - if (cliFlags['_'][2] === 'build') { + if (cmd === 'build') { process.env.NODE_ENV = process.env.NODE_ENV || 'production'; } @@ -76,11 +78,11 @@ export async function cli(args: string[]) { pkgManifest, }; - if (cliFlags['_'][2] === 'add') { + if (cmd === 'add') { await addCommand(cliFlags['_'][3], commandOptions); return; } - if (cliFlags['_'][2] === 'rm') { + if (cmd === 'rm') { await rmCommand(cliFlags['_'][3], commandOptions); return; } @@ -90,19 +92,19 @@ export async function cli(args: string[]) { process.exit(1); } - if (cliFlags['_'][2] === 'build') { + if (cmd === 'build') { await buildCommand(commandOptions); return; } - if (cliFlags['_'][2] === 'dev') { + if (cmd === 'dev') { await devCommand(commandOptions); return; } - if (cliFlags['_'][2] === 'install' || !cliFlags['_'][2]) { + if (cmd === 'install' || !cmd) { await installCommand(commandOptions); return; } - console.log(`Unrecognized command: ${cliFlags['_'][2]}`); + console.log(`Unrecognized command: ${cmd}`); process.exit(1); }
14
diff --git a/src/apps.json b/src/apps.json 11 ], "html": [ - "<link rel=[\"']stylesheet[\"'] [^>]+wp-(?:content|includes)", + "<link rel=[\"']stylesheet[\"'] [^>]+/wp-(?:content|includes)/", "<div[^>]*class=[\"']amp-wp-", "<link[^>]+s\\d+\\.wp\\.com" ], "wp_username": "" }, "meta": { - "generator": "WordPress( [\\d.]+)?\\;version:\\1" + "generator": "^WordPress ?([\\d.]+)?\\;version:\\1" }, - "script": "/wp-includes/", - "website": "http://wordpress.org" + "script": "/wp-(?:content|includes)/", + "website": "https://wordpress.org" }, "WordPress Super Cache": { "cats": [
7
diff --git a/content/questions/console-log-fetch/index.md b/content/questions/console-log-fetch/index.md @@ -18,4 +18,4 @@ console.log(fetch); <!-- explanation --> -What happens when you `console.log(fetch)` really depends on your current environment. If you `console.log` it in a [browser version](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API#Browser_compatibility) that has a window.fetch method, you will log the fetch function. If you have an older browser, or are using the node environment, you may well get a reference error. +What happens when you `console.log(fetch)` really depends on your current environment. If you `console.log` it in a [browser version](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API#Browser_compatibility) that has a `window.fetch` method, you will log the fetch function. If you have an older browser, or are not in a browser environment, you will receive a ReferenceError.
0
diff --git a/packages/cx/src/widgets/grid/TreeNode.js b/packages/cx/src/widgets/grid/TreeNode.js @@ -66,7 +66,7 @@ export class TreeNode extends Container { <div className={CSS.element(baseClass, 'handle')} onClick={e => this.toggle(e, instance)} - onMouseDown={!this.hideIcon && stopPropagation} + onMouseDown={!this.hideIcon ? stopPropagation : undefined} > { !data.leaf && !data.hideArrow && Icon.render(arrowIcon, { className: CSS.element(baseClass, 'arrow')}) } {
1
diff --git a/edit.js b/edit.js @@ -2297,6 +2297,7 @@ function animate(timestamp, frame) { pxMesh.position.copy(applyPosition) .add(localVector2.set(0, 0.1, 0).applyQuaternion(currentChunkMesh.getWorldQuaternion(localQuaternion2).inverse())); pxMesh.velocity = new THREE.Vector3((-1+Math.random()*2)*0.5, Math.random()*3, (-1+Math.random()*2)*0.5); + pxMesh.angularVelocity = new THREE.Vector3((-1+Math.random()*2)*Math.PI*2*0.01, (-1+Math.random()*2)*Math.PI*2*0.01, (-1+Math.random()*2)*Math.PI*2*0.01); pxMesh.collisionIndex = -1; pxMesh.isBuildMesh = true; currentChunkMesh.add(pxMesh); @@ -3034,7 +3035,10 @@ function animate(timestamp, frame) { pxMesh.velocity.copy(zeroVector); } else { _applyVelocity(pxMesh.position, pxMesh.velocity, timeDiff); - pxMesh.velocity.add(localVector.set(0, -9.8*timeDiff, 0).applyQuaternion(pxMesh.getWorldQuaternion(localQuaternion).inverse())); + pxMesh.velocity.add(localVector.set(0, -9.8*timeDiff, 0).applyQuaternion(pxMesh.parent.getWorldQuaternion(localQuaternion).inverse())); + pxMesh.rotation.x += pxMesh.angularVelocity.x; + pxMesh.rotation.y += pxMesh.angularVelocity.y; + pxMesh.rotation.z += pxMesh.angularVelocity.z; } } }
0
diff --git a/README.md b/README.md @@ -80,4 +80,4 @@ Azure Search | Two sample bots that help the user navigate large amounts of cont [Deploy Node/SimilarProducts]: https://azuredeploy.net?repository=https://github.com/microsoft/BotBuilder-Samples/tree/master/Node/intelligence-SimilarProducts [Deploy CSharp/AppInsights]: https://azuredeploy.net?repository=https://github.com/microsoft/BotBuilder-Samples/tree/master/CSharp/core-AppInsights [Deploy Node/AppInsights]: https://azuredeploy.net/?repository=https://github.com/microsoft/BotBuilder-Samples/tree/master/Node/core-AppInsights -[Deploy Node/Newsie]: https://azuredeploy.net?repository=https://github.com/microsoft/BotBuilder-Samples/tree/master/Node/intelligence-Newsie \ No newline at end of file +[Deploy CSharp/Newsie]: https://azuredeploy.net?repository=https://github.com/microsoft/BotBuilder-Samples/tree/master/CSharp/intelligence-Newsie \ No newline at end of file
2
diff --git a/source/shaders/ibl_filtering.frag b/source/shaders/ibl_filtering.frag @@ -179,11 +179,7 @@ float D_Charlie(float sheenRoughness, float NdotH) return (2.0 + invR) * pow(sin2h, invR * 0.5) / (2.0 * MATH_PI); } -// GGX microfacet distribution -// https://www.cs.cornell.edu/~srm/publications/EGSR07-btdf.html -// This implementation is based on https://bruop.github.io/ibl/, -// https://www.tobias-franke.eu/log/2014/03/30/notes_on_importance_sampling.html -// and https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch20.html + MicrofacetDistributionSample Charlie(vec2 xi, float roughness) { MicrofacetDistributionSample charlie; @@ -202,6 +198,22 @@ MicrofacetDistributionSample Charlie(vec2 xi, float roughness) return charlie; } +MicrofacetDistributionSample Lambertian(vec2 xi, float roughness) +{ + MicrofacetDistributionSample lambertian; + + // Cosine weighted hemisphere sampling + // http://www.pbr-book.org/3ed-2018/Monte_Carlo_Integration/2D_Sampling_with_Multidimensional_Transformations.html#Cosine-WeightedHemisphereSampling + lambertian.cosTheta = sqrt(1.0 - xi.y); + lambertian.sinTheta = sqrt(xi.y); // equivalent to `sqrt(1.0 - cosTheta*cosTheta)`; + lambertian.phi = 2.0 * MATH_PI * xi.x; + + lambertian.pdf = lambertian.cosTheta / MATH_PI; // evaluation for solid angle, therefore drop the sinTheta + + return lambertian; +} + + // getImportanceSample returns an importance sample direction with pdf in the .w component vec4 getImportanceSample(int sampleIndex, vec3 N, float roughness) { @@ -218,13 +230,11 @@ vec4 getImportanceSample(int sampleIndex, vec3 N, float roughness) // the distribution (e.g. lambertian uses a cosine importance) if(u_distribution == cLambertian) { - // Cosine weighted hemisphere sampling - // http://www.pbr-book.org/3ed-2018/Monte_Carlo_Integration/2D_Sampling_with_Multidimensional_Transformations.html#Cosine-WeightedHemisphereSampling - cosTheta = sqrt(1.0 - xi.y); - sinTheta = sqrt(xi.y); // equivalent to `sqrt(1.0 - cosTheta*cosTheta)`; - phi = 2.0 * MATH_PI * xi.x; - - pdf = cosTheta / MATH_PI; // evaluation for solid angle, therefore drop the sinTheta + MicrofacetDistributionSample lambertian = Lambertian(xi, roughness); + cosTheta = lambertian.cosTheta; + sinTheta = lambertian.sinTheta; + phi = lambertian.phi; + pdf = lambertian.pdf; } else if(u_distribution == cGGX) {
4
diff --git a/readme.md b/readme.md @@ -37,6 +37,7 @@ Contributions in all forms (code, bug reports, community engagenment, cash money ``` git clone [email protected]:GridSpace/grid-apps.git +cd grid-apps npm i npm install -g @gridspace/app-server gs-app-server --debug
7
diff --git a/packages/platform/src/server/index.js b/packages/platform/src/server/index.js -const extendRequire = require('isomorphic-loader/lib/extend-require'); +// const extendRequire = require('isomorphic-loader/lib/extend-require'); // const settings = require('../../tools/app-settings.js'); require('css-modules-require-hook')({ generateScopedName: '[path][name]__[local]___[hash:base64:5]', }); -extendRequire({ - startDelay: 1000, +// extendRequire({ + // startDelay: 1000, // processAssets: (assets) => { // const appSrcDir = (settings.getEnv() || settings.build.dir).split('/')[0]; // if (appSrcDir !== settings.src.dir && assets.marked) { @@ -21,8 +21,8 @@ extendRequire({ // return assets; // }, -}).then(() => { +// }).then(() => { require('./server'); -}).catch((err) => { - console.log('Error in isomorphic-loader', err); // eslint-disable-line -}); +// }).catch((err) => { + // console.log('Error in isomorphic-loader', err); // eslint-disable-line +// });
2
diff --git a/tools/gcs-upload/index.ts b/tools/gcs-upload/index.ts @@ -4,13 +4,20 @@ import fs from 'fs-extra'; import { fileURLToPath } from 'url'; const filename = fileURLToPath(import.meta.url); +const log = (message: string) => { + // eslint-disable-next-line no-console + console.log(`[gcs-upload tool]: ${message}`); +}; + const BUCKET_NAME = `ui-kit-flags`; export const setupStorage = async () => { const configFilePath = path.join(path.dirname(filename), 'config.json'); if (process.env.GCLOUD_SECRET) { + log(`GCLOUD_SECRET env variable found, writing it's content to ${configFilePath}`); await fs.writeFile(configFilePath, process.env.GCLOUD_SECRET); } + log(`Using config ${configFilePath}`); if (!(await fs.pathExists(configFilePath))) { const exampleFilePath = configFilePath.replace(/config\.json$/, 'config.example.json'); throw new Error( @@ -20,10 +27,16 @@ export const setupStorage = async () => { const config = await fs.readJson(configFilePath); const { projectId } = config; - return new Storage({ + log(`Initiating storage for ${projectId} project`); + + const storage = new Storage({ projectId, keyFilename: configFilePath, }); + + log(`Initiated storage for ${projectId} project`); + + return storage; }; export const getPackageData = async () => { @@ -52,16 +65,20 @@ export const upload = async (filePaths: string[]) => { } const { version: packageVersion, name: packageName } = await getPackageData(); + const storage = await setupStorage(); - // eslint-disable-next-line no-console - console.log(`Starting uploading following paths: ${filePaths.join(', ')}`); + log( + `Initiating uploading of ${filePaths.join(', ')} from ${packageName}@${packageVersion} package`, + ); await Promise.all( filePaths.map((filePath) => { const fileName = filePath.split('/').pop(); const destination = `ui-kit/${packageName}/${packageVersion}/${fileName}`; + log(`Uploading ${fileName} to ${destination}`); + return ( storage .bucket(BUCKET_NAME) @@ -88,27 +105,33 @@ export const remove = async (filePaths: string[]) => { const storage = await setupStorage(); + log(`Initiating removing of ${filePaths.join(', ')}`); + await Promise.all( - filePaths.map((filePath) => - storage + filePaths.map(async (filePath) => { + log(`Removing ${filePath}`); + + await storage .bucket(BUCKET_NAME) .file(filePath) .delete() // eslint-disable-next-line no-console - .then((file) => console.log(`gs://${BUCKET_NAME}/${file} deleted`)), - ), + .then((file) => console.log(`gs://${BUCKET_NAME}/${file} removed`)); + }), ); }; export const ls = async () => { const storage = await setupStorage(); + log(`Listing files`); + const [files] = await storage.bucket(BUCKET_NAME).getFiles(); return files.map((file) => file.name); }; -export const uploadFilesInFolders = async (folderPaths) => { +export const uploadFilesInFolders = async (folderPaths: string[]) => { if (!folderPaths || !folderPaths.length) { throw new Error( `@semcore/gcs-upload package requires at least one folder path to be provided for uploading, got ${folderPaths}`, @@ -117,15 +140,21 @@ export const uploadFilesInFolders = async (folderPaths) => { const storage = await setupStorage(); + log(`Uploading files from folders ${folderPaths.join(', ')}`); + await Promise.all( folderPaths.map(async (folderPath) => { const folderName = folderPath.split('/').pop(); const fileNames = await fs.readdir(folderPath); + log(`Uploading files from folder ${folderPath}`); + return await Promise.all( fileNames.map((fileName) => { const destination = `ui-kit/${folderName}/${fileName}`; + log(`Uploading ${fileName} to ${destination}`); + return ( storage .bucket(BUCKET_NAME)
0
diff --git a/.travis.yml b/.travis.yml @@ -23,39 +23,39 @@ addons: matrix: include: - - node_js: "6" + - node_js: "8" env: > DO_TEST=TRUE DO_LINT=TRUE DO_NPM_DEPLOY=TRUE DO_TRANSIFEX_DEPLOY=TRUE # Test the examples in white space mode on the pull requests - - node_js: "6" + - node_js: "8" env: > DEVELOPMENT=TRUE DO_EXAMPLES_TEST=TRUE EXAMPLES_SPLIT=1/2 DO_DIST_NGEO=TRUE - - node_js: "6" + - node_js: "8" env: > DEVELOPMENT=TRUE DO_EXAMPLES_TEST=TRUE EXAMPLES_SPLIT=2/2 DO_DIST_GMF=TRUE # Deploy the examples in advance mode on the commit on a branch - - node_js: "6" + - node_js: "8" env: > DO_EXAMPLES_DEPLOY=TRUE GIT_REMOTE_NAME=origin GITHUB_USERNAME=camptocamp EXAMPLES_NGEO=TRUE - - node_js: "6" + - node_js: "8" env: > DO_EXAMPLES_DEPLOY=TRUE GIT_REMOTE_NAME=origin GITHUB_USERNAME=camptocamp EXAMPLES_GMF=TRUE - - node_js: "6" + - node_js: "8" env: > DO_EXAMPLES_DEPLOY=TRUE GIT_REMOTE_NAME=origin @@ -63,7 +63,7 @@ matrix: API=TRUE APPS_GMF=TRUE allow_failures: - - node_js: "6" + - node_js: "8" env: > DO_EXAMPLES_DEPLOY=TRUE GIT_REMOTE_NAME=origin
4
diff --git a/docs/_reference/auth.md b/docs/_reference/auth.md @@ -222,7 +222,7 @@ methods: ```javascript function* SignUpSaga(email, password) { try { - const data = yield call(rsf.auth.signUpWithEmailAndPassword, email, password); + const user = yield call(rsf.auth.signUpWithEmailAndPassword, email, password); yield put(signUpSuccess(data)); } catch(error) {
10
diff --git a/token-metadata/0x78B7FADA55A64dD895D8c8c35779DD8b67fA8a05/metadata.json b/token-metadata/0x78B7FADA55A64dD895D8c8c35779DD8b67fA8a05/metadata.json "symbol": "ATL", "address": "0x78B7FADA55A64dD895D8c8c35779DD8b67fA8a05", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/src/style_manager/model/Sector.js b/src/style_manager/model/Sector.js @@ -20,7 +20,7 @@ export default class Sector extends Model { open: true, buildProps: '', extendBuilded: 1, - properties: [] + properties: [], }; } @@ -89,17 +89,32 @@ export default class Sector extends Model { /** * Get sector properties. + * @param {Object} [opts={}] Options + * @param {Boolean} [opts.withValue=false] Get only properties with value + * @param {Boolean} [opts.withParentValue=false] Get only properties with parent value * @returns {Array<[Property]>} */ - getProperties() { + getProperties(opts = {}) { const props = this.get('properties'); - return props.models ? [...props.models] : props; + const res = props.models ? [...props.models] : props; + return res.filter(prop => { + let result = true; + + if (opts.withValue) { + result = prop.hasValue({ noParent: true }); + } + + if (opts.withParentValue) { + const hasVal = prop.hasValue({ noParent: true }); + result = !hasVal && prop.hasValue(); + } + + return result; + }); } getProperty(id) { - return ( - this.getProperties().filter(prop => prop.get('id') === id)[0] || null - ); + return this.getProperties().filter(prop => prop.get('id') === id)[0] || null; } /** @@ -126,11 +141,7 @@ export default class Sector extends Model { // Check for nested properties var mPProps = mProp.properties; if (mPProps && mPProps.length) { - mProp.properties = this.extendProperties( - prop.properties || [], - mPProps, - 1 - ); + mProp.properties = this.extendProperties(prop.properties || [], mPProps, 1); } props[j] = ext ? extend(prop, mProp) : mProp; isolated[j] = props[j]; @@ -153,7 +164,7 @@ export default class Sector extends Model { if (extend) { return { ...(this.buildProperties([extend])[0] || {}), - ...rest + ...rest, }; } else { return prop;
7
diff --git a/src/data/__test-data.js b/src/data/__test-data.js @@ -4,7 +4,8 @@ import { gen, sampleOne as sample } from "@rgbboy/testcheck"; import type { ValueGenerator } from "@rgbboy/testcheck"; import { DateTime } from "luxon"; import { FORMAT_CONTENTFUL_ISO } from "../lib/date"; -import type { Event } from "./event-deprecated"; +import type { Event as EventDeprecated } from "./event-deprecated"; +import type { Event } from "./event"; import type { FieldRef } from "./field-ref"; import type { HeaderBanner } from "./header-banner"; import type { ImageDetails } from "./image"; @@ -113,7 +114,40 @@ export const generateCMSHeaderBanner: ValueGenerator<mixed> = gen({ } }); -export const generateCMSEvent: ValueGenerator<Event> = gen({ +export const generateEvent: ValueGenerator<Event> = gen({ + id: gen.alphaNumString, + contentType: "event", + locale: "en-GB", + revision: 1, + fields: gen({ + name: "name", + eventCategories: ["Cabaret and Variety", "Music"], + audience: ["???"], + startTime: "2018-07-07T00:00+00:00", + endTime: "2018-07-07T03:00+00:00", + location: { lat: 0, lon: 10 }, + addressLine1: "addressLine1", + addressLine2: "addressLine2", + city: "city", + postcode: "postcode", + locationName: "locationName", + eventPriceLow: 0, + eventPriceHigh: 10, + accessibilityOptions: ["accessibilityOptionsA", "accessibilityOptionsB"], + eventDescription: "eventDescription", + accessibilityDetails: "accessibilityDetails", + email: "email", + phone: "phone", + ticketingUrl: "ticketingUrl", + venueDetails: ["venueDetailsA", "venueDetailsB"], + individualEventPicture: generateFieldRef, + eventsListPicture: generateFieldRef, + performances: [], + recurrenceDates: [] + }) +}); + +export const generateCMSEvent: ValueGenerator<EventDeprecated> = gen({ sys: gen({ id: gen.alphaNumString, contentType: {
0
diff --git a/docs/README.md b/docs/README.md The Open API Enforcer is a library that makes it easy to work with the Open API Specification (OAS), offering these features: - [Validate](#enforcer) your OAS documents. -- [Serialize](./components/schema.md#schemaprototypeserialize), [deserialize](./components/schema.md#schemaprototypedeserialize), and [validate values](./components/schema.md#schemaprototypevalidate) against OAS schemas. +- [Serialize](./components/schema.md#schemaprototypeserialize), [deserialize](./components/schema.md#schemaprototypedeserialize), and [validate values](./components/schema.md#schemaprototypevalidate) against OAS [schemas](./components/schema.md). - Identify the [operation](./components/operation.md) associated with a [request](./components/openapi.md#openapiprototyperequest). -- Request parsing and validating. +- Parse, deserialize, and validate request parameters. - Facilitated [response building](./components/schema.md#schemaprototypepopulate). -- Generate [random valid values](./components/schema.md#schemaprototyperandom) for a schema. +- Generate [random valid values](./components/schema.md#schemaprototyperandom) for a [schema](./components/schema.md). - [Plugin environment](./extend-components.md) for custom document validation and extended functionality including [custom data type formats](./components/schema.md#schemadefinedataformat). ## API
3
diff --git a/test/functional/bodies/auth.json b/test/functional/bodies/auth.json "version": 2 }, "tacacs": { - "accoutning": "send-to-first-server", + "accounting": "send-to-first-server", "authentication": "use-first-server", "debug": false, "encryption": true,
1
diff --git a/native/ios/Comm.xcodeproj/project.pbxproj b/native/ios/Comm.xcodeproj/project.pbxproj inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Comm/Pods-Comm-frameworks.sh", "${PODS_ROOT}/hermes-engine/destroot/Library/Frameworks/iphoneos/hermes.framework", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL/OpenSSL.framework/OpenSSL", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL", ); name = "[CP] Embed Pods Frameworks"; outputPaths = (
3
diff --git a/templates/master/index.js b/templates/master/index.js @@ -137,7 +137,7 @@ module.exports={ }, "Encryption":{ "Type":"String", - "Description":"Defines whether resources (S3 and ElasticSearch) are encrypted at rest. Selecting encrypted configuration will provision c5.large.elasticsearch instances - see https://aws.amazon.com/elasticsearch-service/pricing/.", + "Description":"Choose whether resources (S3 and ElasticSearch) are encrypted at rest. Selecting encrypted configuration will provision c5.large.elasticsearch instances - see https://aws.amazon.com/elasticsearch-service/pricing/.", "AllowedValues": ["ENCRYPTED", "UNENCRYPTED"], "Default":"UNENCRYPTED", "ConstraintDescription":"Allowed Values are UNENCRYPTED or ENCRYPTED"
3
diff --git a/docs/api/SubmissionError.md b/docs/api/SubmissionError.md A throwable error that is used to return submit validation errors from `onSubmit`. The purpose being to distinguish promise rejection because of validation errors from promise rejection because -of AJAX I/O problems or other server errors. +of AJAX I/O problems or other server errors. If it is rejected in the form of +{ field1: 'error', field2: 'error' } then the submission errors will be added +to each field (to the error prop) just like async validation errors are. +If there is an error that is not specific to any field, but applicable to the +entire form, you may pass that as if it were the error for a field called _error, +and it will be given as the error prop. ## Importing @@ -30,4 +35,3 @@ import { SubmissionError } from 'redux-form'; // ES6 }) }/> ``` -
7