code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/includes/Modules/AdSense/Web_Tag.php b/includes/Modules/AdSense/Web_Tag.php @@ -52,7 +52,8 @@ class Web_Tag extends Module_Web_Tag { // If we haven't completed the account connection yet, we still insert the AdSense tag // because it is required for account verification. printf( - '<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"%s></script>', // // phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedScript + '<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=%s" crossorigin="anonymous"%s></script>', // // phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedScript + $this->tag_id, // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped $this->get_tag_blocked_on_consent_attribute() // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped );
4
diff --git a/src/js/services/shapeShiftApiService.js b/src/js/services/shapeShiftApiService.js @@ -296,7 +296,7 @@ var ShapeShift = (function() { ShapeShiftApi: ShapeShiftApi } })(); -var PUBLIC_API_KEY = '08ef330fe264f674ddd4943a5156cfb1ea06f10b95d5db54781afa3d8b108100874083d53b28afa5ce58bf3e834158a3114db725bce5b49da9454ef036753599' +var PUBLIC_API_KEY = '023735052c21eaf1a9a9087ed03cac30fccd64bdd2515c8de230f8591caf282faa3afb8694cb3e44d25621b4e46453c5526d56e007468b56cced10d37cfed351' var SSA = new ShapeShift.ShapeShiftApi(PUBLIC_API_KEY); angular.module('copayApp.services').factory('shapeshiftApiService', function($q) {
3
diff --git a/src/createAuthScheme.js b/src/createAuthScheme.js @@ -8,7 +8,6 @@ const HandlerRunner = require('./handler-runner/index.js') const LambdaContext = require('./LambdaContext.js') const serverlessLog = require('./serverlessLog.js') const { - capitalizeKeys, normalizeMultiValueQuery, normalizeQuery, nullIfEmpty, @@ -95,20 +94,12 @@ module.exports = function createAuthScheme( type: 'REQUEST', } - if (req.rawHeaders) { for (let i = 0; i < req.rawHeaders.length; i += 2) { event.headers[req.rawHeaders[i]] = req.rawHeaders[i + 1] event.multiValueHeaders[req.rawHeaders[i]] = ( event.multiValueHeaders[req.rawHeaders[i]] || [] ).concat(req.rawHeaders[i + 1]) } - } else { - event.headers = Object.assign( - request.headers, - capitalizeKeys(request.headers), - ) - event.multiValueHeaders = normalizeMultiValueQuery(event.headers) - } } else { const authorization = req.headers[identityHeader]
2
diff --git a/upgrades.js b/upgrades.js @@ -250,12 +250,16 @@ H5PUpgrades['H5P.InteractiveVideo'] = (function ($) { */ 17: function (parameters, finished) { + if (parameters.interactiveVideo && + parameters.interactiveVideo.assets && + parameters.interactiveVideo.assets.interactions) { var interactions = parameters.interactiveVideo.assets.interactions; for (i = 0; i < interactions.length; i++) { if (interactions[i].buttonOnMobile == undefined) { interactions[i].buttonOnMobile = true; } } + } // Done finished(null, parameters);
0
diff --git a/lib/optimize/ModuleConcatenationPlugin.js b/lib/optimize/ModuleConcatenationPlugin.js @@ -281,9 +281,12 @@ class ModuleConcatenationPlugin { for (const reason of newModule.reasons) { reason.dependency.module = newModule; } - for (const dep of newModule.dependencies) { + for (let i = 0; i < newModule.dependencies.length; i++) { + let dep = newModule.dependencies[i]; if (dep.module) { - for (const reason of dep.module.reasons) { + let reasons = dep.module.reasons; + for (let j = 0; j < reasons.length; j++) { + let reason = reasons[j]; if (reason.dependency === dep) reason.module = newModule; } }
7
diff --git a/articles/tutorials/generic-oauth2-connection-examples.md b/articles/tutorials/generic-oauth2-connection-examples.md @@ -5,22 +5,10 @@ toc: true # Generic OAuth 1.0 and 2.0 Examples -Adding [OAuth 1.0](/oauth1) and [OAuth 2.0](/oauth2) providers as Connections allow you to support providers that are not currently built-in to the [Auth0 Management Dashboard](${manage_url}). +Adding [OAuth 1.0](/oauth1) and [OAuth 2.0](/oauth2) providers as Connections allow you to support providers that are not currently built-in to the [Auth0 Management Dashboard](${manage_url}), like [DigitalOcean](#digitalocean), [Tumblr](#tumblr), and more. This document covers examples of OAuth 1.0/2.0 Connections that you can create by making the appropriate `POST` call to the [Auth0 APIv2's Connections endpoint](/api/v2#!/Connections/post_connections). Please note that doing so requires an [APIv2 token](/api/v2/tokens) with `create:connections` scope. -You will be able to log in using these new providers once your call successfully completes. - -* [DigitalOcean](#digitalocean) -* [Dribble](#dribbble) -* [Imgur](#imgur) -* [JIRA](#jira) -* [Tumblr](#tumblr) -* [Twitch](#twitch) -* [Uber](#uber) -* [Vimeo](#vimeo) -* [Xing](#xing) - ## DigitalOcean 1. Navigate to [Digital Ocean](https://cloud.digitalocean.com/login).
2
diff --git a/src/components/App/App.module.scss b/src/components/App/App.module.scss min-width: 320px; margin: 0 auto; display: flex; + flex-direction: column; align-items: stretch; background-color: var(--main-bg-color);
7
diff --git a/js/bootstrap-select.js b/js/bootstrap-select.js // for backwards compatibility // (using title as placeholder is deprecated - remove in v2.0.0) - if (attributesObject.title) attributesObject.placeholder = attributesObject.title; + if (!attributesObject.placeholder && attributesObject.title) attributesObject.placeholder = attributesObject.title; return attributesObject; }
11
diff --git a/login.js b/login.js @@ -24,7 +24,7 @@ async function pullUserObject() { const res = await fetch(`https://accounts.webaverse.com/${address}`); const result = await res.json(); // console.log('pull user object', result); - const {name, avatarUrl, avatarFileName, avatarPreview, ftu} = result; + const {name, avatarUrl, avatarFileName, avatarPreview, loadout, homeSpaceUrl, homeSpaceFileName, homeSpacePreview, ftu} = result; /* const {web3} = await blockchain.load(); const contractSource = await getContractSource('getUserData.cdc'); @@ -50,6 +50,12 @@ async function pullUserObject() { filename: avatarFileName, preview: avatarPreview, }, + loadout, + homespace: { + url: homeSpaceUrl, + filename: homeSpaceFileName, + preview: homeSpacePreview, + }, ftu, }; } @@ -395,6 +401,14 @@ class LoginManager extends EventTarget { return userObject && userObject.avatar.preview; } + getLoadout() { + return userObject && userObject.avatar; + } + + getHomespace() { + return userObject && userObject.homespace; + } + async setAvatar(id) { if (loginToken) { // const {mnemonic} = loginToken;
0
diff --git a/src/core/util.js b/src/core/util.js @@ -131,8 +131,14 @@ util.supportsTouch = function () { return 'ontouchstart' in window || navigator.msMaxTouchPoints; }; +var webGLSupportedAndEnabled = null; util.isWebGLSupported = function () { - return !!window.WebGLRenderingContext; + if (webGLSupportedAndEnabled === null) { + var canvas = document.createElement('canvas'); + webGLSupportedAndEnabled = !!window.WebGLRenderingContext && + !!(canvas.getContext('webgl') || canvas.getContext('experimental-webgl')); + } + return webGLSupportedAndEnabled; }; /**
7
diff --git a/extension/manifest.json b/extension/manifest.json "applications": { "gecko": { "id": "[email protected]", - "strict_min_version": "46.0", + "strict_min_version": "57.0", "update_url": "https://www.creesch.com/tb/update.json" } },
12
diff --git a/includes/Modules/Search_Console.php b/includes/Modules/Search_Console.php @@ -127,7 +127,6 @@ final class Search_Console extends Module implements Module_With_Screen, Module_ // GET. 'sites' => 'webmasters', 'matched-sites' => 'webmasters', - 'sc-site-analytics' => 'webmasters', 'index-status' => 'webmasters', 'searchanalytics' => 'webmasters', @@ -182,18 +181,6 @@ final class Search_Console extends Module implements Module_With_Screen, Module_ } return $this->create_search_analytics_data_request( $data_request ); - case 'sc-site-analytics': - $page = ! empty( $data['url'] ) ? $data['url'] : ''; - $date_range = ! empty( $data['dateRange'] ) ? $data['dateRange'] : 'last-28-days'; - $date_range = $this->parse_date_range( $date_range, 2, 3 ); - return $this->create_search_analytics_data_request( - array( - 'dimensions' => array( 'date' ), - 'start_date' => $date_range[0], - 'end_date' => $date_range[1], - 'page' => $page, - ) - ); case 'index-status': return $this->create_search_analytics_data_request( array( @@ -292,7 +279,6 @@ final class Search_Console extends Module implements Module_With_Screen, Module_ 'propertyMatches' => $property_matches, // (array) of site objects, or empty array if none. ); case 'searchanalytics': - case 'sc-site-analytics': case 'index-status': return $response->getRows(); }
2
diff --git a/src/nwjs_browsertest.cc b/src/nwjs_browsertest.cc #include "content/public/test/ppapi_test_utils.h" #endif +#include "third_party/blink/public/common/switches.h" + using extensions::ContextMenuMatcher; using extensions::ExtensionsAPIClient; using extensions::MenuItem; @@ -470,7 +472,7 @@ class NWWebViewTestBase : public extensions::PlatformAppBrowserTest { void SetUpCommandLine(base::CommandLine* command_line) override { command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream); - command_line->AppendSwitchASCII(switches::kJavaScriptFlags, "--expose-gc"); + command_line->AppendSwitchASCII(blink::switches::kJavaScriptFlags, "--expose-gc"); extensions::PlatformAppBrowserTest::SetUpCommandLine(command_line); base::PathService::Get(base::DIR_SOURCE_ROOT, &test_data_dir_);
5
diff --git a/plugin/notes/notes.js b/plugin/notes/notes.js @@ -21,6 +21,9 @@ var RevealNotes = (function() { var notesPopup = window.open( notesFilePath, 'reveal.js - Notes', 'width=1100,height=700' ); + // Allow popup window access to Reveal API + notesPopup.Reveal = this.Reveal; + /** * Connect to the notes window through a postmessage handshake. * Using postmessage enables us to work in situations where the
11
diff --git a/src/client/js/components/PageEditor/GridEditModal.jsx b/src/client/js/components/PageEditor/GridEditModal.jsx @@ -57,7 +57,7 @@ export default class GridEditModal extends React.PureComponent { <div className="device-titile-bar">Large Desktop</div> <div className="device-container"></div> </div> - <div className="row col-9 flex-nowrap overflow-auto">{this.showCols()}</div> + <div className="row col-9 flex-nowrap overflow-auto">{this.showColsBg()}</div> </div> </div> </ModalBody>
10
diff --git a/app/shared/components/Global/Data/Resource/Percentage.js b/app/shared/components/Global/Data/Resource/Percentage.js @@ -20,7 +20,7 @@ export default class GlobalDataResourcePercentage extends Component<Props> { color={color} label={( <div className="label"> - {percentageToDisplay.toFixed(3)}% + {(percentageToDisplay || 0).toFixed(3)}% {' '} <Responsive as="span" minWidth={800} /> </div>
9
diff --git a/app/models/street/StreetEdgePriorityTable.scala b/app/models/street/StreetEdgePriorityTable.scala @@ -111,7 +111,7 @@ object StreetEdgePriorityTable { /** * Recalculate the priority attribute for all streetEdges. (This uses hardcoded min-max normalization) - * @param rankParameterGeneratorList list of functions that will generate a number for each streetEdge + * @param rankParameterGeneratorList list of functions that will generate a number (normalized to between 0 and 1) for each streetEdge * @param weightVector that will be used to weight the generated parameters. This should be a list of positive real numbers between 0 and 1 that sum to 1. * @return */ @@ -127,8 +127,7 @@ object StreetEdgePriorityTable { // Run the i'th rankParameter generator. // Store this in the priorityParamTable variable val priorityParamTable: List[StreetEdgePriorityParameter] = f_i() - var normalizedPriorityParamTable : List[StreetEdgePriorityParameter] = normalizePriorityParamMinMax(priorityParamTable) - normalizedPriorityParamTable.foreach{ street_edge => + priorityParamTable.foreach{ street_edge => val q2 = for { edg <- streetEdgePriorities if edg.regionId === street_edge.regionId && edg.streetEdgeId === street_edge.streetEdgeId } yield edg.priority val tempPriority = q2.list.head + street_edge.priorityParameter*w_i val updatePriority = q2.update(tempPriority) @@ -165,6 +164,7 @@ object StreetEdgePriorityTable { | AND street_edge.deleted = FALSE | ORDER BY street_edge.street_edge_id,region.region_id,region.region_id""".stripMargin ) - selectCompletionCountQuery.list + val priorityParamTable = selectCompletionCountQuery.list + normalizePriorityParamMinMax(priorityParamTable) } } \ No newline at end of file
5
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -10,6 +10,25 @@ https://github.com/plotly/plotly.js/compare/vX.Y.Z...master where X.Y.Z is the semver of most recent plotly.js release. +## [1.51.2] -- 2019-11-25 + +### Fixed +- Fix `texttemplate`formatting on axes that define + tick prefixes and suffixes [#4380, #4384] +- Fix `cmin` and `cmax` computations during color + value updates on shared color axes [#4366] +- Fix `contour` and `histogram2dcontour` legend item + rendering when `reversescale` is turned on [#4356] +- Fix `contour` and `histogram2dcontour` legend item + rendering when set to a shared color axis [#4356] +- Handle missing `vertexcolor` and `facecolor` during `mesh3d` rendering [#4353] +- No longer coerce `contour` and `colorscale` attributes for `mesh3d` + when not needed [#4346] +- Remove a duplicate function call in `parcoords` code [#4357] +- Include `opacity` in the `surface` trace plot schema [#4344] +- Mention `legend.bgcolor` default in attribute description [#4362] + + ## [1.51.1] -- 2019-11-04 ### Fixed
3
diff --git a/src/menelaus_roles.erl b/src/menelaus_roles.erl @@ -141,7 +141,9 @@ roles_spock() -> {cluster_admin, [], [{name, <<"Cluster Admin">>}, {desc, <<"Can manage all cluster features EXCEPT security.">>}], - [{[admin], none}, + [{[admin, internal], none}, + {[admin, security], none}, + {[admin, diag], read}, {[n1ql, curl], none}, {[], all}]}, {bucket_admin, [bucket_name],
11
diff --git a/src/zoid/buttons/component.jsx b/src/zoid/buttons/component.jsx @@ -284,6 +284,12 @@ export const getButtonsComponent : () => ButtonsComponent = memoize(() => { }, correlationID: { + type: 'string', + required: false, + value: getCorrelationID + }, + + sdkCorrelationID: { type: 'string', required: false, value: getCorrelationID,
10
diff --git a/tools/metadata/src/helpers.ts b/tools/metadata/src/helpers.ts @@ -51,7 +51,7 @@ export async function getTokenSymbol( } } -export async function getTokenDecimals( +export function getTokenDecimals( tokenAddress: string, provider: ethers.providers.BaseProvider ) { @@ -59,5 +59,5 @@ export async function getTokenDecimals( throw Error(`Invalid 'tokenAddress' parameter`) } - return await getContract(tokenAddress, ERC20_ABI, provider).decimals() + return getContract(tokenAddress, ERC20_ABI, provider).decimals() }
2
diff --git a/bids-validator/cli.js b/bids-validator/cli.js @@ -19,12 +19,18 @@ const exitProcess = issues => { } } +const errorToString = err => { + if (err instanceof Error) return err.stack + else if (typeof err === 'object') return JSON.parse(err) + else return err +} + export default function(dir, options) { process.on('unhandledRejection', err => { console.log( format.unexpectedError( // eslint-disable-next-line - `Unhandled rejection (reason: ${JSON.stringify(err)}).`, + `Unhandled rejection (\n reason: ${errorToString(err)}\n).\n`, ), ) process.exit(3)
7
diff --git a/devices.js b/devices.js @@ -308,7 +308,7 @@ const generic = { }, light_onoff_brightness_colortemp: { supports: 'on/off, brightness, color temperature', - fromZigbee: [fz.color_colortemp, fz.on_off, fz.brightness], + fromZigbee: [fz.color_colortemp, fz.on_off, fz.brightness, fz.ignore_basic_report], toZigbee: [ tz.light_onoff_brightness, tz.light_colortemp, tz.ignore_transition, tz.light_alert, tz.light_brightness_move, @@ -316,7 +316,7 @@ const generic = { }, light_onoff_brightness_colorxy: { supports: 'on/off, brightness, color xy', - fromZigbee: [fz.color_colortemp, fz.on_off, fz.brightness], + fromZigbee: [fz.color_colortemp, fz.on_off, fz.brightness, fz.ignore_basic_report], toZigbee: [ tz.light_onoff_brightness, tz.light_color, tz.ignore_transition, tz.light_alert, tz.light_brightness_move,
8
diff --git a/src/components/pill/pill.spec.js b/src/components/pill/pill.spec.js @@ -10,6 +10,7 @@ import { rootTagTest } from '../../utils/helpers/tags/tags-specs/tags-specs'; import { assertStyleMatch } from '../../__spec_helper__/test-utils'; import smallTheme from '../../style/themes/small'; import classicTheme from '../../style/themes/classic'; +import baseTheme from '../../style/themes/base'; const classicStyleTypes = [ 'default', @@ -157,11 +158,27 @@ describe('Pill', () => { padding: '2px 27px 2px 8px' }, wrapper); }); + describe('when the component is in a filled state', () => { + const style = 'neutral'; + const fillWrapper = render({ + children: 'My Text', + onDelete: jest.fn(), + as: style, + fill: true, + theme + }); + it(`matches the expected filled styling for ${style}`, () => { + assertStyleMatch({ + backgroundColor: styleSet.colors[style] + }, fillWrapper); + }); + }); }); describe.each(modernStyleTypes)( 'when the pill style is set as "%s"', (style) => { + describe('when storybook supplies the correct theme', () => { const wrapper = render({ children: 'My Text', as: style, @@ -173,7 +190,7 @@ describe('Pill', () => { border: `2px solid ${styleSet.colors[style]}` }, wrapper); }); - + }); describe('when the component is in a filled state', () => { const fillWrapper = render({ children: 'My Text', @@ -201,7 +218,6 @@ describe('Pill', () => { </ThemeProvider> ); }; - it('matches the expected styles for a default pill', () => { const wrapper = renderClassic({ children: 'My Text', theme: classicTheme }, TestRenderer.create).toJSON(); assertStyleMatch({ @@ -228,6 +244,21 @@ describe('Pill', () => { padding: '2px 19px 2px 7px' }, wrapper); }); + describe('when the component is in a filled state', () => { + const fillWrapper = render({ + children: 'My Text', + onDelete: jest.fn(), + fill: true, + theme: classicTheme + }); + it('matches the expected filled styling', () => { + const style = 'default'; + const colourSet = classicStyleConfig[style]; + assertStyleMatch({ + backgroundColor: colourSet.color + }, fillWrapper); + }); + }); }); describe.each(classicStyleTypes)( @@ -264,4 +295,54 @@ describe('Pill', () => { } ); }); + + describe('base theme', () => { + const renderBase = (props, renderer = mount) => { + return renderer( + <ThemeProvider theme={ baseTheme }> + <Pill { ...props } /> + </ThemeProvider> + ); + }; + it('switches to use the modern small theme', () => { + const wrapper = renderBase({ + children: 'My Text', + theme: baseTheme + }, TestRenderer.create).toJSON(); + assertStyleMatch({ + borderRadius: '12px', + fontSize: '14px', + fontWeight: '600', + position: 'relative', + top: '-1px', + padding: '2px 8px 2px 8px', + margin: '0px 8px 16px 0px' + }, wrapper); + }); + }); + describe('when storybook supplies classic theme with a modern colour variant', () => { + const renderBase = (props, renderer = mount) => { + return renderer( + <ThemeProvider theme={ classicTheme }> + <Pill { ...props } /> + </ThemeProvider> + ); + }; + it('switches to use the modern small theme', () => { + const wrapper = renderBase({ + children: 'My Text', + as: 'neutral', + theme: classicTheme + }, TestRenderer.create).toJSON(); + assertStyleMatch({ + borderRadius: '12px', + fontSize: '14px', + fontWeight: '600', + position: 'relative', + top: '-1px', + padding: '2px 8px 2px 8px', + margin: '0px 8px 16px 0px' + }, wrapper); + }); + }); });
7
diff --git a/package.json b/package.json { "name": "prettier-atom", "main": "./dist/main.js", - "version": "0.48.1", + "version": "0.49.0", "description": "Atom plugin for formatting JavaScript using prettier with (optional) prettier-eslint integration", "keywords": [ "atom",
6
diff --git a/README.md b/README.md @@ -25,16 +25,16 @@ $ git clone https://github.com/havfo/multiparty-meeting.git $ cd multiparty-meeting ``` -* Copy `server/config.example.js` to `server/config.js` : +* Copy `server/config/config.example.js` to `server/config/config.js` : ```bash -$ cp server/config.example.js server/config.js +$ cp server/config/config.example.js server/config/config.js ``` -* Copy `app/public/config.example.js` to `app/public/config.js` : +* Copy `app/public/config/config.example.js` to `app/public/config/config.js` : ```bash -$ cp app/public/config.example.js app/public/config.js +$ cp app/public/config/config.example.js app/public/config/config.js ``` * Edit your two `config.js` with appropriate settings (listening IP/port, logging options, **valid** TLS certificate, etc).
3
diff --git a/packages/mjml-core/src/createComponent.js b/packages/mjml-core/src/createComponent.js @@ -131,7 +131,7 @@ export class BodyComponent extends Component { return reduce( stylesObject, (output, value, name) => { - if (value) { + if (!isNil(value)) { return `${output}${name}:${value};` } return output
11
diff --git a/src/middleware/packages/inference/service.js b/src/middleware/packages/inference/service.js @@ -28,6 +28,9 @@ module.exports = { if (quad.predicate.id === 'http://www.w3.org/2002/07/owl#inverseOf') { inverseRelations[quad.object.id] = quad.subject.id; inverseRelations[quad.subject.id] = quad.object.id; + } else if (quad.predicate.id === 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type' && quad.object.id === 'http://www.w3.org/2002/07/owl#SymmetricProperty') { + // SymmetricProperty implies an inverse relation with the same properties + inverseRelations[quad.subject.id] = quad.subject.id; } } else { console.log(`Found ${Object.keys(inverseRelations).length} inverse relations in ${ontology.owl}`);
9
diff --git a/bake.html b/bake.html <script src="./bin/geometry.js"></script> <script type=module> import * as THREE from './three.module.js'; + import {CSG} from './three-csg.js'; import App from './app.js'; import {renderer, scene, camera, orthographicCamera} from './app-object.js'; import {world} from './world.js'; import {parseQuery, parseExtents, isInIframe} from './util.js'; // import {homeScnUrl, rarityColors} from './constants.js'; + // window.CSG = CSG; + const cameraPosition = new THREE.Vector3(0, 100, 0); const cameraTarget = new THREE.Vector3(cameraPosition.x, 0, cameraPosition.z); const perspectiveOffset = new THREE.Vector3(2, 0, -5); const app = new App(); await app.waitForLoad(); - await world.addObject(q.u, null, new THREE.Vector3(), new THREE.Quaternion()); + const object = await world.addObject(q.u, null, new THREE.Vector3(), new THREE.Quaternion()); + // window.object = object; + object.traverse(o => { + if (o.isMesh) { + const bsp = CSG.fromMesh(o); + console.log('got bsp', bsp); + } + }); } })().catch(console.warn); </script>
0
diff --git a/articles/quickstart/webapp/aspnet-core/_includes/_login.md b/articles/quickstart/webapp/aspnet-core/_includes/_login.md @@ -92,6 +92,33 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF Also note above that the list of scopes is cleared and only the `openid` scope is requested. By default the OIDC middleware will request both the `openid` and the `profile` scopes and can result in a large `id_token` being returned. It is suggested that you be more explicit about the scopes you want to be returned and not ask for the entire profile to be returned. Requesting additional scopes is discussed later in the [User Profile step](/quickstart/webapp/aspnet-core/05-user-profile). +### Obtaining an Access Token for calling an API + +You may want to call an API from your MVC application, in which case you need to obtain an `access_token` which was issued for the particular API you want to call. In this case you will need to pass an extra `audience` parameter containing the API Identifier to the Auth0 authorization endpoint. + +If you want to do this, simple handle the `OnRedirectToIdentityProvider` event when configuring the `OpenIdConnectOptions` object, and add the `audience` parameter to the `ProtocolMessage` + +```csharp +var options = new OpenIdConnectOptions("Auth0") +{ + // Other configuration and standard parameters + // ... + Events = new OpenIdConnectEvents + { + OnRedirectToIdentityProvider = context => + { + context.ProtocolMessage.SetParameter("audience", "YOUR_API_IDENTIFIER"); + + return Task.FromResult(0); + } + } +}; +``` + +For more information on storing and saving the `access_token` to use later when calling the API, see the [Storing Tokens step](/quickstart/webapp/aspnet-core/03-storing-tokens). + +For general information on using APIs with web applications, please read [Calling APIs from Server-side Web Apps](https://auth0.com/docs/api-auth/grant/authorization-code). + ## Add Login and Logout Methods Next, you will need to add `Login` and `Logout` actions to the `AccountController`.
0
diff --git a/apps/setting/settings.js b/apps/setting/settings.js @@ -193,7 +193,7 @@ function showThemeMenu() { 'Light BW': ()=>{ upd({ fg:cl("#000"), bg:cl("#fff"), - fg2:cl("#00f"), bg2:cl("#0ff"), + fg2:cl("#000"), bg2:cl("#cff"), fgH:cl("#000"), bgH:cl("#0ff"), dark:false });
3
diff --git a/src/encoded/static/components/award.js b/src/encoded/static/components/award.js @@ -365,7 +365,7 @@ CategoryChart.propTypes = { CategoryChart.contextTypes = { navigate: PropTypes.func, }; - +// Display and handle clicks in the chart of antibodies. class AntibodyChart extends React.Component { constructor() { super(); @@ -462,6 +462,7 @@ class AntibodyChart extends React.Component { ); } } + AntibodyChart.propTypes = { award: PropTypes.object.isRequired, // Award being displayed categoryData: PropTypes.array.isRequired, // Type-specific data to display in a chart @@ -472,6 +473,7 @@ AntibodyChart.propTypes = { AntibodyChart.contextTypes = { navigate: PropTypes.func, }; +// Display and handle clicks in the chart of biosamples. class BiosampleChart extends React.Component { constructor() { super(); @@ -569,7 +571,6 @@ class BiosampleChart extends React.Component { } } - BiosampleChart.propTypes = { award: PropTypes.object.isRequired, // Award being displayed categoryData: PropTypes.array.isRequired, // Type-specific data to display in a chart
0
diff --git a/packages/gatsby-plugin-mdx/loaders/mdx-scopes.js b/packages/gatsby-plugin-mdx/loaders/mdx-scopes.js @@ -12,8 +12,8 @@ module.exports = () => { `const scope_${i} = require('${slash(path.join(abs, file))}').default;` ) .join("\n") + - `export default { - ${files.map((_, i) => "...scope_" + i).join(",\n")} -}` + `export default + Object.assign({}, ${files.map((_, i) => 'scope_' + i).join(',\n')} ) + ` ); };
14
diff --git a/detox/android/detox/src/main/java/com/wix/detox/espresso/scroll/ScrollHelper.java b/detox/android/detox/src/main/java/com/wix/detox/espresso/scroll/ScrollHelper.java @@ -164,9 +164,9 @@ public class ScrollHelper { // Log.d(LOG_TAG, "scroll downx: " + downX + " downy: " + downY + " upx: " + upX + " upy: " + upY); doScroll(view.getContext(), uiController, downX, downY, upX, upY); - // This is highly unnecessary as, in essence, we use a swiper implementation that effectively knows how to avoid fling. - // Nevertheless we cannot validate all use cases in the universe, and since the runtime price is very small, along with - // the fact we've already faced issues in the area in the past, we choose to do run this anyways. + // This is, at least in theory, unnecessary, as we use a swiper implementation that effectively knows how to avoid fling. + // Nevertheless we cannot validate all use cases in the universe, and thus in order to stay robust we assume somehow fling + // might get registered on rare occasions. Since the runtime price is very small, it's better to be safe than sorry... waitForFlingToFinish(view, uiController); } @@ -177,14 +177,17 @@ public class ScrollHelper { } private static void waitForFlingToFinish(View view, UiController uiController) { + int waitTimeMS = 100; // Note: experimentation shows initial lookahead window should be large or we could miss out on future-pending events. int iteration = 0; int startX; int startY; do { - iteration++; startY = view.getScrollY(); startX = view.getScrollX(); - uiController.loopMainThreadForAtLeast(10); + uiController.loopMainThreadForAtLeast(waitTimeMS); + + waitTimeMS = 10; + iteration++; } while ((view.getScrollY() != startY || view.getScrollX() != startX) && iteration < MAX_FLING_WAITS); } }
7
diff --git a/buildspec.yml b/buildspec.yml @@ -6,7 +6,7 @@ phases: nodejs: latest commands: - echo Entered the install phase... - - sudo npm install forever -g + - npm install forever -g - git submodule init - git submodule update - npm install -y
2
diff --git a/packages/raptor-engine/src/framework/__tests__/api-test.ts b/packages/raptor-engine/src/framework/__tests__/api-test.ts @@ -32,7 +32,7 @@ describe('api', () => { const factory = function () { return Foo }; factory.__circular__ = true; const vnode = target.c('x-foo', factory, { className: 'foo' }); - assert.deepEqual(vnode.data.class, { foo: true }); + assert.strictEqual(Foo, vnode.Ctor)); }); });
1
diff --git a/assets/js/modules/search-console/components/dashboard/SearchFunnelWidget/index.js b/assets/js/modules/search-console/components/dashboard/SearchFunnelWidget/index.js @@ -52,11 +52,8 @@ import AnalyticsStats from './AnalyticsStats'; import { CORE_MODULES } from '../../../../../googlesitekit/modules/datastore/constants'; import ActivateModuleCTA from '../../../../../components/ActivateModuleCTA'; import CompleteModuleActivationCTA from '../../../../../components/CompleteModuleActivationCTA'; -import { CORE_LOCATION } from '../../../../../googlesitekit/datastore/location/constants'; -import { Cell, Row } from '../../../../../material-components'; +import { Cell, Grid, Row } from '../../../../../material-components'; import ReportZero from '../../../../../components/ReportZero'; -import { Grid } from '@material-ui/core'; -import ProgressBar from '../../../../../components/ProgressBar'; const { useSelect, useInViewSelect } = Data; const SearchFunnelWidget = ( { @@ -72,14 +69,6 @@ const SearchFunnelWidget = ( { const isAnalyticsActive = useSelect( ( select ) => select( CORE_MODULES ).isModuleActive( 'analytics' ) ); - const adminReauthURL = - useSelect( ( select ) => - select( MODULES_ANALYTICS ).getAdminReauthURL() - ) || ''; - const isNavigatingToReauthURL = useSelect( ( select ) => - select( CORE_LOCATION ).isNavigatingTo( adminReauthURL ) - ); - const dateRangeLength = useSelect( ( select ) => select( CORE_USER ).getDateRangeNumberOfDays() ); @@ -330,7 +319,6 @@ const SearchFunnelWidget = ( { <ReportZero moduleSlug="search-console" /> </Cell> - { ! isNavigatingToReauthURL && ( <Cell { ...halfCellProps }> { ! isAnalyticsActive && ( <ActivateModuleCTA moduleSlug="analytics" /> @@ -341,16 +329,6 @@ const SearchFunnelWidget = ( { <CompleteModuleActivationCTA moduleSlug="analytics" /> ) } </Cell> - ) } - - { isNavigatingToReauthURL && ( - <Cell - { ...halfCellProps } - className="googlesitekit-data-block__loading" - > - <ProgressBar /> - </Cell> - ) } </Row> </Grid> ) }
2
diff --git a/packages/yoroi-extension/app/api/ada/transactions/shelley/transactions.test.js b/packages/yoroi-extension/app/api/ada/transactions/shelley/transactions.test.js @@ -726,7 +726,7 @@ describe('Create signed transactions', () => { const witnesses = signedTx.witness_set(); expect(witnesses.vkeys()).toEqual(undefined); - expect(witnesses.scripts()).toEqual(undefined); + expect(witnesses.native_scripts()).toEqual(undefined); const bootstrapWits = witnesses.bootstraps(); if (bootstrapWits == null) throw new Error('Bootstrap witnesses should not be null'); expect(bootstrapWits.len()).toEqual(1); @@ -806,7 +806,7 @@ describe('Create signed transactions', () => { const witnesses = signedTx.witness_set(); expect(witnesses.vkeys()).toEqual(undefined); - expect(witnesses.scripts()).toEqual(undefined); + expect(witnesses.native_scripts()).toEqual(undefined); const bootstrapWits = witnesses.bootstraps(); if (bootstrapWits == null) throw new Error('Bootstrap witnesses should not be null'); expect(bootstrapWits.len()).toEqual(1); // note: only one witness since we got rid of duplicates @@ -885,7 +885,7 @@ describe('Create signed transactions', () => { const vKeyWits = witnesses.vkeys(); if (vKeyWits == null) throw new Error('Vkey witnesses should not be null'); expect(vKeyWits.len()).toEqual(2); - expect(witnesses.scripts()).toEqual(undefined); + expect(witnesses.native_scripts()).toEqual(undefined); expect(witnesses.bootstraps()).toEqual(undefined); // set is used so order not defined so we sort the list @@ -960,7 +960,7 @@ describe('Create signed transactions', () => { const vKeyWits = witnesses.vkeys(); if (vKeyWits == null) throw new Error('Vkey witnesses should not be null'); expect(vKeyWits.len()).toEqual(2); - expect(witnesses.scripts()).toEqual(undefined); + expect(witnesses.native_scripts()).toEqual(undefined); expect(witnesses.bootstraps()).toEqual(undefined); const txBody = unsignedTxResponse.txBuilder.build();
10
diff --git a/aa_composer.js b/aa_composer.js @@ -256,6 +256,7 @@ function handleTrigger(conn, batch, fPrepare, trigger, stateVars, arrDefinition, conn.addQuery(arrQueries, "INSERT INTO aa_balances (address, asset, balance) VALUES "+arrValues.join(', ')); } byte_balance = objValidationState.assocBalances[address].base; + conn.addQuery(arrQueries, "SAVEPOINT initial_balances"); async.series(arrQueries, function () { conn.query("SELECT storage_size FROM aa_addresses WHERE address=?", [address], function (rows) { if (rows.length === 0) @@ -1115,6 +1116,11 @@ function handleTrigger(conn, batch, fPrepare, trigger, stateVars, arrDefinition, arrResponses.splice(0, arrResponses.length); // start over Object.keys(stateVars).forEach(function (address) { delete stateVars[address]; }); batch.clear(); + conn.query("ROLLBACK TO SAVEPOINT initial_balances", function () { + console.log('done revert: ' + err); + bounce(err); + }); + /* conn.query("ROLLBACK", function () { conn.query("BEGIN", function () { // initial AA balances were rolled back, we have to add them again @@ -1127,7 +1133,7 @@ function handleTrigger(conn, batch, fPrepare, trigger, stateVars, arrDefinition, }); }); }); - }); + });*/ } function validateAndSaveUnit(objUnit, cb) {
4
diff --git a/test/jasmine/tests/splom_test.js b/test/jasmine/tests/splom_test.js @@ -1684,7 +1684,7 @@ describe('Test splom select:', function() { .then(done, done.fail); }); - it('@gl should redraw splom traces before scattergl trace (if any)', function(done) { + it('@noci @gl should redraw splom traces before scattergl trace (if any)', function(done) { var fig = require('@mocks/splom_with-cartesian.json'); fig.layout.dragmode = 'select'; fig.layout.width = 400;
0
diff --git a/package.json b/package.json { "name": "reason-scripts", - "version": "0.6.11-0", + "version": "0.6.11-2", "description": "Scripts for Create React App with ReasonML.", "repository": "reasonml-community/reason-scripts", "license": "BSD-3-Clause", "babel-loader": "7.0.0", "babel-preset-react-app": "^3.0.1", "babel-runtime": "6.23.0", - "bs-loader": "^1.8.0-1", + "bs-loader": "^1.8.0-2", "case-sensitive-paths-webpack-plugin": "2.1.1", "chalk": "1.1.3", "css-loader": "0.28.4",
4
diff --git a/src/rapidoc.js b/src/rapidoc.js @@ -526,7 +526,7 @@ export default class RapiDoc extends LitElement { window.addEventListener('hashchange', () => { const regEx = new RegExp(`^${this.routePrefix}`, 'i'); const elementId = window.location.hash.replace(regEx, ''); - this.scrollTo(elementId); + this.scrollToPath(elementId); }, true); } @@ -570,7 +570,7 @@ export default class RapiDoc extends LitElement { await this.loadSpec(newVal); // If goto-path is provided and no location-hash is present then try to scroll there if (this.gotoPath && !window.location.hash) { - this.scrollTo(this.gotoPath); + this.scrollToPath(this.gotoPath); } }, 0); } @@ -780,13 +780,13 @@ export default class RapiDoc extends LitElement { if (this.renderStyle === 'view') { this.expandAndGotoOperation(elementId, true, true); } else { - this.scrollTo(elementId); + this.scrollToPath(elementId); } } else if (this.renderStyle === 'focused') { // If goto-path is provided and no location-hash is present then try to scroll to default element if (!this.gotoPath) { const defaultElementId = this.showInfo ? 'overview' : this.resolvedSpec.tags[0]?.paths[0]; - this.scrollTo(defaultElementId); + this.scrollToPath(defaultElementId); } } } @@ -916,14 +916,14 @@ export default class RapiDoc extends LitElement { requestEl.beforerNavigationFocusedMode(); } } - this.scrollTo(navEl.dataset.contentId, true, scrollNavItemToView); + this.scrollToPath(navEl.dataset.contentId, true, scrollNavItemToView); setTimeout(() => { this.isIntersectionObserverActive = true; }, 300); } // Public Method (scrolls to a given path and highlights the left-nav selection) - async scrollTo(elementId, expandPath = true, scrollNavItemToView = true) { + async scrollToPath(elementId, expandPath = true, scrollNavItemToView = true) { if (this.renderStyle === 'focused') { // for focused mode update this.focusedElementId to update the rendering, else it wont find the needed html elements // focusedElementId will get validated in the template
10
diff --git a/lib/node_modules/@stdlib/types/test.ts b/lib/node_modules/@stdlib/types/test.ts import * as array from '@stdlib/types/array'; import * as iter from '@stdlib/types/iter'; -import * as object from '@stdlib/types/object'; +import * as obj from '@stdlib/types/object'; import * as random from '@stdlib/types/random'; /** @@ -145,7 +145,7 @@ function createIterableIterator(): iter.IterableIterator { // The compiler should not throw an error when using object types... { - const desc1: object.DataPropertyDescriptor = { + const desc1: obj.DataPropertyDescriptor = { 'configurable': true, 'enumerable': false, 'writable': false, @@ -155,7 +155,7 @@ function createIterableIterator(): iter.IterableIterator { throw new Error( 'something went wrong' ); } - const desc2: object.DataPropertyDescriptor = { + const desc2: obj.DataPropertyDescriptor = { 'enumerable': false, 'writable': false, 'value': 'beep' @@ -164,7 +164,7 @@ function createIterableIterator(): iter.IterableIterator { throw new Error( 'something went wrong' ); } - const desc3: object.DataPropertyDescriptor = { + const desc3: obj.DataPropertyDescriptor = { 'configurable': true, 'writable': false, 'value': 'beep' @@ -173,7 +173,7 @@ function createIterableIterator(): iter.IterableIterator { throw new Error( 'something went wrong' ); } - const desc4: object.DataPropertyDescriptor = { + const desc4: obj.DataPropertyDescriptor = { 'configurable': true, 'enumerable': false, 'writable': false @@ -182,7 +182,7 @@ function createIterableIterator(): iter.IterableIterator { throw new Error( 'something went wrong' ); } - const desc5: object.DataPropertyDescriptor = { + const desc5: obj.DataPropertyDescriptor = { 'writable': false, 'value': 'beep' }; @@ -190,7 +190,7 @@ function createIterableIterator(): iter.IterableIterator { throw new Error( 'something went wrong' ); } - const desc6: object.DataPropertyDescriptor = { + const desc6: obj.DataPropertyDescriptor = { 'configurable': true, 'value': 'beep' }; @@ -198,7 +198,7 @@ function createIterableIterator(): iter.IterableIterator { throw new Error( 'something went wrong' ); } - const desc7: object.DataPropertyDescriptor = { + const desc7: obj.DataPropertyDescriptor = { 'enumerable': false, 'value': 'beep' }; @@ -206,7 +206,7 @@ function createIterableIterator(): iter.IterableIterator { throw new Error( 'something went wrong' ); } - const desc8: object.DataPropertyDescriptor = { + const desc8: obj.DataPropertyDescriptor = { 'enumerable': false, 'writable': false }; @@ -214,7 +214,7 @@ function createIterableIterator(): iter.IterableIterator { throw new Error( 'something went wrong' ); } - const desc9: object.AccessorPropertyDescriptor = { + const desc9: obj.AccessorPropertyDescriptor = { 'configurable': true, 'enumerable': false, 'get': (): string => 'beep', @@ -224,7 +224,7 @@ function createIterableIterator(): iter.IterableIterator { throw new Error( 'something went wrong' ); } - const desc10: object.AccessorPropertyDescriptor = { + const desc10: obj.AccessorPropertyDescriptor = { 'enumerable': false, 'get': (): string => 'beep', 'set': () => { throw new Error( 'beep' ); } @@ -233,7 +233,7 @@ function createIterableIterator(): iter.IterableIterator { throw new Error( 'something went wrong' ); } - const desc11: object.AccessorPropertyDescriptor = { + const desc11: obj.AccessorPropertyDescriptor = { 'configurable': true, 'get': (): string => 'beep', 'set': () => { throw new Error( 'beep' ); } @@ -242,7 +242,7 @@ function createIterableIterator(): iter.IterableIterator { throw new Error( 'something went wrong' ); } - const desc12: object.AccessorPropertyDescriptor = { + const desc12: obj.AccessorPropertyDescriptor = { 'configurable': true, 'enumerable': false, 'set': () => { throw new Error( 'beep' ); } @@ -251,7 +251,7 @@ function createIterableIterator(): iter.IterableIterator { throw new Error( 'something went wrong' ); } - const desc13: object.AccessorPropertyDescriptor = { + const desc13: obj.AccessorPropertyDescriptor = { 'configurable': true, 'enumerable': false, 'get': (): string => 'beep' @@ -260,7 +260,7 @@ function createIterableIterator(): iter.IterableIterator { throw new Error( 'something went wrong' ); } - const desc14: object.AccessorPropertyDescriptor = { + const desc14: obj.AccessorPropertyDescriptor = { 'get': (): string => 'beep', 'set': () => { throw new Error( 'beep' ); } }; @@ -268,7 +268,7 @@ function createIterableIterator(): iter.IterableIterator { throw new Error( 'something went wrong' ); } - const desc15: object.PropertyDescriptor = { + const desc15: obj.PropertyDescriptor = { 'configurable': true, 'enumerable': false, 'writable': false, @@ -278,7 +278,7 @@ function createIterableIterator(): iter.IterableIterator { throw new Error( 'something went wrong' ); } - const prop: object.PropertyName = 'foo'; + const prop: obj.PropertyName = 'foo'; if ( prop !== 'foo' ) { throw new Error( 'something went wrong' ); }
10
diff --git a/docker-compose.yml b/docker-compose.yml -version: '3.1' +version: "3.1" services: db: image: postgres @@ -12,6 +12,8 @@ services: build: . command: bundle exec sidekiq -q default -q mailers volumes: + - /circuitverse/.bundle + - /circuitverse/node_modules - .:/circuitverse - ./config/database.docker.yml:/circuitverse/config/database.yml environment: @@ -20,6 +22,8 @@ services: build: . entrypoint: /circuitverse/bin/docker_run volumes: + - /circuitverse/.bundle + - /circuitverse/node_modules - .:/circuitverse - ./config/database.docker.yml:/circuitverse/config/database.yml ports:
1
diff --git a/src/extensions/default/SVGCodeHints/main.js b/src/extensions/default/SVGCodeHints/main.js @@ -145,7 +145,7 @@ define(function (require, exports, module) { * * @param {!Editor} editor An instance of Editor * @param {string} implicitChar A single character that was inserted by the - * user or null if the request was explicity made to start hinting session. + * user or null if the request was explicitly made to start hinting session. * * @return {boolean} Determines whether or not hints are available in the current context. */
1
diff --git a/assets/src/edit-story/components/library/panes/text/karma/textPane.karma.js b/assets/src/edit-story/components/library/panes/text/karma/textPane.karma.js @@ -41,6 +41,10 @@ describe('CUJ: Creator can Add and Write Text: Consecutive text presets', () => it('should add text presets below each other if added consecutively', async () => { await fixture.editor.library.textTab.click(); + // @todo Remove this once #4094 gets fixed! + // Wait until the history has changed to its initial (incorrect due to a bug) position. + await fixture.events.sleep(300); + await fixture.events.click(fixture.editor.library.text.preset('Heading 1')); await fixture.events.click(fixture.editor.library.text.preset('Heading 3')); await fixture.events.click(fixture.editor.library.text.preset('Paragraph'));
1
diff --git a/index.js b/index.js @@ -54,7 +54,7 @@ function createBot(options) { options.version = options.version || false; var bot = new Bot(); pluginLoader(bot, options); - bot.loadPlugins(Object.values(plugins)); + bot.loadPlugins(Object.keys(plugins).map(function(key){ return plugins[key] })); bot.connect(options); return bot; }
14
diff --git a/token-metadata/0x3dfeaF13a6615e560Aecc5648Ace8FA50d7cF6bF/metadata.json b/token-metadata/0x3dfeaF13a6615e560Aecc5648Ace8FA50d7cF6bF/metadata.json "symbol": "NTS", "address": "0x3dfeaF13a6615e560Aecc5648Ace8FA50d7cF6bF", "decimals": 12, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/source/agent/video/index.js b/source/agent/video/index.js @@ -675,7 +675,7 @@ function VTranscoder(rpcClient, clusterIP) { default_resolution = {width: 0, height: 0}, default_framerate = 30, - default_kfi = -1, + default_kfi = 1000, input_id = undefined, input_conn = undefined,
12
diff --git a/src/client/components/composer/NewRequest/ComposerNewRequest.jsx b/src/client/components/composer/NewRequest/ComposerNewRequest.jsx @@ -362,7 +362,7 @@ class ComposerNewRequest extends Component { && !this.props.newRequestFields.gRPC && !/wss?:\/\//.test(this.props.newRequestFields.protocol) && - <div class='composer_subtitle_SSE'> + <div className='composer_subtitle_SSE'> <input type="checkbox" onChange={this.handleSSEPayload} checked={this.props.newRequestSSE.isSSE}/> Server Sent Events </div>
1
diff --git a/app/builtin-pages/views/library-view.js b/app/builtin-pages/views/library-view.js @@ -347,7 +347,7 @@ function renderNetworkView () { <div class="container"> <div class="view network"> <div class="section"> - <h2>Download status</h2> + <h2 class="subtitle-heading">Download status</h2> <progress value=${progress.current} max="100"> ${progress.current} @@ -369,7 +369,7 @@ function renderNetworkView () { </div> <div class="section"> - <h2>Network activity (last hour)</h2> + <h2 class="subtitle-heading">Network activity (last hour)</h2> ${renderPeerHistoryGraph(archive.info)} </div>
4
diff --git a/src/test/qa/functions/ssh_functions.js b/src/test/qa/functions/ssh_functions.js @@ -38,11 +38,7 @@ function ssh_exec(client, command, reject_on_exit_code) { resolve(); } }); - })) - .catch(err => { - console.log(err); - throw err; - }); + })); } //will do ssh stick which will relese the need to enter password for each ssh session
2
diff --git a/iris/mutations/channel/archiveChannel.js b/iris/mutations/channel/archiveChannel.js @@ -48,7 +48,9 @@ export default async ( if ( currentUserCommunityPermissions.isOwner || - currentUserChannelPermissions.isOwner + currentUserChannelPermissions.isOwner || + currentUserCommunityPermissions.isModerator || + currentUserChannelPermissions.isModerator ) { return await archiveChannel(channelId); }
11
diff --git a/README.md b/README.md Alloy is the code name for the Adobe Experience Platform Web SDK. It allows for recording events into Adobe Experience Platform, syncing identities, personalizing content, and more. -For documentation on how to use Alloy, please see the [user documentation](https://adobe.ly/36dGGp6). +For documentation on how to use Alloy, please see the [user documentation](https://experienceleague.adobe.com/docs/experience-platform/edge/home.html). For documentation on how to contribute to Alloy, please see the [developer documentation](https://github.com/adobe/alloy/wiki).
1
diff --git a/src/WebMidi.js b/src/WebMidi.js @@ -12,11 +12,19 @@ import {Enumerations} from "./Enumerations.js"; // convoluted way to prevent Webpack from automatically bundling it in browser bundles where it // isn't needed. if (Utilities.isNode) { + + // Some environments may have both Node.js and browser runtimes (Electron, NW.js, React Native, + // etc.) so we also check for the presence of the window.navigator property. + try { + window.navigator; + } catch (err) { let jzz; eval('jzz = require("jzz")'); global["navigator"] = jzz; } +} + /*END-CJS*/ /** @@ -220,12 +228,20 @@ class WebMidi extends EventEmitter { // package.json file), then we must import the `jzz` module. I import it in this convoluted way // to prevent Webpack from automatically bundling it in browser bundles where it isn't needed. if (Utilities.isNode) { + + // Some environments may have both Node.js and browser runtimes (Electron, NW.js, React + // Native, etc.) so we also check for the presence of the window.navigator property. + try { + window.navigator; + } catch (err) { global["navigator"] = await Object.getPrototypeOf(async function() {}).constructor(` jzz = await import("jzz"); return jzz.default; `)(); } + } + /*END-ESM*/ this.validation = (options.validation !== false); @@ -379,7 +395,7 @@ class WebMidi extends EventEmitter { return this._destroyInputsAndOutputs().then(() => { - if (typeof navigator.close === "function") navigator.close(); + if (navigator && typeof navigator.close === "function") navigator.close(); // jzz if (this.interface) this.interface.onstatechange = undefined; this.interface = null; // also resets enabled, sysexEnabled
7
diff --git a/src/ContentItemsMixin.js b/src/ContentItemsMixin.js @@ -171,7 +171,7 @@ export default function ContentItemsMixin(Base) { const needsItems = content && !state.items; // Signal from other mixins if (changed.content || needsItems) { const items = content ? - content.filter(item => this[symbols.itemMatchesState](item, state)) : + Array.prototype.filter.call(content, item => this[symbols.itemMatchesState](item, state)) : null; if (items) { Object.freeze(items); @@ -189,7 +189,7 @@ export default function ContentItemsMixin(Base) { if (super[symbols.render]) { super[symbols.render](); } if (this.itemUpdates) { const content = this.state.content || []; - const elements = content.filter(node => node instanceof Element); + const elements = Array.prototype.filter.call(content, node => node instanceof Element); let itemCount = 0; elements.forEach((item) => { if (item[originalKey] === undefined) {
9
diff --git a/lib/network.js b/lib/network.js @@ -360,10 +360,18 @@ function getWindowsIEEE8021x(connectionType, iface, ifaces) { const SSID = getWindowsWirelessIfaceSSID(iface); if(SSID !== 'Unknown') { let i8021xState = execSync(`netsh wlan show profiles "${SSID}" | findstr "802.1X"`, util.execOptsWin); + if(i8021xState){ i8021x.state = i8021xState.split(':').pop(); + } else{ + i8021x.state = "Disabled"; + } console.log('WIRELESS STATE 802',i8021x.state); let i8021xProtocol = execSync(`netsh wlan show profiles "${SSID}" | findstr "EAP"`, util.execOptsWin); + if(i8021xProtocol){ i8021x.protocol = i8021xProtocol.split(':').pop(); + } else{ + i8021x.protocol = "Disabled"; + } console.log('WIRELESS PROTOCOL 802',i8021x.protocol); } return i8021x;
9
diff --git a/exampleSite/config.toml b/exampleSite/config.toml @@ -86,36 +86,6 @@ lastmod = ["lastmod", ":git", "date"] name = "Docs" weight = 30 -[[menu.main]] - url = "/dev" - name = "Dev Section" - weight = 35 - identifier = "dev" - -[[menu.main]] - url = "/dev" - name = "Dev Section" - weight = 10 - parent = "dev" - -[[menu.main]] - url = "/dev/colors" - name = "Colors" - weight = 20 - parent = "dev" - -[[menu.main]] - url = "/dev/blog" - name = "Blog" - weight = 30 - parent = "dev" - -[[menu.main]] - url = "/dev/events" - name = "Events" - weight = 40 - parent = "dev" - [[menu.main]] url = "/about" name = "About"
2
diff --git a/modules/xerte/parent_templates/Nottingham/models_html5/connectorMenu.html b/modules/xerte/parent_templates/Nottingham/models_html5/connectorMenu.html } this.init = function() { - var allIDs = [], // linkIDs of all pages in LO - menuItems = []; // index of pages in allIDs that should be included in menu - - // get list of all linkIDs - $(x_pageInfo).each(function() { - allIDs.push(this.linkID); - }); - + var menuItems = []; // work out which pages to include in menu item list... // use pages set in child nodes if ($(x_currentPageXML).children().length > 0) { $(x_currentPageXML).children().each(function() { - menuItems.push(jQuery.inArray(this.getAttribute("pageID"), allIDs)); + menuItems.push(this.getAttribute("pageID")); }); } else { // use pages between endPageID / startPageID + var allIDs = []; + $(x_pageInfo).each(function() { + allIDs.push(this.linkID); + }); + if ((x_currentPageXML.getAttribute("startPageID") != undefined && x_currentPageXML.getAttribute("startPageID") != "") || (x_currentPageXML.getAttribute("endPageID") != undefined && x_currentPageXML.getAttribute("endPageID") != "")) { var start = jQuery.inArray(x_currentPageXML.getAttribute("startPageID"), allIDs), end = jQuery.inArray(x_currentPageXML.getAttribute("endPageID"), allIDs); } for (var i=0; i<allIDs.length; i++) { - if (i >= start && i <= end) { - menuItems.push(i); + if (i >= start && i <= end && i != x_currentPage && (x_pageInfo[0].type != "menu" || i > 0)) { + menuItems.push(allIDs[i]); } } // use all pages } else { for (var i=0; i<allIDs.length; i++) { - menuItems.push(i); - } - } - // remove current page from menuItems - if (jQuery.inArray(x_currentPage, menuItems) != -1) { - menuItems.splice(jQuery.inArray(x_currentPage, menuItems), 1); + if ((x_pageInfo[0].type != "menu" || i > 0) && i != x_currentPage) { + menuItems.push(allIDs[i]); + } } - - // remove main navigation menu from menuItems (if there is one) - if (x_pageInfo[0].type == "menu" && jQuery.inArray(0, menuItems) != -1) { - menuItems.splice(0, 1); } } $thisItem = $menuItem; } + var page = x_lookupPage("linkID", menuItems[i]); + var name = $.isArray(page) ? this.getNestedName(page) : x_pages[page].getAttribute("name"); + page = $.isArray(page) ? page[0] : page; + $thisItem - .data("id", allIDs[menuItems[i]]) - .html(x_pages[menuItems[i]].getAttribute("name")); + .data("id", menuItems[i]) + .html(name); } $(".subMenuItem") x_pageLoaded(); } + + this.getNestedName = function(page) { + var child = x_pages[page[0]]; + var name = child.getAttribute("name") + for (var i=0; i<page.length-1; i++) { + child = child.childNodes[page[i+1]]; + name += " | " + child.getAttribute("name"); + } + return name; + } } connectorMenu.init();
11
diff --git a/app/stylesheets/builtin-pages/components/feed-item.less b/app/stylesheets/builtin-pages/components/feed-item.less -webkit-font-smoothing: antialiased; .avatar { - width: 35px; - height: 35px; + width: 45px; + height: 45px; margin-right: 5px; } } .post-content { - margin-left: 45px; + margin-left: 55px; line-height: 1; } .post-actions { - margin-left: 45px; + margin-left: 55px; + height: 13px; .vote-icon { right: 15px; } - .avatar { - width: 50px; - height: 50px; - } - .bio { margin-bottom: 0; }
4
diff --git a/appjs/working.js b/appjs/working.js @@ -34,8 +34,12 @@ $(document).ready(function () { openit("#fractions"); closenav(); clearall(); - }) - + }); + $("#logValues").click(function(){ + openit("#log_values"); + closenav(); + clearall(); + }); $("#aboutbutton").click(function () { openit("#about"); closenav();
1
diff --git a/src/server/models/page-tag-relation.js b/src/server/models/page-tag-relation.js @@ -46,7 +46,14 @@ class PageTagRelation { .limit(opt.limit); const tags = await Tag.find({ _id: { $in: list.map((elm) => { return elm._id }) } }); - return list; + const res = list.map((elm) => { + const tag = tags.filter((tag) => { + return (tag.id === String(elm._id)); + }); + const name = tag[0].name; + return { name, count: elm.count }; + }); + return res; } }
14
diff --git a/etc/eslint/.eslintrc.markdown.js b/etc/eslint/.eslintrc.markdown.js @@ -22,6 +22,13 @@ var eslint = copy( defaults ); */ eslint.rules[ 'vars-on-top' ] = 'off'; +/** +* Allow using synchronous methods. +* +* @private +*/ +eslint.rules[ 'no-sync' ] = 'off'; + /** * Allow using `console`. *
11
diff --git a/src/transformers/baseUrl.js b/src/transformers/baseUrl.js @@ -8,11 +8,11 @@ const rewriteVMLs = (html, url) => { const vImageMatch = html.match(/(<v:image.+)(src=['"]([^'"]+)['"])/) const vFillMatch = html.match(/(<v:fill.+)(src=['"]([^'"]+)['"])/) - if (!isUrl(vImageMatch[3])) { + if (vImageMatch && !isUrl(vImageMatch[3])) { html = html.replace(vImageMatch[0], `${vImageMatch[1]}src="${url}${vImageMatch[3]}"`) } - if (!isUrl(vFillMatch[3])) { + if (vFillMatch && !isUrl(vFillMatch[3])) { html = html.replace(vFillMatch[0], `${vFillMatch[1]}src="${url}${vFillMatch[3]}"`) }
0
diff --git a/server/views/sources/source.py b/server/views/sources/source.py @@ -30,7 +30,7 @@ def api_media_sources_by_ids(): source_list = [] source_id_array = request.args['src[]'].split(',') for mediaId in source_id_array: - info = _cached_media_source_details(user_mediacloud_key(), mediaId) + info = _media_source_details(mediaId) source_list.append(info) _add_user_favorite_flag_to_sources(source_list) return jsonify({'results': source_list}) @@ -77,7 +77,7 @@ def _cached_media_source_health(user_mc_key, media_id): return results -def _cached_media_source_details(user_mc_key, media_id, start_date_str=None): +def _media_source_details(media_id): user_mc = user_mediacloud_client() info = user_mc.media(media_id) info['id'] = media_id @@ -102,8 +102,7 @@ def _safely_get_health_start_date(health): @api_error_handler def api_media_source_details(media_id): health = _cached_media_source_health(user_mediacloud_key(), media_id) - info = _cached_media_source_details(user_mediacloud_key(), media_id, - _safely_get_health_start_date(health)) + info = _media_source_details(media_id) info['health'] = health user_mc = user_mediacloud_client() if user_has_auth_role(ROLE_MEDIA_EDIT):
10
diff --git a/definitions/npm/fluture_v6.x.x/flow_v0.34.x-/fluture_v6.x.x.js b/definitions/npm/fluture_v6.x.x/flow_v0.34.x-/fluture_v6.x.x.js @@ -10,13 +10,19 @@ type $npm$Fluture$Fn1<A, B> = (a: A) => B // a unary function // Res = type of returned resolved value declare class Fluture<Rej, Res> { map: <T>(fn: $npm$Fluture$Fn1<Res, T>) => Fluture<Rej, T>, - bimap: <A, B>(left: $npm$Fluture$Fn1<Rej, A>, right: $npm$Fluture$Fn1<Res, B>) => Fluture<A, B>, + bimap: <A, B>( + left: $npm$Fluture$Fn1<Rej, A>, + right: $npm$Fluture$Fn1<Res, B> + ) => Fluture<A, B>, chain: <A, B>(fn: (a: Res) => Fluture<A, B>) => Fluture<A, B>, swap: () => Fluture<Res, Rej>, mapRej: <T>(fn: $npm$Fluture$Fn1<Rej, T>) => Fluture<T, Res>, chainRej: <T>(fn: (a: Rej) => Fluture<T, Res>) => Fluture<T, Res>, // We can't type fold with 2 different types of left and right - fold: <T>(left: $npm$Fluture$Fn1<Rej, T>, right: $npm$Fluture$Fn1<Res, T>) => Fluture<void, T>, + fold: <T>( + left: $npm$Fluture$Fn1<Rej, T>, + right: $npm$Fluture$Fn1<Res, T> + ) => Fluture<void, T>, // We can't infer the type of applied Res(B) ap: <A, B>(a: Fluture<A, B>) => Fluture<A, *>, // We can't infer the first reject or resolve @@ -27,7 +33,10 @@ declare class Fluture<Rej, Res> { finally: (a: Fluture<*, *>) => Fluture<Rej, Res>, lastly: (a: Fluture<*, *>) => Fluture<Rej, Res>, - fork: (rej: $npm$Fluture$Fn1<Rej, *>, res: $npm$Fluture$Fn1<Res, *>) => () => *, + fork: ( + rej: $npm$Fluture$Fn1<Rej, *>, + res: $npm$Fluture$Fn1<Res, *> + ) => () => *, value: (res: $npm$Fluture$Fn1<Res, *>) => () => *, promise: () => Promise<Res>, @@ -44,8 +53,8 @@ declare module fluture { declare type NodeBack<Rej, Res> = (rej: Rej, res: Res) => void declare class Future { - of: <T>(a: T) => Fluture<void, T>, - reject: <T>(a: T) => Fluture<T, void>, + of: <T>(a: T) => Fluture<*, T>, + reject: <T>(a: T) => Fluture<T, *>, after: <T>(a: number, b: T) => Fluture<void, T>, rejectAfter: <T>(a: number, b: T) => Fluture<T, void>, cache: <Rej, Res>(a: Fluture<Rej, Res>) => Fluture<Rej, Res>,
1
diff --git a/rig.js b/rig.js @@ -305,14 +305,15 @@ class RigManager { } async setPeerAvatarUrl(url, ext, peerId) { - // await this.peerRigQueue.lock(); - const oldPeerRig = this.peerRigs.get(peerId); await this.setAvatar(oldPeerRig, newPeerRig => { this.peerRigs.set(peerId, newPeerRig); }, url, ext); + } - // await this.peerRigQueue.unlock(); + async setPeerAvatarAux(aux, peerId) { + const oldPeerRig = this.peerRigs.get(peerId); + oldPeerRig.aux.setPose(aux); } setPeerMicMediaStream(mediaStream, peerId) {
0
diff --git a/_posts/blog/2021-02-12-2021-election-results.md b/_posts/blog/2021-02-12-2021-election-results.md @@ -5,7 +5,7 @@ categories: title: "2021 Board Election Results" description: "On Feb 9, we held our second annual General Meeting and election for our Board of Directors. We were amazed at the turnout. Of our 41 official Members, 28 attended virtually to cast their votes. There were four members chosen by Chi Hack Night Members based on popular vote and two appointed by the current Board of Directors with majority Membership approval." date: 2021-02-12 -image: +image: /images/blog/2019-01-14-board-election/vote.jpg author: Eric Sherman author_url: https://twitter.com/OSGISOMG author_image: /images/people/eric_sherman.jpg
12
diff --git a/lambda/proxy-es/lib/query.js b/lambda/proxy-es/lib/query.js @@ -191,7 +191,7 @@ module.exports = async function (req, res) { const elicitResponseChainingConfig = _.get(res, "session.qnabotcontext.elicitResponse.chainingConfig", undefined); const elicitResponseProgress = _.get(res, "session.qnabotcontext.elicitResponse.progress", undefined); let hit = undefined; - if (elicitResponseChainingConfig && elicitResponseProgress === 'Fulfilled') { + if (elicitResponseChainingConfig && (elicitResponseProgress === 'Fulfilled') || elicitResponseProgress === 'ReadyForFulfillment') { // elicitResponse is finishing up as the LexBot has fulfilled its intent. // we use a fakeHit with either the Bot's message or an empty string. let fakeHit = {};
1
diff --git a/docs/getting-started/README.md b/docs/getting-started/README.md @@ -11,7 +11,7 @@ First, we need to have a canvas in our page. Now that we have a canvas we can use, we need to include Chart.js in our page. ```html -<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.4.0/Chart.min.js" /> +<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.4.0/Chart.min.js"></script> ``` Now, we can create a chart. We add a script to our page:
14
diff --git a/source/views/menu/MenuFilterView.js b/source/views/menu/MenuFilterView.js @@ -31,13 +31,6 @@ const MenuFilterView = Class({ value: bindTwoWay( controller, 'search' ), }); - // Remove Ctrl-/ shortcut from search clear button. - searchTextView - .render() - .get( 'childViews' ) - .last() - .set( 'shortcut', '' ); - return searchTextView; },
2
diff --git a/mods/dispatcher/src/dispatcher.ts b/mods/dispatcher/src/dispatcher.ts @@ -17,7 +17,8 @@ if (process.env.NODE_ENV === 'dev') { function dispatch (channel: any) { try { - const ingressInfo = getIngressInfo(channel.request.extension) + const toHeader = channel.getVariable('TO_HEADER').replace('<', '').replace('>', '') + const ingressInfo = getIngressInfo(toHeader.match(/^([^@]*)@/)[1]) const contents = fs.readFileSync(ingressInfo.entryPoint, 'utf8') const chann = new Verbs(channel, { tts: new MaryTTS(),
14
diff --git a/src/views/Details/NFTCollectionList.vue b/src/views/Details/NFTCollectionList.vue @@ -66,7 +66,7 @@ export default { ) { return this.collectionName } else { - return this.assets.filter((asset) => asset.name)[0]?.name || 'Unknown Collection' + return this.nftCollection.filter((asset) => asset.name)[0]?.name || 'Unknown Collection' } } }
3
diff --git a/aa_composer.js b/aa_composer.js @@ -281,7 +281,7 @@ function readMcUnit(conn, mci, handleUnit) { function readLastUnit(conn, handleUnit) { conn.query("SELECT unit, main_chain_index FROM units ORDER BY main_chain_index DESC LIMIT 1", function (rows) { - if (rows.length !== 1) { + if (rows.length !== 1 || !rows[0].main_chain_index) { if (!conf.bLight) throw Error("found " + rows.length + " last units"); var objMcUnit = { @@ -294,8 +294,6 @@ function readLastUnit(conn, handleUnit) { }; return handleUnit(objMcUnit); } - if (!rows[0].main_chain_index) - throw Error("no mci on last unit?"); readUnit(conn, rows[0].unit, handleUnit); }); }
9
diff --git a/src/payment-flows/checkout.js b/src/payment-flows/checkout.js @@ -159,7 +159,11 @@ function isVaultAutoSetupEligible({ vault, clientAccessToken, createBillingAgree } return isFundingSourceVaultable({ accessToken: clientAccessToken, fundingSource, clientID, merchantID, buyerCountry, currency, - commit, vault, intent, disableFunding, disableCard }); + commit, vault, intent, disableFunding, disableCard }).catch(err => { + + getLogger().warn('funding_vaultable_error', { err: stringifyError(err) }); + return false; + }); }); }
9
diff --git a/core/clipboard.js b/core/clipboard.js @@ -23,16 +23,6 @@ const ICopyable = goog.requireType('Blockly.ICopyable'); */ let copyData = null; -/** - * Get the current contents of the clipboard and associated metadata. - * @return {?ICopyable.CopyData} An - * object containing the clipboard contents and associated metadata. - */ -const getClipboardInfo = function() { - return copyData; -}; -exports.getClipboardInfo = getClipboardInfo; - /** * Copy a block or workspace comment onto the local clipboard. * @param {!ICopyable} toCopy Block or Workspace Comment to be copied.
2
diff --git a/packages/transformers/vue/src/VueTransformer.js b/packages/transformers/vue/src/VueTransformer.js @@ -275,10 +275,16 @@ ${ case 'js': type = 'js'; break; + case 'jsx': + type = 'jsx'; + break; case 'typescript': case 'ts': type = 'ts'; break; + case 'tsx': + type = 'tsx'; + break; case 'coffeescript': case 'coffee': type = 'coffee';
11
diff --git a/deployment-scripts/docker-compose.yml b/deployment-scripts/docker-compose.yml @@ -109,7 +109,7 @@ services: environment: - DF_PROG_NAME="es_master" - node.name=deepfence-es - - discovery.seed_hosts=deepfence-es-slave1,deepfence-es-slave2 +# - discovery.seed_hosts=deepfence-es-slave1,deepfence-es-slave2 - cluster.initial_master_nodes=deepfence-es ulimits: core: 0
8
diff --git a/src/_data/sites/joshcrainio.json b/src/_data/sites/joshcrainio.json "name": "Josh Crain", "description": "Josh Crain has experience as a web designer, product designer, and front-end developer.", "twitter": "thejoshcrain", - "source_url": "https://github.com/joshcrain/eleventy-intro" + "source_url": "https://github.com/joshcrain/joshcrain.io" }
3
diff --git a/assets/js/BouncingBalls.js b/assets/js/BouncingBalls.js @@ -122,12 +122,13 @@ function animate() { if (bal[i].x + bal[i].radius > tx || bal[i].x - bal[i].radius < 0) { bal[i].dx = -bal[i].dx; } + + let distance = Math.floor(Math.sqrt( + Math.pow(mousex - bal[i].x, 2) + Math.pow(mousey - bal[i].y, 2) + )); + // increasing ball's size on mouse triggered. At max the radius of the ball should be less than 70mm. - if (mousex > bal[i].x - 20 && - mousex < bal[i].x + 20 && - mousey > bal[i].y - 50 && - mousey < bal[i].y + 50 && - bal[i].radius < 70) { + if (distance < bal[i].radius && bal[i].radius < 70 ) { bal[i].radius += 5; } else {
4
diff --git a/src/components/nodes/intermediateMessageCatchEvent/index.js b/src/components/nodes/intermediateMessageCatchEvent/index.js @@ -102,6 +102,7 @@ export default { label: 'Message Event Identifier', helper: 'The id field should be unique across all elements in the diagram', name: 'eventDefinitionId', + validation: 'required', }, }, {
12
diff --git a/server/app/app.py b/server/app/app.py @@ -58,7 +58,7 @@ def run_scanpy(args): from .scanpy_engine.scanpy_engine import ScanpyEngine app.data = ScanpyEngine(args.data_directory, layout_method=args.layout, diffexp_method=args.diffexp) - if args.bind_all: + if args.listen_all: host = "0.0.0.0" else: host = "127.0.0.1" @@ -75,7 +75,7 @@ def main(): parser.add_argument("--flask-debug", action="store_true", help=argparse.SUPPRESS) parser.add_argument("--no-open", help="Do not launch the webbrowser.", action="store_false", dest="open_browser") parser.add_argument( - "--bind-all", + "--listen-all", help="Bind to all interfaces (this makes the server accessible beyond this computer)", action="store_true") subparsers = parser.add_subparsers(dest="engine")
10
diff --git a/geometry-worker.js b/geometry-worker.js @@ -74,7 +74,9 @@ const _mergeObject = o => { }; const _mergeFinish = () => { packer.repack(false); - console.log('got bins', packer.bins); + if (packer.bins.length > 1) { + throw new Error('texture overflow'); + } for (const bin of packer.bins) { for (const rect of bin.rects) { const {x, y} = rect;
0
diff --git a/vis/js/reducers/data.js b/vis/js/reducers/data.js @@ -78,8 +78,13 @@ const MANDATORY_ATTRS = { }, }; +const ALLOWED_TYPES = { + area_uri: ["number", "string"], +}; + const sanitizeData = (data) => { let missingAttributes = new Map(); + let wrongTypes = new Set(); data.forEach((entry) => { ATTRS_TO_CHECK.forEach((attr) => { @@ -93,6 +98,13 @@ const sanitizeData = (data) => { entry[attr] = MANDATORY_ATTRS[attr].derive(entry); } } + + if (ALLOWED_TYPES[attr]) { + if (entry[attr] && !ALLOWED_TYPES[attr].includes(typeof entry[attr])) { + entry[attr] = entry[attr].toString(); + wrongTypes.add(attr); + } + } }); }); @@ -104,6 +116,13 @@ const sanitizeData = (data) => { ); }); + if (wrongTypes.size > 0) { + console.warn( + `Incorrect data types found and corrected in the following properties: `, + wrongTypes + ); + } + return data; };
1
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md @@ -49,7 +49,7 @@ Our current maintainers are: Peter Odeny ([@odenypeter](https://github.com/odeny We have 3 main branches in our repo: - `Dev` - All bug fixes and enhancements -- Feature branches (i.e. `ACT-001`) - All feature branches must be named like: ACT-001 (where ACT-001 is the issue number on Jira) +- Feature branches (i.e. `ACT-001`) - All feature branches must be named like: ACT-001 (where ACT-001 is the issue number on GitHub) - `Staging` - This is our QA testing environment - `Master` - Clean code in production environment @@ -58,7 +58,7 @@ We have 3 main branches in our repo: - All pull requests should be based off of the `Dev` branch. - All branch names should follow the issue number such as: `ACT-001`. This should be the Github issue number. -**Commits (Smart Commits)** +**Commits (Smart Commits, only for Jira)** - For us to be able to track and link our issues on Github, we use smart commits (This is for issues tracked in Jira). Below is an example of smart commit: - ACT-001:- Update Activity UI based on styling guide @@ -73,7 +73,7 @@ We have 3 main branches in our repo: - All set checks passes (We will set the checks for each individual project). - The bug/feature/enhancement in question is fully addressed - PRs must follow the predefined template. In the PR body, the following questions should be addressed (This is predefined when creating a new PR): - - Descriptive Title + - Descriptive Title: Add the issue number followed by a brief description of the ticket e.g., `ACT-001: Adds project status` - What is the purpose of the PR? - Approach used to address the issue - Any prerequisites before/after merging? @@ -90,7 +90,7 @@ This repo is currently maintained by Hikaya, who have commit access. They will l # Coding conventions -## Github labels +## GitHub labels - ```Good first issue``` - Good for newcomers - ```bug``` - Something isn't working - ```defect``` - Something isn't working right @@ -125,7 +125,7 @@ We'll continue updating this section as our product matures and more standards a - The project uses `Flake8` for python code linting. ## CI/CD - - We are currently using Github Actions for simple build checks. + - We are currently using GitHub Actions for simple build checks. - In the future, we will introduce more rigorous checks including unit tests, integration tests, end-to-end tests, and automatic deployments to `dev`. # Community
3
diff --git a/constants.js b/constants.js @@ -70,3 +70,5 @@ export const flyFriction = 0.5; export const avatarInterpolationFrameRate = 60; export const avatarInterpolationTimeDelay = 1000/(avatarInterpolationFrameRate * 0.5); export const avatarInterpolationNumFrames = 4; + +export const defaultAvatarUrl = './avatars/citrine.vrm'; \ No newline at end of file
0
diff --git a/docs/testing.md b/docs/testing.md @@ -16,7 +16,7 @@ npm install --save-dev ospec mithril-query jsdom And getting them set up is also relatively easy and requires a few short steps: -1. Add a `"test": "mocha"` to your npm scripts in your `package.json` file. This will end up looking something like this, maybe with a few extra fields relevant to your project: +1. Add a `"test": "ospec"` to your npm scripts in your `package.json` file. This will end up looking something like this, maybe with a few extra fields relevant to your project: ```json {
14
diff --git a/src/lib/realmdb/RealmDB.js b/src/lib/realmdb/RealmDB.js import { once, sortBy } from 'lodash' import * as Realm from 'realm-web' import TextileCrypto from '@textile/crypto' +import EventEmitter from 'eventemitter3' import { JWT } from '../constants/localStorage' import AsyncStorage from '../utils/asyncStorage' @@ -26,7 +27,7 @@ class RealmDB implements DB, ProfileDB { isReady: boolean = false - listeners: Function[] = [] + dbEvents = new EventEmitter() constructor() { this.ready = new Promise((resolve, reject) => { @@ -188,18 +189,25 @@ class RealmDB implements DB, ProfileDB { /** * listen to database changes - * @param {*} cb + * @param {*} callback */ - on(cb) { - this.listeners.push(cb) + on(callback) { + this.dbEvents.on('changes', callback) } /** * unsubscribe listener - * @param {*} cb + * @param {*} callback */ - off(cb) { - this.listeners = this.listeners.filter(_ => _ !== cb) + off(callback = null) { + const { dbEvents } = this + + if (callback) { + dbEvents.off('changes', callback) + return + } + + dbEvents.removeAllListeners() } /** @@ -207,9 +215,10 @@ class RealmDB implements DB, ProfileDB { * @param {*} data */ _notifyChange = data => { - log.debug('notifyChange', { data, listeners: this.listeners.length }) + const { dbEvents } = this - this.listeners.map(cb => cb(data)) + log.debug('notifyChange', { data, listeners: dbEvents.listenerCount('changes') }) + dbEvents.emit('changes', data) } /**
14
diff --git a/packages/cra-template-rmw/template/firebase/firestore.rules b/packages/cra-template-rmw/template/firebase/firestore.rules @@ -43,6 +43,14 @@ service cloud.firestore { } } + match /test { + allow read, write: if isSignedIn(); + match /{document=**}{ + allow read,write: if isSignedIn(); + + } + } + /// RULES END /// } } \ No newline at end of file
3
diff --git a/src/components/draftjs-editor/Embed.js b/src/components/draftjs-editor/Embed.js @@ -107,6 +107,8 @@ export default class Embed extends Component { {...elementProps} width={width} height={height} + allowFullScreen={true} + frameBorder="0" {...rest} src={src} className={theme.embedStyles.embed} @@ -121,6 +123,8 @@ export default class Embed extends Component { {...elementProps} width={width} height={height} + allowFullScreen={true} + frameBorder="0" {...rest} src={src} className={theme.embedStyles.embed}
11
diff --git a/src/webroutes/deployer/actions.js b/src/webroutes/deployer/actions.js @@ -177,20 +177,6 @@ async function handleSaveConfig(ctx) { globals.fxRunner.refreshConfig(); ctx.utils.logAction(`Completed and committed server deploy.`); - //FIXME: temporary fix for the yarn issue requiring fxchild.stdin writes - yarnInputFixCounter = 0; - clearInterval(yarnInputFix); - yarnInputFix = setInterval(() => { - if(yarnInputFixCounter > 6){ - if(GlobalData.verbose) log('Clearing yarnInputFix setInterval'); - clearInterval(yarnInputFix); - } - yarnInputFixCounter++; - try { - globals.fxRunner.srvCmd(`txaPing temporary_yarn_workaround_please_ignore#${yarnInputFixCounter}`); - } catch (error) {} - }, 30*1000); - //Starting server const spawnMsg = await globals.fxRunner.spawnServer(false); if(spawnMsg !== null){
2
diff --git a/aleph/index/entities.py b/aleph/index/entities.py @@ -10,13 +10,15 @@ from elasticsearch.helpers import scan, bulk, BulkIndexError from aleph.core import es from aleph.index.indexes import entities_write_index, entities_read_index +from aleph.index.indexes import entities_read_index_list from aleph.index.util import unpack_result, refresh_sync from aleph.index.util import index_safe, search_safe, authz_query from aleph.index.util import TIMEOUT, REQUEST_TIMEOUT, MAX_PAGE, BULK_PAGE log = logging.getLogger(__name__) EXCLUDE_DEFAULT = ['text', 'fingerprints', 'names', 'phones', 'emails', - 'identifiers', 'addresses'] + 'identifiers', 'addresses', 'properties.bodyText', + 'properties.bodyRaw'] def index_entity(entity, sync=False):
8
diff --git a/source/setup/components/DisabledLoginDomainsPage.js b/source/setup/components/DisabledLoginDomainsPage.js @@ -14,7 +14,7 @@ const Table = styled.table` `; function isDomain(str) { - return /^[^\/:_]+(\.[^\/:_]+)+$/.test(str); + return /^[^\/:_]+(\.[^\/:_]+)+$/.test(str) || str === "localhost"; } export default function DisabledLoginDomainsPage() {
11
diff --git a/javascript/components/MapView.js b/javascript/components/MapView.js @@ -645,7 +645,7 @@ class MapView extends React.Component { case MapboxGL.EventTypes.UserLocationUpdated: propName = 'onUserLocationUpdate'; break; - case MapboxGL.EventTypes.WillStartLoadinMap: + case MapboxGL.EventTypes.WillStartLoadingMap: propName = 'onWillStartLoadingMap'; break; case MapboxGL.EventTypes.DidFinishLoadingMap:
1
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md Are you planning on contributing or suggesting something for the bot? Go ahead, just make sure you know what you are doing, we don't wanna mess with trying to fix the bot if someone breaks it! -In order to make a suggestion, head to the issues page and make an issue titled "Suggestion: (name)" and fill out a little discription. Please please please, check that this hasn't already been suggested or requested as a PR. +In order to make a suggestion, head to the issues page and make an issue titled "Suggestion: (name)" and fill out a little description. Please please please, check that this hasn't already been suggested or requested as a PR. If you want to make a contribution, create a fork then push that change to here but make sure its the dev branch.(Jonas747/yagpdb/Dev) this is key for larger commits and edits to important / complicated parts of the bot so it can be tested safely without breaking everything.
1
diff --git a/assets/js/modules/analytics/datastore/setup-flow.test.js b/assets/js/modules/analytics/datastore/setup-flow.test.js @@ -162,6 +162,7 @@ describe( 'modules/analytics setup-flow', () => { registry = createTestRegistry(); populateAnalytics4Datastore( registry ); + expect( registry.select( MODULES_ANALYTICS_4 ).isAdminAPIWorking() ).toBe( true ); expect( registry.select( MODULES_ANALYTICS ).getSettings() ).toBe( undefined ); @@ -175,6 +176,7 @@ describe( 'modules/analytics setup-flow', () => { expect( registry.select( MODULES_ANALYTICS ).getAccountID( accountID ) ).toBe( undefined ); populateAnalytics4Datastore( registry ); + expect( registry.select( MODULES_ANALYTICS_4 ).isAdminAPIWorking() ).toBe( true ); expect( registry.select( MODULES_ANALYTICS ).getSetupFlowMode() ).toBe( 'ua' ); } ); @@ -216,7 +218,8 @@ describe( 'modules/analytics setup-flow', () => { deleted: false, }, ], - { accountID: 'another-different-id' }, + // This is a different accountID + { accountID: 'bar-1234567' }, ); // Receive empty properties list to prevent unexpected fetch by resolver. @@ -248,46 +251,15 @@ describe( 'modules/analytics setup-flow', () => { expect( registry.select( MODULES_ANALYTICS ).getSetupFlowMode() ).toBe( 'ua' ); } ); - it( 'should return undefined if selected account returns an empty array from UA getProperties selector', () => { + it( 'should return undefined if selected account returns undefined from UA getProperties selector', () => { registry = createTestRegistry(); // Receive empty settings to prevent unexpected fetch by resolver. registry.dispatch( MODULES_ANALYTICS ).receiveGetSettings( {} ); registry.dispatch( MODULES_ANALYTICS ).setAccountID( accountID ); - registry.dispatch( MODULES_ANALYTICS_4 ).receiveGetWebDataStreams( - [ - { - _id: '2000', - _propertyID: '1000', - name: 'properties/1000/webDataStreams/2000', - // eslint-disable-next-line sitekit/acronym-case - measurementId: '1A2BCD345E', - // eslint-disable-next-line sitekit/acronym-case - firebaseAppId: '', - createTime: '2014-10-02T15:01:23Z', - updateTime: '2014-10-02T15:01:23Z', - defaultUri: 'http://example.com', - displayName: 'Test GA4 WebDataStream', - }, - ], - { propertyID: 'foobar' } - ); - - // Need to dispatch empty UA properties so has loaded - registry.dispatch( MODULES_ANALYTICS ).receiveGetProperties( - [], - { accountID }, - ); - - fetchMock.get( - /^\/google-site-kit\/v1\/modules\/analytics-4\/data\/properties/, - { - body: [], - status: 200, - } - ); + populateAnalytics4Datastore( registry ); - expect( registry.select( MODULES_ANALYTICS_4 ).getProperties( accountID ) ).toBe( undefined ); + expect( registry.select( MODULES_ANALYTICS_4 ).isAdminAPIWorking() ).toBe( true ); expect( registry.select( MODULES_ANALYTICS ).getSetupFlowMode() ).toBe( undefined ); } );
1
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md @@ -8,7 +8,7 @@ assignees: '' --- <!-- -Please read the Feature Requesting Guide before completing this issue: http://tabulator.info/community#feature +Please read the Feature Requesting Guide before completing this issue: http://tabulator.info/community/feature --> *Is your feature request related to a problem? Please describe.**
3
diff --git a/assets/js/googlesitekit-adminbar-loader.js b/assets/js/googlesitekit-adminbar-loader.js @@ -113,37 +113,8 @@ window.addEventListener( 'load', function() { } } - const { isAdmin } = window.googlesitekitAdminbar.properties; - const isPostScreen = isAdmin && window.googlesitekit.admin.currentScreen && 'post' === window.googlesitekit.admin.currentScreen.id; - const scriptPath = `${ window.googlesitekitAdminbar.publicPath }allmodules.js`; - const isScriptLoaded = document.querySelector( `script[src="${ scriptPath }"]` ); - - // Dynamically load the script if not loaded yet. - if ( ! isAdmin || ( isAdmin && isPostScreen && ! isScriptLoaded ) ) { - // Load all modules. - const script = document.createElement( 'script' ); - script.type = 'text/javascript'; - script.onload = () => { - // Cleanup onload handler - script.onload = null; - - initAdminbar(); - }; - - // Add the script to the DOM - ( document.getElementsByTagName( 'head' )[ 0 ] ).appendChild( script ); - - // Set the `src` to begin transport - script.src = scriptPath; - - // Set adminbar as loaded. - isAdminbarLoaded = true; - } else { initAdminbar(); - - // Set adminbar as loaded. isAdminbarLoaded = true; - } }; if ( 'true' === getQueryParameter( 'googlesitekit_adminbar_open' ) ) {
2
diff --git a/entry_types/scrolled/package/src/contentElements/videoEmbed/VideoEmbed.js b/entry_types/scrolled/package/src/contentElements/videoEmbed/VideoEmbed.js @@ -142,7 +142,8 @@ function useAtmoHooks(atmoDuringPlayback) { const atmo = useAtmo(); return useMemo(() => { - const {before, after} = atmo.createMediaPlayerHooks(atmoDuringPlayback); + const {before, after} = atmo.createMediaPlayerHooks(atmoDuringPlayback) || + {before() {}, after() {}}; let timeout; return {
9
diff --git a/userscript.user.js b/userscript.user.js @@ -950,6 +950,36 @@ var $$IMU_EXPORT$$; }; } + // https://www.mycomicshop.com/search?minyr=1938&maxyr=1955&TID=29170235 + // this site replaces Array.indexOf + // cache Array.prototype.indexOf in case it changes while the script is executing + var array_prototype_indexof = Array.prototype.indexOf; + var array_indexof = function(array, x) { + return array_prototype_indexof.call(array, x); + }; + + var array_indexof_ok = false; + + try { + var test_array = ["a", "b"]; + if (array_indexof(test_array, "not here") === -1 && + array_indexof(test_array, "b") === 1) { + array_indexof_ok = true; + } + } catch (e) {} + + if (!array_indexof_ok) { + array_indexof = function(array, x) { + for (var i = 0; i < array.length; i++) { + if (array[i] === x) { + return i; + } + } + + return -1; + }; + } + var serialize_event = function(event) { return deepcopy(event, {json: true}); }; @@ -63656,7 +63686,7 @@ var $$IMU_EXPORT$$; for (var i = 0; i < wanted_chord.length; i++) { var key = wanted_chord[i]; - if (current_chord.indexOf(key) < 0) + if (array_indexof(current_chord, key) < 0) return false; } @@ -63665,7 +63695,7 @@ var $$IMU_EXPORT$$; if (keystr_is_wheel(current_chord[i])) continue; - if (wanted_chord.indexOf(current_chord[i]) < 0) + if (array_indexof(wanted_chord, current_chord[i]) < 0) return false; }
4