From 7930fc6c243b631e6a370d45ed5b221f0b63152e Mon Sep 17 00:00:00 2001 From: Kamil Sobol Date: Fri, 17 Mar 2023 14:51:33 -0700 Subject: [PATCH 01/84] fix: generate model introspection regardless of studio and datastore (#12258) * fix: generate model introspection regardless of studio * fix: remove data store condition as well * fix: remove unused mocks from unit tests * fix: test coverage --- .../studio-modelgen.test.ts.snap | 228 +++++++++++++++++- .../src/__tests__/studio-modelgen.test.ts | 73 +++--- .../src/__tests__/admin-modelgen.test.ts | 6 - .../src/admin-modelgen.ts | 7 - scripts/split-e2e-tests-v2.ts | 1 + 5 files changed, 270 insertions(+), 45 deletions(-) diff --git a/packages/amplify-e2e-tests/src/__tests__/__snapshots__/studio-modelgen.test.ts.snap b/packages/amplify-e2e-tests/src/__tests__/__snapshots__/studio-modelgen.test.ts.snap index 03283e63e66..d28b87c463d 100644 --- a/packages/amplify-e2e-tests/src/__tests__/__snapshots__/studio-modelgen.test.ts.snap +++ b/packages/amplify-e2e-tests/src/__tests__/__snapshots__/studio-modelgen.test.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`upload Studio CMS assets on push of Studio enabled project uploads expected CMS assets to shared location in S3 bucket 2`] = ` +exports[`upload Studio CMS assets on push uploads expected CMS assets to shared location in S3 bucket false false 2`] = ` "export const schema = { \\"models\\": { \\"Todo\\": { @@ -54,7 +54,231 @@ exports[`upload Studio CMS assets on push of Studio enabled project uploads expe };" `; -exports[`upload Studio CMS assets on push of Studio enabled project uploads expected CMS assets to shared location in S3 bucket 3`] = ` +exports[`upload Studio CMS assets on push uploads expected CMS assets to shared location in S3 bucket false false 3`] = ` +"{ + \\"version\\": 1, + \\"models\\": { + \\"Todo\\": { + \\"name\\": \\"Todo\\", + \\"fields\\": { + \\"id\\": { + \\"name\\": \\"id\\", + \\"isArray\\": false, + \\"type\\": \\"ID\\", + \\"isRequired\\": true, + \\"attributes\\": [] + }, + \\"content\\": { + \\"name\\": \\"content\\", + \\"isArray\\": false, + \\"type\\": \\"String\\", + \\"isRequired\\": false, + \\"attributes\\": [] + }, + \\"createdAt\\": { + \\"name\\": \\"createdAt\\", + \\"isArray\\": false, + \\"type\\": \\"AWSDateTime\\", + \\"isRequired\\": false, + \\"attributes\\": [], + \\"isReadOnly\\": true + }, + \\"updatedAt\\": { + \\"name\\": \\"updatedAt\\", + \\"isArray\\": false, + \\"type\\": \\"AWSDateTime\\", + \\"isRequired\\": false, + \\"attributes\\": [], + \\"isReadOnly\\": true + } + }, + \\"syncable\\": true, + \\"pluralName\\": \\"Todos\\", + \\"attributes\\": [ + { + \\"type\\": \\"model\\", + \\"properties\\": {} + } + ], + \\"primaryKeyInfo\\": { + \\"isCustomPrimaryKey\\": false, + \\"primaryKeyFieldName\\": \\"id\\", + \\"sortKeyFieldNames\\": [] + } + } + }, + \\"enums\\": {}, + \\"nonModels\\": {} +}" +`; + +exports[`upload Studio CMS assets on push uploads expected CMS assets to shared location in S3 bucket false true 2`] = ` +"export const schema = { + \\"models\\": { + \\"Todo\\": { + \\"name\\": \\"Todo\\", + \\"fields\\": { + \\"id\\": { + \\"name\\": \\"id\\", + \\"isArray\\": false, + \\"type\\": \\"ID\\", + \\"isRequired\\": true, + \\"attributes\\": [] + }, + \\"content\\": { + \\"name\\": \\"content\\", + \\"isArray\\": false, + \\"type\\": \\"String\\", + \\"isRequired\\": false, + \\"attributes\\": [] + }, + \\"createdAt\\": { + \\"name\\": \\"createdAt\\", + \\"isArray\\": false, + \\"type\\": \\"AWSDateTime\\", + \\"isRequired\\": false, + \\"attributes\\": [], + \\"isReadOnly\\": true + }, + \\"updatedAt\\": { + \\"name\\": \\"updatedAt\\", + \\"isArray\\": false, + \\"type\\": \\"AWSDateTime\\", + \\"isRequired\\": false, + \\"attributes\\": [], + \\"isReadOnly\\": true + } + }, + \\"syncable\\": true, + \\"pluralName\\": \\"Todos\\", + \\"attributes\\": [ + { + \\"type\\": \\"model\\", + \\"properties\\": {} + } + ] + } + }, + \\"enums\\": {}, + \\"nonModels\\": {}, + \\"codegenVersion\\": \\"3.4.0\\", + \\"version\\": \\"6f85ca0ee370ac8e0674a44cc5a4f6a6\\" +};" +`; + +exports[`upload Studio CMS assets on push uploads expected CMS assets to shared location in S3 bucket false true 3`] = ` +"{ + \\"version\\": 1, + \\"models\\": { + \\"Todo\\": { + \\"name\\": \\"Todo\\", + \\"fields\\": { + \\"id\\": { + \\"name\\": \\"id\\", + \\"isArray\\": false, + \\"type\\": \\"ID\\", + \\"isRequired\\": true, + \\"attributes\\": [] + }, + \\"content\\": { + \\"name\\": \\"content\\", + \\"isArray\\": false, + \\"type\\": \\"String\\", + \\"isRequired\\": false, + \\"attributes\\": [] + }, + \\"createdAt\\": { + \\"name\\": \\"createdAt\\", + \\"isArray\\": false, + \\"type\\": \\"AWSDateTime\\", + \\"isRequired\\": false, + \\"attributes\\": [], + \\"isReadOnly\\": true + }, + \\"updatedAt\\": { + \\"name\\": \\"updatedAt\\", + \\"isArray\\": false, + \\"type\\": \\"AWSDateTime\\", + \\"isRequired\\": false, + \\"attributes\\": [], + \\"isReadOnly\\": true + } + }, + \\"syncable\\": true, + \\"pluralName\\": \\"Todos\\", + \\"attributes\\": [ + { + \\"type\\": \\"model\\", + \\"properties\\": {} + } + ], + \\"primaryKeyInfo\\": { + \\"isCustomPrimaryKey\\": false, + \\"primaryKeyFieldName\\": \\"id\\", + \\"sortKeyFieldNames\\": [] + } + } + }, + \\"enums\\": {}, + \\"nonModels\\": {} +}" +`; + +exports[`upload Studio CMS assets on push uploads expected CMS assets to shared location in S3 bucket true true 2`] = ` +"export const schema = { + \\"models\\": { + \\"Todo\\": { + \\"name\\": \\"Todo\\", + \\"fields\\": { + \\"id\\": { + \\"name\\": \\"id\\", + \\"isArray\\": false, + \\"type\\": \\"ID\\", + \\"isRequired\\": true, + \\"attributes\\": [] + }, + \\"content\\": { + \\"name\\": \\"content\\", + \\"isArray\\": false, + \\"type\\": \\"String\\", + \\"isRequired\\": false, + \\"attributes\\": [] + }, + \\"createdAt\\": { + \\"name\\": \\"createdAt\\", + \\"isArray\\": false, + \\"type\\": \\"AWSDateTime\\", + \\"isRequired\\": false, + \\"attributes\\": [], + \\"isReadOnly\\": true + }, + \\"updatedAt\\": { + \\"name\\": \\"updatedAt\\", + \\"isArray\\": false, + \\"type\\": \\"AWSDateTime\\", + \\"isRequired\\": false, + \\"attributes\\": [], + \\"isReadOnly\\": true + } + }, + \\"syncable\\": true, + \\"pluralName\\": \\"Todos\\", + \\"attributes\\": [ + { + \\"type\\": \\"model\\", + \\"properties\\": {} + } + ] + } + }, + \\"enums\\": {}, + \\"nonModels\\": {}, + \\"codegenVersion\\": \\"3.4.0\\", + \\"version\\": \\"6f85ca0ee370ac8e0674a44cc5a4f6a6\\" +};" +`; + +exports[`upload Studio CMS assets on push uploads expected CMS assets to shared location in S3 bucket true true 3`] = ` "{ \\"version\\": 1, \\"models\\": { diff --git a/packages/amplify-e2e-tests/src/__tests__/studio-modelgen.test.ts b/packages/amplify-e2e-tests/src/__tests__/studio-modelgen.test.ts index 1a9c9e9ea5f..d9f9d34d073 100644 --- a/packages/amplify-e2e-tests/src/__tests__/studio-modelgen.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/studio-modelgen.test.ts @@ -1,5 +1,6 @@ import { initAndroidProjectWithProfile, + addApiWithBlankSchema, addApiWithBlankSchemaAndConflictDetection, createNewProjectDir, deleteProject, @@ -13,7 +14,7 @@ import { getProjectConfig, } from '@aws-amplify/amplify-e2e-core'; -describe('upload Studio CMS assets on push of Studio enabled project', () => { +describe('upload Studio CMS assets on push', () => { let projRoot: string; beforeEach(async () => { projRoot = await createNewProjectDir('studio-cms-upload'); @@ -23,46 +24,58 @@ describe('upload Studio CMS assets on push of Studio enabled project', () => { await deleteProject(projRoot); deleteProjectDir(projRoot); }); - it('uploads expected CMS assets to shared location in S3 bucket', async () => { - // eslint-disable-next-line spellcheck/spell-checker - const name = 'studiocmstest'; - const defaultsSettings = { - disableAmplifyAppCreation: false, - name, - }; - // init an android project to check that studio modelgen generates JS types even with other frontend config - await initAndroidProjectWithProfile(projRoot, defaultsSettings); + it.each([ + [true, true], + [false, true], + [false, false], + ])( + 'uploads expected CMS assets to shared location in S3 bucket %p %p', + async (isStudioEnabled: boolean, apiWithConflictDetection: boolean) => { + // eslint-disable-next-line spellcheck/spell-checker + const name = `cms${isStudioEnabled}${apiWithConflictDetection}`; + const defaultsSettings = { + disableAmplifyAppCreation: false, + name, + }; + // init an android project to check that studio modelgen generates JS types even with other frontend config + await initAndroidProjectWithProfile(projRoot, defaultsSettings); - const originalProjectConfig = getProjectConfig(projRoot); + const originalProjectConfig = getProjectConfig(projRoot); - const meta = getProjectMeta(projRoot); - const appId = meta.providers?.awscloudformation?.AmplifyAppId; - const region = meta.providers?.awscloudformation?.Region; + const meta = getProjectMeta(projRoot); + const appId = meta.providers?.awscloudformation?.AmplifyAppId; + const region = meta.providers?.awscloudformation?.Region; - expect(appId).toBeDefined(); + const localEnvInfo = getLocalEnvInfo(projRoot); + const { envName } = localEnvInfo; - const localEnvInfo = getLocalEnvInfo(projRoot); - const { envName } = localEnvInfo; + if (isStudioEnabled) { + expect(appId).toBeDefined(); + // setup Amplify Studio backend + await enableAdminUI(appId, envName, region); + } - // setup Amplify Studio backend - await enableAdminUI(appId, envName, region); + if (apiWithConflictDetection) { + await addApiWithBlankSchemaAndConflictDetection(projRoot, { transformerVersion: 2 }); + } else { + await addApiWithBlankSchema(projRoot, { transformerVersion: 2 }); + } + await updateApiSchema(projRoot, name, 'simple_model.graphql'); + await amplifyPush(projRoot); - await addApiWithBlankSchemaAndConflictDetection(projRoot, { transformerVersion: 2 }); - await updateApiSchema(projRoot, name, 'simple_model.graphql'); - await amplifyPush(projRoot); - - // expect CMS assets to be present in S3 - await expect(getDeploymentBucketObject(projRoot, `models/${name}/schema.graphql`)).resolves.toMatchInlineSnapshot(` + // expect CMS assets to be present in S3 + await expect(getDeploymentBucketObject(projRoot, `models/${name}/schema.graphql`)).resolves.toMatchInlineSnapshot(` "type Todo @model { id: ID! content: String } " `); - await expect(getDeploymentBucketObject(projRoot, `models/${name}/schema.js`)).resolves.toMatchSnapshot(); - await expect(getDeploymentBucketObject(projRoot, `models/${name}/modelIntrospection.json`)).resolves.toMatchSnapshot(); + await expect(getDeploymentBucketObject(projRoot, `models/${name}/schema.js`)).resolves.toMatchSnapshot(); + await expect(getDeploymentBucketObject(projRoot, `models/${name}/modelIntrospection.json`)).resolves.toMatchSnapshot(); - // expect project config to be unmodified - expect(getProjectConfig(projRoot)).toEqual(originalProjectConfig); - }); + // expect project config to be unmodified + expect(getProjectConfig(projRoot)).toEqual(originalProjectConfig); + }, + ); }); diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/admin-modelgen.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/admin-modelgen.test.ts index defefebf814..0c3a1cc4860 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/admin-modelgen.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/admin-modelgen.test.ts @@ -1,9 +1,7 @@ import { $TSContext, stateManager, pathManager } from 'amplify-cli-core'; import * as fs from 'fs-extra'; -import { isDataStoreEnabled } from 'graphql-transformer-core'; import { adminModelgen } from '../admin-modelgen'; import { S3 } from '../aws-utils/aws-s3'; -import { isAmplifyAdminApp } from '../utils/admin-helpers'; jest.mock('fs-extra'); jest.mock('../aws-utils/aws-s3'); @@ -14,8 +12,6 @@ jest.mock('../utils/admin-helpers'); const fsMock = fs as jest.Mocked; const stateManagerMock = stateManager as jest.Mocked; const pathManagerMock = pathManager as jest.Mocked; -const isDataStoreEnabledMock = isDataStoreEnabled as jest.MockedFunction; -const isAmplifyAdminAppMock = isAmplifyAdminApp as jest.MockedFunction; const originalProjectConfig = 'original project config'; @@ -30,8 +26,6 @@ stateManagerMock.getMeta.mockReturnValue({ pathManagerMock.findProjectRoot.mockReturnValue('mock/project/root'); pathManagerMock.getBackendDirPath.mockReturnValue('mock/backend/dir/path'); pathManagerMock.getResourceDirectoryPath.mockReturnValue('mock/resource/dir/path'); -isAmplifyAdminAppMock.mockResolvedValue({ isAdminApp: true, region: 'test', userPoolID: 'test' }); -isDataStoreEnabledMock.mockResolvedValue(true); fsMock.createWriteStream.mockReturnValue({ write: { bind: jest.fn(), diff --git a/packages/amplify-provider-awscloudformation/src/admin-modelgen.ts b/packages/amplify-provider-awscloudformation/src/admin-modelgen.ts index c71721cdbac..398bee63add 100644 --- a/packages/amplify-provider-awscloudformation/src/admin-modelgen.ts +++ b/packages/amplify-provider-awscloudformation/src/admin-modelgen.ts @@ -1,6 +1,5 @@ import { $TSAny, $TSContext, pathManager, stateManager } from 'amplify-cli-core'; import * as fs from 'fs-extra'; -import { isDataStoreEnabled } from 'graphql-transformer-core'; import _ from 'lodash'; import * as path from 'path'; import { S3 } from './aws-utils/aws-s3'; @@ -27,12 +26,6 @@ export const adminModelgen = async (context: $TSContext, resources: $TSAny[]): P return; } - const isDSEnabled = await isDataStoreEnabled(path.join(pathManager.getBackendDirPath(), 'api', resourceName)); - - if (!isDSEnabled) { - return; - } - // the following is a hack to enable us to upload assets needed by studio CMS to the deployment bucket without // calling AmplifyBackend.generateBackendAPIModels. // Calling this API introduces a circular dependency because this API in turn executes the CLI to generate codegen assets diff --git a/scripts/split-e2e-tests-v2.ts b/scripts/split-e2e-tests-v2.ts index 84bd41a9d54..9653be4b97e 100644 --- a/scripts/split-e2e-tests-v2.ts +++ b/scripts/split-e2e-tests-v2.ts @@ -33,6 +33,7 @@ const RUN_SOLO = [ 'src/__tests__/schema-auth-11-a.test.ts', 'src/__tests__/schema-auth-15.test.ts', 'src/__tests__/schema-connection-1.test.ts', + 'src/__tests__/studio-modelgen.test.ts', ]; /** * Most Windows tests only run on 'dev', except for this list of smoke tests. From 1e7aee8ae5847751f1c1c62c6d84f639b714c7fa Mon Sep 17 00:00:00 2001 From: Kamil Sobol Date: Mon, 20 Mar 2023 09:40:46 -0700 Subject: [PATCH 02/84] fix: modelgen failure on windows (#12263) * fix: modelgen on windows * fix: run solo * fix: close stream * fix: unit test * fix: try this --- .../src/__tests__/admin-modelgen.test.ts | 3 +++ .../src/admin-modelgen.ts | 16 +++++++++++++++- scripts/split-e2e-tests-v2.ts | 2 ++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/admin-modelgen.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/admin-modelgen.test.ts index 0c3a1cc4860..afadf3e2b15 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/admin-modelgen.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/admin-modelgen.test.ts @@ -30,6 +30,9 @@ fsMock.createWriteStream.mockReturnValue({ write: { bind: jest.fn(), }, + close: (cb: Function) => { + cb(); + }, } as unknown as fs.WriteStream); fsMock.createReadStream.mockImplementation((filePath) => `mock body of ${filePath}` as unknown as fs.ReadStream); diff --git a/packages/amplify-provider-awscloudformation/src/admin-modelgen.ts b/packages/amplify-provider-awscloudformation/src/admin-modelgen.ts index 398bee63add..a69c2921d71 100644 --- a/packages/amplify-provider-awscloudformation/src/admin-modelgen.ts +++ b/packages/amplify-provider-awscloudformation/src/admin-modelgen.ts @@ -43,6 +43,7 @@ export const adminModelgen = async (context: $TSContext, resources: $TSAny[]): P }, }; const originalStdoutWrite = process.stdout.write; + let tempStdoutWrite: fs.WriteStream = null; try { // overwrite project config with config that forces codegen to output js to a temp location stateManager.setProjectConfig(undefined, forceJSCodegenProjectConfig); @@ -50,7 +51,9 @@ export const adminModelgen = async (context: $TSContext, resources: $TSAny[]): P // generateModels and generateModelIntrospection print confusing and duplicate output when executing these codegen paths // so pipe stdout to a file and then reset it at the end to suppress this output await fs.ensureDir(absoluteTempOutputDir); - const tempStdoutWrite = fs.createWriteStream(path.join(absoluteTempOutputDir, 'temp-console-log.txt')); + const tempLogFilePath = path.join(absoluteTempOutputDir, 'temp-console-log.txt'); + await fs.ensureFile(tempLogFilePath); + tempStdoutWrite = fs.createWriteStream(tempLogFilePath); process.stdout.write = tempStdoutWrite.write.bind(tempStdoutWrite); // invokes https://github.com/aws-amplify/amplify-codegen/blob/main/packages/amplify-codegen/src/commands/models.js#L60 @@ -80,6 +83,17 @@ export const adminModelgen = async (context: $TSContext, resources: $TSAny[]): P } finally { stateManager.setProjectConfig(undefined, originalProjectConfig); process.stdout.write = originalStdoutWrite; + if (tempStdoutWrite) { + await new Promise((resolve, reject) => { + tempStdoutWrite.close((err) => { + if (err) { + reject(err); + } else { + resolve(null); + } + }); + }); + } await fs.remove(absoluteTempOutputDir); } }; diff --git a/scripts/split-e2e-tests-v2.ts b/scripts/split-e2e-tests-v2.ts index 9653be4b97e..96884aa9cb1 100644 --- a/scripts/split-e2e-tests-v2.ts +++ b/scripts/split-e2e-tests-v2.ts @@ -72,6 +72,8 @@ const WINDOWS_SMOKE_TESTS = [ 'src/__tests__/env-1.test.ts', // export and pull 'src/__tests__/export-pull-a.test.ts', + // feature flags + 'src/__tests__/feature-flags.test.ts', // functions 'src/__tests__/function_10.test.ts', // notifications with function permissions From 23168f04e3f339bce1fbf57a4a21621e64050664 Mon Sep 17 00:00:00 2001 From: Zeyu Li Date: Mon, 20 Mar 2023 12:04:06 -0700 Subject: [PATCH 03/84] fix(api): add null placeholder for nested stack during api rebuild (#11460) * fix(api): add null placeholder for nested stack during api rebuild --- .../src/init/deleteProject.ts | 9 +- .../schemas/relational_models_v2.graphql | 18 ++++ .../schemas/searchable_model_v2.graphql | 8 ++ .../src/__tests__/api_6a.test.ts | 31 ++++--- .../src/__tests__/api_6c.test.ts | 40 ++++++++ .../src/rebuild-test-helpers/index.ts | 14 +++ .../amplify-graphql-resource-manager.ts | 93 +++++++++++++++++-- 7 files changed, 192 insertions(+), 21 deletions(-) create mode 100644 packages/amplify-e2e-tests/schemas/relational_models_v2.graphql create mode 100644 packages/amplify-e2e-tests/schemas/searchable_model_v2.graphql create mode 100644 packages/amplify-e2e-tests/src/__tests__/api_6c.test.ts create mode 100644 packages/amplify-e2e-tests/src/rebuild-test-helpers/index.ts diff --git a/packages/amplify-e2e-core/src/init/deleteProject.ts b/packages/amplify-e2e-core/src/init/deleteProject.ts index dc0092ce586..f74f0a295e7 100644 --- a/packages/amplify-e2e-core/src/init/deleteProject.ts +++ b/packages/amplify-e2e-core/src/init/deleteProject.ts @@ -1,12 +1,18 @@ /* eslint-disable import/no-cycle */ import { nspawn as spawn, retry, getCLIPath, describeCloudFormationStack } from '..'; import { getBackendAmplifyMeta } from '../utils'; +import { $TSAny } from 'amplify-cli-core'; /** * Runs `amplify delete` */ // eslint-disable-next-line @typescript-eslint/no-explicit-any -export const deleteProject = async (cwd: string, profileConfig?: any, usingLatestCodebase = false): Promise => { +export const deleteProject = async ( + cwd: string, + profileConfig?: $TSAny, + usingLatestCodebase = false, + noOutputTimeout: number = 1000 * 60 * 20, +): Promise => { // Read the meta from backend otherwise it could fail on non-pushed, just initialized projects try { const { StackName: stackName, Region: region } = getBackendAmplifyMeta(cwd).providers.awscloudformation; @@ -15,7 +21,6 @@ export const deleteProject = async (cwd: string, profileConfig?: any, usingLates (stack) => stack.StackStatus.endsWith('_COMPLETE') || stack.StackStatus.endsWith('_FAILED'), ); - const noOutputTimeout = 1000 * 60 * 20; // 20 minutes; await spawn(getCLIPath(usingLatestCodebase), ['delete'], { cwd, stripColors: true, noOutputTimeout }) .wait('Are you sure you want to continue?') .sendYes() diff --git a/packages/amplify-e2e-tests/schemas/relational_models_v2.graphql b/packages/amplify-e2e-tests/schemas/relational_models_v2.graphql new file mode 100644 index 00000000000..a87245cdd23 --- /dev/null +++ b/packages/amplify-e2e-tests/schemas/relational_models_v2.graphql @@ -0,0 +1,18 @@ +input AMPLIFY { + globalAuthRule: AuthRule = { allow: public } +} +type Todo @model { + id: ID! + name: String + description: String + tasks: [Task] @hasMany + assignee: Worker @hasOne +} +type Task @model { + id: ID! + todo: Todo @belongsTo +} +type Worker @model { + id: ID! + todo: Todo @belongsTo +} diff --git a/packages/amplify-e2e-tests/schemas/searchable_model_v2.graphql b/packages/amplify-e2e-tests/schemas/searchable_model_v2.graphql new file mode 100644 index 00000000000..4adfe8dcd22 --- /dev/null +++ b/packages/amplify-e2e-tests/schemas/searchable_model_v2.graphql @@ -0,0 +1,8 @@ +input AMPLIFY { + globalAuthRule: AuthRule = { allow: public } +} +type Todo @model @searchable { + id: ID! + name: String + description: String +} diff --git a/packages/amplify-e2e-tests/src/__tests__/api_6a.test.ts b/packages/amplify-e2e-tests/src/__tests__/api_6a.test.ts index a8207a4063b..fb9de0c6328 100644 --- a/packages/amplify-e2e-tests/src/__tests__/api_6a.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/api_6a.test.ts @@ -5,19 +5,19 @@ import { amplifyPush, deleteProject, deleteProjectDir, - putItemInTable, - scanTable, rebuildApi, getProjectMeta, + updateApiSchema, } from '@aws-amplify/amplify-e2e-core'; +import { testTableAfterRebuildApi, testTableBeforeRebuildApi } from '../rebuild-test-helpers'; const projName = 'apitest'; + let projRoot; beforeEach(async () => { projRoot = await createNewProjectDir(projName); await initJSProjectWithProfile(projRoot, { name: projName }); await addApiWithoutSchema(projRoot, { transformerVersion: 2 }); - await amplifyPush(projRoot); }); afterEach(async () => { await deleteProject(projRoot); @@ -25,20 +25,29 @@ afterEach(async () => { }); describe('amplify rebuild api', () => { - it('recreates all model tables', async () => { + it('recreates single table', async () => { + await amplifyPush(projRoot); const projMeta = getProjectMeta(projRoot); const apiId = projMeta?.api?.[projName]?.output?.GraphQLAPIIdOutput; const region = projMeta?.providers?.awscloudformation?.Region; expect(apiId).toBeDefined(); expect(region).toBeDefined(); - const tableName = `Todo-${apiId}-integtest`; - await putItemInTable(tableName, region, { id: 'this is a test value' }); - const scanResultBefore = await scanTable(tableName, region); - expect(scanResultBefore.Items.length).toBe(1); - + await testTableBeforeRebuildApi(apiId, region, 'Todo'); await rebuildApi(projRoot, projName); + await testTableAfterRebuildApi(apiId, region, 'Todo'); + }); + it('recreates tables for relational models', async () => { + await updateApiSchema(projRoot, projName, 'relational_models_v2.graphql'); + await amplifyPush(projRoot); + const projMeta = getProjectMeta(projRoot); + const apiId = projMeta?.api?.[projName]?.output?.GraphQLAPIIdOutput; + const region = projMeta?.providers?.awscloudformation?.Region; + expect(apiId).toBeDefined(); + expect(region).toBeDefined(); - const scanResultAfter = await scanTable(tableName, region); - expect(scanResultAfter.Items.length).toBe(0); + const modelNames = ['Todo', 'Task', 'Worker']; + modelNames.forEach(async (modelName) => await testTableBeforeRebuildApi(apiId, region, modelName)); + await rebuildApi(projRoot, projName); + modelNames.forEach(async (modelName) => await testTableAfterRebuildApi(apiId, region, modelName)); }); }); diff --git a/packages/amplify-e2e-tests/src/__tests__/api_6c.test.ts b/packages/amplify-e2e-tests/src/__tests__/api_6c.test.ts new file mode 100644 index 00000000000..752ddac1533 --- /dev/null +++ b/packages/amplify-e2e-tests/src/__tests__/api_6c.test.ts @@ -0,0 +1,40 @@ +import { + createNewProjectDir, + initJSProjectWithProfile, + addApiWithoutSchema, + amplifyPush, + deleteProjectDir, + rebuildApi, + getProjectMeta, + updateApiSchema, + deleteProject, +} from '@aws-amplify/amplify-e2e-core'; +import { testTableAfterRebuildApi, testTableBeforeRebuildApi } from '../rebuild-test-helpers'; + +const projName = 'apitest'; + +let projRoot; +beforeEach(async () => { + projRoot = await createNewProjectDir(projName); +}); +afterEach(async () => { + await deleteProject(projRoot, undefined, false, 1000 * 60 * 30); + deleteProjectDir(projRoot); +}); + +describe('amplify rebuild api', () => { + it('recreates tables for searchable models', async () => { + await initJSProjectWithProfile(projRoot, { name: projName }); + await addApiWithoutSchema(projRoot, { transformerVersion: 2 }); + await updateApiSchema(projRoot, projName, 'searchable_model_v2.graphql'); + await amplifyPush(projRoot); + const projMeta = getProjectMeta(projRoot); + const apiId = projMeta?.api?.[projName]?.output?.GraphQLAPIIdOutput; + const region = projMeta?.providers?.awscloudformation?.Region; + expect(apiId).toBeDefined(); + expect(region).toBeDefined(); + await testTableBeforeRebuildApi(apiId, region, 'Todo'); + await rebuildApi(projRoot, projName); + await testTableAfterRebuildApi(apiId, region, 'Todo'); + }); +}); diff --git a/packages/amplify-e2e-tests/src/rebuild-test-helpers/index.ts b/packages/amplify-e2e-tests/src/rebuild-test-helpers/index.ts new file mode 100644 index 00000000000..e6eb903897a --- /dev/null +++ b/packages/amplify-e2e-tests/src/rebuild-test-helpers/index.ts @@ -0,0 +1,14 @@ +import { putItemInTable, scanTable } from '@aws-amplify/amplify-e2e-core'; + +export const testTableBeforeRebuildApi = async (apiId: string, region: string, modelName: string) => { + const tableName = `${modelName}-${apiId}-integtest`; + await putItemInTable(tableName, region, { id: 'this is a test value' }); + const scanResultBefore = await scanTable(tableName, region); + expect(scanResultBefore.Items.length).toBe(1); +}; + +export const testTableAfterRebuildApi = async (apiId: string, region: string, modelName: string) => { + const tableName = `${modelName}-${apiId}-integtest`; + const scanResultAfter = await scanTable(tableName, region); + expect(scanResultAfter.Items.length).toBe(0); +}; diff --git a/packages/amplify-provider-awscloudformation/src/graphql-resource-manager/amplify-graphql-resource-manager.ts b/packages/amplify-provider-awscloudformation/src/graphql-resource-manager/amplify-graphql-resource-manager.ts index f40e7d6a386..a224d5e914b 100644 --- a/packages/amplify-provider-awscloudformation/src/graphql-resource-manager/amplify-graphql-resource-manager.ts +++ b/packages/amplify-provider-awscloudformation/src/graphql-resource-manager/amplify-graphql-resource-manager.ts @@ -22,6 +22,9 @@ import { addGSI, getGSIDetails, removeGSI } from './dynamodb-gsi-helpers'; import { loadConfiguration } from '../configuration-manager'; const ROOT_LEVEL = 'root'; +const RESERVED_ROOT_STACK_TEMPLATE_STATE_KEY_NAME = '_root'; +const CONNECTION_STACK_NAME = 'ConnectionStack'; +const SEARCHABLE_STACK_NAME = 'SearchableStack'; /** * Type for GQLResourceManagerProps @@ -166,15 +169,25 @@ export class GraphQLResourceManager { fs.copySync(previousStepPath, stepPath); previousStepPath = stepPath; - const tables = this.templateState.getKeys(); + const nestedStacks = this.templateState.getKeys().filter((k) => k !== RESERVED_ROOT_STACK_TEMPLATE_STATE_KEY_NAME); const tableNames = []; - tables.forEach((tableName) => { - tableNames.push(tableNameMap.get(tableName)); - const tableNameStackFilePath = path.join(stepPath, 'stacks', `${tableName}.json`); - fs.ensureDirSync(path.dirname(tableNameStackFilePath)); - JSONUtilities.writeJson(tableNameStackFilePath, this.templateState.pop(tableName)); + nestedStacks.forEach((stackName) => { + if (stackName !== CONNECTION_STACK_NAME && stackName !== SEARCHABLE_STACK_NAME) { + // Connection stack is not provisioning dynamoDB table and need to be filtered + tableNames.push(tableNameMap.get(stackName)); + } + const nestedStackFilePath = path.join(stepPath, 'stacks', `${stackName}.json`); + fs.ensureDirSync(path.dirname(nestedStackFilePath)); + JSONUtilities.writeJson(nestedStackFilePath, this.templateState.pop(stackName)); }); + // Update the root stack template when it is changed in template state + if (this.templateState.has(RESERVED_ROOT_STACK_TEMPLATE_STATE_KEY_NAME)) { + const rootStackFilePath = path.join(stepPath, 'cloudformation-template.json'); + fs.ensureDirSync(path.dirname(rootStackFilePath)); + JSONUtilities.writeJson(rootStackFilePath, this.templateState.pop(RESERVED_ROOT_STACK_TEMPLATE_STATE_KEY_NAME)); + } + const deploymentRootKey = `${ROOT_APPSYNC_S3_KEY}/${buildHash}/states/${stepNumber}`; const deploymentStep: DeploymentOp = { stackTemplatePathOrUrl: `${deploymentRootKey}/cloudformation-template.json`, @@ -303,16 +316,68 @@ export class GraphQLResourceManager { }; private tableRecreationManagement = (currentState: DiffableProject) => { - this.getTablesBeingReplaced().forEach((tableMeta) => { + const recreatedTables = this.getTablesBeingReplaced(); + recreatedTables.forEach((tableMeta) => { const ddbStack = this.getStack(tableMeta.stackName, currentState); this.dropTemplateResources(ddbStack); - // clear any other states created by GSI updates as dropping and recreating supersedes those changes this.clearTemplateState(tableMeta.stackName); this.templateState.add(tableMeta.stackName, JSONUtilities.stringify(ddbStack)); }); + + /** + * When rebuild api, the root stack needs to change the reference to nested stack output values to temporary null placeholder value + * as there will be no output from nested stacks. + */ + if (this.rebuildAllTables) { + const rootStack = this.getStack(ROOT_LEVEL, currentState); + const connectionStack = this.getStack(CONNECTION_STACK_NAME, currentState); + const searchableStack = this.getStack(SEARCHABLE_STACK_NAME, currentState); + const allRecreatedNestedStackNames = recreatedTables.map((tableMeta) => tableMeta.stackName); + // Drop resources and outputs for connection stack if existed + if (connectionStack) { + allRecreatedNestedStackNames.push(CONNECTION_STACK_NAME); + this.dropTemplateResources(connectionStack); + this.templateState.add(CONNECTION_STACK_NAME, JSONUtilities.stringify(connectionStack)); + } + // Drop resources and outputs for searchable stack if existed + if (searchableStack) { + allRecreatedNestedStackNames.push(SEARCHABLE_STACK_NAME); + this.dropTemplateResourcesForSearchableStack(searchableStack); + this.templateState.add(SEARCHABLE_STACK_NAME, JSONUtilities.stringify(searchableStack)); + } + // Update nested stack params in root stack + this.replaceRecreatedNestedStackParamsInRootStackTemplate(allRecreatedNestedStackNames, rootStack); + this.templateState.add(RESERVED_ROOT_STACK_TEMPLATE_STATE_KEY_NAME, JSONUtilities.stringify(rootStack)); + } }; + /** + * Set recreated nested stack parameters to 'TemporaryPlaceholderValue' in root stack template + * @param recreatedNestedStackNames names of recreated stacks + * @param rootStack root stack template + */ + private replaceRecreatedNestedStackParamsInRootStackTemplate(recreatedNestedStackNames: string[], rootStack: Template) { + recreatedNestedStackNames.forEach((stackName) => { + const stackParamsMap = rootStack.Resources[stackName].Properties.Parameters; + Object.keys(stackParamsMap).forEach((stackParamKey) => { + const paramObj = stackParamsMap[stackParamKey]; + const paramObjKeys = Object.keys(paramObj); + if (paramObjKeys.length === 1 && paramObjKeys[0] === 'Fn::GetAtt') { + const paramObjValue = paramObj[paramObjKeys[0]]; + if ( + Array.isArray(paramObjValue) && + paramObjValue.length === 2 && + recreatedNestedStackNames.includes(paramObjValue[0]) && + paramObjValue[1].startsWith('Outputs.') + ) { + stackParamsMap[stackParamKey] = 'TemporaryPlaceholderValue'; + } + } + }); + }); + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any getTablesBeingReplaced = (): any => { const gqlDiff = getGQLDiff(this.backendApiProjectRoot, this.cloudBackendApiProjectRoot); @@ -382,6 +447,18 @@ export class GraphQLResourceManager { template.Outputs = {}; }; + /** + * Remove all outputs and resources except for search domain for searchable stack + * @param template stack CFN tempalte + */ + private dropTemplateResourcesForSearchableStack = (template: Template): void => { + const OpenSearchDomainLogicalID = 'OpenSearchDomain'; + const searchDomain = template.Resources[OpenSearchDomainLogicalID]; + template.Resources = {}; + template.Resources[OpenSearchDomainLogicalID] = searchDomain; + template.Outputs = {}; + }; + private clearTemplateState = (stackName: string) => { while (this.templateState.has(stackName)) { this.templateState.pop(stackName); From 067c8abce2361058658fe200937075260cf935c6 Mon Sep 17 00:00:00 2001 From: Kamil Sobol Date: Mon, 20 Mar 2023 16:04:15 -0700 Subject: [PATCH 04/84] chore: re-enable tests on windows (#12272) * chore: re-enable tests on windows * chore: fix the exclusion list --- scripts/split-e2e-tests-v2.ts | 37 +++-------------------------------- 1 file changed, 3 insertions(+), 34 deletions(-) diff --git a/scripts/split-e2e-tests-v2.ts b/scripts/split-e2e-tests-v2.ts index 96884aa9cb1..49a1d9a99c7 100644 --- a/scripts/split-e2e-tests-v2.ts +++ b/scripts/split-e2e-tests-v2.ts @@ -103,37 +103,23 @@ const TEST_EXCLUSIONS: { l: string[]; w: string[] } = { w: [ 'src/__tests__/opensearch-simulator/opensearch-simulator.test.ts', 'src/__tests__/storage-simulator/S3server.test.ts', - 'src/__tests__/dynamodb-simulator/dynamodb-simulator.test.ts', 'src/__tests__/amplify-app.test.ts', - 'src/__tests__/analytics-2.test.ts', - 'src/__tests__/api_2a.test.ts', - 'src/__tests__/api_2b.test.ts', - 'src/__tests__/api_3.test.ts', - 'src/__tests__/api_5.test.ts', - 'src/__tests__/custom_policies_container.test.ts', // TODO: this is required to jump over breaking change between 2.53 and 2.68 of CDK. // Remove exclusion for both custom resource tests after we ship new extensibility helper. 'src/__tests__/custom_resources.test.ts', 'src/__tests__/custom-resource-with-storage.test.ts', 'src/__tests__/datastore-modelgen.test.ts', - 'src/__tests__/delete.test.ts', 'src/__tests__/diagnose.test.ts', 'src/__tests__/env-2.test.ts', - 'src/__tests__/env-3.test.ts', 'src/__tests__/export.test.ts', - 'src/__tests__/function_1.test.ts', - 'src/__tests__/function_2a.test.ts', - 'src/__tests__/function_2b.test.ts', 'src/__tests__/function_3a.test.ts', 'src/__tests__/function_3b.test.ts', 'src/__tests__/function_4.test.ts', 'src/__tests__/function_6.test.ts', 'src/__tests__/function_7.test.ts', 'src/__tests__/function_8.test.ts', - 'src/__tests__/geo-add-c.test.ts', 'src/__tests__/geo-add-e.test.ts', 'src/__tests__/geo-add-f.test.ts', - 'src/__tests__/geo-remove-1.test.ts', 'src/__tests__/geo-remove-2.test.ts', 'src/__tests__/geo-remove-3.test.ts', 'src/__tests__/geo-update-1.test.ts', @@ -148,34 +134,15 @@ const TEST_EXCLUSIONS: { l: string[]; w: string[] } = { 'src/__tests__/import_dynamodb_2a.test.ts', 'src/__tests__/import_dynamodb_2b.test.ts', 'src/__tests__/import_dynamodb_2c.test.ts', - 'src/__tests__/import_s3_1.test.ts', 'src/__tests__/import_s3_2a.test.ts', 'src/__tests__/import_s3_2b.test.ts', 'src/__tests__/import_s3_2c.test.ts', 'src/__tests__/layer-2.test.ts', 'src/__tests__/mock-api.test.ts', - 'src/__tests__/notifications-analytics-compatibility-in-app-1.test.ts', - 'src/__tests__/notifications-analytics-compatibility-sms-1.test.ts', - 'src/__tests__/notifications-analytics-compatibility-sms-2.test.ts', - 'src/__tests__/notifications-in-app-messaging-env-1.test.ts', - 'src/__tests__/notifications-in-app-messaging-env-2.test.ts', - 'src/__tests__/notifications-lifecycle.test.ts', - 'src/__tests__/notifications-sms-pull.test.ts', - 'src/__tests__/notifications-sms.test.ts', 'src/__tests__/pull.test.ts', - 'src/__tests__/schema-auth-11-a.test.ts', - 'src/__tests__/schema-auth-15.test.ts', - 'src/__tests__/schema-auth-9-a.test.ts', - 'src/__tests__/schema-auth-9-b.test.ts', - 'src/__tests__/schema-auth-9-c.test.ts', 'src/__tests__/schema-iterative-rollback-1.test.ts', 'src/__tests__/schema-iterative-rollback-2.test.ts', - 'src/__tests__/storage-2.test.ts', 'src/__tests__/storage-5.test.ts', - 'src/__tests__/studio-modelgen.test.ts', - 'src/__tests__/transformer-migrations/http-migration.test.ts', - 'src/__tests__/transformer-migrations/model-migration.test.ts', - 'src/__tests__/transformer-migrations/searchable-migration.test.ts', 'src/__tests__/uibuilder.test.ts', 'src/__tests__/pinpoint/android-analytics-pinpoint-config.test.ts', 'src/__tests__/pinpoint/android-notifications-pinpoint-config.test.ts', @@ -255,7 +222,9 @@ export const splitTestsV2 = function splitTests( } // when we are not running E2E on 'dev', we only run a subset of tests on Windows const isNotDevBranch = process.env.CIRCLE_BRANCH !== 'dev'; - if (isNotDevBranch && os === 'w' && !WINDOWS_SMOKE_TESTS.includes(test)) { + const shouldForceAllTests = process.env.CIRCLE_BRANCH?.endsWith('/run-all-tests') ?? false; + const shouldFilterWindowsTests = isNotDevBranch && !shouldForceAllTests; + if (shouldFilterWindowsTests && os === 'w' && !WINDOWS_SMOKE_TESTS.includes(test)) { continue; // skip this test } const US_WEST_2 = FORCE_US_WEST_2.find((t) => test.startsWith(t)); From f6ad98ca254c6c74b2e77b67d6631f63c6325d6c Mon Sep 17 00:00:00 2001 From: Kamil Sobol Date: Tue, 21 Mar 2023 09:35:32 -0700 Subject: [PATCH 05/84] chore: use small executor at wait step (#12275) --- .circleci/config.base.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.circleci/config.base.yml b/.circleci/config.base.yml index 781c42380e5..3158e383714 100644 --- a/.circleci/config.base.yml +++ b/.circleci/config.base.yml @@ -59,6 +59,14 @@ executors: environment: AMPLIFY_DIR: /home/circleci/repo/out AMPLIFY_PATH: /home/circleci/repo/out/amplify-pkg-linux-x64 + l_small: &linux-e2e-executor-small + docker: + - image: public.ecr.aws/j4f5f3h7/amplify-cli-e2e-base-image-repo-public:latest + working_directory: ~/repo + resource_class: small + environment: + AMPLIFY_DIR: /home/circleci/repo/out + AMPLIFY_PATH: /home/circleci/repo/out/amplify-pkg-linux-x64 defaults: &defaults working_directory: ~/repo @@ -897,7 +905,7 @@ jobs: --data '{"branch":"'$CIRCLE_BRANCH'","parameters":{"e2e_workflow_cleanup":true,"setup":false,"e2e_workflow_cleanup_workflow_id":"'$CIRCLE_WORKFLOW_ID'"}}' wait_for_all: - <<: *linux-e2e-executor-medium + <<: *linux-e2e-executor-small steps: - restore_cache: key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} From 7fab3a269b3e67addf32dbc4169e82b14d19110e Mon Sep 17 00:00:00 2001 From: Kamil Sobol Date: Tue, 21 Mar 2023 09:49:24 -0700 Subject: [PATCH 06/84] chore: increase parallelization in e2e tests (#12276) * chore: increase parallelization of tests * chore: run searchable migration solo --- .circleci/config.base.yml | 12 ++++++------ .circleci/config.yml | 2 +- .circleci/local_publish_helpers.sh | 4 ++-- scripts/split-e2e-tests-v2.ts | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.circleci/config.base.yml b/.circleci/config.base.yml index 3158e383714..baf0f53df42 100644 --- a/.circleci/config.base.yml +++ b/.circleci/config.base.yml @@ -523,7 +523,7 @@ jobs: source .circleci/local_publish_helpers.sh changeNpmGlobalPath cd packages/amplify-migration-tests - retry yarn run migration_v5.2.0 --no-cache --maxWorkers=3 --forceExit $TEST_SUITE + retry yarn run migration_v5.2.0 --no-cache --maxWorkers=4 --forceExit $TEST_SUITE no_output_timeout: 65m - run: *scan_e2e_test_artifacts - store_test_results: @@ -553,7 +553,7 @@ jobs: source .circleci/local_publish_helpers.sh changeNpmGlobalPath cd packages/amplify-migration-tests - retry yarn run migration_v6.1.0 --no-cache --maxWorkers=3 --forceExit $TEST_SUITE + retry yarn run migration_v6.1.0 --no-cache --maxWorkers=4 --forceExit $TEST_SUITE no_output_timeout: 65m - run: *scan_e2e_test_artifacts - store_test_results: @@ -585,7 +585,7 @@ jobs: cd packages/amplify-migration-tests unset IS_AMPLIFY_CI echo $IS_AMPLIFY_CI - retry yarn run migration_v10.5.1 --no-cache --maxWorkers=3 --forceExit $TEST_SUITE + retry yarn run migration_v10.5.1 --no-cache --maxWorkers=4 --forceExit $TEST_SUITE no_output_timeout: 65m - run: *scan_e2e_test_artifacts - store_test_results: @@ -615,7 +615,7 @@ jobs: source .circleci/local_publish_helpers.sh changeNpmGlobalPath cd packages/amplify-migration-tests - retry yarn run migration_v4.28.2_nonmultienv_layers --no-cache --maxWorkers=3 --forceExit $TEST_SUITE + retry yarn run migration_v4.28.2_nonmultienv_layers --no-cache --maxWorkers=4 --forceExit $TEST_SUITE no_output_timeout: 90m - run: *scan_e2e_test_artifacts - store_test_results: @@ -645,7 +645,7 @@ jobs: source .circleci/local_publish_helpers.sh changeNpmGlobalPath cd packages/amplify-migration-tests - retry yarn run migration_v4.52.0_multienv_layers --no-cache --maxWorkers=3 --forceExit $TEST_SUITE + retry yarn run migration_v4.52.0_multienv_layers --no-cache --maxWorkers=4 --forceExit $TEST_SUITE no_output_timeout: 90m - run: *scan_e2e_test_artifacts - store_test_results: @@ -673,7 +673,7 @@ jobs: source .circleci/local_publish_helpers.sh amplify -v cd packages/amplify-console-integration-tests - retry yarn run console-integration --no-cache --maxWorkers=3 + retry yarn run console-integration --no-cache --maxWorkers=4 name: 'Run Amplify Console integration tests' no_output_timeout: 90m - run: *scan_e2e_test_artifacts diff --git a/.circleci/config.yml b/.circleci/config.yml index 859f2273e98..31b1509faac 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -167,7 +167,7 @@ jobs: source .circleci/local_publish_helpers.sh amplify -v cd packages/amplify-console-integration-tests - retry yarn run console-integration --no-cache --maxWorkers=3 + retry yarn run console-integration --no-cache --maxWorkers=4 name: Run Amplify Console integration tests no_output_timeout: 90m - run: diff --git a/.circleci/local_publish_helpers.sh b/.circleci/local_publish_helpers.sh index 822f8d598a9..b3022849be4 100644 --- a/.circleci/local_publish_helpers.sh +++ b/.circleci/local_publish_helpers.sh @@ -273,9 +273,9 @@ function runE2eTest { if [ -f $FAILED_TEST_REGEX_FILE ]; then # read the content of failed tests failedTests=$(<$FAILED_TEST_REGEX_FILE) - yarn run e2e --forceExit --no-cache --maxWorkers=3 $TEST_SUITE -t "$failedTests" + yarn run e2e --forceExit --no-cache --maxWorkers=4 $TEST_SUITE -t "$failedTests" else - yarn run e2e --forceExit --no-cache --maxWorkers=3 $TEST_SUITE + yarn run e2e --forceExit --no-cache --maxWorkers=4 $TEST_SUITE fi } diff --git a/scripts/split-e2e-tests-v2.ts b/scripts/split-e2e-tests-v2.ts index 49a1d9a99c7..60552e19826 100644 --- a/scripts/split-e2e-tests-v2.ts +++ b/scripts/split-e2e-tests-v2.ts @@ -33,7 +33,7 @@ const RUN_SOLO = [ 'src/__tests__/schema-auth-11-a.test.ts', 'src/__tests__/schema-auth-15.test.ts', 'src/__tests__/schema-connection-1.test.ts', - 'src/__tests__/studio-modelgen.test.ts', + 'src/__tests__/transformer-migrations/searchable-migration.test.ts', ]; /** * Most Windows tests only run on 'dev', except for this list of smoke tests. @@ -155,7 +155,7 @@ const TEST_EXCLUSIONS: { l: string[]; w: string[] } = { 'src/__tests__/pinpoint/notifications-pinpoint-config-util.ts', ], }; -const MAX_WORKERS = 3; +const MAX_WORKERS = 4; type OS_TYPE = 'w' | 'l'; type CandidateJob = { region: string; From 2c10f7ed68c3e41c042b8bb9d44c52c84912e012 Mon Sep 17 00:00:00 2001 From: akshbhu <39866697+akshbhu@users.noreply.github.com> Date: Tue, 21 Mar 2023 16:05:40 -0400 Subject: [PATCH 07/84] fix: source temp aws creds and ec2 instance credentials using general level config (#12181) * fix: added a test for general profile * fix: added config change * fix: exp1 * fix: running only single test * fix: added aplify error for missing creds * fix: fixes e2e * fix: cci config file * chore: fixes lint * chore: fixes ci config again * chore: running test in specific branches * fix: running test after verification * fix: address comments * fix: e2e tests config * chore: removes extra comments * fix: fixes codeql warnings * fix: config file --------- Co-authored-by: Akshay Upadhyay --- .circleci/config.base.yml | 44 +++++++++++++++++++ .../src/init/non-interactive-init.ts | 27 +++++++++--- packages/amplify-e2e-tests/package.json | 1 + .../general-config-headless-init.test.ts | 33 ++++++++++++++ .../src/__tests__/git-clone-attach.test.ts | 3 +- .../__tests__/amplify-service-manager.test.ts | 28 ++++++++++++ .../src/amplify-service-manager.ts | 8 ++++ .../src/configuration-manager.ts | 2 +- 8 files changed, 139 insertions(+), 7 deletions(-) create mode 100644 packages/amplify-e2e-tests/src/__tests__/general-config/general-config-headless-init.test.ts diff --git a/.circleci/config.base.yml b/.circleci/config.base.yml index baf0f53df42..f8bd05a7a24 100644 --- a/.circleci/config.base.yml +++ b/.circleci/config.base.yml @@ -654,6 +654,36 @@ jobs: path: ~/repo/packages/amplify-migration-tests/amplify-migration-reports working_directory: ~/repo + amplify_general_config_tests: + parameters: + os: + type: executor + default: l_large + executor: << parameters.os >> + environment: + AMPLIFY_PATH: /home/circleci/.npm-global/lib/node_modules/@aws-amplify/cli/bin/amplify + steps: + - restore_cache: + key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} + - restore_cache: + key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }} + - restore_cache: + key: amplify-pkg-binaries-{{ .Branch }}-{{ .Revision }} + - run: + name: Run tests using general profile + command: | + source .circleci/local_publish_helpers.sh + changeNpmGlobalPath + cd packages/amplify-e2e-tests + retry yarn run general-config-e2e --no-cache --maxWorkers=3 --forceExit $TEST_SUITE + no_output_timeout: 90m + - run: *scan_e2e_test_artifacts + - store_test_results: + path: ~/repo/packages/amplify-e2e-tests/ + - store_artifacts: + path: ~/repo/packages/amplify-e2e-tests/amplify-e2e-reports + working_directory: ~/repo + amplify_console_integration_tests: parameters: os: @@ -1156,6 +1186,20 @@ workflows: - /run-e2e\/.*/ requires: - upload_pkg_binaries + - amplify_general_config_tests: + context: + - e2e-auth-credentials + - cleanup-resources + - e2e-test-context + filters: + branches: + only: + - dev + - /run-e2e-with-rc\/.*/ + - /tagged-release\/.*/ + - /run-e2e\/.*/ + requires: + - upload_pkg_binaries - amplify_console_integration_tests: context: - e2e-auth-credentials diff --git a/packages/amplify-e2e-core/src/init/non-interactive-init.ts b/packages/amplify-e2e-core/src/init/non-interactive-init.ts index e55378bf7d0..3b7356121d8 100644 --- a/packages/amplify-e2e-core/src/init/non-interactive-init.ts +++ b/packages/amplify-e2e-core/src/init/non-interactive-init.ts @@ -9,8 +9,8 @@ import { CategoriesConfig, AwsProviderConfig } from './headless-types'; export const nonInteractiveInitAttach = async ( projRoot: string, amplifyInitConfig: AmplifyInitConfig, + awsProviderConfig: AwsProviderConfig | AwsProviderGeneralConfig, categoriesConfig?: CategoriesConfig, - awsProviderConfig = getAwsProviderConfig(), ): Promise => { const args = [ 'init', @@ -67,10 +67,23 @@ export const getAmplifyInitConfig = (projectName: string, envName: string): Ampl /** * Returns a default AwsProviderConfig */ -export const getAwsProviderConfig = (): AwsProviderConfig => ({ - configLevel: 'project', - useProfile: true, - profileName: TEST_PROFILE_NAME, +export const getAwsProviderConfig = (profileType?: string): AwsProviderConfig | AwsProviderGeneralConfig => { + if (profileType === 'general') { + return getAwsProviderGeneralConfig(); + } else { + return { + configLevel: 'project', + useProfile: true, + profileName: TEST_PROFILE_NAME, + }; + } +}; + +/** + * Returns a general AwsProviderConfig + */ +export const getAwsProviderGeneralConfig = (): AwsProviderGeneralConfig => ({ + configLevel: 'general', }); /** @@ -82,3 +95,7 @@ export type AmplifyInitConfig = { defaultEditor: string; frontend?: string; }; + +export type AwsProviderGeneralConfig = { + configLevel: string; +}; diff --git a/packages/amplify-e2e-tests/package.json b/packages/amplify-e2e-tests/package.json index 02d829c2aaf..d244d4a04a4 100644 --- a/packages/amplify-e2e-tests/package.json +++ b/packages/amplify-e2e-tests/package.json @@ -18,6 +18,7 @@ "private": true, "scripts": { "e2e": "npm run setup-profile && jest --verbose", + "general-config-e2e": "jest src/__tests__/general-config/general-config-headless-init.test.ts --verbose", "build-tests": "tsc --build tsconfig.tests.json", "setup-profile": "ts-node ./src/configure_tests.ts", "clean-e2e-resources": "ts-node ./src/cleanup-e2e-resources.ts" diff --git a/packages/amplify-e2e-tests/src/__tests__/general-config/general-config-headless-init.test.ts b/packages/amplify-e2e-tests/src/__tests__/general-config/general-config-headless-init.test.ts new file mode 100644 index 00000000000..57d45b081f2 --- /dev/null +++ b/packages/amplify-e2e-tests/src/__tests__/general-config/general-config-headless-init.test.ts @@ -0,0 +1,33 @@ +/** + * Tests for headless init/pull workflows on git-cloned projects + * These tests exercise workflows that hosting executes during backend builds + */ + +import { + createNewProjectDir, + deleteProject, + deleteProjectDir, + getAmplifyInitConfig, + getAwsProviderConfig, + nonInteractiveInitAttach, +} from '@aws-amplify/amplify-e2e-core'; +import {} from '@aws-amplify/amplify-e2e-core'; + +describe('attach amplify to git-cloned project', () => { + const envName = 'test'; + const projectName = 'initGeneral'; + let projRoot: string; + beforeAll(async () => { + projRoot = await createNewProjectDir('clone-test'); + }); + + afterAll(async () => { + await deleteProject(projRoot); + deleteProjectDir(projRoot); + }); + + test('headless init works with general profile', async () => { + // execute headless init + await nonInteractiveInitAttach(projRoot, getAmplifyInitConfig(projectName, envName), getAwsProviderConfig('general')); + }); +}); diff --git a/packages/amplify-e2e-tests/src/__tests__/git-clone-attach.test.ts b/packages/amplify-e2e-tests/src/__tests__/git-clone-attach.test.ts index 363c3a17856..f19cd72ce96 100644 --- a/packages/amplify-e2e-tests/src/__tests__/git-clone-attach.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/git-clone-attach.test.ts @@ -13,6 +13,7 @@ import { deleteProjectDir, getAmplifyInitConfig, getAmplifyPullConfig, + getAwsProviderConfig, getProjectConfig, getSocialProviders, getTeamProviderInfo, @@ -76,7 +77,7 @@ describe('attach amplify to git-cloned project', () => { region: importBucketRegion, }, }; - await nonInteractiveInitAttach(projRoot, getAmplifyInitConfig(projectName, envName), categoriesConfig); + await nonInteractiveInitAttach(projRoot, getAmplifyInitConfig(projectName, envName), getAwsProviderConfig(), categoriesConfig); await buildOverrides(projRoot); // expect no file changes diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/amplify-service-manager.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/amplify-service-manager.test.ts index 52bc1f0dc84..56bc1bce17a 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/amplify-service-manager.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/amplify-service-manager.test.ts @@ -37,4 +37,32 @@ describe('init', () => { `[ProjectInitError: You have reached the Amplify App limit for this account and region]`, ); }); + + it('throws Configutation error if config level is general and soorcing wrong credentials', async () => { + const amplifyClientGeneralConfigStub = { + createApp: jest.fn().mockReturnValue({ + promise: jest.fn().mockRejectedValue({ + code: 'ConfigError', + message: 'Missing Region in Config', + }), + }), + } as unknown as Amplify; + getConfiguredAmplifyClientMock.mockClear(); + getConfiguredAmplifyClientMock.mockResolvedValue(amplifyClientGeneralConfigStub); + + const amplifyServiceParamsStub = { + context: { + exeInfo: { + awsConfigInfo: { + configLevel: 'general', + }, + }, + }, + awsConfigInfo: {}, + projectName: 'test-project', + envName: 'test', + stackName: 'test-stack-name', + }; + await expect(init(amplifyServiceParamsStub)).rejects.toMatchInlineSnapshot(`[ConfigurationError: Missing Region in Config]`); + }); }); diff --git a/packages/amplify-provider-awscloudformation/src/amplify-service-manager.ts b/packages/amplify-provider-awscloudformation/src/amplify-service-manager.ts index 7ab3c18f7b6..64d8909f0d2 100644 --- a/packages/amplify-provider-awscloudformation/src/amplify-service-manager.ts +++ b/packages/amplify-provider-awscloudformation/src/amplify-service-manager.ts @@ -142,6 +142,14 @@ export async function init(amplifyServiceParams) { e, ); } + if (context?.exeInfo?.awsConfigInfo?.configLevel === 'general' && e.code === 'ConfigError') { + throw new AmplifyError('ConfigurationError', { + code: e.code, + message: e.message, + resolution: 'https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-credentials-node.html', + }); + } + // default fault throw new AmplifyFault( 'ProjectInitFault', { diff --git a/packages/amplify-provider-awscloudformation/src/configuration-manager.ts b/packages/amplify-provider-awscloudformation/src/configuration-manager.ts index fb95520eda1..699892837a4 100644 --- a/packages/amplify-provider-awscloudformation/src/configuration-manager.ts +++ b/packages/amplify-provider-awscloudformation/src/configuration-manager.ts @@ -859,7 +859,7 @@ async function determineAuthFlow(context: $TSContext, projectConfig?: ProjectCon useProfile = useProfile ?? projectConfig?.config?.useProfile; profileName = profileName ?? projectConfig?.config?.profileName; - const generalCreds = projectConfig?.configLevel === 'general'; + const generalCreds = projectConfig?.configLevel === 'general' || cfnParams?.configLevel === 'general'; if (generalCreds) { return { type: 'general' }; From fa3fc781279c5ffcd1f838d051cb9a082c14d69c Mon Sep 17 00:00:00 2001 From: Kamil Sobol Date: Tue, 21 Mar 2023 15:42:00 -0700 Subject: [PATCH 08/84] chore: use nodejs 14.x compatible with CDK (#12280) * chore: use nodejs 14.x compatible with CDK * chore: use nodejs 14.x compatible with CDK * chore: use nodejs 14.x compatible with CDK --- .circleci/config.base.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.circleci/config.base.yml b/.circleci/config.base.yml index f8bd05a7a24..9f473197591 100644 --- a/.circleci/config.base.yml +++ b/.circleci/config.base.yml @@ -148,6 +148,7 @@ jobs: condition: equal: [*windows-e2e-executor-xlarge, << parameters.os >>] steps: + - install_node14_windows - checkout - run: yarn config set script-shell $(which bash) - run: yarn run production-build @@ -468,6 +469,7 @@ jobs: condition: equal: [*windows-e2e-executor-medium, << parameters.os >>] steps: + - install_node14_windows - attach_workspace: at: ~/. - run: @@ -1409,3 +1411,20 @@ commands: exit 1 fi when: always + install_node14_windows: + description: Install Node 14 on Windows + steps: + - run: + name: Install Node 14 + command: | + nvm version + nvm install 14.18 + nvm use 14.18 + nvm ls + - run: + name: Check Node, install yarn + command: | + node --version + npm --version + npm install -g yarn + yarn --version From f29c140125a7c626c4d3ea0877641b7b13ff7763 Mon Sep 17 00:00:00 2001 From: Pavel Lazar <85319655+lazpavel@users.noreply.github.com> Date: Wed, 22 Mar 2023 11:23:54 -0400 Subject: [PATCH 09/84] fix: skip backend sync on force push (#12262) * fix: skip backend sync on force push --- .../src/__tests__/commands/push.test.ts | 59 +++++++++++++++++++ packages/amplify-cli/src/commands/push.ts | 52 +++------------- .../amplify-cli/src/domain/amplify-toolkit.ts | 2 +- .../current-cloud-backend-utils.ts | 52 ++++++++++++++++ .../amplify-helpers/push-resources.ts | 15 ----- .../src/__tests__/push.test.ts | 47 +++++++++++++++ 6 files changed, 167 insertions(+), 60 deletions(-) create mode 100644 packages/amplify-cli/src/__tests__/commands/push.test.ts create mode 100644 packages/amplify-cli/src/extensions/amplify-helpers/current-cloud-backend-utils.ts create mode 100644 packages/amplify-e2e-tests/src/__tests__/push.test.ts diff --git a/packages/amplify-cli/src/__tests__/commands/push.test.ts b/packages/amplify-cli/src/__tests__/commands/push.test.ts new file mode 100644 index 00000000000..5e064a9ef33 --- /dev/null +++ b/packages/amplify-cli/src/__tests__/commands/push.test.ts @@ -0,0 +1,59 @@ +import { $TSContext } from 'amplify-cli-core'; +import { run as pushCommand } from '../../commands/push'; +import * as updateTrackedFilesModule from '../../extensions/amplify-helpers/update-tracked-files'; +import * as currentCloudBackendUtilsModule from '../../extensions/amplify-helpers/current-cloud-backend-utils'; + +describe('amplify push:', () => { + const mockContext = { + amplify: { + pushResources: jest.fn(), + constructExeInfo: jest.fn().mockReturnValue({ + inputParams: { + yes: true, + }, + }), + }, + exeInfo: { + localEnvInfo: { + noUpdateBackend: false, + }, + }, + parameters: { + options: { + force: false, + }, + command: 'push', + }, + }; + + afterEach(() => { + jest.clearAllMocks(); + }); + + it('push run method should exist', () => { + expect(pushCommand).toBeDefined(); + }); + + it('push run should sync current backend', async () => { + const syncCurrentCloudBackendSpy = jest.spyOn(currentCloudBackendUtilsModule, 'syncCurrentCloudBackend') as jest.SpyInstance; + syncCurrentCloudBackendSpy.mockImplementation(() => Promise.resolve()); + + const updateCognitoTrackedFilesSpy = jest.spyOn(updateTrackedFilesModule, 'updateCognitoTrackedFiles') as jest.SpyInstance; + updateCognitoTrackedFilesSpy.mockImplementation(() => Promise.resolve()); + + await pushCommand(mockContext as unknown as $TSContext); + expect(syncCurrentCloudBackendSpy).toHaveBeenCalled(); + }); + + it('push --force run should NOT sync current backend', async () => { + const syncCurrentCloudBackendSpy = jest.spyOn(currentCloudBackendUtilsModule, 'syncCurrentCloudBackend') as jest.SpyInstance; + syncCurrentCloudBackendSpy.mockImplementation(() => Promise.resolve()); + + const updateCognitoTrackedFilesSpy = jest.spyOn(updateTrackedFilesModule, 'updateCognitoTrackedFiles') as jest.SpyInstance; + updateCognitoTrackedFilesSpy.mockImplementation(() => Promise.resolve()); + + mockContext.parameters.options.force = true; + await pushCommand(mockContext as unknown as $TSContext); + expect(syncCurrentCloudBackendSpy).not.toHaveBeenCalled(); + }); +}); diff --git a/packages/amplify-cli/src/commands/push.ts b/packages/amplify-cli/src/commands/push.ts index 4be2fe73170..c880c3e8596 100644 --- a/packages/amplify-cli/src/commands/push.ts +++ b/packages/amplify-cli/src/commands/push.ts @@ -1,47 +1,6 @@ -import { $TSAny, $TSContext, AmplifyError, AmplifyFault, spinner, stateManager } from 'amplify-cli-core'; -import sequential from 'promise-sequential'; -import { - notifyFieldAuthSecurityChange, - notifyListQuerySecurityChange, - notifySecurityEnhancement, -} from '../extensions/amplify-helpers/auth-notifications'; -import { getProviderPlugins } from '../extensions/amplify-helpers/get-provider-plugins'; +import { $TSAny, $TSContext, AmplifyError } from 'amplify-cli-core'; import { updateCognitoTrackedFiles } from '../extensions/amplify-helpers/update-tracked-files'; - -/** - * Download and unzip deployment bucket contents to #current-cloud-backend so amplify status shows correct state - */ -const syncCurrentCloudBackend = async (context: $TSContext): Promise => { - context.exeInfo.restoreBackend = false; - const currentEnv = context.exeInfo.localEnvInfo.envName; - - try { - const amplifyMeta = stateManager.getMeta(); - const providerPlugins = getProviderPlugins(context); - const pullCurrentCloudTasks: (() => Promise<$TSAny>)[] = []; - - for (const provider of context.exeInfo.projectConfig.providers) { - const providerModule = await import(providerPlugins[provider]); - pullCurrentCloudTasks.push(() => providerModule.initEnv(context, amplifyMeta.providers[provider])); - } - - await notifySecurityEnhancement(context); - - let securityChangeNotified = false; - securityChangeNotified = await notifyFieldAuthSecurityChange(context); - - if (!securityChangeNotified) { - securityChangeNotified = await notifyListQuerySecurityChange(context); - } - - spinner.start(`Fetching updates to backend environment: ${currentEnv} from the cloud.`); - await sequential(pullCurrentCloudTasks); - spinner.succeed(`Successfully pulled backend environment ${currentEnv} from the cloud.`); - } catch (e) { - spinner.fail(`There was an error pulling the backend environment ${currentEnv}.`); - throw new AmplifyFault('BackendPullFault', { message: e.message }, e); - } -}; +import { syncCurrentCloudBackend } from '../extensions/amplify-helpers/current-cloud-backend-utils'; /** * Updates tracked files for auto updates in the build directory that will not be detected for 'amplify push' @@ -61,7 +20,12 @@ export const run = async (context: $TSContext): Promise<$TSAny> => { if (context.parameters.options?.force) { context.exeInfo.forcePush = true; } - await syncCurrentCloudBackend(context); + + // force flag ignores project status check + if (!context.exeInfo.forcePush) { + await syncCurrentCloudBackend(context); + } + await updateTrackedFiles(); return context.amplify.pushResources(context); }; diff --git a/packages/amplify-cli/src/domain/amplify-toolkit.ts b/packages/amplify-cli/src/domain/amplify-toolkit.ts index f6eafb8e678..43725a76df3 100644 --- a/packages/amplify-cli/src/domain/amplify-toolkit.ts +++ b/packages/amplify-cli/src/domain/amplify-toolkit.ts @@ -94,7 +94,7 @@ export class AmplifyToolkit { return require('../extensions/amplify-helpers/push-resources').pushResources; } get storeCurrentCloudBackend() { - return require('../extensions/amplify-helpers/push-resources').storeCurrentCloudBackend; + return require('../extensions/amplify-helpers/current-cloud-backend-utils').storeCurrentCloudBackend; } get readJsonFile() { return require('../extensions/amplify-helpers/read-json-file').readJsonFile; diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/current-cloud-backend-utils.ts b/packages/amplify-cli/src/extensions/amplify-helpers/current-cloud-backend-utils.ts new file mode 100644 index 00000000000..733d99a6ac3 --- /dev/null +++ b/packages/amplify-cli/src/extensions/amplify-helpers/current-cloud-backend-utils.ts @@ -0,0 +1,52 @@ +import { $TSAny, $TSContext, AmplifyFault, spinner, stateManager } from 'amplify-cli-core'; +import sequential from 'promise-sequential'; +import { notifyFieldAuthSecurityChange, notifyListQuerySecurityChange, notifySecurityEnhancement } from './auth-notifications'; +import { getProviderPlugins } from './get-provider-plugins'; +import { getProjectConfig } from './get-project-config'; + +/** + * Download and unzip deployment bucket contents to #current-cloud-backend so amplify status shows correct state + */ +export const syncCurrentCloudBackend = async (context: $TSContext): Promise => { + context.exeInfo.restoreBackend = false; + const currentEnv = context.exeInfo.localEnvInfo.envName; + + try { + const amplifyMeta = stateManager.getMeta(); + const providerPlugins = getProviderPlugins(context); + const pullCurrentCloudTasks: (() => Promise<$TSAny>)[] = []; + + for (const provider of context.exeInfo.projectConfig.providers) { + const providerModule = await import(providerPlugins[provider]); + pullCurrentCloudTasks.push(() => providerModule.initEnv(context, amplifyMeta.providers[provider])); + } + + await notifySecurityEnhancement(context); + + if (!(await notifyFieldAuthSecurityChange(context))) { + await notifyListQuerySecurityChange(context); + } + + spinner.start(`Fetching updates to backend environment: ${currentEnv} from the cloud.`); + await sequential(pullCurrentCloudTasks); + spinner.succeed(`Successfully pulled backend environment ${currentEnv} from the cloud.`); + } catch (e) { + spinner.fail(`There was an error pulling the backend environment ${currentEnv}.`); + throw new AmplifyFault('BackendPullFault', { message: e.message }, e); + } +}; + +/** + * Delegates storeCurrentCloudBackend to all providers (just aws cfn provider) + */ +export const storeCurrentCloudBackend = async (context: $TSContext): Promise => { + const { providers } = getProjectConfig(); + const providerPlugins = getProviderPlugins(context); + + await Promise.all( + providers.map(async (provider: string) => { + const providerModule = await import(providerPlugins[provider]); + return providerModule.storeCurrentCloudBackend(context); + }), + ); +}; diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/push-resources.ts b/packages/amplify-cli/src/extensions/amplify-helpers/push-resources.ts index 893957925b1..bb71a71547e 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/push-resources.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/push-resources.ts @@ -201,18 +201,3 @@ const providersPush = async ( }), ); }; - -/** - * Delegates storeCurrentCloudBackend to all providers (just aws cfn provider) - */ -export const storeCurrentCloudBackend = async (context: $TSContext): Promise => { - const { providers } = getProjectConfig(); - const providerPlugins = getProviderPlugins(context); - - await Promise.all( - providers.map(async (provider: string) => { - const providerModule = await import(providerPlugins[provider]); - return providerModule.storeCurrentCloudBackend(context); - }), - ); -}; diff --git a/packages/amplify-e2e-tests/src/__tests__/push.test.ts b/packages/amplify-e2e-tests/src/__tests__/push.test.ts new file mode 100644 index 00000000000..5b6257ff2ab --- /dev/null +++ b/packages/amplify-e2e-tests/src/__tests__/push.test.ts @@ -0,0 +1,47 @@ +/* eslint-disable spellcheck/spell-checker */ +import { + addAuthWithDefault, + amplifyPushForce, + createNewProjectDir, + deleteProject, + deleteProjectDir, + getProjectMeta, + initJSProjectWithProfile, + amplifyPushAuth, +} from '@aws-amplify/amplify-e2e-core'; +import * as AWS from 'aws-sdk'; + +describe('amplify push ', () => { + let pushProjRoot: string; + beforeEach(async () => { + pushProjRoot = await createNewProjectDir('push-test'); + }); + + afterEach(async () => { + await deleteProject(pushProjRoot); + deleteProjectDir(pushProjRoot); + }); + + it('test push --force override current-cloud-backed zip', async () => { + await initJSProjectWithProfile(pushProjRoot, { + disableAmplifyAppCreation: false, + name: 'testPush', + }); + + await addAuthWithDefault(pushProjRoot); + const amplifyMeta = getProjectMeta(pushProjRoot); + const meta = amplifyMeta.providers.awscloudformation; + const bucketName = meta.DeploymentBucketName; + + const s3 = new AWS.S3(); + await s3 + .deleteObject({ + Bucket: bucketName, + Key: '#current-cloud-backend.zip', + }) + .promise(); + + await expect(amplifyPushAuth(pushProjRoot)).rejects.toThrow(); + await amplifyPushForce(pushProjRoot); + }); +}); From 3e1a3a79996f26dee0e054f67df573533281ed42 Mon Sep 17 00:00:00 2001 From: Zachary Goldberg Date: Wed, 22 Mar 2023 18:04:23 -0600 Subject: [PATCH 10/84] chore: use pkg-fetch fork (#12259) * chore: fetch binaries from s3 * chore: fetch binaries from s3 (fix profile) * chore: fetch binaries from s3 (make context single item not list) * chore: fetch binaries from s3 (dummy commit) * chore: use image with binaries * chore: use image with binaries * chore: change tag to latest * chore: change hash --- package.json | 3 ++- yarn.lock | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index a820ad8c677..b94959897da 100644 --- a/package.json +++ b/package.json @@ -157,6 +157,7 @@ "**/jake/async": "^2.6.4", "**/json5": "^2.2.3", "**/nth-check": "^2.0.1", - "**/undici": "^5.8.0" + "**/undici": "^5.8.0", + "**/pkg-fetch": "https://github.com/aws-amplify/pkg-fetch#ad4a21feb533d338bf951e7ba28cea7256aedeff" } } diff --git a/yarn.lock b/yarn.lock index 146467a417d..f00a842e08f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19551,10 +19551,9 @@ pkg-dir@^4.1.0, pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" -pkg-fetch@3.4.2: +pkg-fetch@3.4.2, "pkg-fetch@https://github.com/aws-amplify/pkg-fetch#ad4a21feb533d338bf951e7ba28cea7256aedeff": version "3.4.2" - resolved "https://registry.yarnpkg.com/pkg-fetch/-/pkg-fetch-3.4.2.tgz#6f68ebc54842b73f8c0808959a9df3739dcb28b7" - integrity sha512-0+uijmzYcnhC0hStDjm/cl2VYdrmVVBpe7Q8k9YBojxmR5tG8mvR9/nooQq3QSXiQqORDVOTY3XqMEqJVIzkHA== + resolved "https://github.com/aws-amplify/pkg-fetch#ad4a21feb533d338bf951e7ba28cea7256aedeff" dependencies: chalk "^4.1.2" fs-extra "^9.1.0" From 9a4dc3d183cb8b5886dd0e8e3d3d823faa6bca4d Mon Sep 17 00:00:00 2001 From: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com> Date: Thu, 23 Mar 2023 18:07:04 +0100 Subject: [PATCH 11/84] fix: all floating promises (#12293) * fix: all floating promises * fix: make arrow functions async that have awaits --- .../provider-utils/awscloudformation/index.ts | 4 ++-- .../src/hosting/cicd/enable.js | 2 -- .../src/hosting/cicd/index.js | 5 ++--- .../src/hosting/cicd/initEnv.js | 3 +-- .../src/hosting/index.js | 10 ++++------ .../src/hosting/manual/enable.js | 1 - .../src/hosting/manual/index.js | 9 ++++----- .../src/hosting/manual/initEnv.js | 1 - .../src/hosting/manual/publish.js | 6 ++++-- .../src/utils/amplify-context-utils.js | 3 --- .../src/utils/config-utils.js | 7 +++---- .../src/aws-utils/aws-cfn.js | 19 ++++++++++--------- 12 files changed, 30 insertions(+), 40 deletions(-) diff --git a/packages/amplify-category-storage/src/provider-utils/awscloudformation/index.ts b/packages/amplify-category-storage/src/provider-utils/awscloudformation/index.ts index c77dfb9de3a..dc4f68e11ed 100644 --- a/packages/amplify-category-storage/src/provider-utils/awscloudformation/index.ts +++ b/packages/amplify-category-storage/src/provider-utils/awscloudformation/index.ts @@ -183,7 +183,7 @@ export const console = async (amplifyMeta: $TSMeta, provider: string, service: s } const { BucketName: bucket, Region: region } = s3Resource.output; const url = `https://s3.console.aws.amazon.com/s3/buckets/${bucket}?region=${region}`; - open(url, { wait: false }); + await open(url, { wait: false }); } else if (service === AmplifySupportedService.DYNAMODB) { type Pickchoice = { name: string; value: { tableName: string; region: string } }; const tables: Pickchoice[] = Object.values(amplifyMeta[categoryName]) @@ -199,6 +199,6 @@ export const console = async (amplifyMeta: $TSMeta, provider: string, service: s } const { tableName, region } = await prompter.pick<'one', Pickchoice['value']>('Select DynamoDB table to open on your browser', tables); const url = `https://${region}.console.aws.amazon.com/dynamodbv2/home?region=${region}#table?name=${tableName}&tab=overview`; - open(url, { wait: false }); + await open(url, { wait: false }); } }; diff --git a/packages/amplify-console-hosting/src/hosting/cicd/enable.js b/packages/amplify-console-hosting/src/hosting/cicd/enable.js index c78972add52..f606a6a0b49 100644 --- a/packages/amplify-console-hosting/src/hosting/cicd/enable.js +++ b/packages/amplify-console-hosting/src/hosting/cicd/enable.js @@ -1,5 +1,3 @@ -// TODO disable lint until file is converted to TS -/* eslint-disable */ const { open } = require('amplify-cli-core'); const fs = require('fs-extra'); const utils = require('../../utils/amplify-context-utils'); diff --git a/packages/amplify-console-hosting/src/hosting/cicd/index.js b/packages/amplify-console-hosting/src/hosting/cicd/index.js index 438f53222b3..3e98e7eb6e7 100644 --- a/packages/amplify-console-hosting/src/hosting/cicd/index.js +++ b/packages/amplify-console-hosting/src/hosting/cicd/index.js @@ -1,6 +1,5 @@ -/* eslint-disable */ const enableMod = require('./enable'); -const publshMod = require('./publish'); +const publishMod = require('./publish'); const initMod = require('./initEnv'); const serveMod = require('./serve'); const configureMod = require('./configure'); @@ -10,7 +9,7 @@ async function enable(context) { } async function publish(context) { - await publshMod.publish(context); + await publishMod.publish(context); } async function initEnv(context) { diff --git a/packages/amplify-console-hosting/src/hosting/cicd/initEnv.js b/packages/amplify-console-hosting/src/hosting/cicd/initEnv.js index 599b56afe64..d7624e5c8b1 100644 --- a/packages/amplify-console-hosting/src/hosting/cicd/initEnv.js +++ b/packages/amplify-console-hosting/src/hosting/cicd/initEnv.js @@ -1,4 +1,3 @@ -/* eslint-disable */ const constants = require('../../constants/plugin-constants'); const configUtils = require('../../utils/config-utils'); const utils = require('../../utils/amplify-context-utils'); @@ -16,7 +15,7 @@ async function initEnv(context) { context.amplify.updateamplifyMetaAfterResourceUpdate(category, resourceName, type, constants.TYPE_CICD); const metaContent = utils.getMetaInfo(context); const { lastPushTimeStamp } = metaContent[category][resourceName]; - configUtils.initCurrBackendMeta(context, category, resourceName, type, lastPushTimeStamp); + await configUtils.initCurrBackendMeta(context, category, resourceName, type, lastPushTimeStamp); } module.exports = { diff --git a/packages/amplify-console-hosting/src/hosting/index.js b/packages/amplify-console-hosting/src/hosting/index.js index 8fda38ef11e..12bb4661eeb 100644 --- a/packages/amplify-console-hosting/src/hosting/index.js +++ b/packages/amplify-console-hosting/src/hosting/index.js @@ -1,5 +1,4 @@ -// disabling eslint until this file is migrated to TS -/* eslint-disable */ +/* eslint-disable spellcheck/spell-checker */ const constants = require('../constants/plugin-constants'); const pathManager = require('../utils/path-manager'); const fs = require('fs-extra'); @@ -8,7 +7,7 @@ const configUtils = require('../utils/config-utils'); const questions = require('../modules/questions/question-generator'); const ValidationError = require('../error/validation-error').default; const clientFactory = require('../utils/client-factory'); -const tableUtis = require('../utils/table-utils'); +const tableUtils = require('../utils/table-utils'); const { ensureEnvParamManager } = require('@aws-amplify/amplify-environment-parameters'); const { spinner } = require('amplify-cli-core'); @@ -63,7 +62,7 @@ async function initEnv(context) { // hosting is deleted. But current env config is not cleaned const { type } = consoleConfig; // clean team provider info - await configUtils.deleteHostingEnvParams(context); + await configUtils.deleteHostingEnvParams(); // clean #current-backend-env for CICD. if (type === constants.TYPE_CICD) { await configUtils.deleteConsoleConfigFromCurrMeta(context); @@ -133,7 +132,7 @@ async function status(context, mute) { } const appId = utils.getAppIdForCurrEnv(context); - await tableUtis.generateTableContentForApp(context, appId); + await tableUtils.generateTableContentForApp(context, appId); } function loadDeployType(context) { @@ -184,4 +183,3 @@ module.exports = { configure, status, }; -/* eslint-enable */ diff --git a/packages/amplify-console-hosting/src/hosting/manual/enable.js b/packages/amplify-console-hosting/src/hosting/manual/enable.js index 13e43a76234..2c835af3f1c 100644 --- a/packages/amplify-console-hosting/src/hosting/manual/enable.js +++ b/packages/amplify-console-hosting/src/hosting/manual/enable.js @@ -1,4 +1,3 @@ -/* eslint-disable */ const path = require('path'); const constants = require('../../constants/plugin-constants'); const configUtils = require('../../utils/config-utils'); diff --git a/packages/amplify-console-hosting/src/hosting/manual/index.js b/packages/amplify-console-hosting/src/hosting/manual/index.js index 6fe0bd5f9c2..9943ee6f586 100644 --- a/packages/amplify-console-hosting/src/hosting/manual/index.js +++ b/packages/amplify-console-hosting/src/hosting/manual/index.js @@ -1,16 +1,15 @@ -/* eslint-disable */ const enableMod = require('./enable'); -const publshMod = require('./publish'); +const publishMod = require('./publish'); const initMod = require('./initEnv'); const serveMod = require('./serve'); const configureMod = require('./configure'); -function enable(context) { - enableMod.enable(context); +async function enable(context) { + await enableMod.enable(context); } async function publish(context, doSkipBuild, doSkipPush) { - await publshMod.publish(context, doSkipBuild, doSkipPush); + await publishMod.publish(context, doSkipBuild, doSkipPush); } async function initEnv(context) { diff --git a/packages/amplify-console-hosting/src/hosting/manual/initEnv.js b/packages/amplify-console-hosting/src/hosting/manual/initEnv.js index 895f1a04887..36f8544b82e 100644 --- a/packages/amplify-console-hosting/src/hosting/manual/initEnv.js +++ b/packages/amplify-console-hosting/src/hosting/manual/initEnv.js @@ -1,4 +1,3 @@ -/* eslint-disable */ const constants = require('../../constants/plugin-constants'); const configUtils = require('../../utils/config-utils'); diff --git a/packages/amplify-console-hosting/src/hosting/manual/publish.js b/packages/amplify-console-hosting/src/hosting/manual/publish.js index 7bbcefd9052..e5450c01ec1 100644 --- a/packages/amplify-console-hosting/src/hosting/manual/publish.js +++ b/packages/amplify-console-hosting/src/hosting/manual/publish.js @@ -24,10 +24,12 @@ async function publish(context, doSkipBuild, doSkipPush) { const appId = utils.getAppIdForCurrEnv(context); const env = utils.getCurrEnv(context); spinner.start(ZIPPING_MESSAGE); - artifactsPath = await zipArtifacts(context).catch((err) => { + try { + artifactsPath = await zipArtifacts(context); + } catch (err) { spinner.fail(ZIPPING_FAILURE_MESSAGE); throw err; - }); + } spinner.succeed(ZIPPING_SUCCESS_MESSAGE); await amplifyUtils.publishFileToAmplify(appId, env, artifactsPath, amplifyClient); context.print.info(amplifyUtils.getDefaultDomainForBranch(appId, env)); diff --git a/packages/amplify-console-hosting/src/utils/amplify-context-utils.js b/packages/amplify-console-hosting/src/utils/amplify-context-utils.js index 0ca32df2c7a..711c74a47f1 100644 --- a/packages/amplify-console-hosting/src/utils/amplify-context-utils.js +++ b/packages/amplify-console-hosting/src/utils/amplify-context-utils.js @@ -1,5 +1,3 @@ -// disabling eslint until this file is migrated to TS -/* eslint-disable */ const constants = require('../constants/plugin-constants'); const pathManager = require('../utils/path-manager'); const fs = require('fs-extra'); @@ -48,4 +46,3 @@ module.exports = { getRegionForCurrEnv, getMetaInfo, }; -/* eslint-enable */ diff --git a/packages/amplify-console-hosting/src/utils/config-utils.js b/packages/amplify-console-hosting/src/utils/config-utils.js index 000707fc475..cac8004ead4 100644 --- a/packages/amplify-console-hosting/src/utils/config-utils.js +++ b/packages/amplify-console-hosting/src/utils/config-utils.js @@ -1,5 +1,4 @@ -// disabling eslint until this file is migrated to TS -/* eslint-disable */ +/* eslint-disable spellcheck/spell-checker */ const fs = require('fs-extra'); const path = require('path'); const { pathManager, PathConstants, stateManager } = require('amplify-cli-core'); @@ -110,8 +109,7 @@ async function deleteConsoleConfigFromCurrMeta(context) { await storeCurrentCloudBackend(context); } -async function deleteHostingEnvParams(context) { - const categories = constants.CATEGORIES; +async function deleteHostingEnvParams() { const category = constants.CATEGORY; const resourceName = constants.CONSOLE_RESOURCE_NAME; @@ -169,6 +167,7 @@ async function storeCurrentCloudBackend(context) { } } +// eslint-disable-next-line consistent-return async function uploadFile(s3, filePath, key) { if (fs.existsSync(filePath)) { const s3Params = { diff --git a/packages/amplify-provider-awscloudformation/src/aws-utils/aws-cfn.js b/packages/amplify-provider-awscloudformation/src/aws-utils/aws-cfn.js index 41f19bbac46..092430fce11 100644 --- a/packages/amplify-provider-awscloudformation/src/aws-utils/aws-cfn.js +++ b/packages/amplify-provider-awscloudformation/src/aws-utils/aws-cfn.js @@ -117,7 +117,7 @@ class CloudFormation { // add root stack to see the new stacks this.readStackEvents(stackName); // wait for the poll queue to drain - return new Promise((resolve) => { + return new Promise((resolve, reject) => { this.pollQueue.once('empty', () => { const failedStacks = this.stackEvents.filter((ev) => CNF_ERROR_STATUS.includes(ev.ResourceStatus)); @@ -130,7 +130,7 @@ class CloudFormation { }); resolve(collectStackErrorMessages(this.filterFailedStackEvents(failedStacks))); } catch (e) { - Promise.reject(e); + reject(e); } finally { if (this.pollForEvents) { clearTimeout(this.pollForEvents); @@ -397,20 +397,21 @@ class CloudFormation { } return reject(updateErr); } - cfnModel.waitFor(cfnCompleteStatus, cfnStackCheckParams, (completeErr) => { + cfnModel.waitFor(cfnCompleteStatus, cfnStackCheckParams, async (completeErr) => { if (self.pollForEvents) { clearTimeout(self.pollForEvents); } this.progressBar?.stop(); if (completeErr) { - this.collectStackErrors(cfnParentStackParams.StackName).then((errorDetails) => { + await this.collectStackErrors(cfnParentStackParams.StackName).then((errorDetails) => { completeErr.details = errorDetails; reject(completeErr); }); } else { self.context.usageData.calculatePushNormalizationFactor(this.stackEvents, stackId); - return self.updateamplifyMetaFileWithStackOutputs(stackName).then(() => resolve()); + await self.updateamplifyMetaFileWithStackOutputs(stackName); + return resolve(); } }); }); @@ -563,12 +564,12 @@ class CloudFormation { const log = logger('listExports.cfn.listExports', [{ NextToken: nextToken }]); return new Promise((resolve, reject) => { log(); - this.cfn.listExports(nextToken ? { NextToken: nextToken } : {}, (err, data) => { + this.cfn.listExports(nextToken ? { NextToken: nextToken } : {}, async (err, data) => { if (err) { log(err); reject(err); } else if (data.NextToken) { - this.listExports(data.NextToken).then((innerExports) => resolve([...data.Exports, ...innerExports])); + await this.listExports(data.NextToken).then((innerExports) => resolve([...data.Exports, ...innerExports])); } else { resolve(data.Exports); } @@ -644,10 +645,10 @@ class CloudFormation { console.log(`Error deleting stack ${stackName}`); return reject(deleteErr); } - cfnModel.waitFor(cfnDeleteStatus, cfnStackParams, (completeErr) => { + cfnModel.waitFor(cfnDeleteStatus, cfnStackParams, async (completeErr) => { if (err) { console.log(`Error deleting stack ${stackName}`); - this.collectStackErrors(stackName).then((errorDetails) => { + await this.collectStackErrors(stackName).then((errorDetails) => { completeErr.details = errorDetails; reject(completeErr); }); From b072037c484a329ca54bc1360c419bd093cb7679 Mon Sep 17 00:00:00 2001 From: Kamil Sobol Date: Thu, 23 Mar 2023 12:28:46 -0700 Subject: [PATCH 12/84] chore: migrate from deprecated CDK api (#12297) --- .../auth-cognito-stack-builder.ts | 46 +++++++++---------- .../src/service-utils/prepare-app.ts | 2 +- .../cdk-stack-builder/s3-stack-builder.ts | 8 ++-- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/packages/amplify-category-auth/src/provider-utils/awscloudformation/auth-stack-builder/auth-cognito-stack-builder.ts b/packages/amplify-category-auth/src/provider-utils/awscloudformation/auth-stack-builder/auth-cognito-stack-builder.ts index 30bf9637965..1d2b800d717 100644 --- a/packages/amplify-category-auth/src/provider-utils/awscloudformation/auth-stack-builder/auth-cognito-stack-builder.ts +++ b/packages/amplify-category-auth/src/provider-utils/awscloudformation/auth-stack-builder/auth-cognito-stack-builder.ts @@ -424,7 +424,7 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog } if (configureSMS) { - this.userPool.addDependsOn(this.snsRole!); + this.userPool.addDependency(this.snsRole!); } // updating Lambda Config when FF is (break circular dependency : false) @@ -464,7 +464,7 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog this.userPoolClientWeb.writeAttributes = this._cfnParameterMap.get('userpoolClientWriteAttributes')?.valueAsList; } this.userPoolClientWeb.refreshTokenValidity = cdk.Fn.ref('userpoolClientRefreshTokenValidity') as unknown as number; - this.userPoolClientWeb.addDependsOn(this.userPool); + this.userPoolClientWeb.addDependency(this.userPool); this.userPoolClient = new cognito.CfnUserPoolClient(this, 'UserPoolClient', { userPoolId: cdk.Fn.ref('UserPool'), @@ -479,7 +479,7 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog } this.userPoolClient.refreshTokenValidity = cdk.Fn.ref('userpoolClientRefreshTokenValidity') as unknown as number; this.userPoolClient.generateSecret = cdk.Fn.ref('userpoolClientGenerateSecret') as unknown as boolean; - this.userPoolClient.addDependsOn(this.userPool); + this.userPoolClient.addDependency(this.userPool); this.createUserPoolClientCustomResource(props); if (props.hostedUIDomainName) { @@ -564,7 +564,7 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog authenticated: cdk.Fn.ref('authRoleArn'), }, }); - this.identityPoolRoleMap.addDependsOn(this.identityPool); + this.identityPoolRoleMap.addDependency(this.identityPool); } }; @@ -603,7 +603,7 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog ], }, }); - this.userPoolClientRole.addDependsOn(this.userPoolClient!); + this.userPoolClientRole.addDependency(this.userPoolClient!); // lambda function this.userPoolClientLambda = new lambda.CfnFunction(this, 'UserPoolClientLambda', { @@ -615,7 +615,7 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog runtime: 'nodejs16.x', timeout: 300, }); - this.userPoolClientLambda.addDependsOn(this.userPoolClientRole); + this.userPoolClientLambda.addDependency(this.userPoolClientRole); // userPool client lambda policy /** @@ -638,7 +638,7 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog }, roles: [cdk.Fn.ref('UserPoolClientRole')], }); - this.userPoolClientLambdaPolicy.addDependsOn(this.userPoolClientLambda); + this.userPoolClientLambdaPolicy.addDependency(this.userPoolClientLambda); // userPool Client Log policy @@ -661,7 +661,7 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog }, roles: [cdk.Fn.ref('UserPoolClientRole')], }); - this.userPoolClientLogPolicy.addDependsOn(this.userPoolClientLambdaPolicy); + this.userPoolClientLogPolicy.addDependency(this.userPoolClientLambdaPolicy); // userPoolClient Custom Resource this.userPoolClientInputs = new cdk.CustomResource(this, 'UserPoolClientInputs', { @@ -689,7 +689,7 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog runtime: 'nodejs16.x', timeout: 300, }); - this.hostedUICustomResource.addDependsOn(this.userPoolClientRole!); + this.hostedUICustomResource.addDependency(this.userPoolClientRole!); // userPool client lambda policy /** @@ -716,7 +716,7 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog }, roles: [cdk.Fn.ref('UserPoolClientRole')], }); - this.hostedUICustomResourcePolicy.addDependsOn(this.hostedUICustomResource); + this.hostedUICustomResourcePolicy.addDependency(this.hostedUICustomResource); // userPool Client Log policy @@ -738,7 +738,7 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog }, roles: [cdk.Fn.ref('UserPoolClientRole')], }); - this.hostedUICustomResourceLogPolicy.addDependsOn(this.hostedUICustomResourcePolicy); + this.hostedUICustomResourceLogPolicy.addDependency(this.hostedUICustomResourcePolicy); // userPoolClient Custom Resource this.hostedUICustomResourceInputs = new cdk.CustomResource(this, 'HostedUICustomResourceInputs', { @@ -770,7 +770,7 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog runtime: 'nodejs16.x', timeout: 300, }); - this.hostedUIProvidersCustomResource.addDependsOn(this.userPoolClientRole!); + this.hostedUIProvidersCustomResource.addDependency(this.userPoolClientRole!); // userPool client lambda policy /** @@ -802,7 +802,7 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog }, roles: [cdk.Fn.ref('UserPoolClientRole')], }); - this.hostedUIProvidersCustomResourcePolicy.addDependsOn(this.hostedUIProvidersCustomResource); + this.hostedUIProvidersCustomResourcePolicy.addDependency(this.hostedUIProvidersCustomResource); // userPool Client Log policy @@ -824,7 +824,7 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog }, roles: [cdk.Fn.ref('UserPoolClientRole')], }); - this.hostedUIProvidersCustomResourceLogPolicy.addDependsOn(this.hostedUIProvidersCustomResourcePolicy); + this.hostedUIProvidersCustomResourceLogPolicy.addDependency(this.hostedUIProvidersCustomResourcePolicy); // userPoolClient Custom Resource this.hostedUIProvidersCustomResourceInputs = new cdk.CustomResource(this, 'HostedUIProvidersCustomResourceInputs', { @@ -877,7 +877,7 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog }, roles: [cdk.Fn.ref('UserPoolClientRole')], }); - this.oAuthCustomResourcePolicy.addDependsOn(this.oAuthCustomResource); + this.oAuthCustomResourcePolicy.addDependency(this.oAuthCustomResource); // Oauth Log policy @@ -899,7 +899,7 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog }, roles: [cdk.Fn.ref('UserPoolClientRole')], }); - this.oAuthCustomResourceLogPolicy.addDependsOn(this.oAuthCustomResourcePolicy); + this.oAuthCustomResourceLogPolicy.addDependency(this.oAuthCustomResourcePolicy); // oAuth Custom Resource this.oAuthCustomResourceInputs = new cdk.CustomResource(this, 'OAuthCustomResourceInputs', { @@ -972,7 +972,7 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog }, ], }); - this.mfaLambdaRole.addDependsOn(this.snsRole!); + this.mfaLambdaRole.addDependency(this.snsRole!); // lambda function /** * Lambda which sets MFA config values @@ -987,7 +987,7 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog runtime: 'nodejs16.x', timeout: 300, }); - this.mfaLambda.addDependsOn(this.mfaLambdaRole); + this.mfaLambda.addDependency(this.mfaLambdaRole); // MFA lambda policy /** @@ -1015,7 +1015,7 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog ).toString(), ], }); - this.mfaLambdaPolicy.addDependsOn(this.mfaLambda); + this.mfaLambdaPolicy.addDependency(this.mfaLambda); // mfa Log policy @@ -1043,7 +1043,7 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog ).toString(), ], }); - this.mfaLogPolicy.addDependsOn(this.mfaLambdaPolicy); + this.mfaLogPolicy.addDependency(this.mfaLambdaPolicy); // mfa Custom Resource /** @@ -1130,7 +1130,7 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog runtime: 'nodejs16.x', timeout: 300, }); - this.openIdLambda.addDependsOn(this.openIdLambdaRole); + this.openIdLambda.addDependency(this.openIdLambdaRole); // OPenId lambda policy /** @@ -1168,7 +1168,7 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog ).toString(), ], }); - this.openIdLambdaIAMPolicy.addDependsOn(this.openIdLambda); + this.openIdLambdaIAMPolicy.addDependency(this.openIdLambda); // openId Log policy /** @@ -1201,7 +1201,7 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog ).toString(), ], }); - this.openIdLogPolicy.addDependsOn(this.openIdLambdaIAMPolicy); + this.openIdLogPolicy.addDependency(this.openIdLambdaIAMPolicy); // openId Custom Resource /** diff --git a/packages/amplify-category-geo/src/service-utils/prepare-app.ts b/packages/amplify-category-geo/src/service-utils/prepare-app.ts index 7d8c7e87ac6..d3e576be45f 100644 --- a/packages/amplify-category-geo/src/service-utils/prepare-app.ts +++ b/packages/amplify-category-geo/src/service-utils/prepare-app.ts @@ -29,7 +29,7 @@ export const cdkV1PrepareAppShim = (root: IConstruct): void => { for (const target of targetCfnResources) { for (const source of sourceCfnResources) { - source.addDependsOn(target); + source.addDependency(target); } } } diff --git a/packages/amplify-category-storage/src/provider-utils/awscloudformation/cdk-stack-builder/s3-stack-builder.ts b/packages/amplify-category-storage/src/provider-utils/awscloudformation/cdk-stack-builder/s3-stack-builder.ts index 040a6a76f61..475f59debbd 100644 --- a/packages/amplify-category-storage/src/provider-utils/awscloudformation/cdk-stack-builder/s3-stack-builder.ts +++ b/packages/amplify-category-storage/src/provider-utils/awscloudformation/cdk-stack-builder/s3-stack-builder.ts @@ -182,7 +182,7 @@ export class AmplifyS3ResourceCfnStack extends AmplifyResourceCfnStack implement const newLambdaConfigurations = this.buildLambdaConfigFromTriggerParams(triggerLambdaFunctionParams); this._addNotificationsLambdaConfigurations(newLambdaConfigurations); this.triggerLambdaPermissions = this.createInvokeFunctionS3Permission('TriggerPermissions', this._props.triggerFunction); - this.s3Bucket.addDependsOn(this.triggerLambdaPermissions as lambdaCdk.CfnPermission); + this.s3Bucket.addDependency(this.triggerLambdaPermissions as lambdaCdk.CfnPermission); /** * Add Depends On: FUNCTION service * s3 Dependency on Lambda to Root Stack @@ -201,7 +201,7 @@ export class AmplifyS3ResourceCfnStack extends AmplifyResourceCfnStack implement 'AdminTriggerPermissions', this._props.adminTriggerFunction.triggerFunction, ); - this.s3Bucket.addDependsOn(this.adminTriggerLambdaPermissions); + this.s3Bucket.addDependency(this.adminTriggerLambdaPermissions); /** * Add Depends On: FUNCTION service @@ -1008,7 +1008,7 @@ export class AmplifyS3ResourceCfnStack extends AmplifyResourceCfnStack implement policyL1.Properties.policyDocument.Statement = policyStatements; const policy = new iamCdk.CfnPolicy(this, policyDefinition.logicalId, policyL1.Properties); if (policyDefinition.dependsOn) { - policyDefinition.dependsOn.map((dependency) => policy.addDependsOn(dependency)); + policyDefinition.dependsOn.map((dependency) => policy.addDependency(dependency)); } if (policyDefinition.condition) { policy.cfnOptions.condition = policyDefinition.condition; @@ -1027,7 +1027,7 @@ export class AmplifyS3ResourceCfnStack extends AmplifyResourceCfnStack implement }; const policy = new iamCdk.CfnPolicy(this, policyDefinition.logicalId, props); // bind policy to stack if (policyDefinition.dependsOn) { - policyDefinition.dependsOn.map((dependency) => policy.addDependsOn(dependency)); + policyDefinition.dependsOn.map((dependency) => policy.addDependency(dependency)); } if (policyDefinition.condition) { policy.cfnOptions.condition = policyDefinition.condition; From 638716251b52bb51ef06d3d63599c34eff03cfdf Mon Sep 17 00:00:00 2001 From: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com> Date: Thu, 23 Mar 2023 21:48:23 +0100 Subject: [PATCH 13/84] chore: convert generic errors that are user errors to AmplifyErrors (#12296) * chore: convert generic errors that are user errors to AmplifyErrors * fix: run extract-api * fix: unit test --- .../awscloudformation/import/index.ts | 26 +++- .../src/commands/function/build.ts | 9 +- .../removeFunctionWalkthrough.ts | 6 +- .../awscloudformation/utils/buildFunction.ts | 5 +- .../awscloudformation/utils/buildLayer.ts | 6 +- .../import/import-dynamodb.ts | 2 +- .../awscloudformation/import/import-s3.ts | 2 +- packages/amplify-cli-core/API.md | 57 +++++--- .../src/errors/amplify-exception.ts | 9 ++ packages/amplify-cli-core/src/errors/index.ts | 133 ++++++++++++++---- .../amplify-helpers/push-resources.ts | 2 +- .../package.json | 1 + .../src/utils/build.ts | 25 +++- .../src/utils/invoke.ts | 5 +- .../src/utils/package.ts | 23 +-- .../lib/frontend-config-creator.js | 2 +- .../src/runtime.ts | 35 +++-- .../src/utils/build.ts | 16 ++- .../src/utils/detect.ts | 34 +++-- .../src/utils/invoke.ts | 4 +- .../src/utils/package.ts | 3 +- .../src/__tests__/utils/invoke.test.ts | 2 +- .../src/utils/execute.ts | 13 +- .../src/utils/legacyBuild.ts | 26 +++- .../src/util/buildUtils.ts | 11 +- .../src/util/invokeUtil.ts | 12 +- .../src/util/pyUtils.ts | 11 +- 27 files changed, 347 insertions(+), 133 deletions(-) diff --git a/packages/amplify-category-auth/src/provider-utils/awscloudformation/import/index.ts b/packages/amplify-category-auth/src/provider-utils/awscloudformation/import/index.ts index 2eec9b9c085..9d342c93fce 100644 --- a/packages/amplify-category-auth/src/provider-utils/awscloudformation/import/index.ts +++ b/packages/amplify-category-auth/src/provider-utils/awscloudformation/import/index.ts @@ -1,5 +1,5 @@ import { ICognitoUserPoolService, IIdentityPoolService } from '@aws-amplify/amplify-util-import'; -import { $TSAny, $TSContext, ServiceSelection, stateManager } from '@aws-amplify/amplify-cli-core'; +import { $TSAny, $TSContext, ServiceSelection, stateManager, AmplifyError } from '@aws-amplify/amplify-cli-core'; import { CognitoIdentityProvider, IdentityPool } from 'aws-sdk/clients/cognitoidentity'; import { IdentityProviderType, @@ -1231,7 +1231,9 @@ export const headlessImport = async ( // If region mismatch, signal prompt for new arguments, only in interactive mode, headless does not matter if (resourceParameters.region && resourceParameters.region !== Region) { - throw new Error(importMessages.NewEnvDifferentRegion(resourceName, resourceParameters.region, Region)); + throw new AmplifyError('AuthImportError', { + message: importMessages.NewEnvDifferentRegion(resourceName, resourceParameters.region, Region), + }); } // Validate the parameters, generate the missing ones and import the resource. @@ -1253,7 +1255,9 @@ export const headlessImport = async ( answers.userPool = await cognito.getUserPoolDetails(resolvedEnvParams.userPoolId); } catch (error) { if (error.name === 'ResourceNotFoundException') { - throw new Error(importMessages.UserPoolNotFound(resolvedEnvParams.userPoolName, resolvedEnvParams.userPoolId)); + throw new AmplifyError('AuthImportError', { + message: importMessages.UserPoolNotFound(resolvedEnvParams.userPoolName, resolvedEnvParams.userPoolId), + }); } throw error; @@ -1269,20 +1273,26 @@ export const headlessImport = async ( answers.appClientWeb = questionParameters.webClients?.find((c) => c.ClientId === resolvedEnvParams.webClientId); if (!answers.appClientWeb) { - throw new Error(importMessages.AppClientNotFound('Web', resolvedEnvParams.webClientId)); + throw new AmplifyError('AuthImportError', { + message: importMessages.AppClientNotFound('Web', resolvedEnvParams.webClientId), + }); } answers.appClientNative = questionParameters.nativeClients?.find((c) => c.ClientId === resolvedEnvParams.nativeClientId); if (!answers.appClientNative) { - throw new Error(importMessages.AppClientNotFound('Native', resolvedEnvParams.nativeClientId)); + throw new AmplifyError('AuthImportError', { + message: importMessages.AppClientNotFound('Native', resolvedEnvParams.nativeClientId), + }); } // Check OAuth config matching and enabled const oauthResult = await appClientsOAuthPropertiesMatching(context, answers.appClientWeb, answers.appClientNative, false); if (!oauthResult.isValid) { - throw new Error(importMessages.OAuth.PropertiesAreNotMatching); + throw new AmplifyError('AuthImportError', { + message: importMessages.OAuth.PropertiesAreNotMatching, + }); } // Store the results in the answer @@ -1299,7 +1309,9 @@ export const headlessImport = async ( ); if (identityPools?.length !== 1) { - throw new Error(importMessages.IdentityPoolNotFound(resolvedEnvParams.identityPoolName!, resolvedEnvParams.identityPoolId!)); + throw new AmplifyError('AuthImportError', { + message: importMessages.IdentityPoolNotFound(resolvedEnvParams.identityPoolName!, resolvedEnvParams.identityPoolId!), + }); } answers.identityPoolId = identityPools[0].identityPool.IdentityPoolId; diff --git a/packages/amplify-category-function/src/commands/function/build.ts b/packages/amplify-category-function/src/commands/function/build.ts index 5d63e75474d..ff64cc7641f 100644 --- a/packages/amplify-category-function/src/commands/function/build.ts +++ b/packages/amplify-category-function/src/commands/function/build.ts @@ -5,7 +5,7 @@ import { categoryName } from '../../constants'; import { PackageRequestMeta } from '../../provider-utils/awscloudformation/types/packaging-types'; import { buildFunction } from '../../provider-utils/awscloudformation/utils/buildFunction'; import { packageResource } from '../../provider-utils/awscloudformation/utils/package'; - +import { AmplifyError } from 'amplify-cli-core'; export const name = 'build'; /** @@ -31,7 +31,12 @@ export const run = async (context: $TSContext) => { } catch (err) { context.print.info(err.stack); context.print.error('There was an error building the function resources'); - void context.usageData.emitError(err); + const amplifyError = new AmplifyError( + 'PackagingLambdaFunctionError', + { message: `There was an error building the function resources ${err.message}` }, + err, + ); + void context.usageData.emitError(amplifyError); process.exitCode = 1; } }; diff --git a/packages/amplify-category-function/src/provider-utils/awscloudformation/service-walkthroughs/removeFunctionWalkthrough.ts b/packages/amplify-category-function/src/provider-utils/awscloudformation/service-walkthroughs/removeFunctionWalkthrough.ts index 12fbac7a37f..75c21192239 100644 --- a/packages/amplify-category-function/src/provider-utils/awscloudformation/service-walkthroughs/removeFunctionWalkthrough.ts +++ b/packages/amplify-category-function/src/provider-utils/awscloudformation/service-walkthroughs/removeFunctionWalkthrough.ts @@ -1,4 +1,4 @@ -import { $TSAny, stateManager, getAmplifyResourceByCategories } from 'amplify-cli-core'; +import { $TSAny, stateManager, getAmplifyResourceByCategories, AmplifyError } from 'amplify-cli-core'; import inquirer from 'inquirer'; import _ from 'lodash'; import { categoryName } from '../../../constants'; @@ -8,7 +8,9 @@ export async function removeResource(resourceName?: string): Promise<$TSAny> { const enabledCategoryResources = getEnabledResources(); if (enabledCategoryResources.length === 0) { - throw new Error('No Lambda function resource to remove. Use "amplify add function" to create a new function.'); + throw new AmplifyError('ResourceDoesNotExistError', { + message: 'No Lambda function resource to remove. Use "amplify add function" to create a new function.', + }); } if (resourceName) { diff --git a/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/buildFunction.ts b/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/buildFunction.ts index 8013cc9a049..e2ba4977450 100644 --- a/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/buildFunction.ts +++ b/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/buildFunction.ts @@ -1,6 +1,7 @@ import { $TSContext, pathManager } from 'amplify-cli-core'; import { BuildRequest, BuildType, FunctionRuntimeLifecycleManager } from '@aws-amplify/amplify-function-plugin-interface'; import { categoryName } from '../../../constants'; +import { AmplifyError } from 'amplify-cli-core'; export const buildFunction = async ( context: $TSContext, @@ -16,7 +17,7 @@ export const buildFunction = async ( const depCheck = await runtimePlugin.checkDependencies(breadcrumbs.functionRuntime); if (!depCheck.hasRequiredDependencies) { context.print.error(depCheck.errorMessage || `You are missing dependencies required to package ${resourceName}`); - throw new Error(`Missing required dependencies to package ${resourceName}`); + throw new AmplifyError('PackagingLambdaFunctionError', { message: `Missing required dependencies to package ${resourceName}` }); } const prevBuildTime = lastBuildTimestamp ? new Date(lastBuildTimestamp) : undefined; @@ -25,7 +26,7 @@ export const buildFunction = async ( let rebuilt = false; if (breadcrumbs.scripts && breadcrumbs.scripts.build) { // TODO - throw new Error('Executing custom build scripts is not yet implemented'); + throw new AmplifyError('NotImplementedError', { message: 'Executing custom build scripts is not yet implemented' }); } else { const buildRequest: BuildRequest = { buildType, diff --git a/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/buildLayer.ts b/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/buildLayer.ts index 099fc795d23..10c9be20572 100644 --- a/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/buildLayer.ts +++ b/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/buildLayer.ts @@ -1,4 +1,4 @@ -import { $TSContext, pathManager } from 'amplify-cli-core'; +import { $TSContext, AmplifyError, pathManager } from 'amplify-cli-core'; import { FunctionRuntimeLifecycleManager, BuildRequest, BuildType } from '@aws-amplify/amplify-function-plugin-interface'; import * as path from 'path'; import { categoryName } from '../../../constants'; @@ -24,9 +24,7 @@ export const buildLayer = async (context: $TSContext, { resourceName, lastBuildT const depCheck = await runtimePlugin.checkDependencies(runtime.value); if (!depCheck.hasRequiredDependencies) { context.print.error(depCheck.errorMessage || `Required dependencies to build ${resourceName} are missing`); - const err = new Error(`Required dependencies to build ${resourceName} are missing`); - err.stack = undefined; - throw err; + throw new AmplifyError('PackagingLambdaFunctionError', { message: `Required dependencies to build ${resourceName} are missing` }); } const prevBuildTimestamp = lastBuildTimestamp ? new Date(lastBuildTimestamp) : undefined; diff --git a/packages/amplify-category-storage/src/provider-utils/awscloudformation/import/import-dynamodb.ts b/packages/amplify-category-storage/src/provider-utils/awscloudformation/import/import-dynamodb.ts index 1ccb61c2c38..0a3d8b6632a 100644 --- a/packages/amplify-category-storage/src/provider-utils/awscloudformation/import/import-dynamodb.ts +++ b/packages/amplify-category-storage/src/provider-utils/awscloudformation/import/import-dynamodb.ts @@ -448,7 +448,7 @@ const headlessImport = async ( const tableExists = await dynamoDB.tableExists(resolvedEnvParams.tableName); if (!tableExists) { - throw new Error(importMessages.TableNotFound(resolvedEnvParams.tableName)); + throw new AmplifyError('StorageImportError', { message: importMessages.TableNotFound(resolvedEnvParams.tableName) }); } answers.tableDescription = await dynamoDB.getTableDetails(resolvedEnvParams.tableName); diff --git a/packages/amplify-category-storage/src/provider-utils/awscloudformation/import/import-s3.ts b/packages/amplify-category-storage/src/provider-utils/awscloudformation/import/import-s3.ts index 8d2b29a7141..91ac7e300b4 100644 --- a/packages/amplify-category-storage/src/provider-utils/awscloudformation/import/import-s3.ts +++ b/packages/amplify-category-storage/src/provider-utils/awscloudformation/import/import-s3.ts @@ -440,7 +440,7 @@ const headlessImport = async ( const bucketExists = await s3.bucketExists(resolvedEnvParams.bucketName); if (!bucketExists) { - throw new Error(importMessages.BucketNotFound(resolvedEnvParams.bucketName)); + throw new AmplifyError('StorageImportError', { message: importMessages.BucketNotFound(resolvedEnvParams.bucketName) }); } // Save the region as we need to store it in resource parameters diff --git a/packages/amplify-cli-core/API.md b/packages/amplify-cli-core/API.md index 12182688b53..dd59757aeb0 100644 --- a/packages/amplify-cli-core/API.md +++ b/packages/amplify-cli-core/API.md @@ -120,7 +120,7 @@ export class AmplifyError extends AmplifyException { } // @public (undocumented) -export type AmplifyErrorType = 'AmplifyStudioError' | 'AmplifyStudioLoginError' | 'AmplifyStudioNotEnabledError' | 'ApiCategorySchemaNotFoundError' | 'AuthImportError' | 'BackendConfigValidationError' | 'BucketAlreadyExistsError' | 'BucketNotFoundError' | 'CategoryNotEnabledError' | 'CloudFormationTemplateError' | 'CommandNotSupportedError' | 'ConfigurationError' | 'DeploymentError' | 'DeploymentInProgressError' | 'DestructiveMigrationError' | 'DirectoryAlreadyExistsError' | 'DirectoryError' | 'DuplicateLogicalIdError' | 'EnvironmentConfigurationError' | 'EnvironmentNameError' | 'EnvironmentNotInitializedError' | 'FeatureFlagsValidationError' | 'FrameworkNotSupportedError' | 'FunctionTooLargeError' | 'GraphQLError' | 'InputValidationError' | 'InvalidAmplifyAppIdError' | 'InvalidCustomResourceError' | 'InvalidDirectiveError' | 'InvalidGSIMigrationError' | 'InvalidMigrationError' | 'InvalidOverrideError' | 'InvalidStackError' | 'InvalidTransformerError' | 'IterativeRollbackError' | 'LambdaLayerDeleteError' | 'MigrationError' | 'MissingAmplifyMetaFileError' | 'MissingExpectedParameterError' | 'MissingOverridesInstallationRequirementsError' | 'MockProcessError' | 'ModelgenError' | 'NestedProjectInitError' | 'NotImplementedError' | 'NoUpdateBackendError' | 'OpenSslCertificateError' | 'ParameterNotFoundError' | 'PermissionsError' | 'PluginMethodNotFoundError' | 'PluginNotFoundError' | 'PluginPolicyAddError' | 'ProfileConfigurationError' | 'ProjectAppIdResolveError' | 'ProjectInitError' | 'ProjectNotFoundError' | 'ProjectNotInitializedError' | 'PushResourcesError' | 'RegionNotAvailableError' | 'RemoveNotificationAppError' | 'ResourceAlreadyExistsError' | 'ResourceInUseError' | 'ResourceNotReadyError' | 'SchemaNotFoundError' | 'SchemaValidationError' | 'SearchableMockProcessError' | 'SearchableMockUnavailablePortError' | 'SearchableMockUnsupportedPlatformError' | 'StackNotFoundError' | 'StackStateError' | 'TransformerContractError' | 'UnknownDirectiveError' | 'UnsupportedLockFileTypeError' | 'UserInputError'; +export type AmplifyErrorType = 'AmplifyStudioError' | 'AmplifyStudioLoginError' | 'AmplifyStudioNotEnabledError' | 'ApiCategorySchemaNotFoundError' | 'AuthImportError' | 'BackendConfigValidationError' | 'BucketAlreadyExistsError' | 'BucketNotFoundError' | 'CategoryNotEnabledError' | 'CloudFormationTemplateError' | 'CommandNotSupportedError' | 'ConfigurationError' | 'CustomPoliciesFormatError' | 'DebugConfigValueNotSetError' | 'DeploymentError' | 'DeploymentInProgressError' | 'DestructiveMigrationError' | 'DiagnoseReportUploadError' | 'DirectoryAlreadyExistsError' | 'DirectoryError' | 'DuplicateLogicalIdError' | 'EnvironmentConfigurationError' | 'EnvironmentNameError' | 'EnvironmentNotInitializedError' | 'ExportError' | 'FeatureFlagsValidationError' | 'FrameworkNotSupportedError' | 'FunctionTooLargeError' | 'GraphQLError' | 'InputValidationError' | 'InvalidAmplifyAppIdError' | 'InvalidCustomResourceError' | 'InvalidDirectiveError' | 'InvalidGSIMigrationError' | 'InvalidMigrationError' | 'InvalidOverrideError' | 'InvalidStackError' | 'InvalidTransformerError' | 'IterativeRollbackError' | 'LambdaFunctionInvokeError' | 'LambdaLayerDeleteError' | 'MigrationError' | 'MissingAmplifyMetaFileError' | 'MissingExpectedParameterError' | 'MissingOverridesInstallationRequirementsError' | 'MockProcessError' | 'ModelgenError' | 'NestedProjectInitError' | 'NotImplementedError' | 'NoUpdateBackendError' | 'OpenSslCertificateError' | 'PackagingLambdaFunctionError' | 'ParameterNotFoundError' | 'PermissionsError' | 'PluginMethodNotFoundError' | 'PluginNotFoundError' | 'PluginPolicyAddError' | 'ProfileConfigurationError' | 'ProjectAppIdResolveError' | 'ProjectInitError' | 'ProjectNotFoundError' | 'ProjectNotInitializedError' | 'PushResourcesError' | 'RegionNotAvailableError' | 'RemoveNotificationAppError' | 'ResourceAlreadyExistsError' | 'ResourceCountLimitExceedError' | 'ResourceDoesNotExistError' | 'ResourceInUseError' | 'ResourceNotReadyError' | 'SchemaNotFoundError' | 'SchemaValidationError' | 'SearchableMockProcessError' | 'SearchableMockUnavailablePortError' | 'SearchableMockUnsupportedPlatformError' | 'StackNotFoundError' | 'StackStateError' | 'StorageImportError' | 'TransformerContractError' | 'UnknownDirectiveError' | 'UnsupportedLockFileTypeError' | 'UserInputError'; // @public (undocumented) export enum AmplifyEvent { @@ -313,7 +313,8 @@ export const AmplifySupportedService: { }; // @public (undocumented) -export class AngularConfigNotFoundError extends Error { +export class AngularConfigNotFoundError extends AmplifyError { + constructor(errMessage?: string); } // @public (undocumented) @@ -536,7 +537,8 @@ export type CommandLineInput = { export const commandsInfo: Array; // @public (undocumented) -export class ConfigurationError extends Error { +export class ConfigurationError extends AmplifyError { + constructor(errMessage?: string); } // @public (undocumented) @@ -647,7 +649,8 @@ export type CustomIAMPolicy = { }; // @public (undocumented) -export class CustomPoliciesFormatError extends Error { +export class CustomPoliciesFormatError extends AmplifyError { + constructor(errMessage?: string); } // @public (undocumented) @@ -665,7 +668,8 @@ export type DataParameter = { export function debug(message: string, title?: string): void; // @public (undocumented) -export class DebugConfigValueNotSetError extends Error { +export class DebugConfigValueNotSetError extends AmplifyError { + constructor(errMessage?: string); } // @public (undocumented) @@ -747,7 +751,8 @@ export type DetectedDependency = { }; // @public (undocumented) -export class DiagnoseReportUploadError extends Error { +export class DiagnoseReportUploadError extends AmplifyError { + constructor(errMessage?: string); } // @public (undocumented) @@ -791,15 +796,18 @@ export { ExeInfo } export const exitOnNextTick: (code: number) => void; // @public (undocumented) -export class ExportedStackNotFoundError extends Error { +export class ExportedStackNotFoundError extends AmplifyError { + constructor(errMessage?: string); } // @public (undocumented) -export class ExportedStackNotInValidStateError extends Error { +export class ExportedStackNotInValidStateError extends AmplifyError { + constructor(errMessage?: string); } // @public (undocumented) -export class ExportPathValidationError extends Error { +export class ExportPathValidationError extends AmplifyError { + constructor(errMessage?: string); } // @public (undocumented) @@ -1160,7 +1168,8 @@ type InputParameters = { }; // @public (undocumented) -export class InvalidSubCommandError extends Error { +export class InvalidSubCommandError extends AmplifyError { + constructor(errMessage?: string); } // @public (undocumented) @@ -1416,7 +1425,8 @@ export interface MigrationInfo { } // @public (undocumented) -export class MissingParametersError extends Error { +export class MissingParametersError extends AmplifyError { + constructor(errMessage?: string); } // @public (undocumented) @@ -1439,7 +1449,8 @@ export enum NotificationChannels { } // @public (undocumented) -export class NotImplementedError extends Error { +export class NotImplementedError extends AmplifyError { + constructor(errMessage?: string); } // @public (undocumented) @@ -1843,20 +1854,22 @@ export function red(message: string): void; export const removeFromDeploymentSecrets: (deploymentSecretsModifier: deploymentSecretsRemove) => DeploymentSecrets; // @public (undocumented) -export class ResourceAlreadyExistsError extends Error { +export class ResourceAlreadyExistsError extends AmplifyError { + constructor(errMessage?: string); } // @public (undocumented) -export class ResourceCountLimitExceedError extends Error { +export class ResourceCountLimitExceedError extends AmplifyError { constructor(errMessage: string); } // @public (undocumented) -export class ResourceCredentialsNotFoundError extends Error { +export class ResourceCredentialsNotFoundError extends AmplifyError { + constructor(errMessage?: string); } // @public (undocumented) -export class ResourceDoesNotExistError extends Error { +export class ResourceDoesNotExistError extends AmplifyError { constructor(errMessage: string); } @@ -2119,19 +2132,23 @@ export type TypeDef = { export type TypeOptionFlowData = IOptionFlowHeadlessData | IOptionFlowCLIData; // @public (undocumented) -export class UnknownArgumentError extends Error { +export class UnknownArgumentError extends AmplifyError { + constructor(errMessage?: string); } // @public (undocumented) -export class UnknownResourceTypeError extends Error { +export class UnknownResourceTypeError extends AmplifyError { + constructor(errMessage?: string); } // @public (undocumented) -export class UnrecognizedFrameworkError extends Error { +export class UnrecognizedFrameworkError extends AmplifyError { + constructor(errMessage?: string); } // @public (undocumented) -export class UnrecognizedFrontendError extends Error { +export class UnrecognizedFrontendError extends AmplifyError { + constructor(errMessage?: string); } // @public (undocumented) diff --git a/packages/amplify-cli-core/src/errors/amplify-exception.ts b/packages/amplify-cli-core/src/errors/amplify-exception.ts index d9958363d12..d0f1b282e60 100644 --- a/packages/amplify-cli-core/src/errors/amplify-exception.ts +++ b/packages/amplify-cli-core/src/errors/amplify-exception.ts @@ -106,15 +106,19 @@ export type AmplifyErrorType = | 'CloudFormationTemplateError' | 'CommandNotSupportedError' | 'ConfigurationError' + | 'CustomPoliciesFormatError' + | 'DebugConfigValueNotSetError' | 'DeploymentError' | 'DeploymentInProgressError' | 'DestructiveMigrationError' + | 'DiagnoseReportUploadError' | 'DirectoryAlreadyExistsError' | 'DirectoryError' | 'DuplicateLogicalIdError' | 'EnvironmentConfigurationError' | 'EnvironmentNameError' | 'EnvironmentNotInitializedError' + | 'ExportError' | 'FeatureFlagsValidationError' | 'FrameworkNotSupportedError' | 'FunctionTooLargeError' @@ -129,6 +133,7 @@ export type AmplifyErrorType = | 'InvalidStackError' | 'InvalidTransformerError' | 'IterativeRollbackError' + | 'LambdaFunctionInvokeError' | 'LambdaLayerDeleteError' | 'MigrationError' | 'MissingAmplifyMetaFileError' @@ -140,6 +145,7 @@ export type AmplifyErrorType = | 'NotImplementedError' | 'NoUpdateBackendError' | 'OpenSslCertificateError' + | 'PackagingLambdaFunctionError' | 'ParameterNotFoundError' | 'PermissionsError' | 'PluginMethodNotFoundError' @@ -154,6 +160,8 @@ export type AmplifyErrorType = | 'RegionNotAvailableError' | 'RemoveNotificationAppError' | 'ResourceAlreadyExistsError' + | 'ResourceCountLimitExceedError' + | 'ResourceDoesNotExistError' | 'ResourceInUseError' | 'ResourceNotReadyError' | 'SchemaNotFoundError' @@ -163,6 +171,7 @@ export type AmplifyErrorType = | 'SearchableMockUnsupportedPlatformError' | 'StackNotFoundError' | 'StackStateError' + | 'StorageImportError' | 'TransformerContractError' | 'UnknownDirectiveError' | 'UnsupportedLockFileTypeError' diff --git a/packages/amplify-cli-core/src/errors/index.ts b/packages/amplify-cli-core/src/errors/index.ts index c87b0fdeb37..69cdad6c2cc 100644 --- a/packages/amplify-cli-core/src/errors/index.ts +++ b/packages/amplify-cli-core/src/errors/index.ts @@ -1,43 +1,122 @@ /* eslint-disable max-classes-per-file */ -export class NotImplementedError extends Error {} -export class ResourceAlreadyExistsError extends Error {} -export class ResourceCredentialsNotFoundError extends Error {} -export class UnknownResourceTypeError extends Error {} -export class UnknownArgumentError extends Error {} -export class MissingParametersError extends Error {} -export class InvalidSubCommandError extends Error {} -export class AngularConfigNotFoundError extends Error {} -export class UnrecognizedFrameworkError extends Error {} -export class UnrecognizedFrontendError extends Error {} -export class ConfigurationError extends Error {} -export class CustomPoliciesFormatError extends Error {} -export class ExportPathValidationError extends Error {} -export class ExportedStackNotFoundError extends Error {} -export class ExportedStackNotInValidStateError extends Error {} -export class DebugConfigValueNotSetError extends Error {} -export class DiagnoseReportUploadError extends Error {} +import { AmplifyError } from './amplify-error'; + +export class NotImplementedError extends AmplifyError { + public constructor(errMessage?: string) { + super('NotImplementedError', { message: errMessage ?? 'NotImplementedError' }); + } +} + +export class ResourceAlreadyExistsError extends AmplifyError { + public constructor(errMessage?: string) { + super('ResourceAlreadyExistsError', { message: errMessage ?? 'ResourceAlreadyExistsError' }); + } +} + +export class ResourceCredentialsNotFoundError extends AmplifyError { + public constructor(errMessage?: string) { + super('PermissionsError', { message: errMessage ?? 'ResourceCredentialsNotFoundError' }); + } +} + +export class UnknownResourceTypeError extends AmplifyError { + public constructor(errMessage?: string) { + super('ResourceDoesNotExistError', { message: errMessage ?? 'UnknownResourceTypeError' }); + } +} + +export class UnknownArgumentError extends AmplifyError { + public constructor(errMessage?: string) { + super('UserInputError', { message: errMessage ?? 'UnknownArgumentError' }); + } +} +export class MissingParametersError extends AmplifyError { + public constructor(errMessage?: string) { + super('ParameterNotFoundError', { message: errMessage ?? 'MissingParametersError' }); + } +} + +export class InvalidSubCommandError extends AmplifyError { + public constructor(errMessage?: string) { + super('CommandNotSupportedError', { message: errMessage ?? 'InvalidSubCommandError' }); + } +} + +export class AngularConfigNotFoundError extends AmplifyError { + public constructor(errMessage?: string) { + super('ConfigurationError', { message: errMessage ?? 'AngularConfigNotFoundError' }); + } +} + +export class UnrecognizedFrameworkError extends AmplifyError { + public constructor(errMessage?: string) { + super('ConfigurationError', { message: errMessage ?? 'UnrecognizedFrameworkError' }); + } +} + +export class UnrecognizedFrontendError extends AmplifyError { + public constructor(errMessage?: string) { + super('ConfigurationError', { message: errMessage ?? 'UnrecognizedFrontendError' }); + } +} + +export class ConfigurationError extends AmplifyError { + public constructor(errMessage?: string) { + super('ConfigurationError', { message: errMessage ?? 'ConfigurationError' }); + } +} + +export class CustomPoliciesFormatError extends AmplifyError { + public constructor(errMessage?: string) { + super('CustomPoliciesFormatError', { message: errMessage ?? 'CustomPoliciesFormatError' }); + } +} + +export class ExportPathValidationError extends AmplifyError { + public constructor(errMessage?: string) { + super('ExportError', { message: errMessage ?? 'ExportPathValidationError' }); + } +} + +export class ExportedStackNotFoundError extends AmplifyError { + public constructor(errMessage?: string) { + super('StackNotFoundError', { message: errMessage ?? 'ExportedStackNotFoundError' }); + } +} + +export class ExportedStackNotInValidStateError extends AmplifyError { + public constructor(errMessage?: string) { + super('StackStateError', { message: errMessage ?? 'ExportedStackNotInValidStateError' }); + } +} + +export class DebugConfigValueNotSetError extends AmplifyError { + public constructor(errMessage?: string) { + super('DebugConfigValueNotSetError', { message: errMessage ?? 'ResourceDoesNotExistError' }); + } +} + +export class DiagnoseReportUploadError extends AmplifyError { + public constructor(errMessage?: string) { + super('DiagnoseReportUploadError', { message: errMessage ?? 'DiagnoseReportUploadError' }); + } +} /** * amplify cli error when cfn resource not exists */ -export class ResourceDoesNotExistError extends Error { +export class ResourceDoesNotExistError extends AmplifyError { public constructor(errMessage: string) { - super(); - this.name = 'ResourceDoesNotExistError'; - this.message = errMessage; - this.stack = undefined; + super('ResourceDoesNotExistError', { message: errMessage }); } } /** * amplify cli error when cfn resources exceeds service limits */ -export class ResourceCountLimitExceedError extends Error { +export class ResourceCountLimitExceedError extends AmplifyError { public constructor(errMessage: string) { - super(); - this.name = 'ResourceCountLimitExceedError'; - this.message = errMessage; - this.stack = undefined; + super('ResourceCountLimitExceedError', { message: errMessage }); } } diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/push-resources.ts b/packages/amplify-cli/src/extensions/amplify-helpers/push-resources.ts index bb71a71547e..b05fa47f8f1 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/push-resources.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/push-resources.ts @@ -197,7 +197,7 @@ const providersPush = async ( providers.map(async (provider: string) => { const providerModule = await import(providerPlugins[provider]); const resourceDefinition = await context.amplify.getResourceStatus(category, resourceName, provider, filteredResources); - return providerModule.pushResources(context, resourceDefinition, rebuild); + return await providerModule.pushResources(context, resourceDefinition, rebuild); }), ); }; diff --git a/packages/amplify-dotnet-function-runtime-provider/package.json b/packages/amplify-dotnet-function-runtime-provider/package.json index 27a5e54aa97..5c9f72a5911 100644 --- a/packages/amplify-dotnet-function-runtime-provider/package.json +++ b/packages/amplify-dotnet-function-runtime-provider/package.json @@ -24,6 +24,7 @@ "dependencies": { "@aws-amplify/amplify-function-plugin-interface": "1.10.2", "@aws-amplify/amplify-prompts": "2.6.8", + "amplify-cli-core": "4.0.0", "execa": "^5.1.1", "fs-extra": "^8.1.0", "glob": "^7.2.0", diff --git a/packages/amplify-dotnet-function-runtime-provider/src/utils/build.ts b/packages/amplify-dotnet-function-runtime-provider/src/utils/build.ts index 236125b1e2c..5fdcc18ddec 100644 --- a/packages/amplify-dotnet-function-runtime-provider/src/utils/build.ts +++ b/packages/amplify-dotnet-function-runtime-provider/src/utils/build.ts @@ -2,6 +2,7 @@ import path from 'path'; import fs from 'fs-extra'; import glob from 'glob'; import * as execa from 'execa'; +import { AmplifyError } from 'amplify-cli-core'; import { BuildRequest, BuildResult, BuildType } from '@aws-amplify/amplify-function-plugin-interface'; import { printer } from '@aws-amplify/amplify-prompts'; import { dotnetcore31, executableName } from '../constants'; @@ -29,14 +30,26 @@ export const build = async ({ srcRoot, lastBuildTimeStamp, buildType, runtime }: buildArguments.push('build', '-c', 'Debug', '-p:CopyLocalLockFileAssemblies=true'); break; default: - throw new Error(`Unexpected buildType: [${buildType}]`); + throw new AmplifyError('PackagingLambdaFunctionError', { message: `Unexpected buildType: [${buildType}]` }); } - const result = execa.sync(executableName, buildArguments, { - cwd: sourceFolder, - }); + try { + const result = execa.sync(executableName, buildArguments, { + cwd: sourceFolder, + }); - if (result.exitCode !== 0) { - throw new Error(`${executableName} build failed, exit code was ${result.exitCode}`); + if (result.exitCode !== 0) { + throw new AmplifyError('PackagingLambdaFunctionError', { + message: `${executableName} build failed, exit code was ${result.exitCode}`, + }); + } + } catch (err) { + throw new AmplifyError( + 'PackagingLambdaFunctionError', + { + message: `${executableName} build failed, error message was ${err.message}`, + }, + err, + ); } return { rebuilt: true }; diff --git a/packages/amplify-dotnet-function-runtime-provider/src/utils/invoke.ts b/packages/amplify-dotnet-function-runtime-provider/src/utils/invoke.ts index 14d21862036..e18cbc4a7a3 100644 --- a/packages/amplify-dotnet-function-runtime-provider/src/utils/invoke.ts +++ b/packages/amplify-dotnet-function-runtime-provider/src/utils/invoke.ts @@ -3,6 +3,7 @@ import fs from 'fs-extra'; import execa from 'execa'; import { InvocationRequest } from '@aws-amplify/amplify-function-plugin-interface'; import { dotnetcore31, executableName } from '../constants'; +import { AmplifyError } from 'amplify-cli-core'; export const invoke = async (request: InvocationRequest): Promise => { const sourcePath = path.join(request.srcRoot, 'src'); @@ -25,6 +26,8 @@ export const invoke = async (request: InvocationRequest): Promise => { execPromise.stderr?.pipe(process.stderr); execPromise.stdout?.pipe(process.stdout); result = await execPromise; + } catch (err) { + throw new AmplifyError('LambdaFunctionInvokeError', { message: `Test failed, error message was ${err.message}` }, err); } finally { // Clean up if (tempDir && fs.existsSync(tempDir)) { @@ -34,7 +37,7 @@ export const invoke = async (request: InvocationRequest): Promise => { } if (result.exitCode !== 0) { - throw new Error(`Test failed, exit code was ${result.exitCode}`); + throw new AmplifyError('LambdaFunctionInvokeError', { message: `Test failed, exit code was ${result.exitCode}` }); } const { stdout } = result; diff --git a/packages/amplify-dotnet-function-runtime-provider/src/utils/package.ts b/packages/amplify-dotnet-function-runtime-provider/src/utils/package.ts index b913d48ec7a..729b6dcc681 100644 --- a/packages/amplify-dotnet-function-runtime-provider/src/utils/package.ts +++ b/packages/amplify-dotnet-function-runtime-provider/src/utils/package.ts @@ -3,6 +3,7 @@ import path from 'path'; import * as execa from 'execa'; import { PackageRequest, PackageResult } from '@aws-amplify/amplify-function-plugin-interface'; import { dotnetcore31, executableName } from '../constants'; +import { AmplifyError } from 'amplify-cli-core'; export const packageAssemblies = async (request: PackageRequest, context: any): Promise => { const distPath = path.join(request.srcRoot, 'dist'); @@ -14,16 +15,20 @@ export const packageAssemblies = async (request: PackageRequest, context: any): const packageHash = (await context.amplify.hashDir(distPath, [])) as string; const framework = request.runtime === dotnetcore31 ? 'netcoreapp3.1' : 'net6.0'; - const result = execa.sync( - executableName, - ['lambda', 'package', '--framework', framework, '--configuration', 'Release', '--output-package', request.dstFilename], - { - cwd: sourcePath, - }, - ); + try { + const result = execa.sync( + executableName, + ['lambda', 'package', '--framework', framework, '--configuration', 'Release', '--output-package', request.dstFilename], + { + cwd: sourcePath, + }, + ); - if (result.exitCode !== 0) { - throw new Error(`Packaging failed. Exit code was ${result.exitCode}`); + if (result.exitCode !== 0) { + throw new Error(`Packaging failed. Exit code was ${result.exitCode}`); + } + } catch (err) { + throw new AmplifyError('PackagingLambdaFunctionError', { message: `Packaging failed, error message was ${err.message}` }, err); } return { diff --git a/packages/amplify-frontend-javascript/lib/frontend-config-creator.js b/packages/amplify-frontend-javascript/lib/frontend-config-creator.js index 37bc02bb1ef..a66d9805c08 100644 --- a/packages/amplify-frontend-javascript/lib/frontend-config-creator.js +++ b/packages/amplify-frontend-javascript/lib/frontend-config-creator.js @@ -144,7 +144,7 @@ function createAmplifyConfig(context, amplifyResources) { async function createAWSExports(context, amplifyResources, cloudAmplifyResources) { const newAWSExports = await getAWSExports(context, amplifyResources, cloudAmplifyResources); - generateAWSExportsFile(context, newAWSExports); + await generateAWSExportsFile(context, newAWSExports); return context; } diff --git a/packages/amplify-go-function-runtime-provider/src/runtime.ts b/packages/amplify-go-function-runtime-provider/src/runtime.ts index 06ecc5f5fd8..9ca7e628d2a 100644 --- a/packages/amplify-go-function-runtime-provider/src/runtime.ts +++ b/packages/amplify-go-function-runtime-provider/src/runtime.ts @@ -14,6 +14,7 @@ import glob from 'glob'; import path from 'path'; import { SemVer, coerce, gte, lt } from 'semver'; import { BIN_LOCAL, BIN, SRC, MAIN_BINARY, DIST, MAIN_BINARY_WIN } from './constants'; +import { AmplifyError } from 'amplify-cli-core'; const executableName = 'go'; const minimumVersion = coerce('1.0'); @@ -28,18 +29,20 @@ export const executeCommand = ( cwd: string | undefined = undefined, stdioInput: string | undefined = undefined, ): string => { - const output = execa.sync(executableName, args, { - stdio: streamStdio === true ? 'inherit' : 'pipe', - env, - cwd, - input: stdioInput, - }); - - if (output.exitCode !== 0) { - throw new Error(`${executableName} failed, exit code was ${output.exitCode}`); + try { + const output = execa.sync(executableName, args, { + stdio: streamStdio === true ? 'inherit' : 'pipe', + env, + cwd, + input: stdioInput, + }); + if (output.exitCode !== 0) { + throw new AmplifyError('PackagingLambdaFunctionError', { message: `${executableName} failed, exit code was ${output.exitCode}` }); + } + return output.stdout; + } catch (err) { + throw new AmplifyError('PackagingLambdaFunctionError', { message: `${executableName} failed, error message was ${err.message}` }, err); } - - return output.stdout; }; const isBuildStale = (resourceDir: string, lastBuildTimeStamp: Date, outDir: string) => { @@ -158,7 +161,15 @@ export const packageResource = async (request: PackageRequest, context: any): Pr if (!request.lastPackageTimeStamp || request.lastBuildTimeStamp > request.lastPackageTimeStamp) { const packageHash = await context.amplify.hashDir(request.srcRoot, [DIST]); const zipFn = process.platform.startsWith('win') ? winZip : nixZip; - await zipFn(request.srcRoot, request.dstFilename, context.print); + try { + await zipFn(request.srcRoot, request.dstFilename, context.print); + } catch (err) { + throw new AmplifyError( + 'PackagingLambdaFunctionError', + { message: `Packaging go function failed, error message was ${err.message}` }, + err, + ); + } return { packageHash }; } return {}; diff --git a/packages/amplify-java-function-runtime-provider/src/utils/build.ts b/packages/amplify-java-function-runtime-provider/src/utils/build.ts index 2618702bddf..cb592569fe6 100644 --- a/packages/amplify-java-function-runtime-provider/src/utils/build.ts +++ b/packages/amplify-java-function-runtime-provider/src/utils/build.ts @@ -4,7 +4,7 @@ import fs from 'fs-extra'; import glob from 'glob'; import { packageName, relativeShimJarPath, relativeShimSrcPath } from './constants'; import { BuildRequest, BuildResult } from '@aws-amplify/amplify-function-plugin-interface'; -import { pathManager } from 'amplify-cli-core'; +import { AmplifyError, pathManager } from 'amplify-cli-core'; export const buildResource = async (request: BuildRequest): Promise => { const resourceDir = join(request.srcRoot); @@ -33,12 +33,16 @@ const runPackageManager = (cwd: string, buildArgs: string) => { const packageManager = 'gradle'; const args = [buildArgs]; - const result = execa.sync(packageManager, args, { - cwd, - }); + try { + const result = execa.sync(packageManager, args, { + cwd, + }); - if (result.exitCode !== 0) { - throw new Error(`${packageManager} failed, exit code was ${result.exitCode}`); + if (result.exitCode !== 0) { + throw new AmplifyError('PackagingLambdaFunctionError', { message: `${packageManager} failed, exit code was ${result.exitCode}` }); + } + } catch (err) { + throw new AmplifyError('PackagingLambdaFunctionError', { message: `${packageManager} failed, error message was ${err.message}` }, err); } }; diff --git a/packages/amplify-java-function-runtime-provider/src/utils/detect.ts b/packages/amplify-java-function-runtime-provider/src/utils/detect.ts index f7ecc6b5e13..f35647ead2d 100644 --- a/packages/amplify-java-function-runtime-provider/src/utils/detect.ts +++ b/packages/amplify-java-function-runtime-provider/src/utils/detect.ts @@ -3,6 +3,7 @@ import * as execa from 'execa'; import * as semver from 'semver'; import { minJavaVersion, minGradleVersion } from './constants'; import { CheckDependenciesResult } from '@aws-amplify/amplify-function-plugin-interface'; +import { AmplifyError } from 'amplify-cli-core'; export const checkJava = async (): Promise => { const executablePath = which.sync('java', { @@ -16,10 +17,15 @@ export const checkJava = async (): Promise => { }; } - const result = execa.sync('java', ['-version']); + let result; + try { + result = execa.sync('java', ['-version']); - if (result.exitCode !== 0) { - throw new Error(`java failed, exit code was ${result.exitCode}`); + if (result.exitCode !== 0) { + throw new AmplifyError('PackagingLambdaFunctionError', { message: `java failed, exit code was ${result.exitCode}` }); + } + } catch (err) { + throw new AmplifyError('PackagingLambdaFunctionError', { message: `java failed, error message was ${err.message}` }, err); } const regex = /(\d+\.)(\d+\.)(\d)/g; @@ -51,10 +57,15 @@ export const checkGradle = async (): Promise => { }; } - const result = execa.sync('gradle', ['-v']); + let result; + try { + result = execa.sync('gradle', ['-v']); - if (result.exitCode !== 0) { - throw new Error(`gradle failed, exit code was ${result.exitCode}`); + if (result.exitCode !== 0) { + throw new AmplifyError('PackagingLambdaFunctionError', { message: `gradle failed, exit code was ${result.exitCode}` }); + } + } catch (err) { + throw new AmplifyError('PackagingLambdaFunctionError', { message: `gradle failed, error message was ${err.message}` }, err); } const regex = /(\d+\.)(\d+)/g; @@ -87,10 +98,15 @@ export const checkJavaCompiler = async () => { }; } - const result = execa.sync('javac', ['-version']); + let result; + try { + result = execa.sync('javac', ['-version']); - if (result.exitCode !== 0) { - throw new Error(`java failed, exit code was ${result.exitCode}`); + if (result.exitCode !== 0) { + throw new AmplifyError('PackagingLambdaFunctionError', { message: `java failed, exit code was ${result.exitCode}` }); + } + } catch (err) { + throw new AmplifyError('PackagingLambdaFunctionError', { message: `java failed, error message was ${err.message}` }, err); } const regex = /(\d+\.)(\d+\.)(\d)/g; diff --git a/packages/amplify-java-function-runtime-provider/src/utils/invoke.ts b/packages/amplify-java-function-runtime-provider/src/utils/invoke.ts index 81b53b3aacf..7da446d1cd5 100644 --- a/packages/amplify-java-function-runtime-provider/src/utils/invoke.ts +++ b/packages/amplify-java-function-runtime-provider/src/utils/invoke.ts @@ -2,7 +2,7 @@ import execa from 'execa'; import path from 'path'; import { InvocationRequest } from '@aws-amplify/amplify-function-plugin-interface'; import { packageName, relativeShimJarPath } from './constants'; -import { pathManager } from 'amplify-cli-core'; +import { AmplifyError, pathManager } from 'amplify-cli-core'; export const invokeResource = async (request: InvocationRequest, context: any) => { const [handlerClassName, handlerMethodName] = request.handler.split('::'); @@ -27,7 +27,7 @@ export const invokeResource = async (request: InvocationRequest, context: any) = const { stdout, exitCode } = await childProcess; if (exitCode !== 0) { - throw new Error(`java failed, exit code was ${exitCode}`); + throw new AmplifyError('LambdaFunctionInvokeError', { message: `java failed, exit code was ${exitCode}` }); } const lines = stdout.split('\n'); const lastLine = lines[lines.length - 1]; diff --git a/packages/amplify-java-function-runtime-provider/src/utils/package.ts b/packages/amplify-java-function-runtime-provider/src/utils/package.ts index 0847a0f9083..9eac2aa83eb 100644 --- a/packages/amplify-java-function-runtime-provider/src/utils/package.ts +++ b/packages/amplify-java-function-runtime-provider/src/utils/package.ts @@ -1,6 +1,7 @@ import fs from 'fs-extra'; import path from 'path'; import { PackageRequest, PackageResult } from '@aws-amplify/amplify-function-plugin-interface'; +import { AmplifyError } from 'amplify-cli-core'; export async function packageResource(request: PackageRequest, context: any): Promise { if (!request.lastPackageTimeStamp || request.lastBuildTimeStamp > request.lastPackageTimeStamp) { @@ -12,7 +13,7 @@ export async function packageResource(request: PackageRequest, context: any): Pr resolve({ packageHash }); }); output.on('error', (err) => { - reject(new Error(`Failed to copy zip with error: [${err}]`)); + reject(new AmplifyError('PackagingLambdaFunctionError', { message: `Failed to copy zip with error: [${err}]` }, err)); }); // build through gradle build const zipFile = 'latest_build.zip'; diff --git a/packages/amplify-nodejs-function-runtime-provider/src/__tests__/utils/invoke.test.ts b/packages/amplify-nodejs-function-runtime-provider/src/__tests__/utils/invoke.test.ts index 59f0fcbab22..89d396e0d39 100644 --- a/packages/amplify-nodejs-function-runtime-provider/src/__tests__/utils/invoke.test.ts +++ b/packages/amplify-nodejs-function-runtime-provider/src/__tests__/utils/invoke.test.ts @@ -105,7 +105,7 @@ describe('invoke invalid func', () => { it('handles function does not exist', () => { return expect(invoke(invokeOpts('doesntExist'))).rejects.toThrowErrorMatchingInlineSnapshot( - `"Could not load lambda handler function due to Error: Lambda handler handlers has no exported function named doesntExist"`, + `"Could not load lambda handler function due to LambdaFunctionInvokeError: Lambda handler handlers has no exported function named doesntExist"`, ); }); diff --git a/packages/amplify-nodejs-function-runtime-provider/src/utils/execute.ts b/packages/amplify-nodejs-function-runtime-provider/src/utils/execute.ts index bde038e5c74..988f57f7fc0 100644 --- a/packages/amplify-nodejs-function-runtime-provider/src/utils/execute.ts +++ b/packages/amplify-nodejs-function-runtime-provider/src/utils/execute.ts @@ -2,6 +2,7 @@ import { existsSync, createWriteStream } from 'fs-extra'; import { InvokeOptions } from './invoke'; import path from 'path'; import exit from 'exit'; +import { AmplifyError } from 'amplify-cli-core'; process.on('message', (options: InvokeOptions) => { const parentPipe = createWriteStream('', { fd: 3 }); @@ -29,14 +30,14 @@ const invokeFunction = async (options: InvokeOptions) => { if (options.packageFolder) { const p = path.resolve(options.packageFolder); if (!existsSync(p)) { - throw new Error(`Lambda package folder ${options.packageFolder} does not exist`); + throw new AmplifyError('LambdaFunctionInvokeError', { message: `Lambda package folder ${options.packageFolder} does not exist` }); } process.chdir(p); } else { - throw new Error(`Invalid lambda invoke request. No package folder specified.`); + throw new AmplifyError('LambdaFunctionInvokeError', { message: `Invalid lambda invoke request. No package folder specified.` }); } if (!options.handler) { - throw new Error('Invalid lambda invoke request. No handler specified.'); + throw new AmplifyError('LambdaFunctionInvokeError', { message: `Invalid lambda invoke request. No handler specified.` }); } const lambdaHandler = await loadHandler(options.packageFolder, options.handler); @@ -82,10 +83,12 @@ const loadHandler = async (root: string, handler: string): Promise => const handlerFuncName = handlerParts.ext.replace('.', ''); const handlerFunc = handler?.[handlerFuncName]; if (typeof handlerFunc !== 'function') { - throw new Error(`Lambda handler ${handlerParts.name} has no exported function named ${handlerFuncName}`); + throw new AmplifyError('LambdaFunctionInvokeError', { + message: `Lambda handler ${handlerParts.name} has no exported function named ${handlerFuncName}`, + }); } return handlerFunc; } catch (err) { - throw new Error(`Could not load lambda handler function due to ${err}`); + throw new AmplifyError('LambdaFunctionInvokeError', { message: `Could not load lambda handler function due to ${err}` }, err); } }; diff --git a/packages/amplify-nodejs-function-runtime-provider/src/utils/legacyBuild.ts b/packages/amplify-nodejs-function-runtime-provider/src/utils/legacyBuild.ts index 47e00780646..cf8c5c2bc2d 100644 --- a/packages/amplify-nodejs-function-runtime-provider/src/utils/legacyBuild.ts +++ b/packages/amplify-nodejs-function-runtime-provider/src/utils/legacyBuild.ts @@ -1,4 +1,4 @@ -import { $TSObject, getPackageManager, JSONUtilities } from 'amplify-cli-core'; +import { $TSObject, getPackageManager, JSONUtilities, AmplifyError } from 'amplify-cli-core'; import { BuildRequest, BuildResult, BuildType } from '@aws-amplify/amplify-function-plugin-interface'; import execa from 'execa'; import * as fs from 'fs-extra'; @@ -58,11 +58,29 @@ const runPackageManager = (cwd: string, buildType?: BuildType, scriptName?: stri }); } catch (error) { if (error.code === 'ENOENT') { - throw new Error(`Packaging lambda function failed. Could not find ${packageManager.packageManager} executable in the PATH.`); + throw new AmplifyError( + 'PackagingLambdaFunctionError', + { + message: `Packaging lambda function failed. Could not find ${packageManager.packageManager} executable in the PATH.`, + }, + error, + ); } else if (error.stdout?.includes('YN0050: The --production option is deprecated')) { - throw new Error('Packaging lambda function failed. Yarn 2 is not supported. Use Yarn 1.x and push again.'); + throw new AmplifyError( + 'PackagingLambdaFunctionError', + { + message: 'Packaging lambda function failed. Yarn 2 is not supported. Use Yarn 1.x and push again.', + }, + error, + ); } else { - throw new Error(`Packaging lambda function failed with the error \n${error.message}`); + throw new AmplifyError( + 'PackagingLambdaFunctionError', + { + message: `Packaging lambda function failed with the error \n${error.message}`, + }, + error, + ); } } }; diff --git a/packages/amplify-python-function-runtime-provider/src/util/buildUtils.ts b/packages/amplify-python-function-runtime-provider/src/util/buildUtils.ts index a224fd73427..2ed74f77b36 100644 --- a/packages/amplify-python-function-runtime-provider/src/util/buildUtils.ts +++ b/packages/amplify-python-function-runtime-provider/src/util/buildUtils.ts @@ -2,10 +2,19 @@ import fs from 'fs-extra'; import { BuildRequest, BuildResult } from '@aws-amplify/amplify-function-plugin-interface'; import glob from 'glob'; import execa from 'execa'; +import { AmplifyError } from 'amplify-cli-core'; export async function pythonBuild(params: BuildRequest): Promise { if (!params.lastBuildTimeStamp || isBuildStale(params.srcRoot, params.lastBuildTimeStamp)) { - await execa.command('pipenv install', { cwd: params.srcRoot, stdio: 'inherit' }); // making virtual env in project folder + try { + await execa.command('pipenv install', { cwd: params.srcRoot, stdio: 'inherit' }); // making virtual env in project folder + } catch (err) { + throw new AmplifyError( + 'PackagingLambdaFunctionError', + { message: `Failed to install dependencies in ${params.srcRoot}: ${err}` }, + err, + ); + } return { rebuilt: true }; } return { rebuilt: false }; diff --git a/packages/amplify-python-function-runtime-provider/src/util/invokeUtil.ts b/packages/amplify-python-function-runtime-provider/src/util/invokeUtil.ts index bc90c340ced..b2dbf091dca 100644 --- a/packages/amplify-python-function-runtime-provider/src/util/invokeUtil.ts +++ b/packages/amplify-python-function-runtime-provider/src/util/invokeUtil.ts @@ -2,7 +2,7 @@ import { InvocationRequest } from '@aws-amplify/amplify-function-plugin-interface'; import execa from 'execa'; import path from 'path'; -import { pathManager } from 'amplify-cli-core'; +import { pathManager, AmplifyError } from 'amplify-cli-core'; import { packageName, relativeShimPath } from '../constants'; import { getPythonBinaryName } from './pyUtils'; @@ -16,7 +16,7 @@ export async function pythonInvoke(context: any, request: InvocationRequest): Pr const pyBinary = getPythonBinaryName(); if (!pyBinary) { - throw new Error(`Could not find 'python3' or 'python' executable in the PATH.`); + throw new AmplifyError('LambdaFunctionInvokeError', { message: `Could not find 'python3' or 'python' executable in the PATH.` }); } const childProcess = execa('pipenv', ['run', pyBinary, shimPath, handlerFile + '.py', handlerName], { @@ -29,7 +29,13 @@ export async function pythonInvoke(context: any, request: InvocationRequest): Pr childProcess.stderr?.pipe(process.stderr); childProcess.stdout?.pipe(process.stdout); - const { stdout } = await childProcess; + let stdout; + try { + stdout = (await childProcess).stdout; + } catch (err) { + throw new AmplifyError('LambdaFunctionInvokeError', { message: err.message }, err); + } + const lines = stdout.split('\n'); const lastLine = lines[lines.length - 1]; diff --git a/packages/amplify-python-function-runtime-provider/src/util/pyUtils.ts b/packages/amplify-python-function-runtime-provider/src/util/pyUtils.ts index 0dab7420fde..8ede1edb2a5 100644 --- a/packages/amplify-python-function-runtime-provider/src/util/pyUtils.ts +++ b/packages/amplify-python-function-runtime-provider/src/util/pyUtils.ts @@ -4,6 +4,7 @@ import { ExecOptions } from 'child_process'; import execa from 'execa'; import * as which from 'which'; import { parse } from 'ini'; +import { AmplifyError } from 'amplify-cli-core'; // Gets the pipenv dir where this function's dependencies are located export async function getPipenvDir(srcRoot: string): Promise { @@ -11,7 +12,7 @@ export async function getPipenvDir(srcRoot: string): Promise { const pyBinary = getPythonBinaryName(); if (!pyBinary) { - throw new Error(`Could not find 'python3' or 'python' executable in the PATH.`); + throw new AmplifyError('PackagingLambdaFunctionError', { message: `Could not find 'python3' or 'python' executable in the PATH.` }); } let pipEnvPath = path.join(pipEnvDir, 'lib', `python${getPipfilePyVersion(path.join(srcRoot, 'Pipfile'))}`, 'site-packages'); @@ -21,12 +22,12 @@ export async function getPipenvDir(srcRoot: string): Promise { if (fs.existsSync(pipEnvPath)) { return pipEnvPath; } - throw new Error(`Could not find a pipenv site-packages directory at ${pipEnvPath}`); + throw new AmplifyError('PackagingLambdaFunctionError', { message: `Could not find a pipenv site-packages directory at ${pipEnvPath}` }); } export function majMinPyVersion(pyVersion: string): string { if (!/^Python \d+\.\d+\.\d+$/.test(pyVersion)) { - throw new Error(`Cannot interpret Python version "${pyVersion}"`); + throw new AmplifyError('PackagingLambdaFunctionError', { message: `Cannot interpret Python version "${pyVersion}"` }); } const versionNum = pyVersion.split(' ')[1]; return versionNum.split('.').slice(0, 2).join('.'); @@ -44,7 +45,7 @@ export async function execAsStringPromise(command: string, opts?: ExecOptions): return stdout; } catch (err) { - throw new Error(`Received error [${err}] running command [${command}]`); + throw new AmplifyError('PackagingLambdaFunctionError', { message: `Received error [${err}] running command [${command}]` }); } } @@ -68,7 +69,7 @@ const getPipfilePyVersion = (pipfilePath: string) => { const pipfile = parse(fs.readFileSync(pipfilePath, 'utf-8')); const version = pipfile?.requires?.python_version; if (!version) { - throw new Error(`Did not find Python version specified in ${pipfilePath}`); + throw new AmplifyError('PackagingLambdaFunctionError', { message: `Did not find Python version specified in ${pipfilePath}` }); } return version as string; }; From bfd4ff85a77efdab632b1a68ca8c7288bbd12e59 Mon Sep 17 00:00:00 2001 From: Kamil Sobol Date: Thu, 23 Mar 2023 13:58:30 -0700 Subject: [PATCH 14/84] chore: use npm registry (#12300) * chore: re-generate yarn.lock with NPM registry * chore: replace urls * chore: validate --- .yarnrc | 1 + CONTRIBUTING.md | 2 + scripts/verify-yarn-lock.sh | 9 + yarn.lock | 756 ++++++++++++++++++------------------ 4 files changed, 390 insertions(+), 378 deletions(-) diff --git a/.yarnrc b/.yarnrc index 35ccdf92652..4ce9d44f29c 100644 --- a/.yarnrc +++ b/.yarnrc @@ -3,3 +3,4 @@ yarn-path ".yarn/releases/yarn-1.18.0.cjs" +registry "https://registry.npmjs.org" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index be65889783f..d5a7b7d19dc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -41,6 +41,8 @@ This section should get you running with **Amplify CLI** and get you familiar wi 1. Ensure you have [Java](https://aws.amazon.com/corretto/) installed and `java` command is available in your system. This is required for DynamoDB emulator. +1. Ensure you are using the npm registry, even with yarn by running `yarn config set registry https://registry.npmjs.org` + 1. Start by [forking](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) the _dev_ branch of [amplify-cli](https://github.com/aws-amplify/amplify-cli). Then clone it to your machine to work with it locally using one of the following methods: ```sh diff --git a/scripts/verify-yarn-lock.sh b/scripts/verify-yarn-lock.sh index bb2a90d5b9f..0bc6616f246 100755 --- a/scripts/verify-yarn-lock.sh +++ b/scripts/verify-yarn-lock.sh @@ -10,3 +10,12 @@ if [[ yarn_lock_changed -gt 0 ]]; then else echo "Success! No drift detected in yarn.lock file." fi + +yarn_is_using_yarnpkg_registry=$(grep -F https://registry.yarnpkg.com yarn.lock | wc -l) + +if [[ yarn_is_using_yarnpkg_registry -gt 0 ]]; then + echo "Fail! Detected https://registry.yarnpkg.com in yarn.lock file. Please see use NPM - yarn config set registry https://registry.npmjs.org." + exit 1; +else + echo "Success! No https://registry.yarnpkg.com detected in yarn.lock file." +fi diff --git a/yarn.lock b/yarn.lock index f00a842e08f..7132f9e0649 100644 --- a/yarn.lock +++ b/yarn.lock @@ -143,7 +143,7 @@ "@aws-amplify/appsync-modelgen-plugin@2.4.0", "@aws-amplify/appsync-modelgen-plugin@^2.4.0": version "2.4.0" - resolved "https://registry.yarnpkg.com/@aws-amplify/appsync-modelgen-plugin/-/appsync-modelgen-plugin-2.4.0.tgz#0448d2d5938f7fa411ff34bb5b525e17f050bf30" + resolved "https://registry.npmjs.org/@aws-amplify/appsync-modelgen-plugin/-/appsync-modelgen-plugin-2.4.0.tgz#0448d2d5938f7fa411ff34bb5b525e17f050bf30" integrity sha512-cOXsQ9qcvc7q31riKJL7kYYQFpriFws6rAO2GG7xRwT+0Dqn5LACSAgPHXBMx8vXI4nQcEYZ/EtxTchD845U6Q== dependencies: "@graphql-codegen/plugin-helpers" "^1.18.8" @@ -178,7 +178,7 @@ "@aws-amplify/codegen-ui-react@2.11.0": version "2.11.0" - resolved "https://registry.yarnpkg.com/@aws-amplify/codegen-ui-react/-/codegen-ui-react-2.11.0.tgz#95943ef10a69fc63c2c76f64f84fe42220d50f47" + resolved "https://registry.npmjs.org/@aws-amplify/codegen-ui-react/-/codegen-ui-react-2.11.0.tgz#95943ef10a69fc63c2c76f64f84fe42220d50f47" integrity sha512-QLgXeMTgXnw3PxmD7u/+S3iQ4dvGkxwlv6o6zofVmcRlT34o5H+LnKLTHOGtIGeZ9X6WHPiMOD33K6K/7KVLGQ== dependencies: "@aws-amplify/codegen-ui" "2.11.0" @@ -189,7 +189,7 @@ "@aws-amplify/codegen-ui@2.11.0": version "2.11.0" - resolved "https://registry.yarnpkg.com/@aws-amplify/codegen-ui/-/codegen-ui-2.11.0.tgz#b94f310257036a0e63460b1184e2852dd5b27e6d" + resolved "https://registry.npmjs.org/@aws-amplify/codegen-ui/-/codegen-ui-2.11.0.tgz#b94f310257036a0e63460b1184e2852dd5b27e6d" integrity sha512-zJPUvOhrvRRgZ1dzFPga4kBU9Pk1U3zhmZbhj3oumLv3nxbMsU5a26k+cDkrPYhRpfyQzenRgYhSlN+2X+rDeA== dependencies: change-case "^4.1.2" @@ -266,7 +266,7 @@ "@aws-amplify/graphql-docs-generator@3.0.3": version "3.0.3" - resolved "https://registry.yarnpkg.com/@aws-amplify/graphql-docs-generator/-/graphql-docs-generator-3.0.3.tgz#1bc720b6b70293b14bdc8195b47b0fc196aaf4e7" + resolved "https://registry.npmjs.org/@aws-amplify/graphql-docs-generator/-/graphql-docs-generator-3.0.3.tgz#1bc720b6b70293b14bdc8195b47b0fc196aaf4e7" integrity sha512-N1njpO941FgVeOjxlWC8t9czLHGBkcj2EdRSbO6qBzCUErJTeDJ402qtShsbyaBdJfreCeUhBidau+rUxCtJ1w== dependencies: graphql "^15.5.0" @@ -422,7 +422,7 @@ "@aws-amplify/graphql-types-generator@3.0.1": version "3.0.1" - resolved "https://registry.yarnpkg.com/@aws-amplify/graphql-types-generator/-/graphql-types-generator-3.0.1.tgz#739e98505687e21da2938e3e9e7b0d8444aefe3f" + resolved "https://registry.npmjs.org/@aws-amplify/graphql-types-generator/-/graphql-types-generator-3.0.1.tgz#739e98505687e21da2938e3e9e7b0d8444aefe3f" integrity sha512-g9iUquLGiy2XLrOuJwFLSgnDmzOOpfakuKmanWMCV/u+GG5zCipsfU3SOyhhRCAF9JJwxOMhMYBoquJw/vrsiA== dependencies: "@babel/generator" "7.0.0-beta.4" @@ -515,7 +515,7 @@ "@aws-cdk/asset-kubectl-v20@^2.1.1": version "2.1.1" - resolved "https://registry.yarnpkg.com/@aws-cdk/asset-kubectl-v20/-/asset-kubectl-v20-2.1.1.tgz#d01c1efb867fb7f2cfd8c8b230b8eae16447e156" + resolved "https://registry.npmjs.org/@aws-cdk/asset-kubectl-v20/-/asset-kubectl-v20-2.1.1.tgz#d01c1efb867fb7f2cfd8c8b230b8eae16447e156" integrity sha512-U1ntiX8XiMRRRH5J1IdC+1t5CE89015cwyt5U63Cpk0GnMlN5+h9WsWMlKlPXZR4rdq/m806JRlBMRpBUB2Dhw== "@aws-cdk/asset-node-proxy-agent-v5@^2.0.77": @@ -2670,7 +2670,7 @@ "@babel/compat-data@^7.20.5": version "7.20.10" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.20.10.tgz#9d92fa81b87542fff50e848ed585b4212c1d34ec" + resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.10.tgz#9d92fa81b87542fff50e848ed585b4212c1d34ec" integrity sha512-sEnuDPpOJR/fcafHMjpcpGN5M2jbUGUHwmuWKM/YdPzeEDJg8bgmbcWQFUfE32MQjti1koACvoPVsDe8Uq+idg== "@babel/core@^7.1.0", "@babel/core@^7.10.5", "@babel/core@^7.12.3", "@babel/core@^7.16.0", "@babel/core@^7.7.5": @@ -2738,7 +2738,7 @@ "@babel/core@^7.7.2", "@babel/core@^7.8.0": version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.20.7.tgz#37072f951bd4d28315445f66e0ec9f6ae0c8c35f" + resolved "https://registry.npmjs.org/@babel/core/-/core-7.20.7.tgz#37072f951bd4d28315445f66e0ec9f6ae0c8c35f" integrity sha512-t1ZjCluspe5DW24bn2Rr1CDb2v9rn/hROtg9a2tmd0+QYf4bsloYfLQzjG4qHPNMhWtKdGC33R5AxGR2Af2cBw== dependencies: "@ampproject/remapping" "^2.1.0" @@ -2779,7 +2779,7 @@ "@babel/generator@7.18.2": version "7.18.2" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.2.tgz#33873d6f89b21efe2da63fe554460f3df1c5880d" + resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.18.2.tgz#33873d6f89b21efe2da63fe554460f3df1c5880d" integrity sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw== dependencies: "@babel/types" "^7.18.2" @@ -2824,7 +2824,7 @@ "@babel/generator@^7.20.7", "@babel/generator@^7.7.2": version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.20.7.tgz#f8ef57c8242665c5929fe2e8d82ba75460187b4a" + resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.20.7.tgz#f8ef57c8242665c5929fe2e8d82ba75460187b4a" integrity sha512-7wqMOJq8doJMZmP4ApXTzLxSr7+oO2jroJURrVEp6XShrQUObV8Tq/D0NCcoYg2uHqUrjzO0zwBjoYzelxK+sw== dependencies: "@babel/types" "^7.20.7" @@ -2903,7 +2903,7 @@ "@babel/helper-compilation-targets@^7.20.7": version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz#a6cd33e93629f5eb473b021aac05df62c4cd09bb" + resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz#a6cd33e93629f5eb473b021aac05df62c4cd09bb" integrity sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ== dependencies: "@babel/compat-data" "^7.20.5" @@ -3016,7 +3016,7 @@ "@babel/helper-environment-visitor@^7.18.9": version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be" + resolved "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be" integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg== "@babel/helper-explode-assignable-expression@^7.16.0": @@ -3069,7 +3069,7 @@ "@babel/helper-function-name@^7.19.0": version "7.19.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz#941574ed5390682e872e52d3f38ce9d1bef4648c" + resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz#941574ed5390682e872e52d3f38ce9d1bef4648c" integrity sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w== dependencies: "@babel/template" "^7.18.10" @@ -3210,7 +3210,7 @@ "@babel/helper-module-transforms@^7.20.7": version "7.20.11" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.20.11.tgz#df4c7af713c557938c50ea3ad0117a7944b2f1b0" + resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.20.11.tgz#df4c7af713c557938c50ea3ad0117a7944b2f1b0" integrity sha512-uRy78kN4psmji1s2QtbtcCSaj/LILFDp0f/ymhpQH5QY3nljUZCaNWz9X1dEj/8MBdBEFECs7yRhKn8i7NjZgg== dependencies: "@babel/helper-environment-visitor" "^7.18.9" @@ -3248,7 +3248,7 @@ "@babel/helper-plugin-utils@^7.19.0": version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz#d1b9000752b18d0877cff85a5c376ce5c3121629" + resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz#d1b9000752b18d0877cff85a5c376ce5c3121629" integrity sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ== "@babel/helper-remap-async-to-generator@^7.16.5": @@ -3321,7 +3321,7 @@ "@babel/helper-simple-access@^7.20.2": version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz#0ab452687fe0c2cfb1e2b9e0015de07fc2d62dd9" + resolved "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz#0ab452687fe0c2cfb1e2b9e0015de07fc2d62dd9" integrity sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA== dependencies: "@babel/types" "^7.20.2" @@ -3356,7 +3356,7 @@ "@babel/helper-string-parser@^7.19.4": version "7.19.4" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz#38d3acb654b4701a9b77fb0615a96f775c3a9e63" + resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz#38d3acb654b4701a9b77fb0615a96f775c3a9e63" integrity sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw== "@babel/helper-validator-identifier@^7.15.7", "@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": @@ -3433,7 +3433,7 @@ "@babel/helpers@^7.20.7": version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.20.7.tgz#04502ff0feecc9f20ecfaad120a18f011a8e6dce" + resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.7.tgz#04502ff0feecc9f20ecfaad120a18f011a8e6dce" integrity sha512-PBPjs5BppzsGaxHQCDKnZ6Gd9s6xl8bBCluz3vEInLGRJmnZan4F6BYCeqtyXqkk4W5IlPmjK4JlOuZkpJ3xZA== dependencies: "@babel/template" "^7.20.7" @@ -3469,7 +3469,7 @@ "@babel/parser@7.18.4": version "7.18.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.4.tgz#6774231779dd700e0af29f6ad8d479582d7ce5ef" + resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.18.4.tgz#6774231779dd700e0af29f6ad8d479582d7ce5ef" integrity sha512-FDge0dFazETFcxGw/EXzOkN8uJp0PC7Qbm+Pe9T+av2zlBpOgunFHkQPPn+eRuClU73JF+98D531UgayY89tow== "@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.16.0", "@babel/parser@^7.16.5", "@babel/parser@^7.7.0": @@ -3494,7 +3494,7 @@ "@babel/parser@^7.20.7": version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.7.tgz#66fe23b3c8569220817d5feb8b9dcdc95bb4f71b" + resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.20.7.tgz#66fe23b3c8569220817d5feb8b9dcdc95bb4f71b" integrity sha512-T3Z9oHybU+0vZlY9CiDSJQTD5ZapcW18ZctFMi0MOAl/4BjFF4ul7NVSARLdbGO5vDqy9eQiGTV0LtKfvCYvcg== "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.16.2": @@ -3961,7 +3961,7 @@ "@babel/plugin-syntax-typescript@^7.7.2": version "7.20.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.20.0.tgz#4e9a0cfc769c85689b77a2e642d24e9f697fc8c7" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.20.0.tgz#4e9a0cfc769c85689b77a2e642d24e9f697fc8c7" integrity sha512-rd9TkG+u1CExzS4SM1BlMEhMXwFLKVjOAFFCDx9PbX5ycJWDoWMcwdJH9RhkPu1dOgn5TrxLot/Gx6lWFuAUNQ== dependencies: "@babel/helper-plugin-utils" "^7.19.0" @@ -4837,7 +4837,7 @@ "@babel/template@^7.18.10", "@babel/template@^7.20.7": version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.20.7.tgz#a15090c2839a83b02aa996c0b4994005841fd5a8" + resolved "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz#a15090c2839a83b02aa996c0b4994005841fd5a8" integrity sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw== dependencies: "@babel/code-frame" "^7.18.6" @@ -4919,7 +4919,7 @@ "@babel/traverse@^7.20.10", "@babel/traverse@^7.20.7", "@babel/traverse@^7.7.2": version "7.20.10" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.20.10.tgz#2bf98239597fcec12f842756f186a9dde6d09230" + resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.10.tgz#2bf98239597fcec12f842756f186a9dde6d09230" integrity sha512-oSf1juCgymrSez8NI4A2sr4+uB/mFd9MXplYGPEBnfAuWmmyeVcHa6xLPiaRBcXkcb/28bgxmQLTVwFKE1yfsg== dependencies: "@babel/code-frame" "^7.18.6" @@ -4944,7 +4944,7 @@ "@babel/types@7.18.4": version "7.18.4" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.4.tgz#27eae9b9fd18e9dccc3f9d6ad051336f307be354" + resolved "https://registry.npmjs.org/@babel/types/-/types-7.18.4.tgz#27eae9b9fd18e9dccc3f9d6ad051336f307be354" integrity sha512-ThN1mBcMq5pG/Vm2IcBmPPfyPXbd8S02rS+OBIDENdufvqC7Z/jHPCv9IcP01277aKtDI8g/2XysBN4hA8niiw== dependencies: "@babel/helper-validator-identifier" "^7.16.7" @@ -4976,7 +4976,7 @@ "@babel/types@^7.18.2", "@babel/types@^7.19.0", "@babel/types@^7.20.2", "@babel/types@^7.20.7": version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.20.7.tgz#54ec75e252318423fc07fb644dc6a58a64c09b7f" + resolved "https://registry.npmjs.org/@babel/types/-/types-7.20.7.tgz#54ec75e252318423fc07fb644dc6a58a64c09b7f" integrity sha512-69OnhBxSSgK0OzTJai4kyPDiKTIe3j+ctaHdIGVbRahTLAT7L3R9oeXHC2aVSuGYt3cVnoAMDmOCgJ2yaiLMvg== dependencies: "@babel/helper-string-parser" "^7.19.4" @@ -5415,7 +5415,7 @@ "@graphql-codegen/core@2.6.6": version "2.6.6" - resolved "https://registry.yarnpkg.com/@graphql-codegen/core/-/core-2.6.6.tgz#e6ea99682230c5bbcf28cb247672da7f17e78578" + resolved "https://registry.npmjs.org/@graphql-codegen/core/-/core-2.6.6.tgz#e6ea99682230c5bbcf28cb247672da7f17e78578" integrity sha512-gU2FUxoLGw2GfcPWfBVXuiN3aDODbZ6Z9I+IGxa2u1Rzxlacw4TMmcwr4/IjC6mkiYJEKTvdVspHaby+brhuAg== dependencies: "@graphql-codegen/plugin-helpers" "^2.7.2" @@ -5436,7 +5436,7 @@ "@graphql-codegen/plugin-helpers@^2.7.2": version "2.7.2" - resolved "https://registry.yarnpkg.com/@graphql-codegen/plugin-helpers/-/plugin-helpers-2.7.2.tgz#6544f739d725441c826a8af6a49519f588ff9bed" + resolved "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-2.7.2.tgz#6544f739d725441c826a8af6a49519f588ff9bed" integrity sha512-kln2AZ12uii6U59OQXdjLk5nOlh1pHis1R98cDZGFnfaiAbX9V3fxcZ1MMJkB7qFUymTALzyjZoXXdyVmPMfRg== dependencies: "@graphql-tools/utils" "^8.8.0" @@ -5526,7 +5526,7 @@ "@graphql-tools/merge@8.3.18": version "8.3.18" - resolved "https://registry.yarnpkg.com/@graphql-tools/merge/-/merge-8.3.18.tgz#bfbb517c68598a885809f16ce5c3bb1ebb8f04a2" + resolved "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.3.18.tgz#bfbb517c68598a885809f16ce5c3bb1ebb8f04a2" integrity sha512-R8nBglvRWPAyLpZL/f3lxsY7wjnAeE0l056zHhcO/CgpvK76KYUt9oEkR05i8Hmt8DLRycBN0FiotJ0yDQWTVA== dependencies: "@graphql-tools/utils" "9.2.1" @@ -5577,7 +5577,7 @@ "@graphql-tools/schema@^9.0.0": version "9.0.16" - resolved "https://registry.yarnpkg.com/@graphql-tools/schema/-/schema-9.0.16.tgz#7d340d69e6094dc01a2b9e625c7bb4fff89ea521" + resolved "https://registry.npmjs.org/@graphql-tools/schema/-/schema-9.0.16.tgz#7d340d69e6094dc01a2b9e625c7bb4fff89ea521" integrity sha512-kF+tbYPPf/6K2aHG3e1SWIbapDLQaqnIHVRG6ow3onkFoowwtKszvUyOASL6Krcv2x9bIMvd1UkvRf9OaoROQQ== dependencies: "@graphql-tools/merge" "8.3.18" @@ -5633,7 +5633,7 @@ "@graphql-tools/utils@9.2.1", "@graphql-tools/utils@^9.1.1": version "9.2.1" - resolved "https://registry.yarnpkg.com/@graphql-tools/utils/-/utils-9.2.1.tgz#1b3df0ef166cfa3eae706e3518b17d5922721c57" + resolved "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.2.1.tgz#1b3df0ef166cfa3eae706e3518b17d5922721c57" integrity sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A== dependencies: "@graphql-typed-document-node/core" "^3.1.1" @@ -5659,7 +5659,7 @@ "@graphql-tools/utils@^8.8.0": version "8.13.1" - resolved "https://registry.yarnpkg.com/@graphql-tools/utils/-/utils-8.13.1.tgz#b247607e400365c2cd87ff54654d4ad25a7ac491" + resolved "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.13.1.tgz#b247607e400365c2cd87ff54654d4ad25a7ac491" integrity sha512-qIh9yYpdUFmctVqovwMdheVNJqFh+DQNWIhX87FJStfXYnmweBUDATok9fWPleKeFwxnW8IapKmY8m8toJEkAw== dependencies: tslib "^2.4.0" @@ -5677,7 +5677,7 @@ "@graphql-typed-document-node/core@^3.1.1": version "3.1.1" - resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.1.1.tgz#076d78ce99822258cf813ecc1e7fa460fa74d052" + resolved "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.1.1.tgz#076d78ce99822258cf813ecc1e7fa460fa74d052" integrity sha512-NQ17ii0rK1b34VZonlmT2QMJFI70m0TRwbknO/ihlbatXyaktDhN/98vBiUU6kNBPljqGqyIrl2T4nY2RpFANg== "@hapi/hoek@^9.0.0": @@ -5806,7 +5806,7 @@ "@jest/core@^27.5.1": version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.5.1.tgz#267ac5f704e09dc52de2922cbf3af9edcd64b626" + resolved "https://registry.npmjs.org/@jest/core/-/core-27.5.1.tgz#267ac5f704e09dc52de2922cbf3af9edcd64b626" integrity sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ== dependencies: "@jest/console" "^27.5.1" @@ -5850,7 +5850,7 @@ "@jest/environment@^27.5.1": version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.5.1.tgz#d7425820511fe7158abbecc010140c3fd3be9c74" + resolved "https://registry.npmjs.org/@jest/environment/-/environment-27.5.1.tgz#d7425820511fe7158abbecc010140c3fd3be9c74" integrity sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA== dependencies: "@jest/fake-timers" "^27.5.1" @@ -5872,7 +5872,7 @@ "@jest/fake-timers@^27.5.1": version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.5.1.tgz#76979745ce0579c8a94a4678af7a748eda8ada74" + resolved "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.5.1.tgz#76979745ce0579c8a94a4678af7a748eda8ada74" integrity sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ== dependencies: "@jest/types" "^27.5.1" @@ -5893,7 +5893,7 @@ "@jest/globals@^27.5.1": version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.5.1.tgz#7ac06ce57ab966566c7963431cef458434601b2b" + resolved "https://registry.npmjs.org/@jest/globals/-/globals-27.5.1.tgz#7ac06ce57ab966566c7963431cef458434601b2b" integrity sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q== dependencies: "@jest/environment" "^27.5.1" @@ -5934,7 +5934,7 @@ "@jest/reporters@^27.5.1": version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.5.1.tgz#ceda7be96170b03c923c37987b64015812ffec04" + resolved "https://registry.npmjs.org/@jest/reporters/-/reporters-27.5.1.tgz#ceda7be96170b03c923c37987b64015812ffec04" integrity sha512-cPXh9hWIlVJMQkVk84aIvXuBB4uQQmFqZiacloFuGiP3ah1sbCxCosidXFDfqG8+6fO1oR2dTJTlsOy4VFmUfw== dependencies: "@bcoe/v8-coverage" "^0.2.3" @@ -5974,7 +5974,7 @@ "@jest/source-map@^27.5.1": version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-27.5.1.tgz#6608391e465add4205eae073b55e7f279e04e8cf" + resolved "https://registry.npmjs.org/@jest/source-map/-/source-map-27.5.1.tgz#6608391e465add4205eae073b55e7f279e04e8cf" integrity sha512-y9NIHUYF3PJRlHk98NdC/N1gl88BL08aQQgu4k4ZopQkCw9t9cV8mtl3TV8b/YCB8XaVTFrmUTAJvjsntDireg== dependencies: callsites "^3.0.0" @@ -6014,7 +6014,7 @@ "@jest/test-sequencer@^27.5.1": version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.5.1.tgz#4057e0e9cea4439e544c6353c6affe58d095745b" + resolved "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.5.1.tgz#4057e0e9cea4439e544c6353c6affe58d095745b" integrity sha512-LCheJF7WB2+9JuCS7VB/EmGIdQuhtqjRNI9A43idHv3E4KltCTsPsLxvdaubFHSYwY/fNjMWjl6vNRhDiN7vpQ== dependencies: "@jest/test-result" "^27.5.1" @@ -6099,7 +6099,7 @@ "@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": version "0.3.2" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" + resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== dependencies: "@jridgewell/set-array" "^1.0.1" @@ -6108,17 +6108,17 @@ "@jridgewell/resolve-uri@^3.0.3": version "3.1.0" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" + resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== "@jridgewell/set-array@^1.0.1": version "1.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" + resolved "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== "@jridgewell/source-map@^0.3.2": version "0.3.2" - resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.2.tgz#f45351aaed4527a298512ec72f81040c998580fb" + resolved "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz#f45351aaed4527a298512ec72f81040c998580fb" integrity sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw== dependencies: "@jridgewell/gen-mapping" "^0.3.0" @@ -6126,7 +6126,7 @@ "@jridgewell/sourcemap-codec@^1.4.10": version "1.4.14" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" + resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== "@jridgewell/trace-mapping@^0.3.0": @@ -6139,7 +6139,7 @@ "@jridgewell/trace-mapping@^0.3.9": version "0.3.14" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz#b231a081d8f66796e475ad588a1ef473112701ed" + resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz#b231a081d8f66796e475ad588a1ef473112701ed" integrity sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ== dependencies: "@jridgewell/resolve-uri" "^3.0.3" @@ -6152,7 +6152,7 @@ "@lerna/add@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/add/-/add-6.4.1.tgz#fa20fe9ff875dc5758141262c8cde0d9a6481ec4" + resolved "https://registry.npmjs.org/@lerna/add/-/add-6.4.1.tgz#fa20fe9ff875dc5758141262c8cde0d9a6481ec4" integrity sha512-YSRnMcsdYnQtQQK0NSyrS9YGXvB3jzvx183o+JTH892MKzSlBqwpBHekCknSibyxga1HeZ0SNKQXgsHAwWkrRw== dependencies: "@lerna/bootstrap" "6.4.1" @@ -6168,7 +6168,7 @@ "@lerna/bootstrap@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/bootstrap/-/bootstrap-6.4.1.tgz#a76ff22c3160d134fb60bcfddb3f8b0759b4f1ff" + resolved "https://registry.npmjs.org/@lerna/bootstrap/-/bootstrap-6.4.1.tgz#a76ff22c3160d134fb60bcfddb3f8b0759b4f1ff" integrity sha512-64cm0mnxzxhUUjH3T19ZSjPdn28vczRhhTXhNAvOhhU0sQgHrroam1xQC1395qbkV3iosSertlu8e7xbXW033w== dependencies: "@lerna/command" "6.4.1" @@ -6196,7 +6196,7 @@ "@lerna/changed@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/changed/-/changed-6.4.1.tgz#4da6d08df7c53bc90c0c0d9d04839f91dd6d70a9" + resolved "https://registry.npmjs.org/@lerna/changed/-/changed-6.4.1.tgz#4da6d08df7c53bc90c0c0d9d04839f91dd6d70a9" integrity sha512-Z/z0sTm3l/iZW0eTSsnQpcY5d6eOpNO0g4wMOK+hIboWG0QOTc8b28XCnfCUO+33UisKl8PffultgoaHMKkGgw== dependencies: "@lerna/collect-updates" "6.4.1" @@ -6206,7 +6206,7 @@ "@lerna/check-working-tree@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/check-working-tree/-/check-working-tree-6.4.1.tgz#c0dcb5c474faf214865058e2fedda44962367a4e" + resolved "https://registry.npmjs.org/@lerna/check-working-tree/-/check-working-tree-6.4.1.tgz#c0dcb5c474faf214865058e2fedda44962367a4e" integrity sha512-EnlkA1wxaRLqhJdn9HX7h+JYxqiTK9aWEFOPqAE8lqjxHn3RpM9qBp1bAdL7CeUk3kN1lvxKwDEm0mfcIyMbPA== dependencies: "@lerna/collect-uncommitted" "6.4.1" @@ -6215,7 +6215,7 @@ "@lerna/child-process@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/child-process/-/child-process-6.4.1.tgz#d697fb769f4c5b57c59f87471eb9b3d65be904a3" + resolved "https://registry.npmjs.org/@lerna/child-process/-/child-process-6.4.1.tgz#d697fb769f4c5b57c59f87471eb9b3d65be904a3" integrity sha512-dvEKK0yKmxOv8pccf3I5D/k+OGiLxQp5KYjsrDtkes2pjpCFfQAMbmpol/Tqx6w/2o2rSaRrLsnX8TENo66FsA== dependencies: chalk "^4.1.0" @@ -6224,7 +6224,7 @@ "@lerna/clean@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/clean/-/clean-6.4.1.tgz#e9ee365ee6879ee998b78b3269fad02b5f385771" + resolved "https://registry.npmjs.org/@lerna/clean/-/clean-6.4.1.tgz#e9ee365ee6879ee998b78b3269fad02b5f385771" integrity sha512-FuVyW3mpos5ESCWSkQ1/ViXyEtsZ9k45U66cdM/HnteHQk/XskSQw0sz9R+whrZRUDu6YgYLSoj1j0YAHVK/3A== dependencies: "@lerna/command" "6.4.1" @@ -6238,7 +6238,7 @@ "@lerna/cli@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/cli/-/cli-6.4.1.tgz#2b2d093baace40e822caee8c90f698e98a437a2f" + resolved "https://registry.npmjs.org/@lerna/cli/-/cli-6.4.1.tgz#2b2d093baace40e822caee8c90f698e98a437a2f" integrity sha512-2pNa48i2wzFEd9LMPKWI3lkW/3widDqiB7oZUM1Xvm4eAOuDWc9I3RWmAUIVlPQNf3n4McxJCvsZZ9BpQN50Fg== dependencies: "@lerna/global-options" "6.4.1" @@ -6248,7 +6248,7 @@ "@lerna/collect-uncommitted@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/collect-uncommitted/-/collect-uncommitted-6.4.1.tgz#ae62bcaa5ecaa5b7fbc41eb9ae90b6711be156ec" + resolved "https://registry.npmjs.org/@lerna/collect-uncommitted/-/collect-uncommitted-6.4.1.tgz#ae62bcaa5ecaa5b7fbc41eb9ae90b6711be156ec" integrity sha512-5IVQGhlLrt7Ujc5ooYA1Xlicdba/wMcDSnbQwr8ufeqnzV2z4729pLCVk55gmi6ZienH/YeBPHxhB5u34ofE0Q== dependencies: "@lerna/child-process" "6.4.1" @@ -6257,7 +6257,7 @@ "@lerna/collect-updates@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/collect-updates/-/collect-updates-6.4.1.tgz#4f7cf1c411f3253d0104e7b64cb0aa315a5dfc81" + resolved "https://registry.npmjs.org/@lerna/collect-updates/-/collect-updates-6.4.1.tgz#4f7cf1c411f3253d0104e7b64cb0aa315a5dfc81" integrity sha512-pzw2/FC+nIqYkknUHK9SMmvP3MsLEjxI597p3WV86cEDN3eb1dyGIGuHiKShtjvT08SKSwpTX+3bCYvLVxtC5Q== dependencies: "@lerna/child-process" "6.4.1" @@ -6268,7 +6268,7 @@ "@lerna/command@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/command/-/command-6.4.1.tgz#96c4f5d88792c6c638738c66fcc3a7ad0d2487e2" + resolved "https://registry.npmjs.org/@lerna/command/-/command-6.4.1.tgz#96c4f5d88792c6c638738c66fcc3a7ad0d2487e2" integrity sha512-3Lifj8UTNYbRad8JMP7IFEEdlIyclWyyvq/zvNnTS9kCOEymfmsB3lGXr07/AFoi6qDrvN64j7YSbPZ6C6qonw== dependencies: "@lerna/child-process" "6.4.1" @@ -6284,7 +6284,7 @@ "@lerna/conventional-commits@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/conventional-commits/-/conventional-commits-6.4.1.tgz#b8d44a8a71865b4d37b900137acef623f3a0a11b" + resolved "https://registry.npmjs.org/@lerna/conventional-commits/-/conventional-commits-6.4.1.tgz#b8d44a8a71865b4d37b900137acef623f3a0a11b" integrity sha512-NIvCOjStjQy5O8VojB7/fVReNNDEJOmzRG2sTpgZ/vNS4AzojBQZ/tobzhm7rVkZZ43R9srZeuhfH9WgFsVUSA== dependencies: "@lerna/validation-error" "6.4.1" @@ -6300,7 +6300,7 @@ "@lerna/create-symlink@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/create-symlink/-/create-symlink-6.4.1.tgz#0efec22d78dd814a70d8345ced52c39beb05874b" + resolved "https://registry.npmjs.org/@lerna/create-symlink/-/create-symlink-6.4.1.tgz#0efec22d78dd814a70d8345ced52c39beb05874b" integrity sha512-rNivHFYV1GAULxnaTqeGb2AdEN2OZzAiZcx5CFgj45DWXQEGwPEfpFmCSJdXhFZbyd3K0uiDlAXjAmV56ov3FQ== dependencies: cmd-shim "^5.0.0" @@ -6309,7 +6309,7 @@ "@lerna/create@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/create/-/create-6.4.1.tgz#3fc8556adadff1265432a6cee69ee14465798e71" + resolved "https://registry.npmjs.org/@lerna/create/-/create-6.4.1.tgz#3fc8556adadff1265432a6cee69ee14465798e71" integrity sha512-qfQS8PjeGDDlxEvKsI/tYixIFzV2938qLvJohEKWFn64uvdLnXCamQ0wvRJST8p1ZpHWX4AXrB+xEJM3EFABrA== dependencies: "@lerna/child-process" "6.4.1" @@ -6331,7 +6331,7 @@ "@lerna/describe-ref@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/describe-ref/-/describe-ref-6.4.1.tgz#c0a0beca5dfeada3a39b030f69c8c98f5623bb13" + resolved "https://registry.npmjs.org/@lerna/describe-ref/-/describe-ref-6.4.1.tgz#c0a0beca5dfeada3a39b030f69c8c98f5623bb13" integrity sha512-MXGXU8r27wl355kb1lQtAiu6gkxJ5tAisVJvFxFM1M+X8Sq56icNoaROqYrvW6y97A9+3S8Q48pD3SzkFv31Xw== dependencies: "@lerna/child-process" "6.4.1" @@ -6339,7 +6339,7 @@ "@lerna/diff@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/diff/-/diff-6.4.1.tgz#ca9e62a451ce199faaa7ef5990ded3fad947e2f9" + resolved "https://registry.npmjs.org/@lerna/diff/-/diff-6.4.1.tgz#ca9e62a451ce199faaa7ef5990ded3fad947e2f9" integrity sha512-TnzJsRPN2fOjUrmo5Boi43fJmRtBJDsVgwZM51VnLoKcDtO1kcScXJ16Od2Xx5bXbp5dES5vGDLL/USVVWfeAg== dependencies: "@lerna/child-process" "6.4.1" @@ -6349,7 +6349,7 @@ "@lerna/exec@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/exec/-/exec-6.4.1.tgz#493ce805b6959e8299ec58fab8d31fd01ed209ba" + resolved "https://registry.npmjs.org/@lerna/exec/-/exec-6.4.1.tgz#493ce805b6959e8299ec58fab8d31fd01ed209ba" integrity sha512-KAWfuZpoyd3FMejHUORd0GORMr45/d9OGAwHitfQPVs4brsxgQFjbbBEEGIdwsg08XhkDb4nl6IYVASVTq9+gA== dependencies: "@lerna/child-process" "6.4.1" @@ -6362,7 +6362,7 @@ "@lerna/filter-options@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/filter-options/-/filter-options-6.4.1.tgz#571d37436878fab8b2ac84ca1c3863acd3515cfb" + resolved "https://registry.npmjs.org/@lerna/filter-options/-/filter-options-6.4.1.tgz#571d37436878fab8b2ac84ca1c3863acd3515cfb" integrity sha512-efJh3lP2T+9oyNIP2QNd9EErf0Sm3l3Tz8CILMsNJpjSU6kO43TYWQ+L/ezu2zM99KVYz8GROLqDcHRwdr8qUA== dependencies: "@lerna/collect-updates" "6.4.1" @@ -6372,7 +6372,7 @@ "@lerna/filter-packages@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/filter-packages/-/filter-packages-6.4.1.tgz#e138b182816a049c81de094069cad12aaa41a236" + resolved "https://registry.npmjs.org/@lerna/filter-packages/-/filter-packages-6.4.1.tgz#e138b182816a049c81de094069cad12aaa41a236" integrity sha512-LCMGDGy4b+Mrb6xkcVzp4novbf5MoZEE6ZQF1gqG0wBWqJzNcKeFiOmf352rcDnfjPGZP6ct5+xXWosX/q6qwg== dependencies: "@lerna/validation-error" "6.4.1" @@ -6381,14 +6381,14 @@ "@lerna/get-npm-exec-opts@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/get-npm-exec-opts/-/get-npm-exec-opts-6.4.1.tgz#42681f6db4238277889b3423f87308eda5dc01ec" + resolved "https://registry.npmjs.org/@lerna/get-npm-exec-opts/-/get-npm-exec-opts-6.4.1.tgz#42681f6db4238277889b3423f87308eda5dc01ec" integrity sha512-IvN/jyoklrWcjssOf121tZhOc16MaFPOu5ii8a+Oy0jfTriIGv929Ya8MWodj75qec9s+JHoShB8yEcMqZce4g== dependencies: npmlog "^6.0.2" "@lerna/get-packed@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/get-packed/-/get-packed-6.4.1.tgz#b3b8b907002d50bf8792dd97e2729249c0b0e0cd" + resolved "https://registry.npmjs.org/@lerna/get-packed/-/get-packed-6.4.1.tgz#b3b8b907002d50bf8792dd97e2729249c0b0e0cd" integrity sha512-uaDtYwK1OEUVIXn84m45uPlXShtiUcw6V9TgB3rvHa3rrRVbR7D4r+JXcwVxLGrAS7LwxVbYWEEO/Z/bX7J/Lg== dependencies: fs-extra "^9.1.0" @@ -6397,7 +6397,7 @@ "@lerna/github-client@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/github-client/-/github-client-6.4.1.tgz#25d19b440395a6039b9162ee58dadb9dce990ff0" + resolved "https://registry.npmjs.org/@lerna/github-client/-/github-client-6.4.1.tgz#25d19b440395a6039b9162ee58dadb9dce990ff0" integrity sha512-ridDMuzmjMNlcDmrGrV9mxqwUKzt9iYqCPwVYJlRYrnE3jxyg+RdooquqskVFj11djcY6xCV2Q2V1lUYwF+PmA== dependencies: "@lerna/child-process" "6.4.1" @@ -6408,7 +6408,7 @@ "@lerna/gitlab-client@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/gitlab-client/-/gitlab-client-6.4.1.tgz#a01d962dc52a55b8272ea52bc54d72c5fd9db6f9" + resolved "https://registry.npmjs.org/@lerna/gitlab-client/-/gitlab-client-6.4.1.tgz#a01d962dc52a55b8272ea52bc54d72c5fd9db6f9" integrity sha512-AdLG4d+jbUvv0jQyygQUTNaTCNSMDxioJso6aAjQ/vkwyy3fBJ6FYzX74J4adSfOxC2MQZITFyuG+c9ggp7pyQ== dependencies: node-fetch "^2.6.1" @@ -6416,12 +6416,12 @@ "@lerna/global-options@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/global-options/-/global-options-6.4.1.tgz#7df76b1d38500606a8dc3ce0804bab6894c4f4a3" + resolved "https://registry.npmjs.org/@lerna/global-options/-/global-options-6.4.1.tgz#7df76b1d38500606a8dc3ce0804bab6894c4f4a3" integrity sha512-UTXkt+bleBB8xPzxBPjaCN/v63yQdfssVjhgdbkQ//4kayaRA65LyEtJTi9rUrsLlIy9/rbeb+SAZUHg129fJg== "@lerna/has-npm-version@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/has-npm-version/-/has-npm-version-6.4.1.tgz#04eba7df687e665294834253b659430efc1e01bb" + resolved "https://registry.npmjs.org/@lerna/has-npm-version/-/has-npm-version-6.4.1.tgz#04eba7df687e665294834253b659430efc1e01bb" integrity sha512-vW191w5iCkwNWWWcy4542ZOpjKYjcP/pU3o3+w6NM1J3yBjWZcNa8lfzQQgde2QkGyNi+i70o6wIca1o0sdKwg== dependencies: "@lerna/child-process" "6.4.1" @@ -6429,7 +6429,7 @@ "@lerna/import@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/import/-/import-6.4.1.tgz#b5696fed68a32d32398d66f95192267f1da5110e" + resolved "https://registry.npmjs.org/@lerna/import/-/import-6.4.1.tgz#b5696fed68a32d32398d66f95192267f1da5110e" integrity sha512-oDg8g1PNrCM1JESLsG3rQBtPC+/K9e4ohs0xDKt5E6p4l7dc0Ib4oo0oCCT/hGzZUlNwHxrc2q9JMRzSAn6P/Q== dependencies: "@lerna/child-process" "6.4.1" @@ -6443,7 +6443,7 @@ "@lerna/info@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/info/-/info-6.4.1.tgz#30354fcb82c99b1f0ed753f957fbaca5b250c3fa" + resolved "https://registry.npmjs.org/@lerna/info/-/info-6.4.1.tgz#30354fcb82c99b1f0ed753f957fbaca5b250c3fa" integrity sha512-Ks4R7IndIr4vQXz+702gumPVhH6JVkshje0WKA3+ew2qzYZf68lU1sBe1OZsQJU3eeY2c60ax+bItSa7aaIHGw== dependencies: "@lerna/command" "6.4.1" @@ -6452,7 +6452,7 @@ "@lerna/init@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/init/-/init-6.4.1.tgz#ea4905ca976189db4b0bf04d78919060146bf684" + resolved "https://registry.npmjs.org/@lerna/init/-/init-6.4.1.tgz#ea4905ca976189db4b0bf04d78919060146bf684" integrity sha512-CXd/s/xgj0ZTAoOVyolOTLW2BG7uQOhWW4P/ktlwwJr9s3c4H/z+Gj36UXw3q5X1xdR29NZt7Vc6fvROBZMjUQ== dependencies: "@lerna/child-process" "6.4.1" @@ -6464,7 +6464,7 @@ "@lerna/link@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/link/-/link-6.4.1.tgz#f31ed1f6aea1581e358a9ff545be78b61e923175" + resolved "https://registry.npmjs.org/@lerna/link/-/link-6.4.1.tgz#f31ed1f6aea1581e358a9ff545be78b61e923175" integrity sha512-O8Rt7MAZT/WT2AwrB/+HY76ktnXA9cDFO9rhyKWZGTHdplbzuJgfsGzu8Xv0Ind+w+a8xLfqtWGPlwiETnDyrw== dependencies: "@lerna/command" "6.4.1" @@ -6476,7 +6476,7 @@ "@lerna/list@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/list/-/list-6.4.1.tgz#12ad83902e148d1e5ba007149b72b14636f9f1ba" + resolved "https://registry.npmjs.org/@lerna/list/-/list-6.4.1.tgz#12ad83902e148d1e5ba007149b72b14636f9f1ba" integrity sha512-7a6AKgXgC4X7nK6twVPNrKCiDhrCiAhL/FE4u9HYhHqw9yFwyq8Qe/r1RVOkAOASNZzZ8GuBvob042bpunupCw== dependencies: "@lerna/command" "6.4.1" @@ -6486,7 +6486,7 @@ "@lerna/listable@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/listable/-/listable-6.4.1.tgz#6f5c83865391c6beeb41802951c674e2de119bde" + resolved "https://registry.npmjs.org/@lerna/listable/-/listable-6.4.1.tgz#6f5c83865391c6beeb41802951c674e2de119bde" integrity sha512-L8ANeidM10aoF8aL3L/771Bb9r/TRkbEPzAiC8Iy2IBTYftS87E3rT/4k5KBEGYzMieSKJaskSFBV0OQGYV1Cw== dependencies: "@lerna/query-graph" "6.4.1" @@ -6495,7 +6495,7 @@ "@lerna/log-packed@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/log-packed/-/log-packed-6.4.1.tgz#43eae50d5c0cd906b1977a58b62b35541cf89ec1" + resolved "https://registry.npmjs.org/@lerna/log-packed/-/log-packed-6.4.1.tgz#43eae50d5c0cd906b1977a58b62b35541cf89ec1" integrity sha512-Pwv7LnIgWqZH4vkM1rWTVF+pmWJu7d0ZhVwyhCaBJUsYbo+SyB2ZETGygo3Z/A+vZ/S7ImhEEKfIxU9bg5lScQ== dependencies: byte-size "^7.0.0" @@ -6505,7 +6505,7 @@ "@lerna/npm-conf@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/npm-conf/-/npm-conf-6.4.1.tgz#64dba237ff41472a24f96192669c1bc0dce15edb" + resolved "https://registry.npmjs.org/@lerna/npm-conf/-/npm-conf-6.4.1.tgz#64dba237ff41472a24f96192669c1bc0dce15edb" integrity sha512-Q+83uySGXYk3n1pYhvxtzyGwBGijYgYecgpiwRG1YNyaeGy+Mkrj19cyTWubT+rU/kM5c6If28+y9kdudvc7zQ== dependencies: config-chain "^1.1.12" @@ -6513,7 +6513,7 @@ "@lerna/npm-dist-tag@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/npm-dist-tag/-/npm-dist-tag-6.4.1.tgz#f14e7176f7e323284e8aa8636b44818a61738fd1" + resolved "https://registry.npmjs.org/@lerna/npm-dist-tag/-/npm-dist-tag-6.4.1.tgz#f14e7176f7e323284e8aa8636b44818a61738fd1" integrity sha512-If1Hn4q9fn0JWuBm455iIZDWE6Fsn4Nv8Tpqb+dYf0CtoT5Hn+iT64xSiU5XJw9Vc23IR7dIujkEXm2MVbnvZw== dependencies: "@lerna/otplease" "6.4.1" @@ -6523,7 +6523,7 @@ "@lerna/npm-install@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/npm-install/-/npm-install-6.4.1.tgz#99f5748cb43de9786ea2b538c94a7183d38fc476" + resolved "https://registry.npmjs.org/@lerna/npm-install/-/npm-install-6.4.1.tgz#99f5748cb43de9786ea2b538c94a7183d38fc476" integrity sha512-7gI1txMA9qTaT3iiuk/8/vL78wIhtbbOLhMf8m5yQ2G+3t47RUA8MNgUMsq4Zszw9C83drayqesyTf0u8BzVRg== dependencies: "@lerna/child-process" "6.4.1" @@ -6536,7 +6536,7 @@ "@lerna/npm-publish@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/npm-publish/-/npm-publish-6.4.1.tgz#baf07b108ae8b32932612db63206bcd5b5ee0e88" + resolved "https://registry.npmjs.org/@lerna/npm-publish/-/npm-publish-6.4.1.tgz#baf07b108ae8b32932612db63206bcd5b5ee0e88" integrity sha512-lbNEg+pThPAD8lIgNArm63agtIuCBCF3umxvgTQeLzyqUX6EtGaKJFyz/6c2ANcAuf8UfU7WQxFFbOiolibXTQ== dependencies: "@lerna/otplease" "6.4.1" @@ -6550,7 +6550,7 @@ "@lerna/npm-run-script@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/npm-run-script/-/npm-run-script-6.4.1.tgz#86db4f15d359b8a371db666aa51c9b2b87b602f3" + resolved "https://registry.npmjs.org/@lerna/npm-run-script/-/npm-run-script-6.4.1.tgz#86db4f15d359b8a371db666aa51c9b2b87b602f3" integrity sha512-HyvwuyhrGqDa1UbI+pPbI6v+wT6I34R0PW3WCADn6l59+AyqLOCUQQr+dMW7jdYNwjO6c/Ttbvj4W58EWsaGtQ== dependencies: "@lerna/child-process" "6.4.1" @@ -6559,21 +6559,21 @@ "@lerna/otplease@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/otplease/-/otplease-6.4.1.tgz#9573e053c43e7139442da96fe655aa02749cb8a3" + resolved "https://registry.npmjs.org/@lerna/otplease/-/otplease-6.4.1.tgz#9573e053c43e7139442da96fe655aa02749cb8a3" integrity sha512-ePUciFfFdythHNMp8FP5K15R/CoGzSLVniJdD50qm76c4ATXZHnGCW2PGwoeAZCy4QTzhlhdBq78uN0wAs75GA== dependencies: "@lerna/prompt" "6.4.1" "@lerna/output@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/output/-/output-6.4.1.tgz#327baf768b8fb63db9d52f68288d387379f814f7" + resolved "https://registry.npmjs.org/@lerna/output/-/output-6.4.1.tgz#327baf768b8fb63db9d52f68288d387379f814f7" integrity sha512-A1yRLF0bO+lhbIkrryRd6hGSD0wnyS1rTPOWJhScO/Zyv8vIPWhd2fZCLR1gI2d/Kt05qmK3T/zETTwloK7Fww== dependencies: npmlog "^6.0.2" "@lerna/pack-directory@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/pack-directory/-/pack-directory-6.4.1.tgz#e78aae4e7944057d8fc6cb4dd8ae50be7a95c2fd" + resolved "https://registry.npmjs.org/@lerna/pack-directory/-/pack-directory-6.4.1.tgz#e78aae4e7944057d8fc6cb4dd8ae50be7a95c2fd" integrity sha512-kBtDL9bPP72/Nl7Gqa2CA3Odb8CYY1EF2jt801f+B37TqRLf57UXQom7yF3PbWPCPmhoU+8Fc4RMpUwSbFC46Q== dependencies: "@lerna/get-packed" "6.4.1" @@ -6586,7 +6586,7 @@ "@lerna/package-graph@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/package-graph/-/package-graph-6.4.1.tgz#7a18024d531f0bd88609944e572b4861f0f8868f" + resolved "https://registry.npmjs.org/@lerna/package-graph/-/package-graph-6.4.1.tgz#7a18024d531f0bd88609944e572b4861f0f8868f" integrity sha512-fQvc59stRYOqxT3Mn7g/yI9/Kw5XetJoKcW5l8XeqKqcTNDURqKnN0qaNBY6lTTLOe4cR7gfXF2l1u3HOz0qEg== dependencies: "@lerna/prerelease-id-from-version" "6.4.1" @@ -6597,7 +6597,7 @@ "@lerna/package@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/package/-/package-6.4.1.tgz#ebbd4c5f58f4b6cf77019271a686be9585272a3b" + resolved "https://registry.npmjs.org/@lerna/package/-/package-6.4.1.tgz#ebbd4c5f58f4b6cf77019271a686be9585272a3b" integrity sha512-TrOah58RnwS9R8d3+WgFFTu5lqgZs7M+e1dvcRga7oSJeKscqpEK57G0xspvF3ycjfXQwRMmEtwPmpkeEVLMzA== dependencies: load-json-file "^6.2.0" @@ -6606,14 +6606,14 @@ "@lerna/prerelease-id-from-version@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/prerelease-id-from-version/-/prerelease-id-from-version-6.4.1.tgz#65eb1835cdfd112783eea6b596812c64f535386b" + resolved "https://registry.npmjs.org/@lerna/prerelease-id-from-version/-/prerelease-id-from-version-6.4.1.tgz#65eb1835cdfd112783eea6b596812c64f535386b" integrity sha512-uGicdMFrmfHXeC0FTosnUKRgUjrBJdZwrmw7ZWMb5DAJGOuTzrvJIcz5f0/eL3XqypC/7g+9DoTgKjX3hlxPZA== dependencies: semver "^7.3.4" "@lerna/profiler@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/profiler/-/profiler-6.4.1.tgz#0d5e017e1389e35960d671f43db7eb16337fda1b" + resolved "https://registry.npmjs.org/@lerna/profiler/-/profiler-6.4.1.tgz#0d5e017e1389e35960d671f43db7eb16337fda1b" integrity sha512-dq2uQxcu0aq6eSoN+JwnvHoAnjtZAVngMvywz5bTAfzz/sSvIad1v8RCpJUMBQHxaPtbfiNvOIQgDZOmCBIM4g== dependencies: fs-extra "^9.1.0" @@ -6622,7 +6622,7 @@ "@lerna/project@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/project/-/project-6.4.1.tgz#0519323aa8bde5b73fc0bf1c428385a556a445f0" + resolved "https://registry.npmjs.org/@lerna/project/-/project-6.4.1.tgz#0519323aa8bde5b73fc0bf1c428385a556a445f0" integrity sha512-BPFYr4A0mNZ2jZymlcwwh7PfIC+I6r52xgGtJ4KIrIOB6mVKo9u30dgYJbUQxmSuMRTOnX7PJZttQQzSda4gEg== dependencies: "@lerna/package" "6.4.1" @@ -6641,7 +6641,7 @@ "@lerna/prompt@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/prompt/-/prompt-6.4.1.tgz#5ede06b4c8e17ec3045180b10ec5bd313cbc8585" + resolved "https://registry.npmjs.org/@lerna/prompt/-/prompt-6.4.1.tgz#5ede06b4c8e17ec3045180b10ec5bd313cbc8585" integrity sha512-vMxCIgF9Vpe80PnargBGAdS/Ib58iYEcfkcXwo7mYBCxEVcaUJFKZ72FEW8rw+H5LkxBlzrBJyfKRoOe0ks9gQ== dependencies: inquirer "^8.2.4" @@ -6649,7 +6649,7 @@ "@lerna/publish@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/publish/-/publish-6.4.1.tgz#e1bdfa67297ca4a3054863e7acfc8482bf613c35" + resolved "https://registry.npmjs.org/@lerna/publish/-/publish-6.4.1.tgz#e1bdfa67297ca4a3054863e7acfc8482bf613c35" integrity sha512-/D/AECpw2VNMa1Nh4g29ddYKRIqygEV1ftV8PYXVlHpqWN7VaKrcbRU6pn0ldgpFlMyPtESfv1zS32F5CQ944w== dependencies: "@lerna/check-working-tree" "6.4.1" @@ -6683,21 +6683,21 @@ "@lerna/pulse-till-done@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/pulse-till-done/-/pulse-till-done-6.4.1.tgz#85c38a43939bf5e21b61091d0bcf73a1109a59db" + resolved "https://registry.npmjs.org/@lerna/pulse-till-done/-/pulse-till-done-6.4.1.tgz#85c38a43939bf5e21b61091d0bcf73a1109a59db" integrity sha512-efAkOC1UuiyqYBfrmhDBL6ufYtnpSqAG+lT4d/yk3CzJEJKkoCwh2Hb692kqHHQ5F74Uusc8tcRB7GBcfNZRWA== dependencies: npmlog "^6.0.2" "@lerna/query-graph@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/query-graph/-/query-graph-6.4.1.tgz#3c224a49ff392d08ce8aeeaa1af4458f522a2b78" + resolved "https://registry.npmjs.org/@lerna/query-graph/-/query-graph-6.4.1.tgz#3c224a49ff392d08ce8aeeaa1af4458f522a2b78" integrity sha512-gBGZLgu2x6L4d4ZYDn4+d5rxT9RNBC+biOxi0QrbaIq83I+JpHVmFSmExXK3rcTritrQ3JT9NCqb+Yu9tL9adQ== dependencies: "@lerna/package-graph" "6.4.1" "@lerna/resolve-symlink@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/resolve-symlink/-/resolve-symlink-6.4.1.tgz#ab42dcbd03bc4028ec77ee481c5db8884ebaf40a" + resolved "https://registry.npmjs.org/@lerna/resolve-symlink/-/resolve-symlink-6.4.1.tgz#ab42dcbd03bc4028ec77ee481c5db8884ebaf40a" integrity sha512-gnqltcwhWVLUxCuwXWe/ch9WWTxXRI7F0ZvCtIgdfOpbosm3f1g27VO1LjXeJN2i6ks03qqMowqy4xB4uMR9IA== dependencies: fs-extra "^9.1.0" @@ -6706,7 +6706,7 @@ "@lerna/rimraf-dir@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/rimraf-dir/-/rimraf-dir-6.4.1.tgz#116e379f653135b3ae955dcba703bdf212cab51a" + resolved "https://registry.npmjs.org/@lerna/rimraf-dir/-/rimraf-dir-6.4.1.tgz#116e379f653135b3ae955dcba703bdf212cab51a" integrity sha512-5sDOmZmVj0iXIiEgdhCm0Prjg5q2SQQKtMd7ImimPtWKkV0IyJWxrepJFbeQoFj5xBQF7QB5jlVNEfQfKhD6pQ== dependencies: "@lerna/child-process" "6.4.1" @@ -6716,7 +6716,7 @@ "@lerna/run-lifecycle@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/run-lifecycle/-/run-lifecycle-6.4.1.tgz#1eac136afae97e197bdb564e67fb385f4d346685" + resolved "https://registry.npmjs.org/@lerna/run-lifecycle/-/run-lifecycle-6.4.1.tgz#1eac136afae97e197bdb564e67fb385f4d346685" integrity sha512-42VopI8NC8uVCZ3YPwbTycGVBSgukJltW5Saein0m7TIqFjwSfrcP0n7QJOr+WAu9uQkk+2kBstF5WmvKiqgEA== dependencies: "@lerna/npm-conf" "6.4.1" @@ -6726,7 +6726,7 @@ "@lerna/run-topologically@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/run-topologically/-/run-topologically-6.4.1.tgz#640b07d83f1d1e6d3bc36f81a74957839bb1672f" + resolved "https://registry.npmjs.org/@lerna/run-topologically/-/run-topologically-6.4.1.tgz#640b07d83f1d1e6d3bc36f81a74957839bb1672f" integrity sha512-gXlnAsYrjs6KIUGDnHM8M8nt30Amxq3r0lSCNAt+vEu2sMMEOh9lffGGaJobJZ4bdwoXnKay3uER/TU8E9owMw== dependencies: "@lerna/query-graph" "6.4.1" @@ -6734,7 +6734,7 @@ "@lerna/run@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/run/-/run-6.4.1.tgz#985279f071ff23ae15f92837f85f979a1352fc01" + resolved "https://registry.npmjs.org/@lerna/run/-/run-6.4.1.tgz#985279f071ff23ae15f92837f85f979a1352fc01" integrity sha512-HRw7kS6KNqTxqntFiFXPEeBEct08NjnL6xKbbOV6pXXf+lXUQbJlF8S7t6UYqeWgTZ4iU9caIxtZIY+EpW93mQ== dependencies: "@lerna/command" "6.4.1" @@ -6751,7 +6751,7 @@ "@lerna/symlink-binary@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/symlink-binary/-/symlink-binary-6.4.1.tgz#d8e1b653a7ae9fe38834851c66c92278e3bb25ae" + resolved "https://registry.npmjs.org/@lerna/symlink-binary/-/symlink-binary-6.4.1.tgz#d8e1b653a7ae9fe38834851c66c92278e3bb25ae" integrity sha512-poZX90VmXRjL/JTvxaUQPeMDxFUIQvhBkHnH+dwW0RjsHB/2Tu4QUAsE0OlFnlWQGsAtXF4FTtW8Xs57E/19Kw== dependencies: "@lerna/create-symlink" "6.4.1" @@ -6761,7 +6761,7 @@ "@lerna/symlink-dependencies@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/symlink-dependencies/-/symlink-dependencies-6.4.1.tgz#988203cc260406b64d61294367821a0f26419ee6" + resolved "https://registry.npmjs.org/@lerna/symlink-dependencies/-/symlink-dependencies-6.4.1.tgz#988203cc260406b64d61294367821a0f26419ee6" integrity sha512-43W2uLlpn3TTYuHVeO/2A6uiTZg6TOk/OSKi21ujD7IfVIYcRYCwCV+8LPP12R3rzyab0JWkWnhp80Z8A2Uykw== dependencies: "@lerna/create-symlink" "6.4.1" @@ -6773,7 +6773,7 @@ "@lerna/temp-write@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/temp-write/-/temp-write-6.4.1.tgz#1c46d05b633597c77b0c5f5ab46c1315195f7786" + resolved "https://registry.npmjs.org/@lerna/temp-write/-/temp-write-6.4.1.tgz#1c46d05b633597c77b0c5f5ab46c1315195f7786" integrity sha512-7uiGFVoTyos5xXbVQg4bG18qVEn9dFmboXCcHbMj5mc/+/QmU9QeNz/Cq36O5TY6gBbLnyj3lfL5PhzERWKMFg== dependencies: graceful-fs "^4.1.15" @@ -6784,19 +6784,19 @@ "@lerna/timer@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/timer/-/timer-6.4.1.tgz#47fe50b56bd2fc32396a2559f7bb65de8200f07d" + resolved "https://registry.npmjs.org/@lerna/timer/-/timer-6.4.1.tgz#47fe50b56bd2fc32396a2559f7bb65de8200f07d" integrity sha512-ogmjFTWwRvevZr76a2sAbhmu3Ut2x73nDIn0bcwZwZ3Qc3pHD8eITdjs/wIKkHse3J7l3TO5BFJPnrvDS7HLnw== "@lerna/validation-error@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/validation-error/-/validation-error-6.4.1.tgz#2cab92c2be395158c3d65fa57ddb73892617d7e8" + resolved "https://registry.npmjs.org/@lerna/validation-error/-/validation-error-6.4.1.tgz#2cab92c2be395158c3d65fa57ddb73892617d7e8" integrity sha512-fxfJvl3VgFd7eBfVMRX6Yal9omDLs2mcGKkNYeCEyt4Uwlz1B5tPAXyk/sNMfkKV2Aat/mlK5tnY13vUrMKkyA== dependencies: npmlog "^6.0.2" "@lerna/version@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/version/-/version-6.4.1.tgz#01011364df04240ce92dffed1d2fa76bb9f959ff" + resolved "https://registry.npmjs.org/@lerna/version/-/version-6.4.1.tgz#01011364df04240ce92dffed1d2fa76bb9f959ff" integrity sha512-1/krPq0PtEqDXtaaZsVuKev9pXJCkNC1vOo2qCcn6PBkODw/QTAvGcUi0I+BM2c//pdxge9/gfmbDo1lC8RtAQ== dependencies: "@lerna/check-working-tree" "6.4.1" @@ -6829,7 +6829,7 @@ "@lerna/write-log-file@6.4.1": version "6.4.1" - resolved "https://registry.yarnpkg.com/@lerna/write-log-file/-/write-log-file-6.4.1.tgz#b9b959e4b853cdabf0309bc5da1513fa025117ec" + resolved "https://registry.npmjs.org/@lerna/write-log-file/-/write-log-file-6.4.1.tgz#b9b959e4b853cdabf0309bc5da1513fa025117ec" integrity sha512-LE4fueQSDrQo76F4/gFXL0wnGhqdG7WHVH8D8TrKouF2Afl4NHltObCm4WsSMPjcfciVnZQFfx1ruxU4r/enHQ== dependencies: npmlog "^6.0.2" @@ -6849,7 +6849,7 @@ "@microsoft/api-extractor-model@7.25.2": version "7.25.2" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.25.2.tgz#a3e69e952122bbe3f0fc339a8ce0d9d20dd06406" + resolved "https://registry.npmjs.org/@microsoft/api-extractor-model/-/api-extractor-model-7.25.2.tgz#a3e69e952122bbe3f0fc339a8ce0d9d20dd06406" integrity sha512-+h1uCrLQXFAKMUdghhdDcnniDB+6UA/lS9ArlB4QZQ34UbLuXNy2oQ6fafFK8cKXU4mUPTF/yGRjv7JKD5L7eg== dependencies: "@microsoft/tsdoc" "0.14.2" @@ -6858,7 +6858,7 @@ "@microsoft/api-extractor@^7.33.5": version "7.33.6" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.33.6.tgz#37899ac455257d70d317f06e2356dff5af9f0fcb" + resolved "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.33.6.tgz#37899ac455257d70d317f06e2356dff5af9f0fcb" integrity sha512-EYu1qWiMyvP/P+7na76PbE7+eOtvuYIvQa2DhZqkSQSLYP2sKLmZaSMK5Jvpgdr0fK/xLFujK5vLf3vpfcmC8g== dependencies: "@microsoft/api-extractor-model" "7.25.2" @@ -6876,7 +6876,7 @@ "@microsoft/tsdoc-config@~0.16.1": version "0.16.2" - resolved "https://registry.yarnpkg.com/@microsoft/tsdoc-config/-/tsdoc-config-0.16.2.tgz#b786bb4ead00d54f53839a458ce626c8548d3adf" + resolved "https://registry.npmjs.org/@microsoft/tsdoc-config/-/tsdoc-config-0.16.2.tgz#b786bb4ead00d54f53839a458ce626c8548d3adf" integrity sha512-OGiIzzoBLgWWR0UdRJX98oYO+XKGf7tiK4Zk6tQ/E4IJqGCe7dvkTvgDZV5cFJUzLGDOjeAXrnZoA6QkVySuxw== dependencies: "@microsoft/tsdoc" "0.14.2" @@ -6886,7 +6886,7 @@ "@microsoft/tsdoc@0.14.2": version "0.14.2" - resolved "https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.14.2.tgz#c3ec604a0b54b9a9b87e9735dfc59e1a5da6a5fb" + resolved "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.14.2.tgz#c3ec604a0b54b9a9b87e9735dfc59e1a5da6a5fb" integrity sha512-9b8mPpKrfeGRuhFH5iO1iwCLeIIsV6+H1sRfxbkoGXIyQE2BTsPd9zqSqQJ+pv5sJ/hT5M1zvOFL02MnEezFug== "@n1ru4l/graphql-live-query@^0.9.0": @@ -7061,14 +7061,14 @@ "@nrwl/cli@15.6.3": version "15.6.3" - resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-15.6.3.tgz#999531d6efb30afc39373bdcbd7e78254a3a3fd3" + resolved "https://registry.npmjs.org/@nrwl/cli/-/cli-15.6.3.tgz#999531d6efb30afc39373bdcbd7e78254a3a3fd3" integrity sha512-K4E0spofThZXMnhA6R8hkUTdfqmwSnUE2+DlD5Y3jqsvKTAgwF5U41IFkEouFZCf+dWjy0RA20bWoX48EVFtmQ== dependencies: nx "15.6.3" "@nrwl/devkit@>=15.4.2 < 16": version "15.6.3" - resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-15.6.3.tgz#e4e96c53ba3304786a49034286c8511534b2b194" + resolved "https://registry.npmjs.org/@nrwl/devkit/-/devkit-15.6.3.tgz#e4e96c53ba3304786a49034286c8511534b2b194" integrity sha512-/JDvdzNxUM+C1PCZPCrvmFx+OfywqZdOq1GS9QR8C0VctTLG4D/SGSFD88O1SAdcbH/f1mMiBGfEYZYd23fghQ== dependencies: "@phenomnomnominal/tsquery" "4.1.1" @@ -7079,7 +7079,7 @@ "@nrwl/tao@15.6.3": version "15.6.3" - resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-15.6.3.tgz#b24e11345375dea96bc386c60b9b1102a7584932" + resolved "https://registry.npmjs.org/@nrwl/tao/-/tao-15.6.3.tgz#b24e11345375dea96bc386c60b9b1102a7584932" integrity sha512-bDZbPIbU5Mf2BvX0q8GjPxrm1WkYyfW+gp7mLuuJth2sEpZiCr47mSwuGko/y4CKXvIX46VQcAS0pKQMKugXsg== dependencies: nx "15.6.3" @@ -7308,14 +7308,14 @@ "@phenomnomnominal/tsquery@4.1.1": version "4.1.1" - resolved "https://registry.yarnpkg.com/@phenomnomnominal/tsquery/-/tsquery-4.1.1.tgz#42971b83590e9d853d024ddb04a18085a36518df" + resolved "https://registry.npmjs.org/@phenomnomnominal/tsquery/-/tsquery-4.1.1.tgz#42971b83590e9d853d024ddb04a18085a36518df" integrity sha512-jjMmK1tnZbm1Jq5a7fBliM4gQwjxMU7TFoRNwIyzwlO+eHPRCFv/Nv+H/Gi1jc3WR7QURG8D5d0Tn12YGrUqBQ== dependencies: esquery "^1.0.1" "@pmmmwh/react-refresh-webpack-plugin@^0.5.3": version "0.5.9" - resolved "https://registry.yarnpkg.com/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.9.tgz#35aae6624a6270ca7ad755800b7eec417fa6f830" + resolved "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.9.tgz#35aae6624a6270ca7ad755800b7eec417fa6f830" integrity sha512-7QV4cqUwhkDIHpMAZ9mestSJ2DMIotVTbOUwbiudhjCRTAWWKIaBecELiEM2LT3AHFeOAaHIcFu4dbXjX+9GBA== dependencies: ansi-html-community "^0.0.8" @@ -7330,14 +7330,14 @@ "@pnpm/network.ca-file@^1.0.1": version "1.0.1" - resolved "https://registry.yarnpkg.com/@pnpm/network.ca-file/-/network.ca-file-1.0.1.tgz#16f88d057c68cd5419c1ef3dfa281296ea80b047" + resolved "https://registry.npmjs.org/@pnpm/network.ca-file/-/network.ca-file-1.0.1.tgz#16f88d057c68cd5419c1ef3dfa281296ea80b047" integrity sha512-gkINruT2KUhZLTaiHxwCOh1O4NVnFT0wLjWFBHmTz9vpKag/C/noIMJXBxFe4F0mYpUVX2puLwAieLYFg2NvoA== dependencies: graceful-fs "4.2.10" "@pnpm/npm-conf@^1.0.4": version "1.0.5" - resolved "https://registry.yarnpkg.com/@pnpm/npm-conf/-/npm-conf-1.0.5.tgz#3475541fb71d7b6ce68acaaa3392eae9fedf3276" + resolved "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-1.0.5.tgz#3475541fb71d7b6ce68acaaa3392eae9fedf3276" integrity sha512-hD8ml183638O3R6/Txrh0L8VzGOrFXgRtRDG4qQC4tONdZ5Z1M+tlUUDUvrjYdmK6G+JTBTeaCLMna11cXzi8A== dependencies: "@pnpm/network.ca-file" "^1.0.1" @@ -7400,7 +7400,7 @@ "@rushstack/node-core-library@3.53.2": version "3.53.2" - resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.53.2.tgz#f442e121f9e6c8bef9a23b7337e6399ab5c0c579" + resolved "https://registry.npmjs.org/@rushstack/node-core-library/-/node-core-library-3.53.2.tgz#f442e121f9e6c8bef9a23b7337e6399ab5c0c579" integrity sha512-FggLe5DQs0X9MNFeJN3/EXwb+8hyZUTEp2i+V1e8r4Va4JgkjBNY0BuEaQI+3DW6S4apV3UtXU3im17MSY00DA== dependencies: "@types/node" "12.20.24" @@ -7414,7 +7414,7 @@ "@rushstack/rig-package@0.3.17": version "0.3.17" - resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.3.17.tgz#687bd55603f2902447f3be246d93afac97095a1f" + resolved "https://registry.npmjs.org/@rushstack/rig-package/-/rig-package-0.3.17.tgz#687bd55603f2902447f3be246d93afac97095a1f" integrity sha512-nxvAGeIMnHl1LlZSQmacgcRV4y1EYtgcDIrw6KkeVjudOMonlxO482PhDj3LVZEp6L7emSf6YSO2s5JkHlwfZA== dependencies: resolve "~1.17.0" @@ -7422,7 +7422,7 @@ "@rushstack/ts-command-line@4.13.1": version "4.13.1" - resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.13.1.tgz#148b644b627131480363b4853b558ba5eaa0d75c" + resolved "https://registry.npmjs.org/@rushstack/ts-command-line/-/ts-command-line-4.13.1.tgz#148b644b627131480363b4853b558ba5eaa0d75c" integrity sha512-UTQMRyy/jH1IS2U+6pyzyn9xQ2iMcoUKkTcZUzOP/aaMiKlWLwCTDiBVwhw/M1crDx6apF9CwyjuWO9r1SBdJQ== dependencies: "@types/argparse" "1.0.38" @@ -7448,7 +7448,7 @@ "@sindresorhus/is@^4.0.0": version "4.6.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f" + resolved "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f" integrity sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw== "@sinonjs/commons@^1", "@sinonjs/commons@^1.3.0", "@sinonjs/commons@^1.4.0", "@sinonjs/commons@^1.6.0", "@sinonjs/commons@^1.7.0", "@sinonjs/commons@^1.8.3": @@ -7474,7 +7474,7 @@ "@sinonjs/fake-timers@^8.0.1": version "8.1.0" - resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz#3fdc2b6cb58935b21bfb8d1625eb1300484316e7" + resolved "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz#3fdc2b6cb58935b21bfb8d1625eb1300484316e7" integrity sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg== dependencies: "@sinonjs/commons" "^1.7.0" @@ -7625,7 +7625,7 @@ "@szmarczak/http-timer@^4.0.5": version "4.0.6" - resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.6.tgz#b4a914bb62e7c272d4e5989fe4440f812ab1d807" + resolved "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz#b4a914bb62e7c272d4e5989fe4440f812ab1d807" integrity sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w== dependencies: defer-to-connect "^2.0.0" @@ -7725,7 +7725,7 @@ "@types/argparse@1.0.38": version "1.0.38" - resolved "https://registry.yarnpkg.com/@types/argparse/-/argparse-1.0.38.tgz#a81fd8606d481f873a3800c6ebae4f1d768a56a9" + resolved "https://registry.npmjs.org/@types/argparse/-/argparse-1.0.38.tgz#a81fd8606d481f873a3800c6ebae4f1d768a56a9" integrity sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA== "@types/aria-query@^4.2.0": @@ -7818,7 +7818,7 @@ "@types/cacheable-request@^6.0.1": version "6.0.3" - resolved "https://registry.yarnpkg.com/@types/cacheable-request/-/cacheable-request-6.0.3.tgz#a430b3260466ca7b5ca5bfd735693b36e7a9d183" + resolved "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz#a430b3260466ca7b5ca5bfd735693b36e7a9d183" integrity sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw== dependencies: "@types/http-cache-semantics" "*" @@ -7878,7 +7878,7 @@ "@types/ejs@^3.1.1": version "3.1.1" - resolved "https://registry.yarnpkg.com/@types/ejs/-/ejs-3.1.1.tgz#29c539826376a65e7f7d672d51301f37ed718f6d" + resolved "https://registry.npmjs.org/@types/ejs/-/ejs-3.1.1.tgz#29c539826376a65e7f7d672d51301f37ed718f6d" integrity sha512-RQul5wEfY7BjWm0sYY86cmUN/pcXWGyVxWX93DFFJvcrxax5zKlieLwA3T77xJGwNcZW0YW6CYG70p1m8xPFmA== "@types/eslint-scope@^3.7.3": @@ -8003,7 +8003,7 @@ "@types/http-cache-semantics@*": version "4.0.1" - resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#0ea7b61496902b95890dc4c3a116b60cb8dae812" + resolved "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#0ea7b61496902b95890dc4c3a116b60cb8dae812" integrity sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ== "@types/http-proxy@^1.17.8": @@ -8063,7 +8063,7 @@ "@types/jest@^27.0.0": version "27.5.2" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-27.5.2.tgz#ec49d29d926500ffb9fd22b84262e862049c026c" + resolved "https://registry.npmjs.org/@types/jest/-/jest-27.5.2.tgz#ec49d29d926500ffb9fd22b84262e862049c026c" integrity sha512-mpT8LJJ4CMeeahobofYWIjFo0xonRS/HfxnVEPMPFSQdGUt1uHCnoPT7Zhb+sjDU2wz0oKV0OLUR0WzrHNgfeA== dependencies: jest-matcher-utils "^27.0.0" @@ -8081,7 +8081,7 @@ "@types/json-schema@^7.0.11", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.8": version "7.0.11" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" + resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== "@types/json5@^0.0.29": @@ -8091,7 +8091,7 @@ "@types/keyv@^3.1.4": version "3.1.4" - resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.4.tgz#3ccdb1c6751b0c7e52300bcdacd5bcbf8faa75b6" + resolved "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz#3ccdb1c6751b0c7e52300bcdacd5bcbf8faa75b6" integrity sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg== dependencies: "@types/node" "*" @@ -8150,7 +8150,7 @@ "@types/node@12.20.24": version "12.20.24" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.24.tgz#c37ac69cb2948afb4cef95f424fa0037971a9a5c" + resolved "https://registry.npmjs.org/@types/node/-/node-12.20.24.tgz#c37ac69cb2948afb4cef95f424fa0037971a9a5c" integrity sha512-yxDeaQIAJlMav7fH5AQqPH1u8YIuhYJXYBzxaQ4PifsU0GDO38MSdmEDeRlIxrKbC6NbEaaEHDanWb+y30U8SQ== "@types/node@>=12": @@ -8202,7 +8202,7 @@ "@types/prettier@^2.1.5": version "2.7.2" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.2.tgz#6c2324641cc4ba050a8c710b2b251b377581fbf0" + resolved "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.2.tgz#6c2324641cc4ba050a8c710b2b251b377581fbf0" integrity sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg== "@types/progress@^2.0.3": @@ -8262,7 +8262,7 @@ "@types/responselike@^1.0.0": version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.0.tgz#251f4fe7d154d2bad125abe1b429b23afd262e29" + resolved "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz#251f4fe7d154d2bad125abe1b429b23afd262e29" integrity sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA== dependencies: "@types/node" "*" @@ -8356,7 +8356,7 @@ "@types/tiny-async-pool@^2.0.0": version "2.0.0" - resolved "https://registry.yarnpkg.com/@types/tiny-async-pool/-/tiny-async-pool-2.0.0.tgz#744d898af12958aefb199ab91c762464ee2b1b8d" + resolved "https://registry.npmjs.org/@types/tiny-async-pool/-/tiny-async-pool-2.0.0.tgz#744d898af12958aefb199ab91c762464ee2b1b8d" integrity sha512-GB+FG7JF6SPX9yuGmfmDTRYFMdS2Za+YiYvh6RJPfTMa0LaTDEtQ6ncw6NYrHnf9cloVJxgXd6WGRdRp54O1cQ== "@types/treeify@^1.0.0": @@ -8384,7 +8384,7 @@ "@types/uuid@^8.3.1": version "8.3.4" - resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.4.tgz#bd86a43617df0594787d38b735f55c805becf1bc" + resolved "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz#bd86a43617df0594787d38b735f55c805becf1bc" integrity sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw== "@types/websocket@^1.0.4": @@ -8470,7 +8470,7 @@ "@typescript-eslint/eslint-plugin@^5.34.0": version "5.34.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.34.0.tgz#d690f60e335596f38b01792e8f4b361d9bd0cb35" + resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.34.0.tgz#d690f60e335596f38b01792e8f4b361d9bd0cb35" integrity sha512-eRfPPcasO39iwjlUAMtjeueRGuIrW3TQ9WseIDl7i5UWuFbf83yYaU7YPs4j8+4CxUMIsj1k+4kV+E+G+6ypDQ== dependencies: "@typescript-eslint/scope-manager" "5.34.0" @@ -8507,7 +8507,7 @@ "@typescript-eslint/parser@^5.34.0": version "5.34.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.34.0.tgz#ca710858ea85dbfd30c9b416a335dc49e82dbc07" + resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.34.0.tgz#ca710858ea85dbfd30c9b416a335dc49e82dbc07" integrity sha512-SZ3NEnK4usd2CXkoV3jPa/vo1mWX1fqRyIVUQZR4As1vyp4fneknBNJj+OFtV8WAVgGf+rOHMSqQbs2Qn3nFZQ== dependencies: "@typescript-eslint/scope-manager" "5.34.0" @@ -8543,7 +8543,7 @@ "@typescript-eslint/scope-manager@5.34.0": version "5.34.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.34.0.tgz#14efd13dc57602937e25f188fd911f118781e527" + resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.34.0.tgz#14efd13dc57602937e25f188fd911f118781e527" integrity sha512-HNvASMQlah5RsBW6L6c7IJ0vsm+8Sope/wu5sEAf7joJYWNb1LDbJipzmdhdUOnfrDFE6LR1j57x1EYVxrY4ow== dependencies: "@typescript-eslint/types" "5.34.0" @@ -8560,7 +8560,7 @@ "@typescript-eslint/type-utils@5.34.0": version "5.34.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.34.0.tgz#7a324ab9ddd102cd5e1beefc94eea6f3eb32d32d" + resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.34.0.tgz#7a324ab9ddd102cd5e1beefc94eea6f3eb32d32d" integrity sha512-Pxlno9bjsQ7hs1pdWRUv9aJijGYPYsHpwMeCQ/Inavhym3/XaKt1ZKAA8FIw4odTBfowBdZJDMxf2aavyMDkLg== dependencies: "@typescript-eslint/utils" "5.34.0" @@ -8579,7 +8579,7 @@ "@typescript-eslint/types@5.34.0": version "5.34.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.34.0.tgz#217bf08049e9e7b86694d982e88a2c1566330c78" + resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.34.0.tgz#217bf08049e9e7b86694d982e88a2c1566330c78" integrity sha512-49fm3xbbUPuzBIOcy2CDpYWqy/X7VBkxVN+DC21e0zIm3+61Z0NZi6J9mqPmSW1BDVk9FIOvuCFyUPjXz93sjA== "@typescript-eslint/typescript-estree@5.14.0": @@ -8610,7 +8610,7 @@ "@typescript-eslint/typescript-estree@5.34.0": version "5.34.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.34.0.tgz#ba7b83f4bf8ccbabf074bbf1baca7a58de3ccb9a" + resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.34.0.tgz#ba7b83f4bf8ccbabf074bbf1baca7a58de3ccb9a" integrity sha512-mXHAqapJJDVzxauEkfJI96j3D10sd567LlqroyCeJaHnu42sDbjxotGb3XFtGPYKPD9IyLjhsoULML1oI3M86A== dependencies: "@typescript-eslint/types" "5.34.0" @@ -8635,7 +8635,7 @@ "@typescript-eslint/utils@5.34.0": version "5.34.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.34.0.tgz#0cae98f48d8f9e292e5caa9343611b6faf49e743" + resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.34.0.tgz#0cae98f48d8f9e292e5caa9343611b6faf49e743" integrity sha512-kWRYybU4Rn++7lm9yu8pbuydRyQsHRoBDIo11k7eqBWTldN4xUdVUMCsHBiE7aoEkFzrUEaZy3iH477vr4xHAQ== dependencies: "@types/json-schema" "^7.0.9" @@ -8675,7 +8675,7 @@ "@typescript-eslint/visitor-keys@5.34.0": version "5.34.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.34.0.tgz#d0fb3e31033e82ddd5de048371ad39eb342b2d40" + resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.34.0.tgz#d0fb3e31033e82ddd5de048371ad39eb342b2d40" integrity sha512-O1moYjOSrab0a2fUvFpsJe0QHtvTC+cR+ovYpgKrAVXzqQyc74mv76TgY6z+aEtjQE2vgZux3CQVtGryqdcOAw== dependencies: "@typescript-eslint/types" "5.34.0" @@ -8833,12 +8833,12 @@ "@yarnpkg/lockfile@^1.1.0": version "1.1.0" - resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" + resolved "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== "@yarnpkg/parsers@^3.0.0-rc.18": version "3.0.0-rc.22" - resolved "https://registry.yarnpkg.com/@yarnpkg/parsers/-/parsers-3.0.0-rc.22.tgz#a78e10e1919ba706beb6a514ddcb09515607ada9" + resolved "https://registry.npmjs.org/@yarnpkg/parsers/-/parsers-3.0.0-rc.22.tgz#a78e10e1919ba706beb6a514ddcb09515607ada9" integrity sha512-GAWDjXduYBUVmOzlj3X0OwTQ1BV4ZeDdgw8yXST3K0lB95drWEGxa1at0v7BmHDyK2y1F1IJufc8N4yrcuXjWg== dependencies: js-yaml "^3.10.0" @@ -8854,7 +8854,7 @@ "@zkochan/js-yaml@0.0.6": version "0.0.6" - resolved "https://registry.yarnpkg.com/@zkochan/js-yaml/-/js-yaml-0.0.6.tgz#975f0b306e705e28b8068a07737fa46d3fc04826" + resolved "https://registry.npmjs.org/@zkochan/js-yaml/-/js-yaml-0.0.6.tgz#975f0b306e705e28b8068a07737fa46d3fc04826" integrity sha512-nzvgl3VfhcELQ8LyVrYOru+UtAy1nrygk2+AGbTm8a5YcO6o8lSjAT+pfg3vJWxIoZKOUhrK6UU7xW/+00kQrg== dependencies: argparse "^2.0.1" @@ -8949,7 +8949,7 @@ acorn@^7.0.0, acorn@^7.1.1, acorn@^7.4.0: acorn@^8.2.4, acorn@^8.4.1, acorn@^8.5.0, acorn@^8.7.0, acorn@^8.7.1: version "8.8.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" + resolved "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== add-stream@^1.0.0: @@ -8964,7 +8964,7 @@ address@^1.0.1: address@^1.1.2: version "1.2.1" - resolved "https://registry.yarnpkg.com/address/-/address-1.2.1.tgz#25bb61095b7522d65b357baa11bc05492d4c8acd" + resolved "https://registry.npmjs.org/address/-/address-1.2.1.tgz#25bb61095b7522d65b357baa11bc05492d4c8acd" integrity sha512-B+6bi5D34+fDYENiH5qOlA0cV2rAGKuWZ9LeyUUehbXy8e0VS9e498yO0Jeeh+iM+6KbfudHTFjXw2MmJD4QRA== adjust-sourcemap-loader@^4.0.0: @@ -9066,7 +9066,7 @@ amdefine@>=0.0.4: amplify-codegen@^3.4.0: version "3.4.0" - resolved "https://registry.yarnpkg.com/amplify-codegen/-/amplify-codegen-3.4.0.tgz#f2d1e813137996b31fc7a73dba39245fb46479fe" + resolved "https://registry.npmjs.org/amplify-codegen/-/amplify-codegen-3.4.0.tgz#f2d1e813137996b31fc7a73dba39245fb46479fe" integrity sha512-PQ4GX7c18OK5vaw5aahLO6H3QBTP+lvTG85CgO/SjbwjNeSzI8TL67Hat40q11ys4K+ZFnMB8S8sgyxmWFNdyg== dependencies: "@aws-amplify/appsync-modelgen-plugin" "2.4.0" @@ -9087,7 +9087,7 @@ amplify-codegen@^3.4.0: ansi-align@^3.0.0, ansi-align@^3.0.1: version "3.0.1" - resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-3.0.1.tgz#0cdf12e111ace773a86e9a1fad1225c43cb19a59" + resolved "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz#0cdf12e111ace773a86e9a1fad1225c43cb19a59" integrity sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w== dependencies: string-width "^4.1.0" @@ -9116,7 +9116,7 @@ ansi-escapes@^4.2.1, ansi-escapes@^4.3.1: ansi-html-community@^0.0.8: version "0.0.8" - resolved "https://registry.yarnpkg.com/ansi-html-community/-/ansi-html-community-0.0.8.tgz#69fbc4d6ccbe383f9736934ae34c3f8290f1bf41" + resolved "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz#69fbc4d6ccbe383f9736934ae34c3f8290f1bf41" integrity sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw== ansi-regex@^2.0.0: @@ -9165,7 +9165,7 @@ ansi-styles@^5.0.0: ansi-styles@^6.1.0: version "6.1.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.1.0.tgz#87313c102b8118abd57371afab34618bf7350ed3" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.0.tgz#87313c102b8118abd57371afab34618bf7350ed3" integrity sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ== anymatch@^2.0.0: @@ -9365,7 +9365,7 @@ arg@^5.0.1: argparse@^1.0.7, argparse@~1.0.9: version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== dependencies: sprintf-js "~1.0.2" @@ -9446,7 +9446,7 @@ array-includes@^3.1.3, array-includes@^3.1.4: array-timsort@^1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/array-timsort/-/array-timsort-1.0.3.tgz#3c9e4199e54fb2b9c3fe5976396a21614ef0d926" + resolved "https://registry.npmjs.org/array-timsort/-/array-timsort-1.0.3.tgz#3c9e4199e54fb2b9c3fe5976396a21614ef0d926" integrity sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ== array-union@^2.1.0: @@ -9548,7 +9548,7 @@ astral-regex@^2.0.0: async@1.x, async@^2.6.2, async@^2.6.4, async@^3.2.3: version "2.6.4" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221" + resolved "https://registry.npmjs.org/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221" integrity sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA== dependencies: lodash "^4.17.14" @@ -9627,7 +9627,7 @@ aws-appsync-auth-link@^2.0.7: aws-appsync-auth-link@^2.0.8: version "2.0.8" - resolved "https://registry.yarnpkg.com/aws-appsync-auth-link/-/aws-appsync-auth-link-2.0.8.tgz#f1e8491a08fa8a76bfc820e6a7f525733cae5e56" + resolved "https://registry.npmjs.org/aws-appsync-auth-link/-/aws-appsync-auth-link-2.0.8.tgz#f1e8491a08fa8a76bfc820e6a7f525733cae5e56" integrity sha512-jsHcJnqkqXIpmOyXGFQP8d8khiMRPs+cUGFPxFn1ZeCD6eBKSgHezbD9bDVhGS5EF2EUoZpuL4ANEn5Lq3f2RQ== dependencies: "@aws-crypto/sha256-js" "^1.2.0" @@ -9651,7 +9651,7 @@ aws-appsync-subscription-link@^2.2.6: aws-appsync-subscription-link@^2.4.0: version "2.4.0" - resolved "https://registry.yarnpkg.com/aws-appsync-subscription-link/-/aws-appsync-subscription-link-2.4.0.tgz#fe101fb728978f83434a7d22065bec709569654e" + resolved "https://registry.npmjs.org/aws-appsync-subscription-link/-/aws-appsync-subscription-link-2.4.0.tgz#fe101fb728978f83434a7d22065bec709569654e" integrity sha512-jo9WV+ogUDhpjMOQyqvm/kcJRXND0aB7dAG4mpxP2ifr4W2Xa7SXgFhuREMPpzd/jN1wgyfArVeev+aDEM1ecw== dependencies: apollo-link "1.2.5" @@ -9689,7 +9689,7 @@ aws-appsync@^4.1.1: aws-appsync@^4.1.4: version "4.1.7" - resolved "https://registry.yarnpkg.com/aws-appsync/-/aws-appsync-4.1.7.tgz#6186bd938e67d5621336f1b61a624ec0f671a650" + resolved "https://registry.npmjs.org/aws-appsync/-/aws-appsync-4.1.7.tgz#6186bd938e67d5621336f1b61a624ec0f671a650" integrity sha512-9OZ0IUx5zqgv/CfjS4xPVORIHkc6lug2VMlXhOIyHskmX8Z/nlpGabIq3Szp6pQVUHOCRgeZXoFtL5Dph9d8TQ== dependencies: "@aws-crypto/sha256-universal" "^1.1.1" @@ -9786,7 +9786,7 @@ axios@^0.26.0: axios@^1.0.0: version "1.3.2" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.3.2.tgz#7ac517f0fa3ec46e0e636223fd973713a09c72b3" + resolved "https://registry.npmjs.org/axios/-/axios-1.3.2.tgz#7ac517f0fa3ec46e0e636223fd973713a09c72b3" integrity sha512-1M3O703bYqYuPhbHeya5bnhpYVsDDRyQSabNja04mZtboLNSuZ4YrltestrLXfHgmzua4TpUqRiVKbiQuo2epw== dependencies: follow-redirects "^1.15.0" @@ -9840,7 +9840,7 @@ babel-jest@^26.6.3: babel-jest@^27.4.2, babel-jest@^27.5.1: version "27.5.1" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.5.1.tgz#a1bf8d61928edfefd21da27eb86a695bfd691444" + resolved "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz#a1bf8d61928edfefd21da27eb86a695bfd691444" integrity sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg== dependencies: "@jest/transform" "^27.5.1" @@ -9854,7 +9854,7 @@ babel-jest@^27.4.2, babel-jest@^27.5.1: babel-loader@^8.3.0: version "8.3.0" - resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.3.0.tgz#124936e841ba4fe8176786d6ff28add1f134d6a8" + resolved "https://registry.npmjs.org/babel-loader/-/babel-loader-8.3.0.tgz#124936e841ba4fe8176786d6ff28add1f134d6a8" integrity sha512-H8SvsMF+m9t15HNLMipppzkC+Y2Yq+v3SonZyU70RBL/h1gxPkH08Ot8pEE9Z4Kd+czyWJClmFS8qzIP9OZ04Q== dependencies: find-cache-dir "^3.3.1" @@ -10132,7 +10132,7 @@ big-integer@1.6.x: big.js@^5.2.2: version "5.2.2" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" + resolved "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== bin-links@^3.0.0: @@ -10247,7 +10247,7 @@ boxen@^5.0.0: boxen@^7.0.0: version "7.0.0" - resolved "https://registry.yarnpkg.com/boxen/-/boxen-7.0.0.tgz#9e5f8c26e716793fc96edcf7cf754cdf5e3fbf32" + resolved "https://registry.npmjs.org/boxen/-/boxen-7.0.0.tgz#9e5f8c26e716793fc96edcf7cf754cdf5e3fbf32" integrity sha512-j//dBVuyacJbvW+tvZ9HuH03fZ46QcaKvvhZickZqtB271DxJ7SNRSNxrV/dZX0085m7hISRZWbzWlJvx/rHSg== dependencies: ansi-align "^3.0.1" @@ -10483,7 +10483,7 @@ builtins@^5.0.0: busboy@^1.6.0: version "1.6.0" - resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893" + resolved "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893" integrity sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA== dependencies: streamsearch "^1.1.0" @@ -10549,12 +10549,12 @@ cache-base@^1.0.1: cacheable-lookup@^5.0.3: version "5.0.4" - resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz#5a6b865b2c44357be3d5ebc2a467b032719a7005" + resolved "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz#5a6b865b2c44357be3d5ebc2a467b032719a7005" integrity sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA== cacheable-request@^7.0.2: version "7.0.2" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-7.0.2.tgz#ea0d0b889364a25854757301ca12b2da77f91d27" + resolved "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz#ea0d0b889364a25854757301ca12b2da77f91d27" integrity sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew== dependencies: clone-response "^1.0.2" @@ -10644,7 +10644,7 @@ camelcase@^6.2.1: camelcase@^7.0.0: version "7.0.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-7.0.0.tgz#fd112621b212126741f998d614cbc2a8623fd174" + resolved "https://registry.npmjs.org/camelcase/-/camelcase-7.0.0.tgz#fd112621b212126741f998d614cbc2a8623fd174" integrity sha512-JToIvOmz6nhGsUhAYScbo2d6Py5wojjNfoxoc2mEVLUdJ70gJK2gnd+ABY1Tc3sVMyK7QDPtN0T/XdlCQWITyQ== caniuse-api@^3.0.0: @@ -10730,7 +10730,7 @@ chalk@^4, chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2: chalk@^5.0.1: version "5.0.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.0.1.tgz#ca57d71e82bb534a296df63bbacc4a1c22b2a4b6" + resolved "https://registry.npmjs.org/chalk/-/chalk-5.0.1.tgz#ca57d71e82bb534a296df63bbacc4a1c22b2a4b6" integrity sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w== change-case-all@1.0.14: @@ -10869,7 +10869,7 @@ cjs-module-lexer@^0.6.0: cjs-module-lexer@^1.0.0: version "1.2.2" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz#9f84ba3244a512f3a54e5277e8eef4c489864e40" + resolved "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz#9f84ba3244a512f3a54e5277e8eef4c489864e40" integrity sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA== class-utils@^0.3.5: @@ -10901,7 +10901,7 @@ cli-boxes@^2.2.0, cli-boxes@^2.2.1: cli-boxes@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-3.0.0.tgz#71a10c716feeba005e4504f36329ef0b17cf3145" + resolved "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz#71a10c716feeba005e4504f36329ef0b17cf3145" integrity sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g== cli-cursor@3.1.0, cli-cursor@^3.1.0: @@ -10940,7 +10940,7 @@ cli-table3@^0.6.0: cli-table@^0.3.11: version "0.3.11" - resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.11.tgz#ac69cdecbe81dccdba4889b9a18b7da312a9d3ee" + resolved "https://registry.npmjs.org/cli-table/-/cli-table-0.3.11.tgz#ac69cdecbe81dccdba4889b9a18b7da312a9d3ee" integrity sha512-IqLQi4lO0nIB4tcdTpN4LCB9FI3uqrJZK7RC515EnhZ6qBaglkIgICb1wjeAqpdoOabm1+SuQtkXIPdYC93jhQ== dependencies: colors "1.0.3" @@ -10975,7 +10975,7 @@ cliui@^7.0.2: cliui@^8.0.1: version "8.0.1" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + resolved "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== dependencies: string-width "^4.2.0" @@ -11148,7 +11148,7 @@ colorette@^2.0.10: colors@1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" + resolved "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" integrity sha512-pFGrxThWcWQ2MsAz6RtgeWe4NK2kUE1WfsrvvlctdII745EW9I0yflqhe7++M5LEc7bV2c/9/5zc8sFcpL0Drw== colors@1.4.0, colors@^1.1.2, colors@^1.2.1: @@ -11158,7 +11158,7 @@ colors@1.4.0, colors@^1.1.2, colors@^1.2.1: colors@~1.2.1: version "1.2.5" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.2.5.tgz#89c7ad9a374bc030df8013241f68136ed8835afc" + resolved "https://registry.npmjs.org/colors/-/colors-1.2.5.tgz#89c7ad9a374bc030df8013241f68136ed8835afc" integrity sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg== colorspace@1.1.x: @@ -11194,7 +11194,7 @@ combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: commander@^2.20.0, commander@^2.20.3: version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== commander@^3.0.2: @@ -11219,12 +11219,12 @@ commander@^8.3.0: commander@^9.4.0: version "9.4.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-9.4.0.tgz#bc4a40918fefe52e22450c111ecd6b7acce6f11c" + resolved "https://registry.npmjs.org/commander/-/commander-9.4.0.tgz#bc4a40918fefe52e22450c111ecd6b7acce6f11c" integrity sha512-sRPT+umqkz90UA8M1yqYfnHlZA7fF6nSphDtxeywPZ49ysjxDQybzk13CL+mXekDRG92skbcqCLVovuCusNmFw== comment-json@~4.2.0: version "4.2.3" - resolved "https://registry.yarnpkg.com/comment-json/-/comment-json-4.2.3.tgz#50b487ebbf43abe44431f575ebda07d30d015365" + resolved "https://registry.npmjs.org/comment-json/-/comment-json-4.2.3.tgz#50b487ebbf43abe44431f575ebda07d30d015365" integrity sha512-SsxdiOf064DWoZLH799Ata6u7iV658A11PlWtZATDlXPpKGJnbJZ5Z24ybixAi+LUUqJ/GKowAejtC5GFUG7Tw== dependencies: array-timsort "^1.0.3" @@ -11240,7 +11240,7 @@ common-ancestor-path@^1.0.1: common-path-prefix@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/common-path-prefix/-/common-path-prefix-3.0.0.tgz#7d007a7e07c58c4b4d5f433131a19141b29f11e0" + resolved "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz#7d007a7e07c58c4b4d5f433131a19141b29f11e0" integrity sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w== common-tags@1.8.0: @@ -11338,7 +11338,7 @@ configstore@^5.0.1: configstore@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/configstore/-/configstore-6.0.0.tgz#49eca2ebc80983f77e09394a1a56e0aca8235566" + resolved "https://registry.npmjs.org/configstore/-/configstore-6.0.0.tgz#49eca2ebc80983f77e09394a1a56e0aca8235566" integrity sha512-cD31W1v3GqUlQvbBCGcXmd2Nj9SvLDOP1oQ0YFuLETufzSPaKp11rYBsSOm7rCsW3OnIRAFM3OxRhceaXNYHkA== dependencies: dot-prop "^6.0.1" @@ -11373,7 +11373,7 @@ constant-case@^3.0.4: constructs@^10.0.5: version "10.1.138" - resolved "https://registry.yarnpkg.com/constructs/-/constructs-10.1.138.tgz#c304b2a3177487ad04b4481797e4044d79e479c0" + resolved "https://registry.npmjs.org/constructs/-/constructs-10.1.138.tgz#c304b2a3177487ad04b4481797e4044d79e479c0" integrity sha512-Bf0wkcGFphvAcm1ci+0yEJvPS9n+99bo3esiuRviAd9bYErOb39msZdfgULmoiRv0612x0xL2accTVESnFG0Vw== content-disposition@0.5.4: @@ -11561,7 +11561,7 @@ core-js-pure@^3.19.0: core-js-pure@^3.23.3: version "3.26.1" - resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.26.1.tgz#653f4d7130c427820dcecd3168b594e8bb095a33" + resolved "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.26.1.tgz#653f4d7130c427820dcecd3168b594e8bb095a33" integrity sha512-VVXcDpp/xJ21KdULRq/lXdLzQAtX7+37LzpyfFM973il0tWSsDEoyzG38G14AjTpK9VTfiNM9jnFauq/CpaWGQ== core-js@^2.4.0: @@ -11635,7 +11635,7 @@ cosmiconfig@^5.2.1: cosmiconfig@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-6.0.0.tgz#da4fee853c52f6b1e6935f41c1a2fc50bd4a9982" + resolved "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz#da4fee853c52f6b1e6935f41c1a2fc50bd4a9982" integrity sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg== dependencies: "@types/parse-json" "^4.0.0" @@ -11716,7 +11716,7 @@ cross-env@^7.0.3: cross-fetch@2.2.2, cross-fetch@^2.2.6, cross-fetch@^3.1.5: version "2.2.6" - resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-2.2.6.tgz#2ef0bb39a24ac034787965c457368a28730e220a" + resolved "https://registry.npmjs.org/cross-fetch/-/cross-fetch-2.2.6.tgz#2ef0bb39a24ac034787965c457368a28730e220a" integrity sha512-9JZz+vXCmfKUZ68zAptS7k4Nu8e2qcibe7WVZYps7sAgk5R8GYTc+T1WR0v1rlP9HxgARmOX1UTIJZFytajpNA== dependencies: node-fetch "^2.6.7" @@ -11787,7 +11787,7 @@ crypto-random-string@^2.0.0: crypto-random-string@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-4.0.0.tgz#5a3cc53d7dd86183df5da0312816ceeeb5bb1fc2" + resolved "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-4.0.0.tgz#5a3cc53d7dd86183df5da0312816ceeeb5bb1fc2" integrity sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA== dependencies: type-fest "^1.0.1" @@ -12117,19 +12117,19 @@ decimal.js@^10.2.1: decode-uri-component@^0.2.0: version "0.2.2" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" + resolved "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ== decompress-response@^4.2.0: version "4.2.1" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-4.2.1.tgz#414023cc7a302da25ce2ec82d0d5238ccafd8986" + resolved "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz#414023cc7a302da25ce2ec82d0d5238ccafd8986" integrity sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw== dependencies: mimic-response "^2.0.0" decompress-response@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" + resolved "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== dependencies: mimic-response "^3.1.0" @@ -12175,7 +12175,7 @@ defaults@^1.0.3: defer-to-connect@^2.0.0: version "2.0.1" - resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.1.tgz#8016bdb4143e4632b77a3449c6236277de520587" + resolved "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz#8016bdb4143e4632b77a3449c6236277de520587" integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg== define-lazy-prop@^2.0.0: @@ -12307,7 +12307,7 @@ detect-node@^2.0.4: detect-port-alt@^1.1.6: version "1.1.6" - resolved "https://registry.yarnpkg.com/detect-port-alt/-/detect-port-alt-1.1.6.tgz#24707deabe932d4a3cf621302027c2b266568275" + resolved "https://registry.npmjs.org/detect-port-alt/-/detect-port-alt-1.1.6.tgz#24707deabe932d4a3cf621302027c2b266568275" integrity sha512-5tQykt+LqfJFBEYaDITx7S7cR7mJ/zQmLXZ2qt5w04ainYZw6tBf9dBunMjVeVOdYVRUzUOE4HkY5J7+uttb5Q== dependencies: address "^1.0.1" @@ -12355,7 +12355,7 @@ diff-sequences@^27.4.0: diff-sequences@^27.5.1: version "27.5.1" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.5.1.tgz#eaecc0d327fd68c8d9672a1e64ab8dccb2ef5327" + resolved "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.5.1.tgz#eaecc0d327fd68c8d9672a1e64ab8dccb2ef5327" integrity sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ== diff@5.0.0, diff@^5.0.0: @@ -12375,7 +12375,7 @@ diff@^4.0.1: diff@^5.1.0: version "5.1.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-5.1.0.tgz#bc52d298c5ea8df9194800224445ed43ffc87e40" + resolved "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz#bc52d298c5ea8df9194800224445ed43ffc87e40" integrity sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw== diffie-hellman@^5.0.0: @@ -12406,7 +12406,7 @@ dns-equal@^1.0.0: dns-packet@^5.2.2: version "5.4.0" - resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-5.4.0.tgz#1f88477cf9f27e78a213fb6d118ae38e759a879b" + resolved "https://registry.npmjs.org/dns-packet/-/dns-packet-5.4.0.tgz#1f88477cf9f27e78a213fb6d118ae38e759a879b" integrity sha512-EgqGeaBB8hLiHLZtp/IbaDQTL8pZ0+IvwzSHA6d7VyMDM+B9hgddEMa9xjK5oYnw0ci0JQ6g2XCD7/f6cafU6g== dependencies: "@leichtgewicht/ip-codec" "^2.0.1" @@ -12534,7 +12534,7 @@ dotenv@^8.2.0: dset@^3.1.0: version "3.1.2" - resolved "https://registry.yarnpkg.com/dset/-/dset-3.1.2.tgz#89c436ca6450398396dc6538ea00abc0c54cd45a" + resolved "https://registry.npmjs.org/dset/-/dset-3.1.2.tgz#89c436ca6450398396dc6538ea00abc0c54cd45a" integrity sha512-g/M9sqy3oHe477Ar4voQxWtaPIFw1jTdKZuomOjhCcBx9nHUNn0pu6NopuFFrTh/TRZIKEj+76vLWFu9BNKk+Q== duplexer@^0.1.1, duplexer@^0.1.2: @@ -12554,7 +12554,7 @@ duplexify@^3.5.0, duplexify@^3.6.0: eastasianwidth@^0.2.0: version "0.2.0" - resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" + resolved "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== ecc-jsbn@~0.1.1: @@ -12609,7 +12609,7 @@ emittery@^0.7.1: emittery@^0.8.1: version "0.8.1" - resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.8.1.tgz#bb23cc86d03b30aa75a7f734819dee2e1ba70860" + resolved "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz#bb23cc86d03b30aa75a7f734819dee2e1ba70860" integrity sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg== emoji-regex@^8.0.0: @@ -12624,7 +12624,7 @@ emoji-regex@^9.2.2: emojis-list@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" + resolved "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== enabled@2.0.x: @@ -12653,7 +12653,7 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: enhanced-resolve@^5.10.0: version "5.12.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz#300e1c90228f5b570c4d35babf263f6da7155634" + resolved "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz#300e1c90228f5b570c4d35babf263f6da7155634" integrity sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ== dependencies: graceful-fs "^4.2.4" @@ -12673,7 +12673,7 @@ entities@2.2.0, entities@^2.0.0: entities@~2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5" + resolved "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5" integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w== env-editor@^0.5.0: @@ -12705,7 +12705,7 @@ error-ex@^1.3.1: error-stack-parser@^2.0.6: version "2.1.4" - resolved "https://registry.yarnpkg.com/error-stack-parser/-/error-stack-parser-2.1.4.tgz#229cb01cdbfa84440bfa91876285b94680188286" + resolved "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.1.4.tgz#229cb01cdbfa84440bfa91876285b94680188286" integrity sha512-Sk5V6wVazPhq5MhpO+AUxJn5x7XSXGl1R93Vn7i+zS15KDVxQijejNCrz8340/2bgLBjR9GtEG8ZVKONDjcqGQ== dependencies: stackframe "^1.3.4" @@ -12824,7 +12824,7 @@ escape-goat@^2.0.0: escape-goat@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-goat/-/escape-goat-4.0.0.tgz#9424820331b510b0666b98f7873fe11ac4aa8081" + resolved "https://registry.npmjs.org/escape-goat/-/escape-goat-4.0.0.tgz#9424820331b510b0666b98f7873fe11ac4aa8081" integrity sha512-2Sd4ShcWxbx6OY1IHyla/CVNwvg7XwZVoXZHcSu9w9SReNP1EzzD5T8NWKIR38fIqEns9kDWKUQTXXAmlDrdPg== escape-html@^1.0.3, escape-html@~1.0.3: @@ -12903,7 +12903,7 @@ eslint-config-airbnb@^18.0.1: eslint-config-prettier@^8.5.0: version "8.5.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz#5a81680ec934beca02c7b1a61cf8ca34b66feab1" + resolved "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz#5a81680ec934beca02c7b1a61cf8ca34b66feab1" integrity sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q== eslint-config-react-app@^7.0.0: @@ -12964,7 +12964,7 @@ eslint-module-utils@^2.7.3: eslint-plugin-cypress@^2.12.1: version "2.12.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-cypress/-/eslint-plugin-cypress-2.12.1.tgz#9aeee700708ca8c058e00cdafe215199918c2632" + resolved "https://registry.npmjs.org/eslint-plugin-cypress/-/eslint-plugin-cypress-2.12.1.tgz#9aeee700708ca8c058e00cdafe215199918c2632" integrity sha512-c2W/uPADl5kospNDihgiLc7n87t5XhUbFDoTl6CfVkmG+kDAb5Ux10V9PoLPu9N+r7znpc+iQlcmAqT1A/89HA== dependencies: globals "^11.12.0" @@ -13024,7 +13024,7 @@ eslint-plugin-jest@^25.3.0: eslint-plugin-jest@^27.0.0: version "27.1.7" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.1.7.tgz#0351e904afb8d66b7f70452929556dfdc8daba0d" + resolved "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.1.7.tgz#0351e904afb8d66b7f70452929556dfdc8daba0d" integrity sha512-0QVzf+og4YI1Qr3UoprkqqhezAZjFffdi62b0IurkCXMqPtRW84/UT4CKsYT80h/D82LA9avjO/80Ou1LdgbaQ== dependencies: "@typescript-eslint/utils" "^5.10.0" @@ -13049,7 +13049,7 @@ eslint-plugin-jsx-a11y@^6.5.1: eslint-plugin-package-json-dependencies@^1.0.17: version "1.0.17" - resolved "https://registry.yarnpkg.com/eslint-plugin-package-json-dependencies/-/eslint-plugin-package-json-dependencies-1.0.17.tgz#d12efb2b5c8dabb803c1e109fb6632b62ba3aa1e" + resolved "https://registry.npmjs.org/eslint-plugin-package-json-dependencies/-/eslint-plugin-package-json-dependencies-1.0.17.tgz#d12efb2b5c8dabb803c1e109fb6632b62ba3aa1e" integrity sha512-8PjZIxPXo/VJL+l+UMMFDqJ+yH2nTiNvFUkVN72iECr/7e9pY5SXfstK+2lC2qbSn7ZzL78H8Fcdx8XNLjCp6Q== dependencies: comment-json "~4.2.0" @@ -13282,7 +13282,7 @@ esprima@^4.0.0, esprima@^4.0.1, esprima@~4.0.0: esquery@^1.0.1, esquery@^1.4.0: version "1.4.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" + resolved "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== dependencies: estraverse "^5.1.0" @@ -13452,7 +13452,7 @@ expect@^26.6.2: expect@^27.5.1: version "27.5.1" - resolved "https://registry.yarnpkg.com/expect/-/expect-27.5.1.tgz#83ce59f1e5bdf5f9d2b94b61d2050db48f3fef74" + resolved "https://registry.npmjs.org/expect/-/expect-27.5.1.tgz#83ce59f1e5bdf5f9d2b94b61d2050db48f3fef74" integrity sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw== dependencies: "@jest/types" "^27.5.1" @@ -13620,7 +13620,7 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: fast-memoize@^2.5.2: version "2.5.2" - resolved "https://registry.yarnpkg.com/fast-memoize/-/fast-memoize-2.5.2.tgz#79e3bb6a4ec867ea40ba0e7146816f6cdce9b57e" + resolved "https://registry.npmjs.org/fast-memoize/-/fast-memoize-2.5.2.tgz#79e3bb6a4ec867ea40ba0e7146816f6cdce9b57e" integrity sha512-Ue0LwpDYErFbmNnZSF0UH6eImUwDmogUO1jyE+JbN2gsQz/jICm1Ve7t9QT0rNSsfJt+Hs4/S3GnsDVjL4HVrw== fast-url-parser@^1.1.3: @@ -13743,7 +13743,7 @@ filelist@^1.0.1: filesize@^8.0.6: version "8.0.7" - resolved "https://registry.yarnpkg.com/filesize/-/filesize-8.0.7.tgz#695e70d80f4e47012c132d57a059e80c6b580bd8" + resolved "https://registry.npmjs.org/filesize/-/filesize-8.0.7.tgz#695e70d80f4e47012c132d57a059e80c6b580bd8" integrity sha512-pjmC+bkIF8XI7fWaH8KxHcZL3DPybs1roSKP4rKDvy20tAWwIObE4+JIseG2byfGKhud5ZnM4YSGKBz7Sh0ndQ== fill-range@^4.0.0: @@ -13802,7 +13802,7 @@ find-up@^2.0.0, find-up@^2.1.0: find-up@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + resolved "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== dependencies: locate-path "^3.0.0" @@ -13849,12 +13849,12 @@ folder-hash@^4.0.2: follow-redirects@^1.0.0, follow-redirects@^1.14.0, follow-redirects@^1.14.8: version "1.14.9" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7" + resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7" integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w== follow-redirects@^1.15.0: version "1.15.2" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" + resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== for-in@^1.0.2: @@ -13874,7 +13874,7 @@ forever-agent@~0.6.1: fork-ts-checker-webpack-plugin@^6.5.0: version "6.5.2" - resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.2.tgz#4f67183f2f9eb8ba7df7177ce3cf3e75cdafb340" + resolved "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.2.tgz#4f67183f2f9eb8ba7df7177ce3cf3e75cdafb340" integrity sha512-m5cUmF30xkZ7h4tWUgTAcEaKmUW7tfyUyTqNNOz7OxWJ0v1VWKTcOvH8FWHUwSjlW/356Ijc9vi3XfcPstpQKA== dependencies: "@babel/code-frame" "^7.8.3" @@ -13907,7 +13907,7 @@ form-data@^3.0.0: form-data@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + resolved "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== dependencies: asynckit "^0.4.0" @@ -13938,7 +13938,7 @@ forwarded@0.2.0: fp-and-or@^0.1.3: version "0.1.3" - resolved "https://registry.yarnpkg.com/fp-and-or/-/fp-and-or-0.1.3.tgz#e6fba83872a5853a56b3ebdf8d3167f5dfca1882" + resolved "https://registry.npmjs.org/fp-and-or/-/fp-and-or-0.1.3.tgz#e6fba83872a5853a56b3ebdf8d3167f5dfca1882" integrity sha512-wJaE62fLaB3jCYvY2ZHjZvmKK2iiLiiehX38rz5QZxtdN8fVPJDeZUiVvJrHStdTc+23LHlyZuSEKgFc0pxi2g== fraction.js@^4.2.0: @@ -13982,7 +13982,7 @@ fs-extra@^10.0.0: fs-extra@^11.1.0: version "11.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.1.0.tgz#5784b102104433bb0e090f48bfc4a30742c357ed" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.0.tgz#5784b102104433bb0e090f48bfc4a30742c357ed" integrity sha512-0rcTq621PD5jM/e0a3EJoGC/1TC5ZBCERW82LQuwfGnCa1V8w7dpYH1yNu+SLb6E5dkeCBzKEyLGlFrnr+dUyw== dependencies: graceful-fs "^4.2.0" @@ -14010,7 +14010,7 @@ fs-extra@^9.0.0, fs-extra@^9.0.1, fs-extra@^9.1.0: fs-extra@~7.0.1: version "7.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== dependencies: graceful-fs "^4.1.2" @@ -14127,7 +14127,7 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: get-intrinsic@^1.0.2: version "1.1.2" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.2.tgz#336975123e05ad0b7ba41f152ee4aadbea6cf598" + resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz#336975123e05ad0b7ba41f152ee4aadbea6cf598" integrity sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA== dependencies: function-bind "^1.1.1" @@ -14175,7 +14175,7 @@ get-stdin@^7.0.0: get-stdin@^8.0.0: version "8.0.0" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-8.0.0.tgz#cbad6a73feb75f6eeb22ba9e01f89aa28aa97a53" + resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz#cbad6a73feb75f6eeb22ba9e01f89aa28aa97a53" integrity sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg== get-stream@^4.0.0: @@ -14400,7 +14400,7 @@ global-dirs@^3.0.0: global-modules@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" + resolved "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A== dependencies: global-prefix "^3.0.0" @@ -14440,7 +14440,7 @@ globby@^11.0.1, globby@^11.0.3, globby@^11.0.4: globby@^11.0.2, globby@^11.1.0: version "11.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + resolved "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== dependencies: array-union "^2.1.0" @@ -14452,7 +14452,7 @@ globby@^11.0.2, globby@^11.1.0: got@^11.8.5, got@^12.1.0, got@^9.6.0: version "11.8.6" - resolved "https://registry.yarnpkg.com/got/-/got-11.8.6.tgz#276e827ead8772eddbcfc97170590b841823233a" + resolved "https://registry.npmjs.org/got/-/got-11.8.6.tgz#276e827ead8772eddbcfc97170590b841823233a" integrity sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g== dependencies: "@sindresorhus/is" "^4.0.0" @@ -14664,7 +14664,7 @@ graphql-language-service@^4.1.4: graphql-mapping-template@4.20.8: version "4.20.8" - resolved "https://registry.yarnpkg.com/graphql-mapping-template/-/graphql-mapping-template-4.20.8.tgz#b7bf8b22742a966fe2561a602ad95f6c4b4b4281" + resolved "https://registry.npmjs.org/graphql-mapping-template/-/graphql-mapping-template-4.20.8.tgz#b7bf8b22742a966fe2561a602ad95f6c4b4b4281" integrity sha512-8rYupJfzpsImO1hs9RBJ6C4jT+V+D9ZdOlwBVFdqwKcGKi9w6WogoN0biMCriNkkcSYI+SyiOlXPy2i2Ga5YeQ== graphql-predictions-transformer@3.2.50, graphql-predictions-transformer@^3.2.50: @@ -14680,7 +14680,7 @@ graphql-predictions-transformer@3.2.50, graphql-predictions-transformer@^3.2.50: graphql-relational-schema-transformer@2.21.16: version "2.21.16" - resolved "https://registry.yarnpkg.com/graphql-relational-schema-transformer/-/graphql-relational-schema-transformer-2.21.16.tgz#2896793099b62a8844f2e60efc73274bd83545f0" + resolved "https://registry.npmjs.org/graphql-relational-schema-transformer/-/graphql-relational-schema-transformer-2.21.16.tgz#2896793099b62a8844f2e60efc73274bd83545f0" integrity sha512-tIswmNJtk+pRGG+n5XJ9L2JZAmED/ghyb1+6vOkhg58J5AJVBZeENnrSJw8G2A9ocZvs2w2qZ3lqP+NtKFMR5Q== dependencies: cloudform "^4.2.0" @@ -14718,7 +14718,7 @@ graphql-tag@^2.10.1, graphql-tag@^2.11.0: graphql-transformer-common@4.24.5: version "4.24.5" - resolved "https://registry.yarnpkg.com/graphql-transformer-common/-/graphql-transformer-common-4.24.5.tgz#9b6867254dba38abcd75ca16c141ea0d540599fa" + resolved "https://registry.npmjs.org/graphql-transformer-common/-/graphql-transformer-common-4.24.5.tgz#9b6867254dba38abcd75ca16c141ea0d540599fa" integrity sha512-tRHANSzK0lO7YSE+oRs/qogdkC8Y7q7CKHjtd741lGhmaGsE1op08i/F/iRrPtCXasN7j4o6Bfb8fVxa+PsU9Q== dependencies: graphql "^15.5.0" @@ -14784,7 +14784,7 @@ gunzip-maybe@^1.4.2: gzip-size@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-6.0.0.tgz#065367fd50c239c0671cbcbad5be3e2eeb10e462" + resolved "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz#065367fd50c239c0671cbcbad5be3e2eeb10e462" integrity sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q== dependencies: duplexer "^0.1.2" @@ -14856,7 +14856,7 @@ has-flag@^4.0.0: has-own-prop@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/has-own-prop/-/has-own-prop-2.0.0.tgz#f0f95d58f65804f5d218db32563bb85b8e0417af" + resolved "https://registry.npmjs.org/has-own-prop/-/has-own-prop-2.0.0.tgz#f0f95d58f65804f5d218db32563bb85b8e0417af" integrity sha512-Pq0h+hvsVm6dDEa8x82GnLSYHOzNDt7f0ddFa3FqcQlgzEiptPqL+XrOJNavjOzSYiYWIrgeVYYgGlLmnxwilQ== has-property-descriptors@^1.0.0: @@ -14873,7 +14873,7 @@ has-symbols@^1.0.1, has-symbols@^1.0.2: has-symbols@^1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== has-tostringtag@^1.0.0: @@ -14926,7 +14926,7 @@ has-yarn@^2.1.0: has-yarn@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/has-yarn/-/has-yarn-3.0.0.tgz#c3c21e559730d1d3b57e28af1f30d06fac38147d" + resolved "https://registry.npmjs.org/has-yarn/-/has-yarn-3.0.0.tgz#c3c21e559730d1d3b57e28af1f30d06fac38147d" integrity sha512-IrsVwUHhEULx3R8f/aA8AHuEzAorplsab/v8HBzEiIukwq5i/EC+xmOW+HfP1OaDP+2JkgT1yILHN2O3UFIbcA== has@^1.0.3: @@ -15081,7 +15081,7 @@ htmlparser2@^6.1.0: http-cache-semantics@^4.0.0, http-cache-semantics@^4.1.0: version "4.1.1" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" + resolved "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== http-deceiver@^1.2.7: @@ -15164,7 +15164,7 @@ http-signature@~1.2.0: http2-wrapper@^1.0.0-beta.5.2: version "1.0.3" - resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-1.0.3.tgz#b8f55e0c1f25d4ebd08b3b0c2c079f9590800b3d" + resolved "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz#b8f55e0c1f25d4ebd08b3b0c2c079f9590800b3d" integrity sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg== dependencies: quick-lru "^5.1.1" @@ -15210,7 +15210,7 @@ hunspell-spellchecker@^1.0.2: husky@^3.1.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/husky/-/husky-3.1.0.tgz#5faad520ab860582ed94f0c1a77f0f04c90b57c0" + resolved "https://registry.npmjs.org/husky/-/husky-3.1.0.tgz#5faad520ab860582ed94f0c1a77f0f04c90b57c0" integrity sha512-FJkPoHHB+6s4a+jwPqBudBDvYZsoQW5/HBuMSehC8qDiCe50kpcxeqFoDSlow+9I6wg47YxBoT3WxaURlrDIIQ== dependencies: chalk "^2.4.2" @@ -15317,7 +15317,7 @@ immer@^9.0.12: immer@^9.0.7: version "9.0.16" - resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.16.tgz#8e7caab80118c2b54b37ad43e05758cdefad0198" + resolved "https://registry.npmjs.org/immer/-/immer-9.0.16.tgz#8e7caab80118c2b54b37ad43e05758cdefad0198" integrity sha512-qenGE7CstVm1NrHQbMh8YaSzTZTFNP3zPqr3YU0S0UY441j4bJTg4A2Hh5KAhwgaiU6ZZ1Ar6y/2f4TblnMReQ== immutable-tuple@^0.4.9: @@ -15372,7 +15372,7 @@ import-lazy@^2.1.0: import-lazy@^4.0.0, import-lazy@~4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-4.0.0.tgz#e8eb627483a0a43da3c03f3e35548be5cb0cc153" + resolved "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz#e8eb627483a0a43da3c03f3e35548be5cb0cc153" integrity sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw== import-local@^3.0.2: @@ -15639,21 +15639,21 @@ is-ci@^2.0.0: is-ci@^3.0.1: version "3.0.1" - resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-3.0.1.tgz#db6ecbed1bd659c43dac0f45661e7674103d1867" + resolved "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz#db6ecbed1bd659c43dac0f45661e7674103d1867" integrity sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ== dependencies: ci-info "^3.2.0" is-core-module@2.9.0: version "2.9.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69" + resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69" integrity sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A== dependencies: has "^1.0.3" is-core-module@^2.1.0: version "2.11.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" + resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== dependencies: has "^1.0.3" @@ -15831,7 +15831,7 @@ is-npm@^5.0.0: is-npm@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-6.0.0.tgz#b59e75e8915543ca5d881ecff864077cba095261" + resolved "https://registry.npmjs.org/is-npm/-/is-npm-6.0.0.tgz#b59e75e8915543ca5d881ecff864077cba095261" integrity sha512-JEjxbSmtPSt1c8XTkVrlujcXdKV1/tvuQ7GwKcAlyiVLeYFQ2VHat8xfrDJsIkhCdF/tZ7CiIR3sy141c6+gPQ== is-number-object@^1.0.4: @@ -15922,7 +15922,7 @@ is-relative@^1.0.0: is-root@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/is-root/-/is-root-2.1.0.tgz#809e18129cf1129644302a4f8544035d51984a9c" + resolved "https://registry.npmjs.org/is-root/-/is-root-2.1.0.tgz#809e18129cf1129644302a4f8544035d51984a9c" integrity sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg== is-shared-array-buffer@^1.0.1: @@ -16036,7 +16036,7 @@ is-yarn-global@^0.3.0: is-yarn-global@^0.4.0: version "0.4.0" - resolved "https://registry.yarnpkg.com/is-yarn-global/-/is-yarn-global-0.4.0.tgz#714d94453327db9ea98fbf1a0c5f2b88f59ddd5c" + resolved "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.4.0.tgz#714d94453327db9ea98fbf1a0c5f2b88f59ddd5c" integrity sha512-HneQBCrXGBy15QnaDfcn6OLoU8AQPAa0Qn0IeJR/QCo4E8dNZaGGwxpCwWyEBQC5QvFonP8d6t60iGpAHVAfNA== isarray@0.0.1: @@ -16120,7 +16120,7 @@ istanbul-lib-instrument@^5.0.4: istanbul-lib-instrument@^5.1.0: version "5.2.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" + resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== dependencies: "@babel/core" "^7.12.3" @@ -16131,7 +16131,7 @@ istanbul-lib-instrument@^5.1.0: istanbul-lib-report@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#7518fe52ea44de372f460a76b5ecda9ffb73d8a6" + resolved "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#7518fe52ea44de372f460a76b5ecda9ffb73d8a6" integrity sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw== dependencies: istanbul-lib-coverage "^3.0.0" @@ -16157,7 +16157,7 @@ istanbul-reports@^3.0.2: istanbul-reports@^3.1.3, istanbul-reports@^3.1.5: version "3.1.5" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.5.tgz#cc9a6ab25cb25659810e4785ed9d9fb742578bae" + resolved "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz#cc9a6ab25cb25659810e4785ed9d9fb742578bae" integrity sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w== dependencies: html-escaper "^2.0.0" @@ -16209,7 +16209,7 @@ jest-changed-files@^26.6.2: jest-changed-files@^27.5.1: version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.5.1.tgz#a348aed00ec9bf671cc58a66fcbe7c3dfd6a68f5" + resolved "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.5.1.tgz#a348aed00ec9bf671cc58a66fcbe7c3dfd6a68f5" integrity sha512-buBLMiByfWGCoMsLLzGUUSpAmIAGnbR2KJoMN10ziLhOLvP4e0SlypHnAel8iqQXTrcbmfEY9sSqae5sgUsTvw== dependencies: "@jest/types" "^27.5.1" @@ -16218,7 +16218,7 @@ jest-changed-files@^27.5.1: jest-circus@^27.0.0, jest-circus@^27.5.1: version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.5.1.tgz#37a5a4459b7bf4406e53d637b49d22c65d125ecc" + resolved "https://registry.npmjs.org/jest-circus/-/jest-circus-27.5.1.tgz#37a5a4459b7bf4406e53d637b49d22c65d125ecc" integrity sha512-D95R7x5UtlMA5iBYsOHFFbMD/GVA4R/Kdq15f7xYWUfWHBto9NYRsOvnSauTgdF+ogCpJ4tyKOXhUifxS65gdw== dependencies: "@jest/environment" "^27.5.1" @@ -16262,7 +16262,7 @@ jest-cli@^26.6.3: jest-cli@^27.5.1: version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.5.1.tgz#278794a6e6458ea8029547e6c6cbf673bd30b145" + resolved "https://registry.npmjs.org/jest-cli/-/jest-cli-27.5.1.tgz#278794a6e6458ea8029547e6c6cbf673bd30b145" integrity sha512-Hc6HOOwYq4/74/c62dEE3r5elx8wjYqxY0r0G/nFrLDPMFRu6RA/u8qINOIkvhxG7mMQ5EJsOGfRpI8L6eFUVw== dependencies: "@jest/core" "^27.5.1" @@ -16304,7 +16304,7 @@ jest-config@^26.6.3: jest-config@^27.5.1: version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.5.1.tgz#5c387de33dca3f99ad6357ddeccd91bf3a0e4a41" + resolved "https://registry.npmjs.org/jest-config/-/jest-config-27.5.1.tgz#5c387de33dca3f99ad6357ddeccd91bf3a0e4a41" integrity sha512-5sAsjm6tGdsVbW9ahcChPAFCk4IlkQUknH5AvKjuLTSlcO/wCZKyFdn7Rg0EkC+OGgWODEy2hDpWB1PgzH0JNA== dependencies: "@babel/core" "^7.8.0" @@ -16354,7 +16354,7 @@ jest-diff@^27.0.0: jest-diff@^27.5.1: version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.5.1.tgz#a07f5011ac9e6643cf8a95a462b7b1ecf6680def" + resolved "https://registry.npmjs.org/jest-diff/-/jest-diff-27.5.1.tgz#a07f5011ac9e6643cf8a95a462b7b1ecf6680def" integrity sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw== dependencies: chalk "^4.0.0" @@ -16371,7 +16371,7 @@ jest-docblock@^26.0.0: jest-docblock@^27.5.1: version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-27.5.1.tgz#14092f364a42c6108d42c33c8cf30e058e25f6c0" + resolved "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.5.1.tgz#14092f364a42c6108d42c33c8cf30e058e25f6c0" integrity sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ== dependencies: detect-newline "^3.0.0" @@ -16389,7 +16389,7 @@ jest-each@^26.6.2: jest-each@^27.5.1: version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.5.1.tgz#5bc87016f45ed9507fed6e4702a5b468a5b2c44e" + resolved "https://registry.npmjs.org/jest-each/-/jest-each-27.5.1.tgz#5bc87016f45ed9507fed6e4702a5b468a5b2c44e" integrity sha512-1Ff6p+FbhT/bXQnEouYy00bkNSY7OUpfIcmdl8vZ31A1UUaurOLPA8a8BbJOF2RDUElwJhmeaV7LnagI+5UwNQ== dependencies: "@jest/types" "^27.5.1" @@ -16413,7 +16413,7 @@ jest-environment-jsdom@^26.6.2: jest-environment-jsdom@^27.5.1: version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.5.1.tgz#ea9ccd1fc610209655a77898f86b2b559516a546" + resolved "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.5.1.tgz#ea9ccd1fc610209655a77898f86b2b559516a546" integrity sha512-TFBvkTC1Hnnnrka/fUb56atfDtJ9VMZ94JkjTbggl1PEpwrYtUBKMezB3inLmWqQsXYLcMwNoDQwoBTAvFfsfw== dependencies: "@jest/environment" "^27.5.1" @@ -16438,7 +16438,7 @@ jest-environment-node@^26.6.2: jest-environment-node@^27.5.1: version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.5.1.tgz#dedc2cfe52fab6b8f5714b4808aefa85357a365e" + resolved "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.5.1.tgz#dedc2cfe52fab6b8f5714b4808aefa85357a365e" integrity sha512-Jt4ZUnxdOsTGwSRAfKEnE6BcwsSPNOijjwifq5sDFSA2kesnXTvNqKHYgM0hDq3549Uf/KzdXNYn4wMZJPlFLw== dependencies: "@jest/environment" "^27.5.1" @@ -16460,7 +16460,7 @@ jest-get-type@^27.4.0: jest-get-type@^27.5.1: version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.5.1.tgz#3cd613c507b0f7ace013df407a1c1cd578bcb4f1" + resolved "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.5.1.tgz#3cd613c507b0f7ace013df407a1c1cd578bcb4f1" integrity sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw== jest-haste-map@^26.6.2: @@ -16530,7 +16530,7 @@ jest-jasmine2@^26.6.3: jest-jasmine2@^27.5.1: version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.5.1.tgz#a037b0034ef49a9f3d71c4375a796f3b230d1ac4" + resolved "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.5.1.tgz#a037b0034ef49a9f3d71c4375a796f3b230d1ac4" integrity sha512-jtq7VVyG8SqAorDpApwiJJImd0V2wv1xzdheGHRGyuT7gZm6gG47QEskOlzsN1PG/6WNaCo5pmwMHDf3AkG2pQ== dependencies: "@jest/environment" "^27.5.1" @@ -16571,7 +16571,7 @@ jest-leak-detector@^26.6.2: jest-leak-detector@^27.5.1: version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.5.1.tgz#6ec9d54c3579dd6e3e66d70e3498adf80fde3fb8" + resolved "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.5.1.tgz#6ec9d54c3579dd6e3e66d70e3498adf80fde3fb8" integrity sha512-POXfWAMvfU6WMUXftV4HolnJfnPOGEu10fscNCA76KBpRRhcMN2c8d3iT2pxQS3HLbA+5X4sOUPzYO2NUyIlHQ== dependencies: jest-get-type "^27.5.1" @@ -16589,7 +16589,7 @@ jest-matcher-utils@^26.6.2: jest-matcher-utils@^27.0.0, jest-matcher-utils@^27.5.1: version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz#9c0cdbda8245bc22d2331729d1091308b40cf8ab" + resolved "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz#9c0cdbda8245bc22d2331729d1091308b40cf8ab" integrity sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw== dependencies: chalk "^4.0.0" @@ -16637,7 +16637,7 @@ jest-mock@^26.6.2: jest-mock@^27.5.1: version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.5.1.tgz#19948336d49ef4d9c52021d34ac7b5f36ff967d6" + resolved "https://registry.npmjs.org/jest-mock/-/jest-mock-27.5.1.tgz#19948336d49ef4d9c52021d34ac7b5f36ff967d6" integrity sha512-K4jKbY1d4ENhbrG2zuPWaQBvDly+iZ2yAW+T1fATN78hc0sInwn7wZB8XtlNnvHug5RMwV897Xm4LqmPM4e2Og== dependencies: "@jest/types" "^27.5.1" @@ -16669,7 +16669,7 @@ jest-resolve-dependencies@^26.6.3: jest-resolve-dependencies@^27.5.1: version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.5.1.tgz#d811ecc8305e731cc86dd79741ee98fed06f1da8" + resolved "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.5.1.tgz#d811ecc8305e731cc86dd79741ee98fed06f1da8" integrity sha512-QQOOdY4PE39iawDn5rzbIePNigfe5B9Z91GDD1ae/xNDlu9kaat8QQ5EKnNmVWPV54hUdxCVwwj6YMgR2O7IOg== dependencies: "@jest/types" "^27.5.1" @@ -16692,7 +16692,7 @@ jest-resolve@^26.0.2, jest-resolve@^26.6.2: jest-resolve@^27.5.1: version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.5.1.tgz#a2f1c5a0796ec18fe9eb1536ac3814c23617b384" + resolved "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.5.1.tgz#a2f1c5a0796ec18fe9eb1536ac3814c23617b384" integrity sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw== dependencies: "@jest/types" "^27.5.1" @@ -16734,7 +16734,7 @@ jest-runner@^26.6.3: jest-runner@^27.5.1: version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.5.1.tgz#071b27c1fa30d90540805c5645a0ec167c7b62e5" + resolved "https://registry.npmjs.org/jest-runner/-/jest-runner-27.5.1.tgz#071b27c1fa30d90540805c5645a0ec167c7b62e5" integrity sha512-g4NPsM4mFCOwFKXO4p/H/kWGdJp9V8kURY2lX8Me2drgXqG7rrZAx5kv+5H7wtt/cdFIjhqYx1HrlqWHaOvDaQ== dependencies: "@jest/console" "^27.5.1" @@ -16794,7 +16794,7 @@ jest-runtime@^26.6.3: jest-runtime@^27.5.1: version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.5.1.tgz#4896003d7a334f7e8e4a53ba93fb9bcd3db0a1af" + resolved "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.5.1.tgz#4896003d7a334f7e8e4a53ba93fb9bcd3db0a1af" integrity sha512-o7gxw3Gf+H2IGt8fv0RiyE1+r83FJBRruoA+FXrlHw6xEyBsU8ugA6IPfTdVyA0w8HClpbK+DGJxH59UrNMx8A== dependencies: "@jest/environment" "^27.5.1" @@ -16860,7 +16860,7 @@ jest-snapshot@^26.6.2: jest-snapshot@^27.5.1: version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.5.1.tgz#b668d50d23d38054a51b42c4039cab59ae6eb6a1" + resolved "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.5.1.tgz#b668d50d23d38054a51b42c4039cab59ae6eb6a1" integrity sha512-yYykXI5a0I31xX67mgeLw1DZ0bJB+gpq5IpSuCAoyDi0+BhgU/RIrL+RTzDmkNTchvDFWKP8lp+w/42Z3us5sA== dependencies: "@babel/core" "^7.7.2" @@ -16924,7 +16924,7 @@ jest-validate@^26.6.2: jest-validate@^27.5.1: version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.5.1.tgz#9197d54dc0bdb52260b8db40b46ae668e04df067" + resolved "https://registry.npmjs.org/jest-validate/-/jest-validate-27.5.1.tgz#9197d54dc0bdb52260b8db40b46ae668e04df067" integrity sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ== dependencies: "@jest/types" "^27.5.1" @@ -16962,7 +16962,7 @@ jest-watcher@^26.6.2: jest-watcher@^27.0.0, jest-watcher@^27.5.1: version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.5.1.tgz#71bd85fb9bde3a2c2ec4dc353437971c43c642a2" + resolved "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.5.1.tgz#71bd85fb9bde3a2c2ec4dc353437971c43c642a2" integrity sha512-z676SuD6Z8o8qbmEGhoEUFOM1+jfEiL3DXHK/xgEiG2EyNYfFG60jluWcupY6dATjfEsKQuibReS1djInQnoVw== dependencies: "@jest/test-result" "^27.5.1" @@ -17011,7 +17011,7 @@ jest@^26.6.3: jest@^27.0.0: version "27.5.1" - resolved "https://registry.yarnpkg.com/jest/-/jest-27.5.1.tgz#dadf33ba70a779be7a6fc33015843b51494f63fc" + resolved "https://registry.npmjs.org/jest/-/jest-27.5.1.tgz#dadf33ba70a779be7a6fc33015843b51494f63fc" integrity sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ== dependencies: "@jest/core" "^27.5.1" @@ -17020,7 +17020,7 @@ jest@^27.0.0: jju@^1.1.0, jju@~1.4.0: version "1.4.0" - resolved "https://registry.yarnpkg.com/jju/-/jju-1.4.0.tgz#a3abe2718af241a2b2904f84a625970f389ae32a" + resolved "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz#a3abe2718af241a2b2904f84a625970f389ae32a" integrity sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA== jmespath@0.16.0: @@ -17030,7 +17030,7 @@ jmespath@0.16.0: jose@^4.3.7: version "4.9.2" - resolved "https://registry.yarnpkg.com/jose/-/jose-4.9.2.tgz#268994df4443b9c191de0b001c2e3796ac6cf368" + resolved "https://registry.npmjs.org/jose/-/jose-4.9.2.tgz#268994df4443b9c191de0b001c2e3796ac6cf368" integrity sha512-EqKvu2PqJCD3Jrg3PvcYZVS7D21qMVLSYMDAFcOdGUEOpJSLNtJO7NjLANvu3SYHVl6pdP2ff7ve6EZW2nX7Nw== jquery@x.*: @@ -17075,7 +17075,7 @@ jsbn@~0.1.0: jsdom@^16.4.0, jsdom@^16.6.0: version "16.7.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.7.0.tgz#918ae71965424b197c819f8183a754e18977b710" + resolved "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz#918ae71965424b197c819f8183a754e18977b710" integrity sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw== dependencies: abab "^2.0.5" @@ -17123,7 +17123,7 @@ jsesc@~0.5.0: json-buffer@3.0.1: version "3.0.1" - resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + resolved "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== json-parse-better-errors@^1.0.1: @@ -17138,14 +17138,14 @@ json-parse-even-better-errors@^2.3.0, json-parse-even-better-errors@^2.3.1: json-parse-helpfulerror@^1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/json-parse-helpfulerror/-/json-parse-helpfulerror-1.0.3.tgz#13f14ce02eed4e981297b64eb9e3b932e2dd13dc" + resolved "https://registry.npmjs.org/json-parse-helpfulerror/-/json-parse-helpfulerror-1.0.3.tgz#13f14ce02eed4e981297b64eb9e3b932e2dd13dc" integrity sha512-XgP0FGR77+QhUxjXkwOMkC94k3WtqEBfcnjWqhRd82qTat4SWKRE+9kUnynz/shm3I4ea2+qISvTIeGTNU7kJg== dependencies: jju "^1.1.0" json-schema-traverse@^0.4.1: version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== json-schema-traverse@^1.0.0: @@ -17175,12 +17175,12 @@ json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: json5@2.x, json5@^1.0.1, json5@^2.1.2, json5@^2.2.0, json5@^2.2.1, json5@^2.2.2, json5@^2.2.3: version "2.2.3" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" + resolved "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== jsonc-parser@3.2.0: version "3.2.0" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" + resolved "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== jsonfile@^4.0.0: @@ -17201,7 +17201,7 @@ jsonfile@^6.0.1: jsonlines@^0.1.1: version "0.1.1" - resolved "https://registry.yarnpkg.com/jsonlines/-/jsonlines-0.1.1.tgz#4fcd246dc5d0e38691907c44ab002f782d1d94cc" + resolved "https://registry.npmjs.org/jsonlines/-/jsonlines-0.1.1.tgz#4fcd246dc5d0e38691907c44ab002f782d1d94cc" integrity sha512-ekDrAGso79Cvf+dtm+mL8OBI2bmAOt3gssYs833De/C9NmIpWDWyUO4zPgB5x2/OhY366dkhgfPMYfwZF7yOZA== jsonminify@^0.4.1: @@ -17221,12 +17221,12 @@ jsonpointer@^5.0.0: jsonschema@^1.4.1: version "1.4.1" - resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.4.1.tgz#cc4c3f0077fb4542982973d8a083b6b34f482dab" + resolved "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.1.tgz#cc4c3f0077fb4542982973d8a083b6b34f482dab" integrity sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ== jsonwebtoken@^9.0.0: version "9.0.0" - resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz#d0faf9ba1cc3a56255fe49c0961a67e520c1926d" + resolved "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz#d0faf9ba1cc3a56255fe49c0961a67e520c1926d" integrity sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw== dependencies: jws "^3.2.2" @@ -17301,7 +17301,7 @@ keyboard-key@^1.1.0: keyv@^4.0.0: version "4.5.2" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.2.tgz#0e310ce73bf7851ec702f2eaf46ec4e3805cce56" + resolved "https://registry.npmjs.org/keyv/-/keyv-4.5.2.tgz#0e310ce73bf7851ec702f2eaf46ec4e3805cce56" integrity sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g== dependencies: json-buffer "3.0.1" @@ -17337,7 +17337,7 @@ kleur@^3.0.3: kleur@^4.0.1: version "4.1.5" - resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.1.5.tgz#95106101795f7050c6c650f350c683febddb1780" + resolved "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz#95106101795f7050c6c650f350c683febddb1780" integrity sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ== klona@^2.0.4, klona@^2.0.5: @@ -17371,7 +17371,7 @@ latest-version@^5.1.0: latest-version@^7.0.0: version "7.0.0" - resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-7.0.0.tgz#843201591ea81a4d404932eeb61240fe04e9e5da" + resolved "https://registry.npmjs.org/latest-version/-/latest-version-7.0.0.tgz#843201591ea81a4d404932eeb61240fe04e9e5da" integrity sha512-KvNT4XqAMzdcL6ka6Tl3i2lYeFDgXNCuIX+xNx6ZMVR1dFq+idXd9FLKNMOIx0t9mJ9/HudyX4oZWXZQ0UJHeg== dependencies: package-json "^8.1.0" @@ -17390,7 +17390,7 @@ lcov-parse@^1.0.0: lerna@^6.4.1: version "6.4.1" - resolved "https://registry.yarnpkg.com/lerna/-/lerna-6.4.1.tgz#a1e5abcb6c00de3367f50d75eca449e382525e0f" + resolved "https://registry.npmjs.org/lerna/-/lerna-6.4.1.tgz#a1e5abcb6c00de3367f50d75eca449e382525e0f" integrity sha512-0t8TSG4CDAn5+vORjvTFn/ZEGyc4LOEsyBUpzcdIxODHPKM4TVOGvbW9dBs1g40PhOrQfwhHS+3fSx/42j42dQ== dependencies: "@lerna/add" "6.4.1" @@ -17463,7 +17463,7 @@ libnpmpublish@^6.0.4: libphonenumber-js@1.9.47: version "1.9.47" - resolved "https://registry.yarnpkg.com/libphonenumber-js/-/libphonenumber-js-1.9.47.tgz#0cb3d6a3dd8d917d364da48a5355bc3b1d145f5b" + resolved "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.9.47.tgz#0cb3d6a3dd8d917d364da48a5355bc3b1d145f5b" integrity sha512-FIWFLJ2jUJi8SCztgd2k/isQHZedh7xuxOVifqFLwG/ogZtdH9TXFK92w/KWFj1lwoadqVedtLO3Jqp0q67PZw== lilconfig@^2.0.3, lilconfig@^2.0.5: @@ -17478,12 +17478,12 @@ lines-and-columns@^1.1.6: lines-and-columns@~2.0.3: version "2.0.3" - resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-2.0.3.tgz#b2f0badedb556b747020ab8ea7f0373e22efac1b" + resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-2.0.3.tgz#b2f0badedb556b747020ab8ea7f0373e22efac1b" integrity sha512-cNOjgCnLB+FnvWWtyRTzmB3POJ+cXxTA81LoW7u8JdmhfXzriropYwpjShnz1QLLWsQwY7nIxoDmcPTwphDK9w== linkify-it@^3.0.1: version "3.0.3" - resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-3.0.3.tgz#a98baf44ce45a550efb4d49c769d07524cc2fa2e" + resolved "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz#a98baf44ce45a550efb4d49c769d07524cc2fa2e" integrity sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ== dependencies: uc.micro "^1.0.1" @@ -17525,7 +17525,7 @@ loader-runner@^4.2.0: loader-utils@^2.0.0, loader-utils@^2.0.3: version "2.0.4" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.4.tgz#8b5cb38b5c34a9a018ee1fc0e6a066d1dfcc528c" + resolved "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz#8b5cb38b5c34a9a018ee1fc0e6a066d1dfcc528c" integrity sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw== dependencies: big.js "^5.2.2" @@ -17534,7 +17534,7 @@ loader-utils@^2.0.0, loader-utils@^2.0.3: loader-utils@^3.2.0: version "3.2.1" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-3.2.1.tgz#4fb104b599daafd82ef3e1a41fb9265f87e1f576" + resolved "https://registry.npmjs.org/loader-utils/-/loader-utils-3.2.1.tgz#4fb104b599daafd82ef3e1a41fb9265f87e1f576" integrity sha512-ZvFw1KWS3GVyYBYb7qkmRM/WwL2TQQBxgCK62rlvm4WpVQ23Nb4tYjApUlfjrEGvOs7KHEsmyUn75OHZrJMWPw== locate-path@^2.0.0: @@ -17547,7 +17547,7 @@ locate-path@^2.0.0: locate-path@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== dependencies: p-locate "^3.0.0" @@ -17562,7 +17562,7 @@ locate-path@^5.0.0: locate-path@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== dependencies: p-locate "^5.0.0" @@ -17599,7 +17599,7 @@ lodash.get@^4, lodash.get@^4.4.2: lodash.isequal@^4.5.0: version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + resolved "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ== lodash.ismatch@^4.4.0: @@ -17614,7 +17614,7 @@ lodash.isplainobject@^4.0.6: lodash.memoize@4.x, lodash.memoize@^4.1.2: version "4.1.2" - resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" + resolved "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== lodash.merge@^4.6.2: @@ -17837,7 +17837,7 @@ map-visit@^1.0.0: markdown-it@^12.2.0: version "12.3.2" - resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-12.3.2.tgz#bf92ac92283fe983fe4de8ff8abfb5ad72cd0c90" + resolved "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz#bf92ac92283fe983fe4de8ff8abfb5ad72cd0c90" integrity sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg== dependencies: argparse "^2.0.1" @@ -17876,7 +17876,7 @@ mdn-data@2.0.4: mdurl@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" + resolved "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" integrity sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4= media-typer@0.3.0: @@ -17886,7 +17886,7 @@ media-typer@0.3.0: memfs@^3.1.2: version "3.4.11" - resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.4.11.tgz#3a34837ade675825d805a2c135e88cefe5e53aaf" + resolved "https://registry.npmjs.org/memfs/-/memfs-3.4.11.tgz#3a34837ade675825d805a2c135e88cefe5e53aaf" integrity sha512-GvsCITGAyDCxxsJ+X6prJexFQEhOCJaIlUbsAvjzSI5o5O7j2dle3jWvz5Z5aOdpOxW6ol3vI1+0ut+641F1+w== dependencies: fs-monkey "^1.0.3" @@ -18022,12 +18022,12 @@ mimic-response@^1.0.0: mimic-response@^2.0.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-2.1.0.tgz#d13763d35f613d09ec37ebb30bac0469c0ee8f43" + resolved "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz#d13763d35f613d09ec37ebb30bac0469c0ee8f43" integrity sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA== mimic-response@^3.1.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" + resolved "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== min-indent@^1.0.0: @@ -18098,7 +18098,7 @@ minimist-options@4.1.0: minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5, minimist@^1.2.6: version "1.2.7" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" + resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== minipass-collect@^1.0.2: @@ -18244,14 +18244,14 @@ moment-jdateformatparser@^1.2.1: moment-timezone@0.5.35: version "0.5.35" - resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.35.tgz#6fa2631bdbe8ff04f6b8753f7199516be6dc9839" + resolved "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.35.tgz#6fa2631bdbe8ff04f6b8753f7199516be6dc9839" integrity sha512-cY/pBOEXepQvlgli06ttCTKcIf8cD1nmNwOKQQAdHBqYApQSpAqotBMX0RJZNgMp6i0PlZuf1mFtnlyEkwyvFw== dependencies: moment ">= 2.9.0" "moment@>= 2.9.0", moment@^2.11.2, moment@^2.24.0, moment@^2.27.0: version "2.29.4" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" + resolved "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w== ms@2.0.0: @@ -18592,7 +18592,7 @@ normalize-range@^0.1.2: normalize-url@^6.0.1: version "6.1.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" + resolved "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== npm-bundled@^1.1.1: @@ -18611,7 +18611,7 @@ npm-bundled@^2.0.0: npm-check-updates@^16.1.0: version "16.1.0" - resolved "https://registry.yarnpkg.com/npm-check-updates/-/npm-check-updates-16.1.0.tgz#dfcfa7a5b03c5f7e241707127d79082d8fb03aef" + resolved "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-16.1.0.tgz#dfcfa7a5b03c5f7e241707127d79082d8fb03aef" integrity sha512-0oEuD//2DVCjewNq4u0oJyciT5WRSPAz3B0IDnh8rGunrSXy0vXX17DFeI0XOT28mvUWrBtPbjz2Zptd2wvpNQ== dependencies: chalk "^5.0.1" @@ -18769,7 +18769,7 @@ nwsapi@^2.2.0: nx@15.6.3, "nx@>=15.4.2 < 16": version "15.6.3" - resolved "https://registry.yarnpkg.com/nx/-/nx-15.6.3.tgz#900087bce38c6e5975660c23ebd41ead1bf54f98" + resolved "https://registry.npmjs.org/nx/-/nx-15.6.3.tgz#900087bce38c6e5975660c23ebd41ead1bf54f98" integrity sha512-3t0A0GPLNen1yPAyE+VGZ3nkAzZYb5nfXtAcx8SHBlKq4u42yBY3khBmP1y4Og3jhIwFIj7J7Npeh8ZKrthmYQ== dependencies: "@nrwl/cli" "15.6.3" @@ -18849,7 +18849,7 @@ object-inspect@^1.12.0: object-inspect@^1.9.0: version "1.12.2" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" + resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== object-keys@^1.0.12, object-keys@^1.1.1: @@ -19069,7 +19069,7 @@ os-tmpdir@~1.0.2: p-cancelable@^2.0.0: version "2.1.1" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.1.1.tgz#aab7fbd416582fa32a3db49859c122487c5ed2cf" + resolved "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz#aab7fbd416582fa32a3db49859c122487c5ed2cf" integrity sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg== p-each-series@^2.1.0: @@ -19117,7 +19117,7 @@ p-locate@^2.0.0: p-locate@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== dependencies: p-limit "^2.0.0" @@ -19131,7 +19131,7 @@ p-locate@^4.1.0: p-locate@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== dependencies: p-limit "^3.0.2" @@ -19234,7 +19234,7 @@ package-json@^6.3.0: package-json@^8.1.0: version "8.1.0" - resolved "https://registry.yarnpkg.com/package-json/-/package-json-8.1.0.tgz#2a22806f1ed7c786c8e6ff26cfe20003bf4c6850" + resolved "https://registry.npmjs.org/package-json/-/package-json-8.1.0.tgz#2a22806f1ed7c786c8e6ff26cfe20003bf4c6850" integrity sha512-hySwcV8RAWeAfPsXb9/HGSPn8lwDnv6fabH+obUZKX169QknRkRhPxd1yMubpKDskLFATkl3jHpNtVtDPFA0Wg== dependencies: got "^12.1.0" @@ -19325,7 +19325,7 @@ parse-filepath@^1.0.2: parse-github-url@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/parse-github-url/-/parse-github-url-1.0.2.tgz#242d3b65cbcdda14bb50439e3242acf6971db395" + resolved "https://registry.npmjs.org/parse-github-url/-/parse-github-url-1.0.2.tgz#242d3b65cbcdda14bb50439e3242acf6971db395" integrity sha512-kgBf6avCbO3Cn6+RnzRGLkUsv4ZVqv/VfAYkRsyBcgkshNvVBkRn1FEZcW0Jb+npXQWm2vHPnnOqFteZxRRGNw== parse-json@^4.0.0: @@ -19398,7 +19398,7 @@ path-exists@^3.0.0: path-exists@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== path-is-absolute@^1.0.0: @@ -19566,14 +19566,14 @@ pkg-fetch@3.4.2, "pkg-fetch@https://github.com/aws-amplify/pkg-fetch#ad4a21feb53 pkg-up@^3.1.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-3.1.0.tgz#100ec235cc150e4fd42519412596a28512a0def5" + resolved "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz#100ec235cc150e4fd42519412596a28512a0def5" integrity sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA== dependencies: find-up "^3.0.0" pkg@^5.8.0: version "5.8.0" - resolved "https://registry.yarnpkg.com/pkg/-/pkg-5.8.0.tgz#a77644aeff0b94a1656d7f76558837f7c754a4c0" + resolved "https://registry.npmjs.org/pkg/-/pkg-5.8.0.tgz#a77644aeff0b94a1656d7f76558837f7c754a4c0" integrity sha512-8h9PUDYFi+LOMLbIyGRdP21g08mAtHidSpofSrf8LWhxUWGHymaRzcopEGiynB5EhQmZUKM6PQ9kCImV2TpdjQ== dependencies: "@babel/generator" "7.18.2" @@ -20205,7 +20205,7 @@ prettier@^1.19.1: prettier@^2.8.4: version "2.8.4" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.4.tgz#34dd2595629bfbb79d344ac4a91ff948694463c3" + resolved "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz#34dd2595629bfbb79d344ac4a91ff948694463c3" integrity sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw== pretty-bytes@^5.3.0, pretty-bytes@^5.4.1: @@ -20326,7 +20326,7 @@ promise@^8.1.0: prompts-ncu@^2.5.1: version "2.5.1" - resolved "https://registry.yarnpkg.com/prompts-ncu/-/prompts-ncu-2.5.1.tgz#0a75702e0af1d1319261113aad9153fd7267122a" + resolved "https://registry.npmjs.org/prompts-ncu/-/prompts-ncu-2.5.1.tgz#0a75702e0af1d1319261113aad9153fd7267122a" integrity sha512-Hdd7GgV7b76Yh9FP9HL1D9xqtJCJdVPpiM2vDtuoc8W1KfweJe15gutFYmxkq83ViFaagFM8K0UcPCQ/tZq8bA== dependencies: kleur "^4.0.1" @@ -20409,7 +20409,7 @@ proxy-agent@^5.0.0: proxy-from-env@^1.0.0, proxy-from-env@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + resolved "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== psl@^1.1.28, psl@^1.1.33: @@ -20483,7 +20483,7 @@ pupa@^2.1.1: pupa@^3.1.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/pupa/-/pupa-3.1.0.tgz#f15610274376bbcc70c9a3aa8b505ea23f41c579" + resolved "https://registry.npmjs.org/pupa/-/pupa-3.1.0.tgz#f15610274376bbcc70c9a3aa8b505ea23f41c579" integrity sha512-FLpr4flz5xZTSJxSeaheeMKN/EDzMdK7b8PTOC6a5PYFKTucWbdqjgqaEyH0shFiSJrVB1+Qqi4Tk19ccU6Aug== dependencies: escape-goat "^4.0.0" @@ -20500,7 +20500,7 @@ qs@6.9.7: qs@~6.5.2: version "6.5.3" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" + resolved "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== querystring@0.2.0: @@ -20572,7 +20572,7 @@ raw-body@^2.2.0: rc-config-loader@^4.1.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/rc-config-loader/-/rc-config-loader-4.1.0.tgz#208e797d773a2203473df10496cd75b5fd93740e" + resolved "https://registry.npmjs.org/rc-config-loader/-/rc-config-loader-4.1.0.tgz#208e797d773a2203473df10496cd75b5fd93740e" integrity sha512-aW+kX4qy0CiM9L4fG4Us3oEOpIrOrXzWykAn+xldD07Y9PXWjTH744oHbv0Kc9ZwWaylw3jMjxaf14RgStrNrA== dependencies: debug "^4.1.1" @@ -20582,7 +20582,7 @@ rc-config-loader@^4.1.0: rc@1.2.8, rc@^1.2.7, rc@^1.2.8: version "1.2.8" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + resolved "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== dependencies: deep-extend "^0.6.0" @@ -20604,7 +20604,7 @@ react-app-polyfill@^3.0.0: react-dev-utils@^12.0.1: version "12.0.1" - resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-12.0.1.tgz#ba92edb4a1f379bd46ccd6bcd4e7bc398df33e73" + resolved "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-12.0.1.tgz#ba92edb4a1f379bd46ccd6bcd4e7bc398df33e73" integrity sha512-84Ivxmr17KjUupyqzFode6xKhjwuEJDROWKJy/BthkL7Wn6NJ8h4WE6k/exAv6ImS+0oZLRRW5j/aINMHyeGeQ== dependencies: "@babel/code-frame" "^7.16.0" @@ -20643,7 +20643,7 @@ react-dom@^17.0.2: react-error-overlay@^6.0.11: version "6.0.11" - resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.11.tgz#92835de5841c5cf08ba00ddd2d677b6d17ff9adb" + resolved "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.11.tgz#92835de5841c5cf08ba00ddd2d677b6d17ff9adb" integrity sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg== react-fast-compare@^3.0.1: @@ -20828,7 +20828,7 @@ readdirp@~3.6.0: recursive-readdir@^2.2.2: version "2.2.3" - resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.3.tgz#e726f328c0d69153bcabd5c322d3195252379372" + resolved "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.3.tgz#e726f328c0d69153bcabd5c322d3195252379372" integrity sha512-8HrF5ZsXk5FAH9dgsx3BlUer73nIhuj+9OrQwEbLTPOBzGkL1lsFCR01am+v+0m2Cmbs1nP12hLDl5FA7EszKA== dependencies: minimatch "^3.0.5" @@ -20976,7 +20976,7 @@ registry-auth-token@^4.0.0: registry-auth-token@^5.0.1: version "5.0.1" - resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-5.0.1.tgz#5e6cd106e6c251135a046650c58476fc03e92833" + resolved "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.0.1.tgz#5e6cd106e6c251135a046650c58476fc03e92833" integrity sha512-UfxVOj8seK1yaIOiieV4FIP01vfBDLsY0H9sQzi9EbbUdJiuuBjJgLa1DpImXMNPnVkBD4eVxTEXcrZA6kfpJA== dependencies: "@pnpm/npm-conf" "^1.0.4" @@ -20990,7 +20990,7 @@ registry-url@^5.0.0: registry-url@^6.0.0: version "6.0.1" - resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-6.0.1.tgz#056d9343680f2f64400032b1e199faa692286c58" + resolved "https://registry.npmjs.org/registry-url/-/registry-url-6.0.1.tgz#056d9343680f2f64400032b1e199faa692286c58" integrity sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q== dependencies: rc "1.2.8" @@ -21035,7 +21035,7 @@ relay-runtime@12.0.0: remote-git-tags@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/remote-git-tags/-/remote-git-tags-3.0.0.tgz#424f8ec2cdea00bb5af1784a49190f25e16983c3" + resolved "https://registry.npmjs.org/remote-git-tags/-/remote-git-tags-3.0.0.tgz#424f8ec2cdea00bb5af1784a49190f25e16983c3" integrity sha512-C9hAO4eoEsX+OXA4rla66pXZQ+TLQ8T9dttgQj18yuKlPMTVkIkdYXvlMC55IuUsIkV6DpmQYi10JKFLaU+l7w== remove-trailing-separator@^1.0.1: @@ -21114,12 +21114,12 @@ require-main-filename@^2.0.0: requires-port@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + resolved "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= resolve-alpn@^1.0.0: version "1.2.1" - resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.2.1.tgz#b7adbdac3546aaaec20b45e7d8265927072726f9" + resolved "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz#b7adbdac3546aaaec20b45e7d8265927072726f9" integrity sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g== resolve-cwd@^3.0.0: @@ -21176,7 +21176,7 @@ resolve-url@^0.2.1: resolve.exports@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.0.tgz#5ce842b94b05146c0e03076985d1d0e7e48c90c9" + resolved "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz#5ce842b94b05146c0e03076985d1d0e7e48c90c9" integrity sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ== resolve@1.1.x: @@ -21220,14 +21220,14 @@ resolve@^2.0.0-next.3: resolve@~1.17.0: version "1.17.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + resolved "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== dependencies: path-parse "^1.0.6" resolve@~1.19.0: version "1.19.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" + resolved "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== dependencies: is-core-module "^2.1.0" @@ -21235,7 +21235,7 @@ resolve@~1.19.0: responselike@^2.0.0: version "2.0.1" - resolved "https://registry.yarnpkg.com/responselike/-/responselike-2.0.1.tgz#9a0bc8fdc252f3fb1cca68b016591059ba1422bc" + resolved "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz#9a0bc8fdc252f3fb1cca68b016591059ba1422bc" integrity sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw== dependencies: lowercase-keys "^2.0.0" @@ -21453,7 +21453,7 @@ scheduler@^0.20.2: schema-utils@2.7.0: version "2.7.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.7.0.tgz#17151f76d8eae67fbbf77960c33c676ad9f4efc7" + resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz#17151f76d8eae67fbbf77960c33c676ad9f4efc7" integrity sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A== dependencies: "@types/json-schema" "^7.0.4" @@ -21540,14 +21540,14 @@ semver-diff@^3.1.1: semver-diff@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-4.0.0.tgz#3afcf5ed6d62259f5c72d0d5d50dffbdc9680df5" + resolved "https://registry.npmjs.org/semver-diff/-/semver-diff-4.0.0.tgz#3afcf5ed6d62259f5c72d0d5d50dffbdc9680df5" integrity sha512-0Ju4+6A8iOnpL/Thra7dZsSlOHYAHIeMxfhWQRI1/VLcT3WDBZKKtQt/QkBOsiIN9ZpuvHE6cGZ0x4glCMmfiA== dependencies: semver "^7.3.5" semver-utils@^1.1.4: version "1.1.4" - resolved "https://registry.yarnpkg.com/semver-utils/-/semver-utils-1.1.4.tgz#cf0405e669a57488913909fc1c3f29bf2a4871e2" + resolved "https://registry.npmjs.org/semver-utils/-/semver-utils-1.1.4.tgz#cf0405e669a57488913909fc1c3f29bf2a4871e2" integrity sha512-EjnoLE5OGmDAVV/8YDoN5KiajNadjzIp9BAHOhYeQHt7j0UWxjmgsx4YD48wp4Ue1Qogq38F1GNUJNqF1kKKxA== "semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.6.0: @@ -21576,7 +21576,7 @@ semver@7.3.5: semver@7.x, semver@^7.0.0, semver@^7.1.1, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@~7.3.0: version "7.3.8" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" + resolved "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== dependencies: lru-cache "^6.0.0" @@ -21727,7 +21727,7 @@ shebang-regex@^3.0.0: shell-quote@^1.7.3: version "1.7.4" - resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.4.tgz#33fe15dee71ab2a81fcbd3a52106c5cfb9fb75d8" + resolved "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.4.tgz#33fe15dee71ab2a81fcbd3a52106c5cfb9fb75d8" integrity sha512-8o/QEhSSRb1a5i7TFR0iM4G16Z0vYB2OQVs4G3aAFXjn3T6yEx8AZxy1PgDF7I00LZHYA3WxaSYIf5e5sAX8Rw== shellwords@^0.1.1: @@ -21781,7 +21781,7 @@ should@^13.2.3: side-channel@^1.0.4: version "1.0.4" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + resolved "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== dependencies: call-bind "^1.0.0" @@ -21805,12 +21805,12 @@ signedsource@^1.0.0: simple-concat@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" + resolved "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== simple-get@^3.0.3: version "3.1.1" - resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-3.1.1.tgz#cc7ba77cfbe761036fbfce3d021af25fc5584d55" + resolved "https://registry.npmjs.org/simple-get/-/simple-get-3.1.1.tgz#cc7ba77cfbe761036fbfce3d021af25fc5584d55" integrity sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA== dependencies: decompress-response "^4.2.0" @@ -22052,7 +22052,7 @@ source-map@^0.5.0, source-map@^0.5.6, source-map@^0.5.7: source-map@^0.7.3: version "0.7.4" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== source-map@^0.8.0-beta.0: @@ -22076,7 +22076,7 @@ sourcemap-codec@^1.4.4: spawn-please@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/spawn-please/-/spawn-please-1.0.0.tgz#51cf5831ba2bf418aa3ec2102d40b75cfd48b6f2" + resolved "https://registry.npmjs.org/spawn-please/-/spawn-please-1.0.0.tgz#51cf5831ba2bf418aa3ec2102d40b75cfd48b6f2" integrity sha512-Kz33ip6NRNKuyTRo3aDWyWxeGeM0ORDO552Fs6E1nj4pLWPkl37SrRtTnq+MEopVaqgmaO6bAvVS+v64BJ5M/A== spdx-correct@^3.0.0: @@ -22202,7 +22202,7 @@ stack-utils@^2.0.2, stack-utils@^2.0.3: stackframe@^1.3.4: version "1.3.4" - resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-1.3.4.tgz#b881a004c8c149a5e8efef37d51b16e412943310" + resolved "https://registry.npmjs.org/stackframe/-/stackframe-1.3.4.tgz#b881a004c8c149a5e8efef37d51b16e412943310" integrity sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw== static-extend@^0.1.1: @@ -22252,12 +22252,12 @@ stream-shift@^1.0.0: streamsearch@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" + resolved "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== string-argv@~0.3.1: version "0.3.1" - resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" + resolved "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== string-env-interpolation@1.0.1: @@ -22314,7 +22314,7 @@ string-width@^2.1.0: string-width@^5.0.1, string-width@^5.1.2: version "5.1.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" + resolved "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== dependencies: eastasianwidth "^0.2.0" @@ -22466,7 +22466,7 @@ strip-indent@^3.0.0: strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1.1, strip-json-comments@~3.1.1: version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== strip-json-comments@~2.0.1: @@ -22638,7 +22638,7 @@ table@^6.0.9: table@^6.8.1: version "6.8.1" - resolved "https://registry.yarnpkg.com/table/-/table-6.8.1.tgz#ea2b71359fe03b017a5fbc296204471158080bdf" + resolved "https://registry.npmjs.org/table/-/table-6.8.1.tgz#ea2b71359fe03b017a5fbc296204471158080bdf" integrity sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA== dependencies: ajv "^8.0.1" @@ -22676,7 +22676,7 @@ tailwindcss@^3.0.2: tapable@^1.0.0: version "1.1.3" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" + resolved "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== tapable@^2.0.0, tapable@^2.1.1, tapable@^2.2.0: @@ -22774,7 +22774,7 @@ terser-webpack-plugin@^5.1.3, terser-webpack-plugin@^5.2.5: terser@^5.0.0, terser@^5.10.0, terser@^5.7.2: version "5.14.2" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.14.2.tgz#9ac9f22b06994d736174f4091aa368db896f1c10" + resolved "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz#9ac9f22b06994d736174f4091aa368db896f1c10" integrity sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA== dependencies: "@jridgewell/source-map" "^0.3.2" @@ -22813,7 +22813,7 @@ throat@^5.0.0: throat@^6.0.1: version "6.0.1" - resolved "https://registry.yarnpkg.com/throat/-/throat-6.0.1.tgz#d514fedad95740c12c2d7fc70ea863eb51ade375" + resolved "https://registry.npmjs.org/throat/-/throat-6.0.1.tgz#d514fedad95740c12c2d7fc70ea863eb51ade375" integrity sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w== through2@^2.0.0, through2@^2.0.1, through2@^2.0.3: @@ -22843,7 +22843,7 @@ thunky@^1.0.2: tiny-async-pool@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/tiny-async-pool/-/tiny-async-pool-2.1.0.tgz#3ec126568c18a7916912fb9fbecf812337ec6b84" + resolved "https://registry.npmjs.org/tiny-async-pool/-/tiny-async-pool-2.1.0.tgz#3ec126568c18a7916912fb9fbecf812337ec6b84" integrity sha512-ltAHPh/9k0STRQqaoUX52NH4ZQYAJz24ZAEwf1Zm+HYg3l9OXTWeqWKyYsHu40wF/F0rxd2N2bk5sLvX2qlSvg== title-case@^3.0.3: @@ -23019,7 +23019,7 @@ ts-invariant@^0.4.0: ts-jest@^27.0.0: version "27.1.5" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.1.5.tgz#0ddf1b163fbaae3d5b7504a1e65c914a95cff297" + resolved "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.5.tgz#0ddf1b163fbaae3d5b7504a1e65c914a95cff297" integrity sha512-Xv6jBQPoBEvBq/5i2TeSG9tt/nqkbpcurrEG1b+2yfBrcJelOZF9Ml6dmyMh7bcW9JyFbRYpR5rxROSlBLTZHA== dependencies: bs-logger "0.x" @@ -23126,7 +23126,7 @@ tsconfig-paths@^3.14.1, tsconfig-paths@^3.9.0: tsconfig-paths@^4.1.2: version "4.1.2" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-4.1.2.tgz#4819f861eef82e6da52fb4af1e8c930a39ed979a" + resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.1.2.tgz#4819f861eef82e6da52fb4af1e8c930a39ed979a" integrity sha512-uhxiMgnXQp1IR622dUXI+9Ehnws7i/y6xvpZB9IbUVOPy0muvdvgXeZOn88UcGPiT98Vp3rJPTa8bFoalZ3Qhw== dependencies: json5 "^2.2.2" @@ -23140,7 +23140,7 @@ tslib@^1.10.0, tslib@^1.11.1, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1 tslib@^2, tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@~2.3.0: version "2.3.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" + resolved "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== tslib@^2.1.0, tslib@^2.3.0, tslib@^2.4.0: @@ -23160,7 +23160,7 @@ tslib@~2.2.0: tslib@~2.4.0: version "2.4.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" + resolved "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA== tsutils@^3.21.0: @@ -23238,12 +23238,12 @@ type-fest@^0.8.1: type-fest@^1.0.1: version "1.4.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1" integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== type-fest@^2.13.0: version "2.19.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.19.0.tgz#88068015bb33036a598b952e55e9311a60fd3a9b" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz#88068015bb33036a598b952e55e9311a60fd3a9b" integrity sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA== type-is@~1.6.18: @@ -23301,7 +23301,7 @@ typescript@^4.4.3: typescript@^4.5.5: version "4.5.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3" + resolved "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3" integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA== typescript@^4.6.3: @@ -23311,22 +23311,22 @@ typescript@^4.6.3: typescript@^4.9.4: version "4.9.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" + resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== typescript@~4.8.3, typescript@~4.8.4: version "4.8.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6" + resolved "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6" integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ== ua-parser-js@^0.7.30: version "0.7.33" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.33.tgz#1d04acb4ccef9293df6f70f2c3d22f3030d8b532" + resolved "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.33.tgz#1d04acb4ccef9293df6f70f2c3d22f3030d8b532" integrity sha512-s8ax/CeZdK9R/56Sui0WM6y9OFREJarMRHqLB2EwkovemBxNQ+Bqu8GAsUnVcXKgphb++ghr/B2BZx4mahujPw== uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" - resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" + resolved "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== uglify-js@^3.1.4: @@ -23366,7 +23366,7 @@ unc-path-regex@^0.1.2: undici@^4.9.3, undici@^5.8.0: version "5.21.0" - resolved "https://registry.yarnpkg.com/undici/-/undici-5.21.0.tgz#b00dfc381f202565ab7f52023222ab862bb2494f" + resolved "https://registry.npmjs.org/undici/-/undici-5.21.0.tgz#b00dfc381f202565ab7f52023222ab862bb2494f" integrity sha512-HOjK8l6a57b2ZGXOcUsI5NLfoTrfmbOl90ixJDl0AEFG4wgHNDQxtZy15/ZQp7HhjkpaGlp/eneMgtsu1dIlUA== dependencies: busboy "^1.6.0" @@ -23432,7 +23432,7 @@ unique-string@^2.0.0: unique-string@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-3.0.0.tgz#84a1c377aff5fd7a8bc6b55d8244b2bd90d75b9a" + resolved "https://registry.npmjs.org/unique-string/-/unique-string-3.0.0.tgz#84a1c377aff5fd7a8bc6b55d8244b2bd90d75b9a" integrity sha512-VGXBUVwxKMBUznyffQweQABPRRW1vHZAbadFZud4pLFAqRGvv/96vafgjWFqzourzr8YonlQiPgH0YCJfawoGQ== dependencies: crypto-random-string "^4.0.0" @@ -23530,7 +23530,7 @@ update-notifier@^5.1.0: update-notifier@^6.0.2: version "6.0.2" - resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-6.0.2.tgz#a6990253dfe6d5a02bd04fbb6a61543f55026b60" + resolved "https://registry.npmjs.org/update-notifier/-/update-notifier-6.0.2.tgz#a6990253dfe6d5a02bd04fbb6a61543f55026b60" integrity sha512-EDxhTEVPZZRLWYcJ4ZXjGFN0oP7qYvbXWzEgRm/Yql4dHX5wDbvh89YHP6PK1lzZJYrMtXUuZZz8XGK+U6U1og== dependencies: boxen "^7.0.0" @@ -23564,7 +23564,7 @@ upper-case@^2.0.2: uri-js@^4.2.2: version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== dependencies: punycode "^2.1.0" @@ -23651,7 +23651,7 @@ uuid@3.x, uuid@^3.0.0, uuid@^3.2.1, uuid@^3.3.2: uuid@8.0.0: version "8.0.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.0.0.tgz#bc6ccf91b5ff0ac07bbcdbf1c7c4e150db4dbb6c" + resolved "https://registry.npmjs.org/uuid/-/uuid-8.0.0.tgz#bc6ccf91b5ff0ac07bbcdbf1c7c4e150db4dbb6c" integrity sha512-jOXGuXZAWdsTH7eZLtyXMqUb9EcWMGZNbL9YcGBJl4MH4nrxHmZJhEHvyLFrkxo+28uLb/NYRcStH48fnD0Vzw== uuid@^8.0.0, uuid@^8.3.0, uuid@^8.3.2: @@ -23680,7 +23680,7 @@ v8-to-istanbul@^7.0.0: v8-to-istanbul@^8.1.0: version "8.1.1" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz#77b752fd3975e31bbcef938f85e9bd1c7a8d60ed" + resolved "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz#77b752fd3975e31bbcef938f85e9bd1c7a8d60ed" integrity sha512-FGtKtv3xIpR6BYhvgH8MI/y78oT7d8Au3ww4QIxymrCtZEh5b8gCw2siywE+puhEmuWKDtmfrvF5UlB298ut3w== dependencies: "@types/istanbul-lib-coverage" "^2.0.1" @@ -23716,7 +23716,7 @@ validate-npm-package-name@^4.0.0: validator@^13.7.0: version "13.7.0" - resolved "https://registry.yarnpkg.com/validator/-/validator-13.7.0.tgz#4f9658ba13ba8f3d82ee881d3516489ea85c0857" + resolved "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz#4f9658ba13ba8f3d82ee881d3516489ea85c0857" integrity sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw== value-or-promise@1.0.11, value-or-promise@^1.0.11: @@ -23726,7 +23726,7 @@ value-or-promise@1.0.11, value-or-promise@^1.0.11: value-or-promise@1.0.12: version "1.0.12" - resolved "https://registry.yarnpkg.com/value-or-promise/-/value-or-promise-1.0.12.tgz#0e5abfeec70148c78460a849f6b003ea7986f15c" + resolved "https://registry.npmjs.org/value-or-promise/-/value-or-promise-1.0.12.tgz#0e5abfeec70148c78460a849f6b003ea7986f15c" integrity sha512-Z6Uz+TYwEqE7ZN50gwn+1LCVo9ZVrpxRPOhOLnncYkY1ZzOYtrX8Fwf/rFktZ8R5mJms6EZf5TqNOMeZmnPq9Q== vary@^1, vary@~1.1.2: @@ -23750,7 +23750,7 @@ verror@1.10.0: vm2@^3.9.3, vm2@^3.9.8: version "3.9.11" - resolved "https://registry.yarnpkg.com/vm2/-/vm2-3.9.11.tgz#a880f510a606481719ec3f9803b940c5805a06fe" + resolved "https://registry.npmjs.org/vm2/-/vm2-3.9.11.tgz#a880f510a606481719ec3f9803b940c5805a06fe" integrity sha512-PFG8iJRSjvvBdisowQ7iVF580DXb1uCIiGaXgm7tynMR1uTBlv7UJlB1zdv5KJ+Tmq1f0Upnj3fayoEOPpCBKg== dependencies: acorn "^8.7.0" @@ -23810,7 +23810,7 @@ warning@^4.0.2: watchpack@^2.4.0: version "2.4.0" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d" + resolved "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d" integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg== dependencies: glob-to-regexp "^0.4.1" @@ -23937,7 +23937,7 @@ webpack-sources@^3.2.3: webpack@^5.64.4: version "5.76.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.76.0.tgz#f9fb9fb8c4a7dbdcd0d56a98e56b8a942ee2692c" + resolved "https://registry.npmjs.org/webpack/-/webpack-5.76.0.tgz#f9fb9fb8c4a7dbdcd0d56a98e56b8a942ee2692c" integrity sha512-l5sOdYBDunyf72HW8dF23rFtWq/7Zgvt/9ftMof71E/yUb1YLOBmTgA2K4vQthB3kotMrSj609txVE0dnr2fjA== dependencies: "@types/eslint-scope" "^3.7.3" @@ -23988,7 +23988,7 @@ whatwg-encoding@^1.0.5: whatwg-fetch@^2.0.4: version "2.0.4" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" + resolved "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" integrity sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng== whatwg-fetch@^3.4.1, whatwg-fetch@^3.6.2: @@ -24085,7 +24085,7 @@ widest-line@^3.1.0: widest-line@^4.0.1: version "4.0.1" - resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-4.0.1.tgz#a0fc673aaba1ea6f0a0d35b3c2795c9a9cc2ebf2" + resolved "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz#a0fc673aaba1ea6f0a0d35b3c2795c9a9cc2ebf2" integrity sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig== dependencies: string-width "^5.0.1" @@ -24335,7 +24335,7 @@ wrap-ansi@^7.0.0: wrap-ansi@^8.0.1: version "8.0.1" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.0.1.tgz#2101e861777fec527d0ea90c57c6b03aac56a5b3" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.0.1.tgz#2101e861777fec527d0ea90c57c6b03aac56a5b3" integrity sha512-QFF+ufAqhoYHvoHdajT/Po7KoXVBPXS2bgjIam5isfWJPfIOnQZ50JtUiVvCv/sjgacf3yRrt2ZKUZ/V4itN4g== dependencies: ansi-styles "^6.1.0" @@ -24433,7 +24433,7 @@ ws@^8.4.2: ws@^8.5.0: version "8.8.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.8.1.tgz#5dbad0feb7ade8ecc99b830c1d77c913d4955ff0" + resolved "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz#5dbad0feb7ade8ecc99b830c1d77c913d4955ff0" integrity sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA== xcode@^2.1.0: @@ -24451,7 +24451,7 @@ xdg-basedir@^4.0.0: xdg-basedir@^5.0.1, xdg-basedir@^5.1.0: version "5.1.0" - resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-5.1.0.tgz#1efba19425e73be1bc6f2a6ceb52a3d2c884c0c9" + resolved "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-5.1.0.tgz#1efba19425e73be1bc6f2a6ceb52a3d2c884c0c9" integrity sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ== xml-js@^1.6.11: @@ -24531,7 +24531,7 @@ yaml@1.10.2, yaml@^1.10.0, yaml@^1.10.2, yaml@^1.7.2: yaml@^2.1.1: version "2.1.1" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.1.1.tgz#1e06fb4ca46e60d9da07e4f786ea370ed3c3cfec" + resolved "https://registry.npmjs.org/yaml/-/yaml-2.1.1.tgz#1e06fb4ca46e60d9da07e4f786ea370ed3c3cfec" integrity sha512-o96x3OPo8GjWeSLF+wOAbrPfhFOGY0W00GNaxCDv+9hkcDJEnev1yh8S7pgHF0ik6zc8sQLuL8hjHjJULZp8bw== yaml@^2.2.1: @@ -24551,7 +24551,7 @@ yargs-parser@20.x, yargs-parser@^20.2.2, yargs-parser@^20.2.3: yargs-parser@21.1.1, yargs-parser@^21.0.0, yargs-parser@^21.1.1: version "21.1.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== yargs-parser@^18.1.2: @@ -24617,7 +24617,7 @@ yargs@^17.0.0, yargs@^17.1.1: yargs@^17.6.2: version "17.6.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.6.2.tgz#2e23f2944e976339a1ee00f18c77fedee8332541" + resolved "https://registry.npmjs.org/yargs/-/yargs-17.6.2.tgz#2e23f2944e976339a1ee00f18c77fedee8332541" integrity sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw== dependencies: cliui "^8.0.1" @@ -24643,7 +24643,7 @@ yn@3.1.1: yocto-queue@^0.1.0: version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== yup@^0.32.11: @@ -24661,7 +24661,7 @@ yup@^0.32.11: z-schema@~5.0.2: version "5.0.4" - resolved "https://registry.yarnpkg.com/z-schema/-/z-schema-5.0.4.tgz#ecad8bc5ef3283ae032d603286386cfb1380cce5" + resolved "https://registry.npmjs.org/z-schema/-/z-schema-5.0.4.tgz#ecad8bc5ef3283ae032d603286386cfb1380cce5" integrity sha512-gm/lx3hDzJNcLwseIeQVm1UcwhWIKpSB4NqH89pTBtFns4k/HDHudsICtvG05Bvw/Mv3jMyk700y5dadueLHdA== dependencies: lodash.get "^4.4.2" From 32dab01a71b4a508c5f136aad6cd217c696197cd Mon Sep 17 00:00:00 2001 From: Kamil Sobol Date: Thu, 23 Mar 2023 17:20:31 -0700 Subject: [PATCH 15/84] fix: set registry in build steps (#12303) * fix: standalone test build * fix: standalone test build --- .circleci/config.base.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.base.yml b/.circleci/config.base.yml index 9f473197591..56eedf8f307 100644 --- a/.circleci/config.base.yml +++ b/.circleci/config.base.yml @@ -107,6 +107,7 @@ jobs: executor: l_xlarge steps: - checkout + - run: yarn config set registry https://registry.npmjs.org - run: yarn config set script-shell $(which bash) - run: yarn run production-build - run: @@ -132,6 +133,7 @@ jobs: executor: l_xlarge steps: - checkout + - run: yarn config set registry https://registry.npmjs.org - run: yarn config set script-shell $(which bash) - run: yarn install - run: From e93fe0995c36cf5a9d2c3cbc79d6d5a17a746e66 Mon Sep 17 00:00:00 2001 From: akshbhu <39866697+akshbhu@users.noreply.github.com> Date: Fri, 24 Mar 2023 12:44:54 -0400 Subject: [PATCH 16/84] fix: throws a warning for detector (#12307) * fix: throws a warning for detector * fix: address comments * chore: fix unit test header --- .../print-cdk-migration-warning.test.ts | 36 +++++++++++++++++++ .../src/print-cdk-migration-warning.ts | 28 ++++++++------- 2 files changed, 52 insertions(+), 12 deletions(-) diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/print-cdk-migration-warning.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/print-cdk-migration-warning.test.ts index c22ffb4e345..af06fe40699 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/print-cdk-migration-warning.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/print-cdk-migration-warning.test.ts @@ -52,6 +52,42 @@ const mockContext = { describe('print migration warning tests', () => { beforeEach(() => jest.clearAllMocks()); + it('no migration message when detector failed for some reason', async () => { + const resourcesToBeCreated = [ + { + category: 'function', + resourceName: 'someResource', + service: 'Lambda', + }, + ]; + const resourcesToBeDeleted = [ + { + category: 'auth', + resourceName: 'someResource1', + service: 'Cognito', + }, + ]; + const resourcesToBeUpdated = [ + { + category: 'storage', + resourceName: 'someResource2', + service: 'S3', + }, + ]; + + const allResources = [...resourcesToBeCreated, ...resourcesToBeDeleted, ...resourcesToBeUpdated]; + mockContext.amplify.getResourceStatus.mockResolvedValue({ allResources }); + // amplify-node-detector plug + detectAffectedDirectDependenciesMock.mockImplementation(() => { + throw new Error(); + }); + // override plug + fsMock.existsSync.mockReturnValue(false); + printerMock.warn.mockReturnValue(undefined); + await printCdkMigrationWarning(mockContext as unknown as $TSContext); + expect(printerMock.warn).not.toBeCalled(); + }); + it('no migration message when there are no override and custom resources', async () => { const resourcesToBeCreated = [ { diff --git a/packages/amplify-provider-awscloudformation/src/print-cdk-migration-warning.ts b/packages/amplify-provider-awscloudformation/src/print-cdk-migration-warning.ts index 3a48391d4ae..b660c53ad11 100644 --- a/packages/amplify-provider-awscloudformation/src/print-cdk-migration-warning.ts +++ b/packages/amplify-provider-awscloudformation/src/print-cdk-migration-warning.ts @@ -22,19 +22,23 @@ export type AmplifyWarning = { * print cdk migration warning if required */ export const printCdkMigrationWarning = async (context: $TSContext): Promise => { - const resourcesToBuild: IAmplifyResource[] = []; - const { allResources } = await context.amplify.getResourceStatus(); - allResources.forEach((resource) => { - resourcesToBuild.push({ - service: resource.service as string, - category: resource.category as string, - resourceName: resource.resourceName as string, + try { + const resourcesToBuild: IAmplifyResource[] = []; + const { allResources } = await context.amplify.getResourceStatus(); + allResources.forEach((resource) => { + resourcesToBuild.push({ + service: resource.service as string, + category: resource.category as string, + resourceName: resource.resourceName as string, + }); }); - }); - // check for override.ts file enabled - const migrationString = getMigrationMessage(resourcesToBuild); - if (!_.isEmpty(migrationString)) { - printer.warn(migrationString); + // check for override.ts file enabled + const migrationString = getMigrationMessage(resourcesToBuild); + if (!_.isEmpty(migrationString)) { + printer.warn(migrationString); + } + } catch (error) { + // suppress error if cdk detection fails for some reason } }; From f3c9a168383c934db49818739d6c5971ac5a7dd6 Mon Sep 17 00:00:00 2001 From: Kamil Sobol Date: Fri, 24 Mar 2023 10:42:08 -0700 Subject: [PATCH 17/84] chore: don't show deprecation warnings in binary (#12309) --- packages/amplify-cli/bin/amplify | 4 ++++ packages/amplify-cli/bin/amplify.production.template | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/packages/amplify-cli/bin/amplify b/packages/amplify-cli/bin/amplify index b323701baa4..8c387d122ae 100755 --- a/packages/amplify-cli/bin/amplify +++ b/packages/amplify-cli/bin/amplify @@ -4,6 +4,10 @@ // this file should be a duplicate of amplify.production.template except for the CLI_ENV value process.env.CLI_ENV = 'development'; +// suppress deprecation warnings +process.env.AWS_SDK_JS_SUPPRESS_MAINTENANCE_MODE_MESSAGE = '1'; +process['noDeprecation'] = true; + const startTime = Date.now(); if (process.pkg) { require('../lib/utils/copy-override').copyOverride(); diff --git a/packages/amplify-cli/bin/amplify.production.template b/packages/amplify-cli/bin/amplify.production.template index 5cf43f61b62..da34eab1370 100755 --- a/packages/amplify-cli/bin/amplify.production.template +++ b/packages/amplify-cli/bin/amplify.production.template @@ -4,6 +4,10 @@ // this file should be a duplicate of amplify except for the CLI_ENV value process.env.CLI_ENV = 'production'; +// suppress deprecation warnings +process.env.AWS_SDK_JS_SUPPRESS_MAINTENANCE_MODE_MESSAGE = '1'; +process['noDeprecation'] = true; + const startTime = Date.now(); if (process.pkg) { require('../lib/utils/copy-override').copyOverride(); From 73dc3614a687658bd01a958abb8bcff6eb874f32 Mon Sep 17 00:00:00 2001 From: Zachary Goldberg Date: Fri, 24 Mar 2023 11:49:54 -0600 Subject: [PATCH 18/84] fix: enable help for category statuses (#12216) * fix: enable help for category statuses * test: add e2e test for status with help --- .../src/help/commands-info.ts | 66 +++++++++++++++++-- packages/amplify-cli/src/input-manager.ts | 17 ++++- packages/amplify-e2e-core/src/utils/help.ts | 17 +++++ packages/amplify-e2e-core/src/utils/index.ts | 1 + .../src/__tests__/help.test.ts | 33 ++++++++++ 5 files changed, 127 insertions(+), 7 deletions(-) create mode 100644 packages/amplify-e2e-core/src/utils/help.ts create mode 100644 packages/amplify-e2e-tests/src/__tests__/help.test.ts diff --git a/packages/amplify-cli-core/src/help/commands-info.ts b/packages/amplify-cli-core/src/help/commands-info.ts index 0f5261845cf..486fd23dea5 100644 --- a/packages/amplify-cli-core/src/help/commands-info.ts +++ b/packages/amplify-cli-core/src/help/commands-info.ts @@ -374,17 +374,71 @@ export const commandsInfo: Array = [ ], subCommands: [ { - subCommand: '[category]', - subCommandDescription: 'Shows the state of local resources not yet pushed to the cloud', - subCommandUsage: 'amplify status [category] [-v | --verbose]', + subCommand: 'notifications', + subCommandDescription: 'Lists the enabled/disabled statuses of the available notification channels', + subCommandUsage: 'amplify notifications status', + subCommandFlags: [], + }, + { + subCommand: 'api', + subCommandDescription: 'Displays the current status of your API', + subCommandUsage: 'amplify api status [-acm ]', subCommandFlags: [ { - short: 'v', - long: 'verbose', - flagDescription: 'Shows verbose details, including cloudformation differences', + short: 'acm', + long: '', + flagDescription: 'Displays the access control matrix', }, ], }, + { + subCommand: 'auth', + subCommandDescription: 'Displays the current status of your auth resource', + subCommandUsage: 'amplify auth status', + subCommandFlags: [], + }, + { + subCommand: 'custom', + subCommandDescription: 'Displays the current status of your custom resource', + subCommandUsage: 'amplify custom status', + subCommandFlags: [], + }, + { + subCommand: 'storage', + subCommandDescription: 'Displays the current status of your storage resource', + subCommandUsage: 'amplify storage status', + subCommandFlags: [], + }, + { + subCommand: 'analytics', + subCommandDescription: 'Displays the current status of your analytics resource', + subCommandUsage: 'amplify analytics status', + subCommandFlags: [], + }, + { + subCommand: 'function', + subCommandDescription: 'Displays the current status of your function resource', + subCommandUsage: 'amplify function status', + subCommandFlags: [], + }, + { + subCommand: 'hosting', + subCommandDescription: 'Displays the current status of your hosting', + subCommandUsage: 'amplify hosting status', + subCommandFlags: [], + }, + { + subCommand: 'interactions', + subCommandDescription: 'Displays the current status of your interactions resource', + subCommandUsage: 'amplify interactions status', + subCommandFlags: [], + }, + { + subCommand: 'predictions', + subCommandDescription: 'Displays the current status of your predictions resource', + subCommandUsage: 'amplify predictions status', + subCommandFlags: [], + }, ], }, { diff --git a/packages/amplify-cli/src/input-manager.ts b/packages/amplify-cli/src/input-manager.ts index b593bf69dae..3e9ff51c20a 100644 --- a/packages/amplify-cli/src/input-manager.ts +++ b/packages/amplify-cli/src/input-manager.ts @@ -1,5 +1,5 @@ // normalize command line arguments, allow verb / noun place switch -import { constants, PluginPlatform, pathManager, stateManager } from 'amplify-cli-core'; +import { constants, PluginPlatform, pathManager, stateManager, commandsInfo } from 'amplify-cli-core'; import { getPluginsWithName, getAllPluginNames } from './plugin-manager'; import { InputVerificationResult } from './domain/input-verification-result'; import { insertAmplifyIgnore } from './extensions/amplify-helpers/git-manager'; @@ -84,6 +84,21 @@ function preserveHelpInformation(input: CLIInput): CLIInput { subCommands.unshift(input.plugin); } } + + if (input.command == 'status' && input.options) { + const statusSubcommands = commandsInfo + .find((commandInfo) => commandInfo.command == 'status') + ?.subCommands.map((subCommandInfo) => subCommandInfo.subCommand); + const potentialStatusSubcommands: Array = statusSubcommands ? statusSubcommands : []; + const optionKeys = Object.keys(input.options); + for (const potentialSubcommand of potentialStatusSubcommands) { + if (optionKeys.includes(potentialSubcommand)) { + subCommands.push(potentialSubcommand); + break; + } + } + } + if (input.options) { input.options[constants.HELP] = true; delete input.options[constants.HELP_SHORT]; diff --git a/packages/amplify-e2e-core/src/utils/help.ts b/packages/amplify-e2e-core/src/utils/help.ts new file mode 100644 index 00000000000..d272db4c38d --- /dev/null +++ b/packages/amplify-e2e-core/src/utils/help.ts @@ -0,0 +1,17 @@ +import { getCLIPath, nspawn as spawn } from '..'; + +export const statusWithHelp = async (cwd: string, expectedContents: Array): Promise => { + const chain = spawn(getCLIPath(), ['status', '-h'], { cwd, stripColors: true }); + for (const expectedLine of expectedContents) { + chain.wait(expectedLine); + } + await chain.runAsync(); +}; + +export const statusForCategoryWithHelp = async (cwd: string, category: string, expectedContents: Array): Promise => { + const chain = spawn(getCLIPath(), ['status', category, '-h'], { cwd, stripColors: true }); + for (const expectedLine of expectedContents) { + chain.wait(expectedLine); + } + await chain.runAsync(); +}; diff --git a/packages/amplify-e2e-core/src/utils/index.ts b/packages/amplify-e2e-core/src/utils/index.ts index 4864e491677..71d4d5fb8d7 100644 --- a/packages/amplify-e2e-core/src/utils/index.ts +++ b/packages/amplify-e2e-core/src/utils/index.ts @@ -27,6 +27,7 @@ export * from './transformConfig'; export * from './admin-ui'; export * from './hooks'; export * from './git-operations'; +export * from './help'; /** * Whether the current environment is CircleCI or not diff --git a/packages/amplify-e2e-tests/src/__tests__/help.test.ts b/packages/amplify-e2e-tests/src/__tests__/help.test.ts new file mode 100644 index 00000000000..a72c29c5b13 --- /dev/null +++ b/packages/amplify-e2e-tests/src/__tests__/help.test.ts @@ -0,0 +1,33 @@ +import { + createNewProjectDir, + initJSProjectWithProfile, + deleteProject, + deleteProjectDir, + statusWithHelp, + statusForCategoryWithHelp, + addS3AndAuthWithAuthOnlyAccess, + amplifyPushAuth, +} from '@aws-amplify/amplify-e2e-core'; + +describe('help happy paths', () => { + let projRoot: string; + beforeAll(async () => { + projRoot = await createNewProjectDir('help-happy-paths'); + await initJSProjectWithProfile(projRoot, {}); + await addS3AndAuthWithAuthOnlyAccess(projRoot); + await amplifyPushAuth(projRoot); + }); + + afterAll(async () => { + await deleteProject(projRoot); + deleteProjectDir(projRoot); + }); + + test('amplify status', async () => { + await statusWithHelp(projRoot, ['USAGE', 'amplify status [-v | --verbose]']); + }); + + test('amplify status storage', async () => { + await statusForCategoryWithHelp(projRoot, 'storage', ['USAGE', 'amplify storage status']); + }); +}); From 3ce8be6688e0c23d97bd63e4685fb5e50c962ef5 Mon Sep 17 00:00:00 2001 From: Pavel Lazar <85319655+lazpavel@users.noreply.github.com> Date: Fri, 24 Mar 2023 16:54:05 -0400 Subject: [PATCH 19/84] fix: handle bucket exists check for s3 buckets in opt in regions (#12298) * fix: handle bucket exists check for s3 buckets in opt in regions --- .../package.json | 2 +- .../src/__tests__/aws-utils/S3Service.test.ts | 60 ++++++++++++++++ .../src/aws-utils/S3Service.ts | 72 +++++++++++-------- 3 files changed, 104 insertions(+), 30 deletions(-) create mode 100644 packages/amplify-provider-awscloudformation/src/__tests__/aws-utils/S3Service.test.ts diff --git a/packages/amplify-provider-awscloudformation/package.json b/packages/amplify-provider-awscloudformation/package.json index aa01a737f08..a92ca27aa3a 100644 --- a/packages/amplify-provider-awscloudformation/package.json +++ b/packages/amplify-provider-awscloudformation/package.json @@ -90,7 +90,7 @@ "transform": { "^.+\\.tsx?$": "ts-jest" }, - "testRegex": "(src/__tests__/.*.test.(t|j)s)$", + "testRegex": "((\\.|/)(test|spec))\\.(jsx?|tsx?)$", "moduleFileExtensions": [ "ts", "tsx", diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/aws-utils/S3Service.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/aws-utils/S3Service.test.ts new file mode 100644 index 00000000000..5659769dbbe --- /dev/null +++ b/packages/amplify-provider-awscloudformation/src/__tests__/aws-utils/S3Service.test.ts @@ -0,0 +1,60 @@ +import { $TSContext } from 'amplify-cli-core'; +import { createS3Service } from '../../aws-utils/S3Service'; + +jest.mock('aws-sdk', () => { + const mockHeadBucketForUsEast1 = jest.fn().mockImplementation((params: { Bucket: string }) => { + return { + promise: jest.fn().mockImplementation(() => { + if (params.Bucket.includes('us-east-1')) { + return Promise.resolve({}); + } + return Promise.reject({ code: 'BadRequest', region: 'eu-south-1' }); + }), + }; + }); + + const mockHeadBucketForEuSouth1 = jest.fn().mockImplementation((params) => { + return { + promise: jest.fn().mockImplementation(() => { + if (params.Bucket.includes('eu-south-1')) { + return Promise.resolve({}); + } + return Promise.reject({ code: 'BadRequest', region: 'us-east-1' }); + }), + }; + }); + + return { + S3: jest.fn((options) => { + const region = options.region || 'us-east-1'; + if (region === 'eu-south-1') { + return { + headBucket: mockHeadBucketForEuSouth1, + }; + } + return { + config: { + region, + }, + headBucket: mockHeadBucketForUsEast1, + }; + }), + }; +}); + +describe('S3Service', () => { + const bucketNameUsEast = `test-bucket-us-east-1-${Math.floor(Math.random() * 100000)}`; + const bucketNameEuSouth = `test-bucket-eu-south-1-${Math.floor(Math.random() * 100000)}`; + + it('should correctly return if bucket exists in NON opt-in region', async () => { + const s3service = await createS3Service({} as unknown as $TSContext); + const bucketExists = await s3service.bucketExists(bucketNameUsEast); + expect(bucketExists).toBe(true); + }); + + it('should correctly return if bucket exists in opt-in region', async () => { + const s3service = await createS3Service({} as unknown as $TSContext); + const bucketExists = await s3service.bucketExists(bucketNameEuSouth); + expect(bucketExists).toBe(true); + }); +}); diff --git a/packages/amplify-provider-awscloudformation/src/aws-utils/S3Service.ts b/packages/amplify-provider-awscloudformation/src/aws-utils/S3Service.ts index 62b584237fd..aa996cdc0d5 100644 --- a/packages/amplify-provider-awscloudformation/src/aws-utils/S3Service.ts +++ b/packages/amplify-provider-awscloudformation/src/aws-utils/S3Service.ts @@ -1,18 +1,12 @@ -import { $TSAny, $TSContext, AmplifyFault } from 'amplify-cli-core'; +import { $TSContext, AmplifyFault } from 'amplify-cli-core'; import { IS3Service } from '@aws-amplify/amplify-util-import'; -import S3, { Bucket } from 'aws-sdk/clients/s3'; -import { loadConfiguration } from '../configuration-manager'; +import { S3 } from 'aws-sdk'; +import { Bucket } from 'aws-sdk/clients/s3'; +import { AwsSecrets, loadConfiguration } from '../configuration-manager'; -export const createS3Service = async (context: $TSContext, options: $TSAny): Promise => { - let credentials = {}; - - try { - credentials = await loadConfiguration(context); - } catch (e) { - // could not load credentials - } - - const s3 = new S3({ ...credentials, ...options }); +export const createS3Service = async (context: $TSContext): Promise => { + const credentials = await tryGetCredentials(context); + const s3 = new S3({ ...credentials }); return new S3Service(s3); }; @@ -27,36 +21,33 @@ export class S3Service implements IS3Service { const response = await this.s3.listBuckets().promise(); if (response.Buckets) { - this.cachedBucketList.push(...response.Buckets!); + this.cachedBucketList.push(...response.Buckets); } } return this.cachedBucketList; } - public async bucketExists(bucketName: string): Promise { + private async checkIfBucketExists(bucketName: string, s3?: S3): Promise { + const s3Client = s3 ?? this.s3; try { - const response = await this.s3 - .headBucket({ - Bucket: bucketName, - }) - .promise(); + const response = await s3Client.headBucket({ Bucket: bucketName }).promise(); // If the return object has no keys then it means successful empty object was returned. return Object.keys(response).length === 0; } catch (error) { - if (error.code === 'NotFound') { - return false; + // workaround for S3 service bug causing headBucket for a opt-in region bucket to respond with BadRequest if s3 client is initialized with a different region + if (error.region !== s3Client.config.region && error.code === 'BadRequest') { + return this.checkIfBucketExists(bucketName, new S3({ ...s3Client.config?.credentials, region: error.region })); } - throw new AmplifyFault( - 'UnknownFault', - { - message: error.message, - }, - error, - ); + + return handleS3Error(error); } } + public async bucketExists(bucketName: string): Promise { + return this.checkIfBucketExists(bucketName); + } + public async getBucketLocation(bucketName: string): Promise { const response = await this.s3 .getBucketLocation({ @@ -72,3 +63,26 @@ export class S3Service implements IS3Service { return response.LocationConstraint; } } + +const handleS3Error = (error: { code: string; message: string }): boolean => { + if (error.code === 'NotFound') { + return false; + } + throw new AmplifyFault( + 'UnknownFault', + { + message: error.message, + }, + error as unknown as Error, + ); +}; + +const tryGetCredentials = async (context: $TSContext): Promise => { + try { + return await loadConfiguration(context); + } catch (e) { + // could not load credentials + } + + return {}; +}; From 0ff6b6db612dea90b39a12e858931f7051266239 Mon Sep 17 00:00:00 2001 From: Zachary Goldberg Date: Fri, 24 Mar 2023 16:21:24 -0600 Subject: [PATCH 20/84] test: add e2e tests for push, init, pull, env with help flag (#12310) * test: add e2e tests for push, init, pull, env * test: add e2e tests for push, init, pull, env (commit to restart build) --- packages/amplify-e2e-core/src/utils/help.ts | 55 +++++++++++++++++-- .../src/__tests__/help.test.ts | 28 ++++++++-- 2 files changed, 73 insertions(+), 10 deletions(-) diff --git a/packages/amplify-e2e-core/src/utils/help.ts b/packages/amplify-e2e-core/src/utils/help.ts index d272db4c38d..301f5cdf109 100644 --- a/packages/amplify-e2e-core/src/utils/help.ts +++ b/packages/amplify-e2e-core/src/utils/help.ts @@ -1,16 +1,63 @@ import { getCLIPath, nspawn as spawn } from '..'; -export const statusWithHelp = async (cwd: string, expectedContents: Array): Promise => { +export const statusWithHelp = async (cwd: string): Promise => { + const expectedLines = ['USAGE', 'amplify status [-v | --verbose]']; const chain = spawn(getCLIPath(), ['status', '-h'], { cwd, stripColors: true }); - for (const expectedLine of expectedContents) { + for (const expectedLine of expectedLines) { chain.wait(expectedLine); } await chain.runAsync(); }; -export const statusForCategoryWithHelp = async (cwd: string, category: string, expectedContents: Array): Promise => { +export const statusForCategoryWithHelp = async (cwd: string, category: string): Promise => { + const expectedLines = ['USAGE', `amplify ${category} status`]; const chain = spawn(getCLIPath(), ['status', category, '-h'], { cwd, stripColors: true }); - for (const expectedLine of expectedContents) { + for (const expectedLine of expectedLines) { + chain.wait(expectedLine); + } + await chain.runAsync(); +}; + +export const pushWithHelp = async (cwd: string): Promise => { + const expectedLines = [ + 'USAGE', + 'amplify push [category] [--codegen] [--debug] [-f | --force] [-y | --yes] [--allow-destructive-graphql-schema-updates]', + ]; + const chain = spawn(getCLIPath(), ['push', '-h'], { cwd, stripColors: true }); + for (const expectedLine of expectedLines) { + chain.wait(expectedLine); + } + await chain.runAsync(); +}; + +export const initWithHelp = async (cwd: string): Promise => { + const expectedLines = [ + 'USAGE', + 'amplify init [-y | --yes] [--amplify ] [--envName ] [--debug] [--frontend ] [--providers ] [--categories ] [--app ] [--permissions-boundary ]', + ]; + const chain = spawn(getCLIPath(), ['init', '-h'], { cwd, stripColors: true }); + for (const expectedLine of expectedLines) { + chain.wait(expectedLine); + } + await chain.runAsync(); +}; + +export const pullWithHelp = async (cwd: string): Promise => { + const expectedLines = [ + 'USAGE', + 'amplify pull [--appId ] [--envName ] [--debug] [-y | --yes] [--restore] [--amplify ] [--frontend ] [--providers ] [--categories ]', + ]; + const chain = spawn(getCLIPath(), ['pull', '-h'], { cwd, stripColors: true }); + for (const expectedLine of expectedLines) { + chain.wait(expectedLine); + } + await chain.runAsync(); +}; + +export const envWithHelp = async (cwd: string): Promise => { + const expectedLines = ['USAGE', 'amplify env ']; + const chain = spawn(getCLIPath(), ['env', '-h'], { cwd, stripColors: true }); + for (const expectedLine of expectedLines) { chain.wait(expectedLine); } await chain.runAsync(); diff --git a/packages/amplify-e2e-tests/src/__tests__/help.test.ts b/packages/amplify-e2e-tests/src/__tests__/help.test.ts index a72c29c5b13..19e3a68a4cd 100644 --- a/packages/amplify-e2e-tests/src/__tests__/help.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/help.test.ts @@ -5,8 +5,10 @@ import { deleteProjectDir, statusWithHelp, statusForCategoryWithHelp, - addS3AndAuthWithAuthOnlyAccess, - amplifyPushAuth, + pushWithHelp, + initWithHelp, + pullWithHelp, + envWithHelp, } from '@aws-amplify/amplify-e2e-core'; describe('help happy paths', () => { @@ -14,8 +16,6 @@ describe('help happy paths', () => { beforeAll(async () => { projRoot = await createNewProjectDir('help-happy-paths'); await initJSProjectWithProfile(projRoot, {}); - await addS3AndAuthWithAuthOnlyAccess(projRoot); - await amplifyPushAuth(projRoot); }); afterAll(async () => { @@ -24,10 +24,26 @@ describe('help happy paths', () => { }); test('amplify status', async () => { - await statusWithHelp(projRoot, ['USAGE', 'amplify status [-v | --verbose]']); + await statusWithHelp(projRoot); }); test('amplify status storage', async () => { - await statusForCategoryWithHelp(projRoot, 'storage', ['USAGE', 'amplify storage status']); + await statusForCategoryWithHelp(projRoot, 'storage'); + }); + + test('amplify push', async () => { + await pushWithHelp(projRoot); + }); + + test('amplify init', async () => { + await initWithHelp(projRoot); + }); + + test('amplify pull', async () => { + await pullWithHelp(projRoot); + }); + + test('amplify env', async () => { + await envWithHelp(projRoot); }); }); From eb2da131edf79a4b59d44b5f04f157ca78820e68 Mon Sep 17 00:00:00 2001 From: Zachary Goldberg Date: Mon, 27 Mar 2023 11:05:56 -0600 Subject: [PATCH 21/84] test: fix help tests on windows with regex (#12314) --- packages/amplify-e2e-core/src/utils/help.ts | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/packages/amplify-e2e-core/src/utils/help.ts b/packages/amplify-e2e-core/src/utils/help.ts index 301f5cdf109..7cccfeb390f 100644 --- a/packages/amplify-e2e-core/src/utils/help.ts +++ b/packages/amplify-e2e-core/src/utils/help.ts @@ -19,10 +19,7 @@ export const statusForCategoryWithHelp = async (cwd: string, category: string): }; export const pushWithHelp = async (cwd: string): Promise => { - const expectedLines = [ - 'USAGE', - 'amplify push [category] [--codegen] [--debug] [-f | --force] [-y | --yes] [--allow-destructive-graphql-schema-updates]', - ]; + const expectedLines = ['USAGE', /amplify push*/]; const chain = spawn(getCLIPath(), ['push', '-h'], { cwd, stripColors: true }); for (const expectedLine of expectedLines) { chain.wait(expectedLine); @@ -31,10 +28,7 @@ export const pushWithHelp = async (cwd: string): Promise => { }; export const initWithHelp = async (cwd: string): Promise => { - const expectedLines = [ - 'USAGE', - 'amplify init [-y | --yes] [--amplify ] [--envName ] [--debug] [--frontend ] [--providers ] [--categories ] [--app ] [--permissions-boundary ]', - ]; + const expectedLines = ['USAGE', /amplify init*/]; const chain = spawn(getCLIPath(), ['init', '-h'], { cwd, stripColors: true }); for (const expectedLine of expectedLines) { chain.wait(expectedLine); @@ -43,10 +37,7 @@ export const initWithHelp = async (cwd: string): Promise => { }; export const pullWithHelp = async (cwd: string): Promise => { - const expectedLines = [ - 'USAGE', - 'amplify pull [--appId ] [--envName ] [--debug] [-y | --yes] [--restore] [--amplify ] [--frontend ] [--providers ] [--categories ]', - ]; + const expectedLines = ['USAGE', /amplify pull*/]; const chain = spawn(getCLIPath(), ['pull', '-h'], { cwd, stripColors: true }); for (const expectedLine of expectedLines) { chain.wait(expectedLine); From 51857e86db4e626a030591f0a4bdd92fbd185097 Mon Sep 17 00:00:00 2001 From: Kamil Sobol Date: Tue, 28 Mar 2023 09:19:11 -0700 Subject: [PATCH 22/84] chore: update pkg to 5.8.1 (#12322) --- package.json | 2 +- yarn.lock | 157 ++++++++++++++------------------------------------- 2 files changed, 42 insertions(+), 117 deletions(-) diff --git a/package.json b/package.json index b94959897da..f1e4321d256 100644 --- a/package.json +++ b/package.json @@ -142,7 +142,7 @@ "lnk": "1.1.0", "lodash": "^4.17.21", "npm-check-updates": "^16.1.0", - "pkg": "^5.8.0", + "pkg": "^5.8.1", "prettier": "^2.8.4", "rimraf": "^3.0.0", "ts-jest": "^27.0.0", diff --git a/yarn.lock b/yarn.lock index 7132f9e0649..3efbd1df1b2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3354,7 +3354,7 @@ dependencies: "@babel/types" "^7.18.6" -"@babel/helper-string-parser@^7.19.4": +"@babel/helper-string-parser@^7.18.10", "@babel/helper-string-parser@^7.19.4": version "7.19.4" resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz#38d3acb654b4701a9b77fb0615a96f775c3a9e63" integrity sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw== @@ -4942,12 +4942,13 @@ lodash "^4.2.0" to-fast-properties "^2.0.0" -"@babel/types@7.18.4": - version "7.18.4" - resolved "https://registry.npmjs.org/@babel/types/-/types-7.18.4.tgz#27eae9b9fd18e9dccc3f9d6ad051336f307be354" - integrity sha512-ThN1mBcMq5pG/Vm2IcBmPPfyPXbd8S02rS+OBIDENdufvqC7Z/jHPCv9IcP01277aKtDI8g/2XysBN4hA8niiw== +"@babel/types@7.19.0": + version "7.19.0" + resolved "https://registry.npmjs.org/@babel/types/-/types-7.19.0.tgz#75f21d73d73dc0351f3368d28db73465f4814600" + integrity sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA== dependencies: - "@babel/helper-validator-identifier" "^7.16.7" + "@babel/helper-string-parser" "^7.18.10" + "@babel/helper-validator-identifier" "^7.18.6" to-fast-properties "^2.0.0" "@babel/types@^7.0.0", "@babel/types@^7.12.6", "@babel/types@^7.16.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4", "@babel/types@^7.7.0": @@ -9298,11 +9299,6 @@ apollo-utilities@^1.0.0, apollo-utilities@^1.0.25, apollo-utilities@^1.0.27, apo ts-invariant "^0.4.0" tslib "^1.10.0" -aproba@^1.0.3: - version "1.2.0" - resolved "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" - integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== - "aproba@^1.0.3 || ^2.0.0", aproba@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" @@ -9345,14 +9341,6 @@ are-we-there-yet@^3.0.0: delegates "^1.0.0" readable-stream "^3.6.0" -are-we-there-yet@~1.1.2: - version "1.1.7" - resolved "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz#b15474a932adab4ff8a50d9adfa7e4e926f21146" - integrity sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g== - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - arg@^4.1.0: version "4.1.3" resolved "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" @@ -11049,11 +11037,6 @@ coa@^2.0.2: chalk "^2.4.1" q "^1.1.2" -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= - codecov@^3.7.0: version "3.8.3" resolved "https://registry.npmjs.org/codecov/-/codecov-3.8.3.tgz#9c3e364b8a700c597346ae98418d09880a3fdbe7" @@ -11357,7 +11340,7 @@ connect-history-api-fallback@^1.6.0: resolved "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc" integrity sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg== -console-control-strings@^1.0.0, console-control-strings@^1.1.0, console-control-strings@~1.1.0: +console-control-strings@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ== @@ -12120,13 +12103,6 @@ decode-uri-component@^0.2.0: resolved "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ== -decompress-response@^4.2.0: - version "4.2.1" - resolved "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz#414023cc7a302da25ce2ec82d0d5238ccafd8986" - integrity sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw== - dependencies: - mimic-response "^2.0.0" - decompress-response@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" @@ -12290,10 +12266,10 @@ detect-indent@^6.0.0: resolved "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz#592485ebbbf6b3b1ab2be175c8393d04ca0d57e6" integrity sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA== -detect-libc@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" - integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= +detect-libc@^2.0.0: + version "2.0.1" + resolved "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz#e1897aa88fa6ad197862937fbc0441ef352ee0cd" + integrity sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w== detect-newline@^3.0.0: version "3.1.0" @@ -14101,20 +14077,6 @@ gauge@^4.0.3: strip-ansi "^6.0.1" wide-align "^1.1.5" -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" @@ -14883,7 +14845,7 @@ has-tostringtag@^1.0.0: dependencies: has-symbols "^1.0.2" -has-unicode@^2.0.0, has-unicode@^2.0.1: +has-unicode@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" integrity sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ== @@ -15748,13 +15710,6 @@ is-finite@^1.0.0: resolved "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz#904135c77fb42c0641d6aa1bcdbc4daa8da082f3" integrity sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w== -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= - dependencies: - number-is-nan "^1.0.0" - is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" @@ -18020,11 +17975,6 @@ mimic-response@^1.0.0: resolved "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== -mimic-response@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz#d13763d35f613d09ec37ebb30bac0469c0ee8f43" - integrity sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA== - mimic-response@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" @@ -18428,12 +18378,12 @@ nock@^13.0.11: lodash.set "^4.3.2" propagate "^2.0.0" -node-abi@^2.21.0: - version "2.30.1" - resolved "https://registry.npmjs.org/node-abi/-/node-abi-2.30.1.tgz#c437d4b1fe0e285aaf290d45b45d4d7afedac4cf" - integrity sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w== +node-abi@^3.3.0: + version "3.33.0" + resolved "https://registry.npmjs.org/node-abi/-/node-abi-3.33.0.tgz#8b23a0cec84e1c5f5411836de6a9b84bccf26e7f" + integrity sha512-7GGVawqyHF4pfd0YFybhv/eM9JwTtPqx0mAanQ146O3FlSh3pA24zf9IRQTOsfTSqXTNzPSP5iagAJ94jjuVog== dependencies: - semver "^5.4.1" + semver "^7.3.5" node-addon-api@^3.2.1: version "3.2.1" @@ -18725,16 +18675,6 @@ npm-run-path@^4.0.0, npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" -npmlog@^4.0.1: - version "4.1.2" - resolved "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" - npmlog@^6.0.0, npmlog@^6.0.2: version "6.0.2" resolved "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz#c8166017a42f2dea92d6453168dd865186a70830" @@ -18757,11 +18697,6 @@ nullthrows@^1.0.0, nullthrows@^1.1.1: resolved "https://registry.npmjs.org/nullthrows/-/nullthrows-1.1.1.tgz#7818258843856ae971eae4208ad7d7eb19a431b1" integrity sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw== -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= - nwsapi@^2.2.0: version "2.2.0" resolved "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7" @@ -19571,14 +19506,14 @@ pkg-up@^3.1.0: dependencies: find-up "^3.0.0" -pkg@^5.8.0: - version "5.8.0" - resolved "https://registry.npmjs.org/pkg/-/pkg-5.8.0.tgz#a77644aeff0b94a1656d7f76558837f7c754a4c0" - integrity sha512-8h9PUDYFi+LOMLbIyGRdP21g08mAtHidSpofSrf8LWhxUWGHymaRzcopEGiynB5EhQmZUKM6PQ9kCImV2TpdjQ== +pkg@^5.8.1: + version "5.8.1" + resolved "https://registry.npmjs.org/pkg/-/pkg-5.8.1.tgz#862020f3c0575638ef7d1146f951a54d65ddc984" + integrity sha512-CjBWtFStCfIiT4Bde9QpJy0KeH19jCfwZRJqHFDFXfhUklCx8JoFmMj3wgnEYIwGmZVNkhsStPHEOnrtrQhEXA== dependencies: "@babel/generator" "7.18.2" "@babel/parser" "7.18.4" - "@babel/types" "7.18.4" + "@babel/types" "7.19.0" chalk "^4.1.2" fs-extra "^9.1.0" globby "^11.1.0" @@ -19587,7 +19522,7 @@ pkg@^5.8.0: minimist "^1.2.6" multistream "^4.1.0" pkg-fetch "3.4.2" - prebuild-install "6.1.4" + prebuild-install "7.1.1" resolve "^1.22.0" stream-meter "^1.0.4" @@ -20164,22 +20099,21 @@ postcss@^8.3.5, postcss@^8.4.12, postcss@^8.4.4, postcss@^8.4.7: picocolors "^1.0.0" source-map-js "^1.0.2" -prebuild-install@6.1.4: - version "6.1.4" - resolved "https://registry.npmjs.org/prebuild-install/-/prebuild-install-6.1.4.tgz#ae3c0142ad611d58570b89af4986088a4937e00f" - integrity sha512-Z4vpywnK1lBg+zdPCVCsKq0xO66eEV9rWo2zrROGGiRS4JtueBOdlB1FnY8lcy7JsUud/Q3ijUxyWN26Ika0vQ== +prebuild-install@7.1.1: + version "7.1.1" + resolved "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz#de97d5b34a70a0c81334fd24641f2a1702352e45" + integrity sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw== dependencies: - detect-libc "^1.0.3" + detect-libc "^2.0.0" expand-template "^2.0.3" github-from-package "0.0.0" minimist "^1.2.3" mkdirp-classic "^0.5.3" napi-build-utils "^1.0.1" - node-abi "^2.21.0" - npmlog "^4.0.1" + node-abi "^3.3.0" pump "^3.0.0" rc "^1.2.7" - simple-get "^3.0.3" + simple-get "^4.0.0" tar-fs "^2.0.0" tunnel-agent "^0.6.0" @@ -20779,7 +20713,7 @@ readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stre string_decoder "^1.1.1" util-deprecate "^1.0.1" -readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@~2.3.6: +readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.5, readable-stream@^2.1.4, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -21550,7 +21484,7 @@ semver-utils@^1.1.4: resolved "https://registry.npmjs.org/semver-utils/-/semver-utils-1.1.4.tgz#cf0405e669a57488913909fc1c3f29bf2a4871e2" integrity sha512-EjnoLE5OGmDAVV/8YDoN5KiajNadjzIp9BAHOhYeQHt7j0UWxjmgsx4YD48wp4Ue1Qogq38F1GNUJNqF1kKKxA== -"semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.6.0: +"semver@2 || 3 || 4 || 5", semver@^5.5.0, semver@^5.6.0: version "5.7.1" resolved "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -21651,7 +21585,7 @@ serve-static@1.14.2, serve-static@^1.14.2: parseurl "~1.3.3" send "0.17.2" -set-blocking@^2.0.0, set-blocking@~2.0.0: +set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== @@ -21808,12 +21742,12 @@ simple-concat@^1.0.0: resolved "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== -simple-get@^3.0.3: - version "3.1.1" - resolved "https://registry.npmjs.org/simple-get/-/simple-get-3.1.1.tgz#cc7ba77cfbe761036fbfce3d021af25fc5584d55" - integrity sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA== +simple-get@^4.0.0: + version "4.0.1" + resolved "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz#4a39db549287c979d352112fa03fd99fd6bc3543" + integrity sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA== dependencies: - decompress-response "^4.2.0" + decompress-response "^6.0.0" once "^1.3.1" simple-concat "^1.0.0" @@ -22286,15 +22220,6 @@ string-natural-compare@^3.0.1: resolved "https://registry.npmjs.org/string-natural-compare/-/string-natural-compare-3.0.1.tgz#7a42d58474454963759e8e8b7ae63d71c1e7fdf4" integrity sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw== -string-width@^1.0.1: - version "1.0.2" - resolved "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: version "4.2.3" resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" @@ -22397,7 +22322,7 @@ stringify-object@^3.3.0: is-obj "^1.0.1" is-regexp "^1.0.0" -strip-ansi@^3.0.0, strip-ansi@^3.0.1: +strip-ansi@^3.0.0: version "3.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= @@ -24069,7 +23994,7 @@ which@^1.1.1, which@^1.2.9, which@^1.3.1: dependencies: isexe "^2.0.0" -wide-align@^1.1.0, wide-align@^1.1.5: +wide-align@^1.1.5: version "1.1.5" resolved "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== From 08533c528f5eb545e174a7c6ed55e2f0e0ee6208 Mon Sep 17 00:00:00 2001 From: Kamil Sobol Date: Tue, 28 Mar 2023 10:03:22 -0700 Subject: [PATCH 23/84] chore: upgrade yarn (#12323) --- .../{yarn-1.18.0.cjs => yarn-1.22.19.js} | 46558 ++++++++-------- .yarnrc | 3 +- 2 files changed, 23468 insertions(+), 23093 deletions(-) rename .yarn/releases/{yarn-1.18.0.cjs => yarn-1.22.19.js} (98%) diff --git a/.yarn/releases/yarn-1.18.0.cjs b/.yarn/releases/yarn-1.22.19.js similarity index 98% rename from .yarn/releases/yarn-1.18.0.cjs rename to .yarn/releases/yarn-1.22.19.js index 97e2a19662a..0fefc258278 100755 --- a/.yarn/releases/yarn-1.18.0.cjs +++ b/.yarn/releases/yarn-1.22.19.js @@ -65,7 +65,7 @@ module.exports = /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 549); +/******/ return __webpack_require__(__webpack_require__.s = 517); /******/ }) /************************************************************************/ /******/ ([ @@ -295,7 +295,7 @@ function __importDefault(mod) { exports.__esModule = true; -var _promise = __webpack_require__(227); +var _promise = __webpack_require__(224); var _promise2 = _interopRequireDefault(_promise); @@ -338,6 +338,12 @@ module.exports = require("util"); /***/ }), /* 4 */ +/***/ (function(module, exports) { + +module.exports = require("fs"); + +/***/ }), +/* 5 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -1393,7 +1399,7 @@ exports.normalizeOS = normalizeOS; var _fs; function _load_fs() { - return _fs = _interopRequireDefault(__webpack_require__(5)); + return _fs = _interopRequireDefault(__webpack_require__(4)); } var _glob; @@ -1405,7 +1411,7 @@ function _load_glob() { var _os; function _load_os() { - return _os = _interopRequireDefault(__webpack_require__(49)); + return _os = _interopRequireDefault(__webpack_require__(46)); } var _path; @@ -1423,13 +1429,13 @@ function _load_blockingQueue() { var _promise; function _load_promise() { - return _promise = _interopRequireWildcard(__webpack_require__(50)); + return _promise = _interopRequireWildcard(__webpack_require__(51)); } var _promise2; function _load_promise2() { - return _promise2 = __webpack_require__(50); + return _promise2 = __webpack_require__(51); } var _map; @@ -1441,7 +1447,7 @@ function _load_map() { var _fsNormalized; function _load_fsNormalized() { - return _fsNormalized = __webpack_require__(218); + return _fsNormalized = __webpack_require__(216); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -1516,12 +1522,6 @@ function normalizeOS(body) { const cr = '\r'.charCodeAt(0); const lf = '\n'.charCodeAt(0); -/***/ }), -/* 5 */ -/***/ (function(module, exports) { - -module.exports = require("fs"); - /***/ }), /* 6 */ /***/ (function(module, exports, __webpack_require__) { @@ -1565,7 +1565,13 @@ class ResponseError extends Error { } exports.ResponseError = ResponseError; -class OneTimePasswordError extends Error {} +class OneTimePasswordError extends Error { + constructor(notice) { + super(); + this.notice = notice; + } + +} exports.OneTimePasswordError = OneTimePasswordError; /***/ }), @@ -1580,7 +1586,7 @@ exports.OneTimePasswordError = OneTimePasswordError; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Observer__ = __webpack_require__(420); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Subscription__ = __webpack_require__(25); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__internal_symbol_rxSubscriber__ = __webpack_require__(321); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__config__ = __webpack_require__(185); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__config__ = __webpack_require__(186); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__util_hostReportError__ = __webpack_require__(323); /** PURE_IMPORTS_START tslib,_util_isFunction,_Observer,_Subscription,_internal_symbol_rxSubscriber,_config,_util_hostReportError PURE_IMPORTS_END */ @@ -1832,11 +1838,11 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.getPathKey = getPathKey; -const os = __webpack_require__(49); +const os = __webpack_require__(46); const path = __webpack_require__(0); -const userHome = __webpack_require__(66).default; +const userHome = __webpack_require__(67).default; -var _require = __webpack_require__(225); +var _require = __webpack_require__(222); const getCacheDir = _require.getCacheDir, getConfigDir = _require.getConfigDir, @@ -1862,7 +1868,7 @@ const YARN_INSTALLER_MSI = exports.YARN_INSTALLER_MSI = 'https://yarnpkg.com/lat const SELF_UPDATE_VERSION_URL = exports.SELF_UPDATE_VERSION_URL = 'https://yarnpkg.com/latest-version'; // cache version, bump whenever we make backwards incompatible changes -const CACHE_VERSION = exports.CACHE_VERSION = 4; +const CACHE_VERSION = exports.CACHE_VERSION = 6; // lockfile version, bump whenever we make backwards incompatible changes const LOCKFILE_VERSION = exports.LOCKFILE_VERSION = 1; @@ -2027,7 +2033,7 @@ module.exports = invariant; "use strict"; -var YAMLException = __webpack_require__(54); +var YAMLException = __webpack_require__(55); var TYPE_CONSTRUCTOR_OPTIONS = [ 'kind', @@ -2090,15 +2096,21 @@ module.exports = Type; /***/ }), /* 11 */ +/***/ (function(module, exports) { + +module.exports = require("crypto"); + +/***/ }), +/* 12 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Observable; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_canReportError__ = __webpack_require__(322); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_toSubscriber__ = __webpack_require__(932); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__internal_symbol_observable__ = __webpack_require__(117); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__internal_symbol_observable__ = __webpack_require__(118); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_pipe__ = __webpack_require__(324); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__config__ = __webpack_require__(185); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__config__ = __webpack_require__(186); /** PURE_IMPORTS_START _util_canReportError,_util_toSubscriber,_internal_symbol_observable,_util_pipe,_config PURE_IMPORTS_END */ @@ -2217,12 +2229,6 @@ function getPromiseCtor(promiseCtor) { //# sourceMappingURL=Observable.js.map -/***/ }), -/* 12 */ -/***/ (function(module, exports) { - -module.exports = require("crypto"); - /***/ }), /* 13 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -2610,7 +2616,7 @@ exports.hyphenate = hyphenate; exports.camelCase = camelCase; exports.compareSortedArrays = compareSortedArrays; exports.sleep = sleep; -const _camelCase = __webpack_require__(230); +const _camelCase = __webpack_require__(227); function sortAlpha(a, b) { // sort alphabetically in a deterministic way @@ -2718,7 +2724,7 @@ function _load_asyncToGenerator() { var _parse; function _load_parse() { - return _parse = __webpack_require__(105); + return _parse = __webpack_require__(106); } Object.defineProperty(exports, 'parse', { @@ -2731,7 +2737,7 @@ Object.defineProperty(exports, 'parse', { var _stringify; function _load_stringify() { - return _stringify = __webpack_require__(199); + return _stringify = __webpack_require__(200); } Object.defineProperty(exports, 'stringify', { @@ -2758,7 +2764,7 @@ function _load_normalizePattern() { var _parse2; function _load_parse2() { - return _parse2 = _interopRequireDefault(__webpack_require__(105)); + return _parse2 = _interopRequireDefault(__webpack_require__(106)); } var _constants; @@ -2770,7 +2776,7 @@ function _load_constants() { var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(4)); + return _fs = _interopRequireWildcard(__webpack_require__(5)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -2780,7 +2786,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de const invariant = __webpack_require__(9); const path = __webpack_require__(0); -const ssri = __webpack_require__(77); +const ssri = __webpack_require__(65); function getName(pattern) { return (0, (_normalizePattern || _load_normalizePattern()).normalizePattern)(pattern).name; @@ -2886,6 +2892,11 @@ class Lockfile { reporter.info(reporter.lang('noLockfileFound')); } + if (lockfile && lockfile.__metadata) { + const lockfilev2 = lockfile; + lockfile = {}; + } + return new Lockfile({ cache: lockfile, source: rawLockfile, parseResultType: parseResult && parseResult.type }); })(); } @@ -2989,6 +3000,35 @@ exports.default = Lockfile; /* 20 */ /***/ (function(module, exports, __webpack_require__) { +"use strict"; + + +exports.__esModule = true; + +var _assign = __webpack_require__(559); + +var _assign2 = _interopRequireDefault(_assign); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _assign2.default || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; +}; + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + var store = __webpack_require__(133)('wks'); var uid = __webpack_require__(137); var Symbol = __webpack_require__(17).Symbol; @@ -3003,7 +3043,7 @@ $exports.store = store; /***/ }), -/* 21 */ +/* 22 */ /***/ (function(module, exports) { exports = module.exports = SemVer; @@ -4332,35 +4372,6 @@ function coerce(version) { } -/***/ }), -/* 22 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -exports.__esModule = true; - -var _assign = __webpack_require__(591); - -var _assign2 = _interopRequireDefault(_assign); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = _assign2.default || function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } - - return target; -}; - /***/ }), /* 23 */ /***/ (function(module, exports) { @@ -4382,8 +4393,8 @@ module.exports = require("url"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isArray__ = __webpack_require__(41); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isObject__ = __webpack_require__(444); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isFunction__ = __webpack_require__(154); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_tryCatch__ = __webpack_require__(56); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_errorObject__ = __webpack_require__(47); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_tryCatch__ = __webpack_require__(57); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_errorObject__ = __webpack_require__(48); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__ = __webpack_require__(441); /** PURE_IMPORTS_START _util_isArray,_util_isObject,_util_isFunction,_util_tryCatch,_util_errorObject,_util_UnsubscriptionError PURE_IMPORTS_END */ @@ -4549,9 +4560,9 @@ var assert = __webpack_require__(16); var Buffer = __webpack_require__(15).Buffer; var PrivateKey = __webpack_require__(33); var Key = __webpack_require__(27); -var crypto = __webpack_require__(12); +var crypto = __webpack_require__(11); var algs = __webpack_require__(32); -var asn1 = __webpack_require__(65); +var asn1 = __webpack_require__(66); var ec, jsbn; var nacl; @@ -4799,7 +4810,7 @@ function calculateED25519Public(k) { assert.buffer(k); if (nacl === undefined) - nacl = __webpack_require__(75); + nacl = __webpack_require__(76); var kp = nacl.sign.keyPair.fromSeed(new Uint8Array(k)); return (Buffer.from(kp.publicKey)); @@ -4809,7 +4820,7 @@ function calculateX25519Public(k) { assert.buffer(k); if (nacl === undefined) - nacl = __webpack_require__(75); + nacl = __webpack_require__(76); var kp = nacl.box.keyPair.fromSeed(new Uint8Array(k)); return (Buffer.from(kp.publicKey)); @@ -4924,11 +4935,11 @@ module.exports = Key; var assert = __webpack_require__(16); var algs = __webpack_require__(32); -var crypto = __webpack_require__(12); +var crypto = __webpack_require__(11); var Fingerprint = __webpack_require__(156); -var Signature = __webpack_require__(74); +var Signature = __webpack_require__(75); var DiffieHellman = __webpack_require__(325).DiffieHellman; -var errs = __webpack_require__(73); +var errs = __webpack_require__(74); var utils = __webpack_require__(26); var PrivateKey = __webpack_require__(33); var edCompat; @@ -4949,7 +4960,7 @@ formats['pkcs1'] = __webpack_require__(327); formats['pkcs8'] = __webpack_require__(157); formats['rfc4253'] = __webpack_require__(103); formats['ssh'] = __webpack_require__(456); -formats['ssh-private'] = __webpack_require__(192); +formats['ssh-private'] = __webpack_require__(193); formats['openssh'] = formats['ssh-private']; formats['dnssec'] = __webpack_require__(326); @@ -5250,11 +5261,11 @@ function nullify(obj = {}) { "use strict"; -const escapeStringRegexp = __webpack_require__(388); -const ansiStyles = __webpack_require__(506); -const stdoutColor = __webpack_require__(598).stdout; +const escapeStringRegexp = __webpack_require__(382); +const ansiStyles = __webpack_require__(474); +const stdoutColor = __webpack_require__(566).stdout; -const template = __webpack_require__(599); +const template = __webpack_require__(567); const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); @@ -5672,10 +5683,10 @@ module.exports = PrivateKey; var assert = __webpack_require__(16); var Buffer = __webpack_require__(15).Buffer; var algs = __webpack_require__(32); -var crypto = __webpack_require__(12); +var crypto = __webpack_require__(11); var Fingerprint = __webpack_require__(156); -var Signature = __webpack_require__(74); -var errs = __webpack_require__(73); +var Signature = __webpack_require__(75); +var errs = __webpack_require__(74); var util = __webpack_require__(3); var utils = __webpack_require__(26); var dhe = __webpack_require__(325); @@ -5702,7 +5713,7 @@ formats['pem'] = __webpack_require__(86); formats['pkcs1'] = __webpack_require__(327); formats['pkcs8'] = __webpack_require__(157); formats['rfc4253'] = __webpack_require__(103); -formats['ssh-private'] = __webpack_require__(192); +formats['ssh-private'] = __webpack_require__(193); formats['openssh'] = formats['ssh-private']; formats['ssh'] = formats['ssh-private']; formats['dnssec'] = __webpack_require__(326); @@ -5758,7 +5769,7 @@ PrivateKey.prototype.derive = function (newType) { if (this.type === 'ed25519' && newType === 'curve25519') { if (nacl === undefined) - nacl = __webpack_require__(75); + nacl = __webpack_require__(76); priv = this.part.k.data; if (priv[0] === 0x00) @@ -5776,7 +5787,7 @@ PrivateKey.prototype.derive = function (newType) { })); } else if (this.type === 'curve25519' && newType === 'ed25519') { if (nacl === undefined) - nacl = __webpack_require__(75); + nacl = __webpack_require__(76); priv = this.part.k.data; if (priv[0] === 0x00) @@ -5935,7 +5946,7 @@ exports.wrapLifecycle = exports.run = exports.install = exports.Install = undefi var _extends2; function _load_extends() { - return _extends2 = _interopRequireDefault(__webpack_require__(22)); + return _extends2 = _interopRequireDefault(__webpack_require__(20)); } var _asyncToGenerator2; @@ -6036,13 +6047,13 @@ function _load_objectPath() { var _hooks; function _load_hooks() { - return _hooks = __webpack_require__(374); + return _hooks = __webpack_require__(368); } var _index; function _load_index() { - return _index = _interopRequireDefault(__webpack_require__(220)); + return _index = _interopRequireDefault(__webpack_require__(218)); } var _errors; @@ -6054,7 +6065,7 @@ function _load_errors() { var _integrityChecker; function _load_integrityChecker() { - return _integrityChecker = _interopRequireDefault(__webpack_require__(208)); + return _integrityChecker = _interopRequireDefault(__webpack_require__(206)); } var _lockfile; @@ -6072,37 +6083,37 @@ function _load_lockfile2() { var _packageFetcher; function _load_packageFetcher() { - return _packageFetcher = _interopRequireWildcard(__webpack_require__(210)); + return _packageFetcher = _interopRequireWildcard(__webpack_require__(208)); } var _packageInstallScripts; function _load_packageInstallScripts() { - return _packageInstallScripts = _interopRequireDefault(__webpack_require__(557)); + return _packageInstallScripts = _interopRequireDefault(__webpack_require__(525)); } var _packageCompatibility; function _load_packageCompatibility() { - return _packageCompatibility = _interopRequireWildcard(__webpack_require__(209)); + return _packageCompatibility = _interopRequireWildcard(__webpack_require__(207)); } var _packageResolver; function _load_packageResolver() { - return _packageResolver = _interopRequireDefault(__webpack_require__(366)); + return _packageResolver = _interopRequireDefault(__webpack_require__(360)); } var _packageLinker; function _load_packageLinker() { - return _packageLinker = _interopRequireDefault(__webpack_require__(211)); + return _packageLinker = _interopRequireDefault(__webpack_require__(209)); } var _index2; function _load_index2() { - return _index2 = __webpack_require__(57); + return _index2 = __webpack_require__(58); } var _index3; @@ -6114,7 +6125,7 @@ function _load_index3() { var _autoclean; function _load_autoclean() { - return _autoclean = __webpack_require__(354); + return _autoclean = __webpack_require__(348); } var _constants; @@ -6132,7 +6143,7 @@ function _load_normalizePattern() { var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(4)); + return _fs = _interopRequireWildcard(__webpack_require__(5)); } var _map; @@ -6144,13 +6155,13 @@ function _load_map() { var _yarnVersion; function _load_yarnVersion() { - return _yarnVersion = __webpack_require__(120); + return _yarnVersion = __webpack_require__(105); } var _generatePnpMap; function _load_generatePnpMap() { - return _generatePnpMap = __webpack_require__(579); + return _generatePnpMap = __webpack_require__(547); } var _workspaceLayout; @@ -6162,7 +6173,7 @@ function _load_workspaceLayout() { var _resolutionMap; function _load_resolutionMap() { - return _resolutionMap = _interopRequireDefault(__webpack_require__(214)); + return _resolutionMap = _interopRequireDefault(__webpack_require__(212)); } var _guessName; @@ -6174,21 +6185,21 @@ function _load_guessName() { var _audit; function _load_audit() { - return _audit = _interopRequireDefault(__webpack_require__(353)); + return _audit = _interopRequireDefault(__webpack_require__(347)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const deepEqual = __webpack_require__(631); +const deepEqual = __webpack_require__(599); const emoji = __webpack_require__(302); const invariant = __webpack_require__(9); const path = __webpack_require__(0); -const semver = __webpack_require__(21); -const uuid = __webpack_require__(119); -const ssri = __webpack_require__(77); +const semver = __webpack_require__(22); +const uuid = __webpack_require__(120); +const ssri = __webpack_require__(65); const ONE_DAY = 1000 * 60 * 60 * 24; @@ -7480,7 +7491,7 @@ function setFlags(commander) { /* 35 */ /***/ (function(module, exports, __webpack_require__) { -var isObject = __webpack_require__(52); +var isObject = __webpack_require__(53); module.exports = function (it) { if (!isObject(it)) throw TypeError(it + ' is not an object!'); return it; @@ -7496,10 +7507,10 @@ module.exports = function (it) { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subject; }); /* unused harmony export AnonymousSubject */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Observable__ = __webpack_require__(11); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Observable__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Subscriber__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Subscription__ = __webpack_require__(25); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__ = __webpack_require__(189); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__ = __webpack_require__(190); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__SubjectSubscription__ = __webpack_require__(422); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__internal_symbol_rxSubscriber__ = __webpack_require__(321); /** PURE_IMPORTS_START tslib,_Observable,_Subscriber,_Subscription,_util_ObjectUnsubscribedError,_SubjectSubscription,_internal_symbol_rxSubscriber PURE_IMPORTS_END */ @@ -24832,7 +24843,7 @@ function normalizePattern(pattern) { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return EMPTY; }); /* harmony export (immutable) */ __webpack_exports__["a"] = empty; /* unused harmony export emptyScheduled */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(11); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12); /** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */ var EMPTY = /*@__PURE__*/ new __WEBPACK_IMPORTED_MODULE_0__Observable__["a" /* Observable */](function (subscriber) { return subscriber.complete(); }); @@ -24875,9 +24886,9 @@ var isArray = Array.isArray || (function (x) { return x && typeof x.length === ' /* 42 */ /***/ (function(module, exports, __webpack_require__) { -var dP = __webpack_require__(71); +var dP = __webpack_require__(72); var createDesc = __webpack_require__(132); -module.exports = __webpack_require__(51) ? function (object, key, value) { +module.exports = __webpack_require__(52) ? function (object, key, value) { return dP.f(object, key, createDesc(1, value)); } : function (object, key, value) { object[key] = value; @@ -24961,7 +24972,7 @@ module.exports.extend = extend; /*eslint-disable max-len*/ var common = __webpack_require__(43); -var YAMLException = __webpack_require__(54); +var YAMLException = __webpack_require__(55); var Type = __webpack_require__(10); @@ -25136,6 +25147,12 @@ SafeBuffer.allocUnsafeSlow = function (size) { /***/ }), /* 46 */ +/***/ (function(module, exports) { + +module.exports = require("os"); + +/***/ }), +/* 47 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -25191,7 +25208,7 @@ var MapSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 47 */ +/* 48 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -25202,7 +25219,7 @@ var errorObject = { e: {} }; /***/ }), -/* 48 */ +/* 49 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -25215,13 +25232,224 @@ function isScheduler(value) { /***/ }), -/* 49 */ -/***/ (function(module, exports) { +/* 50 */ +/***/ (function(module, exports, __webpack_require__) { -module.exports = require("os"); +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.exec = exports.queue = undefined; +exports.forkp = forkp; +exports.spawnp = spawnp; +exports.forwardSignalToSpawnedProcesses = forwardSignalToSpawnedProcesses; +exports.spawn = spawn; + +var _constants; + +function _load_constants() { + return _constants = _interopRequireWildcard(__webpack_require__(8)); +} + +var _blockingQueue; + +function _load_blockingQueue() { + return _blockingQueue = _interopRequireDefault(__webpack_require__(110)); +} + +var _errors; + +function _load_errors() { + return _errors = __webpack_require__(6); +} + +var _promise; + +function _load_promise() { + return _promise = __webpack_require__(51); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +/* global child_process$spawnOpts */ + +const child = __webpack_require__(331); +const fs = __webpack_require__(4); +const path = __webpack_require__(0); + +const queue = exports.queue = new (_blockingQueue || _load_blockingQueue()).default('child', (_constants || _load_constants()).CHILD_CONCURRENCY); + +// TODO: this uid check is kinda whack +let uid = 0; + +const exec = exports.exec = (0, (_promise || _load_promise()).promisify)(child.exec); + +function validate(program, opts = {}) { + if (program.match(/[\\\/]/)) { + return; + } + + if (process.platform === 'win32' && process.env.PATHEXT) { + const cwd = opts.cwd || process.cwd(); + const pathext = process.env.PATHEXT; + + for (var _iterator = pathext.split(';'), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + const ext = _ref; + + const candidate = path.join(cwd, `${program}${ext}`); + if (fs.existsSync(candidate)) { + throw new Error(`Potentially dangerous call to "${program}" in ${cwd}`); + } + } + } +} + +function forkp(program, args, opts) { + validate(program, opts); + const key = String(++uid); + return new Promise((resolve, reject) => { + const proc = child.fork(program, args, opts); + spawnedProcesses[key] = proc; + + proc.on('error', error => { + reject(error); + }); + + proc.on('close', exitCode => { + resolve(exitCode); + }); + }); +} + +function spawnp(program, args, opts) { + validate(program, opts); + const key = String(++uid); + return new Promise((resolve, reject) => { + const proc = child.spawn(program, args, opts); + spawnedProcesses[key] = proc; + + proc.on('error', error => { + reject(error); + }); + + proc.on('close', exitCode => { + resolve(exitCode); + }); + }); +} + +const spawnedProcesses = {}; + +function forwardSignalToSpawnedProcesses(signal) { + for (var _iterator2 = Object.keys(spawnedProcesses), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + const key = _ref2; + + spawnedProcesses[key].kill(signal); + } +} + +function spawn(program, args, opts = {}, onData) { + const key = opts.cwd || String(++uid); + return queue.push(key, () => new Promise((resolve, reject) => { + validate(program, opts); + + const proc = child.spawn(program, args, opts); + spawnedProcesses[key] = proc; + + let processingDone = false; + let processClosed = false; + let err = null; + + let stdout = ''; + + proc.on('error', err => { + if (err.code === 'ENOENT') { + reject(new (_errors || _load_errors()).ProcessSpawnError(`Couldn't find the binary ${program}`, err.code, program)); + } else { + reject(err); + } + }); + + function updateStdout(chunk) { + stdout += chunk; + if (onData) { + onData(chunk); + } + } + + function finish() { + delete spawnedProcesses[key]; + if (err) { + reject(err); + } else { + resolve(stdout.trim()); + } + } + + if (typeof opts.process === 'function') { + opts.process(proc, updateStdout, reject, function () { + if (processClosed) { + finish(); + } else { + processingDone = true; + } + }); + } else { + if (proc.stderr) { + proc.stderr.on('data', updateStdout); + } + + if (proc.stdout) { + proc.stdout.on('data', updateStdout); + } + + processingDone = true; + } + + proc.on('close', (code, signal) => { + if (signal || code >= 1) { + err = new (_errors || _load_errors()).ProcessTermError(['Command failed.', signal ? `Exit signal: ${signal}` : `Exit code: ${code}`, `Command: ${program}`, `Arguments: ${args.join(' ')}`, `Directory: ${opts.cwd || process.cwd()}`, `Output:\n${stdout.trim()}`].join('\n')); + err.EXIT_SIGNAL = signal; + err.EXIT_CODE = code; + } + + if (processingDone || err) { + finish(); + } else { + processClosed = true; + } + }); + })); +} /***/ }), -/* 50 */ +/* 51 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -25304,7 +25532,7 @@ function queue(arr, promiseProducer, concurrency = Infinity) { } /***/ }), -/* 51 */ +/* 52 */ /***/ (function(module, exports, __webpack_require__) { // Thank's IE8 for his funny defineProperty @@ -25314,7 +25542,7 @@ module.exports = !__webpack_require__(112)(function () { /***/ }), -/* 52 */ +/* 53 */ /***/ (function(module, exports) { module.exports = function (it) { @@ -25323,14 +25551,14 @@ module.exports = function (it) { /***/ }), -/* 53 */ +/* 54 */ /***/ (function(module, exports) { module.exports = {}; /***/ }), -/* 54 */ +/* 55 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -25380,7 +25608,7 @@ module.exports = YAMLException; /***/ }), -/* 55 */ +/* 56 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -25415,12 +25643,12 @@ module.exports = new Schema({ /***/ }), -/* 56 */ +/* 57 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = tryCatch; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__errorObject__ = __webpack_require__(47); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__errorObject__ = __webpack_require__(48); /** PURE_IMPORTS_START _errorObject PURE_IMPORTS_END */ var tryCatchTarget; @@ -25441,7 +25669,7 @@ function tryCatch(fn) { /***/ }), -/* 57 */ +/* 58 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -25455,7 +25683,7 @@ exports.registryNames = exports.registries = undefined; var _yarnRegistry; function _load_yarnRegistry() { - return _yarnRegistry = _interopRequireDefault(__webpack_require__(559)); + return _yarnRegistry = _interopRequireDefault(__webpack_require__(527)); } var _npmRegistry; @@ -25473,182 +25701,6 @@ const registries = exports.registries = { const registryNames = exports.registryNames = Object.keys(registries); -/***/ }), -/* 58 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.exec = exports.queue = undefined; -exports.forkp = forkp; -exports.spawnp = spawnp; -exports.forwardSignalToSpawnedProcesses = forwardSignalToSpawnedProcesses; -exports.spawn = spawn; - -var _constants; - -function _load_constants() { - return _constants = _interopRequireWildcard(__webpack_require__(8)); -} - -var _blockingQueue; - -function _load_blockingQueue() { - return _blockingQueue = _interopRequireDefault(__webpack_require__(110)); -} - -var _errors; - -function _load_errors() { - return _errors = __webpack_require__(6); -} - -var _promise; - -function _load_promise() { - return _promise = __webpack_require__(50); -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -/* global child_process$spawnOpts */ - -const child = __webpack_require__(331); - -const queue = exports.queue = new (_blockingQueue || _load_blockingQueue()).default('child', (_constants || _load_constants()).CHILD_CONCURRENCY); - -// TODO: this uid check is kinda whack -let uid = 0; - -const exec = exports.exec = (0, (_promise || _load_promise()).promisify)(child.exec); - -function forkp(program, args, opts) { - return new Promise((resolve, reject) => { - const proc = child.fork(program, args, opts); - - proc.on('error', error => { - reject(error); - }); - - proc.on('close', exitCode => { - resolve(exitCode); - }); - }); -} - -function spawnp(program, args, opts) { - return new Promise((resolve, reject) => { - const proc = child.spawn(program, args, opts); - - proc.on('error', error => { - reject(error); - }); - - proc.on('close', exitCode => { - resolve(exitCode); - }); - }); -} - -const spawnedProcesses = {}; - -function forwardSignalToSpawnedProcesses(signal) { - for (var _iterator = Object.keys(spawnedProcesses), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - const key = _ref; - - spawnedProcesses[key].kill(signal); - } -} - -function spawn(program, args, opts = {}, onData) { - const key = opts.cwd || String(++uid); - return queue.push(key, () => new Promise((resolve, reject) => { - const proc = child.spawn(program, args, opts); - spawnedProcesses[key] = proc; - - let processingDone = false; - let processClosed = false; - let err = null; - - let stdout = ''; - - proc.on('error', err => { - if (err.code === 'ENOENT') { - reject(new (_errors || _load_errors()).ProcessSpawnError(`Couldn't find the binary ${program}`, err.code, program)); - } else { - reject(err); - } - }); - - function updateStdout(chunk) { - stdout += chunk; - if (onData) { - onData(chunk); - } - } - - function finish() { - delete spawnedProcesses[key]; - if (err) { - reject(err); - } else { - resolve(stdout.trim()); - } - } - - if (typeof opts.process === 'function') { - opts.process(proc, updateStdout, reject, function () { - if (processClosed) { - finish(); - } else { - processingDone = true; - } - }); - } else { - if (proc.stderr) { - proc.stderr.on('data', updateStdout); - } - - if (proc.stdout) { - proc.stdout.on('data', updateStdout); - } - - processingDone = true; - } - - proc.on('close', (code, signal) => { - if (signal || code >= 1) { - err = new (_errors || _load_errors()).ProcessTermError(['Command failed.', signal ? `Exit signal: ${signal}` : `Exit code: ${code}`, `Command: ${program}`, `Arguments: ${args.join(' ')}`, `Directory: ${opts.cwd || process.cwd()}`, `Output:\n${stdout.trim()}`].join('\n')); - err.EXIT_SIGNAL = signal; - err.EXIT_CODE = code; - } - - if (processingDone || err) { - finish(); - } else { - processClosed = true; - } - }); - })); -} - /***/ }), /* 59 */ /***/ (function(module, exports, __webpack_require__) { @@ -25742,9 +25794,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de var global = __webpack_require__(17); var core = __webpack_require__(31); -var ctx = __webpack_require__(69); +var ctx = __webpack_require__(70); var hide = __webpack_require__(42); -var has = __webpack_require__(70); +var has = __webpack_require__(71); var PROTOTYPE = 'prototype'; var $export = function (type, name, source) { @@ -25823,7 +25875,7 @@ try { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = from; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(11); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isPromise__ = __webpack_require__(445); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isArrayLike__ = __webpack_require__(442); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_isInteropObservable__ = __webpack_require__(928); @@ -25954,7 +26006,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return __WEBPACK_IMPORTED_MODULE_37__internal_operators_isEmpty__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_38__internal_operators_last__ = __webpack_require__(868); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "last", function() { return __WEBPACK_IMPORTED_MODULE_38__internal_operators_last__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_39__internal_operators_map__ = __webpack_require__(46); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_39__internal_operators_map__ = __webpack_require__(47); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "map", function() { return __WEBPACK_IMPORTED_MODULE_39__internal_operators_map__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_40__internal_operators_mapTo__ = __webpack_require__(869); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return __WEBPACK_IMPORTED_MODULE_40__internal_operators_mapTo__["a"]; }); @@ -25975,7 +26027,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return __WEBPACK_IMPORTED_MODULE_47__internal_operators_mergeScan__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_48__internal_operators_min__ = __webpack_require__(875); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "min", function() { return __WEBPACK_IMPORTED_MODULE_48__internal_operators_min__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_49__internal_operators_multicast__ = __webpack_require__(116); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_49__internal_operators_multicast__ = __webpack_require__(117); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "multicast", function() { return __WEBPACK_IMPORTED_MODULE_49__internal_operators_multicast__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_50__internal_operators_observeOn__ = __webpack_require__(434); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "observeOn", function() { return __WEBPACK_IMPORTED_MODULE_50__internal_operators_observeOn__["b"]; }); @@ -25997,7 +26049,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return __WEBPACK_IMPORTED_MODULE_58__internal_operators_publishReplay__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_59__internal_operators_race__ = __webpack_require__(884); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return __WEBPACK_IMPORTED_MODULE_59__internal_operators_race__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_60__internal_operators_reduce__ = __webpack_require__(187); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_60__internal_operators_reduce__ = __webpack_require__(188); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return __WEBPACK_IMPORTED_MODULE_60__internal_operators_reduce__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_61__internal_operators_repeat__ = __webpack_require__(885); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return __WEBPACK_IMPORTED_MODULE_61__internal_operators_repeat__["a"]; }); @@ -26055,7 +26107,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return __WEBPACK_IMPORTED_MODULE_87__internal_operators_throttle__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_88__internal_operators_throttleTime__ = __webpack_require__(905); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "throttleTime", function() { return __WEBPACK_IMPORTED_MODULE_88__internal_operators_throttleTime__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_89__internal_operators_throwIfEmpty__ = __webpack_require__(188); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_89__internal_operators_throwIfEmpty__ = __webpack_require__(189); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return __WEBPACK_IMPORTED_MODULE_89__internal_operators_throwIfEmpty__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_90__internal_operators_timeInterval__ = __webpack_require__(906); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return __WEBPACK_IMPORTED_MODULE_90__internal_operators_timeInterval__["a"]; }); @@ -26201,12 +26253,398 @@ module.exports = require("buffer"); /* 65 */ /***/ (function(module, exports, __webpack_require__) { +"use strict"; + + +const Buffer = __webpack_require__(45).Buffer + +const crypto = __webpack_require__(11) +const Transform = __webpack_require__(23).Transform + +const SPEC_ALGORITHMS = ['sha256', 'sha384', 'sha512'] + +const BASE64_REGEX = /^[a-z0-9+/]+(?:=?=?)$/i +const SRI_REGEX = /^([^-]+)-([^?]+)([?\S*]*)$/ +const STRICT_SRI_REGEX = /^([^-]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)*$/ +const VCHAR_REGEX = /^[\x21-\x7E]+$/ + +class Hash { + get isHash () { return true } + constructor (hash, opts) { + const strict = !!(opts && opts.strict) + this.source = hash.trim() + // 3.1. Integrity metadata (called "Hash" by ssri) + // https://w3c.github.io/webappsec-subresource-integrity/#integrity-metadata-description + const match = this.source.match( + strict + ? STRICT_SRI_REGEX + : SRI_REGEX + ) + if (!match) { return } + if (strict && !SPEC_ALGORITHMS.some(a => a === match[1])) { return } + this.algorithm = match[1] + this.digest = match[2] + + const rawOpts = match[3] + this.options = rawOpts ? rawOpts.slice(1).split('?') : [] + } + hexDigest () { + return this.digest && Buffer.from(this.digest, 'base64').toString('hex') + } + toJSON () { + return this.toString() + } + toString (opts) { + if (opts && opts.strict) { + // Strict mode enforces the standard as close to the foot of the + // letter as it can. + if (!( + // The spec has very restricted productions for algorithms. + // https://www.w3.org/TR/CSP2/#source-list-syntax + SPEC_ALGORITHMS.some(x => x === this.algorithm) && + // Usually, if someone insists on using a "different" base64, we + // leave it as-is, since there's multiple standards, and the + // specified is not a URL-safe variant. + // https://www.w3.org/TR/CSP2/#base64_value + this.digest.match(BASE64_REGEX) && + // Option syntax is strictly visual chars. + // https://w3c.github.io/webappsec-subresource-integrity/#grammardef-option-expression + // https://tools.ietf.org/html/rfc5234#appendix-B.1 + (this.options || []).every(opt => opt.match(VCHAR_REGEX)) + )) { + return '' + } + } + const options = this.options && this.options.length + ? `?${this.options.join('?')}` + : '' + return `${this.algorithm}-${this.digest}${options}` + } +} + +class Integrity { + get isIntegrity () { return true } + toJSON () { + return this.toString() + } + toString (opts) { + opts = opts || {} + let sep = opts.sep || ' ' + if (opts.strict) { + // Entries must be separated by whitespace, according to spec. + sep = sep.replace(/\S+/g, ' ') + } + return Object.keys(this).map(k => { + return this[k].map(hash => { + return Hash.prototype.toString.call(hash, opts) + }).filter(x => x.length).join(sep) + }).filter(x => x.length).join(sep) + } + concat (integrity, opts) { + const other = typeof integrity === 'string' + ? integrity + : stringify(integrity, opts) + return parse(`${this.toString(opts)} ${other}`, opts) + } + hexDigest () { + return parse(this, {single: true}).hexDigest() + } + match (integrity, opts) { + const other = parse(integrity, opts) + const algo = other.pickAlgorithm(opts) + return ( + this[algo] && + other[algo] && + this[algo].find(hash => + other[algo].find(otherhash => + hash.digest === otherhash.digest + ) + ) + ) || false + } + pickAlgorithm (opts) { + const pickAlgorithm = (opts && opts.pickAlgorithm) || getPrioritizedHash + const keys = Object.keys(this) + if (!keys.length) { + throw new Error(`No algorithms available for ${ + JSON.stringify(this.toString()) + }`) + } + return keys.reduce((acc, algo) => { + return pickAlgorithm(acc, algo) || acc + }) + } +} + +module.exports.parse = parse +function parse (sri, opts) { + opts = opts || {} + if (typeof sri === 'string') { + return _parse(sri, opts) + } else if (sri.algorithm && sri.digest) { + const fullSri = new Integrity() + fullSri[sri.algorithm] = [sri] + return _parse(stringify(fullSri, opts), opts) + } else { + return _parse(stringify(sri, opts), opts) + } +} + +function _parse (integrity, opts) { + // 3.4.3. Parse metadata + // https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata + if (opts.single) { + return new Hash(integrity, opts) + } + return integrity.trim().split(/\s+/).reduce((acc, string) => { + const hash = new Hash(string, opts) + if (hash.algorithm && hash.digest) { + const algo = hash.algorithm + if (!acc[algo]) { acc[algo] = [] } + acc[algo].push(hash) + } + return acc + }, new Integrity()) +} + +module.exports.stringify = stringify +function stringify (obj, opts) { + if (obj.algorithm && obj.digest) { + return Hash.prototype.toString.call(obj, opts) + } else if (typeof obj === 'string') { + return stringify(parse(obj, opts), opts) + } else { + return Integrity.prototype.toString.call(obj, opts) + } +} + +module.exports.fromHex = fromHex +function fromHex (hexDigest, algorithm, opts) { + const optString = (opts && opts.options && opts.options.length) + ? `?${opts.options.join('?')}` + : '' + return parse( + `${algorithm}-${ + Buffer.from(hexDigest, 'hex').toString('base64') + }${optString}`, opts + ) +} + +module.exports.fromData = fromData +function fromData (data, opts) { + opts = opts || {} + const algorithms = opts.algorithms || ['sha512'] + const optString = opts.options && opts.options.length + ? `?${opts.options.join('?')}` + : '' + return algorithms.reduce((acc, algo) => { + const digest = crypto.createHash(algo).update(data).digest('base64') + const hash = new Hash( + `${algo}-${digest}${optString}`, + opts + ) + if (hash.algorithm && hash.digest) { + const algo = hash.algorithm + if (!acc[algo]) { acc[algo] = [] } + acc[algo].push(hash) + } + return acc + }, new Integrity()) +} + +module.exports.fromStream = fromStream +function fromStream (stream, opts) { + opts = opts || {} + const P = opts.Promise || Promise + const istream = integrityStream(opts) + return new P((resolve, reject) => { + stream.pipe(istream) + stream.on('error', reject) + istream.on('error', reject) + let sri + istream.on('integrity', s => { sri = s }) + istream.on('end', () => resolve(sri)) + istream.on('data', () => {}) + }) +} + +module.exports.checkData = checkData +function checkData (data, sri, opts) { + opts = opts || {} + sri = parse(sri, opts) + if (!Object.keys(sri).length) { + if (opts.error) { + throw Object.assign( + new Error('No valid integrity hashes to check against'), { + code: 'EINTEGRITY' + } + ) + } else { + return false + } + } + const algorithm = sri.pickAlgorithm(opts) + const digest = crypto.createHash(algorithm).update(data).digest('base64') + const newSri = parse({algorithm, digest}) + const match = newSri.match(sri, opts) + if (match || !opts.error) { + return match + } else if (typeof opts.size === 'number' && (data.length !== opts.size)) { + const err = new Error(`data size mismatch when checking ${sri}.\n Wanted: ${opts.size}\n Found: ${data.length}`) + err.code = 'EBADSIZE' + err.found = data.length + err.expected = opts.size + err.sri = sri + throw err + } else { + const err = new Error(`Integrity checksum failed when using ${algorithm}: Wanted ${sri}, but got ${newSri}. (${data.length} bytes)`) + err.code = 'EINTEGRITY' + err.found = newSri + err.expected = sri + err.algorithm = algorithm + err.sri = sri + throw err + } +} + +module.exports.checkStream = checkStream +function checkStream (stream, sri, opts) { + opts = opts || {} + const P = opts.Promise || Promise + const checker = integrityStream(Object.assign({}, opts, { + integrity: sri + })) + return new P((resolve, reject) => { + stream.pipe(checker) + stream.on('error', reject) + checker.on('error', reject) + let sri + checker.on('verified', s => { sri = s }) + checker.on('end', () => resolve(sri)) + checker.on('data', () => {}) + }) +} + +module.exports.integrityStream = integrityStream +function integrityStream (opts) { + opts = opts || {} + // For verification + const sri = opts.integrity && parse(opts.integrity, opts) + const goodSri = sri && Object.keys(sri).length + const algorithm = goodSri && sri.pickAlgorithm(opts) + const digests = goodSri && sri[algorithm] + // Calculating stream + const algorithms = Array.from( + new Set( + (opts.algorithms || ['sha512']) + .concat(algorithm ? [algorithm] : []) + ) + ) + const hashes = algorithms.map(crypto.createHash) + let streamSize = 0 + const stream = new Transform({ + transform (chunk, enc, cb) { + streamSize += chunk.length + hashes.forEach(h => h.update(chunk, enc)) + cb(null, chunk, enc) + } + }).on('end', () => { + const optString = (opts.options && opts.options.length) + ? `?${opts.options.join('?')}` + : '' + const newSri = parse(hashes.map((h, i) => { + return `${algorithms[i]}-${h.digest('base64')}${optString}` + }).join(' '), opts) + // Integrity verification mode + const match = goodSri && newSri.match(sri, opts) + if (typeof opts.size === 'number' && streamSize !== opts.size) { + const err = new Error(`stream size mismatch when checking ${sri}.\n Wanted: ${opts.size}\n Found: ${streamSize}`) + err.code = 'EBADSIZE' + err.found = streamSize + err.expected = opts.size + err.sri = sri + stream.emit('error', err) + } else if (opts.integrity && !match) { + const err = new Error(`${sri} integrity checksum failed when using ${algorithm}: wanted ${digests} but got ${newSri}. (${streamSize} bytes)`) + err.code = 'EINTEGRITY' + err.found = newSri + err.expected = digests + err.algorithm = algorithm + err.sri = sri + stream.emit('error', err) + } else { + stream.emit('size', streamSize) + stream.emit('integrity', newSri) + match && stream.emit('verified', match) + } + }) + return stream +} + +module.exports.create = createIntegrity +function createIntegrity (opts) { + opts = opts || {} + const algorithms = opts.algorithms || ['sha512'] + const optString = opts.options && opts.options.length + ? `?${opts.options.join('?')}` + : '' + + const hashes = algorithms.map(crypto.createHash) + + return { + update: function (chunk, enc) { + hashes.forEach(h => h.update(chunk, enc)) + return this + }, + digest: function (enc) { + const integrity = algorithms.reduce((acc, algo) => { + const digest = hashes.shift().digest('base64') + const hash = new Hash( + `${algo}-${digest}${optString}`, + opts + ) + if (hash.algorithm && hash.digest) { + const algo = hash.algorithm + if (!acc[algo]) { acc[algo] = [] } + acc[algo].push(hash) + } + return acc + }, new Integrity()) + + return integrity + } + } +} + +const NODE_HASHES = new Set(crypto.getHashes()) + +// This is a Best Effort™ at a reasonable priority for hash algos +const DEFAULT_PRIORITY = [ + 'md5', 'whirlpool', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512', + // TODO - it's unclear _which_ of these Node will actually use as its name + // for the algorithm, so we guesswork it based on the OpenSSL names. + 'sha3', + 'sha3-256', 'sha3-384', 'sha3-512', + 'sha3_256', 'sha3_384', 'sha3_512' +].filter(algo => NODE_HASHES.has(algo)) + +function getPrioritizedHash (algo1, algo2) { + return DEFAULT_PRIORITY.indexOf(algo1.toLowerCase()) >= DEFAULT_PRIORITY.indexOf(algo2.toLowerCase()) + ? algo1 + : algo2 +} + + +/***/ }), +/* 66 */ +/***/ (function(module, exports, __webpack_require__) { + // Copyright 2011 Mark Cavage All rights reserved. // If you have no idea what ASN.1 or BER is, see this: // ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc -var Ber = __webpack_require__(514); +var Ber = __webpack_require__(482); @@ -26224,7 +26662,7 @@ module.exports = { /***/ }), -/* 66 */ +/* 67 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -26238,21 +26676,21 @@ exports.home = undefined; var _rootUser; function _load_rootUser() { - return _rootUser = _interopRequireDefault(__webpack_require__(223)); + return _rootUser = _interopRequireDefault(__webpack_require__(221)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } const path = __webpack_require__(0); -const home = exports.home = __webpack_require__(49).homedir(); +const home = exports.home = __webpack_require__(46).homedir(); const userHomeDir = (_rootUser || _load_rootUser()).default ? path.resolve('/usr/local/share') : home; exports.default = userHomeDir; /***/ }), -/* 67 */ +/* 68 */ /***/ (function(module, exports) { module.exports = function (it) { @@ -26262,7 +26700,7 @@ module.exports = function (it) { /***/ }), -/* 68 */ +/* 69 */ /***/ (function(module, exports) { var toString = {}.toString; @@ -26273,11 +26711,11 @@ module.exports = function (it) { /***/ }), -/* 69 */ +/* 70 */ /***/ (function(module, exports, __webpack_require__) { // optional / simple context binding -var aFunction = __webpack_require__(67); +var aFunction = __webpack_require__(68); module.exports = function (fn, that, length) { aFunction(fn); if (that === undefined) return fn; @@ -26299,7 +26737,7 @@ module.exports = function (fn, that, length) { /***/ }), -/* 70 */ +/* 71 */ /***/ (function(module, exports) { var hasOwnProperty = {}.hasOwnProperty; @@ -26309,15 +26747,15 @@ module.exports = function (it, key) { /***/ }), -/* 71 */ +/* 72 */ /***/ (function(module, exports, __webpack_require__) { var anObject = __webpack_require__(35); -var IE8_DOM_DEFINE = __webpack_require__(238); -var toPrimitive = __webpack_require__(255); +var IE8_DOM_DEFINE = __webpack_require__(235); +var toPrimitive = __webpack_require__(252); var dP = Object.defineProperty; -exports.f = __webpack_require__(51) ? Object.defineProperty : function defineProperty(O, P, Attributes) { +exports.f = __webpack_require__(52) ? Object.defineProperty : function defineProperty(O, P, Attributes) { anObject(O); P = toPrimitive(P, true); anObject(Attributes); @@ -26331,7 +26769,7 @@ exports.f = __webpack_require__(51) ? Object.defineProperty : function definePro /***/ }), -/* 72 */ +/* 73 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -26352,7 +26790,7 @@ var Schema = __webpack_require__(44); module.exports = Schema.DEFAULT = new Schema({ include: [ - __webpack_require__(55) + __webpack_require__(56) ], explicit: [ __webpack_require__(290), @@ -26363,7 +26801,7 @@ module.exports = Schema.DEFAULT = new Schema({ /***/ }), -/* 73 */ +/* 74 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2015 Joyent, Inc. @@ -26453,7 +26891,7 @@ module.exports = { /***/ }), -/* 74 */ +/* 75 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2015 Joyent, Inc. @@ -26463,10 +26901,10 @@ module.exports = Signature; var assert = __webpack_require__(16); var Buffer = __webpack_require__(15).Buffer; var algs = __webpack_require__(32); -var crypto = __webpack_require__(12); -var errs = __webpack_require__(73); +var crypto = __webpack_require__(11); +var errs = __webpack_require__(74); var utils = __webpack_require__(26); -var asn1 = __webpack_require__(65); +var asn1 = __webpack_require__(66); var SSHBuffer = __webpack_require__(159); var InvalidAlgorithmError = errs.InvalidAlgorithmError; @@ -26773,7 +27211,7 @@ Signature._oldVersionDetect = function (obj) { /***/ }), -/* 75 */ +/* 76 */ /***/ (function(module, exports, __webpack_require__) { (function(nacl) { @@ -29152,7 +29590,7 @@ nacl.setPRNG = function(fn) { }); } else if (true) { // Node.js. - crypto = __webpack_require__(12); + crypto = __webpack_require__(11); if (crypto && crypto.randomBytes) { nacl.setPRNG(function(x, n) { var i, v = crypto.randomBytes(n); @@ -29167,397 +29605,11 @@ nacl.setPRNG = function(fn) { /***/ }), -/* 76 */ +/* 77 */ /***/ (function(module, exports) { module.exports = require("events"); -/***/ }), -/* 77 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const Buffer = __webpack_require__(45).Buffer - -const crypto = __webpack_require__(12) -const Transform = __webpack_require__(23).Transform - -const SPEC_ALGORITHMS = ['sha256', 'sha384', 'sha512'] - -const BASE64_REGEX = /^[a-z0-9+/]+(?:=?=?)$/i -const SRI_REGEX = /^([^-]+)-([^?]+)([?\S*]*)$/ -const STRICT_SRI_REGEX = /^([^-]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)*$/ -const VCHAR_REGEX = /^[\x21-\x7E]+$/ - -class Hash { - get isHash () { return true } - constructor (hash, opts) { - const strict = !!(opts && opts.strict) - this.source = hash.trim() - // 3.1. Integrity metadata (called "Hash" by ssri) - // https://w3c.github.io/webappsec-subresource-integrity/#integrity-metadata-description - const match = this.source.match( - strict - ? STRICT_SRI_REGEX - : SRI_REGEX - ) - if (!match) { return } - if (strict && !SPEC_ALGORITHMS.some(a => a === match[1])) { return } - this.algorithm = match[1] - this.digest = match[2] - - const rawOpts = match[3] - this.options = rawOpts ? rawOpts.slice(1).split('?') : [] - } - hexDigest () { - return this.digest && Buffer.from(this.digest, 'base64').toString('hex') - } - toJSON () { - return this.toString() - } - toString (opts) { - if (opts && opts.strict) { - // Strict mode enforces the standard as close to the foot of the - // letter as it can. - if (!( - // The spec has very restricted productions for algorithms. - // https://www.w3.org/TR/CSP2/#source-list-syntax - SPEC_ALGORITHMS.some(x => x === this.algorithm) && - // Usually, if someone insists on using a "different" base64, we - // leave it as-is, since there's multiple standards, and the - // specified is not a URL-safe variant. - // https://www.w3.org/TR/CSP2/#base64_value - this.digest.match(BASE64_REGEX) && - // Option syntax is strictly visual chars. - // https://w3c.github.io/webappsec-subresource-integrity/#grammardef-option-expression - // https://tools.ietf.org/html/rfc5234#appendix-B.1 - (this.options || []).every(opt => opt.match(VCHAR_REGEX)) - )) { - return '' - } - } - const options = this.options && this.options.length - ? `?${this.options.join('?')}` - : '' - return `${this.algorithm}-${this.digest}${options}` - } -} - -class Integrity { - get isIntegrity () { return true } - toJSON () { - return this.toString() - } - toString (opts) { - opts = opts || {} - let sep = opts.sep || ' ' - if (opts.strict) { - // Entries must be separated by whitespace, according to spec. - sep = sep.replace(/\S+/g, ' ') - } - return Object.keys(this).map(k => { - return this[k].map(hash => { - return Hash.prototype.toString.call(hash, opts) - }).filter(x => x.length).join(sep) - }).filter(x => x.length).join(sep) - } - concat (integrity, opts) { - const other = typeof integrity === 'string' - ? integrity - : stringify(integrity, opts) - return parse(`${this.toString(opts)} ${other}`, opts) - } - hexDigest () { - return parse(this, {single: true}).hexDigest() - } - match (integrity, opts) { - const other = parse(integrity, opts) - const algo = other.pickAlgorithm(opts) - return ( - this[algo] && - other[algo] && - this[algo].find(hash => - other[algo].find(otherhash => - hash.digest === otherhash.digest - ) - ) - ) || false - } - pickAlgorithm (opts) { - const pickAlgorithm = (opts && opts.pickAlgorithm) || getPrioritizedHash - const keys = Object.keys(this) - if (!keys.length) { - throw new Error(`No algorithms available for ${ - JSON.stringify(this.toString()) - }`) - } - return keys.reduce((acc, algo) => { - return pickAlgorithm(acc, algo) || acc - }) - } -} - -module.exports.parse = parse -function parse (sri, opts) { - opts = opts || {} - if (typeof sri === 'string') { - return _parse(sri, opts) - } else if (sri.algorithm && sri.digest) { - const fullSri = new Integrity() - fullSri[sri.algorithm] = [sri] - return _parse(stringify(fullSri, opts), opts) - } else { - return _parse(stringify(sri, opts), opts) - } -} - -function _parse (integrity, opts) { - // 3.4.3. Parse metadata - // https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata - if (opts.single) { - return new Hash(integrity, opts) - } - return integrity.trim().split(/\s+/).reduce((acc, string) => { - const hash = new Hash(string, opts) - if (hash.algorithm && hash.digest) { - const algo = hash.algorithm - if (!acc[algo]) { acc[algo] = [] } - acc[algo].push(hash) - } - return acc - }, new Integrity()) -} - -module.exports.stringify = stringify -function stringify (obj, opts) { - if (obj.algorithm && obj.digest) { - return Hash.prototype.toString.call(obj, opts) - } else if (typeof obj === 'string') { - return stringify(parse(obj, opts), opts) - } else { - return Integrity.prototype.toString.call(obj, opts) - } -} - -module.exports.fromHex = fromHex -function fromHex (hexDigest, algorithm, opts) { - const optString = (opts && opts.options && opts.options.length) - ? `?${opts.options.join('?')}` - : '' - return parse( - `${algorithm}-${ - Buffer.from(hexDigest, 'hex').toString('base64') - }${optString}`, opts - ) -} - -module.exports.fromData = fromData -function fromData (data, opts) { - opts = opts || {} - const algorithms = opts.algorithms || ['sha512'] - const optString = opts.options && opts.options.length - ? `?${opts.options.join('?')}` - : '' - return algorithms.reduce((acc, algo) => { - const digest = crypto.createHash(algo).update(data).digest('base64') - const hash = new Hash( - `${algo}-${digest}${optString}`, - opts - ) - if (hash.algorithm && hash.digest) { - const algo = hash.algorithm - if (!acc[algo]) { acc[algo] = [] } - acc[algo].push(hash) - } - return acc - }, new Integrity()) -} - -module.exports.fromStream = fromStream -function fromStream (stream, opts) { - opts = opts || {} - const P = opts.Promise || Promise - const istream = integrityStream(opts) - return new P((resolve, reject) => { - stream.pipe(istream) - stream.on('error', reject) - istream.on('error', reject) - let sri - istream.on('integrity', s => { sri = s }) - istream.on('end', () => resolve(sri)) - istream.on('data', () => {}) - }) -} - -module.exports.checkData = checkData -function checkData (data, sri, opts) { - opts = opts || {} - sri = parse(sri, opts) - if (!Object.keys(sri).length) { - if (opts.error) { - throw Object.assign( - new Error('No valid integrity hashes to check against'), { - code: 'EINTEGRITY' - } - ) - } else { - return false - } - } - const algorithm = sri.pickAlgorithm(opts) - const digest = crypto.createHash(algorithm).update(data).digest('base64') - const newSri = parse({algorithm, digest}) - const match = newSri.match(sri, opts) - if (match || !opts.error) { - return match - } else if (typeof opts.size === 'number' && (data.length !== opts.size)) { - const err = new Error(`data size mismatch when checking ${sri}.\n Wanted: ${opts.size}\n Found: ${data.length}`) - err.code = 'EBADSIZE' - err.found = data.length - err.expected = opts.size - err.sri = sri - throw err - } else { - const err = new Error(`Integrity checksum failed when using ${algorithm}: Wanted ${sri}, but got ${newSri}. (${data.length} bytes)`) - err.code = 'EINTEGRITY' - err.found = newSri - err.expected = sri - err.algorithm = algorithm - err.sri = sri - throw err - } -} - -module.exports.checkStream = checkStream -function checkStream (stream, sri, opts) { - opts = opts || {} - const P = opts.Promise || Promise - const checker = integrityStream(Object.assign({}, opts, { - integrity: sri - })) - return new P((resolve, reject) => { - stream.pipe(checker) - stream.on('error', reject) - checker.on('error', reject) - let sri - checker.on('verified', s => { sri = s }) - checker.on('end', () => resolve(sri)) - checker.on('data', () => {}) - }) -} - -module.exports.integrityStream = integrityStream -function integrityStream (opts) { - opts = opts || {} - // For verification - const sri = opts.integrity && parse(opts.integrity, opts) - const goodSri = sri && Object.keys(sri).length - const algorithm = goodSri && sri.pickAlgorithm(opts) - const digests = goodSri && sri[algorithm] - // Calculating stream - const algorithms = Array.from( - new Set( - (opts.algorithms || ['sha512']) - .concat(algorithm ? [algorithm] : []) - ) - ) - const hashes = algorithms.map(crypto.createHash) - let streamSize = 0 - const stream = new Transform({ - transform (chunk, enc, cb) { - streamSize += chunk.length - hashes.forEach(h => h.update(chunk, enc)) - cb(null, chunk, enc) - } - }).on('end', () => { - const optString = (opts.options && opts.options.length) - ? `?${opts.options.join('?')}` - : '' - const newSri = parse(hashes.map((h, i) => { - return `${algorithms[i]}-${h.digest('base64')}${optString}` - }).join(' '), opts) - // Integrity verification mode - const match = goodSri && newSri.match(sri, opts) - if (typeof opts.size === 'number' && streamSize !== opts.size) { - const err = new Error(`stream size mismatch when checking ${sri}.\n Wanted: ${opts.size}\n Found: ${streamSize}`) - err.code = 'EBADSIZE' - err.found = streamSize - err.expected = opts.size - err.sri = sri - stream.emit('error', err) - } else if (opts.integrity && !match) { - const err = new Error(`${sri} integrity checksum failed when using ${algorithm}: wanted ${digests} but got ${newSri}. (${streamSize} bytes)`) - err.code = 'EINTEGRITY' - err.found = newSri - err.expected = digests - err.algorithm = algorithm - err.sri = sri - stream.emit('error', err) - } else { - stream.emit('size', streamSize) - stream.emit('integrity', newSri) - match && stream.emit('verified', match) - } - }) - return stream -} - -module.exports.create = createIntegrity -function createIntegrity (opts) { - opts = opts || {} - const algorithms = opts.algorithms || ['sha512'] - const optString = opts.options && opts.options.length - ? `?${opts.options.join('?')}` - : '' - - const hashes = algorithms.map(crypto.createHash) - - return { - update: function (chunk, enc) { - hashes.forEach(h => h.update(chunk, enc)) - return this - }, - digest: function (enc) { - const integrity = algorithms.reduce((acc, algo) => { - const digest = hashes.shift().digest('base64') - const hash = new Hash( - `${algo}-${digest}${optString}`, - opts - ) - if (hash.algorithm && hash.digest) { - const algo = hash.algorithm - if (!acc[algo]) { acc[algo] = [] } - acc[algo].push(hash) - } - return acc - }, new Integrity()) - - return integrity - } - } -} - -const NODE_HASHES = new Set(crypto.getHashes()) - -// This is a Best Effort™ at a reasonable priority for hash algos -const DEFAULT_PRIORITY = [ - 'md5', 'whirlpool', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512', - // TODO - it's unclear _which_ of these Node will actually use as its name - // for the algorithm, so we guesswork it based on the OpenSSL names. - 'sha3', - 'sha3-256', 'sha3-384', 'sha3-512', - 'sha3_256', 'sha3_384', 'sha3_512' -].filter(algo => NODE_HASHES.has(algo)) - -function getPrioritizedHash (algo1, algo2) { - return DEFAULT_PRIORITY.indexOf(algo1.toLowerCase()) >= DEFAULT_PRIORITY.indexOf(algo2.toLowerCase()) - ? algo1 - : algo2 -} - - /***/ }), /* 78 */ /***/ (function(module, exports, __webpack_require__) { @@ -29581,13 +29633,13 @@ function _load_baseResolver() { var _npmResolver; function _load_npmResolver() { - return _npmResolver = _interopRequireDefault(__webpack_require__(217)); + return _npmResolver = _interopRequireDefault(__webpack_require__(215)); } var _yarnResolver; function _load_yarnResolver() { - return _yarnResolver = _interopRequireDefault(__webpack_require__(576)); + return _yarnResolver = _interopRequireDefault(__webpack_require__(544)); } var _gitResolver; @@ -29599,43 +29651,43 @@ function _load_gitResolver() { var _tarballResolver; function _load_tarballResolver() { - return _tarballResolver = _interopRequireDefault(__webpack_require__(574)); + return _tarballResolver = _interopRequireDefault(__webpack_require__(542)); } var _githubResolver; function _load_githubResolver() { - return _githubResolver = _interopRequireDefault(__webpack_require__(367)); + return _githubResolver = _interopRequireDefault(__webpack_require__(361)); } var _fileResolver; function _load_fileResolver() { - return _fileResolver = _interopRequireDefault(__webpack_require__(215)); + return _fileResolver = _interopRequireDefault(__webpack_require__(213)); } var _linkResolver; function _load_linkResolver() { - return _linkResolver = _interopRequireDefault(__webpack_require__(368)); + return _linkResolver = _interopRequireDefault(__webpack_require__(362)); } var _gitlabResolver; function _load_gitlabResolver() { - return _gitlabResolver = _interopRequireDefault(__webpack_require__(572)); + return _gitlabResolver = _interopRequireDefault(__webpack_require__(540)); } var _gistResolver; function _load_gistResolver() { - return _gistResolver = _interopRequireDefault(__webpack_require__(216)); + return _gistResolver = _interopRequireDefault(__webpack_require__(214)); } var _bitbucketResolver; function _load_bitbucketResolver() { - return _bitbucketResolver = _interopRequireDefault(__webpack_require__(571)); + return _bitbucketResolver = _interopRequireDefault(__webpack_require__(539)); } var _hostedGitResolver; @@ -29647,7 +29699,7 @@ function _load_hostedGitResolver() { var _registryResolver; function _load_registryResolver() { - return _registryResolver = _interopRequireDefault(__webpack_require__(573)); + return _registryResolver = _interopRequireDefault(__webpack_require__(541)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -29725,7 +29777,7 @@ for (const key in registries) { var _ = __webpack_require__(38); var chalk = __webpack_require__(30); -var runAsync = __webpack_require__(181); +var runAsync = __webpack_require__(182); var { filter, flatMap, share, take, takeUntil } = __webpack_require__(63); var Choices = __webpack_require__(686); var ScreenManager = __webpack_require__(697); @@ -29873,7 +29925,7 @@ module.exports = Prompt; "use strict"; -var { fromEvent } = __webpack_require__(182); +var { fromEvent } = __webpack_require__(183); var { filter, map, share } = __webpack_require__(63); function normalizeKeypressEvents(value, key) { @@ -31303,7 +31355,7 @@ try { } catch (er) {} var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} -var expand = __webpack_require__(229) +var expand = __webpack_require__(226) var plTypes = { '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, @@ -32311,7 +32363,7 @@ var InnerSubscriber = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = fromArray; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(11); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscription__ = __webpack_require__(25); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_subscribeToArray__ = __webpack_require__(447); /** PURE_IMPORTS_START _Observable,_Subscription,_util_subscribeToArray PURE_IMPORTS_END */ @@ -32355,8 +32407,8 @@ module.exports = { }; var assert = __webpack_require__(16); -var asn1 = __webpack_require__(65); -var crypto = __webpack_require__(12); +var asn1 = __webpack_require__(66); +var crypto = __webpack_require__(11); var Buffer = __webpack_require__(15).Buffer; var algs = __webpack_require__(32); var utils = __webpack_require__(26); @@ -32365,10 +32417,10 @@ var PrivateKey = __webpack_require__(33); var pkcs1 = __webpack_require__(327); var pkcs8 = __webpack_require__(157); -var sshpriv = __webpack_require__(192); +var sshpriv = __webpack_require__(193); var rfc4253 = __webpack_require__(103); -var errors = __webpack_require__(73); +var errors = __webpack_require__(74); /* * For reading we support both PKCS#1 and PKCS#8. If we find a private key, @@ -32562,7 +32614,7 @@ exports.SCOPE_SEPARATOR = undefined; var _extends2; function _load_extends() { - return _extends2 = _interopRequireDefault(__webpack_require__(22)); + return _extends2 = _interopRequireDefault(__webpack_require__(20)); } var _asyncToGenerator2; @@ -32580,25 +32632,25 @@ function _load_constants() { var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(4)); + return _fs = _interopRequireWildcard(__webpack_require__(5)); } var _npmResolver; function _load_npmResolver() { - return _npmResolver = _interopRequireDefault(__webpack_require__(217)); + return _npmResolver = _interopRequireDefault(__webpack_require__(215)); } var _envReplace; function _load_envReplace() { - return _envReplace = _interopRequireDefault(__webpack_require__(577)); + return _envReplace = _interopRequireDefault(__webpack_require__(545)); } var _baseRegistry; function _load_baseRegistry() { - return _baseRegistry = _interopRequireDefault(__webpack_require__(558)); + return _baseRegistry = _interopRequireDefault(__webpack_require__(526)); } var _misc; @@ -32610,7 +32662,7 @@ function _load_misc() { var _path; function _load_path() { - return _path = __webpack_require__(377); + return _path = __webpack_require__(371); } var _normalizeUrl; @@ -32622,13 +32674,13 @@ function _load_normalizeUrl() { var _userHomeDir; function _load_userHomeDir() { - return _userHomeDir = _interopRequireDefault(__webpack_require__(66)); + return _userHomeDir = _interopRequireDefault(__webpack_require__(67)); } var _userHomeDir2; function _load_userHomeDir2() { - return _userHomeDir2 = __webpack_require__(66); + return _userHomeDir2 = __webpack_require__(67); } var _errors; @@ -32746,7 +32798,7 @@ class NpmRegistry extends (_baseRegistry || _load_baseRegistry()).default { let resolved = pathname; if (!REGEX_REGISTRY_PREFIX.test(pathname)) { - resolved = (_url || _load_url()).default.resolve((0, (_misc || _load_misc()).addSuffix)(registry, '/'), pathname); + resolved = (_url || _load_url()).default.resolve((0, (_misc || _load_misc()).addSuffix)(registry, '/'), `./${pathname}`); } if (REGEX_REGISTRY_ENFORCED_HTTPS.test(resolved)) { @@ -32821,6 +32873,10 @@ class NpmRegistry extends (_baseRegistry || _load_baseRegistry()).default { } _this.reporter.info(_this.reporter.lang('twoFactorAuthenticationEnabled')); + if (error.notice) { + _this.reporter.info(error.notice); + } + _this.otp = yield (0, (_login || _load_login()).getOneTimePassword)(_this.reporter); _this.requestManager.clearCache(); @@ -33178,7 +33234,7 @@ function _load_normalizePattern() { return _normalizePattern2 = __webpack_require__(37); } -const semver = __webpack_require__(21); +const semver = __webpack_require__(22); class WorkspaceLayout { constructor(workspaces, config) { @@ -33220,7 +33276,7 @@ module.exports = function (it) { /* 92 */ /***/ (function(module, exports, __webpack_require__) { -var isObject = __webpack_require__(52); +var isObject = __webpack_require__(53); var document = __webpack_require__(17).document; // typeof document.createElement is 'object' in old IE var is = isObject(document) && isObject(document.createElement); @@ -33243,7 +33299,7 @@ module.exports = true; "use strict"; // 25.4.1.5 NewPromiseCapability(C) -var aFunction = __webpack_require__(67); +var aFunction = __webpack_require__(68); function PromiseCapability(C) { var resolve, reject; @@ -33265,9 +33321,9 @@ module.exports.f = function (C) { /* 95 */ /***/ (function(module, exports, __webpack_require__) { -var def = __webpack_require__(71).f; -var has = __webpack_require__(70); -var TAG = __webpack_require__(20)('toStringTag'); +var def = __webpack_require__(72).f; +var has = __webpack_require__(71); +var TAG = __webpack_require__(21)('toStringTag'); module.exports = function (it, tag, stat) { if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); @@ -33302,7 +33358,7 @@ module.exports = function (it) { /***/ (function(module, exports, __webpack_require__) { // to indexed object, toObject with fallback for non-array-like ES3 strings -var IObject = __webpack_require__(170); +var IObject = __webpack_require__(171); var defined = __webpack_require__(91); module.exports = function (it) { return IObject(defined(it)); @@ -33355,16 +33411,16 @@ module.exports = function (it) { module.exports = glob -var fs = __webpack_require__(5) +var fs = __webpack_require__(4) var rp = __webpack_require__(140) var minimatch = __webpack_require__(82) var Minimatch = minimatch.Minimatch var inherits = __webpack_require__(61) -var EE = __webpack_require__(76).EventEmitter +var EE = __webpack_require__(77).EventEmitter var path = __webpack_require__(0) var assert = __webpack_require__(28) var isAbsolute = __webpack_require__(101) -var globSync = __webpack_require__(272) +var globSync = __webpack_require__(269) var common = __webpack_require__(141) var alphasort = common.alphasort var alphasorti = common.alphasorti @@ -34175,7 +34231,7 @@ if (process.env.READABLE_STREAM === 'disable' && Stream) { exports.Stream = Stream || exports; exports.Readable = exports; exports.Writable = __webpack_require__(408); - exports.Duplex = __webpack_require__(115); + exports.Duplex = __webpack_require__(116); exports.Transform = __webpack_require__(407); exports.PassThrough = __webpack_require__(792); } @@ -34366,6 +34422,85 @@ module.exports = require("tty"); "use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getInstallationMethod = exports.version = undefined; + +var _asyncToGenerator2; + +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2)); +} + +let getInstallationMethod = exports.getInstallationMethod = (() => { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + let installationMethod = originalInstallationMethod; + + // If there's a package.json in the parent directory, it could have an + // override for the installation method, so we should prefer that over + // whatever was originally in Yarn's package.json. This is the case with + // systems such as Homebrew, which take the tarball and modify the + // installation method so we're aware of the fact that Yarn was installed via + // Homebrew (so things like update notifications can point out the correct + // command to upgrade). + try { + const manifestPath = (_path || _load_path()).default.join(__dirname, '..', 'package.json'); + if ((_fs2 || _load_fs2()).default.existsSync(manifestPath)) { + // non-async version is deprecated + const manifest = yield (0, (_fs || _load_fs()).readJson)(manifestPath); + if (manifest.installationMethod) { + installationMethod = manifest.installationMethod; + } + } + } catch (e) { + // Ignore any errors; this is not critical functionality. + } + return installationMethod; + }); + + return function getInstallationMethod() { + return _ref.apply(this, arguments); + }; +})(); + +var _fs; + +function _load_fs() { + return _fs = __webpack_require__(5); +} + +var _fs2; + +function _load_fs2() { + return _fs2 = _interopRequireDefault(__webpack_require__(4)); +} + +var _path; + +function _load_path() { + return _path = _interopRequireDefault(__webpack_require__(0)); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// This will be bundled directly in the .js file for production builds +var _require = __webpack_require__(195); /** + * Determines the current version of Yarn itself. + * + */ + +const version = _require.version, + originalInstallationMethod = _require.installationMethod; +exports.version = version; + +/***/ }), +/* 106 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + Object.defineProperty(exports, "__esModule", { value: true }); @@ -34800,15 +34935,27 @@ function hasMergeConflicts(str) { function parse(str, fileLoc) { const parser = new Parser(str, fileLoc); parser.next(); - try { - return parser.parse(); - } catch (error1) { + + if (!fileLoc.endsWith(`.yml`)) { try { - return safeLoad(str, { - schema: FAILSAFE_SCHEMA - }); - } catch (error2) { - throw error1; + return parser.parse(); + } catch (error1) { + try { + return safeLoad(str, { + schema: FAILSAFE_SCHEMA + }); + } catch (error2) { + throw error1; + } + } + } else { + const result = safeLoad(str, { + schema: FAILSAFE_SCHEMA + }); + if (typeof result === 'object') { + return result; + } else { + return {}; } } } @@ -34829,280 +34976,6 @@ function parseWithConflict(str, fileLoc) { } } -/***/ }), -/* 106 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - - -module.exports = { - copy: copy, - checkDataType: checkDataType, - checkDataTypes: checkDataTypes, - coerceToTypes: coerceToTypes, - toHash: toHash, - getProperty: getProperty, - escapeQuotes: escapeQuotes, - equal: __webpack_require__(204), - ucs2length: __webpack_require__(480), - varOccurences: varOccurences, - varReplace: varReplace, - cleanUpCode: cleanUpCode, - finalCleanUpCode: finalCleanUpCode, - schemaHasRules: schemaHasRules, - schemaHasRulesExcept: schemaHasRulesExcept, - toQuotedString: toQuotedString, - getPathExpr: getPathExpr, - getPath: getPath, - getData: getData, - unescapeFragment: unescapeFragment, - unescapeJsonPointer: unescapeJsonPointer, - escapeFragment: escapeFragment, - escapeJsonPointer: escapeJsonPointer -}; - - -function copy(o, to) { - to = to || {}; - for (var key in o) to[key] = o[key]; - return to; -} - - -function checkDataType(dataType, data, negate) { - var EQUAL = negate ? ' !== ' : ' === ' - , AND = negate ? ' || ' : ' && ' - , OK = negate ? '!' : '' - , NOT = negate ? '' : '!'; - switch (dataType) { - case 'null': return data + EQUAL + 'null'; - case 'array': return OK + 'Array.isArray(' + data + ')'; - case 'object': return '(' + OK + data + AND + - 'typeof ' + data + EQUAL + '"object"' + AND + - NOT + 'Array.isArray(' + data + '))'; - case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND + - NOT + '(' + data + ' % 1)' + - AND + data + EQUAL + data + ')'; - default: return 'typeof ' + data + EQUAL + '"' + dataType + '"'; - } -} - - -function checkDataTypes(dataTypes, data) { - switch (dataTypes.length) { - case 1: return checkDataType(dataTypes[0], data, true); - default: - var code = ''; - var types = toHash(dataTypes); - if (types.array && types.object) { - code = types.null ? '(': '(!' + data + ' || '; - code += 'typeof ' + data + ' !== "object")'; - delete types.null; - delete types.array; - delete types.object; - } - if (types.number) delete types.integer; - for (var t in types) - code += (code ? ' && ' : '' ) + checkDataType(t, data, true); - - return code; - } -} - - -var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]); -function coerceToTypes(optionCoerceTypes, dataTypes) { - if (Array.isArray(dataTypes)) { - var types = []; - for (var i=0; i= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl); - return paths[lvl - up]; - } - - if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl); - data = 'data' + ((lvl - up) || ''); - if (!jsonPointer) return data; - } - - var expr = data; - var segments = jsonPointer.split('/'); - for (var i=0; i= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl); + return paths[lvl - up]; + } + + if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl); + data = 'data' + ((lvl - up) || ''); + if (!jsonPointer) return data; + } + + var expr = data; + var segments = jsonPointer.split('/'); + for (var i=0; i * @@ -37097,7 +37244,7 @@ module.exports = micromatch; /***/ }), -/* 115 */ +/* 116 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -37131,7 +37278,7 @@ module.exports = micromatch; /**/ -var pna = __webpack_require__(180); +var pna = __webpack_require__(181); /**/ /**/ @@ -37234,7 +37381,7 @@ Duplex.prototype._destroy = function (err, cb) { }; /***/ }), -/* 116 */ +/* 117 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -37282,7 +37429,7 @@ var MulticastOperator = /*@__PURE__*/ (function () { /***/ }), -/* 117 */ +/* 118 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -37293,7 +37440,7 @@ var observable = typeof Symbol === 'function' && Symbol.observable || '@@observa /***/ }), -/* 118 */ +/* 119 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -37306,7 +37453,7 @@ function identity(x) { /***/ }), -/* 119 */ +/* 120 */ /***/ (function(module, exports, __webpack_require__) { var v1 = __webpack_require__(957); @@ -37319,85 +37466,6 @@ uuid.v4 = v4; module.exports = uuid; -/***/ }), -/* 120 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getInstallationMethod = exports.version = undefined; - -var _asyncToGenerator2; - -function _load_asyncToGenerator() { - return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2)); -} - -let getInstallationMethod = exports.getInstallationMethod = (() => { - var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - let installationMethod = originalInstallationMethod; - - // If there's a package.json in the parent directory, it could have an - // override for the installation method, so we should prefer that over - // whatever was originally in Yarn's package.json. This is the case with - // systems such as Homebrew, which take the tarball and modify the - // installation method so we're aware of the fact that Yarn was installed via - // Homebrew (so things like update notifications can point out the correct - // command to upgrade). - try { - const manifestPath = (_path || _load_path()).default.join(__dirname, '..', 'package.json'); - if ((_fs2 || _load_fs2()).default.existsSync(manifestPath)) { - // non-async version is deprecated - const manifest = yield (0, (_fs || _load_fs()).readJson)(manifestPath); - if (manifest.installationMethod) { - installationMethod = manifest.installationMethod; - } - } - } catch (e) { - // Ignore any errors; this is not critical functionality. - } - return installationMethod; - }); - - return function getInstallationMethod() { - return _ref.apply(this, arguments); - }; -})(); - -var _fs; - -function _load_fs() { - return _fs = __webpack_require__(4); -} - -var _fs2; - -function _load_fs2() { - return _fs2 = _interopRequireDefault(__webpack_require__(5)); -} - -var _path; - -function _load_path() { - return _path = _interopRequireDefault(__webpack_require__(0)); -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// This will be bundled directly in the .js file for production builds -var _require = __webpack_require__(194); /** - * Determines the current version of Yarn itself. - * - */ - -const version = _require.version, - originalInstallationMethod = _require.installationMethod; -exports.version = version; - /***/ }), /* 121 */ /***/ (function(module, exports, __webpack_require__) { @@ -37690,7 +37758,7 @@ function _load_errors() { var _index; function _load_index() { - return _index = __webpack_require__(57); + return _index = __webpack_require__(58); } var _baseReporter; @@ -37726,25 +37794,25 @@ function _load_add() { var _remove; function _load_remove() { - return _remove = __webpack_require__(359); + return _remove = __webpack_require__(353); } var _upgrade; function _load_upgrade() { - return _upgrade = __webpack_require__(207); + return _upgrade = __webpack_require__(205); } var _upgradeInteractive; function _load_upgradeInteractive() { - return _upgradeInteractive = __webpack_require__(362); + return _upgradeInteractive = __webpack_require__(356); } var _packageLinker; function _load_packageLinker() { - return _packageLinker = __webpack_require__(211); + return _packageLinker = __webpack_require__(209); } var _constants; @@ -37756,7 +37824,7 @@ function _load_constants() { var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(4)); + return _fs = _interopRequireWildcard(__webpack_require__(5)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -37946,7 +38014,7 @@ function _load_invariant() { var _semver; function _load_semver() { - return _semver = _interopRequireDefault(__webpack_require__(21)); + return _semver = _interopRequireDefault(__webpack_require__(22)); } var _validate; @@ -37964,7 +38032,7 @@ function _load_lockfile() { var _packageReference; function _load_packageReference() { - return _packageReference = _interopRequireDefault(__webpack_require__(365)); + return _packageReference = _interopRequireDefault(__webpack_require__(359)); } var _index; @@ -37988,19 +38056,19 @@ function _load_constants() { var _version; function _load_version() { - return _version = _interopRequireWildcard(__webpack_require__(226)); + return _version = _interopRequireWildcard(__webpack_require__(223)); } var _workspaceResolver; function _load_workspaceResolver() { - return _workspaceResolver = _interopRequireDefault(__webpack_require__(570)); + return _workspaceResolver = _interopRequireDefault(__webpack_require__(538)); } var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(4)); + return _fs = _interopRequireWildcard(__webpack_require__(5)); } var _normalizePattern4; @@ -38013,7 +38081,7 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const micromatch = __webpack_require__(114); +const micromatch = __webpack_require__(115); class PackageRequest { constructor(req, resolver) { @@ -38560,7 +38628,7 @@ function _load_misc() { var _version; function _load_version() { - return _version = _interopRequireWildcard(__webpack_require__(226)); + return _version = _interopRequireWildcard(__webpack_require__(223)); } var _guessName; @@ -38572,7 +38640,7 @@ function _load_guessName() { var _index2; function _load_index2() { - return _index2 = __webpack_require__(57); + return _index2 = __webpack_require__(58); } var _exoticResolver; @@ -38584,7 +38652,7 @@ function _load_exoticResolver() { var _git; function _load_git() { - return _git = _interopRequireDefault(__webpack_require__(219)); + return _git = _interopRequireDefault(__webpack_require__(217)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -38841,13 +38909,13 @@ function _load_errors() { var _util; function _load_util() { - return _util = __webpack_require__(221); + return _util = __webpack_require__(219); } var _typos; function _load_typos() { - return _typos = _interopRequireDefault(__webpack_require__(587)); + return _typos = _interopRequireDefault(__webpack_require__(555)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -39004,8 +39072,8 @@ function cleanDependencies(info, isRoot, reporter, warn) { /***/ (function(module, exports, __webpack_require__) { // getting tag from 19.1.3.6 Object.prototype.toString() -var cof = __webpack_require__(68); -var TAG = __webpack_require__(20)('toStringTag'); +var cof = __webpack_require__(69); +var TAG = __webpack_require__(21)('toStringTag'); // ES3 wrong here var ARG = cof(function () { return arguments; }()) == 'Arguments'; @@ -39054,13 +39122,13 @@ module.exports = document && document.documentElement; var LIBRARY = __webpack_require__(93); var $export = __webpack_require__(60); -var redefine = __webpack_require__(251); +var redefine = __webpack_require__(248); var hide = __webpack_require__(42); -var Iterators = __webpack_require__(53); -var $iterCreate = __webpack_require__(242); +var Iterators = __webpack_require__(54); +var $iterCreate = __webpack_require__(239); var setToStringTag = __webpack_require__(95); -var getPrototypeOf = __webpack_require__(248); -var ITERATOR = __webpack_require__(20)('iterator'); +var getPrototypeOf = __webpack_require__(245); +var ITERATOR = __webpack_require__(21)('iterator'); var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` var FF_ITERATOR = '@@iterator'; var KEYS = 'keys'; @@ -39140,7 +39208,7 @@ module.exports = function (exec) { /***/ (function(module, exports, __webpack_require__) { var anObject = __webpack_require__(35); -var isObject = __webpack_require__(52); +var isObject = __webpack_require__(53); var newPromiseCapability = __webpack_require__(94); module.exports = function (C, x) { @@ -39191,8 +39259,8 @@ var store = global[SHARED] || (global[SHARED] = {}); // 7.3.20 SpeciesConstructor(O, defaultConstructor) var anObject = __webpack_require__(35); -var aFunction = __webpack_require__(67); -var SPECIES = __webpack_require__(20)('species'); +var aFunction = __webpack_require__(68); +var SPECIES = __webpack_require__(21)('species'); module.exports = function (O, D) { var C = anObject(O).constructor; var S; @@ -39204,8 +39272,8 @@ module.exports = function (O, D) { /* 135 */ /***/ (function(module, exports, __webpack_require__) { -var ctx = __webpack_require__(69); -var invoke = __webpack_require__(239); +var ctx = __webpack_require__(70); +var invoke = __webpack_require__(236); var html = __webpack_require__(128); var cel = __webpack_require__(92); var global = __webpack_require__(17); @@ -39247,7 +39315,7 @@ if (!setTask || !clearTask) { delete queue[id]; }; // Node.js 0.8- - if (__webpack_require__(68)(process) == 'process') { + if (__webpack_require__(69)(process) == 'process') { defer = function (id) { process.nextTick(ctx(run, id, 1)); }; @@ -40122,13 +40190,13 @@ realpath.realpathSync = realpathSync realpath.monkeypatch = monkeypatch realpath.unmonkeypatch = unmonkeypatch -var fs = __webpack_require__(5) +var fs = __webpack_require__(4) var origRealpath = fs.realpath var origRealpathSync = fs.realpathSync var version = process.version var ok = /^v[0-5]\./.test(version) -var old = __webpack_require__(271) +var old = __webpack_require__(268) function newError (er) { return er && er.syscall === 'realpath' && ( @@ -40503,7 +40571,7 @@ module.exports = new Schema({ /***/ (function(module, exports, __webpack_require__) { var path = __webpack_require__(0); -var fs = __webpack_require__(5); +var fs = __webpack_require__(4); var _0777 = parseInt('0777', 8); module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; @@ -40716,7 +40784,7 @@ var FilterSubscriber = /*@__PURE__*/ (function (_super) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_subscribeToResult__ = __webpack_require__(14); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__OuterSubscriber__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__InnerSubscriber__ = __webpack_require__(84); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__map__ = __webpack_require__(46); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__map__ = __webpack_require__(47); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__observable_from__ = __webpack_require__(62); /** PURE_IMPORTS_START tslib,_util_subscribeToResult,_OuterSubscriber,_InnerSubscriber,_map,_observable_from PURE_IMPORTS_END */ @@ -41072,10 +41140,10 @@ module.exports = Certificate; var assert = __webpack_require__(16); var Buffer = __webpack_require__(15).Buffer; var algs = __webpack_require__(32); -var crypto = __webpack_require__(12); +var crypto = __webpack_require__(11); var Fingerprint = __webpack_require__(156); -var Signature = __webpack_require__(74); -var errs = __webpack_require__(73); +var Signature = __webpack_require__(75); +var errs = __webpack_require__(74); var util = __webpack_require__(3); var utils = __webpack_require__(26); var Key = __webpack_require__(27); @@ -41456,8 +41524,8 @@ module.exports = Fingerprint; var assert = __webpack_require__(16); var Buffer = __webpack_require__(15).Buffer; var algs = __webpack_require__(32); -var crypto = __webpack_require__(12); -var errs = __webpack_require__(73); +var crypto = __webpack_require__(11); +var errs = __webpack_require__(74); var Key = __webpack_require__(27); var Certificate = __webpack_require__(155); var utils = __webpack_require__(26); @@ -41630,7 +41698,7 @@ module.exports = { }; var assert = __webpack_require__(16); -var asn1 = __webpack_require__(65); +var asn1 = __webpack_require__(66); var Buffer = __webpack_require__(15).Buffer; var algs = __webpack_require__(32); var utils = __webpack_require__(26); @@ -42241,13 +42309,13 @@ module.exports = Identity; var assert = __webpack_require__(16); var algs = __webpack_require__(32); -var crypto = __webpack_require__(12); +var crypto = __webpack_require__(11); var Fingerprint = __webpack_require__(156); -var Signature = __webpack_require__(74); -var errs = __webpack_require__(73); +var Signature = __webpack_require__(75); +var errs = __webpack_require__(74); var util = __webpack_require__(3); var utils = __webpack_require__(26); -var asn1 = __webpack_require__(65); +var asn1 = __webpack_require__(66); var Buffer = __webpack_require__(15).Buffer; /*JSSTYLED*/ @@ -42755,7 +42823,7 @@ Object.defineProperty(exports, "__esModule", { var _extends2; function _load_extends() { - return _extends2 = _interopRequireDefault(__webpack_require__(22)); + return _extends2 = _interopRequireDefault(__webpack_require__(20)); } var _asyncToGenerator2; @@ -42775,7 +42843,7 @@ function _load_executeLifecycleScript() { var _path; function _load_path() { - return _path = __webpack_require__(377); + return _path = __webpack_require__(371); } var _conversion; @@ -42787,7 +42855,7 @@ function _load_conversion() { var _index; function _load_index() { - return _index = _interopRequireDefault(__webpack_require__(220)); + return _index = _interopRequireDefault(__webpack_require__(218)); } var _errors; @@ -42799,7 +42867,7 @@ function _load_errors() { var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(4)); + return _fs = _interopRequireWildcard(__webpack_require__(5)); } var _constants; @@ -42811,25 +42879,25 @@ function _load_constants() { var _packageConstraintResolver; function _load_packageConstraintResolver() { - return _packageConstraintResolver = _interopRequireDefault(__webpack_require__(555)); + return _packageConstraintResolver = _interopRequireDefault(__webpack_require__(523)); } var _requestManager; function _load_requestManager() { - return _requestManager = _interopRequireDefault(__webpack_require__(378)); + return _requestManager = _interopRequireDefault(__webpack_require__(372)); } var _index2; function _load_index2() { - return _index2 = __webpack_require__(57); + return _index2 = __webpack_require__(58); } var _index3; function _load_index3() { - return _index3 = __webpack_require__(200); + return _index3 = __webpack_require__(201); } var _map; @@ -42842,10 +42910,11 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const detectIndent = __webpack_require__(635); +const crypto = __webpack_require__(11); +const detectIndent = __webpack_require__(603); const invariant = __webpack_require__(9); const path = __webpack_require__(0); -const micromatch = __webpack_require__(114); +const micromatch = __webpack_require__(115); const isCi = __webpack_require__(397); function sortObject(object) { @@ -43264,6 +43333,10 @@ class Config { slug += `-${hash}`; } + if (pkg.remote.integrity) { + slug += `-integrity`; + } + return slug; } @@ -43930,7 +44003,7 @@ function _load_asyncToGenerator() { var _extends2; function _load_extends() { - return _extends2 = _interopRequireDefault(__webpack_require__(22)); + return _extends2 = _interopRequireDefault(__webpack_require__(20)); } let run = exports.run = (() => { @@ -43982,7 +44055,7 @@ function _load_index() { var _list; function _load_list() { - return _list = __webpack_require__(358); + return _list = __webpack_require__(352); } var _install; @@ -44006,7 +44079,7 @@ function _load_constants() { var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(4)); + return _fs = _interopRequireWildcard(__webpack_require__(5)); } var _invariant; @@ -44024,7 +44097,7 @@ function _load_path() { var _semver; function _load_semver() { - return _semver = _interopRequireDefault(__webpack_require__(21)); + return _semver = _interopRequireDefault(__webpack_require__(22)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -44600,13 +44673,13 @@ exports.hasWrapper = hasWrapper; var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(4)); + return _fs = _interopRequireWildcard(__webpack_require__(5)); } var _filter; function _load_filter() { - return _filter = __webpack_require__(372); + return _filter = __webpack_require__(366); } var _errors; @@ -44619,10 +44692,10 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const zlib = __webpack_require__(198); +const zlib = __webpack_require__(199); const path = __webpack_require__(0); -const tar = __webpack_require__(193); -const fs2 = __webpack_require__(5); +const tar = __webpack_require__(194); +const fs2 = __webpack_require__(4); const depsFor = __webpack_require__(678); const FOLDERS_IGNORE = [ @@ -44632,7 +44705,7 @@ const FOLDERS_IGNORE = [ const DEFAULT_IGNORE = (0, (_filter || _load_filter()).ignoreLinesToRegex)([...FOLDERS_IGNORE, // ignore cruft -'yarn.lock', '.lock-wscript', '.wafpickle-{0..9}', '*.swp', '._*', 'npm-debug.log', 'yarn-error.log', '.npmrc', '.yarnrc', '.npmignore', '.gitignore', '.DS_Store']); +'yarn.lock', '.lock-wscript', '.wafpickle-{0..9}', '*.swp', '._*', 'npm-debug.log', 'yarn-error.log', '.npmrc', '.yarnrc', '.yarnrc.yml', '.npmignore', '.gitignore', '.DS_Store']); const NEVER_IGNORE = (0, (_filter || _load_filter()).ignoreLinesToRegex)([ // never ignore these files @@ -44641,6 +44714,7 @@ const NEVER_IGNORE = (0, (_filter || _load_filter()).ignoreLinesToRegex)([ function packWithIgnoreAndHeaders(cwd, ignoreFunction, { mapHeader } = {}) { return tar.pack(cwd, { ignore: ignoreFunction, + sort: true, map: header => { const suffix = header.name === '.' ? '' : `/${header.name}`; header.name = `package${suffix}`; @@ -44680,7 +44754,7 @@ function _load_asyncToGenerator() { var _index; function _load_index() { - return _index = _interopRequireDefault(__webpack_require__(220)); + return _index = _interopRequireDefault(__webpack_require__(218)); } var _constants; @@ -44692,13 +44766,13 @@ function _load_constants() { var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(4)); + return _fs = _interopRequireWildcard(__webpack_require__(5)); } var _mutex; function _load_mutex() { - return _mutex = _interopRequireDefault(__webpack_require__(375)); + return _mutex = _interopRequireDefault(__webpack_require__(369)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -44707,7 +44781,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de /* eslint no-unused-vars: 0 */ -const cmdShim = __webpack_require__(201); +const cmdShim = __webpack_require__(202); const path = __webpack_require__(0); class BaseFetcher { @@ -44828,7 +44902,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.hash = hash; -const crypto = __webpack_require__(12); +const crypto = __webpack_require__(11); const stream = __webpack_require__(23); function hash(content, type = 'md5') { @@ -44944,8 +45018,141 @@ function guessName(source) { /* 170 */ /***/ (function(module, exports, __webpack_require__) { +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.satisfiesWithPrereleases = satisfiesWithPrereleases; +exports.diffWithUnstable = diffWithUnstable; + +var _semver; + +function _load_semver() { + return _semver = _interopRequireDefault(__webpack_require__(22)); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Returns whether the given semver version satisfies the given range. Notably this supports + * prerelease versions so that "2.0.0-rc.0" satisfies the range ">=1.0.0", for example. + */ + +function satisfiesWithPrereleases(version, range, loose = false) { + let semverRange; + try { + // $FlowFixMe: Add a definition for the Range class + semverRange = new (_semver || _load_semver()).default.Range(range, loose); + } catch (err) { + return false; + } + + if (!version) { + return false; + } + let semverVersion; + try { + semverVersion = new (_semver || _load_semver()).default.SemVer(version, semverRange.loose); + } catch (err) { + return false; + } + + // A range has multiple sets of comparators. A version must satisfy all comparators in a set + // and at least one set to satisfy the range. + return semverRange.set.some(comparatorSet => { + // node-semver converts ~ and ^ ranges into pairs of >= and < ranges but the upper bounds don't + // properly exclude prerelease versions. For example, "^1.0.0" is converted to ">=1.0.0 <2.0.0", + // which includes "2.0.0-pre" since prerelease versions are lower than their non-prerelease + // counterparts. As a practical workaround we make upper-bound ranges exclude prereleases and + // convert "<2.0.0" to "<2.0.0-0", for example. + comparatorSet = comparatorSet.map(comparator => { + if (comparator.operator !== '<' || !comparator.value || comparator.semver.prerelease.length) { + return comparator; + } + + // "0" is the lowest prerelease version + comparator.semver.inc('pre', 0); + + const comparatorString = comparator.operator + comparator.semver.version; + // $FlowFixMe: Add a definition for the Comparator class + return new (_semver || _load_semver()).default.Comparator(comparatorString, comparator.loose); + }); + + return !comparatorSet.some(comparator => !comparator.test(semverVersion)); + }); +} + +const PRE_RELEASES = { + major: 'premajor', + minor: 'preminor', + patch: 'prepatch' +}; + +/** + * Returns the difference between two versions as a semantic string representation. + * Similar to the `diff` method in node-semver, but it also accounts for unstable versions, + * like 0.x.x or 0.0.x. + */ + +function diffWithUnstable(version1, version2) { + if ((_semver || _load_semver()).default.eq(version1, version2) === false) { + const v1 = (_semver || _load_semver()).default.parse(version1); + const v2 = (_semver || _load_semver()).default.parse(version2); + + if (v1 != null && v2 != null) { + const isPreRelease = v1.prerelease.length > 0 || v2.prerelease.length > 0; + const preMajor = v1.major === 0 || v2.major === 0; + const preMinor = preMajor && (v1.minor === 0 || v2.minor === 0); + + let diff = null; + + if (v1.major !== v2.major) { + diff = 'major'; + } else if (v1.minor !== v2.minor) { + if (preMajor) { + // If the major version number is zero (0.x.x), treat a change + // of the minor version number as a major change. + diff = 'major'; + } else { + diff = 'minor'; + } + } else if (v1.patch !== v2.patch) { + if (preMinor) { + // If the major & minor version numbers are zero (0.0.x), treat a change + // of the patch version number as a major change. + diff = 'major'; + } else if (preMajor) { + // If the major version number is zero (0.x.x), treat a change + // of the patch version number as a minor change. + diff = 'minor'; + } else { + diff = 'patch'; + } + } + + if (isPreRelease) { + if (diff != null) { + diff = PRE_RELEASES[diff]; + } else { + diff = 'prerelease'; + } + } + + return diff; + } + } + + return null; +} + +/***/ }), +/* 171 */ +/***/ (function(module, exports, __webpack_require__) { + // fallback for non-array-like ES3 and non-enumerable old V8 strings -var cof = __webpack_require__(68); +var cof = __webpack_require__(69); // eslint-disable-next-line no-prototype-builtins module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { return cof(it) == 'String' ? it.split('') : Object(it); @@ -44953,11 +45160,11 @@ module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { /***/ }), -/* 171 */ +/* 172 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.14 / 15.2.3.14 Object.keys(O) -var $keys = __webpack_require__(249); +var $keys = __webpack_require__(246); var enumBugKeys = __webpack_require__(127); module.exports = Object.keys || function keys(O) { @@ -44966,7 +45173,7 @@ module.exports = Object.keys || function keys(O) { /***/ }), -/* 172 */ +/* 173 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.13 ToObject(argument) @@ -44977,7 +45184,7 @@ module.exports = function (it) { /***/ }), -/* 173 */ +/* 174 */ /***/ (function(module, exports, __webpack_require__) { var once = __webpack_require__(83); @@ -45070,7 +45277,7 @@ module.exports = eos; /***/ }), -/* 174 */ +/* 175 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2012 Joyent, Inc. All rights reserved. @@ -45188,13 +45395,13 @@ module.exports = { /***/ }), -/* 175 */ +/* 176 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var chalk = __webpack_require__(30); -var figures = __webpack_require__(270); +var figures = __webpack_require__(267); /** * Separator object @@ -45232,7 +45439,7 @@ module.exports = Separator; /***/ }), -/* 176 */ +/* 177 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -45292,7 +45499,7 @@ module.exports = Paginator; /***/ }), -/* 177 */ +/* 178 */ /***/ (function(module, exports) { /*! @@ -45309,7 +45516,7 @@ module.exports = function isExtglob(str) { /***/ }), -/* 178 */ +/* 179 */ /***/ (function(module, exports, __webpack_require__) { /*! @@ -45319,7 +45526,7 @@ module.exports = function isExtglob(str) { * Licensed under the MIT License. */ -var isExtglob = __webpack_require__(177); +var isExtglob = __webpack_require__(178); module.exports = function isGlob(str) { return typeof str === 'string' @@ -45328,7 +45535,7 @@ module.exports = function isGlob(str) { }; /***/ }), -/* 179 */ +/* 180 */ /***/ (function(module, exports, __webpack_require__) { var isBuffer = __webpack_require__(729); @@ -45450,7 +45657,7 @@ module.exports = function kindOf(val) { /***/ }), -/* 180 */ +/* 181 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -45501,7 +45708,7 @@ function nextTick(fn, arg1, arg2, arg3) { /***/ }), -/* 181 */ +/* 182 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -45569,18 +45776,18 @@ runAsync.cb = function (func, cb) { /***/ }), -/* 182 */ +/* 183 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__internal_Observable__ = __webpack_require__(11); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__internal_Observable__ = __webpack_require__(12); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Observable", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_Observable__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__internal_observable_ConnectableObservable__ = __webpack_require__(423); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectableObservable", function() { return __WEBPACK_IMPORTED_MODULE_1__internal_observable_ConnectableObservable__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__internal_operators_groupBy__ = __webpack_require__(433); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "GroupedObservable", function() { return __WEBPACK_IMPORTED_MODULE_2__internal_operators_groupBy__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__internal_symbol_observable__ = __webpack_require__(117); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__internal_symbol_observable__ = __webpack_require__(118); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "observable", function() { return __WEBPACK_IMPORTED_MODULE_3__internal_symbol_observable__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__internal_Subject__ = __webpack_require__(36); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Subject", function() { return __WEBPACK_IMPORTED_MODULE_4__internal_Subject__["a"]; }); @@ -45588,7 +45795,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function() { return __WEBPACK_IMPORTED_MODULE_5__internal_BehaviorSubject__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__internal_ReplaySubject__ = __webpack_require__(308); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ReplaySubject", function() { return __WEBPACK_IMPORTED_MODULE_6__internal_ReplaySubject__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__internal_AsyncSubject__ = __webpack_require__(183); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__internal_AsyncSubject__ = __webpack_require__(184); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncSubject", function() { return __WEBPACK_IMPORTED_MODULE_7__internal_AsyncSubject__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__internal_scheduler_asap__ = __webpack_require__(438); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "asapScheduler", function() { return __WEBPACK_IMPORTED_MODULE_8__internal_scheduler_asap__["a"]; }); @@ -45607,13 +45814,13 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Subscription", function() { return __WEBPACK_IMPORTED_MODULE_14__internal_Subscription__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__internal_Subscriber__ = __webpack_require__(7); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Subscriber", function() { return __WEBPACK_IMPORTED_MODULE_15__internal_Subscriber__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__internal_Notification__ = __webpack_require__(184); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__internal_Notification__ = __webpack_require__(185); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Notification", function() { return __WEBPACK_IMPORTED_MODULE_16__internal_Notification__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__internal_util_pipe__ = __webpack_require__(324); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return __WEBPACK_IMPORTED_MODULE_17__internal_util_pipe__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__internal_util_noop__ = __webpack_require__(191); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__internal_util_noop__ = __webpack_require__(192); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return __WEBPACK_IMPORTED_MODULE_18__internal_util_noop__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__internal_util_identity__ = __webpack_require__(118); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__internal_util_identity__ = __webpack_require__(119); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return __WEBPACK_IMPORTED_MODULE_19__internal_util_identity__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__internal_util_isObservable__ = __webpack_require__(930); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isObservable", function() { return __WEBPACK_IMPORTED_MODULE_20__internal_util_isObservable__["a"]; }); @@ -45621,7 +45828,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return __WEBPACK_IMPORTED_MODULE_21__internal_util_ArgumentOutOfRangeError__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__internal_util_EmptyError__ = __webpack_require__(153); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "EmptyError", function() { return __WEBPACK_IMPORTED_MODULE_22__internal_util_EmptyError__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__internal_util_ObjectUnsubscribedError__ = __webpack_require__(189); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__internal_util_ObjectUnsubscribedError__ = __webpack_require__(190); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return __WEBPACK_IMPORTED_MODULE_23__internal_util_ObjectUnsubscribedError__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__internal_util_UnsubscriptionError__ = __webpack_require__(441); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "UnsubscriptionError", function() { return __WEBPACK_IMPORTED_MODULE_24__internal_util_UnsubscriptionError__["a"]; }); @@ -45633,7 +45840,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function() { return __WEBPACK_IMPORTED_MODULE_27__internal_observable_bindNodeCallback__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__internal_observable_combineLatest__ = __webpack_require__(309); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return __WEBPACK_IMPORTED_MODULE_28__internal_observable_combineLatest__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__internal_observable_concat__ = __webpack_require__(186); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__internal_observable_concat__ = __webpack_require__(187); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return __WEBPACK_IMPORTED_MODULE_29__internal_observable_concat__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__internal_observable_defer__ = __webpack_require__(310); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return __WEBPACK_IMPORTED_MODULE_30__internal_observable_defer__["a"]; }); @@ -45677,7 +45884,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return __WEBPACK_IMPORTED_MODULE_49__internal_observable_zip__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "EMPTY", function() { return __WEBPACK_IMPORTED_MODULE_31__internal_observable_empty__["b"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "NEVER", function() { return __WEBPACK_IMPORTED_MODULE_40__internal_observable_never__["b"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_50__internal_config__ = __webpack_require__(185); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_50__internal_config__ = __webpack_require__(186); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "config", function() { return __WEBPACK_IMPORTED_MODULE_50__internal_config__["a"]; }); /** PURE_IMPORTS_START PURE_IMPORTS_END */ @@ -45737,7 +45944,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /***/ }), -/* 183 */ +/* 184 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -45795,7 +46002,7 @@ var AsyncSubject = /*@__PURE__*/ (function (_super) { /***/ }), -/* 184 */ +/* 185 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -45876,7 +46083,7 @@ var Notification = /*@__PURE__*/ (function () { /***/ }), -/* 185 */ +/* 186 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -45903,12 +46110,12 @@ var config = { /***/ }), -/* 186 */ +/* 187 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = concat; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isScheduler__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isScheduler__ = __webpack_require__(49); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__of__ = __webpack_require__(311); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__from__ = __webpack_require__(62); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__operators_concatAll__ = __webpack_require__(429); @@ -45931,7 +46138,7 @@ function concat() { /***/ }), -/* 187 */ +/* 188 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -45959,7 +46166,7 @@ function reduce(accumulator, seed) { /***/ }), -/* 188 */ +/* 189 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -45990,7 +46197,7 @@ function defaultErrorFactory() { /***/ }), -/* 189 */ +/* 190 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -46008,7 +46215,7 @@ var ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl; /***/ }), -/* 190 */ +/* 191 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -46023,7 +46230,7 @@ function isNumeric(val) { /***/ }), -/* 191 */ +/* 192 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -46034,7 +46241,7 @@ function noop() { } /***/ }), -/* 192 */ +/* 193 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2015 Joyent, Inc. @@ -46046,18 +46253,18 @@ module.exports = { }; var assert = __webpack_require__(16); -var asn1 = __webpack_require__(65); +var asn1 = __webpack_require__(66); var Buffer = __webpack_require__(15).Buffer; var algs = __webpack_require__(32); var utils = __webpack_require__(26); -var crypto = __webpack_require__(12); +var crypto = __webpack_require__(11); var Key = __webpack_require__(27); var PrivateKey = __webpack_require__(33); var pem = __webpack_require__(86); var rfc4253 = __webpack_require__(103); var SSHBuffer = __webpack_require__(159); -var errors = __webpack_require__(73); +var errors = __webpack_require__(74); var bcrypt; @@ -46106,7 +46313,7 @@ function readSSHPrivate(type, buf, options) { var rounds = kdfOptsBuf.readInt(); var cinf = utils.opensshCipherInfo(cipher); if (bcrypt === undefined) { - bcrypt = __webpack_require__(379); + bcrypt = __webpack_require__(373); } if (typeof (options.passphrase) === 'string') { @@ -46227,7 +46434,7 @@ function write(key, options) { kdfopts = kdfssh.toBuffer(); if (bcrypt === undefined) { - bcrypt = __webpack_require__(379); + bcrypt = __webpack_require__(373); } var pass = new Uint8Array(passphrase); var salti = new Uint8Array(salt); @@ -46302,16 +46509,16 @@ function write(key, options) { /***/ }), -/* 193 */ +/* 194 */ /***/ (function(module, exports, __webpack_require__) { -var chownr = __webpack_require__(600) +var chownr = __webpack_require__(568) var tar = __webpack_require__(460) var pump = __webpack_require__(781) var mkdirp = __webpack_require__(145) -var fs = __webpack_require__(5) +var fs = __webpack_require__(4) var path = __webpack_require__(0) -var os = __webpack_require__(49) +var os = __webpack_require__(46) var win32 = os.platform() === 'win32' @@ -46653,37 +46860,37 @@ function mkdirfix (name, opts, cb) { /***/ }), -/* 194 */ +/* 195 */ /***/ (function(module, exports) { -module.exports = {"name":"yarn","installationMethod":"unknown","version":"1.18.0","license":"BSD-2-Clause","preferGlobal":true,"description":"📦🐈 Fast, reliable, and secure dependency management.","dependencies":{"@zkochan/cmd-shim":"^3.1.0","babel-runtime":"^6.26.0","bytes":"^3.0.0","camelcase":"^4.0.0","chalk":"^2.1.0","cli-table3":"^0.4.0","commander":"^2.9.0","death":"^1.0.0","debug":"^3.0.0","deep-equal":"^1.0.1","detect-indent":"^5.0.0","dnscache":"^1.0.1","glob":"^7.1.1","gunzip-maybe":"^1.4.0","hash-for-dep":"^1.2.3","imports-loader":"^0.8.0","ini":"^1.3.4","inquirer":"^6.2.0","invariant":"^2.2.0","is-builtin-module":"^2.0.0","is-ci":"^1.0.10","is-webpack-bundle":"^1.0.0","js-yaml":"^3.13.1","leven":"^2.0.0","loud-rejection":"^1.2.0","micromatch":"^2.3.11","mkdirp":"^0.5.1","node-emoji":"^1.6.1","normalize-url":"^2.0.0","npm-logical-tree":"^1.2.1","object-path":"^0.11.2","proper-lockfile":"^2.0.0","puka":"^1.0.0","read":"^1.0.7","request":"^2.87.0","request-capture-har":"^1.2.2","rimraf":"^2.5.0","semver":"^5.1.0","ssri":"^5.3.0","strip-ansi":"^4.0.0","strip-bom":"^3.0.0","tar-fs":"^1.16.0","tar-stream":"^1.6.1","uuid":"^3.0.1","v8-compile-cache":"^2.0.0","validate-npm-package-license":"^3.0.4","yn":"^2.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"^7.2.3","babel-loader":"^6.2.5","babel-plugin-array-includes":"^2.0.3","babel-plugin-inline-import":"^3.0.0","babel-plugin-transform-builtin-extend":"^1.1.2","babel-plugin-transform-inline-imports-commonjs":"^1.0.0","babel-plugin-transform-runtime":"^6.4.3","babel-preset-env":"^1.6.0","babel-preset-flow":"^6.23.0","babel-preset-stage-0":"^6.0.0","babylon":"^6.5.0","commitizen":"^2.9.6","cz-conventional-changelog":"^2.0.0","eslint":"^4.3.0","eslint-config-fb-strict":"^22.0.0","eslint-plugin-babel":"^5.0.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-jasmine":"^2.6.2","eslint-plugin-jest":"^21.0.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-prefer-object-spread":"^1.2.1","eslint-plugin-prettier":"^2.1.2","eslint-plugin-react":"^7.1.0","eslint-plugin-relay":"^0.0.28","eslint-plugin-yarn-internal":"file:scripts/eslint-rules","execa":"^0.11.0","fancy-log":"^1.3.2","flow-bin":"^0.66.0","git-release-notes":"^3.0.0","gulp":"^4.0.0","gulp-babel":"^7.0.0","gulp-if":"^2.0.1","gulp-newer":"^1.0.0","gulp-plumber":"^1.0.1","gulp-sourcemaps":"^2.2.0","jest":"^22.4.4","jsinspect":"^0.12.6","minimatch":"^3.0.4","mock-stdin":"^0.3.0","prettier":"^1.5.2","string-replace-loader":"^2.1.1","temp":"^0.8.3","webpack":"^2.1.0-beta.25","yargs":"^6.3.0"},"resolutions":{"sshpk":"^1.14.2"},"engines":{"node":">=4.0.0"},"repository":"yarnpkg/yarn","bin":{"yarn":"./bin/yarn.js","yarnpkg":"./bin/yarn.js"},"scripts":{"build":"gulp build","build-bundle":"node ./scripts/build-webpack.js","build-chocolatey":"powershell ./scripts/build-chocolatey.ps1","build-deb":"./scripts/build-deb.sh","build-dist":"bash ./scripts/build-dist.sh","build-win-installer":"scripts\\build-windows-installer.bat","changelog":"git-release-notes $(git describe --tags --abbrev=0 $(git describe --tags --abbrev=0)^)..$(git describe --tags --abbrev=0) scripts/changelog.md","dupe-check":"yarn jsinspect ./src","lint":"eslint . && flow check","pkg-tests":"yarn --cwd packages/pkg-tests jest yarn.test.js","prettier":"eslint src __tests__ --fix","release-branch":"./scripts/release-branch.sh","test":"yarn lint && yarn test-only","test-only":"node --max_old_space_size=4096 node_modules/jest/bin/jest.js --verbose","test-only-debug":"node --inspect-brk --max_old_space_size=4096 node_modules/jest/bin/jest.js --runInBand --verbose","test-coverage":"node --max_old_space_size=4096 node_modules/jest/bin/jest.js --coverage --verbose","watch":"gulp watch","commit":"git-cz"},"jest":{"collectCoverageFrom":["src/**/*.js"],"testEnvironment":"node","modulePathIgnorePatterns":["__tests__/fixtures/","packages/pkg-tests/pkg-tests-fixtures","dist/"],"testPathIgnorePatterns":["__tests__/(fixtures|__mocks__)/","updates/","_(temp|mock|install|init|helpers).js$","packages/pkg-tests"]},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}}} +module.exports = {"name":"yarn","installationMethod":"unknown","version":"1.22.19","packageManager":"yarn@1.22.17","license":"BSD-2-Clause","preferGlobal":true,"description":"📦🐈 Fast, reliable, and secure dependency management.","dependencies":{"@zkochan/cmd-shim":"^3.1.0","babel-runtime":"^6.26.0","bytes":"^3.0.0","camelcase":"^4.0.0","chalk":"^2.1.0","cli-table3":"^0.4.0","commander":"^2.9.0","death":"^1.0.0","debug":"^3.0.0","deep-equal":"^1.0.1","detect-indent":"^5.0.0","dnscache":"^1.0.1","glob":"^7.1.1","gunzip-maybe":"^1.4.0","hash-for-dep":"^1.2.3","imports-loader":"^0.8.0","ini":"^1.3.4","inquirer":"^6.2.0","invariant":"^2.2.0","is-builtin-module":"^2.0.0","is-ci":"^1.0.10","is-webpack-bundle":"^1.0.0","js-yaml":"^3.13.1","leven":"^2.0.0","loud-rejection":"^1.2.0","micromatch":"^2.3.11","mkdirp":"^0.5.1","node-emoji":"^1.6.1","normalize-url":"^2.0.0","npm-logical-tree":"^1.2.1","object-path":"^0.11.2","proper-lockfile":"^2.0.0","puka":"^1.0.0","read":"^1.0.7","request":"^2.87.0","request-capture-har":"^1.2.2","rimraf":"^2.5.0","semver":"^5.1.0","ssri":"^5.3.0","strip-ansi":"^4.0.0","strip-bom":"^3.0.0","tar-fs":"^1.16.0","tar-stream":"^1.6.1","uuid":"^3.0.1","v8-compile-cache":"^2.0.0","validate-npm-package-license":"^3.0.4","yn":"^2.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"^7.2.3","babel-loader":"^6.2.5","babel-plugin-array-includes":"^2.0.3","babel-plugin-inline-import":"^3.0.0","babel-plugin-transform-builtin-extend":"^1.1.2","babel-plugin-transform-inline-imports-commonjs":"^1.0.0","babel-plugin-transform-runtime":"^6.4.3","babel-preset-env":"^1.6.0","babel-preset-flow":"^6.23.0","babel-preset-stage-0":"^6.0.0","babylon":"^6.5.0","commitizen":"^2.9.6","cz-conventional-changelog":"^2.0.0","eslint":"^4.3.0","eslint-config-fb-strict":"^22.0.0","eslint-plugin-babel":"^5.0.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-jasmine":"^2.6.2","eslint-plugin-jest":"^21.0.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-prefer-object-spread":"^1.2.1","eslint-plugin-prettier":"^2.1.2","eslint-plugin-react":"^7.1.0","eslint-plugin-relay":"^0.0.28","eslint-plugin-yarn-internal":"file:scripts/eslint-rules","execa":"^0.11.0","fancy-log":"^1.3.2","flow-bin":"^0.66.0","git-release-notes":"^3.0.0","gulp":"^4.0.0","gulp-babel":"^7.0.0","gulp-if":"^2.0.1","gulp-newer":"^1.0.0","gulp-plumber":"^1.0.1","gulp-sourcemaps":"^2.2.0","jest":"^22.4.4","jsinspect":"^0.12.6","minimatch":"^3.0.4","mock-stdin":"^0.3.0","prettier":"^1.5.2","string-replace-loader":"^2.1.1","temp":"^0.8.3","webpack":"^2.1.0-beta.25","yargs":"^6.3.0"},"resolutions":{"sshpk":"^1.14.2"},"engines":{"node":">=4.0.0"},"repository":"yarnpkg/yarn","bin":{"yarn":"./bin/yarn.js","yarnpkg":"./bin/yarn.js"},"scripts":{"build":"gulp build","build-bundle":"node ./scripts/build-webpack.js","build-chocolatey":"powershell ./scripts/build-chocolatey.ps1","build-deb":"./scripts/build-deb.sh","build-dist":"bash ./scripts/build-dist.sh","build-win-installer":"scripts\\build-windows-installer.bat","changelog":"git-release-notes $(git describe --tags --abbrev=0 $(git describe --tags --abbrev=0)^)..$(git describe --tags --abbrev=0) scripts/changelog.md","dupe-check":"yarn jsinspect ./src","lint":"eslint . && flow check","pkg-tests":"yarn --cwd packages/pkg-tests jest yarn.test.js","prettier":"eslint src __tests__ --fix","release-branch":"./scripts/release-branch.sh","test":"yarn lint && yarn test-only","test-only":"node --max_old_space_size=4096 node_modules/jest/bin/jest.js --verbose","test-only-debug":"node --inspect-brk --max_old_space_size=4096 node_modules/jest/bin/jest.js --runInBand --verbose","test-coverage":"node --max_old_space_size=4096 node_modules/jest/bin/jest.js --coverage --verbose","watch":"gulp watch","commit":"git-cz"},"jest":{"collectCoverageFrom":["src/**/*.js"],"testEnvironment":"node","modulePathIgnorePatterns":["__tests__/fixtures/","packages/pkg-tests/pkg-tests-fixtures","dist/"],"testPathIgnorePatterns":["__tests__/(fixtures|__mocks__)/","updates/","_(temp|mock|install|init|helpers).js$","packages/pkg-tests"]},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}}} /***/ }), -/* 195 */ +/* 196 */ /***/ (function(module, exports) { module.exports = require("https"); /***/ }), -/* 196 */ +/* 197 */ /***/ (function(module, exports) { module.exports = require("querystring"); /***/ }), -/* 197 */ +/* 198 */ /***/ (function(module, exports) { module.exports = require("readline"); /***/ }), -/* 198 */ +/* 199 */ /***/ (function(module, exports) { module.exports = require("zlib"); /***/ }), -/* 199 */ +/* 200 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -46709,7 +46916,7 @@ function _load_constants() { var _package; function _load_package() { - return _package = __webpack_require__(194); + return _package = __webpack_require__(195); } const NODE_VERSION = process.version; @@ -46817,7 +47024,7 @@ function stringify(obj, noHeader, enableVersions) { } /***/ }), -/* 200 */ +/* 201 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -46830,7 +47037,7 @@ Object.defineProperty(exports, "__esModule", { var _consoleReporter; function _load_consoleReporter() { - return _consoleReporter = __webpack_require__(561); + return _consoleReporter = __webpack_require__(529); } Object.defineProperty(exports, 'ConsoleReporter', { @@ -46843,7 +47050,7 @@ Object.defineProperty(exports, 'ConsoleReporter', { var _bufferReporter; function _load_bufferReporter() { - return _bufferReporter = __webpack_require__(560); + return _bufferReporter = __webpack_require__(528); } Object.defineProperty(exports, 'BufferReporter', { @@ -46856,7 +47063,7 @@ Object.defineProperty(exports, 'BufferReporter', { var _eventReporter; function _load_eventReporter() { - return _eventReporter = __webpack_require__(565); + return _eventReporter = __webpack_require__(533); } Object.defineProperty(exports, 'EventReporter', { @@ -46869,7 +47076,7 @@ Object.defineProperty(exports, 'EventReporter', { var _jsonReporter; function _load_jsonReporter() { - return _jsonReporter = __webpack_require__(213); + return _jsonReporter = __webpack_require__(211); } Object.defineProperty(exports, 'JSONReporter', { @@ -46882,7 +47089,7 @@ Object.defineProperty(exports, 'JSONReporter', { var _noopReporter; function _load_noopReporter() { - return _noopReporter = __webpack_require__(569); + return _noopReporter = __webpack_require__(537); } Object.defineProperty(exports, 'NoopReporter', { @@ -46908,7 +47115,7 @@ Object.defineProperty(exports, 'Reporter', { function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /***/ }), -/* 201 */ +/* 202 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -47180,389 +47387,8 @@ function normalizePathEnvVar (nodePath) { } -/***/ }), -/* 202 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var resolve = __webpack_require__(203); - -module.exports = { - Validation: errorSubclass(ValidationError), - MissingRef: errorSubclass(MissingRefError) -}; - - -function ValidationError(errors) { - this.message = 'validation failed'; - this.errors = errors; - this.ajv = this.validation = true; -} - - -MissingRefError.message = function (baseId, ref) { - return 'can\'t resolve reference ' + ref + ' from id ' + baseId; -}; - - -function MissingRefError(baseId, ref, message) { - this.message = message || MissingRefError.message(baseId, ref); - this.missingRef = resolve.url(baseId, ref); - this.missingSchema = resolve.normalizeId(resolve.fullPath(this.missingRef)); -} - - -function errorSubclass(Subclass) { - Subclass.prototype = Object.create(Error.prototype); - Subclass.prototype.constructor = Subclass; - return Subclass; -} - - /***/ }), /* 203 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var url = __webpack_require__(24) - , equal = __webpack_require__(204) - , util = __webpack_require__(106) - , SchemaObject = __webpack_require__(339) - , traverse = __webpack_require__(503); - -module.exports = resolve; - -resolve.normalizeId = normalizeId; -resolve.fullPath = getFullPath; -resolve.url = resolveUrl; -resolve.ids = resolveIds; -resolve.inlineRef = inlineRef; -resolve.schema = resolveSchema; - -/** - * [resolve and compile the references ($ref)] - * @this Ajv - * @param {Function} compile reference to schema compilation funciton (localCompile) - * @param {Object} root object with information about the root schema for the current schema - * @param {String} ref reference to resolve - * @return {Object|Function} schema object (if the schema can be inlined) or validation function - */ -function resolve(compile, root, ref) { - /* jshint validthis: true */ - var refVal = this._refs[ref]; - if (typeof refVal == 'string') { - if (this._refs[refVal]) refVal = this._refs[refVal]; - else return resolve.call(this, compile, root, refVal); - } - - refVal = refVal || this._schemas[ref]; - if (refVal instanceof SchemaObject) { - return inlineRef(refVal.schema, this._opts.inlineRefs) - ? refVal.schema - : refVal.validate || this._compile(refVal); - } - - var res = resolveSchema.call(this, root, ref); - var schema, v, baseId; - if (res) { - schema = res.schema; - root = res.root; - baseId = res.baseId; - } - - if (schema instanceof SchemaObject) { - v = schema.validate || compile.call(this, schema.schema, root, undefined, baseId); - } else if (schema !== undefined) { - v = inlineRef(schema, this._opts.inlineRefs) - ? schema - : compile.call(this, schema, root, undefined, baseId); - } - - return v; -} - - -/** - * Resolve schema, its root and baseId - * @this Ajv - * @param {Object} root root object with properties schema, refVal, refs - * @param {String} ref reference to resolve - * @return {Object} object with properties schema, root, baseId - */ -function resolveSchema(root, ref) { - /* jshint validthis: true */ - var p = url.parse(ref, false, true) - , refPath = _getFullPath(p) - , baseId = getFullPath(this._getId(root.schema)); - if (refPath !== baseId) { - var id = normalizeId(refPath); - var refVal = this._refs[id]; - if (typeof refVal == 'string') { - return resolveRecursive.call(this, root, refVal, p); - } else if (refVal instanceof SchemaObject) { - if (!refVal.validate) this._compile(refVal); - root = refVal; - } else { - refVal = this._schemas[id]; - if (refVal instanceof SchemaObject) { - if (!refVal.validate) this._compile(refVal); - if (id == normalizeId(ref)) - return { schema: refVal, root: root, baseId: baseId }; - root = refVal; - } else { - return; - } - } - if (!root.schema) return; - baseId = getFullPath(this._getId(root.schema)); - } - return getJsonPointer.call(this, p, baseId, root.schema, root); -} - - -/* @this Ajv */ -function resolveRecursive(root, ref, parsedRef) { - /* jshint validthis: true */ - var res = resolveSchema.call(this, root, ref); - if (res) { - var schema = res.schema; - var baseId = res.baseId; - root = res.root; - var id = this._getId(schema); - if (id) baseId = resolveUrl(baseId, id); - return getJsonPointer.call(this, parsedRef, baseId, schema, root); - } -} - - -var PREVENT_SCOPE_CHANGE = util.toHash(['properties', 'patternProperties', 'enum', 'dependencies', 'definitions']); -/* @this Ajv */ -function getJsonPointer(parsedRef, baseId, schema, root) { - /* jshint validthis: true */ - parsedRef.hash = parsedRef.hash || ''; - if (parsedRef.hash.slice(0,2) != '#/') return; - var parts = parsedRef.hash.split('/'); - - for (var i = 1; i < parts.length; i++) { - var part = parts[i]; - if (part) { - part = util.unescapeFragment(part); - schema = schema[part]; - if (schema === undefined) break; - var id; - if (!PREVENT_SCOPE_CHANGE[part]) { - id = this._getId(schema); - if (id) baseId = resolveUrl(baseId, id); - if (schema.$ref) { - var $ref = resolveUrl(baseId, schema.$ref); - var res = resolveSchema.call(this, root, $ref); - if (res) { - schema = res.schema; - root = res.root; - baseId = res.baseId; - } - } - } - } - } - if (schema !== undefined && schema !== root.schema) - return { schema: schema, root: root, baseId: baseId }; -} - - -var SIMPLE_INLINED = util.toHash([ - 'type', 'format', 'pattern', - 'maxLength', 'minLength', - 'maxProperties', 'minProperties', - 'maxItems', 'minItems', - 'maximum', 'minimum', - 'uniqueItems', 'multipleOf', - 'required', 'enum' -]); -function inlineRef(schema, limit) { - if (limit === false) return false; - if (limit === undefined || limit === true) return checkNoRef(schema); - else if (limit) return countKeys(schema) <= limit; -} - - -function checkNoRef(schema) { - var item; - if (Array.isArray(schema)) { - for (var i=0; i All rights reserved. @@ -47581,7 +47407,7 @@ module.exports = { /***/ }), -/* 206 */ +/* 204 */ /***/ (function(module, exports) { // Copyright 2011 Mark Cavage All rights reserved. @@ -47623,7 +47449,7 @@ module.exports = { /***/ }), -/* 207 */ +/* 205 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -47903,7 +47729,7 @@ function hasWrapper(commander, args) { const requireLockfile = exports.requireLockfile = true; /***/ }), -/* 208 */ +/* 206 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -47917,7 +47743,7 @@ exports.integrityErrors = undefined; var _extends2; function _load_extends() { - return _extends2 = _interopRequireDefault(__webpack_require__(22)); + return _extends2 = _interopRequireDefault(__webpack_require__(20)); } var _asyncToGenerator2; @@ -47935,7 +47761,7 @@ function _load_constants() { var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(4)); + return _fs = _interopRequireWildcard(__webpack_require__(5)); } var _misc; @@ -47947,7 +47773,7 @@ function _load_misc() { var _packageNameUtils; function _load_packageNameUtils() { - return _packageNameUtils = __webpack_require__(222); + return _packageNameUtils = __webpack_require__(220); } var _workspaceLayout; @@ -48525,7 +48351,7 @@ class InstallationIntegrityChecker { exports.default = InstallationIntegrityChecker; /***/ }), -/* 209 */ +/* 207 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -48560,18 +48386,18 @@ function _load_misc() { var _yarnVersion; function _load_yarnVersion() { - return _yarnVersion = __webpack_require__(120); + return _yarnVersion = __webpack_require__(105); } var _semver; function _load_semver() { - return _semver = __webpack_require__(224); + return _semver = __webpack_require__(170); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const semver = __webpack_require__(21); +const semver = __webpack_require__(22); const VERSIONS = Object.assign({}, process.versions, { yarn: (_yarnVersion || _load_yarnVersion()).version @@ -48697,9 +48523,7 @@ function checkOne(info, config, ignoreEngines) { ref.ignore = true; ref.incompatible = true; - reporter.info(`${human}: ${msg}`); if (!didIgnore) { - reporter.info(reporter.lang('optionalCompatibilityExcluded', human)); didIgnore = true; } } else { @@ -48794,7 +48618,7 @@ function shouldCheck(manifest, options) { } /***/ }), -/* 210 */ +/* 208 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -48812,11 +48636,29 @@ function _load_asyncToGenerator() { } let fetchCache = (() => { - var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dest, fetcher, config) { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dest, fetcher, config, remote) { + // $FlowFixMe: This error doesn't make sense var _ref2 = yield config.readPackageMetadata(dest); const hash = _ref2.hash, - pkg = _ref2.package; + pkg = _ref2.package, + cacheRemote = _ref2.remote; + + + const cacheIntegrity = cacheRemote.cacheIntegrity || cacheRemote.integrity; + const cacheHash = cacheRemote.hash; + + if (remote.integrity) { + if (!cacheIntegrity || !ssri.parse(cacheIntegrity).match(remote.integrity)) { + throw new (_errors || _load_errors()).SecurityError(config.reporter.lang('fetchBadIntegrityCache', pkg.name, cacheIntegrity, remote.integrity)); + } + } + + if (remote.hash) { + if (!cacheHash || cacheHash !== remote.hash) { + throw new (_errors || _load_errors()).SecurityError(config.reporter.lang('fetchBadHashCache', pkg.name, cacheHash, remote.hash)); + } + } yield fetcher.setupMirrorFromCache(); return { @@ -48827,7 +48669,7 @@ let fetchCache = (() => { }; }); - return function fetchCache(_x, _x2, _x3) { + return function fetchCache(_x, _x2, _x3, _x4) { return _ref.apply(this, arguments); }; })(); @@ -48847,7 +48689,7 @@ let fetchOneRemote = exports.fetchOneRemote = (() => { const fetcher = new Fetcher(dest, remote, config); if (yield config.isValidModuleDest(dest)) { - return fetchCache(dest, fetcher, config); + return fetchCache(dest, fetcher, config, remote); } // remove as the module may be invalid @@ -48868,7 +48710,7 @@ let fetchOneRemote = exports.fetchOneRemote = (() => { } }); - return function fetchOneRemote(_x4, _x5, _x6, _x7, _x8) { + return function fetchOneRemote(_x5, _x6, _x7, _x8, _x9) { return _ref3.apply(this, arguments); }; })(); @@ -48887,7 +48729,7 @@ let maybeFetchOne = (() => { } }); - return function maybeFetchOne(_x9, _x10) { + return function maybeFetchOne(_x10, _x11) { return _ref4.apply(this, arguments); }; })(); @@ -48903,25 +48745,27 @@ function _load_errors() { var _index; function _load_index() { - return _index = _interopRequireWildcard(__webpack_require__(552)); + return _index = _interopRequireWildcard(__webpack_require__(520)); } var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(4)); + return _fs = _interopRequireWildcard(__webpack_require__(5)); } var _promise; function _load_promise() { - return _promise = _interopRequireWildcard(__webpack_require__(50)); + return _promise = _interopRequireWildcard(__webpack_require__(51)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const ssri = __webpack_require__(65); + function fetchOne(ref, config) { const dest = config.generateModuleCachePath(ref); @@ -48993,14 +48837,14 @@ function fetch(pkgs, config) { return pkg; }); - return function (_x11) { + return function (_x12) { return _ref5.apply(this, arguments); }; })(), config.networkConcurrency); } /***/ }), -/* 211 */ +/* 209 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -49041,7 +48885,7 @@ let linkBin = exports.linkBin = (() => { var _packageHoister; function _load_packageHoister() { - return _packageHoister = _interopRequireDefault(__webpack_require__(556)); + return _packageHoister = _interopRequireDefault(__webpack_require__(524)); } var _constants; @@ -49053,7 +48897,7 @@ function _load_constants() { var _promise; function _load_promise() { - return _promise = _interopRequireWildcard(__webpack_require__(50)); + return _promise = _interopRequireWildcard(__webpack_require__(51)); } var _normalizePattern2; @@ -49071,19 +48915,19 @@ function _load_misc() { var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(4)); + return _fs = _interopRequireWildcard(__webpack_require__(5)); } var _mutex; function _load_mutex() { - return _mutex = _interopRequireDefault(__webpack_require__(375)); + return _mutex = _interopRequireDefault(__webpack_require__(369)); } var _semver; function _load_semver() { - return _semver = __webpack_require__(224); + return _semver = __webpack_require__(170); } var _workspaceLayout; @@ -49098,9 +48942,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de const invariant = __webpack_require__(9); -const cmdShim = __webpack_require__(201); +const cmdShim = __webpack_require__(202); const path = __webpack_require__(0); -const semver = __webpack_require__(21); +const semver = __webpack_require__(22); // Concurrency for creating bin links disabled because of the issue #1961 const linkBinConcurrency = 1; @@ -49386,10 +49230,6 @@ class PackageLinker { } else if (workspaceLayout && remote.type === 'workspace' && !isShallow) { src = remote.reference; type = 'symlink'; - if (dest.indexOf(workspaceLayout.virtualManifestName) !== -1) { - // we don't need to install virtual manifest - continue; - } // to get real path for non hoisted dependencies symlinkPaths.set(dest, src); } else { @@ -49566,6 +49406,10 @@ class PackageLinker { possibleExtraneous.add(path.join(filepath, subfile)); } + } else if (file[0] === '.' && file !== '.bin') { + if (!(yield (_fs || _load_fs()).lstat(filepath)).isDirectory()) { + possibleExtraneous.add(filepath); + } } else { possibleExtraneous.add(filepath); } @@ -50140,7 +49984,7 @@ class PackageLinker { exports.default = PackageLinker; /***/ }), -/* 212 */ +/* 210 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -50162,7 +50006,7 @@ function _load_tty() { function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const readline = __webpack_require__(197); +const readline = __webpack_require__(198); var _require = __webpack_require__(30); @@ -50231,7 +50075,7 @@ function clearNthLine(stdout, n) { } /***/ }), -/* 213 */ +/* 211 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -50244,7 +50088,7 @@ Object.defineProperty(exports, "__esModule", { var _extends2; function _load_extends() { - return _extends2 = _interopRequireDefault(__webpack_require__(22)); + return _extends2 = _interopRequireDefault(__webpack_require__(20)); } var _baseReporter; @@ -50425,7 +50269,7 @@ class JSONReporter extends (_baseReporter || _load_baseReporter()).default { exports.default = JSONReporter; /***/ }), -/* 214 */ +/* 212 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -50439,7 +50283,7 @@ exports.shouldUpdateLockfile = undefined; var _semver; function _load_semver() { - return _semver = _interopRequireDefault(__webpack_require__(21)); + return _semver = _interopRequireDefault(__webpack_require__(22)); } var _minimatch; @@ -50463,13 +50307,13 @@ function _load_normalizePattern() { var _parsePackagePath; function _load_parsePackagePath() { - return _parsePackagePath = _interopRequireDefault(__webpack_require__(376)); + return _parsePackagePath = _interopRequireDefault(__webpack_require__(370)); } var _parsePackagePath2; function _load_parsePackagePath2() { - return _parsePackagePath2 = __webpack_require__(376); + return _parsePackagePath2 = __webpack_require__(370); } var _resolvers; @@ -50573,7 +50417,7 @@ const shouldUpdateLockfile = exports.shouldUpdateLockfile = (lockfileEntry, reso }; /***/ }), -/* 215 */ +/* 213 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -50605,7 +50449,7 @@ function _load_invariant() { var _uuid; function _load_uuid() { - return _uuid = _interopRequireDefault(__webpack_require__(119)); + return _uuid = _interopRequireDefault(__webpack_require__(120)); } var _errors; @@ -50629,7 +50473,7 @@ function _load_misc() { var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(4)); + return _fs = _interopRequireWildcard(__webpack_require__(5)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -50711,7 +50555,7 @@ FileResolver.protocol = 'file'; FileResolver.prefixMatcher = /^\.{1,2}\//; /***/ }), -/* 216 */ +/* 214 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -50787,7 +50631,7 @@ exports.default = GistResolver; GistResolver.protocol = 'gist'; /***/ }), -/* 217 */ +/* 215 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -50806,7 +50650,7 @@ function _load_asyncToGenerator() { var _cache; function _load_cache() { - return _cache = __webpack_require__(355); + return _cache = __webpack_require__(349); } var _errors; @@ -50818,7 +50662,7 @@ function _load_errors() { var _registryResolver; function _load_registryResolver() { - return _registryResolver = _interopRequireDefault(__webpack_require__(575)); + return _registryResolver = _interopRequireDefault(__webpack_require__(543)); } var _npmRegistry; @@ -50836,7 +50680,7 @@ function _load_map() { var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(4)); + return _fs = _interopRequireWildcard(__webpack_require__(5)); } var _constants; @@ -50848,7 +50692,7 @@ function _load_constants() { var _packageNameUtils; function _load_packageNameUtils() { - return _packageNameUtils = __webpack_require__(222); + return _packageNameUtils = __webpack_require__(220); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -50858,8 +50702,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de const inquirer = __webpack_require__(276); const tty = __webpack_require__(104); const path = __webpack_require__(0); -const semver = __webpack_require__(21); -const ssri = __webpack_require__(77); +const semver = __webpack_require__(22); +const ssri = __webpack_require__(65); const NPM_REGISTRY_ID = 'npm'; @@ -51076,7 +50920,7 @@ exports.default = NpmResolver; NpmResolver.registry = NPM_REGISTRY_ID; /***/ }), -/* 218 */ +/* 216 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -51156,19 +51000,19 @@ let fixTimes = (() => { var _fs; function _load_fs() { - return _fs = _interopRequireDefault(__webpack_require__(5)); + return _fs = _interopRequireDefault(__webpack_require__(4)); } var _promise; function _load_promise() { - return _promise = __webpack_require__(50); + return _promise = __webpack_require__(51); } var _fs2; function _load_fs2() { - return _fs2 = __webpack_require__(4); + return _fs2 = __webpack_require__(5); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -51274,7 +51118,7 @@ const copyWithBuffer = (() => { }; /***/ }), -/* 219 */ +/* 217 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -51293,7 +51137,7 @@ function _load_asyncToGenerator() { var _extends2; function _load_extends() { - return _extends2 = _interopRequireDefault(__webpack_require__(22)); + return _extends2 = _interopRequireDefault(__webpack_require__(20)); } var _invariant; @@ -51311,7 +51155,7 @@ function _load_string_decoder() { var _tarFs; function _load_tarFs() { - return _tarFs = _interopRequireDefault(__webpack_require__(193)); + return _tarFs = _interopRequireDefault(__webpack_require__(194)); } var _tarStream; @@ -51329,7 +51173,7 @@ function _load_url() { var _fs; function _load_fs() { - return _fs = __webpack_require__(5); + return _fs = __webpack_require__(4); } var _errors; @@ -51341,13 +51185,13 @@ function _load_errors() { var _gitSpawn; function _load_gitSpawn() { - return _gitSpawn = __webpack_require__(373); + return _gitSpawn = __webpack_require__(367); } var _gitRefResolver; function _load_gitRefResolver() { - return _gitRefResolver = __webpack_require__(581); + return _gitRefResolver = __webpack_require__(549); } var _crypto; @@ -51359,7 +51203,7 @@ function _load_crypto() { var _fs2; function _load_fs2() { - return _fs2 = _interopRequireWildcard(__webpack_require__(4)); + return _fs2 = _interopRequireWildcard(__webpack_require__(5)); } var _map; @@ -51918,7 +51762,7 @@ class Git { exports.default = Git; /***/ }), -/* 220 */ +/* 218 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -51937,7 +51781,7 @@ function _load_asyncToGenerator() { var _resolveRelative; function _load_resolveRelative() { - return _resolveRelative = _interopRequireDefault(__webpack_require__(586)); + return _resolveRelative = _interopRequireDefault(__webpack_require__(554)); } var _validate; @@ -51949,7 +51793,7 @@ function _load_validate() { var _fix; function _load_fix() { - return _fix = _interopRequireDefault(__webpack_require__(583)); + return _fix = _interopRequireDefault(__webpack_require__(551)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -52005,7 +51849,7 @@ exports.default = (() => { })(); /***/ }), -/* 221 */ +/* 219 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -52015,6 +51859,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.isValidLicense = isValidLicense; +exports.isValidBin = isValidBin; exports.stringifyPerson = stringifyPerson; exports.parsePerson = parsePerson; exports.normalizePerson = normalizePerson; @@ -52022,12 +51867,20 @@ exports.extractDescription = extractDescription; exports.extractRepositoryUrl = extractRepositoryUrl; +const path = __webpack_require__(0); + const validateLicense = __webpack_require__(959); +const PARENT_PATH = /^\.\.([\\\/]|$)/; + function isValidLicense(license) { return !!license && validateLicense(license).validForNewPackages; } +function isValidBin(bin) { + return !path.isAbsolute(bin) && !PARENT_PATH.test(path.normalize(bin)); +} + function stringifyPerson(person) { if (!person || typeof person !== 'object') { return person; @@ -52125,7 +51978,7 @@ function extractRepositoryUrl(repository) { } /***/ }), -/* 222 */ +/* 220 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -52149,7 +52002,7 @@ function getSystemParams() { } /***/ }), -/* 223 */ +/* 221 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -52177,140 +52030,7 @@ function isRootUser(uid) { } /***/ }), -/* 224 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.satisfiesWithPrereleases = satisfiesWithPrereleases; -exports.diffWithUnstable = diffWithUnstable; - -var _semver; - -function _load_semver() { - return _semver = _interopRequireDefault(__webpack_require__(21)); -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Returns whether the given semver version satisfies the given range. Notably this supports - * prerelease versions so that "2.0.0-rc.0" satisfies the range ">=1.0.0", for example. - */ - -function satisfiesWithPrereleases(version, range, loose = false) { - let semverRange; - try { - // $FlowFixMe: Add a definition for the Range class - semverRange = new (_semver || _load_semver()).default.Range(range, loose); - } catch (err) { - return false; - } - - if (!version) { - return false; - } - let semverVersion; - try { - semverVersion = new (_semver || _load_semver()).default.SemVer(version, semverRange.loose); - } catch (err) { - return false; - } - - // A range has multiple sets of comparators. A version must satisfy all comparators in a set - // and at least one set to satisfy the range. - return semverRange.set.some(comparatorSet => { - // node-semver converts ~ and ^ ranges into pairs of >= and < ranges but the upper bounds don't - // properly exclude prerelease versions. For example, "^1.0.0" is converted to ">=1.0.0 <2.0.0", - // which includes "2.0.0-pre" since prerelease versions are lower than their non-prerelease - // counterparts. As a practical workaround we make upper-bound ranges exclude prereleases and - // convert "<2.0.0" to "<2.0.0-0", for example. - comparatorSet = comparatorSet.map(comparator => { - if (comparator.operator !== '<' || !comparator.value || comparator.semver.prerelease.length) { - return comparator; - } - - // "0" is the lowest prerelease version - comparator.semver.inc('pre', 0); - - const comparatorString = comparator.operator + comparator.semver.version; - // $FlowFixMe: Add a definition for the Comparator class - return new (_semver || _load_semver()).default.Comparator(comparatorString, comparator.loose); - }); - - return !comparatorSet.some(comparator => !comparator.test(semverVersion)); - }); -} - -const PRE_RELEASES = { - major: 'premajor', - minor: 'preminor', - patch: 'prepatch' -}; - -/** - * Returns the difference between two versions as a semantic string representation. - * Similar to the `diff` method in node-semver, but it also accounts for unstable versions, - * like 0.x.x or 0.0.x. - */ - -function diffWithUnstable(version1, version2) { - if ((_semver || _load_semver()).default.eq(version1, version2) === false) { - const v1 = (_semver || _load_semver()).default.parse(version1); - const v2 = (_semver || _load_semver()).default.parse(version2); - - if (v1 != null && v2 != null) { - const isPreRelease = v1.prerelease.length > 0 || v2.prerelease.length > 0; - const preMajor = v1.major === 0 || v2.major === 0; - const preMinor = preMajor && (v1.minor === 0 || v2.minor === 0); - - let diff = null; - - if (v1.major !== v2.major) { - diff = 'major'; - } else if (v1.minor !== v2.minor) { - if (preMajor) { - // If the major version number is zero (0.x.x), treat a change - // of the minor version number as a major change. - diff = 'major'; - } else { - diff = 'minor'; - } - } else if (v1.patch !== v2.patch) { - if (preMinor) { - // If the major & minor version numbers are zero (0.0.x), treat a change - // of the patch version number as a major change. - diff = 'major'; - } else if (preMajor) { - // If the major version number is zero (0.x.x), treat a change - // of the patch version number as a minor change. - diff = 'minor'; - } else { - diff = 'patch'; - } - } - - if (isPreRelease) { - if (diff != null) { - diff = PRE_RELEASES[diff]; - } else { - diff = 'prerelease'; - } - } - - return diff; - } - } - - return null; -} - -/***/ }), -/* 225 */ +/* 222 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -52323,7 +52043,7 @@ exports.getDataDir = getDataDir; exports.getCacheDir = getCacheDir; exports.getConfigDir = getConfigDir; const path = __webpack_require__(0); -const userHome = __webpack_require__(66).default; +const userHome = __webpack_require__(67).default; const FALLBACK_CONFIG_DIR = path.join(userHome, '.config', 'yarn'); const FALLBACK_CACHE_DIR = path.join(userHome, '.cache', 'yarn'); @@ -52376,7 +52096,7 @@ function getLocalAppDataDir() { } /***/ }), -/* 226 */ +/* 223 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -52396,13 +52116,13 @@ function explodeHashedUrl(url) { } /***/ }), -/* 227 */ +/* 224 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(233), __esModule: true }; +module.exports = { "default": __webpack_require__(230), __esModule: true }; /***/ }), -/* 228 */ +/* 225 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -52468,11 +52188,11 @@ function range(a, b, str) { /***/ }), -/* 229 */ +/* 226 */ /***/ (function(module, exports, __webpack_require__) { -var concatMap = __webpack_require__(232); -var balanced = __webpack_require__(228); +var concatMap = __webpack_require__(229); +var balanced = __webpack_require__(225); module.exports = expandTop; @@ -52675,7 +52395,7 @@ function expand(str, isTop) { /***/ }), -/* 230 */ +/* 227 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -52746,7 +52466,7 @@ module.exports = function (str) { /***/ }), -/* 231 */ +/* 228 */ /***/ (function(module, exports) { function Caseless (dict) { @@ -52819,7 +52539,7 @@ module.exports.httpify = function (resp, headers) { /***/ }), -/* 232 */ +/* 229 */ /***/ (function(module, exports) { module.exports = function (xs, fn) { @@ -52838,27 +52558,27 @@ var isArray = Array.isArray || function (xs) { /***/ }), -/* 233 */ +/* 230 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(259); +__webpack_require__(256); +__webpack_require__(258); __webpack_require__(261); -__webpack_require__(264); +__webpack_require__(257); +__webpack_require__(259); __webpack_require__(260); -__webpack_require__(262); -__webpack_require__(263); module.exports = __webpack_require__(31).Promise; /***/ }), -/* 234 */ +/* 231 */ /***/ (function(module, exports) { module.exports = function () { /* empty */ }; /***/ }), -/* 235 */ +/* 232 */ /***/ (function(module, exports) { module.exports = function (it, Constructor, name, forbiddenField) { @@ -52869,14 +52589,14 @@ module.exports = function (it, Constructor, name, forbiddenField) { /***/ }), -/* 236 */ +/* 233 */ /***/ (function(module, exports, __webpack_require__) { // false -> Array#indexOf // true -> Array#includes var toIObject = __webpack_require__(98); var toLength = __webpack_require__(136); -var toAbsoluteIndex = __webpack_require__(254); +var toAbsoluteIndex = __webpack_require__(251); module.exports = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIObject($this); @@ -52898,15 +52618,15 @@ module.exports = function (IS_INCLUDES) { /***/ }), -/* 237 */ +/* 234 */ /***/ (function(module, exports, __webpack_require__) { -var ctx = __webpack_require__(69); -var call = __webpack_require__(241); -var isArrayIter = __webpack_require__(240); +var ctx = __webpack_require__(70); +var call = __webpack_require__(238); +var isArrayIter = __webpack_require__(237); var anObject = __webpack_require__(35); var toLength = __webpack_require__(136); -var getIterFn = __webpack_require__(257); +var getIterFn = __webpack_require__(254); var BREAK = {}; var RETURN = {}; var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { @@ -52929,16 +52649,16 @@ exports.RETURN = RETURN; /***/ }), -/* 238 */ +/* 235 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = !__webpack_require__(51) && !__webpack_require__(112)(function () { +module.exports = !__webpack_require__(52) && !__webpack_require__(112)(function () { return Object.defineProperty(__webpack_require__(92)('div'), 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), -/* 239 */ +/* 236 */ /***/ (function(module, exports) { // fast apply, http://jsperf.lnkit.com/fast-apply/5 @@ -52960,12 +52680,12 @@ module.exports = function (fn, args, that) { /***/ }), -/* 240 */ +/* 237 */ /***/ (function(module, exports, __webpack_require__) { // check on default Array iterator -var Iterators = __webpack_require__(53); -var ITERATOR = __webpack_require__(20)('iterator'); +var Iterators = __webpack_require__(54); +var ITERATOR = __webpack_require__(21)('iterator'); var ArrayProto = Array.prototype; module.exports = function (it) { @@ -52974,7 +52694,7 @@ module.exports = function (it) { /***/ }), -/* 241 */ +/* 238 */ /***/ (function(module, exports, __webpack_require__) { // call something on iterator step with safe closing on error @@ -52992,18 +52712,18 @@ module.exports = function (iterator, fn, value, entries) { /***/ }), -/* 242 */ +/* 239 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var create = __webpack_require__(246); +var create = __webpack_require__(243); var descriptor = __webpack_require__(132); var setToStringTag = __webpack_require__(95); var IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() -__webpack_require__(42)(IteratorPrototype, __webpack_require__(20)('iterator'), function () { return this; }); +__webpack_require__(42)(IteratorPrototype, __webpack_require__(21)('iterator'), function () { return this; }); module.exports = function (Constructor, NAME, next) { Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); @@ -53012,10 +52732,10 @@ module.exports = function (Constructor, NAME, next) { /***/ }), -/* 243 */ +/* 240 */ /***/ (function(module, exports, __webpack_require__) { -var ITERATOR = __webpack_require__(20)('iterator'); +var ITERATOR = __webpack_require__(21)('iterator'); var SAFE_CLOSING = false; try { @@ -53040,7 +52760,7 @@ module.exports = function (exec, skipClosing) { /***/ }), -/* 244 */ +/* 241 */ /***/ (function(module, exports) { module.exports = function (done, value) { @@ -53049,7 +52769,7 @@ module.exports = function (done, value) { /***/ }), -/* 245 */ +/* 242 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(17); @@ -53057,7 +52777,7 @@ var macrotask = __webpack_require__(135).set; var Observer = global.MutationObserver || global.WebKitMutationObserver; var process = global.process; var Promise = global.Promise; -var isNode = __webpack_require__(68)(process) == 'process'; +var isNode = __webpack_require__(69)(process) == 'process'; module.exports = function () { var head, last, notify; @@ -53124,12 +52844,12 @@ module.exports = function () { /***/ }), -/* 246 */ +/* 243 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = __webpack_require__(35); -var dPs = __webpack_require__(247); +var dPs = __webpack_require__(244); var enumBugKeys = __webpack_require__(127); var IE_PROTO = __webpack_require__(96)('IE_PROTO'); var Empty = function () { /* empty */ }; @@ -53171,14 +52891,14 @@ module.exports = Object.create || function create(O, Properties) { /***/ }), -/* 247 */ +/* 244 */ /***/ (function(module, exports, __webpack_require__) { -var dP = __webpack_require__(71); +var dP = __webpack_require__(72); var anObject = __webpack_require__(35); -var getKeys = __webpack_require__(171); +var getKeys = __webpack_require__(172); -module.exports = __webpack_require__(51) ? Object.defineProperties : function defineProperties(O, Properties) { +module.exports = __webpack_require__(52) ? Object.defineProperties : function defineProperties(O, Properties) { anObject(O); var keys = getKeys(Properties); var length = keys.length; @@ -53190,12 +52910,12 @@ module.exports = __webpack_require__(51) ? Object.defineProperties : function de /***/ }), -/* 248 */ +/* 245 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) -var has = __webpack_require__(70); -var toObject = __webpack_require__(172); +var has = __webpack_require__(71); +var toObject = __webpack_require__(173); var IE_PROTO = __webpack_require__(96)('IE_PROTO'); var ObjectProto = Object.prototype; @@ -53209,12 +52929,12 @@ module.exports = Object.getPrototypeOf || function (O) { /***/ }), -/* 249 */ +/* 246 */ /***/ (function(module, exports, __webpack_require__) { -var has = __webpack_require__(70); +var has = __webpack_require__(71); var toIObject = __webpack_require__(98); -var arrayIndexOf = __webpack_require__(236)(false); +var arrayIndexOf = __webpack_require__(233)(false); var IE_PROTO = __webpack_require__(96)('IE_PROTO'); module.exports = function (object, names) { @@ -53232,7 +52952,7 @@ module.exports = function (object, names) { /***/ }), -/* 250 */ +/* 247 */ /***/ (function(module, exports, __webpack_require__) { var hide = __webpack_require__(42); @@ -53245,23 +52965,23 @@ module.exports = function (target, src, safe) { /***/ }), -/* 251 */ +/* 248 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(42); /***/ }), -/* 252 */ +/* 249 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var global = __webpack_require__(17); var core = __webpack_require__(31); -var dP = __webpack_require__(71); -var DESCRIPTORS = __webpack_require__(51); -var SPECIES = __webpack_require__(20)('species'); +var dP = __webpack_require__(72); +var DESCRIPTORS = __webpack_require__(52); +var SPECIES = __webpack_require__(21)('species'); module.exports = function (KEY) { var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; @@ -53273,7 +52993,7 @@ module.exports = function (KEY) { /***/ }), -/* 253 */ +/* 250 */ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(97); @@ -53296,7 +53016,7 @@ module.exports = function (TO_STRING) { /***/ }), -/* 254 */ +/* 251 */ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(97); @@ -53309,11 +53029,11 @@ module.exports = function (index, length) { /***/ }), -/* 255 */ +/* 252 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.1 ToPrimitive(input [, PreferredType]) -var isObject = __webpack_require__(52); +var isObject = __webpack_require__(53); // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports = function (it, S) { @@ -53327,7 +53047,7 @@ module.exports = function (it, S) { /***/ }), -/* 256 */ +/* 253 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(17); @@ -53337,12 +53057,12 @@ module.exports = navigator && navigator.userAgent || ''; /***/ }), -/* 257 */ +/* 254 */ /***/ (function(module, exports, __webpack_require__) { var classof = __webpack_require__(126); -var ITERATOR = __webpack_require__(20)('iterator'); -var Iterators = __webpack_require__(53); +var ITERATOR = __webpack_require__(21)('iterator'); +var Iterators = __webpack_require__(54); module.exports = __webpack_require__(31).getIteratorMethod = function (it) { if (it != undefined) return it[ITERATOR] || it['@@iterator'] @@ -53351,14 +53071,14 @@ module.exports = __webpack_require__(31).getIteratorMethod = function (it) { /***/ }), -/* 258 */ +/* 255 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var addToUnscopables = __webpack_require__(234); -var step = __webpack_require__(244); -var Iterators = __webpack_require__(53); +var addToUnscopables = __webpack_require__(231); +var step = __webpack_require__(241); +var Iterators = __webpack_require__(54); var toIObject = __webpack_require__(98); // 22.1.3.4 Array.prototype.entries() @@ -53392,32 +53112,32 @@ addToUnscopables('entries'); /***/ }), -/* 259 */ +/* 256 */ /***/ (function(module, exports) { /***/ }), -/* 260 */ +/* 257 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var LIBRARY = __webpack_require__(93); var global = __webpack_require__(17); -var ctx = __webpack_require__(69); +var ctx = __webpack_require__(70); var classof = __webpack_require__(126); var $export = __webpack_require__(60); -var isObject = __webpack_require__(52); -var aFunction = __webpack_require__(67); -var anInstance = __webpack_require__(235); -var forOf = __webpack_require__(237); +var isObject = __webpack_require__(53); +var aFunction = __webpack_require__(68); +var anInstance = __webpack_require__(232); +var forOf = __webpack_require__(234); var speciesConstructor = __webpack_require__(134); var task = __webpack_require__(135).set; -var microtask = __webpack_require__(245)(); +var microtask = __webpack_require__(242)(); var newPromiseCapabilityModule = __webpack_require__(94); var perform = __webpack_require__(130); -var userAgent = __webpack_require__(256); +var userAgent = __webpack_require__(253); var promiseResolve = __webpack_require__(131); var PROMISE = 'Promise'; var TypeError = global.TypeError; @@ -53434,7 +53154,7 @@ var USE_NATIVE = !!function () { try { // correct subclassing with @@species support var promise = $Promise.resolve(1); - var FakePromise = (promise.constructor = {})[__webpack_require__(20)('species')] = function (exec) { + var FakePromise = (promise.constructor = {})[__webpack_require__(21)('species')] = function (exec) { exec(empty, empty); }; // unhandled rejections tracking support, NodeJS Promise without it fails @@species test @@ -53593,7 +53313,7 @@ if (!USE_NATIVE) { this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled this._n = false; // <- notify }; - Internal.prototype = __webpack_require__(250)($Promise.prototype, { + Internal.prototype = __webpack_require__(247)($Promise.prototype, { // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) then: function then(onFulfilled, onRejected) { var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); @@ -53625,7 +53345,7 @@ if (!USE_NATIVE) { $export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); __webpack_require__(95)($Promise, PROMISE); -__webpack_require__(252)(PROMISE); +__webpack_require__(249)(PROMISE); Wrapper = __webpack_require__(31)[PROMISE]; // statics @@ -53644,7 +53364,7 @@ $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); } }); -$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(243)(function (iter) { +$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(240)(function (iter) { $Promise.all(iter)['catch'](empty); })), PROMISE, { // 25.4.4.1 Promise.all(iterable) @@ -53691,12 +53411,12 @@ $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(243)(functio /***/ }), -/* 261 */ +/* 258 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var $at = __webpack_require__(253)(true); +var $at = __webpack_require__(250)(true); // 21.1.3.27 String.prototype[@@iterator]() __webpack_require__(129)(String, 'String', function (iterated) { @@ -53715,7 +53435,7 @@ __webpack_require__(129)(String, 'String', function (iterated) { /***/ }), -/* 262 */ +/* 259 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -53742,7 +53462,7 @@ $export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { /***/ }), -/* 263 */ +/* 260 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -53761,14 +53481,14 @@ $export($export.S, 'Promise', { 'try': function (callbackfn) { /***/ }), -/* 264 */ +/* 261 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(258); +__webpack_require__(255); var global = __webpack_require__(17); var hide = __webpack_require__(42); -var Iterators = __webpack_require__(53); -var TO_STRING_TAG = __webpack_require__(20)('toStringTag'); +var Iterators = __webpack_require__(54); +var TO_STRING_TAG = __webpack_require__(21)('toStringTag'); var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + @@ -53786,7 +53506,7 @@ for (var i = 0; i < DOMIterables.length; i++) { /***/ }), -/* 265 */ +/* 262 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53987,7 +53707,7 @@ function localstorage() { /***/ }), -/* 266 */ +/* 263 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53996,14 +53716,14 @@ function localstorage() { */ if (typeof process === 'undefined' || process.type === 'renderer') { - module.exports = __webpack_require__(265); + module.exports = __webpack_require__(262); } else { - module.exports = __webpack_require__(267); + module.exports = __webpack_require__(264); } /***/ }), -/* 267 */ +/* 264 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54195,7 +53915,7 @@ exports.enable(load()); /***/ }), -/* 268 */ +/* 265 */ /***/ (function(module, exports, __webpack_require__) { (function webpackUniversalModuleDefinition(root, factory) { @@ -60909,7 +60629,7 @@ return /******/ (function(modules) { // webpackBootstrap ; /***/ }), -/* 269 */ +/* 266 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -61033,12 +60753,12 @@ module.exports = function extend() { /***/ }), -/* 270 */ +/* 267 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const escapeStringRegexp = __webpack_require__(388); +const escapeStringRegexp = __webpack_require__(382); const platform = process.platform; @@ -61187,7 +60907,7 @@ module.exports = Object.assign(fn, figures); /***/ }), -/* 271 */ +/* 268 */ /***/ (function(module, exports, __webpack_require__) { // Copyright Joyent, Inc. and other Node contributors. @@ -61213,7 +60933,7 @@ module.exports = Object.assign(fn, figures); var pathModule = __webpack_require__(0); var isWindows = process.platform === 'win32'; -var fs = __webpack_require__(5); +var fs = __webpack_require__(4); // JavaScript implementation of realpath, ported from node pre-v6 @@ -61496,13 +61216,13 @@ exports.realpath = function realpath(p, cache, cb) { /***/ }), -/* 272 */ +/* 269 */ /***/ (function(module, exports, __webpack_require__) { module.exports = globSync globSync.GlobSync = GlobSync -var fs = __webpack_require__(5) +var fs = __webpack_require__(4) var rp = __webpack_require__(140) var minimatch = __webpack_require__(82) var Minimatch = minimatch.Minimatch @@ -61987,6 +61707,387 @@ GlobSync.prototype._makeAbs = function (f) { } +/***/ }), +/* 270 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var resolve = __webpack_require__(271); + +module.exports = { + Validation: errorSubclass(ValidationError), + MissingRef: errorSubclass(MissingRefError) +}; + + +function ValidationError(errors) { + this.message = 'validation failed'; + this.errors = errors; + this.ajv = this.validation = true; +} + + +MissingRefError.message = function (baseId, ref) { + return 'can\'t resolve reference ' + ref + ' from id ' + baseId; +}; + + +function MissingRefError(baseId, ref, message) { + this.message = message || MissingRefError.message(baseId, ref); + this.missingRef = resolve.url(baseId, ref); + this.missingSchema = resolve.normalizeId(resolve.fullPath(this.missingRef)); +} + + +function errorSubclass(Subclass) { + Subclass.prototype = Object.create(Error.prototype); + Subclass.prototype.constructor = Subclass; + return Subclass; +} + + +/***/ }), +/* 271 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var url = __webpack_require__(24) + , equal = __webpack_require__(272) + , util = __webpack_require__(114) + , SchemaObject = __webpack_require__(386) + , traverse = __webpack_require__(677); + +module.exports = resolve; + +resolve.normalizeId = normalizeId; +resolve.fullPath = getFullPath; +resolve.url = resolveUrl; +resolve.ids = resolveIds; +resolve.inlineRef = inlineRef; +resolve.schema = resolveSchema; + +/** + * [resolve and compile the references ($ref)] + * @this Ajv + * @param {Function} compile reference to schema compilation funciton (localCompile) + * @param {Object} root object with information about the root schema for the current schema + * @param {String} ref reference to resolve + * @return {Object|Function} schema object (if the schema can be inlined) or validation function + */ +function resolve(compile, root, ref) { + /* jshint validthis: true */ + var refVal = this._refs[ref]; + if (typeof refVal == 'string') { + if (this._refs[refVal]) refVal = this._refs[refVal]; + else return resolve.call(this, compile, root, refVal); + } + + refVal = refVal || this._schemas[ref]; + if (refVal instanceof SchemaObject) { + return inlineRef(refVal.schema, this._opts.inlineRefs) + ? refVal.schema + : refVal.validate || this._compile(refVal); + } + + var res = resolveSchema.call(this, root, ref); + var schema, v, baseId; + if (res) { + schema = res.schema; + root = res.root; + baseId = res.baseId; + } + + if (schema instanceof SchemaObject) { + v = schema.validate || compile.call(this, schema.schema, root, undefined, baseId); + } else if (schema !== undefined) { + v = inlineRef(schema, this._opts.inlineRefs) + ? schema + : compile.call(this, schema, root, undefined, baseId); + } + + return v; +} + + +/** + * Resolve schema, its root and baseId + * @this Ajv + * @param {Object} root root object with properties schema, refVal, refs + * @param {String} ref reference to resolve + * @return {Object} object with properties schema, root, baseId + */ +function resolveSchema(root, ref) { + /* jshint validthis: true */ + var p = url.parse(ref, false, true) + , refPath = _getFullPath(p) + , baseId = getFullPath(this._getId(root.schema)); + if (refPath !== baseId) { + var id = normalizeId(refPath); + var refVal = this._refs[id]; + if (typeof refVal == 'string') { + return resolveRecursive.call(this, root, refVal, p); + } else if (refVal instanceof SchemaObject) { + if (!refVal.validate) this._compile(refVal); + root = refVal; + } else { + refVal = this._schemas[id]; + if (refVal instanceof SchemaObject) { + if (!refVal.validate) this._compile(refVal); + if (id == normalizeId(ref)) + return { schema: refVal, root: root, baseId: baseId }; + root = refVal; + } else { + return; + } + } + if (!root.schema) return; + baseId = getFullPath(this._getId(root.schema)); + } + return getJsonPointer.call(this, p, baseId, root.schema, root); +} + + +/* @this Ajv */ +function resolveRecursive(root, ref, parsedRef) { + /* jshint validthis: true */ + var res = resolveSchema.call(this, root, ref); + if (res) { + var schema = res.schema; + var baseId = res.baseId; + root = res.root; + var id = this._getId(schema); + if (id) baseId = resolveUrl(baseId, id); + return getJsonPointer.call(this, parsedRef, baseId, schema, root); + } +} + + +var PREVENT_SCOPE_CHANGE = util.toHash(['properties', 'patternProperties', 'enum', 'dependencies', 'definitions']); +/* @this Ajv */ +function getJsonPointer(parsedRef, baseId, schema, root) { + /* jshint validthis: true */ + parsedRef.hash = parsedRef.hash || ''; + if (parsedRef.hash.slice(0,2) != '#/') return; + var parts = parsedRef.hash.split('/'); + + for (var i = 1; i < parts.length; i++) { + var part = parts[i]; + if (part) { + part = util.unescapeFragment(part); + schema = schema[part]; + if (schema === undefined) break; + var id; + if (!PREVENT_SCOPE_CHANGE[part]) { + id = this._getId(schema); + if (id) baseId = resolveUrl(baseId, id); + if (schema.$ref) { + var $ref = resolveUrl(baseId, schema.$ref); + var res = resolveSchema.call(this, root, $ref); + if (res) { + schema = res.schema; + root = res.root; + baseId = res.baseId; + } + } + } + } + } + if (schema !== undefined && schema !== root.schema) + return { schema: schema, root: root, baseId: baseId }; +} + + +var SIMPLE_INLINED = util.toHash([ + 'type', 'format', 'pattern', + 'maxLength', 'minLength', + 'maxProperties', 'minProperties', + 'maxItems', 'minItems', + 'maximum', 'minimum', + 'uniqueItems', 'multipleOf', + 'required', 'enum' +]); +function inlineRef(schema, limit) { + if (limit === false) return false; + if (limit === undefined || limit === true) return checkNoRef(schema); + else if (limit) return countKeys(schema) <= limit; +} + + +function checkNoRef(schema) { + var item; + if (Array.isArray(schema)) { + for (var i=0; i', - $notOp = $isMax ? '>' : '<', - $errorKeyword = undefined; - if ($isDataExcl) { - var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), - $exclusive = 'exclusive' + $lvl, - $exclType = 'exclType' + $lvl, - $exclIsNumber = 'exclIsNumber' + $lvl, - $opExpr = 'op' + $lvl, - $opStr = '\' + ' + $opExpr + ' + \''; - out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; - $schemaValueExcl = 'schemaExcl' + $lvl; - out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { '; - var $errorKeyword = $exclusiveKeyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';'; - } else { - var $exclIsNumber = typeof $schemaExcl == 'number', - $opStr = $op; - if ($exclIsNumber && $isData) { - var $opExpr = '\'' + $opStr + '\''; - out += ' if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { '; - } else { - if ($exclIsNumber && $schema === undefined) { - $exclusive = true; - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; - $schemaValue = $schemaExcl; - $notOp += '='; - } else { - if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); - if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { - $exclusive = true; - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; - $notOp += '='; - } else { - $exclusive = false; - $opStr += '='; - } - } - var $opExpr = '\'' + $opStr + '\''; - out += ' if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { '; - } - } - $errorKeyword = $errorKeyword || $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be ' + ($opStr) + ' '; - if ($isData) { - out += '\' + ' + ($schemaValue); - } else { - out += '' + ($schemaValue) + '\''; - } - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - - -/***/ }), -/* 341 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate__limitItems(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $op = $keyword == 'maxItems' ? '>' : '<'; - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { '; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have '; - if ($keyword == 'maxItems') { - out += 'more'; - } else { - out += 'less'; - } - out += ' than '; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + ($schema); - } - out += ' items\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - - -/***/ }), -/* 342 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate__limitLength(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $op = $keyword == 'maxLength' ? '>' : '<'; - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - if (it.opts.unicode === false) { - out += ' ' + ($data) + '.length '; - } else { - out += ' ucs2length(' + ($data) + ') '; - } - out += ' ' + ($op) + ' ' + ($schemaValue) + ') { '; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT be '; - if ($keyword == 'maxLength') { - out += 'longer'; - } else { - out += 'shorter'; - } - out += ' than '; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + ($schema); - } - out += ' characters\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - - -/***/ }), -/* 343 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate__limitProperties(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $op = $keyword == 'maxProperties' ? '>' : '<'; - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { '; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have '; - if ($keyword == 'maxProperties') { - out += 'more'; - } else { - out += 'less'; - } - out += ' than '; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + ($schema); - } - out += ' properties\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - - -/***/ }), -/* 344 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_validate(it, $keyword, $ruleType) { - var out = ''; - var $async = it.schema.$async === true, - $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'), - $id = it.self._getId(it.schema); - if (it.isTop) { - if ($async) { - it.async = true; - var $es7 = it.opts.async == 'es7'; - it.yieldAwait = $es7 ? 'await' : 'yield'; - } - out += ' var validate = '; - if ($async) { - if ($es7) { - out += ' (async function '; - } else { - if (it.opts.async != '*') { - out += 'co.wrap'; - } - out += '(function* '; - } - } else { - out += ' (function '; - } - out += ' (data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; '; - if ($id && (it.opts.sourceCode || it.opts.processCode)) { - out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' '; - } - } - if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) { - var $keyword = 'false schema'; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - if (it.schema === false) { - if (it.isTop) { - $breakOnError = true; - } else { - out += ' var ' + ($valid) + ' = false; '; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'boolean schema is false\' '; - } - if (it.opts.verbose) { - out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - } else { - if (it.isTop) { - if ($async) { - out += ' return data; '; - } else { - out += ' validate.errors = null; return true; '; - } - } else { - out += ' var ' + ($valid) + ' = true; '; - } - } - if (it.isTop) { - out += ' }); return validate; '; - } - return out; - } - if (it.isTop) { - var $top = it.isTop, - $lvl = it.level = 0, - $dataLvl = it.dataLevel = 0, - $data = 'data'; - it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); - it.baseId = it.baseId || it.rootId; - delete it.isTop; - it.dataPathArr = [undefined]; - out += ' var vErrors = null; '; - out += ' var errors = 0; '; - out += ' if (rootData === undefined) rootData = data; '; - } else { - var $lvl = it.level, - $dataLvl = it.dataLevel, - $data = 'data' + ($dataLvl || ''); - if ($id) it.baseId = it.resolve.url(it.baseId, $id); - if ($async && !it.async) throw new Error('async schema in sync schema'); - out += ' var errs_' + ($lvl) + ' = errors;'; - } - var $valid = 'valid' + $lvl, - $breakOnError = !it.opts.allErrors, - $closingBraces1 = '', - $closingBraces2 = ''; - var $errorKeyword; - var $typeSchema = it.schema.type, - $typeIsArray = Array.isArray($typeSchema); - if ($typeIsArray && $typeSchema.length == 1) { - $typeSchema = $typeSchema[0]; - $typeIsArray = false; - } - if (it.schema.$ref && $refKeywords) { - if (it.opts.extendRefs == 'fail') { - throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); - } else if (it.opts.extendRefs !== true) { - $refKeywords = false; - it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); - } - } - if ($typeSchema) { - if (it.opts.coerceTypes) { - var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); - } - var $rulesGroup = it.RULES.types[$typeSchema]; - if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) { - var $schemaPath = it.schemaPath + '.type', - $errSchemaPath = it.errSchemaPath + '/type'; - var $schemaPath = it.schemaPath + '.type', - $errSchemaPath = it.errSchemaPath + '/type', - $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; - out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { '; - if ($coerceToTypes) { - var $dataType = 'dataType' + $lvl, - $coerced = 'coerced' + $lvl; - out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; '; - if (it.opts.coerceTypes == 'array') { - out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ')) ' + ($dataType) + ' = \'array\'; '; - } - out += ' var ' + ($coerced) + ' = undefined; '; - var $bracesCoercion = ''; - var arr1 = $coerceToTypes; - if (arr1) { - var $type, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $type = arr1[$i += 1]; - if ($i) { - out += ' if (' + ($coerced) + ' === undefined) { '; - $bracesCoercion += '}'; - } - if (it.opts.coerceTypes == 'array' && $type != 'array') { - out += ' if (' + ($dataType) + ' == \'array\' && ' + ($data) + '.length == 1) { ' + ($coerced) + ' = ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; } '; - } - if ($type == 'string') { - out += ' if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; - } else if ($type == 'number' || $type == 'integer') { - out += ' if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; - if ($type == 'integer') { - out += ' && !(' + ($data) + ' % 1)'; - } - out += ')) ' + ($coerced) + ' = +' + ($data) + '; '; - } else if ($type == 'boolean') { - out += ' if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; - } else if ($type == 'null') { - out += ' if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; - } else if (it.opts.coerceTypes == 'array' && $type == 'array') { - out += ' if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; - } - } - } - out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be '; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; - var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', - $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; - out += ' ' + ($data) + ' = ' + ($coerced) + '; '; - if (!$dataLvl) { - out += 'if (' + ($parentData) + ' !== undefined)'; - } - out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } '; - } else { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be '; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - } - out += ' } '; - } - } - if (it.schema.$ref && !$refKeywords) { - out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' '; - if ($breakOnError) { - out += ' } if (errors === '; - if ($top) { - out += '0'; - } else { - out += 'errs_' + ($lvl); - } - out += ') { '; - $closingBraces2 += '}'; - } - } else { - if (it.opts.v5 && it.schema.patternGroups) { - it.logger.warn('keyword "patternGroups" is deprecated and disabled. Use option patternGroups: true to enable.'); - } - var arr2 = it.RULES; - if (arr2) { - var $rulesGroup, i2 = -1, - l2 = arr2.length - 1; - while (i2 < l2) { - $rulesGroup = arr2[i2 += 1]; - if ($shouldUseGroup($rulesGroup)) { - if ($rulesGroup.type) { - out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data)) + ') { '; - } - if (it.opts.useDefaults && !it.compositeRule) { - if ($rulesGroup.type == 'object' && it.schema.properties) { - var $schema = it.schema.properties, - $schemaKeys = Object.keys($schema); - var arr3 = $schemaKeys; - if (arr3) { - var $propertyKey, i3 = -1, - l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $sch = $schema[$propertyKey]; - if ($sch.default !== undefined) { - var $passData = $data + it.util.getProperty($propertyKey); - out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = '; - if (it.opts.useDefaults == 'shared') { - out += ' ' + (it.useDefault($sch.default)) + ' '; - } else { - out += ' ' + (JSON.stringify($sch.default)) + ' '; - } - out += '; '; - } - } - } - } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) { - var arr4 = it.schema.items; - if (arr4) { - var $sch, $i = -1, - l4 = arr4.length - 1; - while ($i < l4) { - $sch = arr4[$i += 1]; - if ($sch.default !== undefined) { - var $passData = $data + '[' + $i + ']'; - out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = '; - if (it.opts.useDefaults == 'shared') { - out += ' ' + (it.useDefault($sch.default)) + ' '; - } else { - out += ' ' + (JSON.stringify($sch.default)) + ' '; - } - out += '; '; - } - } - } - } - } - var arr5 = $rulesGroup.rules; - if (arr5) { - var $rule, i5 = -1, - l5 = arr5.length - 1; - while (i5 < l5) { - $rule = arr5[i5 += 1]; - if ($shouldUseRule($rule)) { - var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); - if ($code) { - out += ' ' + ($code) + ' '; - if ($breakOnError) { - $closingBraces1 += '}'; - } - } - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces1) + ' '; - $closingBraces1 = ''; - } - if ($rulesGroup.type) { - out += ' } '; - if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { - out += ' else { '; - var $schemaPath = it.schemaPath + '.type', - $errSchemaPath = it.errSchemaPath + '/type'; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be '; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - } - } - if ($breakOnError) { - out += ' if (errors === '; - if ($top) { - out += '0'; - } else { - out += 'errs_' + ($lvl); - } - out += ') { '; - $closingBraces2 += '}'; - } - } - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces2) + ' '; - } - if ($top) { - if ($async) { - out += ' if (errors === 0) return data; '; - out += ' else throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; '; - out += ' return errors === 0; '; - } - out += ' }); return validate;'; - } else { - out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';'; - } - out = it.util.cleanUpCode(out); - if ($top) { - out = it.util.finalCleanUpCode(out, $async); - } - - function $shouldUseGroup($rulesGroup) { - var rules = $rulesGroup.rules; - for (var i = 0; i < rules.length; i++) - if ($shouldUseRule(rules[i])) return true; - } - - function $shouldUseRule($rule) { - return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule)); - } - - function $ruleImplementsSomeKeyword($rule) { - var impl = $rule.implements; - for (var i = 0; i < impl.length; i++) - if (it.schema[impl[i]] !== undefined) return true; - } - return out; -} - - -/***/ }), -/* 345 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__(509)().Promise - - -/***/ }), -/* 346 */ /***/ (function(module, exports) { // API @@ -72176,10 +71397,10 @@ function clean(key) /***/ }), -/* 347 */ +/* 341 */ /***/ (function(module, exports, __webpack_require__) { -var defer = __webpack_require__(518); +var defer = __webpack_require__(486); // API module.exports = async; @@ -72216,11 +71437,11 @@ function async(callback) /***/ }), -/* 348 */ +/* 342 */ /***/ (function(module, exports, __webpack_require__) { -var async = __webpack_require__(347) - , abort = __webpack_require__(346) +var async = __webpack_require__(341) + , abort = __webpack_require__(340) ; // API @@ -72297,7 +71518,7 @@ function runJob(iterator, key, item, callback) /***/ }), -/* 349 */ +/* 343 */ /***/ (function(module, exports) { // API @@ -72340,11 +71561,11 @@ function state(list, sortMethod) /***/ }), -/* 350 */ +/* 344 */ /***/ (function(module, exports, __webpack_require__) { -var abort = __webpack_require__(346) - , async = __webpack_require__(347) +var abort = __webpack_require__(340) + , async = __webpack_require__(341) ; // API @@ -72375,12 +71596,12 @@ function terminator(callback) /***/ }), -/* 351 */ +/* 345 */ /***/ (function(module, exports, __webpack_require__) { -var iterate = __webpack_require__(348) - , initState = __webpack_require__(349) - , terminator = __webpack_require__(350) +var iterate = __webpack_require__(342) + , initState = __webpack_require__(343) + , terminator = __webpack_require__(344) ; // Public API @@ -72456,7 +71677,7 @@ function descending(a, b) /***/ }), -/* 352 */ +/* 346 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -72471,7 +71692,7 @@ exports.default = { }; /***/ }), -/* 353 */ +/* 347 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -72539,19 +71760,19 @@ exports.hasWrapper = hasWrapper; var _promise; function _load_promise() { - return _promise = __webpack_require__(50); + return _promise = __webpack_require__(51); } var _hoistedTreeBuilder; function _load_hoistedTreeBuilder() { - return _hoistedTreeBuilder = __webpack_require__(554); + return _hoistedTreeBuilder = __webpack_require__(522); } var _getTransitiveDevDependencies; function _load_getTransitiveDevDependencies() { - return _getTransitiveDevDependencies = __webpack_require__(580); + return _getTransitiveDevDependencies = __webpack_require__(548); } var _install; @@ -72574,7 +71795,7 @@ function _load_constants() { function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const zlib = __webpack_require__(198); +const zlib = __webpack_require__(199); const gzip = (0, (_promise || _load_promise()).promisify)(zlib.gzip); @@ -72788,7 +72009,7 @@ class Audit { exports.default = Audit; /***/ }), -/* 354 */ +/* 348 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -73024,13 +72245,13 @@ exports.hasWrapper = hasWrapper; var _index; function _load_index() { - return _index = __webpack_require__(57); + return _index = __webpack_require__(58); } var _filter; function _load_filter() { - return _filter = __webpack_require__(372); + return _filter = __webpack_require__(366); } var _constants; @@ -73042,7 +72263,7 @@ function _load_constants() { var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(4)); + return _fs = _interopRequireWildcard(__webpack_require__(5)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -73115,7 +72336,7 @@ function hasWrapper(commander) { } /***/ }), -/* 355 */ +/* 349 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -73315,7 +72536,7 @@ function _load_buildSubCommands() { var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(4)); + return _fs = _interopRequireWildcard(__webpack_require__(5)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -73324,7 +72545,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de const invariant = __webpack_require__(9); const path = __webpack_require__(0); -const micromatch = __webpack_require__(114); +const micromatch = __webpack_require__(115); function hasWrapper(flags, args) { return args[0] !== 'dir'; @@ -73363,7 +72584,7 @@ function setFlags(commander) { } /***/ }), -/* 356 */ +/* 350 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -73832,13 +73053,13 @@ function _load_errors() { var _integrityChecker; function _load_integrityChecker() { - return _integrityChecker = _interopRequireDefault(__webpack_require__(208)); + return _integrityChecker = _interopRequireDefault(__webpack_require__(206)); } var _integrityChecker2; function _load_integrityChecker2() { - return _integrityChecker2 = __webpack_require__(208); + return _integrityChecker2 = __webpack_require__(206); } var _lockfile; @@ -73850,7 +73071,7 @@ function _load_lockfile() { var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(4)); + return _fs = _interopRequireWildcard(__webpack_require__(5)); } var _install; @@ -73869,7 +73090,7 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const semver = __webpack_require__(21); +const semver = __webpack_require__(22); const path = __webpack_require__(0); const requireLockfile = exports.requireLockfile = false; @@ -73886,7 +73107,7 @@ function setFlags(commander) { } /***/ }), -/* 357 */ +/* 351 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74015,7 +73236,7 @@ function _load_errors() { var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(4)); + return _fs = _interopRequireWildcard(__webpack_require__(5)); } var _global; @@ -74030,7 +73251,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de const invariant = __webpack_require__(9); -const cmdShim = __webpack_require__(201); +const cmdShim = __webpack_require__(202); const path = __webpack_require__(0); function hasWrapper(commander, args) { @@ -74042,7 +73263,7 @@ function setFlags(commander) { } /***/ }), -/* 358 */ +/* 352 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74315,7 +73536,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de const invariant = __webpack_require__(9); -const micromatch = __webpack_require__(114); +const micromatch = __webpack_require__(115); const requireLockfile = exports.requireLockfile = true; @@ -74392,7 +73613,7 @@ function getDevDeps(manifest) { } /***/ }), -/* 359 */ +/* 353 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74406,7 +73627,7 @@ exports.run = exports.requireLockfile = undefined; var _extends2; function _load_extends() { - return _extends2 = _interopRequireDefault(__webpack_require__(22)); + return _extends2 = _interopRequireDefault(__webpack_require__(20)); } var _asyncToGenerator2; @@ -74559,7 +73780,7 @@ function _load_lockfile() { var _index; function _load_index() { - return _index = __webpack_require__(57); + return _index = __webpack_require__(58); } var _install; @@ -74577,13 +73798,13 @@ function _load_errors() { var _index2; function _load_index2() { - return _index2 = __webpack_require__(200); + return _index2 = __webpack_require__(201); } var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(4)); + return _fs = _interopRequireWildcard(__webpack_require__(5)); } var _constants; @@ -74613,7 +73834,7 @@ function hasWrapper(commander, args) { } /***/ }), -/* 360 */ +/* 354 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74650,6 +73871,7 @@ let getBinEntries = exports.getBinEntries = (() => { const registryFolder = _ref4; + binFolders.add(path.resolve(config.cwd, registryFolder, '.bin')); binFolders.add(path.resolve(config.lockfileFolder, registryFolder, '.bin')); } @@ -74797,7 +74019,20 @@ let run = exports.run = (() => { } else { let suggestion; - for (const commandName in scripts) { + for (var _iterator9 = scripts.keys(), _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : _iterator9[Symbol.iterator]();;) { + var _ref16; + + if (_isArray9) { + if (_i9 >= _iterator9.length) break; + _ref16 = _iterator9[_i9++]; + } else { + _i9 = _iterator9.next(); + if (_i9.done) break; + _ref16 = _i9.value; + } + + const commandName = _ref16; + const steps = leven(commandName, action); if (steps < 2) { suggestion = commandName; @@ -74882,19 +74117,19 @@ let run = exports.run = (() => { const printedCommands = new Map(); - for (var _iterator9 = pkgCommands, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : _iterator9[Symbol.iterator]();;) { - var _ref16; + for (var _iterator10 = pkgCommands, _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : _iterator10[Symbol.iterator]();;) { + var _ref17; - if (_isArray9) { - if (_i9 >= _iterator9.length) break; - _ref16 = _iterator9[_i9++]; + if (_isArray10) { + if (_i10 >= _iterator10.length) break; + _ref17 = _iterator10[_i10++]; } else { - _i9 = _iterator9.next(); - if (_i9.done) break; - _ref16 = _i9.value; + _i10 = _iterator10.next(); + if (_i10.done) break; + _ref17 = _i10.value; } - const pkgCommand = _ref16; + const pkgCommand = _ref17; const action = scripts.get(pkgCommand); invariant(action, 'Action must exists'); @@ -74937,13 +74172,13 @@ function _load_executeLifecycleScript() { var _dynamicRequire; function _load_dynamicRequire() { - return _dynamicRequire = __webpack_require__(371); + return _dynamicRequire = __webpack_require__(365); } var _hooks; function _load_hooks() { - return _hooks = __webpack_require__(374); + return _hooks = __webpack_require__(368); } var _errors; @@ -74955,13 +74190,13 @@ function _load_errors() { var _packageCompatibility; function _load_packageCompatibility() { - return _packageCompatibility = __webpack_require__(209); + return _packageCompatibility = __webpack_require__(207); } var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(4)); + return _fs = _interopRequireWildcard(__webpack_require__(5)); } var _constants; @@ -75020,7 +74255,7 @@ function hasWrapper(commander, args) { } /***/ }), -/* 361 */ +/* 355 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -75251,7 +74486,7 @@ exports.hasWrapper = hasWrapper; exports.examples = examples; /***/ }), -/* 362 */ +/* 356 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -75265,7 +74500,7 @@ exports.run = exports.requireLockfile = undefined; var _extends2; function _load_extends() { - return _extends2 = _interopRequireDefault(__webpack_require__(22)); + return _extends2 = _interopRequireDefault(__webpack_require__(20)); } var _asyncToGenerator2; @@ -75500,19 +74735,19 @@ function _load_add() { var _upgrade; function _load_upgrade() { - return _upgrade = __webpack_require__(207); + return _upgrade = __webpack_require__(205); } var _colorForVersions; function _load_colorForVersions() { - return _colorForVersions = _interopRequireDefault(__webpack_require__(369)); + return _colorForVersions = _interopRequireDefault(__webpack_require__(363)); } var _colorizeDiff; function _load_colorizeDiff() { - return _colorizeDiff = _interopRequireDefault(__webpack_require__(370)); + return _colorizeDiff = _interopRequireDefault(__webpack_require__(364)); } var _install; @@ -75542,7 +74777,7 @@ function hasWrapper(commander, args) { } /***/ }), -/* 363 */ +/* 357 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -75762,7 +74997,7 @@ exports.hasWrapper = hasWrapper; var _index; function _load_index() { - return _index = __webpack_require__(57); + return _index = __webpack_require__(58); } var _executeLifecycleScript; @@ -75780,13 +75015,13 @@ function _load_errors() { var _gitSpawn; function _load_gitSpawn() { - return _gitSpawn = __webpack_require__(373); + return _gitSpawn = __webpack_require__(367); } var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(4)); + return _fs = _interopRequireWildcard(__webpack_require__(5)); } var _map; @@ -75800,7 +75035,7 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } const invariant = __webpack_require__(9); -const semver = __webpack_require__(21); +const semver = __webpack_require__(22); const path = __webpack_require__(0); const NEW_VERSION_FLAG = '--new-version [version]'; @@ -75829,7 +75064,7 @@ function hasWrapper(commander, args) { } /***/ }), -/* 364 */ +/* 358 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -75843,7 +75078,7 @@ exports.LocalTarballFetcher = undefined; var _extends2; function _load_extends() { - return _extends2 = _interopRequireDefault(__webpack_require__(22)); + return _extends2 = _interopRequireDefault(__webpack_require__(20)); } var _asyncToGenerator2; @@ -75873,7 +75108,7 @@ function _load_baseFetcher() { var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(4)); + return _fs = _interopRequireWildcard(__webpack_require__(5)); } var _misc; @@ -75892,15 +75127,15 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const crypto = __webpack_require__(12); +const crypto = __webpack_require__(11); const path = __webpack_require__(0); -const tarFs = __webpack_require__(193); +const tarFs = __webpack_require__(194); const url = __webpack_require__(24); -const fs = __webpack_require__(5); +const fs = __webpack_require__(4); const stream = __webpack_require__(23); -const gunzip = __webpack_require__(656); +const gunzip = __webpack_require__(624); const invariant = __webpack_require__(9); -const ssri = __webpack_require__(77); +const ssri = __webpack_require__(65); const RE_URL_NAME_MATCH = /\/(?:(@[^/]+)(?:\/|%2f))?[^/]+\/(?:-|_attachments)\/(?:@[^/]+\/)?([^/]+)$/; @@ -75981,11 +75216,12 @@ class TarballFetcher extends (_baseFetcher || _load_baseFetcher()).default { } createExtractor(resolve, reject, tarballPath) { - const integrityInfo = this._supportedIntegrity(); + const hashInfo = this._supportedIntegrity({ hashOnly: true }); + const integrityInfo = this._supportedIntegrity({ hashOnly: false }); const now = new Date(); - const fs = __webpack_require__(5); + const fs = __webpack_require__(4); const patchedFs = Object.assign({}, fs, { utimes: (path, atime, mtime, cb) => { fs.stat(path, (err, stat) => { @@ -76014,7 +75250,9 @@ class TarballFetcher extends (_baseFetcher || _load_baseFetcher()).default { } }); - const validateStream = new ssri.integrityStream(integrityInfo); + const hashValidateStream = new ssri.integrityStream(hashInfo); + const integrityValidateStream = new ssri.integrityStream(integrityInfo); + const untarStream = tarFs.extract(this.dest, { strip: 1, dmode: 0o755, // all dirs should be readable @@ -76022,16 +75260,24 @@ class TarballFetcher extends (_baseFetcher || _load_baseFetcher()).default { chown: false, // don't chown. just leave as it is map: header => { header.mtime = now; + if (header.linkname) { + const basePath = path.posix.dirname(path.join('/', header.name)); + const jailPath = path.posix.join(basePath, header.linkname); + header.linkname = path.posix.relative('/', jailPath); + } return header; }, fs: patchedFs }); const extractorStream = gunzip(); - validateStream.once('error', err => { + hashValidateStream.once('error', err => { this.validateError = err; }); - validateStream.once('integrity', sri => { + integrityValidateStream.once('error', err => { + this.validateError = err; + }); + integrityValidateStream.once('integrity', sri => { this.validateIntegrity = sri; }); @@ -76044,9 +75290,11 @@ class TarballFetcher extends (_baseFetcher || _load_baseFetcher()).default { const hexDigest = this.validateIntegrity ? this.validateIntegrity.hexDigest() : ''; if (this.config.updateChecksums && this.remote.integrity && this.validateIntegrity && this.remote.integrity !== this.validateIntegrity.toString()) { this.remote.integrity = this.validateIntegrity.toString(); + } else if (this.validateIntegrity) { + this.remote.cacheIntegrity = this.validateIntegrity.toString(); } - if (integrityInfo.algorithms.length === 0) { + if (integrityInfo.integrity && Object.keys(integrityInfo.integrity).length === 0) { return reject(new (_errors || _load_errors()).SecurityError(this.config.reporter.lang('fetchBadIntegrityAlgorithm', this.packageName, this.remote.reference))); } @@ -76063,7 +75311,7 @@ class TarballFetcher extends (_baseFetcher || _load_baseFetcher()).default { }); }); - return { validateStream, extractorStream }; + return { hashValidateStream, integrityValidateStream, extractorStream }; } getLocalPaths(override) { @@ -76090,11 +75338,15 @@ class TarballFetcher extends (_baseFetcher || _load_baseFetcher()).default { var _createExtractor = _this2.createExtractor(resolve, reject, tarballPath); - const validateStream = _createExtractor.validateStream, + const hashValidateStream = _createExtractor.hashValidateStream, + integrityValidateStream = _createExtractor.integrityValidateStream, extractorStream = _createExtractor.extractorStream; - stream.pipe(validateStream).pipe(extractorStream).on('error', function (err) { + stream.pipe(hashValidateStream); + hashValidateStream.pipe(integrityValidateStream); + + integrityValidateStream.pipe(extractorStream).on('error', function (err) { reject(new (_errors || _load_errors()).MessageError(_this2.config.reporter.lang('fetchErrorCorrupt', err.message, tarballPath))); }); }); @@ -76121,21 +75373,23 @@ class TarballFetcher extends (_baseFetcher || _load_baseFetcher()).default { var _createExtractor2 = _this3.createExtractor(resolve, reject); - const validateStream = _createExtractor2.validateStream, + const hashValidateStream = _createExtractor2.hashValidateStream, + integrityValidateStream = _createExtractor2.integrityValidateStream, extractorStream = _createExtractor2.extractorStream; - req.pipe(validateStream); + req.pipe(hashValidateStream); + hashValidateStream.pipe(integrityValidateStream); if (tarballMirrorPath) { - validateStream.pipe(fs.createWriteStream(tarballMirrorPath)).on('error', reject); + integrityValidateStream.pipe(fs.createWriteStream(tarballMirrorPath)).on('error', reject); } if (tarballCachePath) { - validateStream.pipe(fs.createWriteStream(tarballCachePath)).on('error', reject); + integrityValidateStream.pipe(fs.createWriteStream(tarballCachePath)).on('error', reject); } - validateStream.pipe(extractorStream).on('error', reject); + integrityValidateStream.pipe(extractorStream).on('error', reject); } }, _this3.packageName); } catch (err) { @@ -76188,8 +75442,8 @@ class TarballFetcher extends (_baseFetcher || _load_baseFetcher()).default { return this.fetchFromLocal().catch(err => this.fetchFromExternal()); } - _findIntegrity() { - if (this.remote.integrity) { + _findIntegrity({ hashOnly }) { + if (this.remote.integrity && !hashOnly) { return ssri.parse(this.remote.integrity); } if (this.hash) { @@ -76198,18 +75452,18 @@ class TarballFetcher extends (_baseFetcher || _load_baseFetcher()).default { return null; } - _supportedIntegrity() { - const expectedIntegrity = this._findIntegrity() || {}; + _supportedIntegrity({ hashOnly }) { + const expectedIntegrity = this._findIntegrity({ hashOnly }) || {}; const expectedIntegrityAlgorithms = Object.keys(expectedIntegrity); const shouldValidateIntegrity = (this.hash || this.remote.integrity) && !this.config.updateChecksums; - if (expectedIntegrityAlgorithms.length === 0 && !shouldValidateIntegrity) { + if (expectedIntegrityAlgorithms.length === 0 && (!shouldValidateIntegrity || hashOnly)) { const algorithms = this.config.updateChecksums ? ['sha512'] : ['sha1']; // for consistency, return sha1 for packages without a remote integrity (eg. github) return { integrity: null, algorithms }; } - const algorithms = new Set(); + const algorithms = new Set(['sha512', 'sha1']); const integrity = {}; for (var _iterator = expectedIntegrityAlgorithms, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { var _ref; @@ -76254,7 +75508,7 @@ function urlParts(requestUrl) { } /***/ }), -/* 365 */ +/* 359 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -76394,7 +75648,7 @@ class PackageReference { exports.default = PackageReference; /***/ }), -/* 366 */ +/* 360 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -76431,7 +75685,7 @@ function _load_normalizePattern() { var _requestManager; function _load_requestManager() { - return _requestManager = _interopRequireDefault(__webpack_require__(378)); + return _requestManager = _interopRequireDefault(__webpack_require__(372)); } var _blockingQueue; @@ -76461,20 +75715,20 @@ function _load_workspaceLayout() { var _resolutionMap; function _load_resolutionMap() { - return _resolutionMap = _interopRequireDefault(__webpack_require__(214)); + return _resolutionMap = _interopRequireDefault(__webpack_require__(212)); } var _resolutionMap2; function _load_resolutionMap2() { - return _resolutionMap2 = __webpack_require__(214); + return _resolutionMap2 = __webpack_require__(212); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } const invariant = __webpack_require__(9); -const semver = __webpack_require__(21); +const semver = __webpack_require__(22); class PackageResolver { constructor(config, lockfile, resolutionMap = new (_resolutionMap || _load_resolutionMap()).default(config)) { @@ -77328,7 +76582,7 @@ class PackageResolver { exports.default = PackageResolver; /***/ }), -/* 367 */ +/* 361 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -77387,7 +76641,7 @@ GitHubResolver.protocol = 'github'; GitHubResolver.hostname = 'github.com'; /***/ }), -/* 368 */ +/* 362 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -77419,7 +76673,7 @@ function _load_misc() { var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(4)); + return _fs = _interopRequireWildcard(__webpack_require__(5)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -77467,7 +76721,7 @@ exports.default = LinkResolver; LinkResolver.protocol = 'link'; /***/ }), -/* 369 */ +/* 363 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -77490,13 +76744,13 @@ exports.default = function (from, to) { var _semver; function _load_semver() { - return _semver = _interopRequireDefault(__webpack_require__(21)); + return _semver = _interopRequireDefault(__webpack_require__(22)); } var _semver2; function _load_semver2() { - return _semver2 = __webpack_require__(224); + return _semver2 = __webpack_require__(170); } var _constants; @@ -77508,7 +76762,7 @@ function _load_constants() { function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /***/ }), -/* 370 */ +/* 364 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -77532,7 +76786,7 @@ exports.default = function (from, to, reporter) { }; /***/ }), -/* 371 */ +/* 365 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -77542,7 +76796,7 @@ exports.default = function (from, to, reporter) { exports.dynamicRequire = true ? require : require; // eslint-disable-line /***/ }), -/* 372 */ +/* 366 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -77562,7 +76816,7 @@ function _load_misc() { return _misc = __webpack_require__(18); } -const mm = __webpack_require__(114); +const mm = __webpack_require__(115); const path = __webpack_require__(0); const WHITESPACE_RE = /^\s+$/; @@ -77784,7 +77038,7 @@ function filterOverridenGitignores(files) { } /***/ }), -/* 373 */ +/* 367 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -77798,7 +77052,7 @@ exports.spawn = undefined; var _extends2; function _load_extends() { - return _extends2 = _interopRequireDefault(__webpack_require__(22)); + return _extends2 = _interopRequireDefault(__webpack_require__(20)); } var _path; @@ -77810,7 +77064,7 @@ function _load_path() { var _child; function _load_child() { - return _child = _interopRequireWildcard(__webpack_require__(58)); + return _child = _interopRequireWildcard(__webpack_require__(50)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -77842,7 +77096,7 @@ const spawn = exports.spawn = (args, opts = {}) => { }; /***/ }), -/* 374 */ +/* 368 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -77875,7 +77129,7 @@ function callThroughHook(type, fn, context) { } /***/ }), -/* 375 */ +/* 369 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -77903,7 +77157,7 @@ exports.default = key => { }; /***/ }), -/* 376 */ +/* 370 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -77930,7 +77184,7 @@ function isValidPackagePath(input) { } /***/ }), -/* 377 */ +/* 371 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -77948,7 +77202,7 @@ function _load_path() { return _path = __webpack_require__(0); } -const userHome = __webpack_require__(66).default; +const userHome = __webpack_require__(67).default; function getPosixPath(path) { return path.replace(/\\/g, '/'); @@ -77964,7 +77218,7 @@ function resolveWithHome(path) { } /***/ }), -/* 378 */ +/* 372 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -77977,7 +77231,7 @@ Object.defineProperty(exports, "__esModule", { var _fs; function _load_fs() { - return _fs = _interopRequireDefault(__webpack_require__(5)); + return _fs = _interopRequireDefault(__webpack_require__(4)); } var _http; @@ -77995,7 +77249,7 @@ function _load_url() { var _dnscache; function _load_dnscache() { - return _dnscache = _interopRequireDefault(__webpack_require__(637)); + return _dnscache = _interopRequireDefault(__webpack_require__(605)); } var _invariant; @@ -78344,6 +77598,11 @@ class RequestManager { rejectNext(err); }; + const rejectWithoutUrl = function rejectWithoutUrl(err) { + err.message = err.message; + rejectNext(err); + }; + const queueForRetry = reason => { const attempts = params.retryAttempts || 0; if (attempts >= this.maxRetryAttempts - 1) { @@ -78399,11 +77658,15 @@ class RequestManager { } } + if (res.statusCode === 401 && res.caseless && res.caseless.get('server') === 'GitHub.com') { + const message = `${res.body.message}. If using GITHUB_TOKEN in your env, check that it is valid.`; + rejectWithoutUrl(new Error(this.reporter.lang('unauthorizedResponse', res.caseless.get('server'), message))); + } + if (res.statusCode === 401 && res.headers['www-authenticate']) { const authMethods = res.headers['www-authenticate'].split(/,\s*/).map(s => s.toLowerCase()); - if (authMethods.indexOf('otp') !== -1) { - reject(new (_errors || _load_errors()).OneTimePasswordError()); + reject(new (_errors || _load_errors()).OneTimePasswordError(res.headers['npm-notice'])); return; } } @@ -78515,13 +77778,13 @@ class RequestManager { exports.default = RequestManager; /***/ }), -/* 379 */ +/* 373 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var crypto_hash_sha512 = __webpack_require__(75).lowlevel.crypto_hash; +var crypto_hash_sha512 = __webpack_require__(76).lowlevel.crypto_hash; /* * This file is a 1:1 port from the OpenBSD blowfish.c and bcrypt_pbkdf.c. As a @@ -79078,11 +78341,11 @@ module.exports = { /***/ }), -/* 380 */ +/* 374 */ /***/ (function(module, exports, __webpack_require__) { -var bufferFill = __webpack_require__(594) -var allocUnsafe = __webpack_require__(593) +var bufferFill = __webpack_require__(562) +var allocUnsafe = __webpack_require__(561) module.exports = function alloc (size, fill, encoding) { if (typeof size !== 'number') { @@ -79116,7 +78379,7 @@ module.exports = function alloc (size, fill, encoding) { /***/ }), -/* 381 */ +/* 375 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79162,7 +78425,7 @@ exports.toggle = (force, stream) => { /***/ }), -/* 382 */ +/* 376 */ /***/ (function(module, exports, __webpack_require__) { var objectAssign = __webpack_require__(303); @@ -79472,7 +78735,7 @@ module.exports = { /***/ }), -/* 383 */ +/* 377 */ /***/ (function(module, exports) { @@ -79715,11 +78978,11 @@ function isObject(val) { /***/ }), -/* 384 */ +/* 378 */ /***/ (function(module, exports, __webpack_require__) { /* MIT license */ -var cssKeywords = __webpack_require__(610); +var cssKeywords = __webpack_require__(578); // NOTE: conversions should only return primitive values (i.e. arrays, or // values that give correct `typeof` results). @@ -80589,13 +79852,13 @@ convert.rgb.gray = function (rgb) { /***/ }), -/* 385 */ +/* 379 */ /***/ (function(module, exports, __webpack_require__) { var util = __webpack_require__(3); var Stream = __webpack_require__(23).Stream; -var DelayedStream = __webpack_require__(634); -var defer = __webpack_require__(622); +var DelayedStream = __webpack_require__(602); +var defer = __webpack_require__(590); module.exports = CombinedStream; function CombinedStream() { @@ -80784,11 +80047,11 @@ CombinedStream.prototype._emitError = function(err) { /***/ }), -/* 386 */ +/* 380 */ /***/ (function(module, exports, __webpack_require__) { var stream = __webpack_require__(102) -var eos = __webpack_require__(173) +var eos = __webpack_require__(174) var inherits = __webpack_require__(61) var shift = __webpack_require__(942) @@ -81025,14 +80288,14 @@ module.exports = Duplexify /***/ }), -/* 387 */ +/* 381 */ /***/ (function(module, exports, __webpack_require__) { -var crypto = __webpack_require__(12); +var crypto = __webpack_require__(11); var BigInteger = __webpack_require__(81).BigInteger; var ECPointFp = __webpack_require__(139).ECPointFp; var Buffer = __webpack_require__(15).Buffer; -exports.ECCurves = __webpack_require__(638); +exports.ECCurves = __webpack_require__(606); // zero prepad function unstupid(hex,len) @@ -81089,7 +80352,7 @@ exports.ECKey = function(curve, key, isPublic) /***/ }), -/* 388 */ +/* 382 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -81107,7 +80370,7 @@ module.exports = function (str) { /***/ }), -/* 389 */ +/* 383 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -81173,13 +80436,13 @@ module.exports = function (data, opts) { /***/ }), -/* 390 */ +/* 384 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var fs = __webpack_require__(5) +var fs = __webpack_require__(4) module.exports = clone(fs) @@ -81201,12 +80464,12 @@ function clone (obj) { /***/ }), -/* 391 */ +/* 385 */ /***/ (function(module, exports, __webpack_require__) { -var fs = __webpack_require__(5) -var polyfills = __webpack_require__(655) -var legacy = __webpack_require__(654) +var fs = __webpack_require__(4) +var polyfills = __webpack_require__(623) +var legacy = __webpack_require__(622) var queue = [] var util = __webpack_require__(3) @@ -81230,7 +80493,7 @@ if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { }) } -module.exports = patch(__webpack_require__(390)) +module.exports = patch(__webpack_require__(384)) if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH) { module.exports = patch(fs) } @@ -81468,6 +80731,897 @@ function retry () { } +/***/ }), +/* 386 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var util = __webpack_require__(114); + +module.exports = SchemaObject; + +function SchemaObject(obj) { + util.copy(obj, this); +} + + +/***/ }), +/* 387 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function generate__limit(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $isMax = $keyword == 'maximum', + $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum', + $schemaExcl = it.schema[$exclusiveKeyword], + $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data, + $op = $isMax ? '<' : '>', + $notOp = $isMax ? '>' : '<', + $errorKeyword = undefined; + if ($isDataExcl) { + var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), + $exclusive = 'exclusive' + $lvl, + $exclType = 'exclType' + $lvl, + $exclIsNumber = 'exclIsNumber' + $lvl, + $opExpr = 'op' + $lvl, + $opStr = '\' + ' + $opExpr + ' + \''; + out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; + $schemaValueExcl = 'schemaExcl' + $lvl; + out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { '; + var $errorKeyword = $exclusiveKeyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';'; + } else { + var $exclIsNumber = typeof $schemaExcl == 'number', + $opStr = $op; + if ($exclIsNumber && $isData) { + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { '; + } else { + if ($exclIsNumber && $schema === undefined) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaExcl; + $notOp += '='; + } else { + if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); + if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $notOp += '='; + } else { + $exclusive = false; + $opStr += '='; + } + } + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { '; + } + } + $errorKeyword = $errorKeyword || $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be ' + ($opStr) + ' '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), +/* 388 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function generate__limitItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxItems' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxItems') { + out += 'more'; + } else { + out += 'less'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), +/* 389 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function generate__limitLength(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxLength' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + if (it.opts.unicode === false) { + out += ' ' + ($data) + '.length '; + } else { + out += ' ucs2length(' + ($data) + ') '; + } + out += ' ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be '; + if ($keyword == 'maxLength') { + out += 'longer'; + } else { + out += 'shorter'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' characters\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), +/* 390 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function generate__limitProperties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxProperties' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxProperties') { + out += 'more'; + } else { + out += 'less'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' properties\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), +/* 391 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function generate_validate(it, $keyword, $ruleType) { + var out = ''; + var $async = it.schema.$async === true, + $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'), + $id = it.self._getId(it.schema); + if (it.isTop) { + if ($async) { + it.async = true; + var $es7 = it.opts.async == 'es7'; + it.yieldAwait = $es7 ? 'await' : 'yield'; + } + out += ' var validate = '; + if ($async) { + if ($es7) { + out += ' (async function '; + } else { + if (it.opts.async != '*') { + out += 'co.wrap'; + } + out += '(function* '; + } + } else { + out += ' (function '; + } + out += ' (data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; '; + if ($id && (it.opts.sourceCode || it.opts.processCode)) { + out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' '; + } + } + if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) { + var $keyword = 'false schema'; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + if (it.schema === false) { + if (it.isTop) { + $breakOnError = true; + } else { + out += ' var ' + ($valid) + ' = false; '; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'boolean schema is false\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } else { + if (it.isTop) { + if ($async) { + out += ' return data; '; + } else { + out += ' validate.errors = null; return true; '; + } + } else { + out += ' var ' + ($valid) + ' = true; '; + } + } + if (it.isTop) { + out += ' }); return validate; '; + } + return out; + } + if (it.isTop) { + var $top = it.isTop, + $lvl = it.level = 0, + $dataLvl = it.dataLevel = 0, + $data = 'data'; + it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); + it.baseId = it.baseId || it.rootId; + delete it.isTop; + it.dataPathArr = [undefined]; + out += ' var vErrors = null; '; + out += ' var errors = 0; '; + out += ' if (rootData === undefined) rootData = data; '; + } else { + var $lvl = it.level, + $dataLvl = it.dataLevel, + $data = 'data' + ($dataLvl || ''); + if ($id) it.baseId = it.resolve.url(it.baseId, $id); + if ($async && !it.async) throw new Error('async schema in sync schema'); + out += ' var errs_' + ($lvl) + ' = errors;'; + } + var $valid = 'valid' + $lvl, + $breakOnError = !it.opts.allErrors, + $closingBraces1 = '', + $closingBraces2 = ''; + var $errorKeyword; + var $typeSchema = it.schema.type, + $typeIsArray = Array.isArray($typeSchema); + if ($typeIsArray && $typeSchema.length == 1) { + $typeSchema = $typeSchema[0]; + $typeIsArray = false; + } + if (it.schema.$ref && $refKeywords) { + if (it.opts.extendRefs == 'fail') { + throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); + } else if (it.opts.extendRefs !== true) { + $refKeywords = false; + it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); + } + } + if ($typeSchema) { + if (it.opts.coerceTypes) { + var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); + } + var $rulesGroup = it.RULES.types[$typeSchema]; + if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) { + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type', + $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; + out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { '; + if ($coerceToTypes) { + var $dataType = 'dataType' + $lvl, + $coerced = 'coerced' + $lvl; + out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; '; + if (it.opts.coerceTypes == 'array') { + out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ')) ' + ($dataType) + ' = \'array\'; '; + } + out += ' var ' + ($coerced) + ' = undefined; '; + var $bracesCoercion = ''; + var arr1 = $coerceToTypes; + if (arr1) { + var $type, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $type = arr1[$i += 1]; + if ($i) { + out += ' if (' + ($coerced) + ' === undefined) { '; + $bracesCoercion += '}'; + } + if (it.opts.coerceTypes == 'array' && $type != 'array') { + out += ' if (' + ($dataType) + ' == \'array\' && ' + ($data) + '.length == 1) { ' + ($coerced) + ' = ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; } '; + } + if ($type == 'string') { + out += ' if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; + } else if ($type == 'number' || $type == 'integer') { + out += ' if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; + if ($type == 'integer') { + out += ' && !(' + ($data) + ' % 1)'; + } + out += ')) ' + ($coerced) + ' = +' + ($data) + '; '; + } else if ($type == 'boolean') { + out += ' if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; + } else if ($type == 'null') { + out += ' if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; + } else if (it.opts.coerceTypes == 'array' && $type == 'array') { + out += ' if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; + } + } + } + out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' ' + ($data) + ' = ' + ($coerced) + '; '; + if (!$dataLvl) { + out += 'if (' + ($parentData) + ' !== undefined)'; + } + out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } '; + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } + out += ' } '; + } + } + if (it.schema.$ref && !$refKeywords) { + out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' '; + if ($breakOnError) { + out += ' } if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } else { + if (it.opts.v5 && it.schema.patternGroups) { + it.logger.warn('keyword "patternGroups" is deprecated and disabled. Use option patternGroups: true to enable.'); + } + var arr2 = it.RULES; + if (arr2) { + var $rulesGroup, i2 = -1, + l2 = arr2.length - 1; + while (i2 < l2) { + $rulesGroup = arr2[i2 += 1]; + if ($shouldUseGroup($rulesGroup)) { + if ($rulesGroup.type) { + out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data)) + ') { '; + } + if (it.opts.useDefaults && !it.compositeRule) { + if ($rulesGroup.type == 'object' && it.schema.properties) { + var $schema = it.schema.properties, + $schemaKeys = Object.keys($schema); + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if ($sch.default !== undefined) { + var $passData = $data + it.util.getProperty($propertyKey); + out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) { + var arr4 = it.schema.items; + if (arr4) { + var $sch, $i = -1, + l4 = arr4.length - 1; + while ($i < l4) { + $sch = arr4[$i += 1]; + if ($sch.default !== undefined) { + var $passData = $data + '[' + $i + ']'; + out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } + } + var arr5 = $rulesGroup.rules; + if (arr5) { + var $rule, i5 = -1, + l5 = arr5.length - 1; + while (i5 < l5) { + $rule = arr5[i5 += 1]; + if ($shouldUseRule($rule)) { + var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); + if ($code) { + out += ' ' + ($code) + ' '; + if ($breakOnError) { + $closingBraces1 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces1) + ' '; + $closingBraces1 = ''; + } + if ($rulesGroup.type) { + out += ' } '; + if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { + out += ' else { '; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + } + } + if ($breakOnError) { + out += ' if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces2) + ' '; + } + if ($top) { + if ($async) { + out += ' if (errors === 0) return data; '; + out += ' else throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; '; + out += ' return errors === 0; '; + } + out += ' }); return validate;'; + } else { + out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';'; + } + out = it.util.cleanUpCode(out); + if ($top) { + out = it.util.finalCleanUpCode(out, $async); + } + + function $shouldUseGroup($rulesGroup) { + var rules = $rulesGroup.rules; + for (var i = 0; i < rules.length; i++) + if ($shouldUseRule(rules[i])) return true; + } + + function $shouldUseRule($rule) { + return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule)); + } + + function $ruleImplementsSomeKeyword($rule) { + var impl = $rule.implements; + for (var i = 0; i < impl.length; i++) + if (it.schema[impl[i]] !== undefined) return true; + } + return out; +} + + /***/ }), /* 392 */ /***/ (function(module, exports, __webpack_require__) { @@ -81593,7 +81747,7 @@ module.exports = InputPrompt; var _ = __webpack_require__(38); var MuteStream = __webpack_require__(401); -var readline = __webpack_require__(197); +var readline = __webpack_require__(198); /** * Base interface class other can inherits from @@ -81680,7 +81834,7 @@ module.exports = UI; "use strict"; -var ansiEscapes = __webpack_require__(504); +var ansiEscapes = __webpack_require__(472); /** * Move cursor left by `x` @@ -81751,7 +81905,7 @@ module.exports = [["a140","",62],["a180","",32],["a240","",62],["a280", "use strict"; -module.exports = __webpack_require__(601).isCI +module.exports = __webpack_require__(569).isCI /***/ }), @@ -82607,7 +82761,7 @@ module.exports = { /**/ -var pna = __webpack_require__(180); +var pna = __webpack_require__(181); /**/ module.exports = Readable; @@ -82623,7 +82777,7 @@ var Duplex; Readable.ReadableState = ReadableState; /**/ -var EE = __webpack_require__(76).EventEmitter; +var EE = __webpack_require__(77).EventEmitter; var EElistenerCount = function (emitter, type) { return emitter.listeners(type).length; @@ -82683,7 +82837,7 @@ function prependListener(emitter, event, fn) { } function ReadableState(options, stream) { - Duplex = Duplex || __webpack_require__(115); + Duplex = Duplex || __webpack_require__(116); options = options || {}; @@ -82760,7 +82914,7 @@ function ReadableState(options, stream) { } function Readable(options) { - Duplex = Duplex || __webpack_require__(115); + Duplex = Duplex || __webpack_require__(116); if (!(this instanceof Readable)) return new Readable(options); @@ -83674,7 +83828,7 @@ function indexOf(xs, x) { module.exports = Transform; -var Duplex = __webpack_require__(115); +var Duplex = __webpack_require__(116); /**/ var util = __webpack_require__(113); @@ -83856,7 +84010,7 @@ function done(stream, er, data) { /**/ -var pna = __webpack_require__(180); +var pna = __webpack_require__(181); /**/ module.exports = Writable; @@ -83927,7 +84081,7 @@ util.inherits(Writable, Stream); function nop() {} function WritableState(options, stream) { - Duplex = Duplex || __webpack_require__(115); + Duplex = Duplex || __webpack_require__(116); options = options || {}; @@ -84077,7 +84231,7 @@ if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.protot } function Writable(options) { - Duplex = Duplex || __webpack_require__(115); + Duplex = Duplex || __webpack_require__(116); // Writable ctor is applied to Duplexes, too. // `realHasInstance` is necessary because using plain `instanceof` @@ -84524,7 +84678,7 @@ Writable.prototype._destroy = function (err, cb) { /**/ -var pna = __webpack_require__(180); +var pna = __webpack_require__(181); /**/ // undocumented cb() API, needed for core, not for public API @@ -85005,7 +85159,7 @@ module.exports = function () { /***/ (function(module, exports, __webpack_require__) { var path = __webpack_require__(0); -var fs = __webpack_require__(5); +var fs = __webpack_require__(4); var parse = path.parse || __webpack_require__(774); module.exports = function nodeModulesPaths(start, opts) { @@ -85059,7 +85213,7 @@ module.exports = function nodeModulesPaths(start, opts) { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return BehaviorSubject; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subject__ = __webpack_require__(36); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_ObjectUnsubscribedError__ = __webpack_require__(189); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_ObjectUnsubscribedError__ = __webpack_require__(190); /** PURE_IMPORTS_START tslib,_Subject,_util_ObjectUnsubscribedError PURE_IMPORTS_END */ @@ -85111,7 +85265,7 @@ var BehaviorSubject = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return empty; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__config__ = __webpack_require__(185); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__config__ = __webpack_require__(186); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_hostReportError__ = __webpack_require__(323); /** PURE_IMPORTS_START _config,_util_hostReportError PURE_IMPORTS_END */ @@ -85210,7 +85364,7 @@ var SubjectSubscription = /*@__PURE__*/ (function (_super) { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return connectableObservableDescriptor; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subject__ = __webpack_require__(36); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Observable__ = __webpack_require__(11); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Observable__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Subscriber__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Subscription__ = __webpack_require__(25); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__operators_refCount__ = __webpack_require__(316); @@ -85365,8 +85519,8 @@ var RefCountSubscriber = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = merge; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(11); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isScheduler__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isScheduler__ = __webpack_require__(49); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__operators_mergeAll__ = __webpack_require__(315); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__fromArray__ = __webpack_require__(85); /** PURE_IMPORTS_START _Observable,_util_isScheduler,_operators_mergeAll,_fromArray PURE_IMPORTS_END */ @@ -85406,8 +85560,8 @@ function merge() { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return NEVER; }); /* harmony export (immutable) */ __webpack_exports__["a"] = never; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(11); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_noop__ = __webpack_require__(191); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_noop__ = __webpack_require__(192); /** PURE_IMPORTS_START _Observable,_util_noop PURE_IMPORTS_END */ @@ -85517,10 +85671,10 @@ var RaceSubscriber = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = timer; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(11); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__scheduler_async__ = __webpack_require__(40); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isNumeric__ = __webpack_require__(190); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_isScheduler__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isNumeric__ = __webpack_require__(191); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_isScheduler__ = __webpack_require__(49); /** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */ @@ -85571,8 +85725,8 @@ function dispatch(state) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = audit; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_tryCatch__ = __webpack_require__(56); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_errorObject__ = __webpack_require__(47); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_tryCatch__ = __webpack_require__(57); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_errorObject__ = __webpack_require__(48); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__OuterSubscriber__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_subscribeToResult__ = __webpack_require__(14); /** PURE_IMPORTS_START tslib,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */ @@ -85684,8 +85838,8 @@ function concatMap(project, resultSelector) { /* harmony export (immutable) */ __webpack_exports__["a"] = distinctUntilChanged; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(7); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_tryCatch__ = __webpack_require__(56); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_errorObject__ = __webpack_require__(47); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_tryCatch__ = __webpack_require__(57); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_errorObject__ = __webpack_require__(48); /** PURE_IMPORTS_START tslib,_Subscriber,_util_tryCatch,_util_errorObject PURE_IMPORTS_END */ @@ -85828,7 +85982,7 @@ var FindValueSubscriber = /*@__PURE__*/ (function (_super) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Subscription__ = __webpack_require__(25); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Observable__ = __webpack_require__(11); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Observable__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Subject__ = __webpack_require__(36); /** PURE_IMPORTS_START tslib,_Subscriber,_Subscription,_Observable,_Subject PURE_IMPORTS_END */ @@ -86025,7 +86179,7 @@ var InnerRefCountSubscription = /*@__PURE__*/ (function (_super) { /* unused harmony export ObserveOnMessage */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(7); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Notification__ = __webpack_require__(184); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Notification__ = __webpack_require__(185); /** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */ @@ -86105,7 +86259,7 @@ var ObserveOnMessage = /*@__PURE__*/ (function () { /* harmony export (immutable) */ __webpack_exports__["a"] = tap; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(7); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_noop__ = __webpack_require__(191); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_noop__ = __webpack_require__(192); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_isFunction__ = __webpack_require__(154); /** PURE_IMPORTS_START tslib,_Subscriber,_util_noop,_util_isFunction PURE_IMPORTS_END */ @@ -86492,7 +86646,7 @@ function isPromise(value) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return subscribeTo; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(11); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__subscribeToArray__ = __webpack_require__(447); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__subscribeToPromise__ = __webpack_require__(450); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__subscribeToIterable__ = __webpack_require__(448); @@ -86501,7 +86655,7 @@ function isPromise(value) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__isPromise__ = __webpack_require__(445); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__isObject__ = __webpack_require__(444); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__symbol_iterator__ = __webpack_require__(151); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__symbol_observable__ = __webpack_require__(117); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__symbol_observable__ = __webpack_require__(118); /** PURE_IMPORTS_START _Observable,_subscribeToArray,_subscribeToPromise,_subscribeToIterable,_subscribeToObservable,_isArrayLike,_isPromise,_isObject,_symbol_iterator,_symbol_observable PURE_IMPORTS_END */ @@ -86610,7 +86764,7 @@ var subscribeToIterable = function (iterable) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return subscribeToObservable; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__symbol_observable__ = __webpack_require__(117); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__symbol_observable__ = __webpack_require__(118); /** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */ var subscribeToObservable = function (obj) { @@ -86661,7 +86815,7 @@ var subscribeToPromise = function (promise) { var assert = __webpack_require__(28) var signals = __webpack_require__(933) -var EE = __webpack_require__(76) +var EE = __webpack_require__(77) /* istanbul ignore if */ if (typeof EE !== 'function') { EE = EE.EventEmitter @@ -86851,11 +87005,11 @@ var stream = __webpack_require__(23); var util = __webpack_require__(3); var assert = __webpack_require__(16); var Buffer = __webpack_require__(15).Buffer; -var Signature = __webpack_require__(74); +var Signature = __webpack_require__(75); function Verifier(key, hashAlgo) { if (nacl === undefined) - nacl = __webpack_require__(75); + nacl = __webpack_require__(76); if (hashAlgo.toLowerCase() !== 'sha512') throw (new Error('ED25519 only supports the use of ' + @@ -86903,7 +87057,7 @@ Verifier.prototype.verify = function (signature, fmt) { function Signer(key, hashAlgo) { if (nacl === undefined) - nacl = __webpack_require__(75); + nacl = __webpack_require__(76); if (hashAlgo.toLowerCase() !== 'sha512') throw (new Error('ED25519 only supports the use of ' + @@ -87070,7 +87224,7 @@ var utils = __webpack_require__(26); var Key = __webpack_require__(27); var PrivateKey = __webpack_require__(33); -var sshpriv = __webpack_require__(192); +var sshpriv = __webpack_require__(193); /*JSSTYLED*/ var SSHKEY_RE = /^([a-z0-9-]+)[ \t]+([a-zA-Z0-9+\/]+[=]*)([ \t]+([^ \t][^\n]*[\n]*)?)?$/; @@ -87188,7 +87342,7 @@ module.exports = { }; var assert = __webpack_require__(16); -var asn1 = __webpack_require__(65); +var asn1 = __webpack_require__(66); var Buffer = __webpack_require__(15).Buffer; var algs = __webpack_require__(32); var utils = __webpack_require__(26); @@ -87196,7 +87350,7 @@ var Key = __webpack_require__(27); var PrivateKey = __webpack_require__(33); var pem = __webpack_require__(86); var Identity = __webpack_require__(158); -var Signature = __webpack_require__(74); +var Signature = __webpack_require__(75); var Certificate = __webpack_require__(155); var pkcs8 = __webpack_require__(157); @@ -88215,7 +88369,7 @@ function simpleEnd(buf) { /***/ (function(module, exports, __webpack_require__) { var toBuffer = __webpack_require__(462) -var alloc = __webpack_require__(380) +var alloc = __webpack_require__(374) var ZEROS = '0000000000000000000' var SEVENS = '7777777777777777777' @@ -88666,7 +88820,7 @@ module.exports = bytesToUuid; // Unique ID creation requires a high quality random # generator. In node.js // this is pretty straight-forward - we use the crypto API. -var crypto = __webpack_require__(12); +var crypto = __webpack_require__(11); module.exports = function nodeRNG() { return crypto.randomBytes(16); @@ -88725,7 +88879,7 @@ exports.default = handleSignals; var _child; function _load_child() { - return _child = __webpack_require__(58); + return _child = __webpack_require__(50); } function forwardSignalAndExit(signal) { @@ -88819,7 +88973,7 @@ module.exports = function (arg) { var util = __webpack_require__(3); var onExit = __webpack_require__(451); -var currentlyUnhandled = __webpack_require__(629); +var currentlyUnhandled = __webpack_require__(597); var installed = false; @@ -88861,7 +89015,7 @@ module.exports = function (log) { "use strict"; -const fs = __webpack_require__(391); +const fs = __webpack_require__(385); const path = __webpack_require__(0); const retry = __webpack_require__(819); const syncFs = __webpack_require__(779); @@ -89247,2038 +89401,1417 @@ module.exports.checkSync = checkSync; "use strict"; +const x = module.exports; +const ESC = '\u001B['; +const OSC = '\u001B]'; +const BEL = '\u0007'; +const SEP = ';'; +const isTerminalApp = process.env.TERM_PROGRAM === 'Apple_Terminal'; -var KEYWORDS = [ - 'multipleOf', - 'maximum', - 'exclusiveMaximum', - 'minimum', - 'exclusiveMinimum', - 'maxLength', - 'minLength', - 'pattern', - 'additionalItems', - 'maxItems', - 'minItems', - 'uniqueItems', - 'maxProperties', - 'minProperties', - 'required', - 'additionalProperties', - 'enum', - 'format', - 'const' -]; - -module.exports = function (metaSchema, keywordsJsonPointers) { - for (var i=0; i { + if (typeof x !== 'number') { + throw new TypeError('The `x` argument is required'); + } - for (j=0; j { + if (typeof x !== 'number') { + throw new TypeError('The `x` argument is required'); + } -/***/ }), -/* 473 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var compileSchema = __webpack_require__(478) - , resolve = __webpack_require__(203) - , Cache = __webpack_require__(474) - , SchemaObject = __webpack_require__(339) - , stableStringify = __webpack_require__(389) - , formats = __webpack_require__(477) - , rules = __webpack_require__(479) - , $dataMetaSchema = __webpack_require__(472) - , patternGroups = __webpack_require__(500) - , util = __webpack_require__(106) - , co = __webpack_require__(383); + let ret = ''; -module.exports = Ajv; + if (x < 0) { + ret += ESC + (-x) + 'D'; + } else if (x > 0) { + ret += ESC + x + 'C'; + } -Ajv.prototype.validate = validate; -Ajv.prototype.compile = compile; -Ajv.prototype.addSchema = addSchema; -Ajv.prototype.addMetaSchema = addMetaSchema; -Ajv.prototype.validateSchema = validateSchema; -Ajv.prototype.getSchema = getSchema; -Ajv.prototype.removeSchema = removeSchema; -Ajv.prototype.addFormat = addFormat; -Ajv.prototype.errorsText = errorsText; + if (y < 0) { + ret += ESC + (-y) + 'A'; + } else if (y > 0) { + ret += ESC + y + 'B'; + } -Ajv.prototype._addSchema = _addSchema; -Ajv.prototype._compile = _compile; + return ret; +}; -Ajv.prototype.compileAsync = __webpack_require__(476); -var customKeyword = __webpack_require__(499); -Ajv.prototype.addKeyword = customKeyword.add; -Ajv.prototype.getKeyword = customKeyword.get; -Ajv.prototype.removeKeyword = customKeyword.remove; +x.cursorUp = count => ESC + (typeof count === 'number' ? count : 1) + 'A'; +x.cursorDown = count => ESC + (typeof count === 'number' ? count : 1) + 'B'; +x.cursorForward = count => ESC + (typeof count === 'number' ? count : 1) + 'C'; +x.cursorBackward = count => ESC + (typeof count === 'number' ? count : 1) + 'D'; -var errorClasses = __webpack_require__(202); -Ajv.ValidationError = errorClasses.Validation; -Ajv.MissingRefError = errorClasses.MissingRef; -Ajv.$dataMetaSchema = $dataMetaSchema; +x.cursorLeft = ESC + 'G'; +x.cursorSavePosition = ESC + (isTerminalApp ? '7' : 's'); +x.cursorRestorePosition = ESC + (isTerminalApp ? '8' : 'u'); +x.cursorGetPosition = ESC + '6n'; +x.cursorNextLine = ESC + 'E'; +x.cursorPrevLine = ESC + 'F'; +x.cursorHide = ESC + '?25l'; +x.cursorShow = ESC + '?25h'; -var META_SCHEMA_ID = 'http://json-schema.org/draft-06/schema'; +x.eraseLines = count => { + let clear = ''; -var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes' ]; -var META_SUPPORT_DATA = ['/properties']; + for (let i = 0; i < count; i++) { + clear += x.eraseLine + (i < count - 1 ? x.cursorUp() : ''); + } -/** - * Creates validator instance. - * Usage: `Ajv(opts)` - * @param {Object} opts optional options - * @return {Object} ajv instance - */ -function Ajv(opts) { - if (!(this instanceof Ajv)) return new Ajv(opts); - opts = this._opts = util.copy(opts) || {}; - setLogger(this); - this._schemas = {}; - this._refs = {}; - this._fragments = {}; - this._formats = formats(opts.format); - var schemaUriFormat = this._schemaUriFormat = this._formats['uri-reference']; - this._schemaUriFormatFunc = function (str) { return schemaUriFormat.test(str); }; + if (count) { + clear += x.cursorLeft; + } - this._cache = opts.cache || new Cache; - this._loadingSchemas = {}; - this._compilations = []; - this.RULES = rules(); - this._getId = chooseGetId(opts); + return clear; +}; - opts.loopRequired = opts.loopRequired || Infinity; - if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true; - if (opts.serialize === undefined) opts.serialize = stableStringify; - this._metaOpts = getMetaSchemaOptions(this); +x.eraseEndLine = ESC + 'K'; +x.eraseStartLine = ESC + '1K'; +x.eraseLine = ESC + '2K'; +x.eraseDown = ESC + 'J'; +x.eraseUp = ESC + '1J'; +x.eraseScreen = ESC + '2J'; +x.scrollUp = ESC + 'S'; +x.scrollDown = ESC + 'T'; - if (opts.formats) addInitialFormats(this); - addDraft6MetaSchema(this); - if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta); - addInitialSchemas(this); - if (opts.patternGroups) patternGroups(this); -} +x.clearScreen = '\u001Bc'; +x.beep = BEL; +x.link = (text, url) => { + return [ + OSC, + '8', + SEP, + SEP, + url, + BEL, + text, + OSC, + '8', + SEP, + SEP, + BEL + ].join(''); +}; +x.image = (buf, opts) => { + opts = opts || {}; -/** - * Validate data using schema - * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize. - * @this Ajv - * @param {String|Object} schemaKeyRef key, ref or schema object - * @param {Any} data to be validated - * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`). - */ -function validate(schemaKeyRef, data) { - var v; - if (typeof schemaKeyRef == 'string') { - v = this.getSchema(schemaKeyRef); - if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"'); - } else { - var schemaObj = this._addSchema(schemaKeyRef); - v = schemaObj.validate || this._compile(schemaObj); - } + let ret = OSC + '1337;File=inline=1'; - var valid = v(data); - if (v.$async === true) - return this._opts.async == '*' ? co(valid) : valid; - this.errors = v.errors; - return valid; -} + if (opts.width) { + ret += `;width=${opts.width}`; + } + if (opts.height) { + ret += `;height=${opts.height}`; + } -/** - * Create validating function for passed schema. - * @this Ajv - * @param {Object} schema schema object - * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords. - * @return {Function} validating function - */ -function compile(schema, _meta) { - var schemaObj = this._addSchema(schema, undefined, _meta); - return schemaObj.validate || this._compile(schemaObj); -} + if (opts.preserveAspectRatio === false) { + ret += ';preserveAspectRatio=0'; + } + return ret + ':' + buf.toString('base64') + BEL; +}; -/** - * Adds schema to the instance. - * @this Ajv - * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored. - * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. - * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead. - * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead. - * @return {Ajv} this for method chaining - */ -function addSchema(schema, key, _skipValidation, _meta) { - if (Array.isArray(schema)){ - for (var i=0; i OSC + '50;CurrentDir=' + (cwd || process.cwd()) + BEL; -/** - * Add schema that will be used to validate other schemas - * options in META_IGNORE_OPTIONS are alway set to false - * @this Ajv - * @param {Object} schema schema object - * @param {String} key optional schema key - * @param {Boolean} skipValidation true to skip schema validation, can be used to override validateSchema option for meta-schema - * @return {Ajv} this for method chaining - */ -function addMetaSchema(schema, key, skipValidation) { - this.addSchema(schema, key, skipValidation, true); - return this; -} +/***/ }), +/* 473 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Validate schema - * @this Ajv - * @param {Object} schema schema to validate - * @param {Boolean} throwOrLogError pass true to throw (or log) an error if invalid - * @return {Boolean} true if schema is valid - */ -function validateSchema(schema, throwOrLogError) { - var $schema = schema.$schema; - if ($schema !== undefined && typeof $schema != 'string') - throw new Error('$schema must be a string'); - $schema = $schema || this._opts.defaultMeta || defaultMeta(this); - if (!$schema) { - this.logger.warn('meta-schema not available'); - this.errors = null; - return true; - } - var currentUriFormat = this._formats.uri; - this._formats.uri = typeof currentUriFormat == 'function' - ? this._schemaUriFormatFunc - : this._schemaUriFormat; - var valid; - try { valid = this.validate($schema, schema); } - finally { this._formats.uri = currentUriFormat; } - if (!valid && throwOrLogError) { - var message = 'schema is invalid: ' + this.errorsText(); - if (this._opts.validateSchema == 'log') this.logger.error(message); - else throw new Error(message); - } - return valid; -} +"use strict"; +module.exports = function () { + return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g; +}; -function defaultMeta(self) { - var meta = self._opts.meta; - self._opts.defaultMeta = typeof meta == 'object' - ? self._getId(meta) || meta - : self.getSchema(META_SCHEMA_ID) - ? META_SCHEMA_ID - : undefined; - return self._opts.defaultMeta; -} +/***/ }), +/* 474 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Get compiled schema from the instance by `key` or `ref`. - * @this Ajv - * @param {String} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id). - * @return {Function} schema validating function (with property `schema`). - */ -function getSchema(keyRef) { - var schemaObj = _getSchemaObj(this, keyRef); - switch (typeof schemaObj) { - case 'object': return schemaObj.validate || this._compile(schemaObj); - case 'string': return this.getSchema(schemaObj); - case 'undefined': return _getSchemaFragment(this, keyRef); - } -} +"use strict"; +/* WEBPACK VAR INJECTION */(function(module) { +const colorConvert = __webpack_require__(576); +const wrapAnsi16 = (fn, offset) => function () { + const code = fn.apply(colorConvert, arguments); + return `\u001B[${code + offset}m`; +}; -function _getSchemaFragment(self, ref) { - var res = resolve.schema.call(self, { schema: {} }, ref); - if (res) { - var schema = res.schema - , root = res.root - , baseId = res.baseId; - var v = compileSchema.call(self, schema, root, undefined, baseId); - self._fragments[ref] = new SchemaObject({ - ref: ref, - fragment: true, - schema: schema, - root: root, - baseId: baseId, - validate: v - }); - return v; - } -} +const wrapAnsi256 = (fn, offset) => function () { + const code = fn.apply(colorConvert, arguments); + return `\u001B[${38 + offset};5;${code}m`; +}; +const wrapAnsi16m = (fn, offset) => function () { + const rgb = fn.apply(colorConvert, arguments); + return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; +}; -function _getSchemaObj(self, keyRef) { - keyRef = resolve.normalizeId(keyRef); - return self._schemas[keyRef] || self._refs[keyRef] || self._fragments[keyRef]; -} +function assembleStyles() { + const codes = new Map(); + const styles = { + modifier: { + reset: [0, 0], + // 21 isn't widely supported and 22 does the same thing + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + color: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39], + // Bright color + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39] + }, + bgColor: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], -/** - * Remove cached schema(s). - * If no parameter is passed all schemas but meta-schemas are removed. - * If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed. - * Even if schema is referenced by other schemas it still can be removed as other schemas have local references. - * @this Ajv - * @param {String|Object|RegExp} schemaKeyRef key, ref, pattern to match key/ref or schema object - * @return {Ajv} this for method chaining - */ -function removeSchema(schemaKeyRef) { - if (schemaKeyRef instanceof RegExp) { - _removeAllSchemas(this, this._schemas, schemaKeyRef); - _removeAllSchemas(this, this._refs, schemaKeyRef); - return this; - } - switch (typeof schemaKeyRef) { - case 'undefined': - _removeAllSchemas(this, this._schemas); - _removeAllSchemas(this, this._refs); - this._cache.clear(); - return this; - case 'string': - var schemaObj = _getSchemaObj(this, schemaKeyRef); - if (schemaObj) this._cache.del(schemaObj.cacheKey); - delete this._schemas[schemaKeyRef]; - delete this._refs[schemaKeyRef]; - return this; - case 'object': - var serialize = this._opts.serialize; - var cacheKey = serialize ? serialize(schemaKeyRef) : schemaKeyRef; - this._cache.del(cacheKey); - var id = this._getId(schemaKeyRef); - if (id) { - id = resolve.normalizeId(id); - delete this._schemas[id]; - delete this._refs[id]; - } - } - return this; -} + // Bright color + bgBlackBright: [100, 49], + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49] + } + }; + // Fix humans + styles.color.grey = styles.color.gray; -function _removeAllSchemas(self, schemas, regex) { - for (var keyRef in schemas) { - var schemaObj = schemas[keyRef]; - if (!schemaObj.meta && (!regex || regex.test(keyRef))) { - self._cache.del(schemaObj.cacheKey); - delete schemas[keyRef]; - } - } -} + for (const groupName of Object.keys(styles)) { + const group = styles[groupName]; + for (const styleName of Object.keys(group)) { + const style = group[styleName]; -/* @this Ajv */ -function _addSchema(schema, skipValidation, meta, shouldAddSchema) { - if (typeof schema != 'object' && typeof schema != 'boolean') - throw new Error('schema should be object or boolean'); - var serialize = this._opts.serialize; - var cacheKey = serialize ? serialize(schema) : schema; - var cached = this._cache.get(cacheKey); - if (cached) return cached; + styles[styleName] = { + open: `\u001B[${style[0]}m`, + close: `\u001B[${style[1]}m` + }; - shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false; + group[styleName] = styles[styleName]; - var id = resolve.normalizeId(this._getId(schema)); - if (id && shouldAddSchema) checkUnique(this, id); + codes.set(style[0], style[1]); + } - var willValidate = this._opts.validateSchema !== false && !skipValidation; - var recursiveMeta; - if (willValidate && !(recursiveMeta = id && id == resolve.normalizeId(schema.$schema))) - this.validateSchema(schema, true); + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); - var localRefs = resolve.ids.call(this, schema); + Object.defineProperty(styles, 'codes', { + value: codes, + enumerable: false + }); + } - var schemaObj = new SchemaObject({ - id: id, - schema: schema, - localRefs: localRefs, - cacheKey: cacheKey, - meta: meta - }); + const ansi2ansi = n => n; + const rgb2rgb = (r, g, b) => [r, g, b]; - if (id[0] != '#' && shouldAddSchema) this._refs[id] = schemaObj; - this._cache.put(cacheKey, schemaObj); + styles.color.close = '\u001B[39m'; + styles.bgColor.close = '\u001B[49m'; - if (willValidate && recursiveMeta) this.validateSchema(schema, true); + styles.color.ansi = { + ansi: wrapAnsi16(ansi2ansi, 0) + }; + styles.color.ansi256 = { + ansi256: wrapAnsi256(ansi2ansi, 0) + }; + styles.color.ansi16m = { + rgb: wrapAnsi16m(rgb2rgb, 0) + }; - return schemaObj; -} + styles.bgColor.ansi = { + ansi: wrapAnsi16(ansi2ansi, 10) + }; + styles.bgColor.ansi256 = { + ansi256: wrapAnsi256(ansi2ansi, 10) + }; + styles.bgColor.ansi16m = { + rgb: wrapAnsi16m(rgb2rgb, 10) + }; + for (let key of Object.keys(colorConvert)) { + if (typeof colorConvert[key] !== 'object') { + continue; + } -/* @this Ajv */ -function _compile(schemaObj, root) { - if (schemaObj.compiling) { - schemaObj.validate = callValidate; - callValidate.schema = schemaObj.schema; - callValidate.errors = null; - callValidate.root = root ? root : callValidate; - if (schemaObj.schema.$async === true) - callValidate.$async = true; - return callValidate; - } - schemaObj.compiling = true; + const suite = colorConvert[key]; - var currentOpts; - if (schemaObj.meta) { - currentOpts = this._opts; - this._opts = this._metaOpts; - } + if (key === 'ansi16') { + key = 'ansi'; + } - var v; - try { v = compileSchema.call(this, schemaObj.schema, root, schemaObj.localRefs); } - finally { - schemaObj.compiling = false; - if (schemaObj.meta) this._opts = currentOpts; - } + if ('ansi16' in suite) { + styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0); + styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10); + } - schemaObj.validate = v; - schemaObj.refs = v.refs; - schemaObj.refVal = v.refVal; - schemaObj.root = v.root; - return v; + if ('ansi256' in suite) { + styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0); + styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10); + } + if ('rgb' in suite) { + styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0); + styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10); + } + } - function callValidate() { - var _validate = schemaObj.validate; - var result = _validate.apply(null, arguments); - callValidate.errors = _validate.errors; - return result; - } + return styles; } +// Make the export immutable +Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles +}); -function chooseGetId(opts) { - switch (opts.schemaId) { - case '$id': return _get$Id; - case 'id': return _getId; - default: return _get$IdOrId; - } -} +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(163)(module))) -/* @this Ajv */ -function _getId(schema) { - if (schema.$id) this.logger.warn('schema $id ignored', schema.$id); - return schema.id; -} +/***/ }), +/* 475 */ +/***/ (function(module, exports) { -/* @this Ajv */ -function _get$Id(schema) { - if (schema.id) this.logger.warn('schema id ignored', schema.id); - return schema.$id; +function webpackEmptyContext(req) { + throw new Error("Cannot find module '" + req + "'."); } +webpackEmptyContext.keys = function() { return []; }; +webpackEmptyContext.resolve = webpackEmptyContext; +module.exports = webpackEmptyContext; +webpackEmptyContext.id = 475; +/***/ }), +/* 476 */ +/***/ (function(module, exports, __webpack_require__) { -function _get$IdOrId(schema) { - if (schema.$id && schema.id && schema.$id != schema.id) - throw new Error('schema $id is different from id'); - return schema.$id || schema.id; -} +"use strict"; + // global key for user preferred registration +var REGISTRATION_KEY = '@@any-promise/REGISTRATION', + // Prior registration (preferred or detected) + registered = null /** - * Convert array of error message objects to string - * @this Ajv - * @param {Array} errors optional array of validation errors, if not passed errors from the instance are used. - * @param {Object} options optional options with properties `separator` and `dataVar`. - * @return {String} human readable string with all errors descriptions + * Registers the given implementation. An implementation must + * be registered prior to any call to `require("any-promise")`, + * typically on application load. + * + * If called with no arguments, will return registration in + * following priority: + * + * For Node.js: + * + * 1. Previous registration + * 2. global.Promise if node.js version >= 0.12 + * 3. Auto detected promise based on first sucessful require of + * known promise libraries. Note this is a last resort, as the + * loaded library is non-deterministic. node.js >= 0.12 will + * always use global.Promise over this priority list. + * 4. Throws error. + * + * For Browser: + * + * 1. Previous registration + * 2. window.Promise + * 3. Throws error. + * + * Options: + * + * Promise: Desired Promise constructor + * global: Boolean - Should the registration be cached in a global variable to + * allow cross dependency/bundle registration? (default true) */ -function errorsText(errors, options) { - errors = errors || this.errors; - if (!errors) return 'No errors'; - options = options || {}; - var separator = options.separator === undefined ? ', ' : options.separator; - var dataVar = options.dataVar === undefined ? 'data' : options.dataVar; +module.exports = function(root, loadImplementation){ + return function register(implementation, opts){ + implementation = implementation || null + opts = opts || {} + // global registration unless explicitly {global: false} in options (default true) + var registerGlobal = opts.global !== false; - var text = ''; - for (var i=0; i + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ -var Cache = module.exports = function Cache() { - this._cache = {}; -}; - - -Cache.prototype.put = function Cache_put(key, value) { - this._cache[key] = value; +module.exports = function (arr) { + return flat(arr, []); }; - -Cache.prototype.get = function Cache_get(key) { - return this._cache[key]; -}; +function flat(arr, res) { + var i = 0, cur; + var len = arr.length; + for (; i < len; i++) { + cur = arr[i]; + Array.isArray(cur) ? flat(cur, res) : res.push(cur); + } + return res; +} -Cache.prototype.del = function Cache_del(key) { - delete this._cache[key]; -}; +/***/ }), +/* 479 */ +/***/ (function(module, exports, __webpack_require__) { +"use strict"; -Cache.prototype.clear = function Cache_clear() { - this._cache = {}; -}; +module.exports = function (arr, predicate, ctx) { + if (typeof Array.prototype.findIndex === 'function') { + return arr.findIndex(predicate, ctx); + } + if (typeof predicate !== 'function') { + throw new TypeError('predicate must be a function'); + } -/***/ }), -/* 475 */ -/***/ (function(module, exports, __webpack_require__) { + var list = Object(arr); + var len = list.length; -"use strict"; + if (len === 0) { + return -1; + } + for (var i = 0; i < len; i++) { + if (predicate.call(ctx, list[i], i, list)) { + return i; + } + } -//all requires must be explicit because browserify won't work with dynamic requires -module.exports = { - '$ref': __webpack_require__(496), - allOf: __webpack_require__(481), - anyOf: __webpack_require__(482), - const: __webpack_require__(483), - contains: __webpack_require__(484), - dependencies: __webpack_require__(486), - 'enum': __webpack_require__(487), - format: __webpack_require__(488), - items: __webpack_require__(489), - maximum: __webpack_require__(340), - minimum: __webpack_require__(340), - maxItems: __webpack_require__(341), - minItems: __webpack_require__(341), - maxLength: __webpack_require__(342), - minLength: __webpack_require__(342), - maxProperties: __webpack_require__(343), - minProperties: __webpack_require__(343), - multipleOf: __webpack_require__(490), - not: __webpack_require__(491), - oneOf: __webpack_require__(492), - pattern: __webpack_require__(493), - properties: __webpack_require__(494), - propertyNames: __webpack_require__(495), - required: __webpack_require__(497), - uniqueItems: __webpack_require__(498), - validate: __webpack_require__(344) + return -1; }; /***/ }), -/* 476 */ +/* 480 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var MissingRefError = __webpack_require__(202).MissingRef; - -module.exports = compileAsync; - +var rawAsap = __webpack_require__(481); +var freeTasks = []; /** - * Creates validating function for passed schema with asynchronous loading of missing schemas. - * `loadSchema` option should be a function that accepts schema uri and returns promise that resolves with the schema. - * @this Ajv - * @param {Object} schema schema object - * @param {Boolean} meta optional true to compile meta-schema; this parameter can be skipped - * @param {Function} callback an optional node-style callback, it is called with 2 parameters: error (or null) and validating function. - * @return {Promise} promise that resolves with a validating function. + * Calls a task as soon as possible after returning, in its own event, with + * priority over IO events. An exception thrown in a task can be handled by + * `process.on("uncaughtException") or `domain.on("error")`, but will otherwise + * crash the process. If the error is handled, all subsequent tasks will + * resume. + * + * @param {{call}} task A callable object, typically a function that takes no + * arguments. */ -function compileAsync(schema, meta, callback) { - /* eslint no-shadow: 0 */ - /* global Promise */ - /* jshint validthis: true */ - var self = this; - if (typeof this._opts.loadSchema != 'function') - throw new Error('options.loadSchema should be a function'); +module.exports = asap; +function asap(task) { + var rawTask; + if (freeTasks.length) { + rawTask = freeTasks.pop(); + } else { + rawTask = new RawTask(); + } + rawTask.task = task; + rawTask.domain = process.domain; + rawAsap(rawTask); +} - if (typeof meta == 'function') { - callback = meta; - meta = undefined; - } +function RawTask() { + this.task = null; + this.domain = null; +} - var p = loadMetaSchemaOf(schema).then(function () { - var schemaObj = self._addSchema(schema, undefined, meta); - return schemaObj.validate || _compileAsync(schemaObj); - }); +RawTask.prototype.call = function () { + if (this.domain) { + this.domain.enter(); + } + var threw = true; + try { + this.task.call(); + threw = false; + // If the task throws an exception (presumably) Node.js restores the + // domain stack for the next event. + if (this.domain) { + this.domain.exit(); + } + } finally { + // We use try/finally and a threw flag to avoid messing up stack traces + // when we catch and release errors. + if (threw) { + // In Node.js, uncaught exceptions are considered fatal errors. + // Re-throw them to interrupt flushing! + // Ensure that flushing continues if an uncaught exception is + // suppressed listening process.on("uncaughtException") or + // domain.on("error"). + rawAsap.requestFlush(); + } + // If the task threw an error, we do not want to exit the domain here. + // Exiting the domain would prevent the domain from catching the error. + this.task = null; + this.domain = null; + freeTasks.push(this); + } +}; - if (callback) { - p.then( - function(v) { callback(null, v); }, - callback - ); - } - return p; +/***/ }), +/* 481 */ +/***/ (function(module, exports, __webpack_require__) { - function loadMetaSchemaOf(sch) { - var $schema = sch.$schema; - return $schema && !self.getSchema($schema) - ? compileAsync.call(self, { $ref: $schema }, true) - : Promise.resolve(); - } +"use strict"; - function _compileAsync(schemaObj) { - try { return self._compile(schemaObj); } - catch(e) { - if (e instanceof MissingRefError) return loadMissingSchema(e); - throw e; - } +var domain; // The domain module is executed on demand +var hasSetImmediate = typeof setImmediate === "function"; +// Use the fastest means possible to execute a task in its own turn, with +// priority over other events including network IO events in Node.js. +// +// An exception thrown by a task will permanently interrupt the processing of +// subsequent tasks. The higher level `asap` function ensures that if an +// exception is thrown by a task, that the task queue will continue flushing as +// soon as possible, but if you use `rawAsap` directly, you are responsible to +// either ensure that no exceptions are thrown from your task, or to manually +// call `rawAsap.requestFlush` if an exception is thrown. +module.exports = rawAsap; +function rawAsap(task) { + if (!queue.length) { + requestFlush(); + flushing = true; + } + // Avoids a function call + queue[queue.length] = task; +} - function loadMissingSchema(e) { - var ref = e.missingSchema; - if (added(ref)) throw new Error('Schema ' + ref + ' is loaded but ' + e.missingRef + ' cannot be resolved'); +var queue = []; +// Once a flush has been requested, no further calls to `requestFlush` are +// necessary until the next `flush` completes. +var flushing = false; +// The position of the next task to execute in the task queue. This is +// preserved between calls to `flush` so that it can be resumed if +// a task throws an exception. +var index = 0; +// If a task schedules additional tasks recursively, the task queue can grow +// unbounded. To prevent memory excaustion, the task queue will periodically +// truncate already-completed tasks. +var capacity = 1024; - var schemaPromise = self._loadingSchemas[ref]; - if (!schemaPromise) { - schemaPromise = self._loadingSchemas[ref] = self._opts.loadSchema(ref); - schemaPromise.then(removePromise, removePromise); - } +// The flush function processes all tasks that have been scheduled with +// `rawAsap` unless and until one of those tasks throws an exception. +// If a task throws an exception, `flush` ensures that its state will remain +// consistent and will resume where it left off when called again. +// However, `flush` does not make any arrangements to be called again if an +// exception is thrown. +function flush() { + while (index < queue.length) { + var currentIndex = index; + // Advance the index before calling the task. This ensures that we will + // begin flushing on the next task the task throws an error. + index = index + 1; + queue[currentIndex].call(); + // Prevent leaking memory for long chains of recursive calls to `asap`. + // If we call `asap` within tasks scheduled by `asap`, the queue will + // grow, but to avoid an O(n) walk for every task we execute, we don't + // shift tasks off the queue after they have been executed. + // Instead, we periodically shift 1024 tasks off the queue. + if (index > capacity) { + // Manually shift all values starting at the index back to the + // beginning of the queue. + for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) { + queue[scan] = queue[scan + index]; + } + queue.length -= index; + index = 0; + } + } + queue.length = 0; + index = 0; + flushing = false; +} - return schemaPromise.then(function (sch) { - if (!added(ref)) { - return loadMetaSchemaOf(sch).then(function () { - if (!added(ref)) self.addSchema(sch, ref, undefined, meta); - }); +rawAsap.requestFlush = requestFlush; +function requestFlush() { + // Ensure flushing is not bound to any domain. + // It is not sufficient to exit the domain, because domains exist on a stack. + // To execute code outside of any domain, the following dance is necessary. + var parentDomain = process.domain; + if (parentDomain) { + if (!domain) { + // Lazy execute the domain module. + // Only employed if the user elects to use domains. + domain = __webpack_require__(965); } - }).then(function() { - return _compileAsync(schemaObj); - }); + domain.active = process.domain = null; + } - function removePromise() { - delete self._loadingSchemas[ref]; - } + // `setImmediate` is slower that `process.nextTick`, but `process.nextTick` + // cannot handle recursion. + // `requestFlush` will only be called recursively from `asap.js`, to resume + // flushing after an error is thrown into a domain. + // Conveniently, `setImmediate` was introduced in the same version + // `process.nextTick` started throwing recursion errors. + if (flushing && hasSetImmediate) { + setImmediate(flush); + } else { + process.nextTick(flush); + } - function added(ref) { - return self._refs[ref] || self._schemas[ref]; - } + if (parentDomain) { + domain.active = process.domain = parentDomain; } - } } /***/ }), -/* 477 */ +/* 482 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +// Copyright 2011 Mark Cavage All rights reserved. +var errors = __webpack_require__(203); +var types = __webpack_require__(204); -var util = __webpack_require__(106); +var Reader = __webpack_require__(483); +var Writer = __webpack_require__(484); -var DATE = /^\d\d\d\d-(\d\d)-(\d\d)$/; -var DAYS = [0,31,29,31,30,31,30,31,31,30,31,30,31]; -var TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i; -var HOSTNAME = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*$/i; -var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i; -var URIREF = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i; -// uri-template: https://tools.ietf.org/html/rfc6570 -var URITEMPLATE = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; -// For the source: https://gist.github.com/dperini/729294 -// For test cases: https://mathiasbynens.be/demo/url-regex -// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983. -// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; -var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; -var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; -var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$|^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; -var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; +// --- Exports -module.exports = formats; +module.exports = { -function formats(mode) { - mode = mode == 'full' ? 'full' : 'fast'; - return util.copy(formats[mode]); -} + Reader: Reader, + Writer: Writer -formats.fast = { - // date: http://tools.ietf.org/html/rfc3339#section-5.6 - date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, - // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 - time: /^[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i, - 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i, - // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js - uri: /^(?:[a-z][a-z0-9+-.]*)(?::|\/)\/?[^\s]*$/i, - 'uri-reference': /^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i, - 'uri-template': URITEMPLATE, - url: URL, - // email (sources from jsen validator): - // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363 - // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation') - email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, - hostname: HOSTNAME, - // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html - ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, - // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses - ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, - regex: regex, - // uuid: http://tools.ietf.org/html/rfc4122 - uuid: UUID, - // JSON-pointer: https://tools.ietf.org/html/rfc6901 - // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A - 'json-pointer': JSON_POINTER, - // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00 - 'relative-json-pointer': RELATIVE_JSON_POINTER }; +for (var t in types) { + if (types.hasOwnProperty(t)) + module.exports[t] = types[t]; +} +for (var e in errors) { + if (errors.hasOwnProperty(e)) + module.exports[e] = errors[e]; +} -formats.full = { - date: date, - time: time, - 'date-time': date_time, - uri: uri, - 'uri-reference': URIREF, - 'uri-template': URITEMPLATE, - url: URL, - email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, - hostname: hostname, - ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, - ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, - regex: regex, - uuid: UUID, - 'json-pointer': JSON_POINTER, - 'relative-json-pointer': RELATIVE_JSON_POINTER -}; +/***/ }), +/* 483 */ +/***/ (function(module, exports, __webpack_require__) { -function date(str) { - // full-date from http://tools.ietf.org/html/rfc3339#section-5.6 - var matches = str.match(DATE); - if (!matches) return false; +// Copyright 2011 Mark Cavage All rights reserved. - var month = +matches[1]; - var day = +matches[2]; - return month >= 1 && month <= 12 && day >= 1 && day <= DAYS[month]; -} +var assert = __webpack_require__(28); +var Buffer = __webpack_require__(15).Buffer; +var ASN1 = __webpack_require__(204); +var errors = __webpack_require__(203); -function time(str, full) { - var matches = str.match(TIME); - if (!matches) return false; - var hour = matches[1]; - var minute = matches[2]; - var second = matches[3]; - var timeZone = matches[5]; - return hour <= 23 && minute <= 59 && second <= 59 && (!full || timeZone); -} +// --- Globals +var newInvalidAsn1Error = errors.newInvalidAsn1Error; -var DATE_TIME_SEPARATOR = /t|\s/i; -function date_time(str) { - // http://tools.ietf.org/html/rfc3339#section-5.6 - var dateTime = str.split(DATE_TIME_SEPARATOR); - return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true); -} -function hostname(str) { - // https://tools.ietf.org/html/rfc1034#section-3.5 - // https://tools.ietf.org/html/rfc1123#section-2 - return str.length <= 255 && HOSTNAME.test(str); -} +// --- API + +function Reader(data) { + if (!data || !Buffer.isBuffer(data)) + throw new TypeError('data must be a node Buffer'); + this._buf = data; + this._size = data.length; -var NOT_URI_FRAGMENT = /\/|:/; -function uri(str) { - // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "." - return NOT_URI_FRAGMENT.test(str) && URI.test(str); + // These hold the "current" state + this._len = 0; + this._offset = 0; } +Object.defineProperty(Reader.prototype, 'length', { + enumerable: true, + get: function () { return (this._len); } +}); -var Z_ANCHOR = /[^\\]\\Z/; -function regex(str) { - if (Z_ANCHOR.test(str)) return false; - try { - new RegExp(str); - return true; - } catch(e) { - return false; - } -} +Object.defineProperty(Reader.prototype, 'offset', { + enumerable: true, + get: function () { return (this._offset); } +}); +Object.defineProperty(Reader.prototype, 'remain', { + get: function () { return (this._size - this._offset); } +}); -/***/ }), -/* 478 */ -/***/ (function(module, exports, __webpack_require__) { +Object.defineProperty(Reader.prototype, 'buffer', { + get: function () { return (this._buf.slice(this._offset)); } +}); -"use strict"; + +/** + * Reads a single byte and advances offset; you can pass in `true` to make this + * a "peek" operation (i.e., get the byte, but don't advance the offset). + * + * @param {Boolean} peek true means don't move offset. + * @return {Number} the next byte, null if not enough data. + */ +Reader.prototype.readByte = function (peek) { + if (this._size - this._offset < 1) + return null; + + var b = this._buf[this._offset] & 0xff; + + if (!peek) + this._offset += 1; + + return b; +}; -var resolve = __webpack_require__(203) - , util = __webpack_require__(106) - , errorClasses = __webpack_require__(202) - , stableStringify = __webpack_require__(389); +Reader.prototype.peek = function () { + return this.readByte(true); +}; -var validateGenerator = __webpack_require__(344); /** - * Functions below are used inside compiled validations function + * Reads a (potentially) variable length off the BER buffer. This call is + * not really meant to be called directly, as callers have to manipulate + * the internal buffer afterwards. + * + * As a result of this call, you can call `Reader.length`, until the + * next thing called that does a readLength. + * + * @return {Number} the amount of offset to advance the buffer. + * @throws {InvalidAsn1Error} on bad ASN.1 */ +Reader.prototype.readLength = function (offset) { + if (offset === undefined) + offset = this._offset; -var co = __webpack_require__(383); -var ucs2length = util.ucs2length; -var equal = __webpack_require__(204); + if (offset >= this._size) + return null; -// this error is thrown by async schemas to return validation errors via exception -var ValidationError = errorClasses.Validation; + var lenB = this._buf[offset++] & 0xff; + if (lenB === null) + return null; -module.exports = compile; + if ((lenB & 0x80) === 0x80) { + lenB &= 0x7f; + + if (lenB === 0) + throw newInvalidAsn1Error('Indefinite length not supported'); + + if (lenB > 4) + throw newInvalidAsn1Error('encoding too long'); + + if (this._size - offset < lenB) + return null; + + this._len = 0; + for (var i = 0; i < lenB; i++) + this._len = (this._len << 8) + (this._buf[offset++] & 0xff); + + } else { + // Wasn't a variable length + this._len = lenB; + } + + return offset; +}; /** - * Compiles schema to validation function - * @this Ajv - * @param {Object} schema schema object - * @param {Object} root object with information about the root schema for this schema - * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution - * @param {String} baseId base ID for IDs in the schema - * @return {Function} validation function + * Parses the next sequence in this BER buffer. + * + * To get the length of the sequence, call `Reader.length`. + * + * @return {Number} the sequence's tag. */ -function compile(schema, root, localRefs, baseId) { - /* jshint validthis: true, evil: true */ - /* eslint no-shadow: 0 */ - var self = this - , opts = this._opts - , refVal = [ undefined ] - , refs = {} - , patterns = [] - , patternsHash = {} - , defaults = [] - , defaultsHash = {} - , customRules = []; +Reader.prototype.readSequence = function (tag) { + var seq = this.peek(); + if (seq === null) + return null; + if (tag !== undefined && tag !== seq) + throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + + ': got 0x' + seq.toString(16)); - root = root || { schema: schema, refVal: refVal, refs: refs }; + var o = this.readLength(this._offset + 1); // stored in `length` + if (o === null) + return null; - var c = checkCompiling.call(this, schema, root, baseId); - var compilation = this._compilations[c.index]; - if (c.compiling) return (compilation.callValidate = callValidate); + this._offset = o; + return seq; +}; - var formats = this._formats; - var RULES = this.RULES; - try { - var v = localCompile(schema, root, localRefs, baseId); - compilation.validate = v; - var cv = compilation.callValidate; - if (cv) { - cv.schema = v.schema; - cv.errors = null; - cv.refs = v.refs; - cv.refVal = v.refVal; - cv.root = v.root; - cv.$async = v.$async; - if (opts.sourceCode) cv.source = v.source; - } - return v; - } finally { - endCompiling.call(this, schema, root, baseId); - } +Reader.prototype.readInt = function () { + return this._readTag(ASN1.Integer); +}; - function callValidate() { - var validate = compilation.validate; - var result = validate.apply(null, arguments); - callValidate.errors = validate.errors; - return result; - } - function localCompile(_schema, _root, localRefs, baseId) { - var isRoot = !_root || (_root && _root.schema == _schema); - if (_root.schema != root.schema) - return compile.call(self, _schema, _root, localRefs, baseId); +Reader.prototype.readBoolean = function () { + return (this._readTag(ASN1.Boolean) === 0 ? false : true); +}; - var $async = _schema.$async === true; - var sourceCode = validateGenerator({ - isTop: true, - schema: _schema, - isRoot: isRoot, - baseId: baseId, - root: _root, - schemaPath: '', - errSchemaPath: '#', - errorPath: '""', - MissingRefError: errorClasses.MissingRef, - RULES: RULES, - validate: validateGenerator, - util: util, - resolve: resolve, - resolveRef: resolveRef, - usePattern: usePattern, - useDefault: useDefault, - useCustomRule: useCustomRule, - opts: opts, - formats: formats, - logger: self.logger, - self: self - }); +Reader.prototype.readEnumeration = function () { + return this._readTag(ASN1.Enumeration); +}; - sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode) - + vars(defaults, defaultCode) + vars(customRules, customRuleCode) - + sourceCode; - if (opts.processCode) sourceCode = opts.processCode(sourceCode); - // console.log('\n\n\n *** \n', JSON.stringify(sourceCode)); - var validate; - try { - var makeValidate = new Function( - 'self', - 'RULES', - 'formats', - 'root', - 'refVal', - 'defaults', - 'customRules', - 'co', - 'equal', - 'ucs2length', - 'ValidationError', - sourceCode - ); +Reader.prototype.readString = function (tag, retbuf) { + if (!tag) + tag = ASN1.OctetString; - validate = makeValidate( - self, - RULES, - formats, - root, - refVal, - defaults, - customRules, - co, - equal, - ucs2length, - ValidationError - ); + var b = this.peek(); + if (b === null) + return null; - refVal[0] = validate; - } catch(e) { - self.logger.error('Error compiling schema, function code:', sourceCode); - throw e; - } + if (b !== tag) + throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + + ': got 0x' + b.toString(16)); - validate.schema = _schema; - validate.errors = null; - validate.refs = refs; - validate.refVal = refVal; - validate.root = isRoot ? validate : _root; - if ($async) validate.$async = true; - if (opts.sourceCode === true) { - validate.source = { - code: sourceCode, - patterns: patterns, - defaults: defaults - }; - } + var o = this.readLength(this._offset + 1); // stored in `length` - return validate; - } + if (o === null) + return null; - function resolveRef(baseId, ref, isRoot) { - ref = resolve.url(baseId, ref); - var refIndex = refs[ref]; - var _refVal, refCode; - if (refIndex !== undefined) { - _refVal = refVal[refIndex]; - refCode = 'refVal[' + refIndex + ']'; - return resolvedRef(_refVal, refCode); - } - if (!isRoot && root.refs) { - var rootRefId = root.refs[ref]; - if (rootRefId !== undefined) { - _refVal = root.refVal[rootRefId]; - refCode = addLocalRef(ref, _refVal); - return resolvedRef(_refVal, refCode); - } - } + if (this.length > this._size - o) + return null; - refCode = addLocalRef(ref); - var v = resolve.call(self, localCompile, root, ref); - if (v === undefined) { - var localSchema = localRefs && localRefs[ref]; - if (localSchema) { - v = resolve.inlineRef(localSchema, opts.inlineRefs) - ? localSchema - : compile.call(self, localSchema, root, localRefs, baseId); - } - } + this._offset = o; - if (v === undefined) { - removeLocalRef(ref); - } else { - replaceLocalRef(ref, v); - return resolvedRef(v, refCode); - } - } + if (this.length === 0) + return retbuf ? Buffer.alloc(0) : ''; - function addLocalRef(ref, v) { - var refId = refVal.length; - refVal[refId] = v; - refs[ref] = refId; - return 'refVal' + refId; - } + var str = this._buf.slice(this._offset, this._offset + this.length); + this._offset += this.length; - function removeLocalRef(ref) { - delete refs[ref]; - } + return retbuf ? str : str.toString('utf8'); +}; - function replaceLocalRef(ref, v) { - var refId = refs[ref]; - refVal[refId] = v; - } +Reader.prototype.readOID = function (tag) { + if (!tag) + tag = ASN1.OID; - function resolvedRef(refVal, code) { - return typeof refVal == 'object' || typeof refVal == 'boolean' - ? { code: code, schema: refVal, inline: true } - : { code: code, $async: refVal && refVal.$async }; - } + var b = this.readString(tag, true); + if (b === null) + return null; - function usePattern(regexStr) { - var index = patternsHash[regexStr]; - if (index === undefined) { - index = patternsHash[regexStr] = patterns.length; - patterns[index] = regexStr; - } - return 'pattern' + index; - } + var values = []; + var value = 0; - function useDefault(value) { - switch (typeof value) { - case 'boolean': - case 'number': - return '' + value; - case 'string': - return util.toQuotedString(value); - case 'object': - if (value === null) return 'null'; - var valueStr = stableStringify(value); - var index = defaultsHash[valueStr]; - if (index === undefined) { - index = defaultsHash[valueStr] = defaults.length; - defaults[index] = value; - } - return 'default' + index; + for (var i = 0; i < b.length; i++) { + var byte = b[i] & 0xff; + + value <<= 7; + value += byte & 0x7f; + if ((byte & 0x80) === 0) { + values.push(value); + value = 0; } } - function useCustomRule(rule, schema, parentSchema, it) { - var validateSchema = rule.definition.validateSchema; - if (validateSchema && self._opts.validateSchema !== false) { - var valid = validateSchema(schema); - if (!valid) { - var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors); - if (self._opts.validateSchema == 'log') self.logger.error(message); - else throw new Error(message); - } - } + value = values.shift(); + values.unshift(value % 40); + values.unshift((value / 40) >> 0); - var compile = rule.definition.compile - , inline = rule.definition.inline - , macro = rule.definition.macro; + return values.join('.'); +}; - var validate; - if (compile) { - validate = compile.call(self, schema, parentSchema, it); - } else if (macro) { - validate = macro.call(self, schema, parentSchema, it); - if (opts.validateSchema !== false) self.validateSchema(validate, true); - } else if (inline) { - validate = inline.call(self, it, rule.keyword, schema, parentSchema); - } else { - validate = rule.definition.validate; - if (!validate) return; - } - if (validate === undefined) - throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); +Reader.prototype._readTag = function (tag) { + assert.ok(tag !== undefined); - var index = customRules.length; - customRules[index] = validate; + var b = this.peek(); - return { - code: 'customRule' + index, - validate: validate - }; - } -} + if (b === null) + return null; + if (b !== tag) + throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + + ': got 0x' + b.toString(16)); -/** - * Checks if the schema is currently compiled - * @this Ajv - * @param {Object} schema schema to compile - * @param {Object} root root object - * @param {String} baseId base schema ID - * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean) - */ -function checkCompiling(schema, root, baseId) { - /* jshint validthis: true */ - var index = compIndex.call(this, schema, root, baseId); - if (index >= 0) return { index: index, compiling: true }; - index = this._compilations.length; - this._compilations[index] = { - schema: schema, - root: root, - baseId: baseId - }; - return { index: index, compiling: false }; -} + var o = this.readLength(this._offset + 1); // stored in `length` + if (o === null) + return null; + if (this.length > 4) + throw newInvalidAsn1Error('Integer too long: ' + this.length); -/** - * Removes the schema from the currently compiled list - * @this Ajv - * @param {Object} schema schema to compile - * @param {Object} root root object - * @param {String} baseId base schema ID - */ -function endCompiling(schema, root, baseId) { - /* jshint validthis: true */ - var i = compIndex.call(this, schema, root, baseId); - if (i >= 0) this._compilations.splice(i, 1); -} + if (this.length > this._size - o) + return null; + this._offset = o; + var fb = this._buf[this._offset]; + var value = 0; -/** - * Index of schema compilation in the currently compiled list - * @this Ajv - * @param {Object} schema schema to compile - * @param {Object} root root object - * @param {String} baseId base schema ID - * @return {Integer} compilation index - */ -function compIndex(schema, root, baseId) { - /* jshint validthis: true */ - for (var i=0; i> 0; +}; -function defaultCode(i) { - return 'var default' + i + ' = defaults[' + i + '];'; -} +// --- Exported API -function refValCode(i, refVal) { - return refVal[i] === undefined ? '' : 'var refVal' + i + ' = refVal[' + i + '];'; -} +module.exports = Reader; -function customRuleCode(i) { - return 'var customRule' + i + ' = customRules[' + i + '];'; -} +/***/ }), +/* 484 */ +/***/ (function(module, exports, __webpack_require__) { +// Copyright 2011 Mark Cavage All rights reserved. -function vars(arr, statement) { - if (!arr.length) return ''; - var code = ''; - for (var i=0; i= 0xD800 && value <= 0xDBFF && pos < len) { - // high surrogate, and there is a next character - value = str.charCodeAt(pos); - if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate - } + // A list of offsets in the buffer where we need to insert + // sequence tag/len pairs. + this._seq = []; +} + +Object.defineProperty(Writer.prototype, 'buffer', { + get: function () { + if (this._seq.length) + throw newInvalidAsn1Error(this._seq.length + ' unended sequence(s)'); + + return (this._buf.slice(0, this._offset)); } - return length; +}); + +Writer.prototype.writeByte = function (b) { + if (typeof (b) !== 'number') + throw new TypeError('argument must be a Number'); + + this._ensure(1); + this._buf[this._offset++] = b; }; -/***/ }), -/* 481 */ -/***/ (function(module, exports, __webpack_require__) { +Writer.prototype.writeInt = function (i, tag) { + if (typeof (i) !== 'number') + throw new TypeError('argument must be a Number'); + if (typeof (tag) !== 'number') + tag = ASN1.Integer; -"use strict"; + var sz = 4; -module.exports = function generate_allOf(it, $keyword, $ruleType) { - var out = ' '; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $currentBaseId = $it.baseId, - $allSchemasEmpty = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if (it.util.schemaHasRules($sch, it.RULES.all)) { - $allSchemasEmpty = false; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - if ($breakOnError) { - if ($allSchemasEmpty) { - out += ' if (true) { '; - } else { - out += ' ' + ($closingBraces.slice(0, -1)) + ' '; - } + while ((((i & 0xff800000) === 0) || ((i & 0xff800000) === 0xff800000 >> 0)) && + (sz > 1)) { + sz--; + i <<= 8; } - out = it.util.cleanUpCode(out); - return out; -} + if (sz > 4) + throw newInvalidAsn1Error('BER ints cannot be > 0xffffffff'); -/***/ }), -/* 482 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; + this._ensure(2 + sz); + this._buf[this._offset++] = tag; + this._buf[this._offset++] = sz; -module.exports = function generate_anyOf(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $noEmptySchema = $schema.every(function($sch) { - return it.util.schemaHasRules($sch, it.RULES.all); - }); - if ($noEmptySchema) { - var $currentBaseId = $it.baseId; - out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { '; - $closingBraces += '}'; - } - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should match some schema in anyOf\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; return false; '; - } - } - out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - if (it.opts.allErrors) { - out += ' } '; - } - out = it.util.cleanUpCode(out); - } else { - if ($breakOnError) { - out += ' if (true) { '; - } + while (sz-- > 0) { + this._buf[this._offset++] = ((i & 0xff000000) >>> 24); + i <<= 8; } - return out; -} +}; -/***/ }), -/* 483 */ -/***/ (function(module, exports, __webpack_require__) { -"use strict"; +Writer.prototype.writeNull = function () { + this.writeByte(ASN1.Null); + this.writeByte(0x00); +}; -module.exports = function generate_const(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (!$isData) { - out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';'; - } - out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should be equal to constant\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' }'; - if ($breakOnError) { - out += ' else { '; + +Writer.prototype.writeEnumeration = function (i, tag) { + if (typeof (i) !== 'number') + throw new TypeError('argument must be a Number'); + if (typeof (tag) !== 'number') + tag = ASN1.Enumeration; + + return this.writeInt(i, tag); +}; + + +Writer.prototype.writeBoolean = function (b, tag) { + if (typeof (b) !== 'boolean') + throw new TypeError('argument must be a Boolean'); + if (typeof (tag) !== 'number') + tag = ASN1.Boolean; + + this._ensure(3); + this._buf[this._offset++] = tag; + this._buf[this._offset++] = 0x01; + this._buf[this._offset++] = b ? 0xff : 0x00; +}; + + +Writer.prototype.writeString = function (s, tag) { + if (typeof (s) !== 'string') + throw new TypeError('argument must be a string (was: ' + typeof (s) + ')'); + if (typeof (tag) !== 'number') + tag = ASN1.OctetString; + + var len = Buffer.byteLength(s); + this.writeByte(tag); + this.writeLength(len); + if (len) { + this._ensure(len); + this._buf.write(s, this._offset); + this._offset += len; } - return out; -} +}; -/***/ }), -/* 484 */ -/***/ (function(module, exports, __webpack_require__) { +Writer.prototype.writeBuffer = function (buf, tag) { + if (typeof (tag) !== 'number') + throw new TypeError('tag must be a number'); + if (!Buffer.isBuffer(buf)) + throw new TypeError('argument must be a buffer'); -"use strict"; + this.writeByte(tag); + this.writeLength(buf.length); + this._ensure(buf.length); + buf.copy(this._buf, this._offset, 0, buf.length); + this._offset += buf.length; +}; -module.exports = function generate_contains(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $idx = 'i' + $lvl, - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $currentBaseId = it.baseId, - $nonEmptySchema = it.util.schemaHasRules($schema, it.RULES.all); - out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; - if ($nonEmptySchema) { - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + +Writer.prototype.writeStringArray = function (strings) { + if ((!strings instanceof Array)) + throw new TypeError('argument must be an Array[String]'); + + var self = this; + strings.forEach(function (s) { + self.writeString(s); + }); +}; + +// This is really to solve DER cases, but whatever for now +Writer.prototype.writeOID = function (s, tag) { + if (typeof (s) !== 'string') + throw new TypeError('argument must be a string'); + if (typeof (tag) !== 'number') + tag = ASN1.OID; + + if (!/^([0-9]+\.){3,}[0-9]+$/.test(s)) + throw new Error('argument is not a valid OID string'); + + function encodeOctet(bytes, octet) { + if (octet < 128) { + bytes.push(octet); + } else if (octet < 16384) { + bytes.push((octet >>> 7) | 0x80); + bytes.push(octet & 0x7F); + } else if (octet < 2097152) { + bytes.push((octet >>> 14) | 0x80); + bytes.push(((octet >>> 7) | 0x80) & 0xFF); + bytes.push(octet & 0x7F); + } else if (octet < 268435456) { + bytes.push((octet >>> 21) | 0x80); + bytes.push(((octet >>> 14) | 0x80) & 0xFF); + bytes.push(((octet >>> 7) | 0x80) & 0xFF); + bytes.push(octet & 0x7F); } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + bytes.push(((octet >>> 28) | 0x80) & 0xFF); + bytes.push(((octet >>> 21) | 0x80) & 0xFF); + bytes.push(((octet >>> 14) | 0x80) & 0xFF); + bytes.push(((octet >>> 7) | 0x80) & 0xFF); + bytes.push(octet & 0x7F); } - out += ' if (' + ($nextValid) + ') break; } '; - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {'; - } else { - out += ' if (' + ($data) + '.length == 0) {'; } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should contain a valid item\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; + + var tmp = s.split('.'); + var bytes = []; + bytes.push(parseInt(tmp[0], 10) * 40 + parseInt(tmp[1], 10)); + tmp.slice(2).forEach(function (b) { + encodeOctet(bytes, parseInt(b, 10)); + }); + + var self = this; + this._ensure(2 + bytes.length); + this.writeByte(tag); + this.writeLength(bytes.length); + bytes.forEach(function (b) { + self.writeByte(b); + }); +}; + + +Writer.prototype.writeLength = function (len) { + if (typeof (len) !== 'number') + throw new TypeError('argument must be a Number'); + + this._ensure(4); + + if (len <= 0x7f) { + this._buf[this._offset++] = len; + } else if (len <= 0xff) { + this._buf[this._offset++] = 0x81; + this._buf[this._offset++] = len; + } else if (len <= 0xffff) { + this._buf[this._offset++] = 0x82; + this._buf[this._offset++] = len >> 8; + this._buf[this._offset++] = len; + } else if (len <= 0xffffff) { + this._buf[this._offset++] = 0x83; + this._buf[this._offset++] = len >> 16; + this._buf[this._offset++] = len >> 8; + this._buf[this._offset++] = len; } else { - out += ' {} '; + throw newInvalidAsn1Error('Length too long (> 4 bytes)'); } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } +}; + +Writer.prototype.startSequence = function (tag) { + if (typeof (tag) !== 'number') + tag = ASN1.Sequence | ASN1.Constructor; + + this.writeByte(tag); + this._seq.push(this._offset); + this._ensure(3); + this._offset += 3; +}; + + +Writer.prototype.endSequence = function () { + var seq = this._seq.pop(); + var start = seq + 3; + var len = this._offset - start; + + if (len <= 0x7f) { + this._shift(start, len, -2); + this._buf[seq] = len; + } else if (len <= 0xff) { + this._shift(start, len, -1); + this._buf[seq] = 0x81; + this._buf[seq + 1] = len; + } else if (len <= 0xffff) { + this._buf[seq] = 0x82; + this._buf[seq + 1] = len >> 8; + this._buf[seq + 2] = len; + } else if (len <= 0xffffff) { + this._shift(start, len, 1); + this._buf[seq] = 0x83; + this._buf[seq + 1] = len >> 16; + this._buf[seq + 2] = len >> 8; + this._buf[seq + 3] = len; } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; - if ($nonEmptySchema) { - out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + throw newInvalidAsn1Error('Sequence too long'); } - if (it.opts.allErrors) { - out += ' } '; +}; + + +Writer.prototype._shift = function (start, len, shift) { + assert.ok(start !== undefined); + assert.ok(len !== undefined); + assert.ok(shift); + + this._buf.copy(this._buf, start + shift, start, start + len); + this._offset += shift; +}; + +Writer.prototype._ensure = function (len) { + assert.ok(len); + + if (this._size - this._offset < len) { + var sz = this._size * this._options.growthFactor; + if (sz - this._offset < len) + sz += len; + + var buf = Buffer.alloc(sz); + + this._buf.copy(buf, 0, 0, this._offset); + this._buf = buf; + this._size = sz; } - out = it.util.cleanUpCode(out); - return out; -} +}; + + + +// --- Exported API + +module.exports = Writer; /***/ }), /* 485 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - -module.exports = function generate_custom(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $rule = this, - $definition = 'definition' + $lvl, - $rDef = $rule.definition, - $closingBraces = ''; - var $compile, $inline, $macro, $ruleValidate, $validateCode; - if ($isData && $rDef.$data) { - $validateCode = 'keywordValidate' + $lvl; - var $validateSchema = $rDef.validateSchema; - out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;'; - } else { - $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); - if (!$ruleValidate) return; - $schemaValue = 'validate.schema' + $schemaPath; - $validateCode = $ruleValidate.code; - $compile = $rDef.compile; - $inline = $rDef.inline; - $macro = $rDef.macro; - } - var $ruleErrs = $validateCode + '.errors', - $i = 'i' + $lvl, - $ruleErr = 'ruleErr' + $lvl, - $asyncKeyword = $rDef.async; - if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema'); - if (!($inline || $macro)) { - out += '' + ($ruleErrs) + ' = null;'; - } - out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; - if ($isData && $rDef.$data) { - $closingBraces += '}'; - out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { '; - if ($validateSchema) { - $closingBraces += '}'; - out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { '; - } - } - if ($inline) { - if ($rDef.statements) { - out += ' ' + ($ruleValidate.validate) + ' '; - } else { - out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; '; - } - } else if ($macro) { - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - $it.schema = $ruleValidate.validate; - $it.schemaPath = ''; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' ' + ($code); - } else { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - out += ' ' + ($validateCode) + '.call( '; - if (it.opts.passContext) { - out += 'this'; - } else { - out += 'self'; - } - if ($compile || $rDef.schema === false) { - out += ' , ' + ($data) + ' '; - } else { - out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' '; - } - out += ' , (dataPath || \'\')'; - if (it.errorPath != '""') { - out += ' + ' + (it.errorPath); - } - var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', - $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; - out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) '; - var def_callRuleValidate = out; - out = $$outStack.pop(); - if ($rDef.errors === false) { - out += ' ' + ($valid) + ' = '; - if ($asyncKeyword) { - out += '' + (it.yieldAwait); - } - out += '' + (def_callRuleValidate) + '; '; - } else { - if ($asyncKeyword) { - $ruleErrs = 'customErrors' + $lvl; - out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = ' + (it.yieldAwait) + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } '; - } else { - out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; '; - } - } - } - if ($rDef.modifying) { - out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];'; - } - out += '' + ($closingBraces); - if ($rDef.valid) { - if ($breakOnError) { - out += ' if (true) { '; - } - } else { - out += ' if ( '; - if ($rDef.valid === undefined) { - out += ' !'; - if ($macro) { - out += '' + ($nextValid); - } else { - out += '' + ($valid); - } - } else { - out += ' ' + (!$rDef.valid) + ' '; - } - out += ') { '; - $errorKeyword = $rule.keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - var def_customError = out; - out = $$outStack.pop(); - if ($inline) { - if ($rDef.errors) { - if ($rDef.errors != 'full') { - out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '= 0) { - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } else { - throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); - } - } - var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate; - var $formatType = $isObject && $format.type || 'string'; - if ($isObject) { - var $async = $format.async === true; - $format = $format.validate; - } - if ($formatType != $ruleType) { - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } - if ($async) { - if (!it.async) throw new Error('async format in sync schema'); - var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; - out += ' if (!(' + (it.yieldAwait) + ' ' + ($formatRef) + '(' + ($data) + '))) { '; - } else { - out += ' if (! '; - var $formatRef = 'formats' + it.util.getProperty($schema); - if ($isObject) $formatRef += '.validate'; - if (typeof $format == 'function') { - out += ' ' + ($formatRef) + '(' + ($data) + ') '; - } else { - out += ' ' + ($formatRef) + '.test(' + ($data) + ') '; - } - out += ') { '; - } - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: '; - if ($isData) { - out += '' + ($schemaValue); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match format "'; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + (it.util.escapeQuotes($schema)); - } - out += '"\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - return out; +// Public API +module.exports = serial; + +/** + * Runs iterator over provided array elements in series + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function serial(list, iterator, callback) +{ + return serialOrdered(list, iterator, null, callback); } @@ -91514,954 +90891,794 @@ module.exports = function generate_format(it, $keyword, $ruleType) { /* 489 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; -module.exports = function generate_items(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $idx = 'i' + $lvl, - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $currentBaseId = it.baseId; - out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; - if (Array.isArray($schema)) { - var $additionalItems = it.schema.additionalItems; - if ($additionalItems === false) { - out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; '; - var $currErrSchemaPath = $errSchemaPath; - $errSchemaPath = it.errSchemaPath + '/additionalItems'; - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' '; - } - if (it.opts.verbose) { - out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - $errSchemaPath = $currErrSchemaPath; - if ($breakOnError) { - $closingBraces += '}'; - out += ' else { '; - } - } - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if (it.util.schemaHasRules($sch, it.RULES.all)) { - out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { '; - var $passData = $data + '[' + $i + ']'; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); - $it.dataPathArr[$dataNxt] = $i; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - if (typeof $additionalItems == 'object' && it.util.schemaHasRules($additionalItems, it.RULES.all)) { - $it.schema = $additionalItems; - $it.schemaPath = it.schemaPath + '.additionalItems'; - $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; - out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - out += ' } } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } else if (it.util.schemaHasRules($schema, it.RULES.all)) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - out += ' }'; - } - if ($breakOnError) { - out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; +/*! + * Copyright 2010 LearnBoost + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Module dependencies. + */ + +var crypto = __webpack_require__(11) + , parse = __webpack_require__(24).parse + ; + +/** + * Valid keys. + */ + +var keys = + [ 'acl' + , 'location' + , 'logging' + , 'notification' + , 'partNumber' + , 'policy' + , 'requestPayment' + , 'torrent' + , 'uploadId' + , 'uploads' + , 'versionId' + , 'versioning' + , 'versions' + , 'website' + ] + +/** + * Return an "Authorization" header value with the given `options` + * in the form of "AWS :" + * + * @param {Object} options + * @return {String} + * @api private + */ + +function authorization (options) { + return 'AWS ' + options.key + ':' + sign(options) +} + +module.exports = authorization +module.exports.authorization = authorization + +/** + * Simple HMAC-SHA1 Wrapper + * + * @param {Object} options + * @return {String} + * @api private + */ + +function hmacSha1 (options) { + return crypto.createHmac('sha1', options.secret).update(options.message).digest('base64') +} + +module.exports.hmacSha1 = hmacSha1 + +/** + * Create a base64 sha1 HMAC for `options`. + * + * @param {Object} options + * @return {String} + * @api private + */ + +function sign (options) { + options.message = stringToSign(options) + return hmacSha1(options) +} +module.exports.sign = sign + +/** + * Create a base64 sha1 HMAC for `options`. + * + * Specifically to be used with S3 presigned URLs + * + * @param {Object} options + * @return {String} + * @api private + */ + +function signQuery (options) { + options.message = queryStringToSign(options) + return hmacSha1(options) +} +module.exports.signQuery= signQuery + +/** + * Return a string for sign() with the given `options`. + * + * Spec: + * + * \n + * \n + * \n + * \n + * [headers\n] + * + * + * @param {Object} options + * @return {String} + * @api private + */ + +function stringToSign (options) { + var headers = options.amazonHeaders || '' + if (headers) headers += '\n' + var r = + [ options.verb + , options.md5 + , options.contentType + , options.date ? options.date.toUTCString() : '' + , headers + options.resource + ] + return r.join('\n') +} +module.exports.stringToSign = stringToSign + +/** + * Return a string for sign() with the given `options`, but is meant exclusively + * for S3 presigned URLs + * + * Spec: + * + * \n + * + * + * @param {Object} options + * @return {String} + * @api private + */ + +function queryStringToSign (options){ + return 'GET\n\n\n' + options.date + '\n' + options.resource +} +module.exports.queryStringToSign = queryStringToSign + +/** + * Perform the following: + * + * - ignore non-amazon headers + * - lowercase fields + * - sort lexicographically + * - trim whitespace between ":" + * - join with newline + * + * @param {Object} headers + * @return {String} + * @api private + */ + +function canonicalizeHeaders (headers) { + var buf = [] + , fields = Object.keys(headers) + ; + for (var i = 0, len = fields.length; i < len; ++i) { + var field = fields[i] + , val = headers[field] + , field = field.toLowerCase() + ; + if (0 !== field.indexOf('x-amz')) continue + buf.push(field + ':' + val) } - out = it.util.cleanUpCode(out); - return out; + return buf.sort().join('\n') +} +module.exports.canonicalizeHeaders = canonicalizeHeaders + +/** + * Perform the following: + * + * - ignore non sub-resources + * - sort lexicographically + * + * @param {String} resource + * @return {String} + * @api private + */ + +function canonicalizeResource (resource) { + var url = parse(resource, true) + , path = url.pathname + , buf = [] + ; + + Object.keys(url.query).forEach(function(key){ + if (!~keys.indexOf(key)) return + var val = '' == url.query[key] ? '' : '=' + encodeURIComponent(url.query[key]) + buf.push(key + val) + }) + + return path + (buf.length ? '?' + buf.sort().join('&') : '') } +module.exports.canonicalizeResource = canonicalizeResource /***/ }), /* 490 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var aws4 = exports, + url = __webpack_require__(24), + querystring = __webpack_require__(197), + crypto = __webpack_require__(11), + lru = __webpack_require__(491), + credentialsCache = lru(1000) -module.exports = function generate_multipleOf(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - out += 'var division' + ($lvl) + ';if ('; - if ($isData) { - out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || '; +// http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html + +function hmac(key, string, encoding) { + return crypto.createHmac('sha256', key).update(string, 'utf8').digest(encoding) +} + +function hash(string, encoding) { + return crypto.createHash('sha256').update(string, 'utf8').digest(encoding) +} + +// This function assumes the string has already been percent encoded +function encodeRfc3986(urlEncodedString) { + return urlEncodedString.replace(/[!'()*]/g, function(c) { + return '%' + c.charCodeAt(0).toString(16).toUpperCase() + }) +} + +// request: { path | body, [host], [method], [headers], [service], [region] } +// credentials: { accessKeyId, secretAccessKey, [sessionToken] } +function RequestSigner(request, credentials) { + + if (typeof request === 'string') request = url.parse(request) + + var headers = request.headers = (request.headers || {}), + hostParts = this.matchHost(request.hostname || request.host || headers.Host || headers.host) + + this.request = request + this.credentials = credentials || this.defaultCredentials() + + this.service = request.service || hostParts[0] || '' + this.region = request.region || hostParts[1] || 'us-east-1' + + // SES uses a different domain from the service name + if (this.service === 'email') this.service = 'ses' + + if (!request.method && request.body) + request.method = 'POST' + + if (!headers.Host && !headers.host) { + headers.Host = request.hostname || request.host || this.createHost() + + // If a port is specified explicitly, use it as is + if (request.port) + headers.Host += ':' + request.port } - out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', '; - if (it.opts.multipleOfPrecision) { - out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' '; + if (!request.hostname && !request.host) + request.hostname = headers.Host || headers.host + + this.isCodeCommitGit = this.service === 'codecommit' && request.method === 'GIT' +} + +RequestSigner.prototype.matchHost = function(host) { + var match = (host || '').match(/([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com$/) + var hostParts = (match || []).slice(1, 3) + + // ES's hostParts are sometimes the other way round, if the value that is expected + // to be region equals ‘es’ switch them back + // e.g. search-cluster-name-aaaa00aaaa0aaa0aaaaaaa0aaa.us-east-1.es.amazonaws.com + if (hostParts[1] === 'es') + hostParts = hostParts.reverse() + + return hostParts +} + +// http://docs.aws.amazon.com/general/latest/gr/rande.html +RequestSigner.prototype.isSingleRegion = function() { + // Special case for S3 and SimpleDB in us-east-1 + if (['s3', 'sdb'].indexOf(this.service) >= 0 && this.region === 'us-east-1') return true + + return ['cloudfront', 'ls', 'route53', 'iam', 'importexport', 'sts'] + .indexOf(this.service) >= 0 +} + +RequestSigner.prototype.createHost = function() { + var region = this.isSingleRegion() ? '' : + (this.service === 's3' && this.region !== 'us-east-1' ? '-' : '.') + this.region, + service = this.service === 'ses' ? 'email' : this.service + return service + region + '.amazonaws.com' +} + +RequestSigner.prototype.prepareRequest = function() { + this.parsePath() + + var request = this.request, headers = request.headers, query + + if (request.signQuery) { + + this.parsedPath.query = query = this.parsedPath.query || {} + + if (this.credentials.sessionToken) + query['X-Amz-Security-Token'] = this.credentials.sessionToken + + if (this.service === 's3' && !query['X-Amz-Expires']) + query['X-Amz-Expires'] = 86400 + + if (query['X-Amz-Date']) + this.datetime = query['X-Amz-Date'] + else + query['X-Amz-Date'] = this.getDateTime() + + query['X-Amz-Algorithm'] = 'AWS4-HMAC-SHA256' + query['X-Amz-Credential'] = this.credentials.accessKeyId + '/' + this.credentialString() + query['X-Amz-SignedHeaders'] = this.signedHeaders() + } else { - out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') '; - } - out += ' ) '; - if ($isData) { - out += ' ) '; - } - out += ' ) { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be multiple of '; - if ($isData) { - out += '\' + ' + ($schemaValue); - } else { - out += '' + ($schemaValue) + '\''; - } - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + + if (!request.doNotModifyHeaders && !this.isCodeCommitGit) { + if (request.body && !headers['Content-Type'] && !headers['content-type']) + headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=utf-8' + + if (request.body && !headers['Content-Length'] && !headers['content-length']) + headers['Content-Length'] = Buffer.byteLength(request.body) + + if (this.credentials.sessionToken && !headers['X-Amz-Security-Token'] && !headers['x-amz-security-token']) + headers['X-Amz-Security-Token'] = this.credentials.sessionToken + + if (this.service === 's3' && !headers['X-Amz-Content-Sha256'] && !headers['x-amz-content-sha256']) + headers['X-Amz-Content-Sha256'] = hash(this.request.body || '', 'hex') + + if (headers['X-Amz-Date'] || headers['x-amz-date']) + this.datetime = headers['X-Amz-Date'] || headers['x-amz-date'] + else + headers['X-Amz-Date'] = this.getDateTime() } - out += ' } '; - } else { - out += ' {} '; + + delete headers.Authorization + delete headers.authorization } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } +} + +RequestSigner.prototype.sign = function() { + if (!this.parsedPath) this.prepareRequest() + + if (this.request.signQuery) { + this.parsedPath.query['X-Amz-Signature'] = this.signature() } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + this.request.headers.Authorization = this.authHeader() } - out += '} '; - if ($breakOnError) { - out += ' else { '; + + this.request.path = this.formatPath() + + return this.request +} + +RequestSigner.prototype.getDateTime = function() { + if (!this.datetime) { + var headers = this.request.headers, + date = new Date(headers.Date || headers.date || new Date) + + this.datetime = date.toISOString().replace(/[:\-]|\.\d{3}/g, '') + + // Remove the trailing 'Z' on the timestamp string for CodeCommit git access + if (this.isCodeCommitGit) this.datetime = this.datetime.slice(0, -1) } - return out; + return this.datetime } +RequestSigner.prototype.getDate = function() { + return this.getDateTime().substr(0, 8) +} -/***/ }), -/* 491 */ -/***/ (function(module, exports, __webpack_require__) { +RequestSigner.prototype.authHeader = function() { + return [ + 'AWS4-HMAC-SHA256 Credential=' + this.credentials.accessKeyId + '/' + this.credentialString(), + 'SignedHeaders=' + this.signedHeaders(), + 'Signature=' + this.signature(), + ].join(', ') +} -"use strict"; +RequestSigner.prototype.signature = function() { + var date = this.getDate(), + cacheKey = [this.credentials.secretAccessKey, date, this.region, this.service].join(), + kDate, kRegion, kService, kCredentials = credentialsCache.get(cacheKey) + if (!kCredentials) { + kDate = hmac('AWS4' + this.credentials.secretAccessKey, date) + kRegion = hmac(kDate, this.region) + kService = hmac(kRegion, this.service) + kCredentials = hmac(kService, 'aws4_request') + credentialsCache.set(cacheKey, kCredentials) + } + return hmac(kCredentials, this.stringToSign(), 'hex') +} -module.exports = function generate_not(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - $it.level++; - var $nextValid = 'valid' + $it.level; - if (it.util.schemaHasRules($schema, it.RULES.all)) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' var ' + ($errs) + ' = errors; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.createErrors = false; - var $allErrorsOption; - if ($it.opts.allErrors) { - $allErrorsOption = $it.opts.allErrors; - $it.opts.allErrors = false; - } - out += ' ' + (it.validate($it)) + ' '; - $it.createErrors = true; - if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' if (' + ($nextValid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT be valid\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - if (it.opts.allErrors) { - out += ' } '; - } +RequestSigner.prototype.stringToSign = function() { + return [ + 'AWS4-HMAC-SHA256', + this.getDateTime(), + this.credentialString(), + hash(this.canonicalString(), 'hex'), + ].join('\n') +} + +RequestSigner.prototype.canonicalString = function() { + if (!this.parsedPath) this.prepareRequest() + + var pathStr = this.parsedPath.path, + query = this.parsedPath.query, + headers = this.request.headers, + queryStr = '', + normalizePath = this.service !== 's3', + decodePath = this.service === 's3' || this.request.doNotEncodePath, + decodeSlashesInPath = this.service === 's3', + firstValOnly = this.service === 's3', + bodyHash + + if (this.service === 's3' && this.request.signQuery) { + bodyHash = 'UNSIGNED-PAYLOAD' + } else if (this.isCodeCommitGit) { + bodyHash = '' } else { - out += ' var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT be valid\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + bodyHash = headers['X-Amz-Content-Sha256'] || headers['x-amz-content-sha256'] || + hash(this.request.body || '', 'hex') + } + + if (query) { + queryStr = encodeRfc3986(querystring.stringify(Object.keys(query).sort().reduce(function(obj, key) { + if (!key) return obj + obj[key] = !Array.isArray(query[key]) ? query[key] : + (firstValOnly ? query[key][0] : query[key].slice().sort()) + return obj + }, {}))) + } + if (pathStr !== '/') { + if (normalizePath) pathStr = pathStr.replace(/\/{2,}/g, '/') + pathStr = pathStr.split('/').reduce(function(path, piece) { + if (normalizePath && piece === '..') { + path.pop() + } else if (!normalizePath || piece !== '.') { + if (decodePath) piece = decodeURIComponent(piece) + path.push(encodeRfc3986(encodeURIComponent(piece))) } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if ($breakOnError) { - out += ' if (false) { '; - } + return path + }, []).join('/') + if (pathStr[0] !== '/') pathStr = '/' + pathStr + if (decodeSlashesInPath) pathStr = pathStr.replace(/%2F/g, '/') } - return out; + + return [ + this.request.method || 'GET', + pathStr, + queryStr, + this.canonicalHeaders() + '\n', + this.signedHeaders(), + bodyHash, + ].join('\n') } +RequestSigner.prototype.canonicalHeaders = function() { + var headers = this.request.headers + function trimAll(header) { + return header.toString().trim().replace(/\s+/g, ' ') + } + return Object.keys(headers) + .sort(function(a, b) { return a.toLowerCase() < b.toLowerCase() ? -1 : 1 }) + .map(function(key) { return key.toLowerCase() + ':' + trimAll(headers[key]) }) + .join('\n') +} -/***/ }), -/* 492 */ -/***/ (function(module, exports, __webpack_require__) { +RequestSigner.prototype.signedHeaders = function() { + return Object.keys(this.request.headers) + .map(function(key) { return key.toLowerCase() }) + .sort() + .join(';') +} -"use strict"; +RequestSigner.prototype.credentialString = function() { + return [ + this.getDate(), + this.region, + this.service, + 'aws4_request', + ].join('/') +} -module.exports = function generate_oneOf(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - out += 'var ' + ($errs) + ' = errors;var prevValid' + ($lvl) + ' = false;var ' + ($valid) + ' = false;'; - var $currentBaseId = $it.baseId; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if (it.util.schemaHasRules($sch, it.RULES.all)) { - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - } else { - out += ' var ' + ($nextValid) + ' = true; '; - } - if ($i) { - out += ' if (' + ($nextValid) + ' && prevValid' + ($lvl) + ') ' + ($valid) + ' = false; else { '; - $closingBraces += '}'; - } - out += ' if (' + ($nextValid) + ') ' + ($valid) + ' = prevValid' + ($lvl) + ' = true;'; - } +RequestSigner.prototype.defaultCredentials = function() { + var env = process.env + return { + accessKeyId: env.AWS_ACCESS_KEY_ID || env.AWS_ACCESS_KEY, + secretAccessKey: env.AWS_SECRET_ACCESS_KEY || env.AWS_SECRET_KEY, + sessionToken: env.AWS_SESSION_TOKEN, } - it.compositeRule = $it.compositeRule = $wasComposite; - out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should match exactly one schema in oneOf\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; +} + +RequestSigner.prototype.parsePath = function() { + var path = this.request.path || '/', + queryIx = path.indexOf('?'), + query = null + + if (queryIx >= 0) { + query = querystring.parse(path.slice(queryIx + 1)) + path = path.slice(0, queryIx) } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; return false; '; - } + + // S3 doesn't always encode characters > 127 correctly and + // all services don't encode characters > 255 correctly + // So if there are non-reserved chars (and it's not already all % encoded), just encode them all + if (/[^0-9A-Za-z!'()*\-._~%/]/.test(path)) { + path = path.split('/').map(function(piece) { + return encodeURIComponent(decodeURIComponent(piece)) + }).join('/') } - out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }'; - if (it.opts.allErrors) { - out += ' } '; + + this.parsedPath = { + path: path, + query: query, } - return out; +} + +RequestSigner.prototype.formatPath = function() { + var path = this.parsedPath.path, + query = this.parsedPath.query + + if (!query) return path + + // Services don't support empty query string keys + if (query[''] != null) delete query[''] + + return path + '?' + encodeRfc3986(querystring.stringify(query)) +} + +aws4.RequestSigner = RequestSigner + +aws4.sign = function(request, credentials) { + return new RequestSigner(request, credentials).sign() } /***/ }), -/* 493 */ -/***/ (function(module, exports, __webpack_require__) { +/* 491 */ +/***/ (function(module, exports) { -"use strict"; +module.exports = function(size) { + return new LruCache(size) +} -module.exports = function generate_pattern(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; +function LruCache(size) { + this.capacity = size | 0 + this.map = Object.create(null) + this.list = new DoublyLinkedList() +} + +LruCache.prototype.get = function(key) { + var node = this.map[key] + if (node == null) return undefined + this.used(node) + return node.val +} + +LruCache.prototype.set = function(key, val) { + var node = this.map[key] + if (node != null) { + node.val = val } else { - $schemaValue = $schema; + if (!this.capacity) this.prune() + if (!this.capacity) return false + node = new DoublyLinkedNode(key, val) + this.map[key] = node + this.capacity-- } - var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema); - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + this.used(node) + return true +} + +LruCache.prototype.used = function(node) { + this.list.moveToFront(node) +} + +LruCache.prototype.prune = function() { + var node = this.list.pop() + if (node != null) { + delete this.map[node.key] + this.capacity++ } - out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: '; - if ($isData) { - out += '' + ($schemaValue); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match pattern "'; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + (it.util.escapeQuotes($schema)); - } - out += '"\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; +} + + +function DoublyLinkedList() { + this.firstNode = null + this.lastNode = null +} + +DoublyLinkedList.prototype.moveToFront = function(node) { + if (this.firstNode == node) return + + this.remove(node) + + if (this.firstNode == null) { + this.firstNode = node + this.lastNode = node + node.prev = null + node.next = null } else { - out += ' {} '; + node.prev = null + node.next = this.firstNode + node.next.prev = node + this.firstNode = node } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; +} + +DoublyLinkedList.prototype.pop = function() { + var lastNode = this.lastNode + if (lastNode != null) { + this.remove(lastNode) } - out += '} '; - if ($breakOnError) { - out += ' else { '; + return lastNode +} + +DoublyLinkedList.prototype.remove = function(node) { + if (this.firstNode == node) { + this.firstNode = node.next + } else if (node.prev != null) { + node.prev.next = node.next } - return out; + if (this.lastNode == node) { + this.lastNode = node.prev + } else if (node.next != null) { + node.next.prev = node.prev + } +} + + +function DoublyLinkedNode(key, val) { + this.key = key + this.val = val + this.prev = null + this.next = null } /***/ }), -/* 494 */ +/* 492 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = function generate_properties(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $key = 'key' + $lvl, - $idx = 'idx' + $lvl, - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $dataProperties = 'dataProperties' + $lvl; - var $schemaKeys = Object.keys($schema || {}), - $pProperties = it.schema.patternProperties || {}, - $pPropertyKeys = Object.keys($pProperties), - $aProperties = it.schema.additionalProperties, - $someProperties = $schemaKeys.length || $pPropertyKeys.length, - $noAdditional = $aProperties === false, - $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length, - $removeAdditional = it.opts.removeAdditional, - $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, - $ownProperties = it.opts.ownProperties, - $currentBaseId = it.baseId; - var $required = it.schema.required; - if ($required && !(it.opts.v5 && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required); - if (it.opts.patternGroups) { - var $pgProperties = it.schema.patternGroups || {}, - $pgPropertyKeys = Object.keys($pgProperties); - } - out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; - if ($ownProperties) { - out += ' var ' + ($dataProperties) + ' = undefined;'; - } - if ($checkAdditional) { - if ($ownProperties) { - out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; - } else { - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; - } - if ($someProperties) { - out += ' var isAdditional' + ($lvl) + ' = !(false '; - if ($schemaKeys.length) { - if ($schemaKeys.length > 5) { - out += ' || validate.schema' + ($schemaPath) + '[' + ($key) + '] '; - } else { - var arr1 = $schemaKeys; - if (arr1) { - var $propertyKey, i1 = -1, - l1 = arr1.length - 1; - while (i1 < l1) { - $propertyKey = arr1[i1 += 1]; - out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' '; - } - } - } - } - if ($pPropertyKeys.length) { - var arr2 = $pPropertyKeys; - if (arr2) { - var $pProperty, $i = -1, - l2 = arr2.length - 1; - while ($i < l2) { - $pProperty = arr2[$i += 1]; - out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') '; - } - } - } - if (it.opts.patternGroups && $pgPropertyKeys.length) { - var arr3 = $pgPropertyKeys; - if (arr3) { - var $pgProperty, $i = -1, - l3 = arr3.length - 1; - while ($i < l3) { - $pgProperty = arr3[$i += 1]; - out += ' || ' + (it.usePattern($pgProperty)) + '.test(' + ($key) + ') '; - } - } - } - out += ' ); if (isAdditional' + ($lvl) + ') { '; - } - if ($removeAdditional == 'all') { - out += ' delete ' + ($data) + '[' + ($key) + ']; '; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function (message) { + return { + useless: true, + run() { + throw new (_errors || _load_errors()).MessageError(message); + }, + setFlags: () => {}, + hasWrapper: () => true + }; +}; + +var _errors; + +function _load_errors() { + return _errors = __webpack_require__(6); +} + +/***/ }), +/* 493 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.examples = exports.hasWrapper = exports.run = undefined; +exports.setFlags = setFlags; + +var _buildSubCommands2; + +function _load_buildSubCommands() { + return _buildSubCommands2 = _interopRequireDefault(__webpack_require__(59)); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const notYetImplemented = () => Promise.reject(new Error('This command is not implemented yet.')); + +function setFlags(commander) { + commander.description('Has not been implemented yet'); +} + +var _buildSubCommands = (0, (_buildSubCommands2 || _load_buildSubCommands()).default)('access', { + public: notYetImplemented, + restricted: notYetImplemented, + grant: notYetImplemented, + revoke: notYetImplemented, + lsPackages: notYetImplemented, + lsCollaborators: notYetImplemented, + edit: notYetImplemented +}, ['WARNING: This command yet to be implemented.', 'public []', 'restricted []', 'grant []', 'revoke []', 'ls-packages [||]', 'ls-collaborators [ []]', 'edit []']); + +const run = _buildSubCommands.run, + hasWrapper = _buildSubCommands.hasWrapper, + examples = _buildSubCommands.examples; +exports.run = run; +exports.hasWrapper = hasWrapper; +exports.examples = examples; + +/***/ }), +/* 494 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.run = undefined; + +var _asyncToGenerator2; + +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2)); +} + +let run = exports.run = (() => { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + const binFolder = path.join(config.cwd, config.registryFolders[0], '.bin'); + if (args.length === 0) { + reporter.log(binFolder, { force: true }); } else { - var $currentErrorPath = it.errorPath; - var $additionalProperty = '\' + ' + $key + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - } - if ($noAdditional) { - if ($removeAdditional) { - out += ' delete ' + ($data) + '[' + ($key) + ']; '; - } else { - out += ' ' + ($nextValid) + ' = false; '; - var $currErrSchemaPath = $errSchemaPath; - $errSchemaPath = it.errSchemaPath + '/additionalProperties'; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have additional properties\' '; - } - if (it.opts.verbose) { - out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - $errSchemaPath = $currErrSchemaPath; - if ($breakOnError) { - out += ' break; '; - } - } - } else if ($additionalIsSchema) { - if ($removeAdditional == 'failing') { - out += ' var ' + ($errs) + ' = errors; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.schema = $aProperties; - $it.schemaPath = it.schemaPath + '.additionalProperties'; - $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; - $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } '; - it.compositeRule = $it.compositeRule = $wasComposite; - } else { - $it.schema = $aProperties; - $it.schemaPath = it.schemaPath + '.additionalProperties'; - $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; - $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - } - } - it.errorPath = $currentErrorPath; - } - if ($someProperties) { - out += ' } '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - var $useDefaults = it.opts.useDefaults && !it.compositeRule; - if ($schemaKeys.length) { - var arr4 = $schemaKeys; - if (arr4) { - var $propertyKey, i4 = -1, - l4 = arr4.length - 1; - while (i4 < l4) { - $propertyKey = arr4[i4 += 1]; - var $sch = $schema[$propertyKey]; - if (it.util.schemaHasRules($sch, it.RULES.all)) { - var $prop = it.util.getProperty($propertyKey), - $passData = $data + $prop, - $hasDefault = $useDefaults && $sch.default !== undefined; - $it.schema = $sch; - $it.schemaPath = $schemaPath + $prop; - $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); - $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); - $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - $code = it.util.varReplace($code, $nextData, $passData); - var $useData = $passData; - } else { - var $useData = $nextData; - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; '; - } - if ($hasDefault) { - out += ' ' + ($code) + ' '; - } else { - if ($requiredHash && $requiredHash[$propertyKey]) { - out += ' if ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') { ' + ($nextValid) + ' = false; '; - var $currentErrorPath = it.errorPath, - $currErrSchemaPath = $errSchemaPath, - $missingProperty = it.util.escapeQuotes($propertyKey); - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - $errSchemaPath = it.errSchemaPath + '/required'; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - $errSchemaPath = $currErrSchemaPath; - it.errorPath = $currentErrorPath; - out += ' } else { '; - } else { - if ($breakOnError) { - out += ' if ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') { ' + ($nextValid) + ' = true; } else { '; - } else { - out += ' if (' + ($useData) + ' !== undefined '; - if ($ownProperties) { - out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ' ) { '; - } - } - out += ' ' + ($code) + ' } '; - } - } - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - if ($pPropertyKeys.length) { - var arr5 = $pPropertyKeys; - if (arr5) { - var $pProperty, i5 = -1, - l5 = arr5.length - 1; - while (i5 < l5) { - $pProperty = arr5[i5 += 1]; - var $sch = $pProperties[$pProperty]; - if (it.util.schemaHasRules($sch, it.RULES.all)) { - $it.schema = $sch; - $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); - $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); - if ($ownProperties) { - out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; - } else { - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; - } - out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else ' + ($nextValid) + ' = true; '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - } - if (it.opts.patternGroups && $pgPropertyKeys.length) { - var arr6 = $pgPropertyKeys; - if (arr6) { - var $pgProperty, i6 = -1, - l6 = arr6.length - 1; - while (i6 < l6) { - $pgProperty = arr6[i6 += 1]; - var $pgSchema = $pgProperties[$pgProperty], - $sch = $pgSchema.schema; - if (it.util.schemaHasRules($sch, it.RULES.all)) { - $it.schema = $sch; - $it.schemaPath = it.schemaPath + '.patternGroups' + it.util.getProperty($pgProperty) + '.schema'; - $it.errSchemaPath = it.errSchemaPath + '/patternGroups/' + it.util.escapeFragment($pgProperty) + '/schema'; - out += ' var pgPropCount' + ($lvl) + ' = 0; '; - if ($ownProperties) { - out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; - } else { - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; - } - out += ' if (' + (it.usePattern($pgProperty)) + '.test(' + ($key) + ')) { pgPropCount' + ($lvl) + '++; '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else ' + ($nextValid) + ' = true; '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - var $pgMin = $pgSchema.minimum, - $pgMax = $pgSchema.maximum; - if ($pgMin !== undefined || $pgMax !== undefined) { - out += ' var ' + ($valid) + ' = true; '; - var $currErrSchemaPath = $errSchemaPath; - if ($pgMin !== undefined) { - var $limit = $pgMin, - $reason = 'minimum', - $moreOrLess = 'less'; - out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' >= ' + ($pgMin) + '; '; - $errSchemaPath = it.errSchemaPath + '/patternGroups/minimum'; - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('patternGroups') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { reason: \'' + ($reason) + '\', limit: ' + ($limit) + ', pattern: \'' + (it.util.escapeQuotes($pgProperty)) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern "' + (it.util.escapeQuotes($pgProperty)) + '"\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - if ($pgMax !== undefined) { - out += ' else '; - } - } - if ($pgMax !== undefined) { - var $limit = $pgMax, - $reason = 'maximum', - $moreOrLess = 'more'; - out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' <= ' + ($pgMax) + '; '; - $errSchemaPath = it.errSchemaPath + '/patternGroups/maximum'; - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('patternGroups') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { reason: \'' + ($reason) + '\', limit: ' + ($limit) + ', pattern: \'' + (it.util.escapeQuotes($pgProperty)) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern "' + (it.util.escapeQuotes($pgProperty)) + '"\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - } - $errSchemaPath = $currErrSchemaPath; - if ($breakOnError) { - out += ' if (' + ($valid) + ') { '; - $closingBraces += '}'; - } - } - } + const binEntries = yield (0, (_run || _load_run()).getBinEntries)(config); + + const binName = args[0]; + const binPath = binEntries.get(binName); + + if (binPath) { + reporter.log(binPath, { force: true }); + } else { + reporter.error(reporter.lang('packageBinaryNotFound', binName)); } } - } - if ($breakOnError) { - out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; - } - out = it.util.cleanUpCode(out); - return out; + }); + + return function run(_x, _x2, _x3, _x4) { + return _ref.apply(this, arguments); + }; +})(); + +exports.hasWrapper = hasWrapper; +exports.setFlags = setFlags; + +var _run; + +function _load_run() { + return _run = __webpack_require__(354); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const path = __webpack_require__(0); + +function hasWrapper(commander) { + return false; } +function setFlags(commander) { + commander.description('Displays the location of the yarn bin folder.'); +} /***/ }), /* 495 */ @@ -92469,87 +91686,119 @@ module.exports = function generate_properties(it, $keyword, $ruleType) { "use strict"; -module.exports = function generate_propertyNames(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - if (it.util.schemaHasRules($schema, it.RULES.all)) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - var $key = 'key' + $lvl, - $idx = 'idx' + $lvl, - $i = 'i' + $lvl, - $invalidName = '\' + ' + $key + ' + \'', - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $dataProperties = 'dataProperties' + $lvl, - $ownProperties = it.opts.ownProperties, - $currentBaseId = it.baseId; - out += ' var ' + ($errs) + ' = errors; '; - if ($ownProperties) { - out += ' var ' + ($dataProperties) + ' = undefined; '; - } - if ($ownProperties) { - out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; - } else { - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; - } - out += ' var startErrs' + ($lvl) + ' = errors; '; - var $passData = $key; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + ' 2) { + return false; } - out += ' } '; - } else { - out += ' {} '; + const key = args[0]; + var _args$ = args[1]; + const val = _args$ === undefined ? true : _args$; + + const yarnConfig = config.registries.yarn; + yield yarnConfig.saveHomeConfig({ [key]: val }); + reporter.success(reporter.lang('configSet', key, val)); + return true; + })(); + }, + + get(config, reporter, flags, args) { + if (args.length !== 1) { + return false; } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; return false; '; + + reporter.log(String(config.getOption(args[0])), { force: true }); + return true; + }, + + delete: (() => { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + if (args.length !== 1) { + return false; } + + const key = args[0]; + const yarnConfig = config.registries.yarn; + yield yarnConfig.saveHomeConfig({ [key]: undefined }); + reporter.success(reporter.lang('configDelete', key)); + return true; + }); + + function _delete(_x, _x2, _x3, _x4) { + return _ref.apply(this, arguments); } - if ($breakOnError) { - out += ' break; '; + + return _delete; + })(), + + list(config, reporter, flags, args) { + if (args.length) { + return false; } - out += ' } }'; - } - if ($breakOnError) { - out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + + reporter.info(reporter.lang('configYarn')); + reporter.inspect(config.registries.yarn.config); + + reporter.info(reporter.lang('configNpm')); + reporter.inspect(config.registries.npm.config); + + return true; + }, + + current(config, reporter, flags, args) { + if (args.length) { + return false; + } + + reporter.log(JSON.stringify(config, CONFIG_KEYS, 2), { force: true }); + + return true; } - out = it.util.cleanUpCode(out); - return out; -} +}); +const run = _buildSubCommands.run, + examples = _buildSubCommands.examples; +exports.run = run; +exports.examples = examples; /***/ }), /* 496 */ @@ -92557,129 +91806,139 @@ module.exports = function generate_propertyNames(it, $keyword, $ruleType) { "use strict"; -module.exports = function generate_ref(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $async, $refCode; - if ($schema == '#' || $schema == '#/') { - if (it.isRoot) { - $async = it.async; - $refCode = 'validate'; - } else { - $async = it.root.schema.$async === true; - $refCode = 'root.refVal[0]'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.run = undefined; + +var _asyncToGenerator2; + +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2)); +} + +var _extends2; + +function _load_extends() { + return _extends2 = _interopRequireDefault(__webpack_require__(20)); +} + +let run = exports.run = (() => { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + const builderName = args[0], + rest = args.slice(1); + + + if (!builderName) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('invalidPackageName')); } - } else { - var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot); - if ($refVal === undefined) { - var $message = it.MissingRefError.message(it.baseId, $schema); - if (it.opts.missingRefs == 'fail') { - it.logger.error($message); - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('$ref') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { ref: \'' + (it.util.escapeQuotes($schema)) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'can\\\'t resolve reference ' + (it.util.escapeQuotes($schema)) + '\' '; - } - if (it.opts.verbose) { - out += ' , schema: ' + (it.util.toQuotedString($schema)) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - if ($breakOnError) { - out += ' if (false) { '; - } - } else if (it.opts.missingRefs == 'ignore') { - it.logger.warn($message); - if ($breakOnError) { - out += ' if (true) { '; - } - } else { - throw new it.MissingRefError(it.baseId, $schema, $message); - } - } else if ($refVal.inline) { - var $it = it.util.copy(it); - $it.level++; - var $nextValid = 'valid' + $it.level; - $it.schema = $refVal.schema; - $it.schemaPath = ''; - $it.errSchemaPath = $schema; - var $code = it.validate($it).replace(/validate\.schema/g, $refVal.code); - out += ' ' + ($code) + ' '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - } + + var _coerceCreatePackageN = coerceCreatePackageName(builderName); + + const packageName = _coerceCreatePackageN.fullName, + commandName = _coerceCreatePackageN.name; + + + const linkLoc = path.join(config.linkFolder, commandName); + if (yield (_fs || _load_fs()).exists(linkLoc)) { + reporter.info(reporter.lang('linkUsing', packageName)); } else { - $async = $refVal.$async === true; - $refCode = $refVal.code; + yield (0, (_global || _load_global()).run)(config, reporter, {}, ['add', packageName]); } + + const binFolder = yield (0, (_global || _load_global()).getBinFolder)(config, {}); + const command = path.resolve(binFolder, commandName); + const env = yield (0, (_executeLifecycleScript || _load_executeLifecycleScript()).makeEnv)('create', config.cwd, config); + + yield (_child || _load_child()).spawn(command, rest, { stdio: `inherit`, shell: true, env }); + }); + + return function run(_x, _x2, _x3, _x4) { + return _ref.apply(this, arguments); + }; +})(); + +exports.setFlags = setFlags; +exports.hasWrapper = hasWrapper; +exports.parsePackageName = parsePackageName; +exports.coerceCreatePackageName = coerceCreatePackageName; + +var _errors; + +function _load_errors() { + return _errors = __webpack_require__(6); +} + +var _child; + +function _load_child() { + return _child = _interopRequireWildcard(__webpack_require__(50)); +} + +var _executeLifecycleScript; + +function _load_executeLifecycleScript() { + return _executeLifecycleScript = __webpack_require__(111); +} + +var _fs; + +function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(5)); +} + +var _global; + +function _load_global() { + return _global = __webpack_require__(121); +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const path = __webpack_require__(0); + +function setFlags(commander) { + commander.description('Creates new projects from any create-* starter kits.'); +} + +function hasWrapper(commander, args) { + return true; +} + +function parsePackageName(str) { + if (str.charAt(0) === '/') { + throw new Error(`Name should not start with "/", got "${str}"`); } - if ($refCode) { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - if (it.opts.passContext) { - out += ' ' + ($refCode) + '.call(this, '; - } else { - out += ' ' + ($refCode) + '( '; - } - out += ' ' + ($data) + ', (dataPath || \'\')'; - if (it.errorPath != '""') { - out += ' + ' + (it.errorPath); - } - var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', - $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; - out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ', rootData) '; - var __callValidate = out; - out = $$outStack.pop(); - if ($async) { - if (!it.async) throw new Error('async schema referenced by sync schema'); - if ($breakOnError) { - out += ' var ' + ($valid) + '; '; - } - out += ' try { ' + (it.yieldAwait) + ' ' + (__callValidate) + '; '; - if ($breakOnError) { - out += ' ' + ($valid) + ' = true; '; - } - out += ' } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; '; - if ($breakOnError) { - out += ' ' + ($valid) + ' = false; '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($valid) + ') { '; - } - } else { - out += ' if (!' + (__callValidate) + ') { if (vErrors === null) vErrors = ' + ($refCode) + '.errors; else vErrors = vErrors.concat(' + ($refCode) + '.errors); errors = vErrors.length; } '; - if ($breakOnError) { - out += ' else { '; - } - } + if (str.charAt(0) === '.') { + throw new Error(`Name should not start with ".", got "${str}"`); } - return out; + const parts = str.split('/'); + const isScoped = str.charAt(0) === '@'; + if (isScoped && parts[0] === '@') { + throw new Error(`Scope should not be empty, got "${str}"`); + } + const scope = isScoped ? parts[0] : ''; + const name = parts[isScoped ? 1 : 0] || ''; + const path = parts.slice(isScoped ? 2 : 1).join('/'); + const fullName = [scope, name].filter(Boolean).join('/'); + const full = [scope, name, path].filter(Boolean).join('/'); + + return { fullName, name, scope, path, full }; } +function coerceCreatePackageName(str) { + const pkgNameObj = parsePackageName(str); + const coercedName = pkgNameObj.name !== '' ? `create-${pkgNameObj.name}` : `create`; + const coercedPkgNameObj = (0, (_extends2 || _load_extends()).default)({}, pkgNameObj, { + name: coercedName, + fullName: [pkgNameObj.scope, coercedName].filter(Boolean).join('/'), + full: [pkgNameObj.scope, coercedName, pkgNameObj.path].filter(Boolean).join('/') + }); + return coercedPkgNameObj; +} /***/ }), /* 497 */ @@ -92687,2852 +91946,2194 @@ module.exports = function generate_ref(it, $keyword, $ruleType) { "use strict"; -module.exports = function generate_required(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $vSchema = 'schema' + $lvl; - if (!$isData) { - if ($schema.length < it.opts.loopRequired && it.schema.properties && Object.keys(it.schema.properties).length) { - var $required = []; - var arr1 = $schema; - if (arr1) { - var $property, i1 = -1, - l1 = arr1.length - 1; - while (i1 < l1) { - $property = arr1[i1 += 1]; - var $propertySch = it.schema.properties[$property]; - if (!($propertySch && it.util.schemaHasRules($propertySch, it.RULES.all))) { - $required[$required.length] = $property; - } - } - } - } else { - var $required = $schema; - } - } - if ($isData || $required.length) { - var $currentErrorPath = it.errorPath, - $loopRequired = $isData || $required.length >= it.opts.loopRequired, - $ownProperties = it.opts.ownProperties; - if ($breakOnError) { - out += ' var missing' + ($lvl) + '; '; - if ($loopRequired) { - if (!$isData) { - out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; - } - var $i = 'i' + $lvl, - $propertyPath = 'schema' + $lvl + '[' + $i + ']', - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); - } - out += ' var ' + ($valid) + ' = true; '; - if ($isData) { - out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; - } - out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined '; - if ($ownProperties) { - out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; - } - out += '; if (!' + ($valid) + ') break; } '; - if ($isData) { - out += ' } '; - } - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; - } else { - out += ' if ( '; - var arr2 = $required; - if (arr2) { - var $propertyKey, $i = -1, - l2 = arr2.length - 1; - while ($i < l2) { - $propertyKey = arr2[$i += 1]; - if ($i) { - out += ' || '; - } - var $prop = it.util.getProperty($propertyKey), - $useData = $data + $prop; - out += ' ( ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; - } - } - out += ') { '; - var $propertyPath = 'missing' + $lvl, - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; - } - } else { - if ($loopRequired) { - if (!$isData) { - out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; - } - var $i = 'i' + $lvl, - $propertyPath = 'schema' + $lvl + '[' + $i + ']', - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); - } - if ($isData) { - out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { '; - } - out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; - } - out += ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } '; - if ($isData) { - out += ' } '; - } - } else { - var arr3 = $required; - if (arr3) { - var $propertyKey, i3 = -1, - l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $prop = it.util.getProperty($propertyKey), - $missingProperty = it.util.escapeQuotes($propertyKey), - $useData = $data + $prop; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - out += ' if ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; - } - } - } - } - it.errorPath = $currentErrorPath; - } else if ($breakOnError) { - out += ' if (true) {'; - } - return out; -} +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.run = undefined; -/***/ }), -/* 498 */ -/***/ (function(module, exports, __webpack_require__) { +var _asyncToGenerator2; -"use strict"; +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2)); +} -module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (($schema || $isData) && it.opts.uniqueItems !== false) { - if ($isData) { - out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { '; - } - out += ' var ' + ($valid) + ' = true; if (' + ($data) + '.length > 1) { var i = ' + ($data) + '.length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } } '; - if ($isData) { - out += ' } '; - } - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - } else { - if ($breakOnError) { - out += ' if (true) { '; +let run = exports.run = (() => { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + const env = yield (0, (_executeLifecycleScript || _load_executeLifecycleScript()).makeEnv)(`exec`, config.cwd, config); + + if (args.length < 1) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('execMissingCommand')); } - } - return out; -} + const execName = args[0], + rest = args.slice(1); -/***/ }), -/* 499 */ -/***/ (function(module, exports, __webpack_require__) { + yield (_child || _load_child()).spawn(execName, rest, { stdio: 'inherit', env }); + }); -"use strict"; + return function run(_x, _x2, _x3, _x4) { + return _ref.apply(this, arguments); + }; +})(); +exports.setFlags = setFlags; +exports.hasWrapper = hasWrapper; -var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; -var customRuleCode = __webpack_require__(485); +var _errors; -module.exports = { - add: addKeyword, - get: getKeyword, - remove: removeKeyword -}; +function _load_errors() { + return _errors = __webpack_require__(6); +} -/** - * Define custom keyword - * @this Ajv - * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords). - * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`. - * @return {Ajv} this for method chaining - */ -function addKeyword(keyword, definition) { - /* jshint validthis: true */ - /* eslint no-shadow: 0 */ - var RULES = this.RULES; +var _child; - if (RULES.keywords[keyword]) - throw new Error('Keyword ' + keyword + ' is already defined'); +function _load_child() { + return _child = _interopRequireWildcard(__webpack_require__(50)); +} - if (!IDENTIFIER.test(keyword)) - throw new Error('Keyword ' + keyword + ' is not a valid identifier'); +var _executeLifecycleScript; - if (definition) { - if (definition.macro && definition.valid !== undefined) - throw new Error('"valid" option cannot be used with macro keywords'); +function _load_executeLifecycleScript() { + return _executeLifecycleScript = __webpack_require__(111); +} - var dataType = definition.type; - if (Array.isArray(dataType)) { - var i, len = dataType.length; - for (i=0; i { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + let manifest; + if (flags.useManifest) { + manifest = yield config.readJson(flags.useManifest); + } else { + manifest = yield config.readRootManifest(); + } + if (!manifest.name) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('noName')); + } + if (!manifest.version) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('noVersion')); } - var rule = { - keyword: keyword, - definition: definition, - custom: true, - code: customRuleCode, - implements: definition.implements + const entry = { + name: manifest.name, + version: manifest.version, + resolved: flags.resolved, + registry: flags.registry || manifest._registry, + optionalDependencies: manifest.optionalDependencies, + dependencies: manifest.dependencies }; - ruleGroup.rules.push(rule); - RULES.custom[keyword] = rule; - } + const pattern = flags.pattern || `${entry.name}@${entry.version}`; + reporter.log((0, (_lockfile || _load_lockfile()).stringify)({ + [pattern]: (0, (_lockfile || _load_lockfile()).implodeEntry)(pattern, entry) + })); + }); + return function run(_x, _x2, _x3, _x4) { + return _ref.apply(this, arguments); + }; +})(); - function checkDataType(dataType) { - if (!RULES.types[dataType]) throw new Error('Unknown type ' + dataType); - } +exports.hasWrapper = hasWrapper; +exports.setFlags = setFlags; - return this; +var _errors; + +function _load_errors() { + return _errors = __webpack_require__(6); } +var _lockfile; -/** - * Get keyword - * @this Ajv - * @param {String} keyword pre-defined or custom keyword. - * @return {Object|Boolean} custom keyword definition, `true` if it is a predefined keyword, `false` otherwise. - */ -function getKeyword(keyword) { - /* jshint validthis: true */ - var rule = this.RULES.custom[keyword]; - return rule ? rule.definition : this.RULES.keywords[keyword] || false; +function _load_lockfile() { + return _lockfile = __webpack_require__(19); } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/** - * Remove keyword - * @this Ajv - * @param {String} keyword pre-defined or custom keyword. - * @return {Ajv} this for method chaining - */ -function removeKeyword(keyword) { - /* jshint validthis: true */ - var RULES = this.RULES; - delete RULES.keywords[keyword]; - delete RULES.all[keyword]; - delete RULES.custom[keyword]; - for (var i=0; i', 'description'); + commander.option('--resolved ', 'description'); + commander.option('--registry ', 'description'); } +const examples = exports.examples = ['generate-lock-entry', 'generate-lock-entry --use-manifest ./package.json', 'generate-lock-entry --resolved local-file.tgz#hash']; /***/ }), -/* 500 */ +/* 499 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var META_SCHEMA_ID = 'http://json-schema.org/draft-06/schema'; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.hasWrapper = hasWrapper; +exports.setFlags = setFlags; +exports.run = run; -module.exports = function (ajv) { - var defaultMeta = ajv._opts.defaultMeta; - var metaSchemaRef = typeof defaultMeta == 'string' - ? { $ref: defaultMeta } - : ajv.getSchema(META_SCHEMA_ID) - ? { $ref: META_SCHEMA_ID } - : {}; +var _index; - ajv.addKeyword('patternGroups', { - // implemented in properties.jst - metaSchema: { - type: 'object', - additionalProperties: { - type: 'object', - required: [ 'schema' ], - properties: { - maximum: { - type: 'integer', - minimum: 0 - }, - minimum: { - type: 'integer', - minimum: 0 - }, - schema: metaSchemaRef - }, - additionalProperties: false - } - } - }); - ajv.RULES.all.properties.implements.push('patternGroups'); -}; +function _load_index() { + return _index = _interopRequireDefault(__webpack_require__(334)); +} +var _constants; -/***/ }), -/* 501 */ -/***/ (function(module, exports) { +function _load_constants() { + return _constants = _interopRequireWildcard(__webpack_require__(8)); +} -module.exports = {"$schema":"http://json-schema.org/draft-06/schema#","$id":"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#","description":"Meta-schema for $data reference (JSON-schema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false} +var _misc; -/***/ }), -/* 502 */ -/***/ (function(module, exports) { +function _load_misc() { + return _misc = __webpack_require__(18); +} -module.exports = {"$schema":"http://json-schema.org/draft-06/schema#","$id":"http://json-schema.org/draft-06/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"examples":{"type":"array","items":{}},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":{},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":{}} +var _aliases; -/***/ }), -/* 503 */ -/***/ (function(module, exports, __webpack_require__) { +function _load_aliases() { + return _aliases = _interopRequireDefault(__webpack_require__(346)); +} -"use strict"; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var traverse = module.exports = function (schema, opts, cb) { - if (typeof opts == 'function') { - cb = opts; - opts = {}; - } - _traverse(opts, cb, schema, '', schema); -}; +const chalk = __webpack_require__(30); +function hasWrapper(flags, args) { + return false; +} -traverse.keywords = { - additionalItems: true, - items: true, - contains: true, - additionalProperties: true, - propertyNames: true, - not: true -}; +function setFlags(commander) { + commander.description('Displays help information.'); +} -traverse.arrayKeywords = { - items: true, - allOf: true, - anyOf: true, - oneOf: true -}; +function run(config, reporter, commander, args) { + if (args.length) { + const commandName = args.shift(); + if (Object.prototype.hasOwnProperty.call((_index || _load_index()).default, commandName)) { + const command = (_index || _load_index()).default[commandName]; + if (command) { + command.setFlags(commander); + const examples = (command.examples || []).map(example => ` $ yarn ${example}`); + if (examples.length) { + commander.on('--help', () => { + reporter.log(reporter.lang('helpExamples', reporter.rawText(examples.join('\n')))); + }); + } + // eslint-disable-next-line yarn-internal/warn-language + commander.on('--help', () => reporter.log(' ' + command.getDocsInfo + '\n')); + commander.help(); + return Promise.resolve(); + } + } + } -traverse.propsKeywords = { - definitions: true, - properties: true, - patternProperties: true, - dependencies: true -}; + commander.on('--help', () => { + const commandsText = []; + for (var _iterator = Object.keys((_index || _load_index()).default).sort((_misc || _load_misc()).sortAlpha), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; -traverse.skipKeywords = { - enum: true, - const: true, - required: true, - maximum: true, - minimum: true, - exclusiveMaximum: true, - exclusiveMinimum: true, - multipleOf: true, - maxLength: true, - minLength: true, - pattern: true, - format: true, - maxItems: true, - minItems: true, - uniqueItems: true, - maxProperties: true, - minProperties: true -}; + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + const name = _ref; -function _traverse(opts, cb, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { - if (schema && typeof schema == 'object' && !Array.isArray(schema)) { - cb(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); - for (var key in schema) { - var sch = schema[key]; - if (Array.isArray(sch)) { - if (key in traverse.arrayKeywords) { - for (var i=0; i (_aliases || _load_aliases()).default[key]).indexOf(name) > -1) { + continue; + } + if ((_aliases || _load_aliases()).default[name]) { + commandsText.push(` - ${(0, (_misc || _load_misc()).hyphenate)(name)} / ${(_aliases || _load_aliases()).default[name]}`); + } else { + commandsText.push(` - ${(0, (_misc || _load_misc()).hyphenate)(name)}`); } } - } -} + reporter.log(reporter.lang('helpCommands', reporter.rawText(commandsText.join('\n')))); + reporter.log(reporter.lang('helpCommandsMore', reporter.rawText(chalk.bold('yarn help COMMAND')))); + reporter.log(reporter.lang('helpLearnMore', reporter.rawText(chalk.bold((_constants || _load_constants()).YARN_DOCS)))); + }); + commander.options.sort((_misc || _load_misc()).sortOptionsByFlags); -function escapeJsonPtr(str) { - return str.replace(/~/g, '~0').replace(/\//g, '~1'); + commander.help(); + return Promise.resolve(); } - /***/ }), -/* 504 */ +/* 500 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const x = module.exports; -const ESC = '\u001B['; -const OSC = '\u001B]'; -const BEL = '\u0007'; -const SEP = ';'; -const isTerminalApp = process.env.TERM_PROGRAM === 'Apple_Terminal'; -x.cursorTo = (x, y) => { - if (typeof x !== 'number') { - throw new TypeError('The `x` argument is required'); - } +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.run = exports.Import = exports.noArguments = undefined; - if (typeof y !== 'number') { - return ESC + (x + 1) + 'G'; - } +var _asyncToGenerator2; - return ESC + (y + 1) + ';' + (x + 1) + 'H'; -}; +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2)); +} -x.cursorMove = (x, y) => { - if (typeof x !== 'number') { - throw new TypeError('The `x` argument is required'); - } +let run = exports.run = (() => { + var _ref5 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + const imp = new Import(flags, config, reporter, new (_lockfile || _load_lockfile()).default({ cache: {} })); + yield imp.init(); + }); - let ret = ''; + return function run(_x, _x2, _x3, _x4) { + return _ref5.apply(this, arguments); + }; +})(); - if (x < 0) { - ret += ESC + (-x) + 'D'; - } else if (x > 0) { - ret += ESC + x + 'C'; - } +exports.setFlags = setFlags; +exports.hasWrapper = hasWrapper; - if (y < 0) { - ret += ESC + (-y) + 'A'; - } else if (y > 0) { - ret += ESC + y + 'B'; - } +var _install; - return ret; -}; +function _load_install() { + return _install = __webpack_require__(34); +} -x.cursorUp = count => ESC + (typeof count === 'number' ? count : 1) + 'A'; -x.cursorDown = count => ESC + (typeof count === 'number' ? count : 1) + 'B'; -x.cursorForward = count => ESC + (typeof count === 'number' ? count : 1) + 'C'; -x.cursorBackward = count => ESC + (typeof count === 'number' ? count : 1) + 'D'; +var _check; -x.cursorLeft = ESC + 'G'; -x.cursorSavePosition = ESC + (isTerminalApp ? '7' : 's'); -x.cursorRestorePosition = ESC + (isTerminalApp ? '8' : 'u'); -x.cursorGetPosition = ESC + '6n'; -x.cursorNextLine = ESC + 'E'; -x.cursorPrevLine = ESC + 'F'; -x.cursorHide = ESC + '?25l'; -x.cursorShow = ESC + '?25h'; +function _load_check() { + return _check = __webpack_require__(350); +} -x.eraseLines = count => { - let clear = ''; +var _errors; - for (let i = 0; i < count; i++) { - clear += x.eraseLine + (i < count - 1 ? x.cursorUp() : ''); - } +function _load_errors() { + return _errors = __webpack_require__(6); +} - if (count) { - clear += x.cursorLeft; - } +var _index; - return clear; -}; +function _load_index() { + return _index = __webpack_require__(78); +} -x.eraseEndLine = ESC + 'K'; -x.eraseStartLine = ESC + '1K'; -x.eraseLine = ESC + '2K'; -x.eraseDown = ESC + 'J'; -x.eraseUp = ESC + '1J'; -x.eraseScreen = ESC + '2J'; -x.scrollUp = ESC + 'S'; -x.scrollDown = ESC + 'T'; +var _baseResolver; -x.clearScreen = '\u001Bc'; -x.beep = BEL; +function _load_baseResolver() { + return _baseResolver = _interopRequireDefault(__webpack_require__(123)); +} -x.link = (text, url) => { - return [ - OSC, - '8', - SEP, - SEP, - url, - BEL, - text, - OSC, - '8', - SEP, - SEP, - BEL - ].join(''); -}; +var _hostedGitResolver; -x.image = (buf, opts) => { - opts = opts || {}; +function _load_hostedGitResolver() { + return _hostedGitResolver = _interopRequireDefault(__webpack_require__(109)); +} - let ret = OSC + '1337;File=inline=1'; +var _hostedGitResolver2; - if (opts.width) { - ret += `;width=${opts.width}`; - } +function _load_hostedGitResolver2() { + return _hostedGitResolver2 = __webpack_require__(109); +} - if (opts.height) { - ret += `;height=${opts.height}`; - } +var _gistResolver; - if (opts.preserveAspectRatio === false) { - ret += ';preserveAspectRatio=0'; - } +function _load_gistResolver() { + return _gistResolver = _interopRequireDefault(__webpack_require__(214)); +} - return ret + ':' + buf.toString('base64') + BEL; -}; +var _gistResolver2; -x.iTerm = {}; +function _load_gistResolver2() { + return _gistResolver2 = __webpack_require__(214); +} -x.iTerm.setCwd = cwd => OSC + '50;CurrentDir=' + (cwd || process.cwd()) + BEL; +var _gitResolver; +function _load_gitResolver() { + return _gitResolver = _interopRequireDefault(__webpack_require__(124)); +} -/***/ }), -/* 505 */ -/***/ (function(module, exports, __webpack_require__) { +var _fileResolver; -"use strict"; +function _load_fileResolver() { + return _fileResolver = _interopRequireDefault(__webpack_require__(213)); +} -module.exports = function () { - return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g; -}; +var _packageResolver; +function _load_packageResolver() { + return _packageResolver = _interopRequireDefault(__webpack_require__(360)); +} -/***/ }), -/* 506 */ -/***/ (function(module, exports, __webpack_require__) { +var _packageRequest; -"use strict"; -/* WEBPACK VAR INJECTION */(function(module) { -const colorConvert = __webpack_require__(608); +function _load_packageRequest() { + return _packageRequest = _interopRequireDefault(__webpack_require__(122)); +} -const wrapAnsi16 = (fn, offset) => function () { - const code = fn.apply(colorConvert, arguments); - return `\u001B[${code + offset}m`; -}; +var _packageReference; -const wrapAnsi256 = (fn, offset) => function () { - const code = fn.apply(colorConvert, arguments); - return `\u001B[${38 + offset};5;${code}m`; -}; +function _load_packageReference() { + return _packageReference = _interopRequireDefault(__webpack_require__(359)); +} -const wrapAnsi16m = (fn, offset) => function () { - const rgb = fn.apply(colorConvert, arguments); - return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; -}; +var _packageFetcher; -function assembleStyles() { - const codes = new Map(); - const styles = { - modifier: { - reset: [0, 0], - // 21 isn't widely supported and 22 does the same thing - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - color: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - gray: [90, 39], +function _load_packageFetcher() { + return _packageFetcher = _interopRequireWildcard(__webpack_require__(208)); +} - // Bright color - redBright: [91, 39], - greenBright: [92, 39], - yellowBright: [93, 39], - blueBright: [94, 39], - magentaBright: [95, 39], - cyanBright: [96, 39], - whiteBright: [97, 39] - }, - bgColor: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], +var _packageLinker; - // Bright color - bgBlackBright: [100, 49], - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49] - } - }; +function _load_packageLinker() { + return _packageLinker = _interopRequireDefault(__webpack_require__(209)); +} - // Fix humans - styles.color.grey = styles.color.gray; +var _packageCompatibility; - for (const groupName of Object.keys(styles)) { - const group = styles[groupName]; +function _load_packageCompatibility() { + return _packageCompatibility = _interopRequireWildcard(__webpack_require__(207)); +} - for (const styleName of Object.keys(group)) { - const style = group[styleName]; +var _lockfile; - styles[styleName] = { - open: `\u001B[${style[0]}m`, - close: `\u001B[${style[1]}m` - }; +function _load_lockfile() { + return _lockfile = _interopRequireDefault(__webpack_require__(19)); +} - group[styleName] = styles[styleName]; +var _normalizePattern9; - codes.set(style[0], style[1]); - } +function _load_normalizePattern() { + return _normalizePattern9 = __webpack_require__(37); +} - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false - }); +var _logicalDependencyTree; - Object.defineProperty(styles, 'codes', { - value: codes, - enumerable: false - }); - } +function _load_logicalDependencyTree() { + return _logicalDependencyTree = __webpack_require__(550); +} - const ansi2ansi = n => n; - const rgb2rgb = (r, g, b) => [r, g, b]; +var _fs; - styles.color.close = '\u001B[39m'; - styles.bgColor.close = '\u001B[49m'; +function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(5)); +} - styles.color.ansi = { - ansi: wrapAnsi16(ansi2ansi, 0) - }; - styles.color.ansi256 = { - ansi256: wrapAnsi256(ansi2ansi, 0) - }; - styles.color.ansi16m = { - rgb: wrapAnsi16m(rgb2rgb, 0) - }; +var _misc; - styles.bgColor.ansi = { - ansi: wrapAnsi16(ansi2ansi, 10) - }; - styles.bgColor.ansi256 = { - ansi256: wrapAnsi256(ansi2ansi, 10) - }; - styles.bgColor.ansi16m = { - rgb: wrapAnsi16m(rgb2rgb, 10) - }; +function _load_misc() { + return _misc = _interopRequireWildcard(__webpack_require__(18)); +} - for (let key of Object.keys(colorConvert)) { - if (typeof colorConvert[key] !== 'object') { - continue; - } - - const suite = colorConvert[key]; - - if (key === 'ansi16') { - key = 'ansi'; - } - - if ('ansi16' in suite) { - styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0); - styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10); - } - - if ('ansi256' in suite) { - styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0); - styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10); - } - - if ('rgb' in suite) { - styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0); - styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10); - } - } +var _constants; - return styles; +function _load_constants() { + return _constants = __webpack_require__(8); } -// Make the export immutable -Object.defineProperty(module, 'exports', { - enumerable: true, - get: assembleStyles -}); - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(163)(module))) - -/***/ }), -/* 507 */ -/***/ (function(module, exports) { +var _semver; -function webpackEmptyContext(req) { - throw new Error("Cannot find module '" + req + "'."); +function _load_semver() { + return _semver = _interopRequireDefault(__webpack_require__(22)); } -webpackEmptyContext.keys = function() { return []; }; -webpackEmptyContext.resolve = webpackEmptyContext; -module.exports = webpackEmptyContext; -webpackEmptyContext.id = 507; - -/***/ }), -/* 508 */ -/***/ (function(module, exports, __webpack_require__) { -"use strict"; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - // global key for user preferred registration -var REGISTRATION_KEY = '@@any-promise/REGISTRATION', - // Prior registration (preferred or detected) - registered = null +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/** - * Registers the given implementation. An implementation must - * be registered prior to any call to `require("any-promise")`, - * typically on application load. - * - * If called with no arguments, will return registration in - * following priority: - * - * For Node.js: - * - * 1. Previous registration - * 2. global.Promise if node.js version >= 0.12 - * 3. Auto detected promise based on first sucessful require of - * known promise libraries. Note this is a last resort, as the - * loaded library is non-deterministic. node.js >= 0.12 will - * always use global.Promise over this priority list. - * 4. Throws error. - * - * For Browser: - * - * 1. Previous registration - * 2. window.Promise - * 3. Throws error. - * - * Options: - * - * Promise: Desired Promise constructor - * global: Boolean - Should the registration be cached in a global variable to - * allow cross dependency/bundle registration? (default true) - */ -module.exports = function(root, loadImplementation){ - return function register(implementation, opts){ - implementation = implementation || null - opts = opts || {} - // global registration unless explicitly {global: false} in options (default true) - var registerGlobal = opts.global !== false; +const invariant = __webpack_require__(9); +const path = __webpack_require__(0); +const uuid = __webpack_require__(120); +const ssri = __webpack_require__(65); +const nodeVersion = process.versions.node.split('-')[0]; - // load any previous global registration - if(registered === null && registerGlobal){ - registered = root[REGISTRATION_KEY] || null - } +const noArguments = exports.noArguments = true; - if(registered !== null - && implementation !== null - && registered.implementation !== implementation){ - // Throw error if attempting to redefine implementation - throw new Error('any-promise already defined as "'+registered.implementation+ - '". You can only register an implementation before the first '+ - ' call to require("any-promise") and an implementation cannot be changed') +class ImportResolver extends (_baseResolver || _load_baseResolver()).default { + getCwd() { + if (this.request.parentRequest) { + const parent = this.resolver.getStrictResolvedPattern(this.request.parentRequest.pattern); + invariant(parent._loc, 'expected package location'); + return path.dirname(parent._loc); } + return this.config.cwd; + } - if(registered === null){ - // use provided implementation - if(implementation !== null && typeof opts.Promise !== 'undefined'){ - registered = { - Promise: opts.Promise, - implementation: implementation - } - } else { - // require implementation if implementation is specified but not provided - registered = loadImplementation(implementation) - } + resolveHostedGit(info, Resolver) { + var _normalizePattern = (0, (_normalizePattern9 || _load_normalizePattern()).normalizePattern)(this.pattern); - if(registerGlobal){ - // register preference globally in case multiple installations - root[REGISTRATION_KEY] = registered - } - } + const range = _normalizePattern.range; - return registered + const exploded = (0, (_hostedGitResolver2 || _load_hostedGitResolver2()).explodeHostedGitFragment)(range, this.reporter); + const hash = info.gitHead; + invariant(hash, 'expected package gitHead'); + const url = Resolver.getTarballUrl(exploded, hash); + info._uid = hash; + info._remote = { + resolved: url, + type: 'tarball', + registry: this.registry, + reference: url, + hash: null + }; + return info; } -} + resolveGist(info, Resolver) { + var _normalizePattern2 = (0, (_normalizePattern9 || _load_normalizePattern()).normalizePattern)(this.pattern); -/***/ }), -/* 509 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; + const range = _normalizePattern2.range; -module.exports = __webpack_require__(508)(global, loadImplementation); + var _explodeGistFragment = (0, (_gistResolver2 || _load_gistResolver2()).explodeGistFragment)(range, this.reporter); -/** - * Node.js version of loadImplementation. - * - * Requires the given implementation and returns the registration - * containing {Promise, implementation} - * - * If implementation is undefined or global.Promise, loads it - * Otherwise uses require - */ -function loadImplementation(implementation){ - var impl = null + const id = _explodeGistFragment.id; - if(shouldPreferGlobalPromise(implementation)){ - // if no implementation or env specified use global.Promise - impl = { - Promise: global.Promise, - implementation: 'global.Promise' - } - } else if(implementation){ - // if implementation specified, require it - var lib = !(function webpackMissingModule() { var e = new Error("Cannot find module \".\""); e.code = 'MODULE_NOT_FOUND'; throw e; }()) - impl = { - Promise: lib.Promise || lib, - implementation: implementation - } - } else { - // try to auto detect implementation. This is non-deterministic - // and should prefer other branches, but this is our last chance - // to load something without throwing error - impl = tryAutoDetect() + const hash = info.gitHead; + invariant(hash, 'expected package gitHead'); + const url = `https://gist.github.com/${id}.git`; + info._uid = hash; + info._remote = { + resolved: `${url}#${hash}`, + type: 'git', + registry: this.registry, + reference: url, + hash + }; + return info; } - if(impl === null){ - throw new Error('Cannot find any-promise implementation nor'+ - ' global.Promise. You must install polyfill or call'+ - ' require("any-promise/register") with your preferred'+ - ' implementation, e.g. require("any-promise/register/bluebird")'+ - ' on application load prior to any require("any-promise").') + resolveGit(info, Resolver) { + const url = info._resolved; + const hash = info.gitHead; + invariant(url, 'expected package _resolved'); + invariant(hash, 'expected package gitHead'); + info._uid = hash; + info._remote = { + resolved: `${url}#${hash}`, + type: 'git', + registry: this.registry, + reference: url, + hash + }; + return info; } - return impl -} - -/** - * Determines if the global.Promise should be preferred if an implementation - * has not been registered. - */ -function shouldPreferGlobalPromise(implementation){ - if(implementation){ - return implementation === 'global.Promise' - } else if(typeof global.Promise !== 'undefined'){ - // Load global promise if implementation not specified - // Versions < 0.11 did not have global Promise - // Do not use for version < 0.12 as version 0.11 contained buggy versions - var version = (/v(\d+)\.(\d+)\.(\d+)/).exec(process.version) - return !(version && +version[1] == 0 && +version[2] < 12) - } + resolveFile(info, Resolver) { + var _normalizePattern3 = (0, (_normalizePattern9 || _load_normalizePattern()).normalizePattern)(this.pattern); - // do not have global.Promise or another implementation was specified - return false -} + const range = _normalizePattern3.range; -/** - * Look for common libs as last resort there is no guarantee that - * this will return a desired implementation or even be deterministic. - * The priority is also nearly arbitrary. We are only doing this - * for older versions of Node.js <0.12 that do not have a reasonable - * global.Promise implementation and we the user has not registered - * the preference. This preserves the behavior of any-promise <= 0.1 - * and may be deprecated or removed in the future - */ -function tryAutoDetect(){ - var libs = [ - "es6-promise", - "promise", - "native-promise-only", - "bluebird", - "rsvp", - "when", - "q", - "pinkie", - "lie", - "vow"] - var i = 0, len = libs.length - for(; i < len; i++){ - try { - return loadImplementation(libs[i]) - } catch(e){} + let loc = (_misc || _load_misc()).removePrefix(range, 'file:'); + if (!path.isAbsolute(loc)) { + loc = path.join(this.config.cwd, loc); + } + info._uid = info.version; + info._remote = { + type: 'copy', + registry: this.registry, + hash: `${uuid.v4()}-${new Date().getTime()}`, + reference: loc + }; + return info; } - return null -} + resolveRegistry(info) { + let url = info._resolved; + const hash = info._shasum; + invariant(url, 'expected package _resolved'); + invariant(hash, 'expected package _shasum'); + if (this.config.getOption('registry') === (_constants || _load_constants()).YARN_REGISTRY) { + url = url.replace((_constants || _load_constants()).NPM_REGISTRY_RE, (_constants || _load_constants()).YARN_REGISTRY); + } + info._uid = info.version; + info._remote = { + resolved: `${url}#${hash}`, + type: 'tarball', + registry: this.registry, + reference: url, + integrity: info._integrity ? ssri.parse(info._integrity) : ssri.fromHex(hash, 'sha1'), + hash + }; + return info; + } -/***/ }), -/* 510 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/*! - * arr-flatten - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ + resolveImport(info) { + var _normalizePattern4 = (0, (_normalizePattern9 || _load_normalizePattern()).normalizePattern)(this.pattern); + const range = _normalizePattern4.range; + const Resolver = (0, (_index || _load_index()).getExoticResolver)(range); + if (Resolver && Resolver.prototype instanceof (_hostedGitResolver || _load_hostedGitResolver()).default) { + return this.resolveHostedGit(info, Resolver); + } else if (Resolver && Resolver === (_gistResolver || _load_gistResolver()).default) { + return this.resolveGist(info, Resolver); + } else if (Resolver && Resolver === (_gitResolver || _load_gitResolver()).default) { + return this.resolveGit(info, Resolver); + } else if (Resolver && Resolver === (_fileResolver || _load_fileResolver()).default) { + return this.resolveFile(info, Resolver); + } + return this.resolveRegistry(info); + } -module.exports = function (arr) { - return flat(arr, []); -}; + resolveLocation(loc) { + var _this = this; -function flat(arr, res) { - var i = 0, cur; - var len = arr.length; - for (; i < len; i++) { - cur = arr[i]; - Array.isArray(cur) ? flat(cur, res) : res.push(cur); + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + const info = yield _this.config.tryManifest(loc, 'npm', false); + if (!info) { + return null; + } + return _this.resolveImport(info); + })(); } - return res; -} - -/***/ }), -/* 511 */ -/***/ (function(module, exports, __webpack_require__) { + resolveFixedVersion(fixedVersionPattern) { + var _this2 = this; -"use strict"; + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var _normalizePattern5 = (0, (_normalizePattern9 || _load_normalizePattern()).normalizePattern)(fixedVersionPattern); -module.exports = function (arr, predicate, ctx) { - if (typeof Array.prototype.findIndex === 'function') { - return arr.findIndex(predicate, ctx); - } + const range = _normalizePattern5.range; - if (typeof predicate !== 'function') { - throw new TypeError('predicate must be a function'); - } + const exoticResolver = (0, (_index || _load_index()).getExoticResolver)(range); + const manifest = exoticResolver ? yield _this2.request.findExoticVersionInfo(exoticResolver, range) : yield _this2.request.findVersionOnRegistry(fixedVersionPattern); + return manifest; + })(); + } - var list = Object(arr); - var len = list.length; + _resolveFromFixedVersions() { + var _this3 = this; - if (len === 0) { - return -1; - } + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + invariant(_this3.request instanceof ImportPackageRequest, 'request must be ImportPackageRequest'); - for (var i = 0; i < len; i++) { - if (predicate.call(ctx, list[i], i, list)) { - return i; - } - } + var _normalizePattern6 = (0, (_normalizePattern9 || _load_normalizePattern()).normalizePattern)(_this3.pattern); - return -1; -}; + const name = _normalizePattern6.name; + invariant(_this3.request.dependencyTree instanceof (_logicalDependencyTree || _load_logicalDependencyTree()).LogicalDependencyTree, 'dependencyTree on request must be LogicalDependencyTree'); + const fixedVersionPattern = _this3.request.dependencyTree.getFixedVersionPattern(name, _this3.request.parentNames); + const info = yield _this3.config.getCache(`import-resolver-${fixedVersionPattern}`, function () { + return _this3.resolveFixedVersion(fixedVersionPattern); + }); + if (info) { + return info; + } + throw new (_errors || _load_errors()).MessageError(_this3.reporter.lang('importResolveFailed', name, _this3.getCwd())); + })(); + } -/***/ }), -/* 512 */ -/***/ (function(module, exports, __webpack_require__) { + _resolveFromNodeModules() { + var _this4 = this; -"use strict"; + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var _normalizePattern7 = (0, (_normalizePattern9 || _load_normalizePattern()).normalizePattern)(_this4.pattern); + const name = _normalizePattern7.name; -var rawAsap = __webpack_require__(513); -var freeTasks = []; + let cwd = _this4.getCwd(); + while (!path.relative(_this4.config.cwd, cwd).startsWith('..')) { + const loc = path.join(cwd, 'node_modules', name); + const info = yield _this4.config.getCache(`import-resolver-${loc}`, function () { + return _this4.resolveLocation(loc); + }); + if (info) { + return info; + } + cwd = path.resolve(cwd, '../..'); + } + throw new (_errors || _load_errors()).MessageError(_this4.reporter.lang('importResolveFailed', name, _this4.getCwd())); + })(); + } -/** - * Calls a task as soon as possible after returning, in its own event, with - * priority over IO events. An exception thrown in a task can be handled by - * `process.on("uncaughtException") or `domain.on("error")`, but will otherwise - * crash the process. If the error is handled, all subsequent tasks will - * resume. - * - * @param {{call}} task A callable object, typically a function that takes no - * arguments. - */ -module.exports = asap; -function asap(task) { - var rawTask; - if (freeTasks.length) { - rawTask = freeTasks.pop(); + resolve() { + if (this.request instanceof ImportPackageRequest && this.request.dependencyTree) { + return this._resolveFromFixedVersions(); } else { - rawTask = new RawTask(); + return this._resolveFromNodeModules(); } - rawTask.task = task; - rawTask.domain = process.domain; - rawAsap(rawTask); -} - -function RawTask() { - this.task = null; - this.domain = null; + } } -RawTask.prototype.call = function () { - if (this.domain) { - this.domain.enter(); - } - var threw = true; - try { - this.task.call(); - threw = false; - // If the task throws an exception (presumably) Node.js restores the - // domain stack for the next event. - if (this.domain) { - this.domain.exit(); - } - } finally { - // We use try/finally and a threw flag to avoid messing up stack traces - // when we catch and release errors. - if (threw) { - // In Node.js, uncaught exceptions are considered fatal errors. - // Re-throw them to interrupt flushing! - // Ensure that flushing continues if an uncaught exception is - // suppressed listening process.on("uncaughtException") or - // domain.on("error"). - rawAsap.requestFlush(); - } - // If the task threw an error, we do not want to exit the domain here. - // Exiting the domain would prevent the domain from catching the error. - this.task = null; - this.domain = null; - freeTasks.push(this); - } -}; - - - -/***/ }), -/* 513 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; +class ImportPackageRequest extends (_packageRequest || _load_packageRequest()).default { + constructor(req, dependencyTree, resolver) { + super(req, resolver); + this.import = this.parentRequest instanceof ImportPackageRequest ? this.parentRequest.import : true; + this.dependencyTree = dependencyTree; + } + getRootName() { + return this.resolver instanceof ImportPackageResolver && this.resolver.rootName || 'root'; + } -var domain; // The domain module is executed on demand -var hasSetImmediate = typeof setImmediate === "function"; + getParentHumanName() { + return [this.getRootName()].concat(this.parentNames).join(' > '); + } -// Use the fastest means possible to execute a task in its own turn, with -// priority over other events including network IO events in Node.js. -// -// An exception thrown by a task will permanently interrupt the processing of -// subsequent tasks. The higher level `asap` function ensures that if an -// exception is thrown by a task, that the task queue will continue flushing as -// soon as possible, but if you use `rawAsap` directly, you are responsible to -// either ensure that no exceptions are thrown from your task, or to manually -// call `rawAsap.requestFlush` if an exception is thrown. -module.exports = rawAsap; -function rawAsap(task) { - if (!queue.length) { - requestFlush(); - flushing = true; + reportResolvedRangeMatch(info, resolved) { + if (info.version === resolved.version) { + return; } - // Avoids a function call - queue[queue.length] = task; -} + this.reporter.warn(this.reporter.lang('importResolvedRangeMatch', resolved.version, resolved.name, info.version, this.getParentHumanName())); + } -var queue = []; -// Once a flush has been requested, no further calls to `requestFlush` are -// necessary until the next `flush` completes. -var flushing = false; -// The position of the next task to execute in the task queue. This is -// preserved between calls to `flush` so that it can be resumed if -// a task throws an exception. -var index = 0; -// If a task schedules additional tasks recursively, the task queue can grow -// unbounded. To prevent memory excaustion, the task queue will periodically -// truncate already-completed tasks. -var capacity = 1024; + _findResolvedManifest(info) { + var _normalizePattern8 = (0, (_normalizePattern9 || _load_normalizePattern()).normalizePattern)(this.pattern); -// The flush function processes all tasks that have been scheduled with -// `rawAsap` unless and until one of those tasks throws an exception. -// If a task throws an exception, `flush` ensures that its state will remain -// consistent and will resume where it left off when called again. -// However, `flush` does not make any arrangements to be called again if an -// exception is thrown. -function flush() { - while (index < queue.length) { - var currentIndex = index; - // Advance the index before calling the task. This ensures that we will - // begin flushing on the next task the task throws an error. - index = index + 1; - queue[currentIndex].call(); - // Prevent leaking memory for long chains of recursive calls to `asap`. - // If we call `asap` within tasks scheduled by `asap`, the queue will - // grow, but to avoid an O(n) walk for every task we execute, we don't - // shift tasks off the queue after they have been executed. - // Instead, we periodically shift 1024 tasks off the queue. - if (index > capacity) { - // Manually shift all values starting at the index back to the - // beginning of the queue. - for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) { - queue[scan] = queue[scan + index]; - } - queue.length -= index; - index = 0; - } - } - queue.length = 0; - index = 0; - flushing = false; -} + const range = _normalizePattern8.range, + name = _normalizePattern8.name; -rawAsap.requestFlush = requestFlush; -function requestFlush() { - // Ensure flushing is not bound to any domain. - // It is not sufficient to exit the domain, because domains exist on a stack. - // To execute code outside of any domain, the following dance is necessary. - var parentDomain = process.domain; - if (parentDomain) { - if (!domain) { - // Lazy execute the domain module. - // Only employed if the user elects to use domains. - domain = __webpack_require__(965); - } - domain.active = process.domain = null; + const solvedRange = (_semver || _load_semver()).default.validRange(range) ? info.version : range; + const resolved = this.resolver.getExactVersionMatch(name, solvedRange, info); + if (resolved) { + return resolved; } + invariant(info._remote, 'expected package remote'); + const ref = new (_packageReference || _load_packageReference()).default(this, info, info._remote); + info._reference = ref; + return info; + } - // `setImmediate` is slower that `process.nextTick`, but `process.nextTick` - // cannot handle recursion. - // `requestFlush` will only be called recursively from `asap.js`, to resume - // flushing after an error is thrown into a domain. - // Conveniently, `setImmediate` was introduced in the same version - // `process.nextTick` started throwing recursion errors. - if (flushing && hasSetImmediate) { - setImmediate(flush); - } else { - process.nextTick(flush); - } + resolveToExistingVersion(info) { + const resolved = this._findResolvedManifest(info); + invariant(resolved, 'should have found a resolved reference'); + const ref = resolved._reference; + invariant(ref, 'should have a package reference'); + ref.addRequest(this); + ref.addPattern(this.pattern, resolved); + ref.addOptional(this.optional); + } - if (parentDomain) { - domain.active = process.domain = parentDomain; + findVersionInfo() { + if (!this.import) { + this.reporter.verbose(this.reporter.lang('skippingImport', this.pattern, this.getParentHumanName())); + return super.findVersionInfo(); } + const resolver = new ImportResolver(this, this.pattern); + return resolver.resolve().catch(() => { + this.import = false; + this.reporter.warn(this.reporter.lang('importFailed', this.pattern, this.getParentHumanName())); + return super.findVersionInfo(); + }); + } } +class ImportPackageResolver extends (_packageResolver || _load_packageResolver()).default { + constructor(config, lockfile) { + super(config, lockfile); + this.next = []; + this.rootName = 'root'; + } -/***/ }), -/* 514 */ -/***/ (function(module, exports, __webpack_require__) { + find(req) { + this.next.push(req); + return Promise.resolve(); + } -// Copyright 2011 Mark Cavage All rights reserved. + findOne(req) { + var _this5 = this; -var errors = __webpack_require__(205); -var types = __webpack_require__(206); + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + if (_this5.activity) { + _this5.activity.tick(req.pattern); + } + const request = new ImportPackageRequest(req, _this5.dependencyTree, _this5); + yield request.find({ fresh: false }); + })(); + } -var Reader = __webpack_require__(515); -var Writer = __webpack_require__(516); + findAll(deps) { + var _this6 = this; + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + yield Promise.all(deps.map(function (dep) { + return _this6.findOne(dep); + })); + deps = _this6.next; + _this6.next = []; + if (!deps.length) { + // all required package versions have been discovered, so now packages that + // resolved to existing versions can be resolved to their best available version + _this6.resolvePackagesWithExistingVersions(); + return; + } + yield _this6.findAll(deps); + })(); + } -// --- Exports + resetOptional() { + for (const pattern in this.patterns) { + const ref = this.patterns[pattern]._reference; + invariant(ref, 'expected reference'); + ref.optional = null; + for (var _iterator = ref.requests, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; -module.exports = { + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } - Reader: Reader, + const req = _ref; - Writer: Writer + ref.addOptional(req.optional); + } + } + } -}; + init(deps, { isFlat, isFrozen, workspaceLayout } = { isFlat: false, isFrozen: false, workspaceLayout: undefined }) { + var _this7 = this; -for (var t in types) { - if (types.hasOwnProperty(t)) - module.exports[t] = types[t]; -} -for (var e in errors) { - if (errors.hasOwnProperty(e)) - module.exports[e] = errors[e]; + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + _this7.flat = Boolean(isFlat); + const activity = _this7.activity = _this7.reporter.activity(); + yield _this7.findAll(deps); + _this7.resetOptional(); + activity.end(); + _this7.activity = null; + })(); + } } +class Import extends (_install || _load_install()).Install { + constructor(flags, config, reporter, lockfile) { + super(flags, config, reporter, lockfile); + this.resolver = new ImportPackageResolver(this.config, this.lockfile); + this.linker = new (_packageLinker || _load_packageLinker()).default(config, this.resolver); + } + createLogicalDependencyTree(packageJson, packageLock) { + invariant(packageJson, 'package.json should exist'); + invariant(packageLock, 'package-lock.json should exist'); + invariant(this.resolver instanceof ImportPackageResolver, 'resolver should be an ImportPackageResolver'); + try { + this.resolver.dependencyTree = new (_logicalDependencyTree || _load_logicalDependencyTree()).LogicalDependencyTree(packageJson, packageLock); + } catch (e) { + throw new (_errors || _load_errors()).MessageError(this.reporter.lang('importSourceFilesCorrupted')); + } + } + getExternalLockfileContents() { + var _this8 = this; -/***/ }), -/* 515 */ -/***/ (function(module, exports, __webpack_require__) { - -// Copyright 2011 Mark Cavage All rights reserved. + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + try { + var _ref2 = yield Promise.all([(_fs || _load_fs()).readFile(path.join(_this8.config.cwd, (_constants || _load_constants()).NODE_PACKAGE_JSON)), (_fs || _load_fs()).readFile(path.join(_this8.config.cwd, (_constants || _load_constants()).NPM_LOCK_FILENAME))]); -var assert = __webpack_require__(28); -var Buffer = __webpack_require__(15).Buffer; + const packageJson = _ref2[0], + packageLock = _ref2[1]; -var ASN1 = __webpack_require__(206); -var errors = __webpack_require__(205); + return { packageJson, packageLock }; + } catch (e) { + return { packageJson: null, packageLock: null }; + } + })(); + } + init() { + var _this9 = this; + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + if (yield (_fs || _load_fs()).exists(path.join(_this9.config.cwd, (_constants || _load_constants()).LOCKFILE_FILENAME))) { + throw new (_errors || _load_errors()).MessageError(_this9.reporter.lang('lockfileExists')); + } -// --- Globals + var _ref3 = yield _this9.getExternalLockfileContents(); -var newInvalidAsn1Error = errors.newInvalidAsn1Error; + const packageJson = _ref3.packageJson, + packageLock = _ref3.packageLock; + const importSource = packageJson && packageLock && (_semver || _load_semver()).default.satisfies(nodeVersion, '>=5.0.0') ? 'package-lock.json' : 'node_modules'; + if (importSource === 'package-lock.json') { + _this9.reporter.info(_this9.reporter.lang('importPackageLock')); + _this9.createLogicalDependencyTree(packageJson, packageLock); + } + if (importSource === 'node_modules') { + _this9.reporter.info(_this9.reporter.lang('importNodeModules')); + yield (0, (_check || _load_check()).verifyTreeCheck)(_this9.config, _this9.reporter, {}, []); + } + var _ref4 = yield _this9.fetchRequestFromCwd(); -// --- API + const requests = _ref4.requests, + patterns = _ref4.patterns, + manifest = _ref4.manifest; -function Reader(data) { - if (!data || !Buffer.isBuffer(data)) - throw new TypeError('data must be a node Buffer'); + if (manifest.name && _this9.resolver instanceof ImportPackageResolver) { + _this9.resolver.rootName = manifest.name; + } + yield _this9.resolver.init(requests, { isFlat: _this9.flags.flat, isFrozen: _this9.flags.frozenLockfile }); + const manifests = yield (_packageFetcher || _load_packageFetcher()).fetch(_this9.resolver.getManifests(), _this9.config); + _this9.resolver.updateManifests(manifests); + yield (_packageCompatibility || _load_packageCompatibility()).check(_this9.resolver.getManifests(), _this9.config, _this9.flags.ignoreEngines); + yield _this9.linker.resolvePeerModules(); + yield _this9.saveLockfileAndIntegrity(patterns); + return patterns; + })(); + } +} - this._buf = data; - this._size = data.length; +exports.Import = Import; +function setFlags(commander) { + commander.description('Generates yarn.lock from an npm package-lock.json file or an existing npm-installed node_modules folder.'); +} - // These hold the "current" state - this._len = 0; - this._offset = 0; +function hasWrapper(commander, args) { + return true; } -Object.defineProperty(Reader.prototype, 'length', { - enumerable: true, - get: function () { return (this._len); } -}); +/***/ }), +/* 501 */ +/***/ (function(module, exports, __webpack_require__) { -Object.defineProperty(Reader.prototype, 'offset', { - enumerable: true, - get: function () { return (this._offset); } -}); +"use strict"; -Object.defineProperty(Reader.prototype, 'remain', { - get: function () { return (this._size - this._offset); } -}); -Object.defineProperty(Reader.prototype, 'buffer', { - get: function () { return (this._buf.slice(this._offset)); } +Object.defineProperty(exports, "__esModule", { + value: true }); +exports.run = undefined; +var _asyncToGenerator2; -/** - * Reads a single byte and advances offset; you can pass in `true` to make this - * a "peek" operation (i.e., get the byte, but don't advance the offset). - * - * @param {Boolean} peek true means don't move offset. - * @return {Number} the next byte, null if not enough data. - */ -Reader.prototype.readByte = function (peek) { - if (this._size - this._offset < 1) - return null; +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2)); +} - var b = this._buf[this._offset] & 0xff; +let run = exports.run = (() => { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + if (args.length > 2) { + reporter.error(reporter.lang('tooManyArguments', 2)); + return; + } - if (!peek) - this._offset += 1; + let packageName = args.shift() || '.'; - return b; -}; + // Handle the case when we are referencing a local package. + if (packageName === '.') { + packageName = (yield config.readRootManifest()).name; + } + const packageInput = (_npmRegistry || _load_npmRegistry()).default.escapeName(packageName); -Reader.prototype.peek = function () { - return this.readByte(true); -}; + var _parsePackageName = (0, (_parsePackageName2 || _load_parsePackageName()).default)(packageInput); + const name = _parsePackageName.name, + version = _parsePackageName.version; -/** - * Reads a (potentially) variable length off the BER buffer. This call is - * not really meant to be called directly, as callers have to manipulate - * the internal buffer afterwards. - * - * As a result of this call, you can call `Reader.length`, until the - * next thing called that does a readLength. - * - * @return {Number} the amount of offset to advance the buffer. - * @throws {InvalidAsn1Error} on bad ASN.1 - */ -Reader.prototype.readLength = function (offset) { - if (offset === undefined) - offset = this._offset; - if (offset >= this._size) - return null; + let result; + try { + result = yield config.registries.npm.request(name, { unfiltered: true }); + } catch (e) { + reporter.error(reporter.lang('infoFail')); + return; + } + if (!result) { + reporter.error(reporter.lang('infoFail')); + return; + } - var lenB = this._buf[offset++] & 0xff; - if (lenB === null) - return null; + result = clean(result); - if ((lenB & 0x80) === 0x80) { - lenB &= 0x7f; + const versions = result.versions; + // $FlowFixMe + result.versions = Object.keys(versions).sort(semver.compareLoose); + result.version = version || result['dist-tags'].latest; + result = Object.assign(result, versions[result.version]); - if (lenB === 0) - throw newInvalidAsn1Error('Indefinite length not supported'); + const fieldPath = args.shift(); + const fields = fieldPath ? fieldPath.split('.') : []; - if (lenB > 4) - throw newInvalidAsn1Error('encoding too long'); + // Readmes can be long so exclude them unless explicitly asked for. + if (fields[0] !== 'readme') { + delete result.readme; + } - if (this._size - offset < lenB) - return null; + result = fields.reduce(function (prev, cur) { + return prev && prev[cur]; + }, result); + reporter.inspect(result); + }); - this._len = 0; - for (var i = 0; i < lenB; i++) - this._len = (this._len << 8) + (this._buf[offset++] & 0xff); + return function run(_x, _x2, _x3, _x4) { + return _ref.apply(this, arguments); + }; +})(); - } else { - // Wasn't a variable length - this._len = lenB; - } +exports.setFlags = setFlags; +exports.hasWrapper = hasWrapper; - return offset; -}; +var _npmRegistry; +function _load_npmRegistry() { + return _npmRegistry = _interopRequireDefault(__webpack_require__(88)); +} -/** - * Parses the next sequence in this BER buffer. - * - * To get the length of the sequence, call `Reader.length`. - * - * @return {Number} the sequence's tag. - */ -Reader.prototype.readSequence = function (tag) { - var seq = this.peek(); - if (seq === null) - return null; - if (tag !== undefined && tag !== seq) - throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + - ': got 0x' + seq.toString(16)); +var _parsePackageName2; - var o = this.readLength(this._offset + 1); // stored in `length` - if (o === null) - return null; +function _load_parsePackageName() { + return _parsePackageName2 = _interopRequireDefault(__webpack_require__(556)); +} - this._offset = o; - return seq; -}; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const semver = __webpack_require__(22); -Reader.prototype.readInt = function () { - return this._readTag(ASN1.Integer); -}; +function clean(object) { + if (Array.isArray(object)) { + const result = []; + object.forEach(item => { + item = clean(item); + if (item) { + result.push(item); + } + }); + return result; + } else if (typeof object === 'object') { + const result = {}; + for (const key in object) { + if (key.startsWith('_')) { + continue; + } + const item = clean(object[key]); + if (item) { + result[key] = item; + } + } + return result; + } else if (object) { + return object; + } else { + return null; + } +} -Reader.prototype.readBoolean = function () { - return (this._readTag(ASN1.Boolean) === 0 ? false : true); -}; +function setFlags(commander) { + commander.description('Shows information about a package.'); +} +function hasWrapper(commander, args) { + return true; +} -Reader.prototype.readEnumeration = function () { - return this._readTag(ASN1.Enumeration); -}; +/***/ }), +/* 502 */ +/***/ (function(module, exports, __webpack_require__) { +"use strict"; -Reader.prototype.readString = function (tag, retbuf) { - if (!tag) - tag = ASN1.OctetString; - var b = this.peek(); - if (b === null) - return null; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getGitConfigInfo = exports.run = exports.shouldRunInCurrentCwd = undefined; - if (b !== tag) - throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + - ': got 0x' + b.toString(16)); +var _asyncToGenerator2; - var o = this.readLength(this._offset + 1); // stored in `length` +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2)); +} - if (o === null) - return null; +let run = exports.run = (() => { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + const installVersion = flags[`2`] ? `berry` : flags.install; + const forwardedArgs = process.argv.slice(process.argv.indexOf('init', 2) + 1); - if (this.length > this._size - o) - return null; + if (installVersion) { + if (flags[`2`] && process.env.COREPACK_ROOT) { + yield (_child || _load_child()).spawn((_constants || _load_constants()).NODE_BIN_PATH, [path.join(process.env.COREPACK_ROOT, 'dist/corepack.js'), `yarn@${flags.install || `stable`}`, `init`, ...forwardedArgs, `--install=self`], { + stdio: 'inherit', + cwd: config.cwd + }); + } else { + const lockfilePath = path.resolve(config.cwd, 'yarn.lock'); + if (!(yield (_fs || _load_fs()).exists(lockfilePath))) { + yield (_fs || _load_fs()).writeFile(lockfilePath, ''); + } + yield (_child || _load_child()).spawn((_constants || _load_constants()).NODE_BIN_PATH, [process.argv[1], 'policies', 'set-version', installVersion, '--silent'], { + stdio: 'inherit', + cwd: config.cwd + }); + yield (_child || _load_child()).spawn((_constants || _load_constants()).NODE_BIN_PATH, [process.argv[1], 'init', ...forwardedArgs], { + stdio: 'inherit', + cwd: config.cwd + }); + } + return; + } - this._offset = o; + const manifests = yield config.getRootManifests(); - if (this.length === 0) - return retbuf ? Buffer.alloc(0) : ''; + let repository = {}; + const author = { + name: config.getOption('init-author-name'), + email: config.getOption('init-author-email'), + url: config.getOption('init-author-url') + }; + if (yield (_fs || _load_fs()).exists(path.join(config.cwd, '.git'))) { + // get git origin of the cwd + try { + repository = { + type: 'git', + url: yield (_child || _load_child()).spawn('git', ['config', 'remote.origin.url'], { + cwd: config.cwd + }) + }; + } catch (ex) { + // Ignore - Git repo may not have an origin URL yet (eg. if it only exists locally) + } - var str = this._buf.slice(this._offset, this._offset + this.length); - this._offset += this.length; + if (author.name === undefined) { + author.name = yield getGitConfigInfo('user.name'); + } - return retbuf ? str : str.toString('utf8'); -}; + if (author.email === undefined) { + author.email = yield getGitConfigInfo('user.email'); + } + } -Reader.prototype.readOID = function (tag) { - if (!tag) - tag = ASN1.OID; + const keys = [{ + key: 'name', + question: 'name', + default: path.basename(config.cwd), + validation: (_validate || _load_validate()).isValidPackageName, + validationError: 'invalidPackageName' + }, { + key: 'version', + question: 'version', + default: String(config.getOption('init-version')) + }, { + key: 'description', + question: 'description', + default: '' + }, { + key: 'main', + question: 'entry point', + default: 'index.js' + }, { + key: 'repository', + question: 'repository url', + default: (0, (_util || _load_util()).extractRepositoryUrl)(repository) + }, { + key: 'author', + question: 'author', + default: (0, (_util || _load_util()).stringifyPerson)(author) + }, { + key: 'license', + question: 'license', + default: String(config.getOption('init-license')) + }, { + key: 'private', + question: 'private', + default: config.getOption('init-private') || '', + inputFormatter: yn + }]; - var b = this.readString(tag, true); - if (b === null) - return null; + // get answers + const pkg = {}; + for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref2; - var values = []; - var value = 0; + if (_isArray) { + if (_i >= _iterator.length) break; + _ref2 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref2 = _i.value; + } - for (var i = 0; i < b.length; i++) { - var byte = b[i] & 0xff; + const entry = _ref2; + const yes = flags.yes, + privateFlag = flags.private; + const manifestKey = entry.key; + let question = entry.question, + def = entry.default; - value <<= 7; - value += byte & 0x7f; - if ((byte & 0x80) === 0) { - values.push(value); - value = 0; - } - } - value = values.shift(); - values.unshift(value % 40); - values.unshift((value / 40) >> 0); + for (var _iterator4 = (_index || _load_index()).registryNames, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) { + var _ref5; - return values.join('.'); -}; + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref5 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref5 = _i4.value; + } + const registryName = _ref5; + const object = manifests[registryName].object; -Reader.prototype._readTag = function (tag) { - assert.ok(tag !== undefined); + let val = objectPath.get(object, manifestKey); + if (!val) { + break; + } + if (typeof val === 'object') { + if (manifestKey === 'author') { + val = (0, (_util || _load_util()).stringifyPerson)(val); + } else if (manifestKey === 'repository') { + val = (0, (_util || _load_util()).extractRepositoryUrl)(val); + } + } + def = val; + } - var b = this.peek(); + if (manifestKey === 'private' && privateFlag) { + def = true; + } - if (b === null) - return null; + if (def) { + question += ` (${String(def)})`; + } - if (b !== tag) - throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + - ': got 0x' + b.toString(16)); + let answer; + let validAnswer = false; - var o = this.readLength(this._offset + 1); // stored in `length` - if (o === null) - return null; + if (yes) { + answer = def; + } else { + // loop until a valid answer is provided, if validation is on entry + if (entry.validation) { + while (!validAnswer) { + answer = (yield reporter.question(question)) || def; + // validate answer + if (entry.validation(String(answer))) { + validAnswer = true; + } else { + reporter.error(reporter.lang('invalidPackageName')); + } + } + } else { + answer = (yield reporter.question(question)) || def; + } + } - if (this.length > 4) - throw newInvalidAsn1Error('Integer too long: ' + this.length); + if (answer) { + if (entry.inputFormatter) { + answer = entry.inputFormatter(answer); + } + objectPath.set(pkg, manifestKey, answer); + } + } - if (this.length > this._size - o) - return null; - this._offset = o; + if (pkg.repository && (_githubResolver || _load_githubResolver()).default.isVersion(pkg.repository)) { + pkg.repository = `https://github.com/${pkg.repository}`; + } - var fb = this._buf[this._offset]; - var value = 0; + // save answers + const targetManifests = []; + for (var _iterator2 = (_index || _load_index()).registryNames, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref3; - for (var i = 0; i < this.length; i++) { - value <<= 8; - value |= (this._buf[this._offset++] & 0xff); - } + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref3 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref3 = _i2.value; + } - if ((fb & 0x80) === 0x80 && i !== 4) - value -= (1 << (i * 8)); + const registryName = _ref3; - return value >> 0; -}; + const info = manifests[registryName]; + if (info.exists) { + targetManifests.push(info); + } + } + if (!targetManifests.length) { + targetManifests.push(manifests.npm); + } + for (var _iterator3 = targetManifests, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { + var _ref4; + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref4 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref4 = _i3.value; + } + const targetManifest = _ref4; -// --- Exported API + Object.assign(targetManifest.object, pkg); + reporter.success(`Saved ${path.basename(targetManifest.loc)}`); + } -module.exports = Reader; + yield config.saveRootManifests(manifests); + }); + return function run(_x, _x2, _x3, _x4) { + return _ref.apply(this, arguments); + }; +})(); -/***/ }), -/* 516 */ -/***/ (function(module, exports, __webpack_require__) { +let getGitConfigInfo = exports.getGitConfigInfo = (() => { + var _ref6 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (credential, spawn = (_child || _load_child()).spawn) { + try { + // try to get author default based on git config + return yield spawn('git', ['config', credential]); + } catch (e) { + return ''; + } + }); -// Copyright 2011 Mark Cavage All rights reserved. + return function getGitConfigInfo(_x5) { + return _ref6.apply(this, arguments); + }; +})(); -var assert = __webpack_require__(28); -var Buffer = __webpack_require__(15).Buffer; -var ASN1 = __webpack_require__(206); -var errors = __webpack_require__(205); +exports.setFlags = setFlags; +exports.hasWrapper = hasWrapper; +var _util; -// --- Globals +function _load_util() { + return _util = __webpack_require__(219); +} -var newInvalidAsn1Error = errors.newInvalidAsn1Error; +var _index; -var DEFAULT_OPTS = { - size: 1024, - growthFactor: 8 -}; +function _load_index() { + return _index = __webpack_require__(58); +} +var _githubResolver; -// --- Helpers +function _load_githubResolver() { + return _githubResolver = _interopRequireDefault(__webpack_require__(361)); +} -function merge(from, to) { - assert.ok(from); - assert.equal(typeof (from), 'object'); - assert.ok(to); - assert.equal(typeof (to), 'object'); +var _child; - var keys = Object.getOwnPropertyNames(from); - keys.forEach(function (key) { - if (to[key]) - return; +function _load_child() { + return _child = _interopRequireWildcard(__webpack_require__(50)); +} - var value = Object.getOwnPropertyDescriptor(from, key); - Object.defineProperty(to, key, value); - }); +var _fs; - return to; +function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(5)); } +var _validate; +function _load_validate() { + return _validate = _interopRequireWildcard(__webpack_require__(125)); +} -// --- API +var _constants; -function Writer(options) { - options = merge(DEFAULT_OPTS, options || {}); +function _load_constants() { + return _constants = __webpack_require__(8); +} - this._buf = Buffer.alloc(options.size || 1024); - this._size = this._buf.length; - this._offset = 0; - this._options = options; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - // A list of offsets in the buffer where we need to insert - // sequence tag/len pairs. - this._seq = []; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const objectPath = __webpack_require__(304); + +const path = __webpack_require__(0); +const yn = __webpack_require__(962); + +function setFlags(commander) { + commander.description('Interactively creates or updates a package.json file.'); + commander.option('-y, --yes', 'use default options'); + commander.option('-p, --private', 'use default options and private true'); + commander.option('-i, --install ', 'install a specific Yarn release'); + commander.option('-2', 'generates the project using Yarn 2'); } -Object.defineProperty(Writer.prototype, 'buffer', { - get: function () { - if (this._seq.length) - throw newInvalidAsn1Error(this._seq.length + ' unended sequence(s)'); +function hasWrapper(commander, args) { + return true; +} - return (this._buf.slice(0, this._offset)); - } +const shouldRunInCurrentCwd = exports.shouldRunInCurrentCwd = true; + +/***/ }), +/* 503 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true }); +exports.examples = exports.run = undefined; -Writer.prototype.writeByte = function (b) { - if (typeof (b) !== 'number') - throw new TypeError('argument must be a Number'); +var _extends2; - this._ensure(1); - this._buf[this._offset++] = b; -}; +function _load_extends() { + return _extends2 = _interopRequireDefault(__webpack_require__(20)); +} +var _asyncToGenerator2; -Writer.prototype.writeInt = function (i, tag) { - if (typeof (i) !== 'number') - throw new TypeError('argument must be a Number'); - if (typeof (tag) !== 'number') - tag = ASN1.Integer; +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2)); +} - var sz = 4; +let getManifests = (() => { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, flags) { + const lockfile = yield (_lockfile || _load_lockfile()).default.fromDirectory(config.cwd); + const install = new (_install || _load_install()).Install((0, (_extends2 || _load_extends()).default)({ skipIntegrityCheck: true }, flags), config, new (_baseReporter || _load_baseReporter()).default(), lockfile); + yield install.hydrate(true); - while ((((i & 0xff800000) === 0) || ((i & 0xff800000) === 0xff800000 >> 0)) && - (sz > 1)) { - sz--; - i <<= 8; - } + let manifests = install.resolver.getManifests(); - if (sz > 4) - throw newInvalidAsn1Error('BER ints cannot be > 0xffffffff'); + // sort by name + manifests = manifests.sort(function (a, b) { + if (!a.name && !b.name) { + return 0; + } - this._ensure(2 + sz); - this._buf[this._offset++] = tag; - this._buf[this._offset++] = sz; + if (!a.name) { + return 1; + } - while (sz-- > 0) { - this._buf[this._offset++] = ((i & 0xff000000) >>> 24); - i <<= 8; - } + if (!b.name) { + return -1; + } -}; + return a.name.localeCompare(b.name); + }); + // filter ignored manifests + manifests = manifests.filter(function (manifest) { + const ref = manifest._reference; + return !!ref && !ref.ignore; + }); -Writer.prototype.writeNull = function () { - this.writeByte(ASN1.Null); - this.writeByte(0x00); -}; + return manifests; + }); + return function getManifests(_x, _x2) { + return _ref.apply(this, arguments); + }; +})(); -Writer.prototype.writeEnumeration = function (i, tag) { - if (typeof (i) !== 'number') - throw new TypeError('argument must be a Number'); - if (typeof (tag) !== 'number') - tag = ASN1.Enumeration; +let list = (() => { + var _ref2 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + const manifests = yield getManifests(config, flags); + const manifestsByLicense = new Map(); - return this.writeInt(i, tag); -}; + for (var _iterator = manifests, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref4; + if (_isArray) { + if (_i >= _iterator.length) break; + _ref4 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref4 = _i.value; + } -Writer.prototype.writeBoolean = function (b, tag) { - if (typeof (b) !== 'boolean') - throw new TypeError('argument must be a Boolean'); - if (typeof (tag) !== 'number') - tag = ASN1.Boolean; + const _ref3 = _ref4; + const name = _ref3.name, + version = _ref3.version, + license = _ref3.license, + repository = _ref3.repository, + homepage = _ref3.homepage, + author = _ref3.author; - this._ensure(3); - this._buf[this._offset++] = tag; - this._buf[this._offset++] = 0x01; - this._buf[this._offset++] = b ? 0xff : 0x00; -}; + const licenseKey = license || 'UNKNOWN'; + const url = repository ? repository.url : homepage; + const vendorUrl = homepage || author && author.url; + const vendorName = author && author.name; + if (!manifestsByLicense.has(licenseKey)) { + manifestsByLicense.set(licenseKey, new Map()); + } -Writer.prototype.writeString = function (s, tag) { - if (typeof (s) !== 'string') - throw new TypeError('argument must be a string (was: ' + typeof (s) + ')'); - if (typeof (tag) !== 'number') - tag = ASN1.OctetString; + const byLicense = manifestsByLicense.get(licenseKey); + invariant(byLicense, 'expected value'); + byLicense.set(`${name}@${version}`, { + name, + version, + url, + vendorUrl, + vendorName + }); + } - var len = Buffer.byteLength(s); - this.writeByte(tag); - this.writeLength(len); - if (len) { - this._ensure(len); - this._buf.write(s, this._offset); - this._offset += len; - } -}; + if (flags.json) { + const body = []; + manifestsByLicense.forEach(function (license, licenseKey) { + license.forEach(function ({ name, version, url, vendorUrl, vendorName }) { + body.push([name, version, licenseKey, url || 'Unknown', vendorUrl || 'Unknown', vendorName || 'Unknown']); + }); + }); -Writer.prototype.writeBuffer = function (buf, tag) { - if (typeof (tag) !== 'number') - throw new TypeError('tag must be a number'); - if (!Buffer.isBuffer(buf)) - throw new TypeError('argument must be a buffer'); + reporter.table(['Name', 'Version', 'License', 'URL', 'VendorUrl', 'VendorName'], body); + } else { + const trees = []; - this.writeByte(tag); - this.writeLength(buf.length); - this._ensure(buf.length); - buf.copy(this._buf, this._offset, 0, buf.length); - this._offset += buf.length; -}; + manifestsByLicense.forEach(function (license, licenseKey) { + const licenseTree = []; + license.forEach(function ({ name, version, url, vendorUrl, vendorName }) { + const children = []; -Writer.prototype.writeStringArray = function (strings) { - if ((!strings instanceof Array)) - throw new TypeError('argument must be an Array[String]'); + if (url) { + children.push({ name: `${reporter.format.bold('URL:')} ${url}` }); + } - var self = this; - strings.forEach(function (s) { - self.writeString(s); - }); -}; + if (vendorUrl) { + children.push({ name: `${reporter.format.bold('VendorUrl:')} ${vendorUrl}` }); + } -// This is really to solve DER cases, but whatever for now -Writer.prototype.writeOID = function (s, tag) { - if (typeof (s) !== 'string') - throw new TypeError('argument must be a string'); - if (typeof (tag) !== 'number') - tag = ASN1.OID; + if (vendorName) { + children.push({ name: `${reporter.format.bold('VendorName:')} ${vendorName}` }); + } - if (!/^([0-9]+\.){3,}[0-9]+$/.test(s)) - throw new Error('argument is not a valid OID string'); + licenseTree.push({ + name: `${name}@${version}`, + children + }); + }); - function encodeOctet(bytes, octet) { - if (octet < 128) { - bytes.push(octet); - } else if (octet < 16384) { - bytes.push((octet >>> 7) | 0x80); - bytes.push(octet & 0x7F); - } else if (octet < 2097152) { - bytes.push((octet >>> 14) | 0x80); - bytes.push(((octet >>> 7) | 0x80) & 0xFF); - bytes.push(octet & 0x7F); - } else if (octet < 268435456) { - bytes.push((octet >>> 21) | 0x80); - bytes.push(((octet >>> 14) | 0x80) & 0xFF); - bytes.push(((octet >>> 7) | 0x80) & 0xFF); - bytes.push(octet & 0x7F); - } else { - bytes.push(((octet >>> 28) | 0x80) & 0xFF); - bytes.push(((octet >>> 21) | 0x80) & 0xFF); - bytes.push(((octet >>> 14) | 0x80) & 0xFF); - bytes.push(((octet >>> 7) | 0x80) & 0xFF); - bytes.push(octet & 0x7F); - } - } + trees.push({ + name: licenseKey, + children: licenseTree + }); + }); - var tmp = s.split('.'); - var bytes = []; - bytes.push(parseInt(tmp[0], 10) * 40 + parseInt(tmp[1], 10)); - tmp.slice(2).forEach(function (b) { - encodeOctet(bytes, parseInt(b, 10)); + reporter.tree('licenses', trees, { force: true }); + } }); - var self = this; - this._ensure(2 + bytes.length); - this.writeByte(tag); - this.writeLength(bytes.length); - bytes.forEach(function (b) { - self.writeByte(b); - }); -}; + return function list(_x3, _x4, _x5, _x6) { + return _ref2.apply(this, arguments); + }; +})(); +exports.hasWrapper = hasWrapper; +exports.setFlags = setFlags; -Writer.prototype.writeLength = function (len) { - if (typeof (len) !== 'number') - throw new TypeError('argument must be a Number'); +var _baseReporter; - this._ensure(4); +function _load_baseReporter() { + return _baseReporter = _interopRequireDefault(__webpack_require__(108)); +} - if (len <= 0x7f) { - this._buf[this._offset++] = len; - } else if (len <= 0xff) { - this._buf[this._offset++] = 0x81; - this._buf[this._offset++] = len; - } else if (len <= 0xffff) { - this._buf[this._offset++] = 0x82; - this._buf[this._offset++] = len >> 8; - this._buf[this._offset++] = len; - } else if (len <= 0xffffff) { - this._buf[this._offset++] = 0x83; - this._buf[this._offset++] = len >> 16; - this._buf[this._offset++] = len >> 8; - this._buf[this._offset++] = len; - } else { - throw newInvalidAsn1Error('Length too long (> 4 bytes)'); - } -}; +var _install; -Writer.prototype.startSequence = function (tag) { - if (typeof (tag) !== 'number') - tag = ASN1.Sequence | ASN1.Constructor; +function _load_install() { + return _install = __webpack_require__(34); +} - this.writeByte(tag); - this._seq.push(this._offset); - this._ensure(3); - this._offset += 3; -}; +var _lockfile; +function _load_lockfile() { + return _lockfile = _interopRequireDefault(__webpack_require__(19)); +} -Writer.prototype.endSequence = function () { - var seq = this._seq.pop(); - var start = seq + 3; - var len = this._offset - start; +var _buildSubCommands2; - if (len <= 0x7f) { - this._shift(start, len, -2); - this._buf[seq] = len; - } else if (len <= 0xff) { - this._shift(start, len, -1); - this._buf[seq] = 0x81; - this._buf[seq + 1] = len; - } else if (len <= 0xffff) { - this._buf[seq] = 0x82; - this._buf[seq + 1] = len >> 8; - this._buf[seq + 2] = len; - } else if (len <= 0xffffff) { - this._shift(start, len, 1); - this._buf[seq] = 0x83; - this._buf[seq + 1] = len >> 16; - this._buf[seq + 2] = len >> 8; - this._buf[seq + 3] = len; - } else { - throw newInvalidAsn1Error('Sequence too long'); - } -}; +function _load_buildSubCommands() { + return _buildSubCommands2 = _interopRequireDefault(__webpack_require__(59)); +} +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -Writer.prototype._shift = function (start, len, shift) { - assert.ok(start !== undefined); - assert.ok(len !== undefined); - assert.ok(shift); +const invariant = __webpack_require__(9); - this._buf.copy(this._buf, start + shift, start, start + len); - this._offset += shift; -}; +function hasWrapper(flags, args) { + return args[0] != 'generate-disclaimer'; +} -Writer.prototype._ensure = function (len) { - assert.ok(len); +function setFlags(commander) { + commander.description('Lists licenses for installed packages.'); +} - if (this._size - this._offset < len) { - var sz = this._size * this._options.growthFactor; - if (sz - this._offset < len) - sz += len; +var _buildSubCommands = (0, (_buildSubCommands2 || _load_buildSubCommands()).default)('licenses', { + ls(config, reporter, flags, args) { + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + reporter.warn(`\`yarn licenses ls\` is deprecated. Please use \`yarn licenses list\`.`); + yield list(config, reporter, flags, args); + })(); + }, - var buf = Buffer.alloc(sz); + list(config, reporter, flags, args) { + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + yield list(config, reporter, flags, args); + })(); + }, - this._buf.copy(buf, 0, 0, this._offset); - this._buf = buf; - this._size = sz; - } -}; + generateDisclaimer(config, reporter, flags, args) { + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + /* eslint-disable no-console */ + // `reporter.log` dumps a bunch of ANSI escapes to clear the current line and + // is for abstracting the console output so it can be consumed by other tools + // (JSON output being the primary one). This command is only for text consumption + // and you should just be dumping it to a TXT file. Using a reporter here has the + // potential to mess up the output since it might print ansi escapes. + const manifests = yield getManifests(config, flags); + const manifest = yield config.readRootManifest(); + // Create a map of license text to manifest so that packages with exactly + // the same license text are grouped together. + const manifestsByLicense = new Map(); + for (var _iterator2 = manifests, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref5; -// --- Exported API + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref5 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref5 = _i2.value; + } -module.exports = Writer; + const manifest = _ref5; + const licenseText = manifest.licenseText, + noticeText = manifest.noticeText; + let licenseKey; + if (!licenseText) { + continue; + } -/***/ }), -/* 517 */ -/***/ (function(module, exports, __webpack_require__) { + if (!noticeText) { + licenseKey = licenseText; + } else { + licenseKey = `${licenseText}\n\nNOTICE\n\n${noticeText}`; + } -module.exports = -{ - parallel : __webpack_require__(519), - serial : __webpack_require__(520), - serialOrdered : __webpack_require__(351) -}; + if (!manifestsByLicense.has(licenseKey)) { + manifestsByLicense.set(licenseKey, new Map()); + } + const byLicense = manifestsByLicense.get(licenseKey); + invariant(byLicense, 'expected value'); + byLicense.set(manifest.name, manifest); + } -/***/ }), -/* 518 */ -/***/ (function(module, exports) { + console.log('THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY BE CONTAINED ' + `IN PORTIONS OF THE ${String(manifest.name).toUpperCase().replace(/-/g, ' ')} PRODUCT.`); + console.log(); -module.exports = defer; + for (var _iterator3 = manifestsByLicense, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { + var _ref7; -/** - * Runs provided function on next iteration of the event loop - * - * @param {function} fn - function to run - */ -function defer(fn) -{ - var nextTick = typeof setImmediate == 'function' - ? setImmediate - : ( - typeof process == 'object' && typeof process.nextTick == 'function' - ? process.nextTick - : null - ); + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref7 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref7 = _i3.value; + } - if (nextTick) - { - nextTick(fn); - } - else - { - setTimeout(fn, 0); - } -} + const _ref6 = _ref7; + const licenseKey = _ref6[0]; + const manifests = _ref6[1]; + console.log('-----'); + console.log(); -/***/ }), -/* 519 */ -/***/ (function(module, exports, __webpack_require__) { + const names = []; + const urls = []; + for (var _iterator4 = manifests, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) { + var _ref9; -var iterate = __webpack_require__(348) - , initState = __webpack_require__(349) - , terminator = __webpack_require__(350) - ; + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref9 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref9 = _i4.value; + } -// Public API -module.exports = parallel; + const _ref8 = _ref9; + const name = _ref8[0]; + const repository = _ref8[1].repository; -/** - * Runs iterator over provided array elements in parallel - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function parallel(list, iterator, callback) -{ - var state = initState(list); + names.push(name); + if (repository && repository.url) { + urls.push(manifests.size === 1 ? repository.url : `${repository.url} (${name})`); + } + } - while (state.index < (state['keyedList'] || list).length) - { - iterate(list, iterator, state, function(error, result) - { - if (error) - { - callback(error, result); - return; - } + const heading = []; + heading.push(`The following software may be included in this product: ${names.join(', ')}.`); + if (urls.length > 0) { + heading.push(`A copy of the source code may be downloaded from ${urls.join(', ')}.`); + } + heading.push('This software contains the following license and notice below:'); - // looks like it's the last one - if (Object.keys(state.jobs).length === 0) - { - callback(null, state.results); - return; - } - }); + console.log(heading.join(' ')); + console.log(); - state.index++; - } + if (licenseKey) { + console.log(licenseKey.trim()); + } else { + // what do we do here? base it on `license`? + } - return terminator.bind(state, callback); -} + console.log(); + } + })(); + } +}); +const run = _buildSubCommands.run, + examples = _buildSubCommands.examples; +exports.run = run; +exports.examples = examples; /***/ }), -/* 520 */ +/* 504 */ /***/ (function(module, exports, __webpack_require__) { -var serialOrdered = __webpack_require__(351); +"use strict"; -// Public API -module.exports = serial; -/** - * Runs iterator over provided array elements in series - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function serial(list, iterator, callback) -{ - return serialOrdered(list, iterator, null, callback); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.run = undefined; + +var _asyncToGenerator2; + +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2)); } +let run = exports.run = (() => { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + yield config.registries.yarn.saveHomeConfig({ + username: undefined, + email: undefined + }); -/***/ }), -/* 521 */ -/***/ (function(module, exports, __webpack_require__) { + reporter.success(reporter.lang('clearedCredentials')); + }); + return function run(_x, _x2, _x3, _x4) { + return _ref.apply(this, arguments); + }; +})(); -/*! - * Copyright 2010 LearnBoost - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +exports.setFlags = setFlags; +exports.hasWrapper = hasWrapper; -/** - * Module dependencies. - */ +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var crypto = __webpack_require__(12) - , parse = __webpack_require__(24).parse - ; +function setFlags(commander) { + commander.description('Clears registry username and email.'); +} -/** - * Valid keys. - */ +function hasWrapper(commander, args) { + return true; +} -var keys = - [ 'acl' - , 'location' - , 'logging' - , 'notification' - , 'partNumber' - , 'policy' - , 'requestPayment' - , 'torrent' - , 'uploadId' - , 'uploads' - , 'versionId' - , 'versioning' - , 'versions' - , 'website' - ] +/***/ }), +/* 505 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Return an "Authorization" header value with the given `options` - * in the form of "AWS :" - * - * @param {Object} options - * @return {String} - * @api private - */ +"use strict"; -function authorization (options) { - return 'AWS ' + options.key + ':' + sign(options) -} -module.exports = authorization -module.exports.authorization = authorization +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.run = undefined; -/** - * Simple HMAC-SHA1 Wrapper - * - * @param {Object} options - * @return {String} - * @api private - */ +var _extends2; -function hmacSha1 (options) { - return crypto.createHmac('sha1', options.secret).update(options.message).digest('base64') +function _load_extends() { + return _extends2 = _interopRequireDefault(__webpack_require__(20)); } -module.exports.hmacSha1 = hmacSha1 - -/** - * Create a base64 sha1 HMAC for `options`. - * - * @param {Object} options - * @return {String} - * @api private - */ +var _asyncToGenerator2; -function sign (options) { - options.message = stringToSign(options) - return hmacSha1(options) +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2)); } -module.exports.sign = sign -/** - * Create a base64 sha1 HMAC for `options`. - * - * Specifically to be used with S3 presigned URLs - * - * @param {Object} options - * @return {String} - * @api private - */ - -function signQuery (options) { - options.message = queryStringToSign(options) - return hmacSha1(options) -} -module.exports.signQuery= signQuery +let run = exports.run = (() => { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + const pnpPath = `${config.lockfileFolder}/${(_constants || _load_constants()).PNP_FILENAME}`; -/** - * Return a string for sign() with the given `options`. - * - * Spec: - * - * \n - * \n - * \n - * \n - * [headers\n] - * - * - * @param {Object} options - * @return {String} - * @api private - */ + let nodeOptions = process.env.NODE_OPTIONS || ''; + if (yield (_fs || _load_fs()).exists(pnpPath)) { + nodeOptions = `--require ${pnpPath} ${nodeOptions}`; + } -function stringToSign (options) { - var headers = options.amazonHeaders || '' - if (headers) headers += '\n' - var r = - [ options.verb - , options.md5 - , options.contentType - , options.date ? options.date.toUTCString() : '' - , headers + options.resource - ] - return r.join('\n') -} -module.exports.stringToSign = stringToSign + try { + yield (_child || _load_child()).spawn((_constants || _load_constants()).NODE_BIN_PATH, args, { + stdio: 'inherit', + cwd: flags.into || config.cwd, + env: (0, (_extends2 || _load_extends()).default)({}, process.env, { NODE_OPTIONS: nodeOptions }) + }); + } catch (err) { + throw err; + } + }); -/** - * Return a string for sign() with the given `options`, but is meant exclusively - * for S3 presigned URLs - * - * Spec: - * - * \n - * - * - * @param {Object} options - * @return {String} - * @api private - */ + return function run(_x, _x2, _x3, _x4) { + return _ref.apply(this, arguments); + }; +})(); -function queryStringToSign (options){ - return 'GET\n\n\n' + options.date + '\n' + options.resource -} -module.exports.queryStringToSign = queryStringToSign +exports.setFlags = setFlags; +exports.hasWrapper = hasWrapper; -/** - * Perform the following: - * - * - ignore non-amazon headers - * - lowercase fields - * - sort lexicographically - * - trim whitespace between ":" - * - join with newline - * - * @param {Object} headers - * @return {String} - * @api private - */ +var _child; -function canonicalizeHeaders (headers) { - var buf = [] - , fields = Object.keys(headers) - ; - for (var i = 0, len = fields.length; i < len; ++i) { - var field = fields[i] - , val = headers[field] - , field = field.toLowerCase() - ; - if (0 !== field.indexOf('x-amz')) continue - buf.push(field + ':' + val) - } - return buf.sort().join('\n') +function _load_child() { + return _child = _interopRequireWildcard(__webpack_require__(50)); } -module.exports.canonicalizeHeaders = canonicalizeHeaders - -/** - * Perform the following: - * - * - ignore non sub-resources - * - sort lexicographically - * - * @param {String} resource - * @return {String} - * @api private - */ - -function canonicalizeResource (resource) { - var url = parse(resource, true) - , path = url.pathname - , buf = [] - ; - Object.keys(url.query).forEach(function(key){ - if (!~keys.indexOf(key)) return - var val = '' == url.query[key] ? '' : '=' + encodeURIComponent(url.query[key]) - buf.push(key + val) - }) +var _fs; - return path + (buf.length ? '?' + buf.sort().join('&') : '') +function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(5)); } -module.exports.canonicalizeResource = canonicalizeResource +var _constants; -/***/ }), -/* 522 */ -/***/ (function(module, exports, __webpack_require__) { - -var aws4 = exports, - url = __webpack_require__(24), - querystring = __webpack_require__(196), - crypto = __webpack_require__(12), - lru = __webpack_require__(523), - credentialsCache = lru(1000) +function _load_constants() { + return _constants = __webpack_require__(8); +} -// http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } -function hmac(key, string, encoding) { - return crypto.createHmac('sha256', key).update(string, 'utf8').digest(encoding) -} +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function hash(string, encoding) { - return crypto.createHash('sha256').update(string, 'utf8').digest(encoding) +function setFlags(commander) { + commander.description('Runs Node with the same version that the one used by Yarn itself, and by default from the project root'); + commander.usage('node [--into PATH] [... args]'); + commander.option('--into ', 'Sets the cwd to the specified location'); } -// This function assumes the string has already been percent encoded -function encodeRfc3986(urlEncodedString) { - return urlEncodedString.replace(/[!'()*]/g, function(c) { - return '%' + c.charCodeAt(0).toString(16).toUpperCase() - }) +function hasWrapper(commander, args) { + return true; } -// request: { path | body, [host], [method], [headers], [service], [region] } -// credentials: { accessKeyId, secretAccessKey, [sessionToken] } -function RequestSigner(request, credentials) { - - if (typeof request === 'string') request = url.parse(request) - - var headers = request.headers = (request.headers || {}), - hostParts = this.matchHost(request.hostname || request.host || headers.Host || headers.host) - - this.request = request - this.credentials = credentials || this.defaultCredentials() - - this.service = request.service || hostParts[0] || '' - this.region = request.region || hostParts[1] || 'us-east-1' - - // SES uses a different domain from the service name - if (this.service === 'email') this.service = 'ses' - - if (!request.method && request.body) - request.method = 'POST' - - if (!headers.Host && !headers.host) { - headers.Host = request.hostname || request.host || this.createHost() +/***/ }), +/* 506 */ +/***/ (function(module, exports, __webpack_require__) { - // If a port is specified explicitly, use it as is - if (request.port) - headers.Host += ':' + request.port - } - if (!request.hostname && !request.host) - request.hostname = headers.Host || headers.host +"use strict"; - this.isCodeCommitGit = this.service === 'codecommit' && request.method === 'GIT' -} -RequestSigner.prototype.matchHost = function(host) { - var match = (host || '').match(/([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com$/) - var hostParts = (match || []).slice(1, 3) +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.run = exports.requireLockfile = undefined; - // ES's hostParts are sometimes the other way round, if the value that is expected - // to be region equals ‘es’ switch them back - // e.g. search-cluster-name-aaaa00aaaa0aaa0aaaaaaa0aaa.us-east-1.es.amazonaws.com - if (hostParts[1] === 'es') - hostParts = hostParts.reverse() +var _extends2; - return hostParts +function _load_extends() { + return _extends2 = _interopRequireDefault(__webpack_require__(20)); } -// http://docs.aws.amazon.com/general/latest/gr/rande.html -RequestSigner.prototype.isSingleRegion = function() { - // Special case for S3 and SimpleDB in us-east-1 - if (['s3', 'sdb'].indexOf(this.service) >= 0 && this.region === 'us-east-1') return true - - return ['cloudfront', 'ls', 'route53', 'iam', 'importexport', 'sts'] - .indexOf(this.service) >= 0 -} +var _asyncToGenerator2; -RequestSigner.prototype.createHost = function() { - var region = this.isSingleRegion() ? '' : - (this.service === 's3' && this.region !== 'us-east-1' ? '-' : '.') + this.region, - service = this.service === 'ses' ? 'email' : this.service - return service + region + '.amazonaws.com' +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2)); } -RequestSigner.prototype.prepareRequest = function() { - this.parsePath() - - var request = this.request, headers = request.headers, query +let run = exports.run = (() => { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + const lockfile = yield (_lockfile || _load_lockfile()).default.fromDirectory(config.lockfileFolder); + const install = new (_install || _load_install()).Install((0, (_extends2 || _load_extends()).default)({}, flags, { includeWorkspaceDeps: true }), config, reporter, lockfile); + let deps = yield (_packageRequest || _load_packageRequest()).default.getOutdatedPackages(lockfile, install, config, reporter); - if (request.signQuery) { + if (args.length) { + const requested = new Set(args); - this.parsedPath.query = query = this.parsedPath.query || {} + deps = deps.filter(function ({ name }) { + return requested.has(name); + }); + } - if (this.credentials.sessionToken) - query['X-Amz-Security-Token'] = this.credentials.sessionToken + const getNameFromHint = function getNameFromHint(hint) { + return hint ? `${hint}Dependencies` : 'dependencies'; + }; + const colorizeName = function colorizeName({ current, latest, name }) { + return reporter.format[(0, (_colorForVersions || _load_colorForVersions()).default)(current, latest)](name); + }; - if (this.service === 's3' && !query['X-Amz-Expires']) - query['X-Amz-Expires'] = 86400 + if (deps.length) { + const usesWorkspaces = !!config.workspaceRootFolder; + const body = deps.map(function (info) { + const row = [colorizeName(info), info.current, (0, (_colorizeDiff || _load_colorizeDiff()).default)(info.current, info.wanted, reporter), reporter.format.cyan(info.latest), info.workspaceName || '', getNameFromHint(info.hint), reporter.format.cyan(info.url)]; + if (!usesWorkspaces) { + row.splice(4, 1); + } + return row; + }); - if (query['X-Amz-Date']) - this.datetime = query['X-Amz-Date'] - else - query['X-Amz-Date'] = this.getDateTime() + const red = reporter.format.red(''); + const yellow = reporter.format.yellow(''); + const green = reporter.format.green(''); + reporter.info(reporter.lang('legendColorsForVersionUpdates', red, yellow, green)); - query['X-Amz-Algorithm'] = 'AWS4-HMAC-SHA256' - query['X-Amz-Credential'] = this.credentials.accessKeyId + '/' + this.credentialString() - query['X-Amz-SignedHeaders'] = this.signedHeaders() + const header = ['Package', 'Current', 'Wanted', 'Latest', 'Workspace', 'Package Type', 'URL']; + if (!usesWorkspaces) { + header.splice(4, 1); + } + reporter.table(header, body); - } else { + return 1; + } + return 0; + }); - if (!request.doNotModifyHeaders && !this.isCodeCommitGit) { - if (request.body && !headers['Content-Type'] && !headers['content-type']) - headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=utf-8' + return function run(_x, _x2, _x3, _x4) { + return _ref.apply(this, arguments); + }; +})(); - if (request.body && !headers['Content-Length'] && !headers['content-length']) - headers['Content-Length'] = Buffer.byteLength(request.body) +exports.setFlags = setFlags; +exports.hasWrapper = hasWrapper; - if (this.credentials.sessionToken && !headers['X-Amz-Security-Token'] && !headers['x-amz-security-token']) - headers['X-Amz-Security-Token'] = this.credentials.sessionToken +var _packageRequest; - if (this.service === 's3' && !headers['X-Amz-Content-Sha256'] && !headers['x-amz-content-sha256']) - headers['X-Amz-Content-Sha256'] = hash(this.request.body || '', 'hex') +function _load_packageRequest() { + return _packageRequest = _interopRequireDefault(__webpack_require__(122)); +} - if (headers['X-Amz-Date'] || headers['x-amz-date']) - this.datetime = headers['X-Amz-Date'] || headers['x-amz-date'] - else - headers['X-Amz-Date'] = this.getDateTime() - } +var _lockfile; - delete headers.Authorization - delete headers.authorization - } +function _load_lockfile() { + return _lockfile = _interopRequireDefault(__webpack_require__(19)); } -RequestSigner.prototype.sign = function() { - if (!this.parsedPath) this.prepareRequest() +var _install; - if (this.request.signQuery) { - this.parsedPath.query['X-Amz-Signature'] = this.signature() - } else { - this.request.headers.Authorization = this.authHeader() - } +function _load_install() { + return _install = __webpack_require__(34); +} - this.request.path = this.formatPath() +var _colorForVersions; - return this.request +function _load_colorForVersions() { + return _colorForVersions = _interopRequireDefault(__webpack_require__(363)); } -RequestSigner.prototype.getDateTime = function() { - if (!this.datetime) { - var headers = this.request.headers, - date = new Date(headers.Date || headers.date || new Date) - - this.datetime = date.toISOString().replace(/[:\-]|\.\d{3}/g, '') +var _colorizeDiff; - // Remove the trailing 'Z' on the timestamp string for CodeCommit git access - if (this.isCodeCommitGit) this.datetime = this.datetime.slice(0, -1) - } - return this.datetime +function _load_colorizeDiff() { + return _colorizeDiff = _interopRequireDefault(__webpack_require__(364)); } -RequestSigner.prototype.getDate = function() { - return this.getDateTime().substr(0, 8) -} +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -RequestSigner.prototype.authHeader = function() { - return [ - 'AWS4-HMAC-SHA256 Credential=' + this.credentials.accessKeyId + '/' + this.credentialString(), - 'SignedHeaders=' + this.signedHeaders(), - 'Signature=' + this.signature(), - ].join(', ') -} +const requireLockfile = exports.requireLockfile = true; -RequestSigner.prototype.signature = function() { - var date = this.getDate(), - cacheKey = [this.credentials.secretAccessKey, date, this.region, this.service].join(), - kDate, kRegion, kService, kCredentials = credentialsCache.get(cacheKey) - if (!kCredentials) { - kDate = hmac('AWS4' + this.credentials.secretAccessKey, date) - kRegion = hmac(kDate, this.region) - kService = hmac(kRegion, this.service) - kCredentials = hmac(kService, 'aws4_request') - credentialsCache.set(cacheKey, kCredentials) - } - return hmac(kCredentials, this.stringToSign(), 'hex') +function setFlags(commander) { + commander.description('Checks for outdated package dependencies.'); + commander.usage('outdated [packages ...]'); } -RequestSigner.prototype.stringToSign = function() { - return [ - 'AWS4-HMAC-SHA256', - this.getDateTime(), - this.credentialString(), - hash(this.canonicalString(), 'hex'), - ].join('\n') +function hasWrapper(commander, args) { + return true; } -RequestSigner.prototype.canonicalString = function() { - if (!this.parsedPath) this.prepareRequest() - - var pathStr = this.parsedPath.path, - query = this.parsedPath.query, - headers = this.request.headers, - queryStr = '', - normalizePath = this.service !== 's3', - decodePath = this.service === 's3' || this.request.doNotEncodePath, - decodeSlashesInPath = this.service === 's3', - firstValOnly = this.service === 's3', - bodyHash +/***/ }), +/* 507 */ +/***/ (function(module, exports, __webpack_require__) { - if (this.service === 's3' && this.request.signQuery) { - bodyHash = 'UNSIGNED-PAYLOAD' - } else if (this.isCodeCommitGit) { - bodyHash = '' - } else { - bodyHash = headers['X-Amz-Content-Sha256'] || headers['x-amz-content-sha256'] || - hash(this.request.body || '', 'hex') - } +"use strict"; - if (query) { - queryStr = encodeRfc3986(querystring.stringify(Object.keys(query).sort().reduce(function(obj, key) { - if (!key) return obj - obj[key] = !Array.isArray(query[key]) ? query[key] : - (firstValOnly ? query[key][0] : query[key].slice().sort()) - return obj - }, {}))) - } - if (pathStr !== '/') { - if (normalizePath) pathStr = pathStr.replace(/\/{2,}/g, '/') - pathStr = pathStr.split('/').reduce(function(path, piece) { - if (normalizePath && piece === '..') { - path.pop() - } else if (!normalizePath || piece !== '.') { - if (decodePath) piece = decodeURIComponent(piece) - path.push(encodeRfc3986(encodeURIComponent(piece))) - } - return path - }, []).join('/') - if (pathStr[0] !== '/') pathStr = '/' + pathStr - if (decodeSlashesInPath) pathStr = pathStr.replace(/%2F/g, '/') - } - return [ - this.request.method || 'GET', - pathStr, - queryStr, - this.canonicalHeaders() + '\n', - this.signedHeaders(), - bodyHash, - ].join('\n') -} +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.examples = exports.hasWrapper = exports.run = exports.mutate = undefined; -RequestSigner.prototype.canonicalHeaders = function() { - var headers = this.request.headers - function trimAll(header) { - return header.toString().trim().replace(/\s+/g, ' ') - } - return Object.keys(headers) - .sort(function(a, b) { return a.toLowerCase() < b.toLowerCase() ? -1 : 1 }) - .map(function(key) { return key.toLowerCase() + ':' + trimAll(headers[key]) }) - .join('\n') -} +var _asyncToGenerator2; -RequestSigner.prototype.signedHeaders = function() { - return Object.keys(this.request.headers) - .map(function(key) { return key.toLowerCase() }) - .sort() - .join(';') +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2)); } -RequestSigner.prototype.credentialString = function() { - return [ - this.getDate(), - this.region, - this.service, - 'aws4_request', - ].join('/') -} +let mutate = exports.mutate = (() => { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (args, config, reporter, buildMessages, mutator) { + if (args.length !== 2 && args.length !== 1) { + return false; + } -RequestSigner.prototype.defaultCredentials = function() { - var env = process.env - return { - accessKeyId: env.AWS_ACCESS_KEY_ID || env.AWS_ACCESS_KEY, - secretAccessKey: env.AWS_SECRET_ACCESS_KEY || env.AWS_SECRET_KEY, - sessionToken: env.AWS_SESSION_TOKEN, - } -} + const username = args.shift(); + const name = yield (0, (_tag || _load_tag()).getName)(args, config); + if (!(0, (_validate || _load_validate()).isValidPackageName)(name)) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('invalidPackageName')); + } -RequestSigner.prototype.parsePath = function() { - var path = this.request.path || '/', - queryIx = path.indexOf('?'), - query = null + const msgs = buildMessages(username, name); + reporter.step(1, 3, reporter.lang('loggingIn')); + const revoke = yield (0, (_login || _load_login()).getToken)(config, reporter, name); - if (queryIx >= 0) { - query = querystring.parse(path.slice(queryIx + 1)) - path = path.slice(0, queryIx) - } + reporter.step(2, 3, msgs.info); + const user = yield config.registries.npm.request(`-/user/org.couchdb.user:${username}`); + let error = false; + if (user) { + // get package + const pkg = yield config.registries.npm.request((_npmRegistry || _load_npmRegistry()).default.escapeName(name)); + if (pkg) { + pkg.maintainers = pkg.maintainers || []; + error = mutator({ name: user.name, email: user.email }, pkg); + } else { + error = true; + reporter.error(reporter.lang('unknownPackage', name)); + } - // S3 doesn't always encode characters > 127 correctly and - // all services don't encode characters > 255 correctly - // So if there are non-reserved chars (and it's not already all % encoded), just encode them all - if (/[^0-9A-Za-z!'()*\-._~%/]/.test(path)) { - path = path.split('/').map(function(piece) { - return encodeURIComponent(decodeURIComponent(piece)) - }).join('/') - } + // update package + if (pkg && !error) { + const res = yield config.registries.npm.request(`${(_npmRegistry || _load_npmRegistry()).default.escapeName(name)}/-rev/${pkg._rev}`, { + method: 'PUT', + body: { + _id: pkg._id, + _rev: pkg._rev, + maintainers: pkg.maintainers + } + }); - this.parsedPath = { - path: path, - query: query, - } -} + if (res != null && res.success) { + reporter.success(msgs.success); + } else { + error = true; + reporter.error(msgs.error); + } + } + } else { + error = true; + reporter.error(reporter.lang('unknownUser', username)); + } -RequestSigner.prototype.formatPath = function() { - var path = this.parsedPath.path, - query = this.parsedPath.query + reporter.step(3, 3, reporter.lang('revokingToken')); + yield revoke(); - if (!query) return path + if (error) { + throw new Error(); + } else { + return true; + } + }); - // Services don't support empty query string keys - if (query[''] != null) delete query[''] + return function mutate(_x, _x2, _x3, _x4, _x5) { + return _ref.apply(this, arguments); + }; +})(); - return path + '?' + encodeRfc3986(querystring.stringify(query)) -} +let list = (() => { + var _ref2 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + if (args.length > 1) { + return false; + } + const name = yield (0, (_tag || _load_tag()).getName)(args, config); + reporter.step(1, 1, reporter.lang('ownerGetting', name)); + const pkg = yield config.registries.npm.request(name, { unfiltered: true }); + if (pkg) { + const owners = pkg.maintainers; + if (!owners || !owners.length) { + reporter.warn(reporter.lang('ownerNone')); + } else { + for (var _iterator = owners, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref3; -aws4.RequestSigner = RequestSigner + if (_isArray) { + if (_i >= _iterator.length) break; + _ref3 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref3 = _i.value; + } -aws4.sign = function(request, credentials) { - return new RequestSigner(request, credentials).sign() -} + const owner = _ref3; + reporter.info(`${owner.name} <${owner.email}>`); + } + } + } else { + reporter.error(reporter.lang('ownerGettingFailed')); + } -/***/ }), -/* 523 */ -/***/ (function(module, exports) { + if (pkg) { + return true; + } else { + throw new Error(); + } + }); -module.exports = function(size) { - return new LruCache(size) -} + return function list(_x6, _x7, _x8, _x9) { + return _ref2.apply(this, arguments); + }; +})(); -function LruCache(size) { - this.capacity = size | 0 - this.map = Object.create(null) - this.list = new DoublyLinkedList() -} +exports.setFlags = setFlags; -LruCache.prototype.get = function(key) { - var node = this.map[key] - if (node == null) return undefined - this.used(node) - return node.val -} +var _errors; -LruCache.prototype.set = function(key, val) { - var node = this.map[key] - if (node != null) { - node.val = val - } else { - if (!this.capacity) this.prune() - if (!this.capacity) return false - node = new DoublyLinkedNode(key, val) - this.map[key] = node - this.capacity-- - } - this.used(node) - return true +function _load_errors() { + return _errors = __webpack_require__(6); } -LruCache.prototype.used = function(node) { - this.list.moveToFront(node) -} +var _buildSubCommands2; -LruCache.prototype.prune = function() { - var node = this.list.pop() - if (node != null) { - delete this.map[node.key] - this.capacity++ - } +function _load_buildSubCommands() { + return _buildSubCommands2 = _interopRequireDefault(__webpack_require__(59)); } +var _validate; -function DoublyLinkedList() { - this.firstNode = null - this.lastNode = null +function _load_validate() { + return _validate = __webpack_require__(125); } -DoublyLinkedList.prototype.moveToFront = function(node) { - if (this.firstNode == node) return - - this.remove(node) +var _tag; - if (this.firstNode == null) { - this.firstNode = node - this.lastNode = node - node.prev = null - node.next = null - } else { - node.prev = null - node.next = this.firstNode - node.next.prev = node - this.firstNode = node - } +function _load_tag() { + return _tag = __webpack_require__(355); } -DoublyLinkedList.prototype.pop = function() { - var lastNode = this.lastNode - if (lastNode != null) { - this.remove(lastNode) - } - return lastNode -} +var _login; -DoublyLinkedList.prototype.remove = function(node) { - if (this.firstNode == node) { - this.firstNode = node.next - } else if (node.prev != null) { - node.prev.next = node.next - } - if (this.lastNode == node) { - this.lastNode = node.prev - } else if (node.next != null) { - node.next.prev = node.prev - } +function _load_login() { + return _login = __webpack_require__(107); } +var _npmRegistry; -function DoublyLinkedNode(key, val) { - this.key = key - this.val = val - this.prev = null - this.next = null +function _load_npmRegistry() { + return _npmRegistry = _interopRequireDefault(__webpack_require__(88)); } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/***/ }), -/* 524 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - +function remove(config, reporter, flags, args) { + return mutate(args, config, reporter, (username, name) => ({ + info: reporter.lang('ownerRemoving', username, name), + success: reporter.lang('ownerRemoved'), + error: reporter.lang('ownerRemoveError') + }), (user, pkg) => { + let found = false; -Object.defineProperty(exports, "__esModule", { - value: true -}); + pkg.maintainers = pkg.maintainers.filter(o => { + const match = o.name === user.name; + found = found || match; + return !match; + }); -exports.default = function (message) { - return { - useless: true, - run() { - throw new (_errors || _load_errors()).MessageError(message); - }, - setFlags: () => {}, - hasWrapper: () => true - }; -}; + if (!found) { + reporter.error(reporter.lang('userNotAnOwner', user.name)); + } -var _errors; + return found; + }); +} -function _load_errors() { - return _errors = __webpack_require__(6); +function setFlags(commander) { + commander.description('Manages package owners.'); } -/***/ }), -/* 525 */ -/***/ (function(module, exports, __webpack_require__) { +var _buildSubCommands = (0, (_buildSubCommands2 || _load_buildSubCommands()).default)('owner', { + add(config, reporter, flags, args) { + return mutate(args, config, reporter, (username, name) => ({ + info: reporter.lang('ownerAdding', username, name), + success: reporter.lang('ownerAdded'), + error: reporter.lang('ownerAddingFailed') + }), (user, pkg) => { + for (var _iterator2 = pkg.maintainers, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref4; -"use strict"; + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref4 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref4 = _i2.value; + } + const owner = _ref4; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.examples = exports.hasWrapper = exports.run = undefined; -exports.setFlags = setFlags; + if (owner.name === user) { + reporter.error(reporter.lang('ownerAlready')); + return true; + } + } -var _buildSubCommands2; + pkg.maintainers.push(user); -function _load_buildSubCommands() { - return _buildSubCommands2 = _interopRequireDefault(__webpack_require__(59)); -} + return false; + }); + }, -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + rm(config, reporter, flags, args) { + reporter.warn(`\`yarn owner rm\` is deprecated. Please use \`yarn owner remove\`.`); + return remove(config, reporter, flags, args); + }, -const notYetImplemented = () => Promise.reject(new Error('This command is not implemented yet.')); + remove(config, reporter, flags, args) { + return remove(config, reporter, flags, args); + }, -function setFlags(commander) { - commander.description('Has not been implemented yet'); -} + ls(config, reporter, flags, args) { + reporter.warn(`\`yarn owner ls\` is deprecated. Please use \`yarn owner list\`.`); + return list(config, reporter, flags, args); + }, -var _buildSubCommands = (0, (_buildSubCommands2 || _load_buildSubCommands()).default)('access', { - public: notYetImplemented, - restricted: notYetImplemented, - grant: notYetImplemented, - revoke: notYetImplemented, - lsPackages: notYetImplemented, - lsCollaborators: notYetImplemented, - edit: notYetImplemented -}, ['WARNING: This command yet to be implemented.', 'public []', 'restricted []', 'grant []', 'revoke []', 'ls-packages [||]', 'ls-collaborators [ []]', 'edit []']); + list(config, reporter, flags, args) { + return list(config, reporter, flags, args); + } +}, ['add [[<@scope>/]]', 'remove [[<@scope>/]]', 'list [<@scope>/]']); const run = _buildSubCommands.run, hasWrapper = _buildSubCommands.hasWrapper, @@ -95542,7 +94143,7 @@ exports.hasWrapper = hasWrapper; exports.examples = examples; /***/ }), -/* 526 */ +/* 508 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -95551,7 +94152,13 @@ exports.examples = examples; Object.defineProperty(exports, "__esModule", { value: true }); -exports.run = undefined; +exports.examples = exports.setFlags = exports.run = undefined; + +var _extends2; + +function _load_extends() { + return _extends2 = _interopRequireDefault(__webpack_require__(20)); +} var _asyncToGenerator2; @@ -95559,173 +94166,273 @@ function _load_asyncToGenerator() { return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2)); } -let run = exports.run = (() => { - var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { - const binFolder = path.join(config.cwd, config.registryFolders[0], '.bin'); - if (args.length === 0) { - reporter.log(binFolder, { force: true }); - } else { - const binEntries = yield (0, (_run || _load_run()).getBinEntries)(config); +let fetchReleases = (() => { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, { includePrereleases = false } = {}) { + const token = process.env.GITHUB_TOKEN; + const tokenUrlParameter = token ? `?access_token=${token}` : ''; - const binName = args[0]; - const binPath = binEntries.get(binName); + const request = yield config.requestManager.request({ + url: `https://api.github.com/repos/yarnpkg/yarn/releases${tokenUrlParameter}`, + json: true + }); - if (binPath) { - reporter.log(binPath, { force: true }); - } else { - reporter.error(reporter.lang('packageBinaryNotFound', binName)); + const releases = request.filter(function (release) { + if (release.draft) { + return false; } - } + + if (release.prerelease && !includePrereleases) { + return false; + } + + // $FlowFixMe + release.version = semver.coerce(release.tag_name); + + if (!release.version) { + return false; + } + + if (!getBundleAsset(release)) { + return false; + } + + return true; + }); + + releases.sort(function (a, b) { + // $FlowFixMe + return -semver.compare(a.version, b.version); + }); + + return releases; }); - return function run(_x, _x2, _x3, _x4) { + return function fetchReleases(_x) { return _ref.apply(this, arguments); }; })(); exports.hasWrapper = hasWrapper; -exports.setFlags = setFlags; -var _run; +var _yarnVersion; -function _load_run() { - return _run = __webpack_require__(360); +function _load_yarnVersion() { + return _yarnVersion = __webpack_require__(105); } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const path = __webpack_require__(0); +var _child; -function hasWrapper(commander) { - return false; +function _load_child() { + return _child = _interopRequireWildcard(__webpack_require__(50)); } -function setFlags(commander) { - commander.description('Displays the location of the yarn bin folder.'); +var _buildSubCommands2; + +function _load_buildSubCommands() { + return _buildSubCommands2 = _interopRequireDefault(__webpack_require__(59)); } -/***/ }), -/* 527 */ -/***/ (function(module, exports, __webpack_require__) { +var _rc; -"use strict"; +function _load_rc() { + return _rc = __webpack_require__(335); +} +var _fs; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.examples = exports.run = undefined; +function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(5)); +} -var _asyncToGenerator2; +var _lockfile; -function _load_asyncToGenerator() { - return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2)); +function _load_lockfile() { + return _lockfile = __webpack_require__(19); } -exports.hasWrapper = hasWrapper; -exports.setFlags = setFlags; +var _semver; -var _buildSubCommands2; +function _load_semver() { + return _semver = __webpack_require__(170); +} -function _load_buildSubCommands() { - return _buildSubCommands2 = _interopRequireDefault(__webpack_require__(59)); +var _constants; + +function _load_constants() { + return _constants = __webpack_require__(8); } +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const CONFIG_KEYS = [ -// 'reporter', -'registryFolders', 'linkedModules', -// 'registries', -'cache', 'cwd', 'looseSemver', 'commandName', 'preferOffline', 'modulesFolder', 'globalFolder', 'linkFolder', 'offline', 'binLinks', 'ignorePlatform', 'ignoreScripts', 'disablePrepublish', 'nonInteractive', 'workspaceRootFolder', 'lockfileFolder', 'networkConcurrency', 'childConcurrency', 'networkTimeout', 'workspacesEnabled', 'workspacesNohoistEnabled', 'pruneOfflineMirror', 'enableMetaFolder', 'enableLockfileVersions', 'linkFileDependencies', 'cacheFolder', 'tempFolder', 'production']; -/* eslint object-shorthand: 0 */ +/* eslint-disable max-len */ -function hasWrapper(flags, args) { - return args[0] !== 'get'; +const V2_NAMES = ['berry', 'stable', 'canary', 'v2', '2']; + +const isLocalFile = version => version.match(/^\.{0,2}[\\/]/) || path.isAbsolute(version); +const isV2Version = version => (0, (_semver || _load_semver()).satisfiesWithPrereleases)(version, '>=2.0.0'); + +const chalk = __webpack_require__(30); +const invariant = __webpack_require__(9); +const path = __webpack_require__(0); +const semver = __webpack_require__(22); + +function getBundleAsset(release) { + return release.assets.find(asset => { + return asset.name.match(/^yarn-[0-9]+\.[0-9]+\.[0-9]+\.js$/); + }); } -function setFlags(commander) { - commander.description('Manages the yarn configuration files.'); +function fetchBundle(config, url) { + return config.requestManager.request({ + url, + buffer: true + }); } -var _buildSubCommands = (0, (_buildSubCommands2 || _load_buildSubCommands()).default)('config', { - set(config, reporter, flags, args) { - return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - if (args.length === 0 || args.length > 2) { - return false; - } - const key = args[0]; - var _args$ = args[1]; - const val = _args$ === undefined ? true : _args$; +function hasWrapper(flags, args) { + return false; +} - const yarnConfig = config.registries.yarn; - yield yarnConfig.saveHomeConfig({ [key]: val }); - reporter.success(reporter.lang('configSet', key, val)); - return true; - })(); - }, +var _buildSubCommands = (0, (_buildSubCommands2 || _load_buildSubCommands()).default)('policies', { + setVersion(config, reporter, flags, args) { + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + const initialRange = args[0] || 'latest'; + let range = initialRange; - get(config, reporter, flags, args) { - if (args.length !== 1) { - return false; - } + let allowRc = flags.rc; - reporter.log(String(config.getOption(args[0])), { force: true }); - return true; - }, + if (range === 'rc') { + reporter.log(`${chalk.yellow(`Warning:`)} Your current Yarn binary is currently Yarn ${(_yarnVersion || _load_yarnVersion()).version}; to avoid potential breaking changes, 'set version rc' won't receive upgrades past the 1.22.x branch.\n To upgrade to the latest versions, run ${chalk.cyan(`yarn set version`)} ${chalk.yellow.underline(`canary`)} instead. Sorry for the inconvenience.\n`); - delete: (() => { - var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { - if (args.length !== 1) { - return false; + range = '*'; + allowRc = true; } - const key = args[0]; - const yarnConfig = config.registries.yarn; - yield yarnConfig.saveHomeConfig({ [key]: undefined }); - reporter.success(reporter.lang('configDelete', key)); - return true; - }); + if (range === 'latest') { + reporter.log(`${chalk.yellow(`Warning:`)} Your current Yarn binary is currently Yarn ${(_yarnVersion || _load_yarnVersion()).version}; to avoid potential breaking changes, 'set version latest' won't receive upgrades past the 1.22.x branch.\n To upgrade to the latest versions, run ${chalk.cyan(`yarn set version`)} ${chalk.yellow.underline(`stable`)} instead. Sorry for the inconvenience.\n`); - function _delete(_x, _x2, _x3, _x4) { - return _ref.apply(this, arguments); - } + range = '*'; + } - return _delete; - })(), + if (range === 'classic') { + range = '*'; + } - list(config, reporter, flags, args) { - if (args.length) { - return false; - } + let bundleUrl; + let bundleVersion; + const isV2 = false; - reporter.info(reporter.lang('configYarn')); - reporter.inspect(config.registries.yarn.config); + if (range === 'nightly' || range === 'nightlies') { + reporter.log(`${chalk.yellow(`Warning:`)} Nightlies only exist for Yarn 1.x; starting from 2.x onwards, you should use 'canary' instead`); - reporter.info(reporter.lang('configNpm')); - reporter.inspect(config.registries.npm.config); + bundleUrl = 'https://nightly.yarnpkg.com/latest.js'; + bundleVersion = 'nightly'; + } else if (V2_NAMES.includes(range) || isLocalFile(range) || isV2Version(range)) { + const normalizedRange = range === `canary` ? `canary` : `stable`; - return true; - }, + if (process.env.COREPACK_ROOT) { + yield (_child || _load_child()).spawn((_constants || _load_constants()).NODE_BIN_PATH, [path.join(process.env.COREPACK_ROOT, 'dist/corepack.js'), `yarn@${normalizedRange}`, `set`, `version`, normalizedRange], { + stdio: 'inherit', + cwd: config.cwd + }); - current(config, reporter, flags, args) { - if (args.length) { - return false; - } + return; + } else { + const bundle = yield fetchBundle(config, 'https://github.com/yarnpkg/berry/raw/master/packages/yarnpkg-cli/bin/yarn.js'); - reporter.log(JSON.stringify(config, CONFIG_KEYS, 2), { force: true }); + const yarnPath = path.resolve(config.lockfileFolder, `.yarn/releases/yarn-stable-temp.cjs`); + yield (_fs || _load_fs()).mkdirp(path.dirname(yarnPath)); + yield (_fs || _load_fs()).writeFile(yarnPath, bundle); + yield (_fs || _load_fs()).chmod(yarnPath, 0o755); - return true; + try { + yield (_child || _load_child()).spawn((_constants || _load_constants()).NODE_BIN_PATH, [yarnPath, 'set', 'version', range], { + stdio: 'inherit', + cwd: config.lockfileFolder, + env: (0, (_extends2 || _load_extends()).default)({}, process.env, { + YARN_IGNORE_PATH: `1` + }) + }); + } catch (err) { + // eslint-disable-next-line no-process-exit + process.exit(1); + } + + return; + } + } else { + reporter.log(`Resolving ${chalk.yellow(initialRange)} to a url...`); + + let releases = []; + + try { + releases = yield fetchReleases(config, { + includePrereleases: allowRc + }); + } catch (e) { + reporter.error(e.message); + return; + } + + const release = releases.find(function (release) { + // $FlowFixMe + return semver.satisfies(release.version, range); + }); + + if (!release) { + throw new Error(`Release not found: ${range}`); + } + + const asset = getBundleAsset(release); + invariant(asset, 'The bundle asset should exist'); + + bundleUrl = asset.browser_download_url; + bundleVersion = release.version.version; + } + + reporter.log(`Downloading ${chalk.green(bundleUrl)}...`); + + const bundle = yield fetchBundle(config, bundleUrl); + + const yarnPath = path.resolve(config.lockfileFolder, `.yarn/releases/yarn-${bundleVersion}.cjs`); + reporter.log(`Saving it into ${chalk.magenta(yarnPath)}...`); + yield (_fs || _load_fs()).mkdirp(path.dirname(yarnPath)); + yield (_fs || _load_fs()).writeFile(yarnPath, bundle); + yield (_fs || _load_fs()).chmod(yarnPath, 0o755); + + const targetPath = path.relative(config.lockfileFolder, yarnPath).replace(/\\/g, '/'); + + if (isV2) { + const rcPath = `${config.lockfileFolder}/.yarnrc.yml`; + reporter.log(`Updating ${chalk.magenta(rcPath)}...`); + + yield (_fs || _load_fs()).writeFilePreservingEol(rcPath, `yarnPath: ${JSON.stringify(targetPath)}\n`); + } else { + const rcPath = `${config.lockfileFolder}/.yarnrc`; + reporter.log(`Updating ${chalk.magenta(rcPath)}...`); + + const rc = (0, (_rc || _load_rc()).getRcConfigForFolder)(config.lockfileFolder); + rc['yarn-path'] = targetPath; + + yield (_fs || _load_fs()).writeFilePreservingEol(rcPath, `${(0, (_lockfile || _load_lockfile()).stringify)(rc)}\n`); + } + + reporter.log(`Done!`); + })(); } }); const run = _buildSubCommands.run, + setFlags = _buildSubCommands.setFlags, examples = _buildSubCommands.examples; exports.run = run; +exports.setFlags = setFlags; exports.examples = examples; /***/ }), -/* 528 */ +/* 509 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -95742,51 +94449,174 @@ function _load_asyncToGenerator() { return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2)); } -var _extends2; +let publish = (() => { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, pkg, flags, dir) { + let access = flags.access; -function _load_extends() { - return _extends2 = _interopRequireDefault(__webpack_require__(22)); -} + // if no access level is provided, check package.json for `publishConfig.access` + // see: https://docs.npmjs.com/files/package.json#publishconfig + if (!access && pkg && pkg.publishConfig && pkg.publishConfig.access) { + access = pkg.publishConfig.access; + } -let run = exports.run = (() => { - var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { - const builderName = args[0], - rest = args.slice(1); + // validate access argument + if (access && access !== 'public' && access !== 'restricted') { + throw new (_errors || _load_errors()).MessageError(config.reporter.lang('invalidAccess')); + } + // TODO this might modify package.json, do we need to reload it? + yield config.executeLifecycleScript('prepublish'); + yield config.executeLifecycleScript('prepare'); + yield config.executeLifecycleScript('prepublishOnly'); + yield config.executeLifecycleScript('prepack'); - if (!builderName) { - throw new (_errors || _load_errors()).MessageError(reporter.lang('invalidPackageName')); + // get tarball stream + const stat = yield (_fs || _load_fs()).lstat(dir); + let stream; + if (stat.isDirectory()) { + stream = yield (0, (_pack || _load_pack()).pack)(config); + } else if (stat.isFile()) { + stream = fs2.createReadStream(dir); + } else { + throw new Error("Don't know how to handle this file type"); } + const buffer = yield new Promise(function (resolve, reject) { + const data = []; + invariant(stream, 'expected stream'); + stream.on('data', data.push.bind(data)).on('end', function () { + return resolve(Buffer.concat(data)); + }).on('error', reject); + }); - var _coerceCreatePackageN = coerceCreatePackageName(builderName); + yield config.executeLifecycleScript('postpack'); - const packageName = _coerceCreatePackageN.fullName, - commandName = _coerceCreatePackageN.name; + // copy normalized package and remove internal keys as they may be sensitive or yarn specific + pkg = Object.assign({}, pkg); + for (const key in pkg) { + if (key[0] === '_') { + delete pkg[key]; + } + } + const tag = flags.tag || 'latest'; + const tbName = `${pkg.name}-${pkg.version}.tgz`; + const tbURI = `${pkg.name}/-/${tbName}`; - const linkLoc = path.join(config.linkFolder, commandName); - if (yield (_fs || _load_fs()).exists(linkLoc)) { - reporter.info(reporter.lang('linkUsing', packageName)); - } else { - yield (0, (_global || _load_global()).run)(config, reporter, {}, ['add', packageName]); - } + // create body + const root = { + _id: pkg.name, + access, + name: pkg.name, + description: pkg.description, + 'dist-tags': { + [tag]: pkg.version + }, + versions: { + [pkg.version]: pkg + }, + readme: pkg.readme || '', + _attachments: { + [tbName]: { + content_type: 'application/octet-stream', + data: buffer.toString('base64'), + length: buffer.length + } + } + }; - const binFolder = yield (0, (_global || _load_global()).getBinFolder)(config, {}); - const command = path.resolve(binFolder, commandName); - const env = yield (0, (_executeLifecycleScript || _load_executeLifecycleScript()).makeEnv)('create', config.cwd, config); + pkg._id = `${pkg.name}@${pkg.version}`; + pkg.dist = pkg.dist || {}; + pkg.dist.shasum = crypto.createHash('sha1').update(buffer).digest('hex'); + pkg.dist.integrity = ssri.fromData(buffer).toString(); - yield (_child || _load_child()).spawn(command, rest, { stdio: `inherit`, shell: true, env }); + const registry = String(config.getOption('registry')); + pkg.dist.tarball = url.resolve(registry, tbURI).replace(/^https:\/\//, 'http://'); + + // publish package + try { + yield config.registries.npm.request((_npmRegistry || _load_npmRegistry()).default.escapeName(pkg.name), { + registry: pkg && pkg.publishConfig && pkg.publishConfig.registry, + method: 'PUT', + body: root + }); + } catch (error) { + throw new (_errors || _load_errors()).MessageError(config.reporter.lang('publishFail', error.message)); + } + + yield config.executeLifecycleScript('publish'); + yield config.executeLifecycleScript('postpublish'); }); - return function run(_x, _x2, _x3, _x4) { + return function publish(_x, _x2, _x3, _x4) { return _ref.apply(this, arguments); }; })(); +let run = exports.run = (() => { + var _ref2 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + // validate arguments + const dir = args[0] ? (_path || _load_path()).default.resolve(config.cwd, args[0]) : config.cwd; + if (args.length > 1) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('tooManyArguments', 1)); + } + if (!(yield (_fs || _load_fs()).exists(dir))) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('unknownFolderOrTarball')); + } + + const stat = yield (_fs || _load_fs()).lstat(dir); + let publishPath = dir; + if (stat.isDirectory()) { + config.cwd = (_path || _load_path()).default.resolve(dir); + publishPath = config.cwd; + } + + // validate package fields that are required for publishing + // $FlowFixMe + const pkg = yield config.readRootManifest(); + if (pkg.private) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('publishPrivate')); + } + if (!pkg.name) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('noName')); + } + + let registry = ''; + + if (pkg && pkg.publishConfig && pkg.publishConfig.registry) { + registry = pkg.publishConfig.registry; + } + + reporter.step(1, 4, reporter.lang('bumpingVersion')); + const commitVersion = yield (0, (_version || _load_version()).setVersion)(config, reporter, flags, [], false); + + // + reporter.step(2, 4, reporter.lang('loggingIn')); + const revoke = yield (0, (_login || _load_login()).getToken)(config, reporter, pkg.name, flags, registry); + + // + reporter.step(3, 4, reporter.lang('publishing')); + yield publish(config, pkg, flags, publishPath); + yield commitVersion(); + reporter.success(reporter.lang('published')); + + // + reporter.step(4, 4, reporter.lang('revokingToken')); + yield revoke(); + }); + + return function run(_x5, _x6, _x7, _x8) { + return _ref2.apply(this, arguments); + }; +})(); + exports.setFlags = setFlags; exports.hasWrapper = hasWrapper; -exports.parsePackageName = parsePackageName; -exports.coerceCreatePackageName = coerceCreatePackageName; + +var _npmRegistry; + +function _load_npmRegistry() { + return _npmRegistry = _interopRequireDefault(__webpack_require__(88)); +} var _errors; @@ -95794,78 +94624,61 @@ function _load_errors() { return _errors = __webpack_require__(6); } -var _child; +var _version; -function _load_child() { - return _child = _interopRequireWildcard(__webpack_require__(58)); +function _load_version() { + return _version = __webpack_require__(357); } -var _executeLifecycleScript; +var _fs; -function _load_executeLifecycleScript() { - return _executeLifecycleScript = __webpack_require__(111); +function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(5)); } -var _fs; +var _pack; -function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(4)); +function _load_pack() { + return _pack = __webpack_require__(166); } -var _global; +var _login; -function _load_global() { - return _global = __webpack_require__(121); +function _load_login() { + return _login = __webpack_require__(107); +} + +var _path; + +function _load_path() { + return _path = _interopRequireDefault(__webpack_require__(0)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const path = __webpack_require__(0); +const invariant = __webpack_require__(9); + +const crypto = __webpack_require__(11); +const url = __webpack_require__(24); +const fs2 = __webpack_require__(4); +const ssri = __webpack_require__(65); function setFlags(commander) { - commander.description('Creates new projects from any create-* starter kits.'); + (0, (_version || _load_version()).setFlags)(commander); + commander.description('Publishes a package to the npm registry.'); + commander.usage('publish [|] [--tag ] [--access ]'); + commander.option('--access [access]', 'access'); + commander.option('--tag [tag]', 'tag'); } function hasWrapper(commander, args) { return true; } -function parsePackageName(str) { - if (str.charAt(0) === '/') { - throw new Error(`Name should not start with "/", got "${str}"`); - } - if (str.charAt(0) === '.') { - throw new Error(`Name should not start with ".", got "${str}"`); - } - const parts = str.split('/'); - const isScoped = str.charAt(0) === '@'; - if (isScoped && parts[0] === '@') { - throw new Error(`Scope should not be empty, got "${str}"`); - } - const scope = isScoped ? parts[0] : ''; - const name = parts[isScoped ? 1 : 0] || ''; - const path = parts.slice(isScoped ? 2 : 1).join('/'); - const fullName = [scope, name].filter(Boolean).join('/'); - const full = [scope, name, path].filter(Boolean).join('/'); - - return { fullName, name, scope, path, full }; -} - -function coerceCreatePackageName(str) { - const pkgNameObj = parsePackageName(str); - const coercedName = pkgNameObj.name !== '' ? `create-${pkgNameObj.name}` : `create`; - const coercedPkgNameObj = (0, (_extends2 || _load_extends()).default)({}, pkgNameObj, { - name: coercedName, - fullName: [pkgNameObj.scope, coercedName].filter(Boolean).join('/'), - full: [pkgNameObj.scope, coercedName, pkgNameObj.path].filter(Boolean).join('/') - }); - return coercedPkgNameObj; -} - /***/ }), -/* 529 */ +/* 510 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -95874,7 +94687,13 @@ function coerceCreatePackageName(str) { Object.defineProperty(exports, "__esModule", { value: true }); -exports.run = undefined; +exports.examples = exports.hasWrapper = exports.run = undefined; + +var _extends2; + +function _load_extends() { + return _extends2 = _interopRequireDefault(__webpack_require__(20)); +} var _asyncToGenerator2; @@ -95882,58 +94701,225 @@ function _load_asyncToGenerator() { return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2)); } -let run = exports.run = (() => { - var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { - const env = yield (0, (_executeLifecycleScript || _load_executeLifecycleScript()).makeEnv)(`exec`, config.cwd, config); - - if (args.length < 1) { - throw new (_errors || _load_errors()).MessageError(reporter.lang('execMissingCommand')); - } +let removeTeamUser = (() => { + var _ref2 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (parts, config, reporter) { + reporter.step(2, 3, reporter.lang('teamRemovingUser')); + reporter.inspect((yield config.registries.npm.request(`team/${parts.scope}/${parts.team}/user`, { + method: 'DELETE', + body: { + user: parts.user + } + }))); + return true; + }); - const execName = args[0], - rest = args.slice(1); + return function removeTeamUser(_x5, _x6, _x7) { + return _ref2.apply(this, arguments); + }; +})(); - yield (_child || _load_child()).spawn(execName, rest, { stdio: 'inherit', env }); +let list = (() => { + var _ref3 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (parts, config, reporter) { + reporter.step(2, 3, reporter.lang('teamListing')); + const uriParams = '?format=cli'; + if (parts.team) { + reporter.inspect((yield config.registries.npm.request(`team/${parts.scope}/${parts.team}/user${uriParams}`))); + } else { + reporter.inspect((yield config.registries.npm.request(`org/${parts.scope}/team${uriParams}`))); + } + return true; }); - return function run(_x, _x2, _x3, _x4) { - return _ref.apply(this, arguments); + return function list(_x8, _x9, _x10) { + return _ref3.apply(this, arguments); }; })(); exports.setFlags = setFlags; -exports.hasWrapper = hasWrapper; -var _errors; +var _buildSubCommands2; -function _load_errors() { - return _errors = __webpack_require__(6); +function _load_buildSubCommands() { + return _buildSubCommands2 = _interopRequireDefault(__webpack_require__(59)); } -var _child; +var _login; -function _load_child() { - return _child = _interopRequireWildcard(__webpack_require__(58)); +function _load_login() { + return _login = __webpack_require__(107); } -var _executeLifecycleScript; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function _load_executeLifecycleScript() { - return _executeLifecycleScript = __webpack_require__(111); +function explodeScopeTeam(arg, requireTeam, reporter) { + var _arg$split = arg.split(':'); + + const scope = _arg$split[0], + team = _arg$split[1], + parts = _arg$split.slice(2); + + if (parts.length) { + return false; + } + + if (requireTeam && !team) { + return false; + } + + return { + scope: scope || '', + team: team || '', + user: '' + }; } -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } +function warnDeprecation(reporter, deprecationWarning) { + const command = 'yarn team'; + reporter.warn(reporter.lang('deprecatedCommand', `${command} ${deprecationWarning.deprecatedCommand}`, `${command} ${deprecationWarning.currentCommand}`)); +} -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function wrapRequired(callback, requireTeam, deprecationInfo) { + return (() => { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + if (deprecationInfo) { + warnDeprecation(reporter, deprecationInfo); + } -function setFlags(commander) {} + if (!args.length) { + return false; + } -function hasWrapper(commander, args) { - return true; + const parts = explodeScopeTeam(args[0], requireTeam, reporter); + if (!parts) { + return false; + } + + reporter.step(1, 3, reporter.lang('loggingIn')); + const revoke = yield (0, (_login || _load_login()).getToken)(config, reporter); + + const res = yield callback(parts, config, reporter, flags, args); + if (!res) { + return res; + } + + reporter.step(3, 3, reporter.lang('revokingToken')); + yield revoke(); + return true; + }); + + return function (_x, _x2, _x3, _x4) { + return _ref.apply(this, arguments); + }; + })(); +} + +function wrapRequiredTeam(callback, requireTeam = true, subCommandDeprecated) { + return wrapRequired(function (parts, config, reporter, flags, args) { + if (args.length === 1) { + return callback(parts, config, reporter, flags, args); + } else { + return false; + } + }, requireTeam, subCommandDeprecated); +} + +function wrapRequiredUser(callback, subCommandDeprecated) { + return wrapRequired(function (parts, config, reporter, flags, args) { + if (args.length === 2) { + return callback((0, (_extends2 || _load_extends()).default)({ + user: args[1] + }, parts), config, reporter, flags, args); + } else { + return false; + } + }, true, subCommandDeprecated); +} + +function setFlags(commander) { + commander.description('Maintain team memberships'); } +var _buildSubCommands = (0, (_buildSubCommands2 || _load_buildSubCommands()).default)('team', { + create: wrapRequiredTeam((() => { + var _ref4 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (parts, config, reporter, flags, args) { + reporter.step(2, 3, reporter.lang('teamCreating')); + reporter.inspect((yield config.registries.npm.request(`team/${parts.scope}`, { + method: 'PUT', + body: { + team: parts.team + } + }))); + return true; + }); + + return function (_x11, _x12, _x13, _x14, _x15) { + return _ref4.apply(this, arguments); + }; + })()), + + destroy: wrapRequiredTeam((() => { + var _ref5 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (parts, config, reporter, flags, args) { + reporter.step(2, 3, reporter.lang('teamRemoving')); + reporter.inspect((yield config.registries.npm.request(`team/${parts.scope}/${parts.team}`, { + method: 'DELETE' + }))); + return true; + }); + + return function (_x16, _x17, _x18, _x19, _x20) { + return _ref5.apply(this, arguments); + }; + })()), + + add: wrapRequiredUser((() => { + var _ref6 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (parts, config, reporter, flags, args) { + reporter.step(2, 3, reporter.lang('teamAddingUser')); + reporter.inspect((yield config.registries.npm.request(`team/${parts.scope}/${parts.team}/user`, { + method: 'PUT', + body: { + user: parts.user + } + }))); + return true; + }); + + return function (_x21, _x22, _x23, _x24, _x25) { + return _ref6.apply(this, arguments); + }; + })()), + + rm: wrapRequiredUser(function (parts, config, reporter, flags, args) { + removeTeamUser(parts, config, reporter); + }, { + deprecatedCommand: 'rm', + currentCommand: 'remove' + }), + + remove: wrapRequiredUser(function (parts, config, reporter, flags, args) { + removeTeamUser(parts, config, reporter); + }), + + ls: wrapRequiredTeam(function (parts, config, reporter, flags, args) { + list(parts, config, reporter); + }, false, { + deprecatedCommand: 'ls', + currentCommand: 'list' + }), + + list: wrapRequiredTeam(function (parts, config, reporter, flags, args) { + list(parts, config, reporter); + }, false) +}, ['create ', 'destroy ', 'add ', 'remove ', 'list |']); + +const run = _buildSubCommands.run, + hasWrapper = _buildSubCommands.hasWrapper, + examples = _buildSubCommands.examples; +exports.run = run; +exports.hasWrapper = hasWrapper; +exports.examples = examples; + /***/ }), -/* 530 */ +/* 511 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -95942,7 +94928,7 @@ function hasWrapper(commander, args) { Object.defineProperty(exports, "__esModule", { value: true }); -exports.examples = exports.run = undefined; +exports.run = undefined; var _asyncToGenerator2; @@ -95952,31 +94938,63 @@ function _load_asyncToGenerator() { let run = exports.run = (() => { var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { - let manifest; - if (flags.useManifest) { - manifest = yield config.readJson(flags.useManifest); + if (args.length) { + for (var _iterator = args, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref2; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref2 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref2 = _i.value; + } + + const name = _ref2; + + const linkLoc = path.join(config.linkFolder, name); + if (yield (_fs || _load_fs()).exists(linkLoc)) { + yield (_fs || _load_fs()).unlink(path.join((yield (0, (_link || _load_link()).getRegistryFolder)(config, name)), name)); + reporter.success(reporter.lang('linkDisusing', name)); + reporter.info(reporter.lang('linkDisusingMessage', name)); + } else { + throw new (_errors || _load_errors()).MessageError(reporter.lang('linkMissing', name)); + } + } } else { - manifest = yield config.readRootManifest(); - } - if (!manifest.name) { - throw new (_errors || _load_errors()).MessageError(reporter.lang('noName')); - } - if (!manifest.version) { - throw new (_errors || _load_errors()).MessageError(reporter.lang('noVersion')); - } + // remove from registry + const manifest = yield config.readRootManifest(); + const name = manifest.name; + if (!name) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('unknownPackageName')); + } - const entry = { - name: manifest.name, - version: manifest.version, - resolved: flags.resolved, - registry: flags.registry || manifest._registry, - optionalDependencies: manifest.optionalDependencies, - dependencies: manifest.dependencies - }; - const pattern = flags.pattern || `${entry.name}@${entry.version}`; - reporter.log((0, (_lockfile || _load_lockfile()).stringify)({ - [pattern]: (0, (_lockfile || _load_lockfile()).implodeEntry)(pattern, entry) - })); + const linkLoc = path.join(config.linkFolder, name); + if (yield (_fs || _load_fs()).exists(linkLoc)) { + // If there is a `bin` defined in the package.json, + // link each bin to the global bin + if (manifest.bin) { + const globalBinFolder = yield (0, (_global || _load_global()).getBinFolder)(config, flags); + for (const binName in manifest.bin) { + const binDestLoc = path.join(globalBinFolder, binName); + if (yield (_fs || _load_fs()).exists(binDestLoc)) { + yield (_fs || _load_fs()).unlink(binDestLoc); + if (process.platform === 'win32') { + yield (_fs || _load_fs()).unlink(binDestLoc + '.cmd'); + } + } + } + } + + yield (_fs || _load_fs()).unlink(linkLoc); + + reporter.success(reporter.lang('linkUnregistered', name)); + reporter.info(reporter.lang('linkUnregisteredMessage', name)); + } else { + throw new (_errors || _load_errors()).MessageError(reporter.lang('linkMissing', name)); + } + } }); return function run(_x, _x2, _x3, _x4) { @@ -95984,8 +95002,8 @@ let run = exports.run = (() => { }; })(); -exports.hasWrapper = hasWrapper; exports.setFlags = setFlags; +exports.hasWrapper = hasWrapper; var _errors; @@ -95993,29 +95011,40 @@ function _load_errors() { return _errors = __webpack_require__(6); } -var _lockfile; +var _fs; -function _load_lockfile() { - return _lockfile = __webpack_require__(19); +function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(5)); } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _link; -function hasWrapper(commander, args) { - return false; +function _load_link() { + return _link = __webpack_require__(351); +} + +var _global; + +function _load_global() { + return _global = __webpack_require__(121); } +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const path = __webpack_require__(0); + function setFlags(commander) { - commander.description('Generates a lock file entry.'); - commander.option('--use-manifest ', 'description'); - commander.option('--resolved ', 'description'); - commander.option('--registry ', 'description'); + commander.description('Unlink a previously created symlink for a package.'); } -const examples = exports.examples = ['generate-lock-entry', 'generate-lock-entry --use-manifest ./package.json', 'generate-lock-entry --resolved local-file.tgz#hash']; +function hasWrapper(commander, args) { + return true; +} /***/ }), -/* 531 */ +/* 512 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -96024,147 +95053,146 @@ const examples = exports.examples = ['generate-lock-entry', 'generate-lock-entry Object.defineProperty(exports, "__esModule", { value: true }); -exports.hasWrapper = hasWrapper; -exports.setFlags = setFlags; -exports.run = run; - -var _index; - -function _load_index() { - return _index = _interopRequireDefault(__webpack_require__(334)); -} - -var _constants; - -function _load_constants() { - return _constants = _interopRequireWildcard(__webpack_require__(8)); -} - -var _misc; - -function _load_misc() { - return _misc = __webpack_require__(18); -} - -var _aliases; - -function _load_aliases() { - return _aliases = _interopRequireDefault(__webpack_require__(352)); -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +exports.clearAll = exports.clearSome = exports.run = undefined; -const chalk = __webpack_require__(30); +var _asyncToGenerator2; -function hasWrapper(flags, args) { - return false; +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2)); } -function setFlags(commander) { - commander.description('Displays help information.'); -} +let run = exports.run = (() => { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + if (!config.plugnplayEnabled) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('unplugDisabled')); + } + if (!args.length && flags.clear) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('tooFewArguments', 1)); + } + if (args.length && flags.clearAll) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('noArguments')); + } -function run(config, reporter, commander, args) { - if (args.length) { - const commandName = args.shift(); - if (Object.prototype.hasOwnProperty.call((_index || _load_index()).default, commandName)) { - const command = (_index || _load_index()).default[commandName]; - if (command) { - command.setFlags(commander); - const examples = (command.examples || []).map(example => ` $ yarn ${example}`); - if (examples.length) { - commander.on('--help', () => { - reporter.log(reporter.lang('helpExamples', reporter.rawText(examples.join('\n')))); - }); - } - // eslint-disable-next-line yarn-internal/warn-language - commander.on('--help', () => reporter.log(' ' + command.getDocsInfo + '\n')); - commander.help(); - return Promise.resolve(); - } + if (flags.clearAll) { + yield clearAll(config); + } else if (flags.clear) { + yield clearSome(config, new Set(args)); + } else if (args.length > 0) { + const lockfile = yield (_lockfile || _load_lockfile()).default.fromDirectory(config.lockfileFolder, reporter); + yield (0, (_install || _load_install()).wrapLifecycle)(config, flags, (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + const install = new (_install || _load_install()).Install(flags, config, reporter, lockfile); + install.linker.unplugged = args; + yield install.init(); + })); } - } - commander.on('--help', () => { - const commandsText = []; - for (var _iterator = Object.keys((_index || _load_index()).default).sort((_misc || _load_misc()).sortAlpha), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; + const unpluggedPackageFolders = yield config.listUnpluggedPackageFolders(); + + for (var _iterator = unpluggedPackageFolders.values(), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref3; if (_isArray) { if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; + _ref3 = _iterator[_i++]; } else { _i = _iterator.next(); if (_i.done) break; - _ref = _i.value; + _ref3 = _i.value; } - const name = _ref; + const target = _ref3; - if ((_index || _load_index()).default[name].useless || Object.keys((_aliases || _load_aliases()).default).map(key => (_aliases || _load_aliases()).default[key]).indexOf(name) > -1) { - continue; - } - if ((_aliases || _load_aliases()).default[name]) { - commandsText.push(` - ${(0, (_misc || _load_misc()).hyphenate)(name)} / ${(_aliases || _load_aliases()).default[name]}`); - } else { - commandsText.push(` - ${(0, (_misc || _load_misc()).hyphenate)(name)}`); - } + reporter.log(target, { force: true }); } - reporter.log(reporter.lang('helpCommands', reporter.rawText(commandsText.join('\n')))); - reporter.log(reporter.lang('helpCommandsMore', reporter.rawText(chalk.bold('yarn help COMMAND')))); - reporter.log(reporter.lang('helpLearnMore', reporter.rawText(chalk.bold((_constants || _load_constants()).YARN_DOCS)))); }); - commander.options.sort((_misc || _load_misc()).sortOptionsByFlags); + return function run(_x, _x2, _x3, _x4) { + return _ref.apply(this, arguments); + }; +})(); - commander.help(); - return Promise.resolve(); -} +let clearSome = exports.clearSome = (() => { + var _ref4 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, filters) { + const unpluggedPackageFolders = yield config.listUnpluggedPackageFolders(); + const removeList = []; -/***/ }), -/* 532 */ -/***/ (function(module, exports, __webpack_require__) { + for (var _iterator2 = unpluggedPackageFolders.entries(), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref6; -"use strict"; + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref6 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref6 = _i2.value; + } + const _ref5 = _ref6; + const unpluggedName = _ref5[0]; + const target = _ref5[1]; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.run = exports.Import = exports.noArguments = undefined; + var _ref8 = yield (_fs || _load_fs()).readJson(path.join(target, 'package.json')); -var _asyncToGenerator2; + const name = _ref8.name; -function _load_asyncToGenerator() { - return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2)); -} + const toBeRemoved = filters.has(name); -let run = exports.run = (() => { - var _ref5 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { - const imp = new Import(flags, config, reporter, new (_lockfile || _load_lockfile()).default({ cache: {} })); - yield imp.init(); + if (toBeRemoved) { + removeList.push(path.join(config.getUnpluggedPath(), unpluggedName)); + } + } + + if (removeList.length === unpluggedPackageFolders.size) { + yield (_fs || _load_fs()).unlink(config.getUnpluggedPath()); + } else { + for (var _iterator3 = removeList, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { + var _ref7; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref7 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref7 = _i3.value; + } + + const unpluggedPackagePath = _ref7; + + yield (_fs || _load_fs()).unlink(unpluggedPackagePath); + } + } }); - return function run(_x, _x2, _x3, _x4) { - return _ref5.apply(this, arguments); + return function clearSome(_x5, _x6) { + return _ref4.apply(this, arguments); + }; +})(); + +let clearAll = exports.clearAll = (() => { + var _ref9 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config) { + yield (_fs || _load_fs()).unlink(config.getUnpluggedPath()); + }); + + return function clearAll(_x7) { + return _ref9.apply(this, arguments); }; })(); -exports.setFlags = setFlags; exports.hasWrapper = hasWrapper; +exports.setFlags = setFlags; -var _install; +var _lockfile; -function _load_install() { - return _install = __webpack_require__(34); +function _load_lockfile() { + return _lockfile = _interopRequireDefault(__webpack_require__(19)); } -var _check; +var _install; -function _load_check() { - return _check = __webpack_require__(356); +function _load_install() { + return _install = __webpack_require__(34); } var _errors; @@ -96173,580 +95201,520 @@ function _load_errors() { return _errors = __webpack_require__(6); } -var _index; +var _fs; -function _load_index() { - return _index = __webpack_require__(78); +function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(5)); } -var _baseResolver; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } -function _load_baseResolver() { - return _baseResolver = _interopRequireDefault(__webpack_require__(123)); -} +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _hostedGitResolver; +const path = __webpack_require__(0); -function _load_hostedGitResolver() { - return _hostedGitResolver = _interopRequireDefault(__webpack_require__(109)); +function hasWrapper(commander) { + return true; } -var _hostedGitResolver2; - -function _load_hostedGitResolver2() { - return _hostedGitResolver2 = __webpack_require__(109); +function setFlags(commander) { + commander.description('Temporarily copies a package (with an optional @range suffix) outside of the global cache for debugging purposes'); + commander.usage('unplug [packages ...] [flags]'); + commander.option('--clear', 'Delete the selected packages'); + commander.option('--clear-all', 'Delete all unplugged packages'); } -var _gistResolver; +/***/ }), +/* 513 */ +/***/ (function(module, exports, __webpack_require__) { -function _load_gistResolver() { - return _gistResolver = _interopRequireDefault(__webpack_require__(216)); -} +"use strict"; -var _gistResolver2; -function _load_gistResolver2() { - return _gistResolver2 = __webpack_require__(216); -} +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.run = undefined; -var _gitResolver; +var _asyncToGenerator2; -function _load_gitResolver() { - return _gitResolver = _interopRequireDefault(__webpack_require__(124)); +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2)); } -var _fileResolver; +let run = exports.run = (() => { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + const versions = { yarn: (_yarnVersion || _load_yarnVersion()).version }; -function _load_fileResolver() { - return _fileResolver = _interopRequireDefault(__webpack_require__(215)); -} + const pkg = yield config.maybeReadManifest(config.cwd); + if (pkg && pkg.name && pkg.version) { + versions[pkg.name] = pkg.version; + } -var _packageResolver; + Object.assign(versions, process.versions); -function _load_packageResolver() { - return _packageResolver = _interopRequireDefault(__webpack_require__(366)); -} + reporter.inspect(versions); + }); -var _packageRequest; + return function run(_x, _x2, _x3, _x4) { + return _ref.apply(this, arguments); + }; +})(); -function _load_packageRequest() { - return _packageRequest = _interopRequireDefault(__webpack_require__(122)); -} +exports.setFlags = setFlags; +exports.hasWrapper = hasWrapper; -var _packageReference; +var _yarnVersion; -function _load_packageReference() { - return _packageReference = _interopRequireDefault(__webpack_require__(365)); +function _load_yarnVersion() { + return _yarnVersion = __webpack_require__(105); } -var _packageFetcher; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function _load_packageFetcher() { - return _packageFetcher = _interopRequireWildcard(__webpack_require__(210)); +function setFlags(commander) { + commander.description('Displays version information of currently installed Yarn, Node.js, and its dependencies.'); } -var _packageLinker; - -function _load_packageLinker() { - return _packageLinker = _interopRequireDefault(__webpack_require__(211)); +function hasWrapper(commander, args) { + return true; } -var _packageCompatibility; +/***/ }), +/* 514 */ +/***/ (function(module, exports, __webpack_require__) { -function _load_packageCompatibility() { - return _packageCompatibility = _interopRequireWildcard(__webpack_require__(209)); -} +"use strict"; -var _lockfile; -function _load_lockfile() { - return _lockfile = _interopRequireDefault(__webpack_require__(19)); -} +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.run = exports.requireLockfile = undefined; -var _normalizePattern9; +var _asyncToGenerator2; -function _load_normalizePattern() { - return _normalizePattern9 = __webpack_require__(37); +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2)); } -var _logicalDependencyTree; +let cleanQuery = (() => { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, query) { + // if a location was passed then turn it into a hash query + if (path.isAbsolute(query) && (yield (_fs || _load_fs()).exists(query))) { + // absolute path + query = path.relative(config.cwd, query); + } -function _load_logicalDependencyTree() { - return _logicalDependencyTree = __webpack_require__(582); -} + // remove references to node_modules with hashes + query = query.replace(/([\\/]|^)node_modules[\\/]/g, '#'); -var _fs; + // remove trailing hashes + query = query.replace(/^#+/g, ''); -function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(4)); -} + // remove trailing paths from each part of the query, skip second part of path for scoped packages + let queryParts = query.split('#'); + queryParts = queryParts.map(function (part) { + let parts = part.split(/[\\/]/g); -var _misc; + if (part[0] === '@') { + parts = parts.slice(0, 2); + } else { + parts = parts.slice(0, 1); + } -function _load_misc() { - return _misc = _interopRequireWildcard(__webpack_require__(18)); -} + return parts.join('/'); + }); + query = queryParts.join('#'); -var _constants; + return query; + }); -function _load_constants() { - return _constants = __webpack_require__(8); -} + return function cleanQuery(_x, _x2) { + return _ref.apply(this, arguments); + }; +})(); -var _semver; +let getPackageSize = (() => { + var _ref2 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (tuple) { + const loc = tuple[0]; -function _load_semver() { - return _semver = _interopRequireDefault(__webpack_require__(21)); -} -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + const files = yield (_fs || _load_fs()).walk(loc, null, new Set([(_constants || _load_constants()).METADATA_FILENAME, (_constants || _load_constants()).TARBALL_FILENAME])); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + const sizes = yield Promise.all(files.map(function (walkFile) { + return (_fs || _load_fs()).getFileSizeOnDisk(walkFile.absolute); + })); -const invariant = __webpack_require__(9); -const path = __webpack_require__(0); -const uuid = __webpack_require__(119); -const ssri = __webpack_require__(77); -const nodeVersion = process.versions.node.split('-')[0]; + return sum(sizes); + }); -const noArguments = exports.noArguments = true; + return function getPackageSize(_x3) { + return _ref2.apply(this, arguments); + }; +})(); -class ImportResolver extends (_baseResolver || _load_baseResolver()).default { - getCwd() { - if (this.request.parentRequest) { - const parent = this.resolver.getStrictResolvedPattern(this.request.parentRequest.pattern); - invariant(parent._loc, 'expected package location'); - return path.dirname(parent._loc); +let run = exports.run = (() => { + var _ref6 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + if (!args.length) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('missingWhyDependency')); + } + if (args.length > 1) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('tooManyArguments', 1)); } - return this.config.cwd; - } - resolveHostedGit(info, Resolver) { - var _normalizePattern = (0, (_normalizePattern9 || _load_normalizePattern()).normalizePattern)(this.pattern); + const query = yield cleanQuery(config, args[0]); - const range = _normalizePattern.range; + reporter.step(1, 4, reporter.lang('whyStart', args[0]), emoji.get('thinking_face')); - const exploded = (0, (_hostedGitResolver2 || _load_hostedGitResolver2()).explodeHostedGitFragment)(range, this.reporter); - const hash = info.gitHead; - invariant(hash, 'expected package gitHead'); - const url = Resolver.getTarballUrl(exploded, hash); - info._uid = hash; - info._remote = { - resolved: url, - type: 'tarball', - registry: this.registry, - reference: url, - hash: null - }; - return info; - } + // init + reporter.step(2, 4, reporter.lang('whyInitGraph'), emoji.get('truck')); + const lockfile = yield (_lockfile || _load_lockfile()).default.fromDirectory(config.lockfileFolder, reporter); + const install = new (_install || _load_install()).Install(flags, config, reporter, lockfile); - resolveGist(info, Resolver) { - var _normalizePattern2 = (0, (_normalizePattern9 || _load_normalizePattern()).normalizePattern)(this.pattern); + var _ref7 = yield install.fetchRequestFromCwd(); - const range = _normalizePattern2.range; + const depRequests = _ref7.requests, + patterns = _ref7.patterns, + workspaceLayout = _ref7.workspaceLayout; - var _explodeGistFragment = (0, (_gistResolver2 || _load_gistResolver2()).explodeGistFragment)(range, this.reporter); + yield install.resolver.init(depRequests, { + isFlat: install.flags.flat, + isFrozen: install.flags.frozenLockfile, + workspaceLayout + }); + const hoisted = yield install.linker.getFlatHoistedTree(patterns); - const id = _explodeGistFragment.id; + // finding + reporter.step(3, 4, reporter.lang('whyFinding'), emoji.get('mag')); - const hash = info.gitHead; - invariant(hash, 'expected package gitHead'); - const url = `https://gist.github.com/${id}.git`; - info._uid = hash; - info._remote = { - resolved: `${url}#${hash}`, - type: 'git', - registry: this.registry, - reference: url, - hash - }; - return info; - } + const matches = queryWhy(query, hoisted); - resolveGit(info, Resolver) { - const url = info._resolved; - const hash = info.gitHead; - invariant(url, 'expected package _resolved'); - invariant(hash, 'expected package gitHead'); - info._uid = hash; - info._remote = { - resolved: `${url}#${hash}`, - type: 'git', - registry: this.registry, - reference: url, - hash - }; - return info; - } + if (matches.length <= 0) { + reporter.error(reporter.lang('whyUnknownMatch')); + return; + } - resolveFile(info, Resolver) { - var _normalizePattern3 = (0, (_normalizePattern9 || _load_normalizePattern()).normalizePattern)(this.pattern); + const processMatch = (() => { + var _ref8 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (match) { + const matchInfo = match[1]; - const range = _normalizePattern3.range; + const matchRef = matchInfo.pkg._reference; + invariant(matchRef, 'expected reference'); - let loc = (_misc || _load_misc()).removePrefix(range, 'file:'); - if (!path.isAbsolute(loc)) { - loc = path.join(this.config.cwd, loc); - } - info._uid = info.version; - info._remote = { - type: 'copy', - registry: this.registry, - hash: `${uuid.v4()}-${new Date().getTime()}`, - reference: loc - }; - return info; - } + const distinctMatchPatterns = new Set(matchRef.patterns); + const reasons = []; - resolveRegistry(info) { - let url = info._resolved; - const hash = info._shasum; - invariant(url, 'expected package _resolved'); - invariant(hash, 'expected package _shasum'); - if (this.config.getOption('registry') === (_constants || _load_constants()).YARN_REGISTRY) { - url = url.replace((_constants || _load_constants()).NPM_REGISTRY_RE, (_constants || _load_constants()).YARN_REGISTRY); - } - info._uid = info.version; - info._remote = { - resolved: `${url}#${hash}`, - type: 'tarball', - registry: this.registry, - reference: url, - integrity: info._integrity ? ssri.parse(info._integrity) : ssri.fromHex(hash, 'sha1'), - hash - }; - return info; - } + // reason: dependency of these modules + if (matchInfo.originalParentPath.length > 0) { + reasons.push({ + type: 'whyDependedOn', + typeSimple: 'whyDependedOnSimple', + value: toStandardPathString(matchInfo.originalParentPath) + }); + } - resolveImport(info) { - var _normalizePattern4 = (0, (_normalizePattern9 || _load_normalizePattern()).normalizePattern)(this.pattern); + // reason: exists in manifest + let rootType; + for (var _iterator3 = distinctMatchPatterns, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { + var _ref9; - const range = _normalizePattern4.range; + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref9 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref9 = _i3.value; + } - const Resolver = (0, (_index || _load_index()).getExoticResolver)(range); - if (Resolver && Resolver.prototype instanceof (_hostedGitResolver || _load_hostedGitResolver()).default) { - return this.resolveHostedGit(info, Resolver); - } else if (Resolver && Resolver === (_gistResolver || _load_gistResolver()).default) { - return this.resolveGist(info, Resolver); - } else if (Resolver && Resolver === (_gitResolver || _load_gitResolver()).default) { - return this.resolveGit(info, Resolver); - } else if (Resolver && Resolver === (_fileResolver || _load_fileResolver()).default) { - return this.resolveFile(info, Resolver); - } - return this.resolveRegistry(info); - } + const pattern = _ref9; - resolveLocation(loc) { - var _this = this; + rootType = install.rootPatternsToOrigin[pattern]; + if (rootType) { + reasons.push({ + type: 'whySpecified', + typeSimple: 'whySpecifiedSimple', + value: rootType + }); + } + } - return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - const info = yield _this.config.tryManifest(loc, 'npm', false); - if (!info) { - return null; - } - return _this.resolveImport(info); - })(); - } + // reason: this is hoisted from these modules + for (var _iterator4 = matchInfo.previousPaths, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) { + var _ref10; - resolveFixedVersion(fixedVersionPattern) { - var _this2 = this; + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref10 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref10 = _i4.value; + } - return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - var _normalizePattern5 = (0, (_normalizePattern9 || _load_normalizePattern()).normalizePattern)(fixedVersionPattern); + const path = _ref10; - const range = _normalizePattern5.range; + reasons.push({ + type: 'whyHoistedFrom', + typeSimple: 'whyHoistedFromSimple', + value: toStandardPathString(path) + }); + } - const exoticResolver = (0, (_index || _load_index()).getExoticResolver)(range); - const manifest = exoticResolver ? yield _this2.request.findExoticVersionInfo(exoticResolver, range) : yield _this2.request.findVersionOnRegistry(fixedVersionPattern); - return manifest; - })(); - } + // package sizes + let packageSize = 0; + let directSizes = []; + let transitiveSizes = []; + try { + packageSize = yield getPackageSize(match); + } catch (e) {} - _resolveFromFixedVersions() { - var _this3 = this; + const dependencies = Array.from(collect(hoisted, new Set(), match)); + const transitiveDependencies = Array.from(collect(hoisted, new Set(), match, { recursive: true })); - return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - invariant(_this3.request instanceof ImportPackageRequest, 'request must be ImportPackageRequest'); + try { + directSizes = yield Promise.all(dependencies.map(getPackageSize)); + transitiveSizes = yield Promise.all(transitiveDependencies.map(getPackageSize)); + } catch (e) {} - var _normalizePattern6 = (0, (_normalizePattern9 || _load_normalizePattern()).normalizePattern)(_this3.pattern); + const transitiveKeys = new Set(transitiveDependencies.map(function ([, info]) { + return info.key; + })); + const sharedDependencies = getSharedDependencies(hoisted, transitiveKeys); - const name = _normalizePattern6.name; + // prepare output: populate reporter + reporter.info(reporter.lang('whyMatch', `${matchInfo.key}@${matchInfo.pkg.version}`)); + // + // reason: hoisted/nohoist + if (matchInfo.isNohoist) { + reasons.push({ + type: 'whyNotHoisted', + typeSimple: 'whyNotHoistedSimple', + value: matchInfo.nohoistList + }); + } else if (query === matchInfo.originalKey) { + reporter.info(reporter.lang('whyHoistedTo', matchInfo.key)); + } - invariant(_this3.request.dependencyTree instanceof (_logicalDependencyTree || _load_logicalDependencyTree()).LogicalDependencyTree, 'dependencyTree on request must be LogicalDependencyTree'); - const fixedVersionPattern = _this3.request.dependencyTree.getFixedVersionPattern(name, _this3.request.parentNames); - const info = yield _this3.config.getCache(`import-resolver-${fixedVersionPattern}`, function () { - return _this3.resolveFixedVersion(fixedVersionPattern); - }); - if (info) { - return info; - } - throw new (_errors || _load_errors()).MessageError(_this3.reporter.lang('importResolveFailed', name, _this3.getCwd())); - })(); - } + if (reasons.length === 1) { + reporter.info(reporter.lang(reasons[0].typeSimple, reasons[0].value)); + } else if (reasons.length > 1) { + reporter.info(reporter.lang('whyReasons')); + reporter.list('reasons', reasons.map(function (reason) { + return reporter.lang(reason.type, reason.value); + })); + } else { + reporter.error(reporter.lang('whyWhoKnows')); + } - _resolveFromNodeModules() { - var _this4 = this; + if (packageSize) { + // stats: file size of this dependency without any dependencies + reporter.info(reporter.lang('whyDiskSizeWithout', bytes(packageSize))); - return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - var _normalizePattern7 = (0, (_normalizePattern9 || _load_normalizePattern()).normalizePattern)(_this4.pattern); + // stats: file size of this dependency including dependencies that aren't shared + reporter.info(reporter.lang('whyDiskSizeUnique', bytes(packageSize + sum(directSizes)))); - const name = _normalizePattern7.name; + // stats: file size of this dependency including dependencies + reporter.info(reporter.lang('whyDiskSizeTransitive', bytes(packageSize + sum(transitiveSizes)))); - let cwd = _this4.getCwd(); - while (!path.relative(_this4.config.cwd, cwd).startsWith('..')) { - const loc = path.join(cwd, 'node_modules', name); - const info = yield _this4.config.getCache(`import-resolver-${loc}`, function () { - return _this4.resolveLocation(loc); - }); - if (info) { - return info; + // stats: shared transitive dependencies + reporter.info(reporter.lang('whySharedDependencies', sharedDependencies.size)); } - cwd = path.resolve(cwd, '../..'); - } - throw new (_errors || _load_errors()).MessageError(_this4.reporter.lang('importResolveFailed', name, _this4.getCwd())); + }); + + return function processMatch(_x8) { + return _ref8.apply(this, arguments); + }; })(); - } - resolve() { - if (this.request instanceof ImportPackageRequest && this.request.dependencyTree) { - return this._resolveFromFixedVersions(); - } else { - return this._resolveFromNodeModules(); + reporter.step(4, 4, reporter.lang('whyCalculating'), emoji.get('aerial_tramway')); + for (var _iterator5 = matches, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) { + var _ref11; + + if (_isArray5) { + if (_i5 >= _iterator5.length) break; + _ref11 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if (_i5.done) break; + _ref11 = _i5.value; + } + + const match = _ref11; + + yield processMatch(match); } - } -} + }); -class ImportPackageRequest extends (_packageRequest || _load_packageRequest()).default { - constructor(req, dependencyTree, resolver) { - super(req, resolver); - this.import = this.parentRequest instanceof ImportPackageRequest ? this.parentRequest.import : true; - this.dependencyTree = dependencyTree; - } + return function run(_x4, _x5, _x6, _x7) { + return _ref6.apply(this, arguments); + }; +})(); - getRootName() { - return this.resolver instanceof ImportPackageResolver && this.resolver.rootName || 'root'; - } +exports.setFlags = setFlags; +exports.hasWrapper = hasWrapper; +exports.queryWhy = queryWhy; - getParentHumanName() { - return [this.getRootName()].concat(this.parentNames).join(' > '); - } +var _install; - reportResolvedRangeMatch(info, resolved) { - if (info.version === resolved.version) { - return; - } - this.reporter.warn(this.reporter.lang('importResolvedRangeMatch', resolved.version, resolved.name, info.version, this.getParentHumanName())); - } +function _load_install() { + return _install = __webpack_require__(34); +} - _findResolvedManifest(info) { - var _normalizePattern8 = (0, (_normalizePattern9 || _load_normalizePattern()).normalizePattern)(this.pattern); +var _constants; - const range = _normalizePattern8.range, - name = _normalizePattern8.name; +function _load_constants() { + return _constants = __webpack_require__(8); +} - const solvedRange = (_semver || _load_semver()).default.validRange(range) ? info.version : range; - const resolved = this.resolver.getExactVersionMatch(name, solvedRange, info); - if (resolved) { - return resolved; - } - invariant(info._remote, 'expected package remote'); - const ref = new (_packageReference || _load_packageReference()).default(this, info, info._remote); - info._reference = ref; - return info; - } +var _fs; - resolveToExistingVersion(info) { - const resolved = this._findResolvedManifest(info); - invariant(resolved, 'should have found a resolved reference'); - const ref = resolved._reference; - invariant(ref, 'should have a package reference'); - ref.addRequest(this); - ref.addPattern(this.pattern, resolved); - ref.addOptional(this.optional); - } +function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(5)); +} - findVersionInfo() { - if (!this.import) { - this.reporter.verbose(this.reporter.lang('skippingImport', this.pattern, this.getParentHumanName())); - return super.findVersionInfo(); - } - const resolver = new ImportResolver(this, this.pattern); - return resolver.resolve().catch(() => { - this.import = false; - this.reporter.warn(this.reporter.lang('importFailed', this.pattern, this.getParentHumanName())); - return super.findVersionInfo(); - }); - } +var _lockfile; + +function _load_lockfile() { + return _lockfile = _interopRequireDefault(__webpack_require__(19)); } -class ImportPackageResolver extends (_packageResolver || _load_packageResolver()).default { - constructor(config, lockfile) { - super(config, lockfile); - this.next = []; - this.rootName = 'root'; - } +var _errors; - find(req) { - this.next.push(req); - return Promise.resolve(); - } +function _load_errors() { + return _errors = __webpack_require__(6); +} - findOne(req) { - var _this5 = this; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - if (_this5.activity) { - _this5.activity.tick(req.pattern); - } - const request = new ImportPackageRequest(req, _this5.dependencyTree, _this5); - yield request.find({ fresh: false }); - })(); - } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - findAll(deps) { - var _this6 = this; +const requireLockfile = exports.requireLockfile = true; - return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - yield Promise.all(deps.map(function (dep) { - return _this6.findOne(dep); - })); - deps = _this6.next; - _this6.next = []; - if (!deps.length) { - // all required package versions have been discovered, so now packages that - // resolved to existing versions can be resolved to their best available version - _this6.resolvePackagesWithExistingVersions(); - return; - } - yield _this6.findAll(deps); - })(); - } +const invariant = __webpack_require__(9); +const bytes = __webpack_require__(564); +const emoji = __webpack_require__(302); +const path = __webpack_require__(0); - resetOptional() { - for (const pattern in this.patterns) { - const ref = this.patterns[pattern]._reference; - invariant(ref, 'expected reference'); - ref.optional = null; - for (var _iterator = ref.requests, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; +function sum(array) { + return array.length ? array.reduce((a, b) => a + b, 0) : 0; +} - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } +function collect(hoistManifests, allDependencies, dependency, { recursive } = { recursive: false }) { + const depInfo = dependency[1]; - const req = _ref; + const deps = depInfo.pkg.dependencies; - ref.addOptional(req.optional); - } - } + if (!deps) { + return allDependencies; } - init(deps, { isFlat, isFrozen, workspaceLayout } = { isFlat: false, isFrozen: false, workspaceLayout: undefined }) { - var _this7 = this; + const dependencyKeys = new Set(Object.keys(deps)); + const directDependencies = []; - return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - _this7.flat = Boolean(isFlat); - const activity = _this7.activity = _this7.reporter.activity(); - yield _this7.findAll(deps); - _this7.resetOptional(); - activity.end(); - _this7.activity = null; - })(); - } -} + for (var _iterator = hoistManifests, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref3; -class Import extends (_install || _load_install()).Install { - constructor(flags, config, reporter, lockfile) { - super(flags, config, reporter, lockfile); - this.resolver = new ImportPackageResolver(this.config, this.lockfile); - this.linker = new (_packageLinker || _load_packageLinker()).default(config, this.resolver); - } - createLogicalDependencyTree(packageJson, packageLock) { - invariant(packageJson, 'package.json should exist'); - invariant(packageLock, 'package-lock.json should exist'); - invariant(this.resolver instanceof ImportPackageResolver, 'resolver should be an ImportPackageResolver'); - try { - this.resolver.dependencyTree = new (_logicalDependencyTree || _load_logicalDependencyTree()).LogicalDependencyTree(packageJson, packageLock); - } catch (e) { - throw new (_errors || _load_errors()).MessageError(this.reporter.lang('importSourceFilesCorrupted')); + if (_isArray) { + if (_i >= _iterator.length) break; + _ref3 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref3 = _i.value; } - } - getExternalLockfileContents() { - var _this8 = this; - return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - try { - var _ref2 = yield Promise.all([(_fs || _load_fs()).readFile(path.join(_this8.config.cwd, (_constants || _load_constants()).NODE_PACKAGE_JSON)), (_fs || _load_fs()).readFile(path.join(_this8.config.cwd, (_constants || _load_constants()).NPM_LOCK_FILENAME))]); + const dep = _ref3; + const info = dep[1]; - const packageJson = _ref2[0], - packageLock = _ref2[1]; - return { packageJson, packageLock }; - } catch (e) { - return { packageJson: null, packageLock: null }; - } - })(); + if (!allDependencies.has(dep) && dependencyKeys.has(info.key)) { + allDependencies.add(dep); + directDependencies.push(dep); + } } - init() { - var _this9 = this; - return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - if (yield (_fs || _load_fs()).exists(path.join(_this9.config.cwd, (_constants || _load_constants()).LOCKFILE_FILENAME))) { - throw new (_errors || _load_errors()).MessageError(_this9.reporter.lang('lockfileExists')); - } - - var _ref3 = yield _this9.getExternalLockfileContents(); + if (recursive) { + directDependencies.forEach(dependency => collect(hoistManifests, allDependencies, dependency, { recursive: true })); + } - const packageJson = _ref3.packageJson, - packageLock = _ref3.packageLock; + return allDependencies; +} - const importSource = packageJson && packageLock && (_semver || _load_semver()).default.satisfies(nodeVersion, '>=5.0.0') ? 'package-lock.json' : 'node_modules'; - if (importSource === 'package-lock.json') { - _this9.reporter.info(_this9.reporter.lang('importPackageLock')); - _this9.createLogicalDependencyTree(packageJson, packageLock); - } - if (importSource === 'node_modules') { - _this9.reporter.info(_this9.reporter.lang('importNodeModules')); - yield (0, (_check || _load_check()).verifyTreeCheck)(_this9.config, _this9.reporter, {}, []); - } +function getSharedDependencies(hoistManifests, transitiveKeys) { + const sharedDependencies = new Set(); + for (var _iterator2 = hoistManifests, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref5; - var _ref4 = yield _this9.fetchRequestFromCwd(); + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref5 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref5 = _i2.value; + } - const requests = _ref4.requests, - patterns = _ref4.patterns, - manifest = _ref4.manifest; + const _ref4 = _ref5; + const info = _ref4[1]; - if (manifest.name && _this9.resolver instanceof ImportPackageResolver) { - _this9.resolver.rootName = manifest.name; - } - yield _this9.resolver.init(requests, { isFlat: _this9.flags.flat, isFrozen: _this9.flags.frozenLockfile }); - const manifests = yield (_packageFetcher || _load_packageFetcher()).fetch(_this9.resolver.getManifests(), _this9.config); - _this9.resolver.updateManifests(manifests); - yield (_packageCompatibility || _load_packageCompatibility()).check(_this9.resolver.getManifests(), _this9.config, _this9.flags.ignoreEngines); - yield _this9.linker.resolvePeerModules(); - yield _this9.saveLockfileAndIntegrity(patterns); - return patterns; - })(); + if (!transitiveKeys.has(info.key) && info.pkg.dependencies) { + Object.keys(info.pkg.dependencies).forEach(dependency => { + if (transitiveKeys.has(dependency) && !sharedDependencies.has(dependency)) { + sharedDependencies.add(dependency); + } + }); + } } + return sharedDependencies; } -exports.Import = Import; function setFlags(commander) { - commander.description('Generates yarn.lock from an npm package-lock.json file or an existing npm-installed node_modules folder.'); + commander.description('Identifies why a package has been installed, detailing which other packages depend on it.'); } function hasWrapper(commander, args) { return true; } +// to conform to the current standard '#' as package tree separator +function toStandardPathString(pathString) { + const str = pathString.replace(/\//g, '#'); + if (str[0] === '#') { + return str.slice(1); + } + return str; +} + +function queryWhy(pattern, hoisted) { + const nohoistPattern = `#${pattern}`; + const found = []; + for (var _iterator6 = hoisted, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) { + var _ref13; + + if (_isArray6) { + if (_i6 >= _iterator6.length) break; + _ref13 = _iterator6[_i6++]; + } else { + _i6 = _iterator6.next(); + if (_i6.done) break; + _ref13 = _i6.value; + } + + const _ref12 = _ref13; + const loc = _ref12[0]; + const info = _ref12[1]; + + if (info.key === pattern || info.previousPaths.indexOf(pattern) >= 0 || info.key.endsWith(nohoistPattern)) { + found.push([loc, info]); + } + } + return found; +} + /***/ }), -/* 533 */ +/* 515 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -96765,58 +95733,45 @@ function _load_asyncToGenerator() { let run = exports.run = (() => { var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { - if (args.length > 2) { - reporter.error(reporter.lang('tooManyArguments', 2)); - return; - } + const workspaceRootFolder = config.workspaceRootFolder; - let packageName = args.shift() || '.'; - // Handle the case when we are referencing a local package. - if (packageName === '.') { - packageName = (yield config.readRootManifest()).name; + if (!workspaceRootFolder) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('workspaceRootNotFound', config.cwd)); } - const packageInput = (_npmRegistry || _load_npmRegistry()).default.escapeName(packageName); + if (args.length < 1) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('workspaceMissingWorkspace')); + } - var _parsePackageName = (0, (_parsePackageName2 || _load_parsePackageName()).default)(packageInput); + if (args.length < 2) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('workspaceMissingCommand')); + } - const name = _parsePackageName.name, - version = _parsePackageName.version; + const manifest = yield config.findManifest(workspaceRootFolder, false); + invariant(manifest && manifest.workspaces, 'We must find a manifest with a "workspaces" property'); + const workspaces = yield config.resolveWorkspaces(workspaceRootFolder, manifest); - let result; - try { - result = yield config.registries.npm.request(name, { unfiltered: true }); - } catch (e) { - reporter.error(reporter.lang('infoFail')); - return; - } - if (!result) { - reporter.error(reporter.lang('infoFail')); - return; - } + var _ref2 = args || []; - result = clean(result); + const workspaceName = _ref2[0], + rest = _ref2.slice(1); - const versions = result.versions; - // $FlowFixMe - result.versions = Object.keys(versions).sort(semver.compareLoose); - result.version = version || result['dist-tags'].latest; - result = Object.assign(result, versions[result.version]); + if (!Object.prototype.hasOwnProperty.call(workspaces, workspaceName)) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('workspaceUnknownWorkspace', workspaceName)); + } - const fieldPath = args.shift(); - const fields = fieldPath ? fieldPath.split('.') : []; + const workspace = workspaces[workspaceName]; - // Readmes can be long so exclude them unless explicitly asked for. - if (fields[0] !== 'readme') { - delete result.readme; + try { + yield (_child || _load_child()).spawn((_constants || _load_constants()).NODE_BIN_PATH, [(_constants || _load_constants()).YARN_BIN_PATH, ...rest], { + stdio: 'inherit', + cwd: workspace.loc + }); + } catch (err) { + throw err; } - - result = fields.reduce(function (prev, cur) { - return prev && prev[cur]; - }, result); - reporter.inspect(result); }); return function run(_x, _x2, _x3, _x4) { @@ -96827,62 +95782,38 @@ let run = exports.run = (() => { exports.setFlags = setFlags; exports.hasWrapper = hasWrapper; -var _npmRegistry; +var _errors; -function _load_npmRegistry() { - return _npmRegistry = _interopRequireDefault(__webpack_require__(88)); +function _load_errors() { + return _errors = __webpack_require__(6); } -var _parsePackageName2; +var _child; -function _load_parsePackageName() { - return _parsePackageName2 = _interopRequireDefault(__webpack_require__(588)); +function _load_child() { + return _child = _interopRequireWildcard(__webpack_require__(50)); } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _constants; -const semver = __webpack_require__(21); +function _load_constants() { + return _constants = __webpack_require__(8); +} -function clean(object) { - if (Array.isArray(object)) { - const result = []; - object.forEach(item => { - item = clean(item); - if (item) { - result.push(item); - } - }); - return result; - } else if (typeof object === 'object') { - const result = {}; - for (const key in object) { - if (key.startsWith('_')) { - continue; - } +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - const item = clean(object[key]); - if (item) { - result[key] = item; - } - } - return result; - } else if (object) { - return object; - } else { - return null; - } -} +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function setFlags(commander) { - commander.description('Shows information about a package.'); -} +const invariant = __webpack_require__(9); + +function setFlags(commander) {} function hasWrapper(commander, args) { return true; } /***/ }), -/* 534 */ +/* 516 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -96891,7 +95822,7 @@ function hasWrapper(commander, args) { Object.defineProperty(exports, "__esModule", { value: true }); -exports.getGitConfigInfo = exports.run = exports.shouldRunInCurrentCwd = undefined; +exports.examples = exports.setFlags = exports.run = exports.runScript = exports.info = undefined; var _asyncToGenerator2; @@ -96899,78 +95830,23 @@ function _load_asyncToGenerator() { return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2)); } -let run = exports.run = (() => { +let info = exports.info = (() => { var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { - const manifests = yield config.getRootManifests(); - - let repository = {}; - const author = { - name: config.getOption('init-author-name'), - email: config.getOption('init-author-email'), - url: config.getOption('init-author-url') - }; - if (yield (_fs || _load_fs()).exists(path.join(config.cwd, '.git'))) { - // get git origin of the cwd - try { - repository = { - type: 'git', - url: yield (_child || _load_child()).spawn('git', ['config', 'remote.origin.url'], { - cwd: config.cwd - }) - }; - } catch (ex) { - // Ignore - Git repo may not have an origin URL yet (eg. if it only exists locally) - } + const workspaceRootFolder = config.workspaceRootFolder; - if (author.name === undefined) { - author.name = yield getGitConfigInfo('user.name'); - } - if (author.email === undefined) { - author.email = yield getGitConfigInfo('user.email'); - } + if (!workspaceRootFolder) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('workspaceRootNotFound', config.cwd)); } - const keys = [{ - key: 'name', - question: 'name', - default: path.basename(config.cwd), - validation: (_validate || _load_validate()).isValidPackageName, - validationError: 'invalidPackageName' - }, { - key: 'version', - question: 'version', - default: String(config.getOption('init-version')) - }, { - key: 'description', - question: 'description', - default: '' - }, { - key: 'main', - question: 'entry point', - default: 'index.js' - }, { - key: 'repository', - question: 'repository url', - default: (0, (_util || _load_util()).extractRepositoryUrl)(repository) - }, { - key: 'author', - question: 'author', - default: (0, (_util || _load_util()).stringifyPerson)(author) - }, { - key: 'license', - question: 'license', - default: String(config.getOption('init-license')) - }, { - key: 'private', - question: 'private', - default: config.getOption('init-private') || '', - inputFormatter: yn - }]; + const manifest = yield config.findManifest(workspaceRootFolder, false); + invariant(manifest && manifest.workspaces, 'We must find a manifest with a "workspaces" property'); - // get answers - const pkg = {}; - for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + const workspaces = yield config.resolveWorkspaces(workspaceRootFolder, manifest); + + const publicData = {}; + + for (var _iterator = Object.keys(workspaces), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { var _ref2; if (_isArray) { @@ -96982,225 +95858,199 @@ let run = exports.run = (() => { _ref2 = _i.value; } - const entry = _ref2; - const yes = flags.yes, - privateFlag = flags.private; - const manifestKey = entry.key; - let question = entry.question, - def = entry.default; + const workspaceName = _ref2; + var _workspaces$workspace = workspaces[workspaceName]; + const loc = _workspaces$workspace.loc, + manifest = _workspaces$workspace.manifest; - for (var _iterator4 = (_index || _load_index()).registryNames, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) { - var _ref5; + const workspaceDependencies = new Set(); + const mismatchedWorkspaceDependencies = new Set(); - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref5 = _iterator4[_i4++]; + for (var _iterator2 = (_constants || _load_constants()).DEPENDENCY_TYPES, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref3; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref3 = _iterator2[_i2++]; } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref5 = _i4.value; + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref3 = _i2.value; } - const registryName = _ref5; - const object = manifests[registryName].object; - - let val = objectPath.get(object, manifestKey); - if (!val) { - break; - } - if (typeof val === 'object') { - if (manifestKey === 'author') { - val = (0, (_util || _load_util()).stringifyPerson)(val); - } else if (manifestKey === 'repository') { - val = (0, (_util || _load_util()).extractRepositoryUrl)(val); - } - } - def = val; - } + const dependencyType = _ref3; - if (manifestKey === 'private' && privateFlag) { - def = true; - } + if (dependencyType !== 'peerDependencies') { + for (var _iterator3 = Object.keys(manifest[dependencyType] || {}), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { + var _ref4; - if (def) { - question += ` (${String(def)})`; - } + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref4 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref4 = _i3.value; + } - let answer; - let validAnswer = false; + const dependencyName = _ref4; - if (yes) { - answer = def; - } else { - // loop until a valid answer is provided, if validation is on entry - if (entry.validation) { - while (!validAnswer) { - answer = (yield reporter.question(question)) || def; - // validate answer - if (entry.validation(String(answer))) { - validAnswer = true; - } else { - reporter.error(reporter.lang('invalidPackageName')); + if (Object.prototype.hasOwnProperty.call(workspaces, dependencyName)) { + invariant(manifest && manifest[dependencyType], 'The request should exist'); + const requestedRange = manifest[dependencyType][dependencyName]; + if (semver.satisfies(workspaces[dependencyName].manifest.version, requestedRange)) { + workspaceDependencies.add(dependencyName); + } else { + mismatchedWorkspaceDependencies.add(dependencyName); + } } } - } else { - answer = (yield reporter.question(question)) || def; } } - if (answer) { - if (entry.inputFormatter) { - answer = entry.inputFormatter(answer); - } - objectPath.set(pkg, manifestKey, answer); - } + publicData[workspaceName] = { + location: path.relative(config.lockfileFolder, loc).replace(/\\/g, '/'), + workspaceDependencies: Array.from(workspaceDependencies), + mismatchedWorkspaceDependencies: Array.from(mismatchedWorkspaceDependencies) + }; } - if (pkg.repository && (_githubResolver || _load_githubResolver()).default.isVersion(pkg.repository)) { - pkg.repository = `https://github.com/${pkg.repository}`; - } + reporter.log(JSON.stringify(publicData, null, 2), { force: true }); + }); - // save answers - const targetManifests = []; - for (var _iterator2 = (_index || _load_index()).registryNames, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { - var _ref3; + return function info(_x, _x2, _x3, _x4) { + return _ref.apply(this, arguments); + }; +})(); - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref3 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref3 = _i2.value; - } +let runScript = exports.runScript = (() => { + var _ref5 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + const workspaceRootFolder = config.workspaceRootFolder; - const registryName = _ref3; - const info = manifests[registryName]; - if (info.exists) { - targetManifests.push(info); - } - } - if (!targetManifests.length) { - targetManifests.push(manifests.npm); + if (!workspaceRootFolder) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('workspaceRootNotFound', config.cwd)); } - for (var _iterator3 = targetManifests, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { - var _ref4; - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref4 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref4 = _i3.value; - } + const manifest = yield config.findManifest(workspaceRootFolder, false); + invariant(manifest && manifest.workspaces, 'We must find a manifest with a "workspaces" property'); - const targetManifest = _ref4; + const workspaces = yield config.resolveWorkspaces(workspaceRootFolder, manifest); - Object.assign(targetManifest.object, pkg); - reporter.success(`Saved ${path.basename(targetManifest.loc)}`); - } + try { + for (var _iterator4 = Object.keys(workspaces), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) { + var _ref6; - yield config.saveRootManifests(manifests); - }); + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref6 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref6 = _i4.value; + } - return function run(_x, _x2, _x3, _x4) { - return _ref.apply(this, arguments); - }; -})(); + const workspaceName = _ref6; + const loc = workspaces[workspaceName].loc; -let getGitConfigInfo = exports.getGitConfigInfo = (() => { - var _ref6 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (credential, spawn = (_child || _load_child()).spawn) { - try { - // try to get author default based on git config - return yield spawn('git', ['config', credential]); - } catch (e) { - return ''; + reporter.log(`${os.EOL}> ${workspaceName}`); + yield (_child || _load_child()).spawn((_constants2 || _load_constants2()).NODE_BIN_PATH, [(_constants2 || _load_constants2()).YARN_BIN_PATH, 'run', ...args], { + stdio: 'inherit', + cwd: loc + }); + } + } catch (err) { + throw err; } }); - return function getGitConfigInfo(_x5) { - return _ref6.apply(this, arguments); + return function runScript(_x5, _x6, _x7, _x8) { + return _ref5.apply(this, arguments); }; })(); -exports.setFlags = setFlags; exports.hasWrapper = hasWrapper; -var _util; +var _errors; -function _load_util() { - return _util = __webpack_require__(221); +function _load_errors() { + return _errors = __webpack_require__(6); } -var _index; +var _buildSubCommands2; -function _load_index() { - return _index = __webpack_require__(57); +function _load_buildSubCommands() { + return _buildSubCommands2 = _interopRequireDefault(__webpack_require__(59)); } -var _githubResolver; +var _constants; -function _load_githubResolver() { - return _githubResolver = _interopRequireDefault(__webpack_require__(367)); +function _load_constants() { + return _constants = __webpack_require__(8); } var _child; function _load_child() { - return _child = _interopRequireWildcard(__webpack_require__(58)); -} - -var _fs; - -function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(4)); + return _child = _interopRequireWildcard(__webpack_require__(50)); } -var _validate; +var _constants2; -function _load_validate() { - return _validate = _interopRequireWildcard(__webpack_require__(125)); +function _load_constants2() { + return _constants2 = __webpack_require__(8); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const objectPath = __webpack_require__(304); +const invariant = __webpack_require__(9); const path = __webpack_require__(0); -const yn = __webpack_require__(962); - -function setFlags(commander) { - commander.description('Interactively creates or updates a package.json file.'); - commander.option('-y, --yes', 'use default options'); - commander.option('-p, --private', 'use default options and private true'); -} +const os = __webpack_require__(46); +const semver = __webpack_require__(22); function hasWrapper(commander, args) { return true; } -const shouldRunInCurrentCwd = exports.shouldRunInCurrentCwd = true; +var _buildSubCommands = (0, (_buildSubCommands2 || _load_buildSubCommands()).default)('workspaces', { + info(config, reporter, flags, args) { + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + yield info(config, reporter, flags, args); + })(); + }, + run(config, reporter, flags, args) { + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + yield runScript(config, reporter, flags, args); + })(); + } +}); + +const run = _buildSubCommands.run, + setFlags = _buildSubCommands.setFlags, + examples = _buildSubCommands.examples; +exports.run = run; +exports.setFlags = setFlags; +exports.examples = examples; /***/ }), -/* 535 */ +/* 517 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - +/* WEBPACK VAR INJECTION */(function(module) { Object.defineProperty(exports, "__esModule", { value: true }); -exports.examples = exports.run = undefined; +exports.autoRun = exports.main = undefined; var _extends2; function _load_extends() { - return _extends2 = _interopRequireDefault(__webpack_require__(22)); + return _extends2 = _interopRequireDefault(__webpack_require__(20)); } var _asyncToGenerator2; @@ -97209,573 +96059,827 @@ function _load_asyncToGenerator() { return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2)); } -let getManifests = (() => { - var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, flags) { - const lockfile = yield (_lockfile || _load_lockfile()).default.fromDirectory(config.cwd); - const install = new (_install || _load_install()).Install((0, (_extends2 || _load_extends()).default)({ skipIntegrityCheck: true }, flags), config, new (_baseReporter || _load_baseReporter()).default(), lockfile); - yield install.hydrate(true); +let main = exports.main = (() => { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* ({ + startArgs, + args, + endArgs + }) { + const collect = function collect(val, acc) { + acc.push(val); + return acc; + }; - let manifests = install.resolver.getManifests(); + (0, (_loudRejection || _load_loudRejection()).default)(); + (0, (_signalHandler || _load_signalHandler()).default)(); - // sort by name - manifests = manifests.sort(function (a, b) { - if (!a.name && !b.name) { - return 0; - } + // set global options + (_commander || _load_commander()).default.version((_yarnVersion || _load_yarnVersion()).version, '-v, --version'); + (_commander || _load_commander()).default.usage('[command] [flags]'); + (_commander || _load_commander()).default.option('--no-default-rc', 'prevent Yarn from automatically detecting yarnrc and npmrc files'); + (_commander || _load_commander()).default.option('--use-yarnrc ', 'specifies a yarnrc file that Yarn should use (.yarnrc only, not .npmrc)', collect, []); + (_commander || _load_commander()).default.option('--verbose', 'output verbose messages on internal operations'); + (_commander || _load_commander()).default.option('--offline', 'trigger an error if any required dependencies are not available in local cache'); + (_commander || _load_commander()).default.option('--prefer-offline', 'use network only if dependencies are not available in local cache'); + (_commander || _load_commander()).default.option('--enable-pnp, --pnp', "enable the Plug'n'Play installation"); + (_commander || _load_commander()).default.option('--disable-pnp', "disable the Plug'n'Play installation"); + (_commander || _load_commander()).default.option('--strict-semver'); + (_commander || _load_commander()).default.option('--json', 'format Yarn log messages as lines of JSON (see jsonlines.org)'); + (_commander || _load_commander()).default.option('--ignore-scripts', "don't run lifecycle scripts"); + (_commander || _load_commander()).default.option('--har', 'save HAR output of network traffic'); + (_commander || _load_commander()).default.option('--ignore-platform', 'ignore platform checks'); + (_commander || _load_commander()).default.option('--ignore-engines', 'ignore engines check'); + (_commander || _load_commander()).default.option('--ignore-optional', 'ignore optional dependencies'); + (_commander || _load_commander()).default.option('--force', 'install and build packages even if they were built before, overwrite lockfile'); + (_commander || _load_commander()).default.option('--skip-integrity-check', 'run install without checking if node_modules is installed'); + (_commander || _load_commander()).default.option('--check-files', 'install will verify file tree of packages for consistency'); + (_commander || _load_commander()).default.option('--no-bin-links', "don't generate bin links when setting up packages"); + (_commander || _load_commander()).default.option('--flat', 'only allow one version of a package'); + (_commander || _load_commander()).default.option('--prod, --production [prod]', '', (_conversion || _load_conversion()).boolify); + (_commander || _load_commander()).default.option('--no-lockfile', "don't read or generate a lockfile"); + (_commander || _load_commander()).default.option('--pure-lockfile', "don't generate a lockfile"); + (_commander || _load_commander()).default.option('--frozen-lockfile', "don't generate a lockfile and fail if an update is needed"); + (_commander || _load_commander()).default.option('--update-checksums', 'update package checksums from current repository'); + (_commander || _load_commander()).default.option('--link-duplicates', 'create hardlinks to the repeated modules in node_modules'); + (_commander || _load_commander()).default.option('--link-folder ', 'specify a custom folder to store global links'); + (_commander || _load_commander()).default.option('--global-folder ', 'specify a custom folder to store global packages'); + (_commander || _load_commander()).default.option('--modules-folder ', 'rather than installing modules into the node_modules folder relative to the cwd, output them here'); + (_commander || _load_commander()).default.option('--preferred-cache-folder ', 'specify a custom folder to store the yarn cache if possible'); + (_commander || _load_commander()).default.option('--cache-folder ', 'specify a custom folder that must be used to store the yarn cache'); + (_commander || _load_commander()).default.option('--mutex [:specifier]', 'use a mutex to ensure only one yarn instance is executing'); + (_commander || _load_commander()).default.option('--emoji [bool]', 'enable emoji in output', (_conversion || _load_conversion()).boolify, process.platform === 'darwin' || process.env.TERM_PROGRAM === 'Hyper' || process.env.TERM_PROGRAM === 'HyperTerm' || process.env.TERM_PROGRAM === 'Terminus'); + (_commander || _load_commander()).default.option('-s, --silent', 'skip Yarn console logs, other types of logs (script output) will be printed'); + (_commander || _load_commander()).default.option('--cwd ', 'working directory to use', process.cwd()); + (_commander || _load_commander()).default.option('--proxy ', ''); + (_commander || _load_commander()).default.option('--https-proxy ', ''); + (_commander || _load_commander()).default.option('--registry ', 'override configuration registry'); + (_commander || _load_commander()).default.option('--no-progress', 'disable progress bar'); + (_commander || _load_commander()).default.option('--network-concurrency ', 'maximum number of concurrent network requests', parseInt); + (_commander || _load_commander()).default.option('--network-timeout ', 'TCP timeout for network requests', parseInt); + (_commander || _load_commander()).default.option('--non-interactive', 'do not show interactive prompts'); + (_commander || _load_commander()).default.option('--scripts-prepend-node-path [bool]', 'prepend the node executable dir to the PATH in scripts', (_conversion || _load_conversion()).boolify); + (_commander || _load_commander()).default.option('--no-node-version-check', 'do not warn when using a potentially unsupported Node version'); + (_commander || _load_commander()).default.option('--focus', 'Focus on a single workspace by installing remote copies of its sibling workspaces.'); + (_commander || _load_commander()).default.option('--otp ', 'one-time password for two factor authentication'); - if (!a.name) { - return 1; - } + // if -v is the first command, then always exit after returning the version + if (args[0] === '-v') { + console.log((_yarnVersion || _load_yarnVersion()).version.trim()); + process.exitCode = 0; + return; + } - if (!b.name) { - return -1; - } + // get command name + const firstNonFlagIndex = args.findIndex(function (arg, idx, arr) { + const isOption = arg.startsWith('-'); + const prev = idx > 0 && arr[idx - 1]; + const prevOption = prev && prev.startsWith('-') && (_commander || _load_commander()).default.optionFor(prev); + const boundToPrevOption = prevOption && (prevOption.optional || prevOption.required); - return a.name.localeCompare(b.name); + return !isOption && !boundToPrevOption; }); + let preCommandArgs; + let commandName = ''; + if (firstNonFlagIndex > -1) { + preCommandArgs = args.slice(0, firstNonFlagIndex); + commandName = args[firstNonFlagIndex]; + args = args.slice(firstNonFlagIndex + 1); + } else { + preCommandArgs = args; + args = []; + } - // filter ignored manifests - manifests = manifests.filter(function (manifest) { - const ref = manifest._reference; - return !!ref && !ref.ignore; - }); + let isKnownCommand = Object.prototype.hasOwnProperty.call((_index3 || _load_index3()).default, commandName); + const isHelp = function isHelp(arg) { + return arg === '--help' || arg === '-h'; + }; + const helpInPre = preCommandArgs.findIndex(isHelp); + const helpInArgs = args.findIndex(isHelp); + const setHelpMode = function setHelpMode() { + if (isKnownCommand) { + args.unshift(commandName); + } + commandName = 'help'; + isKnownCommand = true; + }; - return manifests; - }); + if (helpInPre > -1) { + preCommandArgs.splice(helpInPre); + setHelpMode(); + } else if (isKnownCommand && helpInArgs === 0) { + args.splice(helpInArgs); + setHelpMode(); + } - return function getManifests(_x, _x2) { - return _ref.apply(this, arguments); - }; -})(); + if (!commandName) { + commandName = 'install'; + isKnownCommand = true; + } + if (commandName === 'set' && args[0] === 'version') { + commandName = 'policies'; + args.splice(0, 1, 'set-version'); + isKnownCommand = true; + } + if (!isKnownCommand) { + // if command is not recognized, then set default to `run` + args.unshift(commandName); + commandName = 'run'; + } + const command = (_index3 || _load_index3()).default[commandName]; -let list = (() => { - var _ref2 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { - const manifests = yield getManifests(config, flags); - const manifestsByLicense = new Map(); + let warnAboutRunDashDash = false; + // we are using "yarn