diff --git a/packages/amplify-category-auth/src/__tests__/commands/import.headless.test.ts b/packages/amplify-category-auth/src/__tests__/commands/import.headless.test.ts index 6e9b07cd8d0..5fd932e5ceb 100644 --- a/packages/amplify-category-auth/src/__tests__/commands/import.headless.test.ts +++ b/packages/amplify-category-auth/src/__tests__/commands/import.headless.test.ts @@ -13,8 +13,8 @@ jest.mock('@aws-amplify/amplify-prompts', () => ({ }, })); -jest.mock('amplify-cli-core', () => ({ - ...(jest.requireActual('amplify-cli-core') as {}), +jest.mock('@aws-amplify/amplify-cli-core', () => ({ + ...(jest.requireActual('@aws-amplify/amplify-cli-core') as {}), FeatureFlags: { getBoolean: () => false, }, diff --git a/packages/amplify-category-auth/src/__tests__/commands/override.test.ts b/packages/amplify-category-auth/src/__tests__/commands/override.test.ts index 8c53c242985..d5eb3ee478a 100644 --- a/packages/amplify-category-auth/src/__tests__/commands/override.test.ts +++ b/packages/amplify-category-auth/src/__tests__/commands/override.test.ts @@ -19,8 +19,8 @@ jest.mock('@aws-amplify/amplify-prompts', () => ({ }, })); -jest.mock('amplify-cli-core', () => ({ - ...(jest.requireActual('amplify-cli-core') as {}), +jest.mock('@aws-amplify/amplify-cli-core', () => ({ + ...(jest.requireActual('@aws-amplify/amplify-cli-core') as {}), stateManager: { getMeta: jest .fn() diff --git a/packages/amplify-category-auth/src/__tests__/commands/remove.test.ts b/packages/amplify-category-auth/src/__tests__/commands/remove.test.ts index 2ba5edf7c9f..382a8149477 100644 --- a/packages/amplify-category-auth/src/__tests__/commands/remove.test.ts +++ b/packages/amplify-category-auth/src/__tests__/commands/remove.test.ts @@ -21,7 +21,7 @@ jest.mock('../../provider-utils/awscloudformation/auth-inputs-manager/auth-input })), })); -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); const stateManagerMock = stateManager as jest.Mocked; stateManagerMock.getMeta.mockReturnValue({ diff --git a/packages/amplify-category-auth/src/__tests__/commands/update.test.ts b/packages/amplify-category-auth/src/__tests__/commands/update.test.ts index 3e10f8bd508..96536044453 100644 --- a/packages/amplify-category-auth/src/__tests__/commands/update.test.ts +++ b/packages/amplify-category-auth/src/__tests__/commands/update.test.ts @@ -12,8 +12,8 @@ jest.mock('fs-extra', () => ({ jest.mock('@aws-amplify/amplify-prompts'); -jest.mock('amplify-cli-core', () => ({ - ...(jest.requireActual('amplify-cli-core') as Record), +jest.mock('@aws-amplify/amplify-cli-core', () => ({ + ...(jest.requireActual('@aws-amplify/amplify-cli-core') as Record), FeatureFlags: { getBoolean: jest.fn().mockReturnValue(true), }, diff --git a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-inputs-manager/auth-input-state.test.ts b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-inputs-manager/auth-input-state.test.ts index d708736d76a..8c7f03eb216 100644 --- a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-inputs-manager/auth-input-state.test.ts +++ b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-inputs-manager/auth-input-state.test.ts @@ -3,8 +3,8 @@ import { AuthInputState } from '../../../../provider-utils/awscloudformation/aut jest.mock('fs-extra'); -jest.mock('amplify-cli-core', () => ({ - ...(jest.requireActual('amplify-cli-core') as {}), +jest.mock('@aws-amplify/amplify-cli-core', () => ({ + ...(jest.requireActual('@aws-amplify/amplify-cli-core') as {}), pathManager: { getBackendDirPath: jest.fn().mockReturnValue('mockbackendDirPath'), findProjectRoot: jest.fn().mockReturnValue('mockProject'), diff --git a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-stack-builder/auth-stack-transform.test.ts b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-stack-builder/auth-stack-transform.test.ts index cc6706f7d7d..3024fca9a95 100644 --- a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-stack-builder/auth-stack-transform.test.ts +++ b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-stack-builder/auth-stack-transform.test.ts @@ -2,8 +2,8 @@ import { $TSContext } from '@aws-amplify/amplify-cli-core'; import process from 'process'; import { AmplifyAuthTransform } from '../../../../provider-utils/awscloudformation/auth-stack-builder'; -jest.mock('amplify-cli-core', () => ({ - ...(jest.requireActual('amplify-cli-core') as {}), +jest.mock('@aws-amplify/amplify-cli-core', () => ({ + ...(jest.requireActual('@aws-amplify/amplify-cli-core') as {}), stateManager: { getLocalEnvInfo: jest.fn().mockReturnValue('testenv'), getMeta: jest.fn().mockReturnValue({ diff --git a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-stack-builder/user-pool-group-stack-transform.test.ts b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-stack-builder/user-pool-group-stack-transform.test.ts index 0512739851f..648fdcbf04b 100644 --- a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-stack-builder/user-pool-group-stack-transform.test.ts +++ b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-stack-builder/user-pool-group-stack-transform.test.ts @@ -1,8 +1,8 @@ import { $TSContext } from '@aws-amplify/amplify-cli-core'; import { AmplifyUserPoolGroupTransform } from '../../../../provider-utils/awscloudformation/auth-stack-builder'; -jest.mock('amplify-cli-core', () => ({ - ...(jest.requireActual('amplify-cli-core') as Record), +jest.mock('@aws-amplify/amplify-cli-core', () => ({ + ...(jest.requireActual('@aws-amplify/amplify-cli-core') as Record), stateManager: { getLocalEnvInfo: jest.fn().mockReturnValue('testEnv'), }, diff --git a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/handlers/resource-handlers.test.ts b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/handlers/resource-handlers.test.ts index 163805620a5..5a303ed9e84 100644 --- a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/handlers/resource-handlers.test.ts +++ b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/handlers/resource-handlers.test.ts @@ -18,7 +18,7 @@ jest.mock('../../../../provider-utils/awscloudformation/utils/message-printer'); // eslint-disable-next-line spellcheck/spell-checker jest.mock('../../../../provider-utils/awscloudformation/utils/amplify-meta-updaters'); jest.mock('../../../../provider-utils/awscloudformation/utils/auth-sms-workflow-helper'); -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); const getSupportedServicesMock = getSupportedServices as jest.MockedFunction; getSupportedServicesMock.mockReturnValue({ diff --git a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/index.test.ts b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/index.test.ts index 26a9aff0db2..7da1118f152 100644 --- a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/index.test.ts +++ b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/index.test.ts @@ -2,8 +2,8 @@ import { $TSContext } from '@aws-amplify/amplify-cli-core'; import { updateConfigOnEnvInit } from '../../../provider-utils/awscloudformation/index'; jest.mock('@aws-amplify/amplify-environment-parameters'); -jest.mock('amplify-cli-core', () => ({ - ...(jest.requireActual('amplify-cli-core') as {}), +jest.mock('@aws-amplify/amplify-cli-core', () => ({ + ...(jest.requireActual('@aws-amplify/amplify-cli-core') as {}), JSONUtilities: { writeJson: jest.fn(), readJson: jest.fn(), diff --git a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/auth-defaults-appliers.test.ts b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/auth-defaults-appliers.test.ts index a108bbe5690..23f79608c13 100644 --- a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/auth-defaults-appliers.test.ts +++ b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/auth-defaults-appliers.test.ts @@ -19,9 +19,9 @@ jest.mock('../../../../provider-utils/awscloudformation/service-walkthroughs/aut structureOAuthMetadata: jest.fn((result) => (result.include = 'this value')), })); -jest.mock('amplify-cli-core', () => { +jest.mock('@aws-amplify/amplify-cli-core', () => { return { - ...(jest.requireActual('amplify-cli-core') as {}), + ...(jest.requireActual('@aws-amplify/amplify-cli-core') as {}), FeatureFlags: { getBoolean: jest.fn().mockImplementation((name, defaultValue) => { if (name === 'auth.enableCaseInsensitivity') { diff --git a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/check-for-auth-migration.test.ts b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/check-for-auth-migration.test.ts index 2fc1f7406e5..71a9d7426ce 100644 --- a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/check-for-auth-migration.test.ts +++ b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/check-for-auth-migration.test.ts @@ -19,8 +19,8 @@ jest.mock('@aws-amplify/amplify-prompts', () => ({ }, })); -jest.mock('amplify-cli-core', () => ({ - ...(jest.requireActual('amplify-cli-core') as {}), +jest.mock('@aws-amplify/amplify-cli-core', () => ({ + ...(jest.requireActual('@aws-amplify/amplify-cli-core') as {}), stateManager: { getMeta: jest.fn().mockReturnValue({ auth: { diff --git a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/get-auth-trigger-stack-cfn-parameters.test.ts b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/get-auth-trigger-stack-cfn-parameters.test.ts index 59bb3cf76fa..885df12c7e8 100644 --- a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/get-auth-trigger-stack-cfn-parameters.test.ts +++ b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/get-auth-trigger-stack-cfn-parameters.test.ts @@ -3,8 +3,8 @@ import { AuthInputState } from '../../../../provider-utils/awscloudformation/aut import { AttributeType } from '../../../../provider-utils/awscloudformation/service-walkthrough-types/awsCognito-user-input-types'; import { getAuthTriggerStackCfnParameters } from '../../../../provider-utils/awscloudformation/utils/get-auth-trigger-stack-cfn-parameters'; -jest.mock('amplify-cli-core', () => ({ - ...jest.requireActual('amplify-cli-core'), +jest.mock('@aws-amplify/amplify-cli-core', () => ({ + ...jest.requireActual('@aws-amplify/amplify-cli-core'), pathManager: { getBackendDirPath: jest.fn().mockReturnValue('mockDirPath'), }, diff --git a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/message-printer.test.ts b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/message-printer.test.ts index 301bc4adfb3..18744009ce0 100644 --- a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/message-printer.test.ts +++ b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/message-printer.test.ts @@ -2,8 +2,8 @@ import { printSMSSandboxWarning } from '../../../../provider-utils/awscloudforma import { BannerMessage } from '@aws-amplify/amplify-cli-core'; import { printer } from '@aws-amplify/amplify-prompts'; import os from 'os'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('@aws-amplify/amplify-prompts'); describe('printSMSSandboxWarning', () => { diff --git a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/migrate-override-resource.test.ts b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/migrate-override-resource.test.ts index cbbe7d1499f..21edda163db 100644 --- a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/migrate-override-resource.test.ts +++ b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/migrate-override-resource.test.ts @@ -5,8 +5,8 @@ import * as path from 'path'; jest.mock('@aws-amplify/amplify-prompts'); jest.mock('fs-extra'); -jest.mock('amplify-cli-core', () => ({ - ...(jest.requireActual('amplify-cli-core') as {}), +jest.mock('@aws-amplify/amplify-cli-core', () => ({ + ...(jest.requireActual('@aws-amplify/amplify-cli-core') as {}), pathManager: { findProjectRoot: jest.fn().mockReturnValue('somePath'), getBackendDirPath: jest.fn().mockReturnValue('mockProjectPath'), diff --git a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/project-has-auth.test.ts b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/project-has-auth.test.ts index 164d6fc2cbe..5ce1c6fab11 100644 --- a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/project-has-auth.test.ts +++ b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/project-has-auth.test.ts @@ -1,7 +1,7 @@ import { stateManager } from '@aws-amplify/amplify-cli-core'; import { projectHasAuth } from '../../../../provider-utils/awscloudformation/utils/project-has-auth'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); describe('auth category dependency check', () => { beforeEach(() => { diff --git a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/synthesize-resources.test.ts b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/synthesize-resources.test.ts index c82288c73f9..219afc8d087 100644 --- a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/synthesize-resources.test.ts +++ b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/synthesize-resources.test.ts @@ -4,7 +4,7 @@ import { updateUserPoolGroups } from '../../../../provider-utils/awscloudformati import { createAdminAuthFunction } from '../../../../provider-utils/awscloudformation/utils/synthesize-resources'; import * as path from 'path'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('fs-extra'); jest.mock('../../../../provider-utils/awscloudformation/utils/generate-user-pool-group-stack-template'); diff --git a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/trigger-flow-auth-helper.test.js b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/trigger-flow-auth-helper.test.js index 88302ad7d38..677a2a80c0d 100644 --- a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/trigger-flow-auth-helper.test.js +++ b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/trigger-flow-auth-helper.test.js @@ -1,4 +1,4 @@ -jest.mock('amplify-cli-core', () => { +jest.mock('@aws-amplify/amplify-cli-core', () => { return { FeatureFlags: { getBoolean: jest.fn().mockImplementation((name, defaultValue) => { diff --git a/packages/amplify-category-auth/src/index.js b/packages/amplify-category-auth/src/index.js index 13ddbf3527d..0fbe5952d12 100644 --- a/packages/amplify-category-auth/src/index.js +++ b/packages/amplify-category-auth/src/index.js @@ -8,7 +8,7 @@ const path = require('path'); const sequential = require('promise-sequential'); const { validateAddAuthRequest, validateUpdateAuthRequest, validateImportAuthRequest } = require('amplify-util-headless-input'); -const { stateManager, AmplifySupportedService, JSONUtilities } = require('amplify-cli-core'); +const { stateManager, AmplifySupportedService, JSONUtilities } = require('@aws-amplify/amplify-cli-core'); const { printer } = require('@aws-amplify/amplify-prompts'); const { ensureEnvParamManager } = require('@aws-amplify/amplify-environment-parameters'); const defaults = require('./provider-utils/awscloudformation/assets/cognito-defaults'); diff --git a/packages/amplify-category-function/src/__tests__/index.test.ts b/packages/amplify-category-function/src/__tests__/index.test.ts index f5f3350bd52..28996a50fd1 100644 --- a/packages/amplify-category-function/src/__tests__/index.test.ts +++ b/packages/amplify-category-function/src/__tests__/index.test.ts @@ -6,7 +6,7 @@ import { getLocalFunctionSecretNames } from '../provider-utils/awscloudformation import { getAppId, secretsPathAmplifyAppIdKey } from '../provider-utils/awscloudformation/secrets/secretName'; jest.mock('promise-sequential'); -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('../provider-utils/awscloudformation/secrets/functionSecretsStateManager'); jest.mock('../provider-utils/awscloudformation/secrets/secretName'); diff --git a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/index.test.ts b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/index.test.ts index bcd8bf9738b..2a410148006 100644 --- a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/index.test.ts +++ b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/index.test.ts @@ -5,7 +5,7 @@ import { buildFunction } from '../../../provider-utils/awscloudformation/utils/b import { getBuilder } from '../../..'; import { BuildType } from '@aws-amplify/amplify-function-plugin-interface'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); const stateManager_mock = stateManager as jest.Mocked; stateManager_mock.getMeta.mockReturnValue({ providers: { diff --git a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/secrets/functionSecretsStateManager.test.ts b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/secrets/functionSecretsStateManager.test.ts index 9553950bc0f..4395346f0a1 100644 --- a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/secrets/functionSecretsStateManager.test.ts +++ b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/secrets/functionSecretsStateManager.test.ts @@ -7,7 +7,7 @@ import * as stateManagerModule from '../../../../provider-utils/awscloudformatio import { getAppId, getFunctionSecretPrefix } from '../../../../provider-utils/awscloudformation/secrets/secretName'; import { SSMClientWrapper } from '../../../../provider-utils/awscloudformation/secrets/ssmClientWrapper'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('../../../../provider-utils/awscloudformation/secrets/ssmClientWrapper'); jest.mock('../../../../provider-utils/awscloudformation/secrets/secretsCfnModifier'); jest.mock('../../../../provider-utils/awscloudformation/secrets/secretName'); diff --git a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/addLayerToFunctionWalkthrough.test.ts b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/addLayerToFunctionWalkthrough.test.ts index 7c6d88e4526..c22e5279f9e 100644 --- a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/addLayerToFunctionWalkthrough.test.ts +++ b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/addLayerToFunctionWalkthrough.test.ts @@ -11,7 +11,7 @@ import { LayerVersionMetadata } from '../../../../provider-utils/awscloudformati jest.mock('../../../../provider-utils/awscloudformation/utils/addLayerToFunctionUtils'); jest.mock('../../../../provider-utils/awscloudformation/utils/layerCloudState'); -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); const stateManager_mock = stateManager as jest.Mocked; stateManager_mock.getMeta.mockReturnValue({ diff --git a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/execPermissionsWalkthrough.test.ts b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/execPermissionsWalkthrough.test.ts index a254a49b17f..d7b32725420 100644 --- a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/execPermissionsWalkthrough.test.ts +++ b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/execPermissionsWalkthrough.test.ts @@ -15,7 +15,7 @@ const backendDirPathStub = 'backendDirPath'; jest.mock('../../../../provider-utils/awscloudformation/utils/cloudformationHelpers'); -jest.mock('amplify-cli-core', () => ({ +jest.mock('@aws-amplify/amplify-cli-core', () => ({ stateManager: { getMeta: jest.fn(), }, @@ -93,7 +93,7 @@ test('check CFN resources', async () => { test('env resources for CFN for DDB table and api', async () => { const contextStub = { - ...jest.requireActual('amplify-cli-core'), + ...jest.requireActual('@aws-amplify/amplify-cli-core'), print: { info: () => jest.fn, }, @@ -110,7 +110,7 @@ test('env resources for CFN for DDB table and api', async () => { test('env resources for CFN for auth and storage for api', async () => { const contextStub = { - ...jest.requireActual('amplify-cli-core'), + ...jest.requireActual('@aws-amplify/amplify-cli-core'), print: { info: () => jest.fn, }, diff --git a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/removeWalkthrough.test.ts b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/removeWalkthrough.test.ts index 341578cacd4..063fbe9b77c 100644 --- a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/removeWalkthrough.test.ts +++ b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/removeWalkthrough.test.ts @@ -23,8 +23,8 @@ describe('remove walkthough test', () => { }, }; - jest.mock('amplify-cli-core', () => ({ - ...jest.requireActual('amplify-cli-core'), + jest.mock('@aws-amplify/amplify-cli-core', () => ({ + ...jest.requireActual('@aws-amplify/amplify-cli-core'), promptConfirmationRemove: jest.fn().mockReturnValue(true), stateManager: { getLocalEnvInfo: jest.fn().mockReturnValue({ envName }), diff --git a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/buildFunction.test.ts b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/buildFunction.test.ts index e274f338cbd..8eb2cb4eb93 100644 --- a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/buildFunction.test.ts +++ b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/buildFunction.test.ts @@ -2,7 +2,7 @@ import { $TSContext, pathManager } from '@aws-amplify/amplify-cli-core'; import { BuildType, FunctionRuntimeLifecycleManager } from '@aws-amplify/amplify-function-plugin-interface'; import { buildFunction } from '../../../../provider-utils/awscloudformation/utils/buildFunction'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); const pathManager_mock = pathManager as jest.Mocked; pathManager_mock.getBackendDirPath.mockReturnValue('mockpath'); diff --git a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/buildLayer.test.ts b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/buildLayer.test.ts index 533aa7351f7..2a4bc01335d 100644 --- a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/buildLayer.test.ts +++ b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/buildLayer.test.ts @@ -3,7 +3,7 @@ import { FunctionRuntimeLifecycleManager } from '@aws-amplify/amplify-function-p import { buildLayer } from '../../../../provider-utils/awscloudformation/utils/buildLayer'; import { loadLayerConfigurationFile } from '../../../../provider-utils/awscloudformation/utils/layerConfiguration'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('../../../../provider-utils/awscloudformation/utils/layerConfiguration'); const pathManager_mock = pathManager as jest.Mocked; diff --git a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/ensure-lambda-arn-outputs.test.ts b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/ensure-lambda-arn-outputs.test.ts index cd91ca83c73..2335ddc7126 100644 --- a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/ensure-lambda-arn-outputs.test.ts +++ b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/ensure-lambda-arn-outputs.test.ts @@ -1,7 +1,7 @@ import { pathManager, stateManager, readCFNTemplate, writeCFNTemplate, CFNTemplateFormat } from '@aws-amplify/amplify-cli-core'; import { ensureLambdaExecutionRoleOutputs } from '../../../../provider-utils/awscloudformation/utils/ensure-lambda-arn-outputs'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); const pathManagerMock = pathManager as jest.Mocked; const stateManagerMock = stateManager as jest.Mocked; const readCFNTemplateMock = readCFNTemplate as jest.MockedFunction; diff --git a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/environmentVariablesHelper.test.ts b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/environmentVariablesHelper.test.ts index 9fce1760b24..cdbb7453c54 100644 --- a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/environmentVariablesHelper.test.ts +++ b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/environmentVariablesHelper.test.ts @@ -3,7 +3,7 @@ import { prompter } from '@aws-amplify/amplify-prompts'; import * as envVarHelper from '../../../../provider-utils/awscloudformation/utils/environmentVariablesHelper'; import * as uuid from 'uuid'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('@aws-amplify/amplify-prompts'); jest.mock('uuid'); diff --git a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/getDependentFunction.test.ts b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/getDependentFunction.test.ts index 12354611549..778ef0a8aef 100644 --- a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/getDependentFunction.test.ts +++ b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/getDependentFunction.test.ts @@ -5,7 +5,7 @@ import { $TSContext } from '@aws-amplify/amplify-cli-core'; jest.mock('fs-extra'); jest.mock('../../../../provider-utils/awscloudformation/utils/loadFunctionParameters'); jest.mock('path'); -jest.mock('amplify-cli-core', () => ({ +jest.mock('@aws-amplify/amplify-cli-core', () => ({ JSONUtilities: { readJson: jest.fn(), writeJson: jest.fn(), diff --git a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/lambda-layer-cloud-formation-template.test.ts b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/lambda-layer-cloud-formation-template.test.ts index 9f180523d86..6af190e5103 100644 --- a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/lambda-layer-cloud-formation-template.test.ts +++ b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/lambda-layer-cloud-formation-template.test.ts @@ -9,7 +9,7 @@ import { PermissionEnum, } from '../../../../provider-utils/awscloudformation/utils/layerParams'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); const pathManager_mock = pathManager as jest.Mocked; const stateManager_mock = stateManager as jest.Mocked; pathManager_mock.getResourceDirectoryPath.mockReturnValue('fakeProject/amplify/backend/myLayer/'); @@ -65,7 +65,7 @@ function validateOutput(layerCfn) { describe('test layer CFN generation functions', () => { beforeAll(() => { - jest.mock('amplify-cli-core', () => ({ + jest.mock('@aws-amplify/amplify-cli-core', () => ({ stateManager: { getLocalEnvInfo: jest.fn().mockReturnValue('testenv'), }, diff --git a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/loadFunctionParameters.test.ts b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/loadFunctionParameters.test.ts index 8a7be071dd4..3cb12a86483 100644 --- a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/loadFunctionParameters.test.ts +++ b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/loadFunctionParameters.test.ts @@ -1,7 +1,7 @@ import { JSONUtilities } from '@aws-amplify/amplify-cli-core'; import { loadFunctionParameters } from '../../../../provider-utils/awscloudformation/utils/loadFunctionParameters'; -jest.mock('amplify-cli-core', () => ({ +jest.mock('@aws-amplify/amplify-cli-core', () => ({ JSONUtilities: { readJson: jest.fn(), writeJson: jest.fn(), diff --git a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/packageFunction.test.ts b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/packageFunction.test.ts index 69b25fd7b72..1190b457a0b 100644 --- a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/packageFunction.test.ts +++ b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/packageFunction.test.ts @@ -5,7 +5,7 @@ import { PackageRequestMeta } from '../../../../provider-utils/awscloudformation import { zipPackage } from '../../../../provider-utils/awscloudformation/utils/zipResource'; jest.mock('fs-extra'); -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('../../../../provider-utils/awscloudformation/utils/functionPluginLoader'); jest.mock('../../../../provider-utils/awscloudformation/utils/zipResource'); diff --git a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/packageLayer.test.ts b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/packageLayer.test.ts index 150515ea794..f3440a7ad6a 100644 --- a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/packageLayer.test.ts +++ b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/packageLayer.test.ts @@ -6,7 +6,7 @@ import { LayerCloudState } from '../../../../provider-utils/awscloudformation/ut import { loadLayerConfigurationFile } from '../../../../provider-utils/awscloudformation/utils/layerConfiguration'; jest.mock('fs-extra'); -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('../../../../provider-utils/awscloudformation/utils/functionPluginLoader'); jest.mock('../../../../provider-utils/awscloudformation/utils/layerConfiguration'); jest.mock('../../../../provider-utils/awscloudformation/utils/layerCloudState'); diff --git a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/storeResources.test.ts b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/storeResources.test.ts index 3dcab987af6..b10e7be1da2 100644 --- a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/storeResources.test.ts +++ b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/storeResources.test.ts @@ -2,7 +2,7 @@ import { $TSContext, JSONUtilities, pathManager } from '@aws-amplify/amplify-cli import { LambdaLayer } from '@aws-amplify/amplify-function-plugin-interface'; import { saveMutableState } from '../../../../provider-utils/awscloudformation/utils/storeResources'; -jest.mock('amplify-cli-core', () => ({ +jest.mock('@aws-amplify/amplify-cli-core', () => ({ JSONUtilities: { readJson: jest.fn(), writeJson: jest.fn(), diff --git a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/updateDependentFunctionCfn.test.ts b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/updateDependentFunctionCfn.test.ts index c7360798629..98d978895e0 100644 --- a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/updateDependentFunctionCfn.test.ts +++ b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/updateDependentFunctionCfn.test.ts @@ -14,7 +14,7 @@ jest.mock('../../../../provider-utils/awscloudformation/utils/loadFunctionParame jest.mock('path'); jest.mock('../../../../provider-utils/awscloudformation/service-walkthroughs/lambda-walkthrough'); -jest.mock('amplify-cli-core', () => ({ +jest.mock('@aws-amplify/amplify-cli-core', () => ({ JSONUtilities: { readJson: jest.fn(), writeJson: jest.fn(), diff --git a/packages/amplify-category-function/src/__tests__/utils/layerCloudState.test.ts b/packages/amplify-category-function/src/__tests__/utils/layerCloudState.test.ts index 18210b06d12..ba687ee743f 100644 --- a/packages/amplify-category-function/src/__tests__/utils/layerCloudState.test.ts +++ b/packages/amplify-category-function/src/__tests__/utils/layerCloudState.test.ts @@ -1,4 +1,4 @@ -import { $TSContext } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; import { LayerCloudState } from '../../provider-utils/awscloudformation/utils/layerCloudState'; /** diff --git a/packages/amplify-category-geo/src/__tests__/commands/geo/add.test.ts b/packages/amplify-category-geo/src/__tests__/commands/geo/add.test.ts index 01820d52936..905eb47d39d 100644 --- a/packages/amplify-category-geo/src/__tests__/commands/geo/add.test.ts +++ b/packages/amplify-category-geo/src/__tests__/commands/geo/add.test.ts @@ -6,7 +6,7 @@ import { run } from '../../../commands/geo/add'; const mockAddResource = addResource as jest.MockedFunction; mockAddResource.mockImplementation(async (_, service: string) => service); -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('../../../provider-controllers/index'); describe('add command tests', () => { diff --git a/packages/amplify-category-geo/src/__tests__/commands/geo/remove.test.ts b/packages/amplify-category-geo/src/__tests__/commands/geo/remove.test.ts index cc35b0bf055..48a9eea8fa3 100644 --- a/packages/amplify-category-geo/src/__tests__/commands/geo/remove.test.ts +++ b/packages/amplify-category-geo/src/__tests__/commands/geo/remove.test.ts @@ -11,7 +11,7 @@ mockRemoveResource.mockImplementation((context: $TSContext, service: string): Pr }); }); -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('../../../provider-controllers'); describe('remove command tests', () => { diff --git a/packages/amplify-category-geo/src/__tests__/commands/geo/update.test.ts b/packages/amplify-category-geo/src/__tests__/commands/geo/update.test.ts index 56e1d8e8e9a..a730c71a743 100644 --- a/packages/amplify-category-geo/src/__tests__/commands/geo/update.test.ts +++ b/packages/amplify-category-geo/src/__tests__/commands/geo/update.test.ts @@ -6,7 +6,7 @@ import { run } from '../../../commands/geo/update'; const mockUpdateResource = updateResource as jest.MockedFunction; mockUpdateResource.mockImplementation(async (_, service: string) => service); -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('../../../provider-controllers/index'); describe('update command tests', () => { diff --git a/packages/amplify-category-geo/src/__tests__/index.test.ts b/packages/amplify-category-geo/src/__tests__/index.test.ts index 184ca6418cf..b4c984805b7 100644 --- a/packages/amplify-category-geo/src/__tests__/index.test.ts +++ b/packages/amplify-category-geo/src/__tests__/index.test.ts @@ -1,7 +1,7 @@ import { $TSContext, $TSObject, stateManager } from '@aws-amplify/amplify-cli-core'; import { getPermissionPolicies } from '../index'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); describe('only grant permission policies as requested', () => { const provider = 'awscloudformation'; diff --git a/packages/amplify-category-geo/src/__tests__/provider-controllers/index.test.ts b/packages/amplify-category-geo/src/__tests__/provider-controllers/index.test.ts index 97201df9db3..5c50b011cff 100644 --- a/packages/amplify-category-geo/src/__tests__/provider-controllers/index.test.ts +++ b/packages/amplify-category-geo/src/__tests__/provider-controllers/index.test.ts @@ -1,7 +1,7 @@ import { stateManager } from '@aws-amplify/amplify-cli-core'; import { projectHasAuth } from '../../provider-controllers/index'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); describe('auth category dependency check', () => { beforeEach(() => { diff --git a/packages/amplify-category-geo/src/__tests__/service-utils/serviceUtils.test.ts b/packages/amplify-category-geo/src/__tests__/service-utils/serviceUtils.test.ts index 4e5a1ff8632..c0e4f7f4088 100644 --- a/packages/amplify-category-geo/src/__tests__/service-utils/serviceUtils.test.ts +++ b/packages/amplify-category-geo/src/__tests__/service-utils/serviceUtils.test.ts @@ -7,7 +7,7 @@ import { getCurrentMapParameters, getMapFriendlyNames } from '../../service-util import { getCurrentPlaceIndexParameters } from '../../service-utils/placeIndexUtils'; import { getCurrentGeofenceCollectionParameters } from '../../service-utils/geofenceCollectionUtils'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); describe('Test resource utility functions', () => { const map1Params = { diff --git a/packages/amplify-category-geo/src/__tests__/service-walkthroughs/geofenceCollectionWalkthrough.test.ts b/packages/amplify-category-geo/src/__tests__/service-walkthroughs/geofenceCollectionWalkthrough.test.ts index 73422cbca77..840ee246ac1 100644 --- a/packages/amplify-category-geo/src/__tests__/service-walkthroughs/geofenceCollectionWalkthrough.test.ts +++ b/packages/amplify-category-geo/src/__tests__/service-walkthroughs/geofenceCollectionWalkthrough.test.ts @@ -7,7 +7,7 @@ import { AccessType, DataProvider } from '../../service-utils/resourceParams'; import { updateGeofenceCollectionWalkthrough } from '../../service-walkthroughs/geofenceCollectionWalkthrough'; import { removeWalkthrough } from '../../service-walkthroughs/removeWalkthrough'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('@aws-amplify/amplify-prompts'); describe('Geofence Collection walkthrough works as expected', () => { diff --git a/packages/amplify-category-geo/src/__tests__/service-walkthroughs/mapWalkthrough.test.ts b/packages/amplify-category-geo/src/__tests__/service-walkthroughs/mapWalkthrough.test.ts index d6507a9e210..177e75c8e52 100644 --- a/packages/amplify-category-geo/src/__tests__/service-walkthroughs/mapWalkthrough.test.ts +++ b/packages/amplify-category-geo/src/__tests__/service-walkthroughs/mapWalkthrough.test.ts @@ -7,7 +7,7 @@ import { category } from '../../constants'; import { createMapWalkthrough, updateMapWalkthrough } from '../../service-walkthroughs/mapWalkthrough'; import { removeWalkthrough } from '../../service-walkthroughs/removeWalkthrough'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('@aws-amplify/amplify-prompts'); describe('Map walkthrough works as expected', () => { diff --git a/packages/amplify-category-geo/src/__tests__/service-walkthroughs/placeIndexWalkthrough.test.ts b/packages/amplify-category-geo/src/__tests__/service-walkthroughs/placeIndexWalkthrough.test.ts index 87c9454cc20..8ae5af73245 100644 --- a/packages/amplify-category-geo/src/__tests__/service-walkthroughs/placeIndexWalkthrough.test.ts +++ b/packages/amplify-category-geo/src/__tests__/service-walkthroughs/placeIndexWalkthrough.test.ts @@ -7,7 +7,7 @@ import { AccessType, DataProvider } from '../../service-utils/resourceParams'; import { createPlaceIndexWalkthrough, updatePlaceIndexWalkthrough } from '../../service-walkthroughs/placeIndexWalkthrough'; import { removeWalkthrough } from '../../service-walkthroughs/removeWalkthrough'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('@aws-amplify/amplify-prompts'); describe('Search walkthrough works as expected', () => { diff --git a/packages/amplify-category-storage/API.md b/packages/amplify-category-storage/API.md index 123d2d1f5c1..50d8a4ef1d6 100644 --- a/packages/amplify-category-storage/API.md +++ b/packages/amplify-category-storage/API.md @@ -4,9 +4,9 @@ ```ts -import { $TSAny } from 'amplify-cli-core'; -import { $TSContext } from 'amplify-cli-core'; -import { IAmplifyResource } from 'amplify-cli-core'; +import { $TSAny } from '@aws-amplify/amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; +import { IAmplifyResource } from '@aws-amplify/amplify-cli-core'; // @public (undocumented) export function add(context: any, providerName: any, service: any): Promise; diff --git a/packages/amplify-category-storage/package.json b/packages/amplify-category-storage/package.json index db83aa92b0c..30467f06407 100644 --- a/packages/amplify-category-storage/package.json +++ b/packages/amplify-category-storage/package.json @@ -27,11 +27,11 @@ "access": "public" }, "dependencies": { + "@aws-amplify/amplify-cli-core": "4.0.1", "@aws-amplify/amplify-environment-parameters": "1.4.1", "@aws-amplify/amplify-prompts": "2.6.6", "@aws-amplify/amplify-util-import": "2.4.0", "@aws-amplify/cli-extensibility-helper": "3.0.1", - "amplify-cli-core": "4.0.1", "amplify-headless-interface": "1.17.1", "amplify-util-headless-input": "1.9.10", "aws-cdk-lib": "~2.68.0", diff --git a/packages/amplify-category-storage/resources/genInputSchema.ts b/packages/amplify-category-storage/resources/genInputSchema.ts index 786be632820..db94cbcdaef 100644 --- a/packages/amplify-category-storage/resources/genInputSchema.ts +++ b/packages/amplify-category-storage/resources/genInputSchema.ts @@ -1,4 +1,4 @@ -import { TypeDef, CLIInputSchemaGenerator, AmplifySupportedService } from 'amplify-cli-core'; +import { TypeDef, CLIInputSchemaGenerator, AmplifySupportedService } from '@aws-amplify/amplify-cli-core'; //ResourceProvider TypeDefs const DDBStorageTypeDef: TypeDef = { diff --git a/packages/amplify-category-storage/src/__tests__/commands/add.test.ts b/packages/amplify-category-storage/src/__tests__/commands/add.test.ts index 6f1c5284b33..490a2f6f4ef 100644 --- a/packages/amplify-category-storage/src/__tests__/commands/add.test.ts +++ b/packages/amplify-category-storage/src/__tests__/commands/add.test.ts @@ -1,9 +1,9 @@ -import { $TSContext, AmplifySupportedService } from 'amplify-cli-core'; +import { $TSContext, AmplifySupportedService } from '@aws-amplify/amplify-cli-core'; import { run } from '../../commands/storage/add'; import * as providerController from '../../provider-utils/awscloudformation/index'; jest.mock('../../provider-utils/awscloudformation/index'); -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); const providerController_mock = providerController as jest.Mocked; providerController_mock.addResource.mockImplementation = jest.fn().mockImplementation(async () => { diff --git a/packages/amplify-category-storage/src/__tests__/commands/console.test.ts b/packages/amplify-category-storage/src/__tests__/commands/console.test.ts index 33d04a78df0..d882239c720 100644 --- a/packages/amplify-category-storage/src/__tests__/commands/console.test.ts +++ b/packages/amplify-category-storage/src/__tests__/commands/console.test.ts @@ -1,10 +1,10 @@ -import { $TSContext, stateManager } from 'amplify-cli-core'; +import { $TSContext, stateManager } from '@aws-amplify/amplify-cli-core'; import { Printer, printer } from '@aws-amplify/amplify-prompts'; import { run } from '../../commands/storage/console'; import * as providerController from '../../provider-utils/awscloudformation/index'; jest.mock('../../provider-utils/awscloudformation/index'); -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('@aws-amplify/amplify-prompts'); const providerControllerMock = providerController as jest.Mocked; diff --git a/packages/amplify-category-storage/src/__tests__/commands/override.test.ts b/packages/amplify-category-storage/src/__tests__/commands/override.test.ts index 991e73c3940..365497d35b9 100644 --- a/packages/amplify-category-storage/src/__tests__/commands/override.test.ts +++ b/packages/amplify-category-storage/src/__tests__/commands/override.test.ts @@ -1,11 +1,18 @@ -import { $TSContext, $TSObject, stateManager, generateOverrideSkeleton, pathManager, AmplifySupportedService } from 'amplify-cli-core'; +import { + $TSContext, + $TSObject, + stateManager, + generateOverrideSkeleton, + pathManager, + AmplifySupportedService, +} from '@aws-amplify/amplify-cli-core'; import { run } from '../../commands/storage/override'; import { printer, prompter } from '@aws-amplify/amplify-prompts'; import path from 'path'; import { DynamoDBInputState } from '../../provider-utils/awscloudformation/service-walkthroughs/dynamoDB-input-state'; import { S3InputState } from '../../provider-utils/awscloudformation/service-walkthroughs/s3-user-input-state'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('@aws-amplify/amplify-prompts'); jest.mock('path'); jest.mock('../../provider-utils/awscloudformation/service-walkthroughs/dynamoDB-input-state'); diff --git a/packages/amplify-category-storage/src/__tests__/commands/remove.test.ts b/packages/amplify-category-storage/src/__tests__/commands/remove.test.ts index e57d994a65e..dfa96ff2622 100644 --- a/packages/amplify-category-storage/src/__tests__/commands/remove.test.ts +++ b/packages/amplify-category-storage/src/__tests__/commands/remove.test.ts @@ -1,9 +1,9 @@ -import { $TSContext } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; import { run } from '../../commands/storage/remove'; import * as providerController from '../../provider-utils/awscloudformation/index'; jest.mock('../../provider-utils/awscloudformation/index'); -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); const providerController_mock = providerController as jest.Mocked; providerController_mock.updateResource.mockImplementation = jest.fn().mockImplementation(async () => { diff --git a/packages/amplify-category-storage/src/__tests__/commands/update.test.ts b/packages/amplify-category-storage/src/__tests__/commands/update.test.ts index 49fe86f1695..699f9566beb 100644 --- a/packages/amplify-category-storage/src/__tests__/commands/update.test.ts +++ b/packages/amplify-category-storage/src/__tests__/commands/update.test.ts @@ -1,9 +1,9 @@ -import { $TSContext } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; import { run } from '../../commands/storage/update'; import * as providerController from '../../provider-utils/awscloudformation/index'; jest.mock('../../provider-utils/awscloudformation/index'); -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); const providerController_mock = providerController as jest.Mocked; providerController_mock.updateResource.mockImplementation = jest.fn().mockImplementation(async () => { diff --git a/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/cdk-stack-builder/ddb-stack-transform.test.ts b/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/cdk-stack-builder/ddb-stack-transform.test.ts index 56f588b3759..237a1087689 100644 --- a/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/cdk-stack-builder/ddb-stack-transform.test.ts +++ b/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/cdk-stack-builder/ddb-stack-transform.test.ts @@ -1,6 +1,6 @@ /* These tests test the DDBStackTransform and run the cdk builder tool which is used within this file */ -import { $TSContext } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; import { DDBStackTransform } from '../../../../provider-utils/awscloudformation/cdk-stack-builder/ddb-stack-transform'; import { DynamoDBCLIInputs, @@ -8,7 +8,7 @@ import { } from '../../../../provider-utils/awscloudformation/service-walkthrough-types/dynamoDB-user-input-types'; import { DynamoDBInputState } from '../../../../provider-utils/awscloudformation/service-walkthroughs/dynamoDB-input-state'; -jest.mock('amplify-cli-core', () => ({ +jest.mock('@aws-amplify/amplify-cli-core', () => ({ buildOverrideDir: jest.fn().mockResolvedValue(false), JSONUtilities: { writeJson: jest.fn(), diff --git a/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/cdk-stack-builder/s3-stack-builder.test.ts b/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/cdk-stack-builder/s3-stack-builder.test.ts index c6f0e266c89..01b39725384 100644 --- a/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/cdk-stack-builder/s3-stack-builder.test.ts +++ b/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/cdk-stack-builder/s3-stack-builder.test.ts @@ -2,7 +2,7 @@ /* These tests test the AmplifyS3ResourceStackTransform and run the cdk builder tool which is used within this file */ import * as uuid from 'uuid'; -import { $TSContext, CLISubCommandType, stateManager, buildOverrideDir, pathManager } from 'amplify-cli-core'; +import { $TSContext, CLISubCommandType, stateManager, buildOverrideDir, pathManager } from '@aws-amplify/amplify-cli-core'; import _ from 'lodash'; import { AmplifyS3ResourceStackTransform } from '../../../../provider-utils/awscloudformation/cdk-stack-builder/s3-stack-transform'; import { @@ -37,7 +37,7 @@ const mockContext = { }, } as unknown as $TSContext; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); const stateManagerMock = stateManager as jest.Mocked; stateManagerMock.getMeta.mockReturnValue({ diff --git a/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/cfn-template-utils.test.ts b/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/cfn-template-utils.test.ts index 612844f94da..dc9c1158bfd 100644 --- a/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/cfn-template-utils.test.ts +++ b/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/cfn-template-utils.test.ts @@ -1,7 +1,7 @@ import { getExistingTableColumnNames } from '../../../provider-utils/awscloudformation/cfn-template-utils'; -import { pathManager, readCFNTemplate } from 'amplify-cli-core'; +import { pathManager, readCFNTemplate } from '@aws-amplify/amplify-cli-core'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); const pathManager_mock = pathManager as jest.Mocked; const readCFNTemplate_mock = readCFNTemplate as jest.MockedFunction; diff --git a/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/index.test.ts b/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/index.test.ts index f1bdfd344f7..223eb1d0a17 100644 --- a/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/index.test.ts +++ b/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/index.test.ts @@ -1,7 +1,7 @@ -import { open } from 'amplify-cli-core'; +import { open } from '@aws-amplify/amplify-cli-core'; import { console } from '../../../provider-utils/awscloudformation'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); const openMock = open as jest.MockedFunction; diff --git a/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/dynamoDb-walkthrough.test.ts b/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/dynamoDb-walkthrough.test.ts index 7abd89b67ea..86a0883e988 100644 --- a/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/dynamoDb-walkthrough.test.ts +++ b/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/dynamoDb-walkthrough.test.ts @@ -1,4 +1,4 @@ -import { $TSContext, stateManager } from 'amplify-cli-core'; +import { $TSContext, stateManager } from '@aws-amplify/amplify-cli-core'; import { prompter } from '@aws-amplify/amplify-prompts'; import { DynamoDBInputState } from '../../../../provider-utils/awscloudformation/service-walkthroughs/dynamoDB-input-state'; import { DDBStackTransform } from '../../../../provider-utils/awscloudformation/cdk-stack-builder/ddb-stack-transform'; @@ -8,7 +8,7 @@ import { FieldType, } from '../../../../provider-utils/awscloudformation/service-walkthrough-types/dynamoDB-user-input-types'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('@aws-amplify/amplify-prompts'); jest.mock('../../../../provider-utils/awscloudformation/service-walkthroughs/dynamoDB-input-state'); jest.mock('../../../../provider-utils/awscloudformation/cdk-stack-builder/ddb-stack-transform'); diff --git a/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/s3-auth-api.test.ts b/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/s3-auth-api.test.ts index 4ffbddb91fd..8b4ea5d3368 100644 --- a/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/s3-auth-api.test.ts +++ b/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/s3-auth-api.test.ts @@ -1,4 +1,4 @@ -import { $TSContext } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; import { checkStorageAuthenticationRequirements } from '../../../../provider-utils/awscloudformation/service-walkthroughs/s3-auth-api'; describe('checkStorageAuthenticationRequirements', () => { diff --git a/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/s3-walkthrough.test.ts b/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/s3-walkthrough.test.ts index 635ddd37e89..7e62cf1abbe 100644 --- a/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/s3-walkthrough.test.ts +++ b/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/s3-walkthrough.test.ts @@ -1,4 +1,4 @@ -import { $TSAny, $TSContext, AmplifySupportedService, stateManager } from 'amplify-cli-core'; +import { $TSAny, $TSContext, AmplifySupportedService, stateManager } from '@aws-amplify/amplify-cli-core'; import { prompter } from '@aws-amplify/amplify-prompts'; import * as uuid from 'uuid'; import { AmplifyS3ResourceStackTransform } from '../../../../provider-utils/awscloudformation/cdk-stack-builder/s3-stack-transform'; @@ -16,7 +16,7 @@ import { import { MigrationParams, S3InputState } from '../../../../provider-utils/awscloudformation/service-walkthroughs/s3-user-input-state'; import { addWalkthrough, updateWalkthrough } from '../../../../provider-utils/awscloudformation/service-walkthroughs/s3-walkthrough'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('@aws-amplify/amplify-prompts'); jest.mock('../../../../provider-utils/awscloudformation/service-walkthroughs/s3-user-input-state'); jest.mock('../../../../provider-utils/awscloudformation/cdk-stack-builder/s3-stack-transform'); diff --git a/packages/amplify-category-storage/src/commands/storage.ts b/packages/amplify-category-storage/src/commands/storage.ts index cf9fab494f6..f7be6562f39 100644 --- a/packages/amplify-category-storage/src/commands/storage.ts +++ b/packages/amplify-category-storage/src/commands/storage.ts @@ -1,4 +1,4 @@ -import { $TSContext } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; import { printer } from '@aws-amplify/amplify-prompts'; import * as path from 'path'; import { categoryName } from '../constants'; diff --git a/packages/amplify-category-storage/src/commands/storage/add.ts b/packages/amplify-category-storage/src/commands/storage/add.ts index f64b729181e..312d786ee02 100644 --- a/packages/amplify-category-storage/src/commands/storage/add.ts +++ b/packages/amplify-category-storage/src/commands/storage/add.ts @@ -1,4 +1,4 @@ -import { $TSContext } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; import { printer } from '@aws-amplify/amplify-prompts'; import { categoryName } from '../../constants'; diff --git a/packages/amplify-category-storage/src/commands/storage/help.ts b/packages/amplify-category-storage/src/commands/storage/help.ts index adb7dc15830..0002a85ae6a 100644 --- a/packages/amplify-category-storage/src/commands/storage/help.ts +++ b/packages/amplify-category-storage/src/commands/storage/help.ts @@ -1,4 +1,4 @@ -import { $TSContext, runHelp, commandsInfo } from 'amplify-cli-core'; +import { $TSContext, runHelp, commandsInfo } from '@aws-amplify/amplify-cli-core'; export const run = (context: $TSContext) => { runHelp(context, commandsInfo); diff --git a/packages/amplify-category-storage/src/commands/storage/import.ts b/packages/amplify-category-storage/src/commands/storage/import.ts index 55fc0d2e6d2..6c1d23ae218 100644 --- a/packages/amplify-category-storage/src/commands/storage/import.ts +++ b/packages/amplify-category-storage/src/commands/storage/import.ts @@ -1,4 +1,4 @@ -import { $TSAny, $TSContext } from 'amplify-cli-core'; +import { $TSAny, $TSContext } from '@aws-amplify/amplify-cli-core'; import { printer } from '@aws-amplify/amplify-prompts'; import { categoryName } from '../../constants'; diff --git a/packages/amplify-category-storage/src/commands/storage/override.ts b/packages/amplify-category-storage/src/commands/storage/override.ts index 7ce7a973365..d3d79f40c43 100644 --- a/packages/amplify-category-storage/src/commands/storage/override.ts +++ b/packages/amplify-category-storage/src/commands/storage/override.ts @@ -11,7 +11,7 @@ import { getMigrateResourceMessageForOverride, pathManager, stateManager, -} from 'amplify-cli-core'; +} from '@aws-amplify/amplify-cli-core'; import { printer, prompter } from '@aws-amplify/amplify-prompts'; import * as path from 'path'; import { DDBStackTransform } from '../../provider-utils/awscloudformation/cdk-stack-builder/ddb-stack-transform'; diff --git a/packages/amplify-category-storage/src/commands/storage/push.ts b/packages/amplify-category-storage/src/commands/storage/push.ts index 2ab188b29d6..805c8c6ba4a 100644 --- a/packages/amplify-category-storage/src/commands/storage/push.ts +++ b/packages/amplify-category-storage/src/commands/storage/push.ts @@ -1,4 +1,4 @@ -import { $TSContext } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; import { printer } from '@aws-amplify/amplify-prompts'; import { categoryName } from '../../constants'; diff --git a/packages/amplify-category-storage/src/commands/storage/remove.ts b/packages/amplify-category-storage/src/commands/storage/remove.ts index 27af621b8e3..7906c7ea29e 100644 --- a/packages/amplify-category-storage/src/commands/storage/remove.ts +++ b/packages/amplify-category-storage/src/commands/storage/remove.ts @@ -1,4 +1,4 @@ -import { $TSAny, $TSContext } from 'amplify-cli-core'; +import { $TSAny, $TSContext } from '@aws-amplify/amplify-cli-core'; import { printer } from '@aws-amplify/amplify-prompts'; import { categoryName } from '../../constants'; diff --git a/packages/amplify-category-storage/src/commands/storage/update.ts b/packages/amplify-category-storage/src/commands/storage/update.ts index f194520517c..6914d474e7e 100644 --- a/packages/amplify-category-storage/src/commands/storage/update.ts +++ b/packages/amplify-category-storage/src/commands/storage/update.ts @@ -1,4 +1,4 @@ -import { $TSContext } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; import { printer } from '@aws-amplify/amplify-prompts'; import { categoryName } from '../../constants'; diff --git a/packages/amplify-category-storage/src/index.ts b/packages/amplify-category-storage/src/index.ts index a9a6fd1e929..fa028a1a267 100644 --- a/packages/amplify-category-storage/src/index.ts +++ b/packages/amplify-category-storage/src/index.ts @@ -1,4 +1,11 @@ -import { $TSAny, $TSContext, AmplifyCategories, AmplifySupportedService, IAmplifyResource, stateManager } from 'amplify-cli-core'; +import { + $TSAny, + $TSContext, + AmplifyCategories, + AmplifySupportedService, + IAmplifyResource, + stateManager, +} from '@aws-amplify/amplify-cli-core'; import { printer } from '@aws-amplify/amplify-prompts'; import { validateAddStorageRequest, diff --git a/packages/amplify-category-storage/src/provider-utils/awscloudformation/cdk-stack-builder/ddb-stack-transform.ts b/packages/amplify-category-storage/src/provider-utils/awscloudformation/cdk-stack-builder/ddb-stack-transform.ts index 432871c4dd5..edf2fedb3c1 100644 --- a/packages/amplify-category-storage/src/provider-utils/awscloudformation/cdk-stack-builder/ddb-stack-transform.ts +++ b/packages/amplify-category-storage/src/provider-utils/awscloudformation/cdk-stack-builder/ddb-stack-transform.ts @@ -1,5 +1,5 @@ import { AmplifyDDBResourceTemplate, getProjectInfo } from '@aws-amplify/cli-extensibility-helper'; -import { $TSContext, AmplifyError, buildOverrideDir, JSONUtilities, pathManager } from 'amplify-cli-core'; +import { $TSContext, AmplifyError, buildOverrideDir, JSONUtilities, pathManager } from '@aws-amplify/amplify-cli-core'; import { formatter } from '@aws-amplify/amplify-prompts'; import * as cdk from 'aws-cdk-lib'; import * as fs from 'fs-extra'; 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 475f59debbd..ba4bded5a6e 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 @@ -5,7 +5,7 @@ import * as s3Cdk from 'aws-cdk-lib/aws-s3'; import { HttpMethods } from 'aws-cdk-lib/aws-s3'; import * as cdk from 'aws-cdk-lib'; import { Construct } from 'constructs'; -import { $TSAny, $TSContext, $TSObject, AmplifyCategories, stateManager } from 'amplify-cli-core'; +import { $TSAny, $TSContext, $TSObject, AmplifyCategories, stateManager } from '@aws-amplify/amplify-cli-core'; import { defaultS3UserInputs, GroupAccessType, diff --git a/packages/amplify-category-storage/src/provider-utils/awscloudformation/cdk-stack-builder/s3-stack-transform.ts b/packages/amplify-category-storage/src/provider-utils/awscloudformation/cdk-stack-builder/s3-stack-transform.ts index 00747a66395..1e073bf45e6 100644 --- a/packages/amplify-category-storage/src/provider-utils/awscloudformation/cdk-stack-builder/s3-stack-transform.ts +++ b/packages/amplify-category-storage/src/provider-utils/awscloudformation/cdk-stack-builder/s3-stack-transform.ts @@ -10,7 +10,7 @@ import { IAmplifyResource, JSONUtilities, pathManager, -} from 'amplify-cli-core'; +} from '@aws-amplify/amplify-cli-core'; import { formatter } from '@aws-amplify/amplify-prompts'; import * as fs from 'fs-extra'; import * as path from 'path'; diff --git a/packages/amplify-category-storage/src/provider-utils/awscloudformation/cdk-stack-builder/types.ts b/packages/amplify-category-storage/src/provider-utils/awscloudformation/cdk-stack-builder/types.ts index 5e56316b9ba..6864a723c8c 100644 --- a/packages/amplify-category-storage/src/provider-utils/awscloudformation/cdk-stack-builder/types.ts +++ b/packages/amplify-category-storage/src/provider-utils/awscloudformation/cdk-stack-builder/types.ts @@ -1,6 +1,6 @@ import { AmplifyCDKL1 } from '@aws-amplify/cli-extensibility-helper'; import * as cdk from 'aws-cdk-lib'; -import { $TSObject } from 'amplify-cli-core'; +import { $TSObject } from '@aws-amplify/amplify-cli-core'; import { Construct } from 'constructs'; import { DdbAttrType } from '../cfn-template-utils'; diff --git a/packages/amplify-category-storage/src/provider-utils/awscloudformation/cfn-template-utils.ts b/packages/amplify-category-storage/src/provider-utils/awscloudformation/cfn-template-utils.ts index c6c13631a9b..9daa83a4e3c 100644 --- a/packages/amplify-category-storage/src/provider-utils/awscloudformation/cfn-template-utils.ts +++ b/packages/amplify-category-storage/src/provider-utils/awscloudformation/cfn-template-utils.ts @@ -1,9 +1,8 @@ -import { pathManager, readCFNTemplate } from 'amplify-cli-core'; +import { pathManager, readCFNTemplate, AmplifyCategories } from '@aws-amplify/amplify-cli-core'; import { Template } from 'cloudform-types'; import Table, { AttributeDefinition, GlobalSecondaryIndex } from 'cloudform-types/types/dynamoDb/table'; import _ from 'lodash'; import * as path from 'path'; -import { AmplifyCategories } from 'amplify-cli-core'; import { FieldType } from './service-walkthrough-types/dynamoDB-user-input-types'; export const getCloudFormationTemplatePath = (resourceName: string) => { diff --git a/packages/amplify-category-storage/src/provider-utils/awscloudformation/default-values/s3-defaults.ts b/packages/amplify-category-storage/src/provider-utils/awscloudformation/default-values/s3-defaults.ts index 9b6eeee53cc..f88a18e2c0e 100644 --- a/packages/amplify-category-storage/src/provider-utils/awscloudformation/default-values/s3-defaults.ts +++ b/packages/amplify-category-storage/src/provider-utils/awscloudformation/default-values/s3-defaults.ts @@ -1,4 +1,4 @@ -import { $TSAny } from 'amplify-cli-core'; +import { $TSAny } from '@aws-amplify/amplify-cli-core'; import { v4 as uuid } from 'uuid'; import { S3AccessType, S3UserInputs } from '../service-walkthrough-types/s3-user-input-types'; 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 0a3d8b6632a..bf69c0d7e42 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 @@ -1,5 +1,5 @@ import { ensureEnvParamManager } from '@aws-amplify/amplify-environment-parameters'; -import { $TSAny, $TSContext, AmplifyCategories, AmplifyError, ServiceSelection, stateManager } from 'amplify-cli-core'; +import { $TSAny, $TSContext, AmplifyCategories, AmplifyError, ServiceSelection, stateManager } from '@aws-amplify/amplify-cli-core'; import { printer } from '@aws-amplify/amplify-prompts'; import { IDynamoDBService } from '@aws-amplify/amplify-util-import'; import Enquirer from 'enquirer'; 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 91ac7e300b4..ca15b8d9f62 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 @@ -7,7 +7,7 @@ import { ResourceAlreadyExistsError, ServiceSelection, stateManager, -} from 'amplify-cli-core'; +} from '@aws-amplify/amplify-cli-core'; import { printer } from '@aws-amplify/amplify-prompts'; import { IS3Service } from '@aws-amplify/amplify-util-import'; import { Bucket } from 'aws-sdk/clients/s3'; diff --git a/packages/amplify-category-storage/src/provider-utils/awscloudformation/import/index.ts b/packages/amplify-category-storage/src/provider-utils/awscloudformation/import/index.ts index 9238333fc20..84f16b83afa 100644 --- a/packages/amplify-category-storage/src/provider-utils/awscloudformation/import/index.ts +++ b/packages/amplify-category-storage/src/provider-utils/awscloudformation/import/index.ts @@ -1,4 +1,4 @@ -import { $TSContext, ServiceSelection } from 'amplify-cli-core'; +import { $TSContext, ServiceSelection } from '@aws-amplify/amplify-cli-core'; import { importS3 } from './import-s3'; import { importDynamoDB } from './import-dynamodb'; diff --git a/packages/amplify-category-storage/src/provider-utils/awscloudformation/import/types.ts b/packages/amplify-category-storage/src/provider-utils/awscloudformation/import/types.ts index a36f894d828..958d9a86a7e 100644 --- a/packages/amplify-category-storage/src/provider-utils/awscloudformation/import/types.ts +++ b/packages/amplify-category-storage/src/provider-utils/awscloudformation/import/types.ts @@ -1,4 +1,4 @@ -import { $TSContext, $TSObject } from 'amplify-cli-core'; +import { $TSContext, $TSObject } from '@aws-amplify/amplify-cli-core'; import { IDynamoDBService, IS3Service } from '@aws-amplify/amplify-util-import'; import { Bucket } from 'aws-sdk/clients/s3'; import { TableDescription } from 'aws-sdk/clients/dynamodb'; 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 dc4f68e11ed..d486f2859db 100644 --- a/packages/amplify-category-storage/src/provider-utils/awscloudformation/index.ts +++ b/packages/amplify-category-storage/src/provider-utils/awscloudformation/index.ts @@ -9,7 +9,7 @@ import { NotImplementedError, open, stateManager, -} from 'amplify-cli-core'; +} from '@aws-amplify/amplify-cli-core'; import { printer, prompter } from '@aws-amplify/amplify-prompts'; import _ from 'lodash'; import { categoryName } from '../../constants'; diff --git a/packages/amplify-category-storage/src/provider-utils/awscloudformation/s3-headless-adapter.ts b/packages/amplify-category-storage/src/provider-utils/awscloudformation/s3-headless-adapter.ts index 952dc797f4a..925465b9c40 100644 --- a/packages/amplify-category-storage/src/provider-utils/awscloudformation/s3-headless-adapter.ts +++ b/packages/amplify-category-storage/src/provider-utils/awscloudformation/s3-headless-adapter.ts @@ -1,4 +1,4 @@ -import { $TSContext, AmplifyCategories } from 'amplify-cli-core'; +import { $TSContext, AmplifyCategories } from '@aws-amplify/amplify-cli-core'; import { AddS3ServiceConfiguration, AddStorageRequest, diff --git a/packages/amplify-category-storage/src/provider-utils/awscloudformation/s3-trigger-helpers.ts b/packages/amplify-category-storage/src/provider-utils/awscloudformation/s3-trigger-helpers.ts index b75a02b0d31..56917d829e8 100644 --- a/packages/amplify-category-storage/src/provider-utils/awscloudformation/s3-trigger-helpers.ts +++ b/packages/amplify-category-storage/src/provider-utils/awscloudformation/s3-trigger-helpers.ts @@ -1,4 +1,4 @@ -import { $TSAny, $TSContext, $TSObject, pathManager, readCFNTemplate, stateManager, writeCFNTemplate } from 'amplify-cli-core'; +import { $TSAny, $TSContext, $TSObject, pathManager, readCFNTemplate, stateManager, writeCFNTemplate } from '@aws-amplify/amplify-cli-core'; import { printer, prompter } from '@aws-amplify/amplify-prompts'; import * as path from 'path'; import { v4 as uuid } from 'uuid'; diff --git a/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/dynamoDB-input-state.ts b/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/dynamoDB-input-state.ts index 608ca8b2f24..c12755bea11 100644 --- a/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/dynamoDB-input-state.ts +++ b/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/dynamoDB-input-state.ts @@ -7,7 +7,7 @@ import { CLIInputSchemaValidator, JSONUtilities, pathManager, -} from 'amplify-cli-core'; +} from '@aws-amplify/amplify-cli-core'; import * as fs from 'fs-extra'; import * as path from 'path'; import { getFieldType } from '../cfn-template-utils'; diff --git a/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/dynamoDb-walkthrough.ts b/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/dynamoDb-walkthrough.ts index 535a173e51f..7b7da64325f 100644 --- a/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/dynamoDb-walkthrough.ts +++ b/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/dynamoDb-walkthrough.ts @@ -9,7 +9,7 @@ import { pathManager, ResourceDoesNotExistError, stateManager, -} from 'amplify-cli-core'; +} from '@aws-amplify/amplify-cli-core'; import { alphanumeric, printer, prompter, Validator } from '@aws-amplify/amplify-prompts'; import * as fs from 'fs-extra'; import * as path from 'path'; diff --git a/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/s3-auth-api.ts b/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/s3-auth-api.ts index 0cd42cf737c..cd90ffd0e93 100644 --- a/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/s3-auth-api.ts +++ b/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/s3-auth-api.ts @@ -1,6 +1,6 @@ -import { $TSAny, $TSContext, AmplifyError } from 'amplify-cli-core'; +import { $TSAny, $TSContext, AmplifyError } from '@aws-amplify/amplify-cli-core'; import { printer } from '@aws-amplify/amplify-prompts'; -import { AmplifyCategories } from 'amplify-cli-core'; +import { AmplifyCategories } from '@aws-amplify/amplify-cli-core'; import os from 'os'; /* This file contains all functions interacting with AUTH category */ diff --git a/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/s3-errors.ts b/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/s3-errors.ts index 67a73dfe7d6..de583d60b1f 100644 --- a/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/s3-errors.ts +++ b/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/s3-errors.ts @@ -1,4 +1,4 @@ -import { ResourceDoesNotExistError, ResourceAlreadyExistsError, $TSContext, ConfigurationError } from 'amplify-cli-core'; +import { ResourceDoesNotExistError, ResourceAlreadyExistsError, $TSContext, ConfigurationError } from '@aws-amplify/amplify-cli-core'; import { printer } from '@aws-amplify/amplify-prompts'; diff --git a/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/s3-questions.ts b/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/s3-questions.ts index 8acf5f7bc66..09f0123c3ab 100644 --- a/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/s3-questions.ts +++ b/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/s3-questions.ts @@ -1,4 +1,4 @@ -import { $TSAny, $TSContext, exitOnNextTick } from 'amplify-cli-core'; +import { $TSAny, $TSContext, exitOnNextTick } from '@aws-amplify/amplify-cli-core'; import { matchRegex, alphanumeric, and, maxLength, minLength, printer, prompter } from '@aws-amplify/amplify-prompts'; import { getRoleAccessDefaultValues, diff --git a/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/s3-resource-api.ts b/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/s3-resource-api.ts index 327e4ab5f0e..9e079e8a254 100644 --- a/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/s3-resource-api.ts +++ b/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/s3-resource-api.ts @@ -1,4 +1,4 @@ -import { $TSContext, AmplifyCategories, AmplifySupportedService, CLISubCommandType, stateManager } from 'amplify-cli-core'; +import { $TSContext, AmplifyCategories, AmplifySupportedService, CLISubCommandType, stateManager } from '@aws-amplify/amplify-cli-core'; import { AmplifyS3ResourceStackTransform } from '../cdk-stack-builder/s3-stack-transform'; import { S3UserInputs, S3UserInputTriggerFunctionParams } from '../service-walkthrough-types/s3-user-input-types'; import { S3InputState } from './s3-user-input-state'; diff --git a/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/s3-user-input-state.ts b/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/s3-user-input-state.ts index 58217780cdc..985a5209760 100644 --- a/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/s3-user-input-state.ts +++ b/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/s3-user-input-state.ts @@ -9,7 +9,7 @@ import { exitOnNextTick, JSONUtilities, pathManager, -} from 'amplify-cli-core'; +} from '@aws-amplify/amplify-cli-core'; import { printer } from '@aws-amplify/amplify-prompts'; import * as fs from 'fs-extra'; import * as path from 'path'; diff --git a/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/s3-walkthrough.ts b/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/s3-walkthrough.ts index 52028fa43c6..e16d076124c 100644 --- a/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/s3-walkthrough.ts +++ b/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/s3-walkthrough.ts @@ -10,7 +10,7 @@ import { getMigrateResourceMessageForOverride, pathManager, stateManager, -} from 'amplify-cli-core'; +} from '@aws-amplify/amplify-cli-core'; import { printer, prompter } from '@aws-amplify/amplify-prompts'; import * as fs from 'fs-extra'; import * as path from 'path'; diff --git a/packages/amplify-category-storage/src/provider-utils/awscloudformation/storage-configuration-helpers.ts b/packages/amplify-category-storage/src/provider-utils/awscloudformation/storage-configuration-helpers.ts index 8bd39aa83be..971df05dbc4 100644 --- a/packages/amplify-category-storage/src/provider-utils/awscloudformation/storage-configuration-helpers.ts +++ b/packages/amplify-category-storage/src/provider-utils/awscloudformation/storage-configuration-helpers.ts @@ -6,7 +6,7 @@ import { ResourceAlreadyExistsError, ResourceDoesNotExistError, stateManager, -} from 'amplify-cli-core'; +} from '@aws-amplify/amplify-cli-core'; import { AddStorageRequest, ImportStorageRequest, RemoveStorageRequest, UpdateStorageRequest } from 'amplify-headless-interface'; import { printer } from '@aws-amplify/amplify-prompts'; import { v4 as uuid } from 'uuid'; diff --git a/packages/amplify-cli-core-vNext/API.md b/packages/amplify-cli-core-vNext/API.md deleted file mode 100644 index f10f30255d9..00000000000 --- a/packages/amplify-cli-core-vNext/API.md +++ /dev/null @@ -1,12 +0,0 @@ -## API Report File for "@aws-amplify/amplify-cli-core" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - - -export * from "amplify-cli-core"; - -// (No @packageDocumentation comment for this package) - -``` diff --git a/packages/amplify-cli-core-vNext/CHANGELOG.md b/packages/amplify-cli-core-vNext/CHANGELOG.md deleted file mode 100644 index f9f94bc6403..00000000000 --- a/packages/amplify-cli-core-vNext/CHANGELOG.md +++ /dev/null @@ -1,16 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [4.0.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-core@4.0.1-rc.e9e0d157d.0...@aws-amplify/amplify-cli-core@4.0.1) (2023-03-23) - -**Note:** Version bump only for package @aws-amplify/amplify-cli-core - - - - - -## 4.0.1-rc.e9e0d157d.0 (2023-03-17) - -**Note:** Version bump only for package @aws-amplify/amplify-cli-core diff --git a/packages/amplify-cli-core-vNext/package.json b/packages/amplify-cli-core-vNext/package.json deleted file mode 100644 index 0020305f5f3..00000000000 --- a/packages/amplify-cli-core-vNext/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "@aws-amplify/amplify-cli-core", - "version": "4.0.1", - "description": "Amplify CLI Core", - "repository": { - "type": "git", - "url": "https://github.com/aws-amplify/amplify-cli.git", - "directory": "packages/amplify-cli-core" - }, - "publishConfig": { - "access": "public" - }, - "author": "Amazon Web Services", - "license": "Apache-2.0", - "main": "lib/index.js", - "types": "lib/index.d.ts", - "keywords": [ - "graphql", - "appsync", - "aws" - ], - "scripts": { - "build": "tsc", - "watch": "tsc -w", - "clean": "rimraf lib tsconfig.tsbuildinfo node_modules", - "extract-api": "ts-node ../../scripts/extract-api.ts" - }, - "dependencies": { - "amplify-cli-core": "4.0.1" - }, - "devDependencies": { - "rimraf": "^3.0.0" - }, - "jest": { - "transform": { - "^.+\\.tsx?$": "ts-jest" - }, - "collectCoverageFrom": [ - "src/**/*.{ts,tsx,js,jsx}", - "!src/__tests__/" - ], - "testRegex": "(src/__tests__/.*.test.ts)$", - "moduleFileExtensions": [ - "ts", - "tsx", - "js", - "jsx", - "json", - "node" - ], - "collectCoverage": true - } -} diff --git a/packages/amplify-cli-core-vNext/src/index.ts b/packages/amplify-cli-core-vNext/src/index.ts deleted file mode 100644 index 5ff205b30c6..00000000000 --- a/packages/amplify-cli-core-vNext/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from 'amplify-cli-core'; diff --git a/packages/amplify-cli-core-vNext/tsconfig.json b/packages/amplify-cli-core-vNext/tsconfig.json deleted file mode 100644 index 43fb5103aee..00000000000 --- a/packages/amplify-cli-core-vNext/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "outDir": "./lib", - "rootDir": "./src", - "useUnknownInCatchVariables": false - } -} diff --git a/packages/amplify-cli-core/API.md b/packages/amplify-cli-core/API.md index 187ccfa58aa..818aae346d3 100644 --- a/packages/amplify-cli-core/API.md +++ b/packages/amplify-cli-core/API.md @@ -1,4 +1,4 @@ -## API Report File for "amplify-cli-core" +## API Report File for "@aws-amplify/amplify-cli-core" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). diff --git a/packages/amplify-cli-core/package.json b/packages/amplify-cli-core/package.json index 0d2516ae6f5..df415871538 100644 --- a/packages/amplify-cli-core/package.json +++ b/packages/amplify-cli-core/package.json @@ -1,5 +1,5 @@ { - "name": "amplify-cli-core", + "name": "@aws-amplify/amplify-cli-core", "version": "4.0.1", "description": "Amplify CLI Core", "repository": { diff --git a/packages/amplify-cli-core/src/__tests__/help.test.ts b/packages/amplify-cli-core/src/__tests__/help.test.ts index a3977418514..e401d6c4680 100644 --- a/packages/amplify-cli-core/src/__tests__/help.test.ts +++ b/packages/amplify-cli-core/src/__tests__/help.test.ts @@ -1,4 +1,12 @@ -import { $TSContext, CommandInfo, runHelp, commandsInfo, lookUpCommand, lookUpSubcommand, parseHelpCommands } from 'amplify-cli-core'; +import { + $TSContext, + CommandInfo, + runHelp, + commandsInfo, + lookUpCommand, + lookUpSubcommand, + parseHelpCommands, +} from '@aws-amplify/amplify-cli-core'; import { printer } from '@aws-amplify/amplify-prompts'; describe('amplify help functions: ', () => { diff --git a/packages/amplify-cli-core/src/banner-message/index.ts b/packages/amplify-cli-core/src/banner-message/index.ts index 43c8ff34592..42a24c40776 100644 --- a/packages/amplify-cli-core/src/banner-message/index.ts +++ b/packages/amplify-cli-core/src/banner-message/index.ts @@ -17,7 +17,7 @@ export type Message = { export const AWS_AMPLIFY_DEFAULT_BANNER_URL = 'https://aws-amplify.github.io/amplify-cli/banner-message.json'; const MAX_SUPPORTED_MESSAGE_CONFIG_VERSION = '1.0.0'; -const logger = getLogger('amplify-cli-core', 'banner-message/index.ts'); +const logger = getLogger('@aws-amplify/amplify-cli-core', 'banner-message/index.ts'); export class BannerMessage { private static instance?: BannerMessage; diff --git a/packages/amplify-cli-core/src/hooks/hooksExecutor.ts b/packages/amplify-cli-core/src/hooks/hooksExecutor.ts index 77da925c1b6..18a17232c85 100644 --- a/packages/amplify-cli-core/src/hooks/hooksExecutor.ts +++ b/packages/amplify-cli-core/src/hooks/hooksExecutor.ts @@ -11,7 +11,7 @@ import { defaultSupportedExt, hookFileSeparator } from './hooksConstants'; import { HooksConfig, HookExtensions, HookFileMeta, HookEvent, DataParameter, ErrorParameter } from './hooksTypes'; import { pathManager, stateManager } from '../state-manager'; -const logger = getLogger('amplify-cli-core', 'hooks/hooksExecutioner.ts'); +const logger = getLogger('@aws-amplify/amplify-cli-core', 'hooks/hooksExecutioner.ts'); /** * runtime for hooks diff --git a/packages/amplify-cli-extensibility-helper/API.md b/packages/amplify-cli-extensibility-helper/API.md index f87414bd0ca..c7ae0d339b2 100644 --- a/packages/amplify-cli-extensibility-helper/API.md +++ b/packages/amplify-cli-extensibility-helper/API.md @@ -4,7 +4,7 @@ ```ts -import { $TSAny } from 'amplify-cli-core'; +import { $TSAny } from '@aws-amplify/amplify-cli-core'; import { addCDKResourceDependency as addResourceDependency } from '@aws-amplify/amplify-category-custom'; import { AmplifyResourceProps } from '@aws-amplify/amplify-category-custom'; import * as apigwCdk from 'aws-cdk-lib/aws-apigateway'; diff --git a/packages/amplify-cli-extensibility-helper/package.json b/packages/amplify-cli-extensibility-helper/package.json index c9a475bd09f..b4282415823 100644 --- a/packages/amplify-cli-extensibility-helper/package.json +++ b/packages/amplify-cli-extensibility-helper/package.json @@ -29,7 +29,7 @@ }, "dependencies": { "@aws-amplify/amplify-category-custom": "3.0.1", - "amplify-cli-core": "4.0.1", + "@aws-amplify/amplify-cli-core": "4.0.1", "aws-cdk-lib": "~2.68.0" }, "jest": { diff --git a/packages/amplify-cli-extensibility-helper/src/helpers/project-info.ts b/packages/amplify-cli-extensibility-helper/src/helpers/project-info.ts index fd9373115c0..8b99c140549 100644 --- a/packages/amplify-cli-extensibility-helper/src/helpers/project-info.ts +++ b/packages/amplify-cli-extensibility-helper/src/helpers/project-info.ts @@ -1,4 +1,4 @@ -import { stateManager } from 'amplify-cli-core'; +import { stateManager } from '@aws-amplify/amplify-cli-core'; import { AmplifyProjectInfo } from '../types'; /** diff --git a/packages/amplify-cli-extensibility-helper/src/types/api/types.ts b/packages/amplify-cli-extensibility-helper/src/types/api/types.ts index 0e0608cb1f2..621aea633b1 100644 --- a/packages/amplify-cli-extensibility-helper/src/types/api/types.ts +++ b/packages/amplify-cli-extensibility-helper/src/types/api/types.ts @@ -1,7 +1,7 @@ import * as cdk from 'aws-cdk-lib'; import * as apigwCdk from 'aws-cdk-lib/aws-apigateway'; import * as iamCdk from 'aws-cdk-lib/aws-iam'; -import { $TSAny } from 'amplify-cli-core'; +import { $TSAny } from '@aws-amplify/amplify-cli-core'; /** * Public API: Amplify CDK types diff --git a/packages/amplify-cli/API.md b/packages/amplify-cli/API.md index c566ce014cd..200897af1f9 100644 --- a/packages/amplify-cli/API.md +++ b/packages/amplify-cli/API.md @@ -6,20 +6,20 @@ /// -import { CommandLineInput } from 'amplify-cli-core/src/types'; -import { CommandLineInput as CommandLineInput_2 } from 'amplify-cli-core'; +import { CommandLineInput } from '@aws-amplify/amplify-cli-core/src/types'; +import { CommandLineInput as CommandLineInput_2 } from '@aws-amplify/amplify-cli-core'; import { IAmplifyLogger } from '@aws-amplify/amplify-cli-logger'; import { ICommandInput } from '@aws-amplify/amplify-cli-shared-interfaces'; import { IFlowData } from '@aws-amplify/amplify-cli-shared-interfaces'; import { IFlowReport } from '@aws-amplify/amplify-cli-shared-interfaces'; -import { InputOptions } from 'amplify-cli-core'; -import { IPluginPlatform } from 'amplify-cli-core'; -import { IUsageData } from 'amplify-cli-core'; -import { IUsageDataPayload } from 'amplify-cli-core'; -import { ProjectSettings } from 'amplify-cli-core'; -import { StartableTimedCodePath } from 'amplify-cli-core'; -import { StoppableTimedCodePath } from 'amplify-cli-core'; -import { TimedCodePath } from 'amplify-cli-core'; +import { InputOptions } from '@aws-amplify/amplify-cli-core'; +import { IPluginPlatform } from '@aws-amplify/amplify-cli-core'; +import { IUsageData } from '@aws-amplify/amplify-cli-core'; +import { IUsageDataPayload } from '@aws-amplify/amplify-cli-core'; +import { ProjectSettings } from '@aws-amplify/amplify-cli-core'; +import { StartableTimedCodePath } from '@aws-amplify/amplify-cli-core'; +import { StoppableTimedCodePath } from '@aws-amplify/amplify-cli-core'; +import { TimedCodePath } from '@aws-amplify/amplify-cli-core'; import { TypeOptionFlowData } from '@aws-amplify/amplify-cli-shared-interfaces'; import { UrlWithStringQuery } from 'url'; diff --git a/packages/amplify-cli/package.json b/packages/amplify-cli/package.json index 8f440d76473..2ad77e884b5 100644 --- a/packages/amplify-cli/package.json +++ b/packages/amplify-cli/package.json @@ -46,6 +46,7 @@ "@aws-amplify/amplify-category-notifications": "2.24.3", "@aws-amplify/amplify-category-predictions": "5.0.3", "@aws-amplify/amplify-category-storage": "5.0.1", + "@aws-amplify/amplify-cli-core": "4.0.1", "@aws-amplify/amplify-cli-logger": "1.3.0", "@aws-amplify/amplify-cli-shared-interfaces": "1.2.0", "@aws-amplify/amplify-console-hosting": "2.5.1", @@ -67,7 +68,6 @@ "@aws-amplify/graphql-auth-transformer": "^2.1.2", "@aws-amplify/graphql-transformer-core": "^1.2.0", "@aws-cdk/cloudformation-diff": "~2.68.0", - "amplify-cli-core": "4.0.1", "amplify-codegen": "^3.4.1", "amplify-dotnet-function-runtime-provider": "1.7.4", "amplify-go-function-runtime-provider": "2.3.14", diff --git a/packages/amplify-cli/src/__tests__/amplify-exception-handler.test.ts b/packages/amplify-cli/src/__tests__/amplify-exception-handler.test.ts index 91782bc6f61..ee47e44a7d1 100644 --- a/packages/amplify-cli/src/__tests__/amplify-exception-handler.test.ts +++ b/packages/amplify-cli/src/__tests__/amplify-exception-handler.test.ts @@ -1,4 +1,4 @@ -import { AmplifyError } from 'amplify-cli-core'; +import { AmplifyError } from '@aws-amplify/amplify-cli-core'; import { printer } from '@aws-amplify/amplify-prompts'; // eslint-disable-line import/no-extraneous-dependencies import { reportError } from '../commands/diagnose'; import { Context } from '../domain/context'; diff --git a/packages/amplify-cli/src/__tests__/attach-backend-steps.test.ts b/packages/amplify-cli/src/__tests__/attach-backend-steps.test.ts index b0f23009861..5ba83f837e1 100644 --- a/packages/amplify-cli/src/__tests__/attach-backend-steps.test.ts +++ b/packages/amplify-cli/src/__tests__/attach-backend-steps.test.ts @@ -1,7 +1,7 @@ import { analyzeProject } from '../attach-backend-steps/a20-analyzeProject'; -import { $TSContext, stateManager } from 'amplify-cli-core'; +import { $TSContext, stateManager } from '@aws-amplify/amplify-cli-core'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); const stateManager_mock = stateManager as jest.Mocked; const contextStub = { diff --git a/packages/amplify-cli/src/__tests__/attach-backend.test.ts b/packages/amplify-cli/src/__tests__/attach-backend.test.ts index 66edc537c3e..2e59459c10f 100644 --- a/packages/amplify-cli/src/__tests__/attach-backend.test.ts +++ b/packages/amplify-cli/src/__tests__/attach-backend.test.ts @@ -1,4 +1,4 @@ -import { $TSContext, stateManager } from 'amplify-cli-core'; +import { $TSContext, stateManager } from '@aws-amplify/amplify-cli-core'; import { attachBackend } from '../attach-backend'; jest.mock('../amplify-service-helper'); @@ -9,7 +9,7 @@ jest.mock('../attach-backend-steps/a40-generateFiles'); jest.mock('../initialize-env'); jest.mock('@aws-amplify/amplify-prompts'); -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('fs-extra'); const stateManagerMock = stateManager as jest.Mocked; diff --git a/packages/amplify-cli/src/__tests__/commands/build.test.ts b/packages/amplify-cli/src/__tests__/commands/build.test.ts index d9e4b2e9e5d..c85a7d784cb 100644 --- a/packages/amplify-cli/src/__tests__/commands/build.test.ts +++ b/packages/amplify-cli/src/__tests__/commands/build.test.ts @@ -1,7 +1,7 @@ import { run } from '../../commands/build'; -import { $TSContext } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('@aws-amplify/amplify-provider-awscloudformation'); jest.mock('@aws-amplify/amplify-category-custom'); diff --git a/packages/amplify-cli/src/__tests__/commands/delete.test.ts b/packages/amplify-cli/src/__tests__/commands/delete.test.ts index 782e45581cc..e8da17e9c63 100644 --- a/packages/amplify-cli/src/__tests__/commands/delete.test.ts +++ b/packages/amplify-cli/src/__tests__/commands/delete.test.ts @@ -3,11 +3,11 @@ // // https://stackoverflow.com/questions/46148169/stubbing-process-exit-with-jest -import { UnknownArgumentError, AmplifyError } from 'amplify-cli-core'; +import { UnknownArgumentError, AmplifyError } from '@aws-amplify/amplify-cli-core'; describe('amplify delete:', () => { const mockExit = jest.fn(); - jest.mock('amplify-cli-core', () => ({ + jest.mock('@aws-amplify/amplify-cli-core', () => ({ exitOnNextTick: mockExit, UnknownArgumentError, AmplifyError, diff --git a/packages/amplify-cli/src/__tests__/commands/diagnose.test.ts b/packages/amplify-cli/src/__tests__/commands/diagnose.test.ts index 02825bed5a7..cf868e02a99 100644 --- a/packages/amplify-cli/src/__tests__/commands/diagnose.test.ts +++ b/packages/amplify-cli/src/__tests__/commands/diagnose.test.ts @@ -1,6 +1,6 @@ import * as fs from 'fs-extra'; import archiver from 'archiver'; -import { pathManager, stateManager } from 'amplify-cli-core'; +import { pathManager, stateManager } from '@aws-amplify/amplify-cli-core'; import { Redactor } from '@aws-amplify/amplify-cli-logger'; import { WriteStream } from 'fs-extra'; import fetch from 'node-fetch'; @@ -10,7 +10,7 @@ import { run } from '../../commands/diagnose'; import { Context } from '../../domain/context'; jest.mock('uuid'); -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('../../commands/helpers/collect-files'); jest.mock('../../commands/helpers/encryption-helpers', () => ({ createHashedIdentifier: jest.fn().mockReturnValue({ diff --git a/packages/amplify-cli/src/__tests__/commands/env.test.ts b/packages/amplify-cli/src/__tests__/commands/env.test.ts index 801726d6196..28d6c9b2fdc 100644 --- a/packages/amplify-cli/src/__tests__/commands/env.test.ts +++ b/packages/amplify-cli/src/__tests__/commands/env.test.ts @@ -1,6 +1,6 @@ -import { $TSContext, AmplifyError } from 'amplify-cli-core'; +import { $TSContext, AmplifyError } from '@aws-amplify/amplify-cli-core'; jest.mock('../../commands/init'); -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); import { run as runEnvCmd } from '../../commands/env'; import { run as runAddEnvCmd } from '../../commands/env/add'; import * as envList from '../../commands/env/list'; diff --git a/packages/amplify-cli/src/__tests__/commands/init.test.ts b/packages/amplify-cli/src/__tests__/commands/init.test.ts index 951ba13b116..9a06c134278 100644 --- a/packages/amplify-cli/src/__tests__/commands/init.test.ts +++ b/packages/amplify-cli/src/__tests__/commands/init.test.ts @@ -1,4 +1,4 @@ -import { $TSContext, getPackageManager, JSONUtilities, LocalEnvInfo, pathManager, stateManager } from 'amplify-cli-core'; +import { $TSContext, getPackageManager, JSONUtilities, LocalEnvInfo, pathManager, stateManager } from '@aws-amplify/amplify-cli-core'; import { execSync } from 'child_process'; import { ensureDir, existsSync, readFileSync, readJSON, readdirSync } from 'fs-extra'; import { sync } from 'which'; @@ -7,7 +7,7 @@ import { analyzeProject } from '../../init-steps/s0-analyzeProject'; import { initFrontend } from '../../init-steps/s1-initFrontend'; import { scaffoldProjectHeadless } from '../../init-steps/s8-scaffoldHeadless'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('child_process'); jest.mock('fs-extra'); jest.mock('which'); @@ -87,7 +87,7 @@ describe('amplify init:', () => { pluginPlatform: {}, } as unknown as $TSContext; - jest.mock('amplify-cli-core', () => ({ + jest.mock('@aws-amplify/amplify-cli-core', () => ({ exitOnNextTick: jest.fn(), JSONUtilities: { readJSON: mockReadJson, diff --git a/packages/amplify-cli/src/__tests__/commands/push.test.ts b/packages/amplify-cli/src/__tests__/commands/push.test.ts index 5e064a9ef33..563843ed4d5 100644 --- a/packages/amplify-cli/src/__tests__/commands/push.test.ts +++ b/packages/amplify-cli/src/__tests__/commands/push.test.ts @@ -1,4 +1,4 @@ -import { $TSContext } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/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'; diff --git a/packages/amplify-cli/src/__tests__/commands/status.test.ts b/packages/amplify-cli/src/__tests__/commands/status.test.ts index ebe769edcff..427f5221942 100644 --- a/packages/amplify-cli/src/__tests__/commands/status.test.ts +++ b/packages/amplify-cli/src/__tests__/commands/status.test.ts @@ -1,8 +1,8 @@ -import { stateManager, pathManager } from 'amplify-cli-core'; +import { stateManager, pathManager } from '@aws-amplify/amplify-cli-core'; import { readProjectSchema } from 'graphql-transformer-core'; jest.mock('@aws-amplify/amplify-category-hosting'); -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('graphql-transformer-core', () => ({ readProjectSchema: jest.fn(async (__: string) => ''), })); diff --git a/packages/amplify-cli/src/__tests__/commands/uninstall.pkg.test.ts b/packages/amplify-cli/src/__tests__/commands/uninstall.pkg.test.ts index e9fd112d3c2..461eff4fd04 100644 --- a/packages/amplify-cli/src/__tests__/commands/uninstall.pkg.test.ts +++ b/packages/amplify-cli/src/__tests__/commands/uninstall.pkg.test.ts @@ -1,4 +1,4 @@ -import { $TSContext } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; import { run } from '../../commands/uninstall'; import execa from 'execa'; import * as fs from 'fs-extra'; @@ -28,7 +28,7 @@ const context_stub = { jest.mock('hidefile'); const hideSync_mock = hideSync as jest.MockedFunction; -jest.mock('amplify-cli-core', () => ({ +jest.mock('@aws-amplify/amplify-cli-core', () => ({ pathManager: { getHomeDotAmplifyDirPath: jest.fn().mockReturnValue('homedir/.amplify'), }, diff --git a/packages/amplify-cli/src/__tests__/commands/uninstall.test.ts b/packages/amplify-cli/src/__tests__/commands/uninstall.test.ts index 25107abcb8f..ca5a245cfa8 100644 --- a/packages/amplify-cli/src/__tests__/commands/uninstall.test.ts +++ b/packages/amplify-cli/src/__tests__/commands/uninstall.test.ts @@ -1,4 +1,4 @@ -import { $TSContext } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; import { run } from '../../commands/uninstall'; import execa from 'execa'; @@ -18,7 +18,7 @@ const context_stub = { }, }; -jest.mock('amplify-cli-core', () => ({ +jest.mock('@aws-amplify/amplify-cli-core', () => ({ pathManager: { getHomeDotAmplifyDirPath: jest.fn().mockReturnValue('homedir/.amplify'), }, diff --git a/packages/amplify-cli/src/__tests__/commands/upgrade.pkg.test.ts b/packages/amplify-cli/src/__tests__/commands/upgrade.pkg.test.ts index ec890ffc6a2..1380b445fec 100644 --- a/packages/amplify-cli/src/__tests__/commands/upgrade.pkg.test.ts +++ b/packages/amplify-cli/src/__tests__/commands/upgrade.pkg.test.ts @@ -1,8 +1,8 @@ /* eslint-disable jest/no-interpolation-in-snapshots */ import * as fs from 'fs-extra'; import fetch, { Response } from 'node-fetch'; -import { $TSContext } from 'amplify-cli-core'; -import * as core from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; +import * as core from '@aws-amplify/amplify-cli-core'; import * as path from 'path'; import execa from 'execa'; import { run } from '../../commands/upgrade'; @@ -45,7 +45,7 @@ jest.mock('progress'); jest.mock('tar-fs'); -jest.mock('amplify-cli-core', () => ({ +jest.mock('@aws-amplify/amplify-cli-core', () => ({ pathManager: { getHomeDotAmplifyDirPath: jest.fn().mockReturnValue('homedir'), }, diff --git a/packages/amplify-cli/src/__tests__/commands/upgrade.test.ts b/packages/amplify-cli/src/__tests__/commands/upgrade.test.ts index 2cf7135b9ee..f7e569acbb5 100644 --- a/packages/amplify-cli/src/__tests__/commands/upgrade.test.ts +++ b/packages/amplify-cli/src/__tests__/commands/upgrade.test.ts @@ -1,6 +1,6 @@ import execa from 'execa'; import { run } from '../../commands/upgrade'; -import { $TSContext } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; jest.mock('execa'); const execa_mock = execa as jest.Mocked; @@ -12,7 +12,7 @@ const context_stub = { }, }; -jest.mock('amplify-cli-core', () => ({ +jest.mock('@aws-amplify/amplify-cli-core', () => ({ pathManager: { getHomeDotAmplifyDirPath: jest.fn().mockReturnValue('homedir'), }, diff --git a/packages/amplify-cli/src/__tests__/context-manager.test.ts b/packages/amplify-cli/src/__tests__/context-manager.test.ts index 38af730d013..0c64871fc7f 100644 --- a/packages/amplify-cli/src/__tests__/context-manager.test.ts +++ b/packages/amplify-cli/src/__tests__/context-manager.test.ts @@ -1,4 +1,4 @@ -import { PluginPlatform, stateManager, PluginInfo, PluginManifest } from 'amplify-cli-core'; +import { PluginPlatform, stateManager, PluginInfo, PluginManifest } from '@aws-amplify/amplify-cli-core'; import { CLIInput as CommandLineInput } from '../domain/command-input'; import * as appConfig from '../app-config'; import { constructContext, attachUsageData } from '../context-manager'; diff --git a/packages/amplify-cli/src/__tests__/execution-manager.test.ts b/packages/amplify-cli/src/__tests__/execution-manager.test.ts index b182a3e2c38..d338ca9c4b6 100644 --- a/packages/amplify-cli/src/__tests__/execution-manager.test.ts +++ b/packages/amplify-cli/src/__tests__/execution-manager.test.ts @@ -1,9 +1,9 @@ import * as fs from 'fs-extra'; import path from 'path'; -import { AmplifyEvent, PluginManifest, PluginPlatform } from 'amplify-cli-core'; +import { AmplifyEvent, PluginManifest, PluginPlatform } from '@aws-amplify/amplify-cli-core'; import { CLIInput as CommandLineInput } from '../domain/command-input'; import { Context } from '../domain/context'; -import { PluginInfo } from 'amplify-cli-core'; +import { PluginInfo } from '@aws-amplify/amplify-cli-core'; import { executeCommand } from '../execution-manager'; const handleAmplifyEventMock = jest.fn(); diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/auth-notifications.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/auth-notifications.test.ts index fc34616560e..5900fdd240e 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/auth-notifications.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/auth-notifications.test.ts @@ -1,9 +1,9 @@ import { collectDirectivesByType } from 'graphql-transformer-core'; import { displayAuthNotification, hasFieldAuthDirectives } from '../../../extensions/amplify-helpers/auth-notifications'; import { parse } from 'graphql'; -import { FeatureFlags } from 'amplify-cli-core'; +import { FeatureFlags } from '@aws-amplify/amplify-cli-core'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); const FeatureFlags_mock = FeatureFlags as jest.Mocked; FeatureFlags_mock.getNumber.mockReturnValue(2); diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/auto-updates.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/auto-updates.test.ts index 25949ed13ca..e2724fd1140 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/auto-updates.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/auto-updates.test.ts @@ -14,8 +14,8 @@ const fsMock = fs as jest.Mocked; fsMock.existsSync.mockReturnValue(true); jest.mock('@aws-amplify/amplify-prompts'); -jest.mock('amplify-cli-core', () => { - const { stateManager } = jest.requireActual('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core', () => { + const { stateManager } = jest.requireActual('@aws-amplify/amplify-cli-core'); return { JSONUtilities: { diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/construct-exeInfo.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/construct-exeInfo.test.ts index 47fbffcccc6..e951d75dbd8 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/construct-exeInfo.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/construct-exeInfo.test.ts @@ -1,4 +1,4 @@ -import { $TSContext } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; import { constructExeInfo } from '../../../extensions/amplify-helpers/construct-exeInfo'; let context_stub = {} as $TSContext; diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/copy-batch.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/copy-batch.test.ts index 6d3d07f9ffa..15e7b8cf452 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/copy-batch.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/copy-batch.test.ts @@ -1,9 +1,9 @@ import { copyBatch } from '../../../extensions/amplify-helpers/copy-batch'; -import { JSONUtilities, $TSContext, $TSCopyJob } from 'amplify-cli-core'; +import { JSONUtilities, $TSContext, $TSCopyJob } from '@aws-amplify/amplify-cli-core'; let exists = false; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); const context_stub = { prompt: { diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/delete-project.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/delete-project.test.ts index 35da18762bf..a84eff15f88 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/delete-project.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/delete-project.test.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-var-requires */ /* eslint-disable @typescript-eslint/no-empty-function */ -import { $TSAny } from 'amplify-cli-core'; +import { $TSAny } from '@aws-amplify/amplify-cli-core'; import { printer, prompter } from '@aws-amplify/amplify-prompts'; import { deleteProject, getConfirmation } from '../../../extensions/amplify-helpers/delete-project'; @@ -20,8 +20,8 @@ jest.mock('../../../extensions/amplify-helpers/get-frontend-plugins', () => ({ jest.mock('../../../../__mocks__/faked-plugin', () => ({ deleteConfig: jest.fn(), })); -jest.mock('amplify-cli-core', () => ({ - ...(jest.requireActual('amplify-cli-core') as $TSAny), +jest.mock('@aws-amplify/amplify-cli-core', () => ({ + ...(jest.requireActual('@aws-amplify/amplify-cli-core') as $TSAny), FeatureFlags: { isInitialized: jest.fn().mockReturnValue(true), removeFeatureFlagConfiguration: jest.fn().mockResolvedValue(true), diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/editor-selection.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/editor-selection.test.ts index 0dd49a32985..63799fca0ef 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/editor-selection.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/editor-selection.test.ts @@ -6,7 +6,7 @@ jest.mock('inquirer', () => ({ }, })); -jest.mock('amplify-cli-core', () => ({ +jest.mock('@aws-amplify/amplify-cli-core', () => ({ JSONUtilities: { readJson: jest.fn(), writeJson: jest.fn(), diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/ensure-amplify-meta-frontend-config.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/ensure-amplify-meta-frontend-config.test.ts index 7f37e3453b4..6ae760cea9f 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/ensure-amplify-meta-frontend-config.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/ensure-amplify-meta-frontend-config.test.ts @@ -1,7 +1,7 @@ -import { stateManager } from 'amplify-cli-core'; +import { stateManager } from '@aws-amplify/amplify-cli-core'; import { ensureAmplifyMetaFrontendConfig } from '../../../extensions/amplify-helpers/on-category-outputs-change'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); const stateManager_mock = stateManager as jest.Mocked; stateManager_mock.getMeta.mockReturnValue({ auth: { authResource: { service: 'Cognito' } } }); diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/envResourceParams.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/envResourceParams.test.ts index 7758dea3365..a78ba76ec0e 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/envResourceParams.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/envResourceParams.test.ts @@ -1,5 +1,5 @@ import * as fs from 'fs-extra'; -import { pathManager, stateManager, DeploymentSecrets, removeFromDeploymentSecrets, $TSContext } from 'amplify-cli-core'; +import { pathManager, stateManager, DeploymentSecrets, removeFromDeploymentSecrets, $TSContext } from '@aws-amplify/amplify-cli-core'; import { getEnvInfo } from '../../../extensions/amplify-helpers/get-env-info'; import { saveEnvResourceParameters, @@ -9,7 +9,7 @@ import { } from '../../../extensions/amplify-helpers/envResourceParams'; jest.mock('fs-extra'); -jest.mock('amplify-cli-core', () => ({ +jest.mock('@aws-amplify/amplify-cli-core', () => ({ pathManager: { getTeamProviderInfoFilePath: jest.fn() }, stateManager: { getTeamProviderInfo: jest.fn(), diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/execute-provider-utils.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/execute-provider-utils.test.ts index 9cc19450fbc..c2db5c58a21 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/execute-provider-utils.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/execute-provider-utils.test.ts @@ -1,4 +1,4 @@ -import { $TSContext } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; import { executeProviderUtils } from '../../../extensions/amplify-helpers/execute-provider-utils'; jest.mock('../../../extensions/amplify-helpers/get-provider-plugins.ts', () => ({ diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-all-category-pluginInfos.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-all-category-pluginInfos.test.ts index 57182323f27..cfd2e562e33 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-all-category-pluginInfos.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-all-category-pluginInfos.test.ts @@ -1,6 +1,6 @@ import { constructContext } from '../../../context-manager'; -import { PluginCollection } from 'amplify-cli-core'; +import { PluginCollection } from '@aws-amplify/amplify-cli-core'; import { constructMockPluginPlatform } from './mock-plugin-platform'; import { CLIInput as CommandLineInput } from '../../../domain/command-input'; diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-all-envs.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-all-envs.test.ts index 08455016a27..f12febb5add 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-all-envs.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-all-envs.test.ts @@ -1,6 +1,6 @@ import { getAllEnvs } from '../../../extensions/amplify-helpers/get-all-envs'; -jest.mock('amplify-cli-core', () => ({ +jest.mock('@aws-amplify/amplify-cli-core', () => ({ stateManager: { getLocalAWSInfo: jest.fn().mockReturnValue({ production: 'test', develop: 'test', staging: 'test' }), }, diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-category-pluginInfo.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-category-pluginInfo.test.ts index 0933a51678c..e38765dc028 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-category-pluginInfo.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-category-pluginInfo.test.ts @@ -2,7 +2,7 @@ import { CLIInput as CommandLineInput } from '../../../domain/command-input'; import { constructMockPluginPlatform } from './mock-plugin-platform'; import { constructContext } from '../../../context-manager'; import { getCategoryPluginInfo } from '../../../extensions/amplify-helpers/get-category-pluginInfo'; -import { $TSContext } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; test('getCategoryPluginInfo returns the first pluginInfo to match category', () => { const mockPluginPlatform = constructMockPluginPlatform(); diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-cloud-init-status.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-cloud-init-status.test.ts index a42c27ab430..8dd1aea52a0 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-cloud-init-status.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-cloud-init-status.test.ts @@ -7,7 +7,7 @@ import { } from '../../../extensions/amplify-helpers/get-cloud-init-status'; jest.mock('fs-extra'); -jest.mock('amplify-cli-core', () => ({ +jest.mock('@aws-amplify/amplify-cli-core', () => ({ pathManager: { getAmplifyMetaFilePath: jest.fn().mockReturnValue('/home/user/project/amplify/backend/amplify-meta.json'), getBackendConfigFilePath: jest.fn().mockReturnValue('/home/user/project/amplify/backend/backend-config.json'), diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-env-details.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-env-details.test.ts index 5261985e3f5..b29a6f5fd25 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-env-details.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-env-details.test.ts @@ -1,5 +1,5 @@ import { getEnvDetails } from '../../../extensions/amplify-helpers/get-env-details'; -jest.mock('amplify-cli-core', () => ({ +jest.mock('@aws-amplify/amplify-cli-core', () => ({ stateManager: { getTeamProviderInfo: jest.fn().mockReturnValue({ production: 'test_production', develop: 'test_develop', staging: 'test_staging' }), }, diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-env-info.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-env-info.test.ts index 82416180d2e..aa805de1765 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-env-info.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-env-info.test.ts @@ -1,7 +1,7 @@ -import { stateManager } from 'amplify-cli-core'; +import { stateManager } from '@aws-amplify/amplify-cli-core'; import { getEnvInfo } from '../../../extensions/amplify-helpers/get-env-info'; -jest.mock('amplify-cli-core', () => ({ +jest.mock('@aws-amplify/amplify-cli-core', () => ({ stateManager: { getLocalEnvInfo: jest.fn(), localEnvInfoExists: jest.fn(), diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-plugin-instance.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-plugin-instance.test.ts index 2684eb68917..f8efd5ed2e2 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-plugin-instance.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-plugin-instance.test.ts @@ -1,4 +1,4 @@ -import { $TSContext } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; import * as path from 'path'; import { getPluginInstance } from '../../../extensions/amplify-helpers/get-plugin-instance'; diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-project-details.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-project-details.test.ts index 1e8b70cb5c3..c7551956e3a 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-project-details.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-project-details.test.ts @@ -1,4 +1,4 @@ -import { stateManager } from 'amplify-cli-core'; +import { stateManager } from '@aws-amplify/amplify-cli-core'; import { getProjectDetails } from '../../../extensions/amplify-helpers/get-project-details'; const stateManagerMock = stateManager as jest.Mocked; @@ -7,7 +7,7 @@ jest.mock('../../../extensions/amplify-helpers/get-env-info', () => ({ getEnvInfo: jest.fn().mockReturnValue({ envName: 'test' }), })); -jest.mock('amplify-cli-core', () => ({ +jest.mock('@aws-amplify/amplify-cli-core', () => ({ stateManager: { getLocalEnvInfo: jest.fn(), getProjectConfig: jest.fn(), diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-project-meta.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-project-meta.test.ts index 6bcb1fb1b14..f696d7c09f1 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-project-meta.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-project-meta.test.ts @@ -1,8 +1,8 @@ -import { stateManager } from 'amplify-cli-core'; +import { stateManager } from '@aws-amplify/amplify-cli-core'; import { getProjectMeta } from '../../../extensions/amplify-helpers/get-project-meta'; -jest.mock('amplify-cli-core', () => { - const original = jest.requireActual('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core', () => { + const original = jest.requireActual('@aws-amplify/amplify-cli-core'); return { ...original, stateManager: { diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-provider-plugins.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-provider-plugins.test.ts index a9f5fb946d1..067a6232421 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-provider-plugins.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-provider-plugins.test.ts @@ -1,11 +1,11 @@ -import { $TSContext, stateManager } from 'amplify-cli-core'; +import { $TSContext, stateManager } from '@aws-amplify/amplify-cli-core'; import { getProviderPlugins, getConfiguredProviders, executeProviderCommand, } from '../../../extensions/amplify-helpers/get-provider-plugins'; -jest.mock('amplify-cli-core', () => ({ +jest.mock('@aws-amplify/amplify-cli-core', () => ({ stateManager: { getProjectConfig: jest.fn(), }, diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-userpoolgroup-list.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-userpoolgroup-list.test.ts index f6c63a37627..b0a214c3fe8 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-userpoolgroup-list.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/get-userpoolgroup-list.test.ts @@ -1,6 +1,6 @@ import { getUserPoolGroupList } from '../../../extensions/amplify-helpers/get-userpoolgroup-list'; -jest.mock('amplify-cli-core', () => ({ +jest.mock('@aws-amplify/amplify-cli-core', () => ({ pathManager: { getBackendDirPath: jest.fn().mockImplementation(() => ''), }, diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/mock-plugin-platform.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/mock-plugin-platform.ts index 44517c507eb..02bfce78e7a 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/mock-plugin-platform.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/mock-plugin-platform.ts @@ -1,4 +1,4 @@ -import { PluginInfo, PluginPlatform } from 'amplify-cli-core'; +import { PluginInfo, PluginPlatform } from '@aws-amplify/amplify-cli-core'; export function constructMockPluginPlatform(): PluginPlatform { const mockPluginPlatform = new PluginPlatform(); diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/remove-env-from-cloud.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/remove-env-from-cloud.test.ts index 3c4167f0405..e5db87b03d4 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/remove-env-from-cloud.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/remove-env-from-cloud.test.ts @@ -1,5 +1,5 @@ import * as path from 'path'; -import { AmplifyError } from 'amplify-cli-core'; +import { AmplifyError } from '@aws-amplify/amplify-cli-core'; import { removeEnvFromCloud } from '../../../extensions/amplify-helpers/remove-env-from-cloud'; import { getAllCategoryPluginInfo } from '../../../extensions/amplify-helpers/get-all-category-pluginInfos'; diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/remove-resource.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/remove-resource.test.ts index ff1eab81564..cfd47c40b0d 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/remove-resource.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/remove-resource.test.ts @@ -1,4 +1,4 @@ -import { stateManager, exitOnNextTick, ResourceDoesNotExistError } from 'amplify-cli-core'; +import { stateManager, exitOnNextTick, ResourceDoesNotExistError } from '@aws-amplify/amplify-cli-core'; import { printer } from '@aws-amplify/amplify-prompts'; import * as inquirer from 'inquirer'; import * as path from 'path'; @@ -13,8 +13,8 @@ jest.mock('inquirer', () => ({ prompt: jest.fn().mockResolvedValue({ resource: 'lambda1' }), })); -jest.mock('amplify-cli-core', () => ({ - ...(jest.requireActual('amplify-cli-core') as {}), +jest.mock('@aws-amplify/amplify-cli-core', () => ({ + ...(jest.requireActual('@aws-amplify/amplify-cli-core') as {}), stateManager: { getCurrentMeta: jest.fn(), getMeta: jest.fn(), diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/resource-status-diff.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/resource-status-diff.test.ts index 16ccf391b3b..640bad9c82f 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/resource-status-diff.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/resource-status-diff.test.ts @@ -1,7 +1,7 @@ import glob from 'glob'; import path from 'path'; import * as fs from 'fs-extra'; -import { stateManager, pathManager } from 'amplify-cli-core'; +import { stateManager, pathManager } from '@aws-amplify/amplify-cli-core'; import { CLOUD_INITIALIZED } from '../../../extensions/amplify-helpers/get-cloud-init-status'; import { capitalize, globCFNFilePath, ResourceDiff, stackMutationType } from '../../../extensions/amplify-helpers/resource-status-diff'; import { cronJobSetting } from '../../../../../amplify-category-function/lib/provider-utils/awscloudformation/utils/constants'; @@ -31,8 +31,8 @@ jest.mock('fs-extra', () => ({ statSync: jest.fn().mockReturnValue({ isFile: () => true } as fs.Stats), })); -jest.mock('amplify-cli-core', () => ({ - ...(jest.requireActual('amplify-cli-core') as {}), +jest.mock('@aws-amplify/amplify-cli-core', () => ({ + ...(jest.requireActual('@aws-amplify/amplify-cli-core') as {}), FeatureFlags: { getBoolean: jest.fn(), getNumber: jest.fn(), @@ -54,7 +54,7 @@ const mockGraphQLAPIMeta = { // helper to mock common dependencies const setMockTestCommonDependencies = () => { - jest.mock('amplify-cli-core'); + jest.mock('@aws-amplify/amplify-cli-core'); const pathManagerMock = pathManager as jest.Mocked; pathManagerMock.getBackendDirPath = jest.fn().mockImplementation(() => localBackendDirPathStub); pathManagerMock.getCurrentCloudBackendDirPath = jest.fn().mockImplementation(() => currentBackendDirPathStub); @@ -67,7 +67,7 @@ const setMockTestCommonDependencies = () => { describe('resource-status-diff helpers', () => { beforeAll(() => { - jest.unmock('amplify-cli-core'); + jest.unmock('@aws-amplify/amplify-cli-core'); }); it('capitalize should capitalize strings', async () => { diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/resource-status.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/resource-status.test.ts index 18ae05118fc..06dae0c4508 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/resource-status.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/resource-status.test.ts @@ -1,5 +1,5 @@ import { hashLayerResource } from '@aws-amplify/amplify-category-function'; -import { AmplifyException, stateManager } from 'amplify-cli-core'; +import { stateManager } from '@aws-amplify/amplify-cli-core'; import { hashElement } from 'folder-hash'; import * as fs from 'fs-extra'; import { @@ -59,8 +59,8 @@ const backendDirPathStub = 'backendDirPath'; const currentBackendDirPathStub = 'currentBackendDirPathStub'; const projectRootPath = 'projectRootPath'; -jest.mock('amplify-cli-core', () => ({ - ...(jest.requireActual('amplify-cli-core') as Record), +jest.mock('@aws-amplify/amplify-cli-core', () => ({ + ...(jest.requireActual('@aws-amplify/amplify-cli-core') as Record), stateManager: { getCurrentMeta: jest.fn(), getMeta: jest.fn(), diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/service-select-prompt.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/service-select-prompt.test.ts index c9ab3ce9e68..0dc9892731a 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/service-select-prompt.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/service-select-prompt.test.ts @@ -1,4 +1,4 @@ -import { stateManager } from 'amplify-cli-core'; +import { stateManager } from '@aws-amplify/amplify-cli-core'; let context = {}; let errorMessages: string[] = []; @@ -8,8 +8,8 @@ describe('serviceSelectPrompt', () => { const mockExit = jest.fn(); const promptMock = jest.fn(); - jest.mock('amplify-cli-core', () => ({ - ...(jest.requireActual('amplify-cli-core') as {}), + jest.mock('@aws-amplify/amplify-cli-core', () => ({ + ...(jest.requireActual('@aws-amplify/amplify-cli-core') as {}), exitOnNextTick: mockExit, })); diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/show-auth-acm.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/show-auth-acm.test.ts index e585e950721..9b1d2bafe60 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/show-auth-acm.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/show-auth-acm.test.ts @@ -1,8 +1,8 @@ import { DEFAULT_GROUP_CLAIM } from '@aws-amplify/graphql-auth-transformer'; import { showACM } from '../../../extensions/amplify-helpers/show-auth-acm'; -jest.mock('amplify-cli-core', () => ({ - ...(jest.requireActual('amplify-cli-core') as {}), +jest.mock('@aws-amplify/amplify-cli-core', () => ({ + ...(jest.requireActual('@aws-amplify/amplify-cli-core') as {}), FeatureFlags: { getBoolean: () => true, }, diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/update-amplify-meta.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/update-amplify-meta.test.ts index 7c4449b3c55..1d3376143b5 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/update-amplify-meta.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/update-amplify-meta.test.ts @@ -1,8 +1,8 @@ -import { stateManager } from 'amplify-cli-core'; +import { stateManager } from '@aws-amplify/amplify-cli-core'; import { BuildType } from '@aws-amplify/amplify-function-plugin-interface'; import { updateamplifyMetaAfterBuild } from '../../../extensions/amplify-helpers/update-amplify-meta'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); const stateManager_mock = stateManager as jest.Mocked; diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/update-backend-config.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/update-backend-config.test.ts index d8e1dd814ce..416421f533d 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/update-backend-config.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/update-backend-config.test.ts @@ -1,11 +1,11 @@ -import { stateManager } from 'amplify-cli-core'; +import { stateManager } from '@aws-amplify/amplify-cli-core'; import { updateBackendConfigAfterResourceAdd, updateBackendConfigAfterResourceUpdate, updateBackendConfigAfterResourceRemove, } from '../../../extensions/amplify-helpers/update-backend-config'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); const stateManager_mock = stateManager as jest.Mocked; diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/update-tracked-files.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/update-tracked-files.test.ts index 7cb1a0f1cb2..e4e8b2b6e99 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/update-tracked-files.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/update-tracked-files.test.ts @@ -8,8 +8,8 @@ const cliInputsFile = '/amplify/backend/auth/cognito/cli-inputs.json'; let cloudBackendExists: boolean; let setInCloudBackendDir: boolean; -jest.mock('amplify-cli-core', () => { - const { stateManager } = jest.requireActual('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core', () => { + const { stateManager } = jest.requireActual('@aws-amplify/amplify-cli-core'); return { JSONUtilities: { diff --git a/packages/amplify-cli/src/__tests__/flow-report.test.ts b/packages/amplify-cli/src/__tests__/flow-report.test.ts index 4ac19f5bf6d..972e822932c 100644 --- a/packages/amplify-cli/src/__tests__/flow-report.test.ts +++ b/packages/amplify-cli/src/__tests__/flow-report.test.ts @@ -1,4 +1,4 @@ -import { stateManager } from 'amplify-cli-core'; +import { stateManager } from '@aws-amplify/amplify-cli-core'; import { AddS3ServiceConfiguration, AddStorageRequest, @@ -33,7 +33,7 @@ describe('Test FlowReport Logging', () => { flowReport.setIsHeadless(true); flowReport.setVersion(mockInputs.version); // Mock the state-manager functions - jest.mock('amplify-cli-core'); + jest.mock('@aws-amplify/amplify-cli-core'); jest.spyOn(stateManager, 'getProjectName').mockReturnValue(mockInputs.projectName); jest.spyOn(stateManager, 'getCurrentEnvName').mockReturnValueOnce(mockInputs.envName); jest.spyOn(stateManager, 'getAppID').mockReturnValue(mockInputs.appID); diff --git a/packages/amplify-cli/src/__tests__/get-tags.test.ts b/packages/amplify-cli/src/__tests__/get-tags.test.ts index a1ae5b0ebc4..13198f065bd 100644 --- a/packages/amplify-cli/src/__tests__/get-tags.test.ts +++ b/packages/amplify-cli/src/__tests__/get-tags.test.ts @@ -1,4 +1,4 @@ -import { HydrateTags } from 'amplify-cli-core'; +import { HydrateTags } from '@aws-amplify/amplify-cli-core'; import { Context } from '../domain/context'; import { getTags } from '../extensions/amplify-helpers/get-tags'; @@ -11,7 +11,7 @@ describe('getTags', () => { envName: 'bar', }, }; - jest.setMock('amplify-cli-core', { + jest.setMock('@aws-amplify/amplify-cli-core', { pathManager: { findProjectRoot: jest.fn().mockResolvedValue('mockProjectRoot'), }, diff --git a/packages/amplify-cli/src/__tests__/init-steps/s0-analyzeProject.test.ts b/packages/amplify-cli/src/__tests__/init-steps/s0-analyzeProject.test.ts index c401cba371f..8077a908a1b 100644 --- a/packages/amplify-cli/src/__tests__/init-steps/s0-analyzeProject.test.ts +++ b/packages/amplify-cli/src/__tests__/init-steps/s0-analyzeProject.test.ts @@ -1,4 +1,4 @@ -import { $TSContext, stateManager } from 'amplify-cli-core'; +import { $TSContext, stateManager } from '@aws-amplify/amplify-cli-core'; import { analyzeProject } from '../../init-steps/s0-analyzeProject'; import { constructMockPluginPlatform } from '../extensions/amplify-helpers/mock-plugin-platform'; import { CLIInput as CommandLineInput } from '../../domain/command-input'; diff --git a/packages/amplify-cli/src/__tests__/input-validation.test.ts b/packages/amplify-cli/src/__tests__/input-validation.test.ts index 8c280047de3..fdc047680f3 100644 --- a/packages/amplify-cli/src/__tests__/input-validation.test.ts +++ b/packages/amplify-cli/src/__tests__/input-validation.test.ts @@ -1,5 +1,5 @@ import { verifyInput } from '../input-manager'; -import { PluginPlatform } from 'amplify-cli-core'; +import { PluginPlatform } from '@aws-amplify/amplify-cli-core'; import { CLIInput as CommandLineInput } from '../domain/command-input'; describe('input validation tests', () => { diff --git a/packages/amplify-cli/src/__tests__/plugin-helpers/access-plugins-file.test.ts b/packages/amplify-cli/src/__tests__/plugin-helpers/access-plugins-file.test.ts index 2747f70dab9..620b32ca1a9 100644 --- a/packages/amplify-cli/src/__tests__/plugin-helpers/access-plugins-file.test.ts +++ b/packages/amplify-cli/src/__tests__/plugin-helpers/access-plugins-file.test.ts @@ -1,5 +1,5 @@ import { readPluginsJsonFile, writePluginsJsonFile } from '../../plugin-helpers/access-plugins-file'; -import { JSONUtilities, PluginPlatform } from 'amplify-cli-core'; +import { JSONUtilities, PluginPlatform } from '@aws-amplify/amplify-cli-core'; jest.spyOn(JSONUtilities, 'readJson'); jest.spyOn(JSONUtilities, 'writeJson'); diff --git a/packages/amplify-cli/src/__tests__/plugin-helpers/compare-plugins.test.ts b/packages/amplify-cli/src/__tests__/plugin-helpers/compare-plugins.test.ts index edd0996bfcc..b612b03fdb1 100644 --- a/packages/amplify-cli/src/__tests__/plugin-helpers/compare-plugins.test.ts +++ b/packages/amplify-cli/src/__tests__/plugin-helpers/compare-plugins.test.ts @@ -1,5 +1,5 @@ import * as path from 'path'; -import { PluginManifest, PluginInfo } from 'amplify-cli-core'; +import { PluginManifest, PluginInfo } from '@aws-amplify/amplify-cli-core'; import { twoPluginsAreTheSame } from '../../plugin-helpers/compare-plugins'; describe('compare-plugins', () => { diff --git a/packages/amplify-cli/src/__tests__/plugin-helpers/platform-health-check.test.ts b/packages/amplify-cli/src/__tests__/plugin-helpers/platform-health-check.test.ts index 07b873d3b58..058dd27b729 100644 --- a/packages/amplify-cli/src/__tests__/plugin-helpers/platform-health-check.test.ts +++ b/packages/amplify-cli/src/__tests__/plugin-helpers/platform-health-check.test.ts @@ -1,5 +1,5 @@ import { JSONUtilities } from '../../../../amplify-cli-core/lib'; -import { PluginInfo, PluginManifest, PluginPlatform } from 'amplify-cli-core'; +import { PluginInfo, PluginManifest, PluginPlatform } from '@aws-amplify/amplify-cli-core'; import { checkPlatformHealth, getOfficialPlugins } from '../../plugin-helpers/platform-health-check'; jest.mock('chalk', () => ({ diff --git a/packages/amplify-cli/src/__tests__/plugin-helpers/verify-plugin.test.ts b/packages/amplify-cli/src/__tests__/plugin-helpers/verify-plugin.test.ts index 09fa780b40d..2ab1a5c8089 100644 --- a/packages/amplify-cli/src/__tests__/plugin-helpers/verify-plugin.test.ts +++ b/packages/amplify-cli/src/__tests__/plugin-helpers/verify-plugin.test.ts @@ -1,9 +1,9 @@ import { verifyPlugin, validPluginName } from '../../plugin-helpers/verify-plugin'; -import { JSONUtilities } from 'amplify-cli-core'; +import { JSONUtilities } from '@aws-amplify/amplify-cli-core'; import * as fs from 'fs-extra'; import * as path from 'path'; -import { PluginVerificationError, PluginVerificationResult } from 'amplify-cli-core'; -import { PluginManifest, AmplifyEvent } from 'amplify-cli-core'; +import { PluginVerificationError, PluginVerificationResult } from '@aws-amplify/amplify-cli-core'; +import { PluginManifest, AmplifyEvent } from '@aws-amplify/amplify-cli-core'; const corePluginJson = { name: 'core', diff --git a/packages/amplify-cli/src/__tests__/push-notifications.test.ts b/packages/amplify-cli/src/__tests__/push-notifications.test.ts index 515e26a656b..9a075a4affe 100644 --- a/packages/amplify-cli/src/__tests__/push-notifications.test.ts +++ b/packages/amplify-cli/src/__tests__/push-notifications.test.ts @@ -1,11 +1,11 @@ -import { $TSContext, FeatureFlags, pathManager, stateManager } from 'amplify-cli-core'; +import { $TSContext, FeatureFlags, pathManager, stateManager } from '@aws-amplify/amplify-cli-core'; import { notifyFieldAuthSecurityChange, notifyListQuerySecurityChange, notifySecurityEnhancement, } from '../extensions/amplify-helpers/auth-notifications'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); const stateManagerMock = stateManager as jest.Mocked; // eslint-disable-next-line spellcheck/spell-checker diff --git a/packages/amplify-cli/src/__tests__/push-resources.test.ts b/packages/amplify-cli/src/__tests__/push-resources.test.ts index 9ef3ca44b9d..2d446d09881 100644 --- a/packages/amplify-cli/src/__tests__/push-resources.test.ts +++ b/packages/amplify-cli/src/__tests__/push-resources.test.ts @@ -1,9 +1,9 @@ -import { $TSAny, $TSContext } from 'amplify-cli-core'; -import { ManuallyTimedCodePath } from 'amplify-cli-core'; +import { $TSAny, $TSContext } from '@aws-amplify/amplify-cli-core'; +import { ManuallyTimedCodePath } from '@aws-amplify/amplify-cli-core'; import { pushResources } from '../extensions/amplify-helpers/push-resources'; -jest.mock('amplify-cli-core', () => ({ - ...(jest.requireActual('amplify-cli-core') as $TSAny), +jest.mock('@aws-amplify/amplify-cli-core', () => ({ + ...(jest.requireActual('@aws-amplify/amplify-cli-core') as $TSAny), FeatureFlags: { isInitialized: jest.fn().mockReturnValue(true), getNumber: jest.fn().mockResolvedValue(0), diff --git a/packages/amplify-cli/src/__tests__/serializable-error.test.ts b/packages/amplify-cli/src/__tests__/serializable-error.test.ts index 8a6f1d88304..c0955bc8484 100644 --- a/packages/amplify-cli/src/__tests__/serializable-error.test.ts +++ b/packages/amplify-cli/src/__tests__/serializable-error.test.ts @@ -1,4 +1,4 @@ -import { AmplifyError } from 'amplify-cli-core'; +import { AmplifyError } from '@aws-amplify/amplify-cli-core'; import * as os from 'os'; import { SerializableError } from '../domain/amplify-usageData/SerializableError'; diff --git a/packages/amplify-cli/src/__tests__/test-aborting.test.ts b/packages/amplify-cli/src/__tests__/test-aborting.test.ts index 2910dbdee35..cc452d64a87 100644 --- a/packages/amplify-cli/src/__tests__/test-aborting.test.ts +++ b/packages/amplify-cli/src/__tests__/test-aborting.test.ts @@ -10,8 +10,8 @@ describe('test SIGINT with execute', () => { const input = { argv: ['/usr/local/bin/node', '/usr/local/bin/amplify-dev', '-v'], options: { v: true } }; const mockExit = jest.fn(); - jest.setMock('amplify-cli-core', { - ...(jest.requireActual('amplify-cli-core') as Record), + jest.setMock('@aws-amplify/amplify-cli-core', { + ...(jest.requireActual('@aws-amplify/amplify-cli-core') as Record), JSONUtilities: { readJson: jest.fn().mockReturnValue({ name: 'cli', diff --git a/packages/amplify-cli/src/__tests__/usage-data.test.ts b/packages/amplify-cli/src/__tests__/usage-data.test.ts index 9694653687f..885672e911a 100644 --- a/packages/amplify-cli/src/__tests__/usage-data.test.ts +++ b/packages/amplify-cli/src/__tests__/usage-data.test.ts @@ -4,12 +4,12 @@ import * as uuid from 'uuid'; import { UsageData } from '../domain/amplify-usageData/UsageData'; import { getUrl } from '../domain/amplify-usageData/getUsageDataUrl'; -import { AmplifyError } from 'amplify-cli-core'; +import { AmplifyError } from '@aws-amplify/amplify-cli-core'; import { CLIInput as CommandLineInput } from '../domain/command-input'; -import { ManuallyTimedCodePath } from 'amplify-cli-core'; +import { ManuallyTimedCodePath } from '@aws-amplify/amplify-cli-core'; import { UsageDataPayload } from '../domain/amplify-usageData/UsageDataPayload'; import { SerializableError } from '../domain/amplify-usageData/SerializableError'; -import { ProjectSettings } from 'amplify-cli-core/src/types'; +import { ProjectSettings } from '@aws-amplify/amplify-cli-core/src/types'; const baseOriginalUrl = 'https://cli.amplify'; const pathToUrl = '/metrics'; diff --git a/packages/amplify-cli/src/__tests__/utils/verify-expected-env-params.test.ts b/packages/amplify-cli/src/__tests__/utils/verify-expected-env-params.test.ts index f663552ac35..59c7e36e597 100644 --- a/packages/amplify-cli/src/__tests__/utils/verify-expected-env-params.test.ts +++ b/packages/amplify-cli/src/__tests__/utils/verify-expected-env-params.test.ts @@ -2,13 +2,13 @@ import { getChangedResources } from '../../commands/build'; import { prompter } from '@aws-amplify/amplify-prompts'; import { ensureEnvParamManager, IEnvironmentParameterManager } from '@aws-amplify/amplify-environment-parameters'; import { verifyExpectedEnvParams } from '../../utils/verify-expected-env-params'; -import { $TSContext } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; jest.mock('../../commands/build'); jest.mock('@aws-amplify/amplify-prompts'); jest.mock('@aws-amplify/amplify-environment-parameters'); jest.mock('@aws-amplify/amplify-provider-awscloudformation'); -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); const getResourcesMock = getChangedResources as jest.MockedFunction; const ensureEnvParamManagerMock = ensureEnvParamManager as jest.MockedFunction; diff --git a/packages/amplify-cli/src/__tests__/utils/win-utils.test.ts b/packages/amplify-cli/src/__tests__/utils/win-utils.test.ts index 1835254f271..31b0b4cdf4a 100644 --- a/packages/amplify-cli/src/__tests__/utils/win-utils.test.ts +++ b/packages/amplify-cli/src/__tests__/utils/win-utils.test.ts @@ -9,7 +9,7 @@ jest.mock('fs-extra'); const fs_mock = fs as jest.Mocked; fs_mock.existsSync.mockReturnValue(true); -jest.mock('amplify-cli-core', () => ({ +jest.mock('@aws-amplify/amplify-cli-core', () => ({ pathManager: { getHomeDotAmplifyDirPath: jest.fn().mockReturnValue('homedir/.amplify'), }, diff --git a/packages/amplify-cli/src/__tests__/version-manager.test.ts b/packages/amplify-cli/src/__tests__/version-manager.test.ts index 91c18b1aa42..213cb73be35 100644 --- a/packages/amplify-cli/src/__tests__/version-manager.test.ts +++ b/packages/amplify-cli/src/__tests__/version-manager.test.ts @@ -5,7 +5,7 @@ import { UsageData } from '../domain/amplify-usageData'; import { getLatestApiVersion, getLatestPayloadVersion } from '../domain/amplify-usageData/VersionManager'; import { CLIInput as CommandLineInput } from '../domain/command-input'; import { IFlowReport } from '@aws-amplify/amplify-cli-shared-interfaces'; -import { ProjectSettings } from 'amplify-cli-core/src'; +import { ProjectSettings } from '@aws-amplify/amplify-cli-core/src'; describe('test version manager', () => { it('url version should be the latest URL', () => { diff --git a/packages/amplify-cli/src/amplify-exception-handler.ts b/packages/amplify-cli/src/amplify-exception-handler.ts index 09922531b55..7ff118dc00a 100644 --- a/packages/amplify-cli/src/amplify-exception-handler.ts +++ b/packages/amplify-cli/src/amplify-exception-handler.ts @@ -7,7 +7,7 @@ import { HooksMeta, isWindowsPlatform, AmplifyError, -} from 'amplify-cli-core'; +} from '@aws-amplify/amplify-cli-core'; import { getAmplifyLogger } from '@aws-amplify/amplify-cli-logger'; import { AmplifyPrinter, printer } from '@aws-amplify/amplify-prompts'; import { reportError } from './commands/diagnose'; diff --git a/packages/amplify-cli/src/amplify-service-helper.ts b/packages/amplify-cli/src/amplify-service-helper.ts index 9fb35f39f52..3996dc55f96 100644 --- a/packages/amplify-cli/src/amplify-service-helper.ts +++ b/packages/amplify-cli/src/amplify-service-helper.ts @@ -1,4 +1,4 @@ -import { $TSObject, $TSContext, pathManager, stateManager } from 'amplify-cli-core'; +import { $TSObject, $TSContext, pathManager, stateManager } from '@aws-amplify/amplify-cli-core'; import { isDataStoreEnabled } from 'graphql-transformer-core'; import * as path from 'path'; import _ from 'lodash'; diff --git a/packages/amplify-cli/src/app-config/config.ts b/packages/amplify-cli/src/app-config/config.ts index 3025fc8f152..3a5c8fe2c18 100644 --- a/packages/amplify-cli/src/app-config/config.ts +++ b/packages/amplify-cli/src/app-config/config.ts @@ -1,7 +1,7 @@ import * as fs from 'fs-extra'; import { v4 as uuid } from 'uuid'; import _ from 'lodash'; -import { JSONUtilities } from 'amplify-cli-core'; +import { JSONUtilities } from '@aws-amplify/amplify-cli-core'; import { Context } from '../domain/context'; import { getPath } from './getPath'; diff --git a/packages/amplify-cli/src/app-config/debug-config.ts b/packages/amplify-cli/src/app-config/debug-config.ts index 1c3b1004a5e..219b04f28d8 100644 --- a/packages/amplify-cli/src/app-config/debug-config.ts +++ b/packages/amplify-cli/src/app-config/debug-config.ts @@ -1,5 +1,5 @@ import _ from 'lodash'; -import { $TSAny, DebugConfigValueNotSetError, projectNotInitializedError, pathManager, stateManager } from 'amplify-cli-core'; +import { $TSAny, DebugConfigValueNotSetError, projectNotInitializedError, pathManager, stateManager } from '@aws-amplify/amplify-cli-core'; /** * Singleton class to handle debug values diff --git a/packages/amplify-cli/src/attach-backend-steps/a20-analyzeProject.ts b/packages/amplify-cli/src/attach-backend-steps/a20-analyzeProject.ts index 695b942c1e6..c6fcff90c3e 100644 --- a/packages/amplify-cli/src/attach-backend-steps/a20-analyzeProject.ts +++ b/packages/amplify-cli/src/attach-backend-steps/a20-analyzeProject.ts @@ -1,6 +1,6 @@ import { normalizeEditor, editorSelection } from '../extensions/amplify-helpers/editor-selection'; import { amplifyCLIConstants } from '../extensions/amplify-helpers/constants'; -import { $TSContext, stateManager } from 'amplify-cli-core'; +import { $TSContext, stateManager } from '@aws-amplify/amplify-cli-core'; import { normalizeProjectName } from '../extensions/amplify-helpers/project-name-validation'; export async function analyzeProject(context: $TSContext) { diff --git a/packages/amplify-cli/src/attach-backend-steps/a40-generateFiles.ts b/packages/amplify-cli/src/attach-backend-steps/a40-generateFiles.ts index debe5d0c5ec..32a62c974df 100644 --- a/packages/amplify-cli/src/attach-backend-steps/a40-generateFiles.ts +++ b/packages/amplify-cli/src/attach-backend-steps/a40-generateFiles.ts @@ -1,6 +1,6 @@ import * as fs from 'fs-extra'; import sequential from 'promise-sequential'; -import { pathManager, stateManager, $TSContext, $TSAny } from 'amplify-cli-core'; +import { pathManager, stateManager, $TSContext, $TSAny } from '@aws-amplify/amplify-cli-core'; import { getFrontendPlugins } from '../extensions/amplify-helpers/get-frontend-plugins'; import { getProviderPlugins } from '../extensions/amplify-helpers/get-provider-plugins'; import { insertAmplifyIgnore } from '../extensions/amplify-helpers/git-manager'; diff --git a/packages/amplify-cli/src/attach-backend.ts b/packages/amplify-cli/src/attach-backend.ts index 41c04157467..7b392358759 100644 --- a/packages/amplify-cli/src/attach-backend.ts +++ b/packages/amplify-cli/src/attach-backend.ts @@ -1,4 +1,12 @@ -import { $TSContext, AmplifyError, AmplifyFault, FeatureFlags, LocalEnvInfo, pathManager, stateManager } from 'amplify-cli-core'; +import { + $TSContext, + AmplifyError, + AmplifyFault, + FeatureFlags, + LocalEnvInfo, + pathManager, + stateManager, +} from '@aws-amplify/amplify-cli-core'; import { printer } from '@aws-amplify/amplify-prompts'; import * as fs from 'fs-extra'; import * as path from 'path'; diff --git a/packages/amplify-cli/src/commands/build.ts b/packages/amplify-cli/src/commands/build.ts index c3a12f84182..79e64dd3c4f 100644 --- a/packages/amplify-cli/src/commands/build.ts +++ b/packages/amplify-cli/src/commands/build.ts @@ -1,4 +1,4 @@ -import { $TSContext, IAmplifyResource } from 'amplify-cli-core'; +import { $TSContext, IAmplifyResource } from '@aws-amplify/amplify-cli-core'; import { printer } from '@aws-amplify/amplify-prompts'; import { generateDependentResourcesType } from '@aws-amplify/amplify-category-custom'; /** diff --git a/packages/amplify-cli/src/commands/configure.ts b/packages/amplify-cli/src/commands/configure.ts index dc733fbf55c..0342170b8d9 100644 --- a/packages/amplify-cli/src/commands/configure.ts +++ b/packages/amplify-cli/src/commands/configure.ts @@ -1,4 +1,4 @@ -import { $TSContext } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; import { analyzeProject } from '../config-steps/c0-analyzeProject'; import { configFrontendHandler } from '../config-steps/c1-configFrontend'; import { configProviders } from '../config-steps/c2-configProviders'; diff --git a/packages/amplify-cli/src/commands/console.ts b/packages/amplify-cli/src/commands/console.ts index 25e8b29ff93..2f56d3b0faf 100644 --- a/packages/amplify-cli/src/commands/console.ts +++ b/packages/amplify-cli/src/commands/console.ts @@ -1,4 +1,4 @@ -import { stateManager, open, $TSContext } from 'amplify-cli-core'; +import { stateManager, open, $TSContext } from '@aws-amplify/amplify-cli-core'; import { printer, prompter } from '@aws-amplify/amplify-prompts'; import chalk from 'chalk'; diff --git a/packages/amplify-cli/src/commands/delete.ts b/packages/amplify-cli/src/commands/delete.ts index 022676ede20..399513ab223 100644 --- a/packages/amplify-cli/src/commands/delete.ts +++ b/packages/amplify-cli/src/commands/delete.ts @@ -1,4 +1,4 @@ -import { $TSContext, AmplifyError } from 'amplify-cli-core'; +import { $TSContext, AmplifyError } from '@aws-amplify/amplify-cli-core'; /** * Execute the 'delete' command diff --git a/packages/amplify-cli/src/commands/diagnose.ts b/packages/amplify-cli/src/commands/diagnose.ts index eebe55774df..27ffd2d2828 100644 --- a/packages/amplify-cli/src/commands/diagnose.ts +++ b/packages/amplify-cli/src/commands/diagnose.ts @@ -1,4 +1,4 @@ -import { stateManager, pathManager, spinner, DiagnoseReportUploadError, projectNotInitializedError } from 'amplify-cli-core'; +import { stateManager, pathManager, spinner, DiagnoseReportUploadError, projectNotInitializedError } from '@aws-amplify/amplify-cli-core'; import archiver from 'archiver'; import * as fs from 'fs-extra'; import * as path from 'path'; diff --git a/packages/amplify-cli/src/commands/env/add.ts b/packages/amplify-cli/src/commands/env/add.ts index 849f9e2cd51..774fad57288 100644 --- a/packages/amplify-cli/src/commands/env/add.ts +++ b/packages/amplify-cli/src/commands/env/add.ts @@ -1,4 +1,4 @@ -import { $TSContext, pathManager, AmplifyError } from 'amplify-cli-core'; +import { $TSContext, pathManager, AmplifyError } from '@aws-amplify/amplify-cli-core'; import fs from 'fs-extra'; import { run as init } from '../init'; diff --git a/packages/amplify-cli/src/commands/env/checkout.ts b/packages/amplify-cli/src/commands/env/checkout.ts index d607d7a2369..ee8e0db2ef4 100644 --- a/packages/amplify-cli/src/commands/env/checkout.ts +++ b/packages/amplify-cli/src/commands/env/checkout.ts @@ -2,7 +2,7 @@ /* eslint-disable @typescript-eslint/no-var-requires */ /* eslint-disable import/no-dynamic-require */ import sequential from 'promise-sequential'; -import { $TSAny, $TSContext, AmplifyError, stateManager } from 'amplify-cli-core'; +import { $TSAny, $TSContext, AmplifyError, stateManager } from '@aws-amplify/amplify-cli-core'; import { initializeEnv } from '../../initialize-env'; import { getProviderPlugins } from '../../extensions/amplify-helpers/get-provider-plugins'; import { getEnvInfo } from '../../extensions/amplify-helpers/get-env-info'; diff --git a/packages/amplify-cli/src/commands/env/get.ts b/packages/amplify-cli/src/commands/env/get.ts index 487e40cfe06..ad384b112f6 100644 --- a/packages/amplify-cli/src/commands/env/get.ts +++ b/packages/amplify-cli/src/commands/env/get.ts @@ -1,4 +1,4 @@ -import { JSONUtilities, $TSContext, AmplifyError } from 'amplify-cli-core'; +import { JSONUtilities, $TSContext, AmplifyError } from '@aws-amplify/amplify-cli-core'; import { printer } from '@aws-amplify/amplify-prompts'; import { printEnvInfo } from '../helpers/envUtils'; diff --git a/packages/amplify-cli/src/commands/env/import.ts b/packages/amplify-cli/src/commands/env/import.ts index 315cbf29630..3d403455f30 100644 --- a/packages/amplify-cli/src/commands/env/import.ts +++ b/packages/amplify-cli/src/commands/env/import.ts @@ -1,4 +1,4 @@ -import { $TSContext, JSONUtilities, stateManager, AmplifyError } from 'amplify-cli-core'; +import { $TSContext, JSONUtilities, stateManager, AmplifyError } from '@aws-amplify/amplify-cli-core'; import { printer } from '@aws-amplify/amplify-prompts'; /** diff --git a/packages/amplify-cli/src/commands/env/list.ts b/packages/amplify-cli/src/commands/env/list.ts index aa484703871..904a7404e7d 100644 --- a/packages/amplify-cli/src/commands/env/list.ts +++ b/packages/amplify-cli/src/commands/env/list.ts @@ -1,4 +1,4 @@ -import { JSONUtilities } from 'amplify-cli-core'; +import { JSONUtilities } from '@aws-amplify/amplify-cli-core'; import { printer } from '@aws-amplify/amplify-prompts'; import { printEnvInfo } from '../helpers/envUtils'; diff --git a/packages/amplify-cli/src/commands/env/remove.ts b/packages/amplify-cli/src/commands/env/remove.ts index de4825dd7a6..30c53ded2a4 100644 --- a/packages/amplify-cli/src/commands/env/remove.ts +++ b/packages/amplify-cli/src/commands/env/remove.ts @@ -1,5 +1,5 @@ import ora from 'ora'; -import { FeatureFlags, stateManager, $TSContext, AmplifyError } from 'amplify-cli-core'; +import { FeatureFlags, stateManager, $TSContext, AmplifyError } from '@aws-amplify/amplify-cli-core'; import { printer } from '@aws-amplify/amplify-prompts'; import { getConfirmation } from '../../extensions/amplify-helpers/delete-project'; import { removeEnvFromCloud } from '../../extensions/amplify-helpers/remove-env-from-cloud'; diff --git a/packages/amplify-cli/src/commands/env/update.ts b/packages/amplify-cli/src/commands/env/update.ts index 27b785451d1..cbf25abe0a7 100644 --- a/packages/amplify-cli/src/commands/env/update.ts +++ b/packages/amplify-cli/src/commands/env/update.ts @@ -1,4 +1,4 @@ -import { $TSContext } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; import { executeProviderCommand } from '../../extensions/amplify-helpers/get-provider-plugins'; export const run = async (context: $TSContext) => { diff --git a/packages/amplify-cli/src/commands/export.ts b/packages/amplify-cli/src/commands/export.ts index 4924b8f32e6..f459fcdf3f9 100644 --- a/packages/amplify-cli/src/commands/export.ts +++ b/packages/amplify-cli/src/commands/export.ts @@ -5,7 +5,7 @@ import { UnrecognizedFrontendError, validateExportDirectoryPath, PathConstants, -} from 'amplify-cli-core'; +} from '@aws-amplify/amplify-cli-core'; import { printer } from '@aws-amplify/amplify-prompts'; import chalk from 'chalk'; import { getResourceOutputs } from '../extensions/amplify-helpers/get-resource-outputs'; diff --git a/packages/amplify-cli/src/commands/help.ts b/packages/amplify-cli/src/commands/help.ts index 07b3c1fe3b4..1ccf2df8653 100644 --- a/packages/amplify-cli/src/commands/help.ts +++ b/packages/amplify-cli/src/commands/help.ts @@ -1,5 +1,5 @@ -import { $TSContext } from 'amplify-cli-core'; -import { runHelp, commandsInfo } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; +import { runHelp, commandsInfo } from '@aws-amplify/amplify-cli-core'; /** * displays amplify help menu diff --git a/packages/amplify-cli/src/commands/helpers/collect-files.ts b/packages/amplify-cli/src/commands/helpers/collect-files.ts index 959b6de8a6d..bbdbb52d770 100644 --- a/packages/amplify-cli/src/commands/helpers/collect-files.ts +++ b/packages/amplify-cli/src/commands/helpers/collect-files.ts @@ -1,4 +1,4 @@ -import { pathManager } from 'amplify-cli-core'; +import { pathManager } from '@aws-amplify/amplify-cli-core'; import * as path from 'path'; import * as fs from 'fs-extra'; import * as glob from 'glob'; diff --git a/packages/amplify-cli/src/commands/helpers/projectUtils.ts b/packages/amplify-cli/src/commands/helpers/projectUtils.ts index 61f48c7ee9a..18da240322b 100644 --- a/packages/amplify-cli/src/commands/helpers/projectUtils.ts +++ b/packages/amplify-cli/src/commands/helpers/projectUtils.ts @@ -1,4 +1,4 @@ -import { AmplifyError, pathManager } from 'amplify-cli-core'; +import { AmplifyError, pathManager } from '@aws-amplify/amplify-cli-core'; /** * checks if the current directory is a nested project diff --git a/packages/amplify-cli/src/commands/helpers/reporter-apis.ts b/packages/amplify-cli/src/commands/helpers/reporter-apis.ts index 9dfd117ddcd..17887cfa1f3 100644 --- a/packages/amplify-cli/src/commands/helpers/reporter-apis.ts +++ b/packages/amplify-cli/src/commands/helpers/reporter-apis.ts @@ -1,4 +1,4 @@ -import { DiagnoseReportUploadError } from 'amplify-cli-core'; +import { DiagnoseReportUploadError } from '@aws-amplify/amplify-cli-core'; import fetch from 'node-fetch'; /** diff --git a/packages/amplify-cli/src/commands/init.ts b/packages/amplify-cli/src/commands/init.ts index 408692560be..dc4a50b85d6 100644 --- a/packages/amplify-cli/src/commands/init.ts +++ b/packages/amplify-cli/src/commands/init.ts @@ -1,4 +1,4 @@ -import { $TSContext, LocalEnvInfo } from 'amplify-cli-core'; +import { $TSContext, LocalEnvInfo } from '@aws-amplify/amplify-cli-core'; import { constructInputParams } from '../amplify-service-helper'; import { Context } from '../domain/context'; import { raisePostEnvAddEvent, raisePrePushEvent } from '../execution-manager'; diff --git a/packages/amplify-cli/src/commands/logout.ts b/packages/amplify-cli/src/commands/logout.ts index 506f0960c5d..3b8f41fdcdd 100644 --- a/packages/amplify-cli/src/commands/logout.ts +++ b/packages/amplify-cli/src/commands/logout.ts @@ -1,4 +1,4 @@ -import { stateManager } from 'amplify-cli-core'; +import { stateManager } from '@aws-amplify/amplify-cli-core'; import { printer, prompter } from '@aws-amplify/amplify-prompts'; import { Context } from '../domain/context'; import { CognitoIdentityServiceProvider } from 'aws-sdk'; diff --git a/packages/amplify-cli/src/commands/plugin.ts b/packages/amplify-cli/src/commands/plugin.ts index 5d92742dbaa..ea4a5f1ac5d 100644 --- a/packages/amplify-cli/src/commands/plugin.ts +++ b/packages/amplify-cli/src/commands/plugin.ts @@ -1,5 +1,5 @@ import * as path from 'path'; -import { JSONUtilities, exitOnNextTick } from 'amplify-cli-core'; +import { JSONUtilities, exitOnNextTick } from '@aws-amplify/amplify-cli-core'; import { Context } from '../domain/context'; export const run = async (context: Context) => { diff --git a/packages/amplify-cli/src/commands/plugin/add.ts b/packages/amplify-cli/src/commands/plugin/add.ts index 66af93edd38..2d747ed175b 100644 --- a/packages/amplify-cli/src/commands/plugin/add.ts +++ b/packages/amplify-cli/src/commands/plugin/add.ts @@ -3,7 +3,7 @@ import * as fs from 'fs-extra'; import * as path from 'path'; import * as inquirer from 'inquirer'; import { Context } from '../../domain/context'; -import { PluginInfo, constants } from 'amplify-cli-core'; +import { PluginInfo, constants } from '@aws-amplify/amplify-cli-core'; import { addUserPluginPackage, addExcludedPluginPackage as addFromExcluded, confirmAndScan } from '../../plugin-manager'; import { InquirerOption, EXPAND } from '../../domain/inquirer-helper'; import { AddPluginError } from '../../domain/add-plugin-result'; diff --git a/packages/amplify-cli/src/commands/plugin/configure.ts b/packages/amplify-cli/src/commands/plugin/configure.ts index 80a89fae413..a183579143f 100644 --- a/packages/amplify-cli/src/commands/plugin/configure.ts +++ b/packages/amplify-cli/src/commands/plugin/configure.ts @@ -2,7 +2,7 @@ import * as fs from 'fs-extra'; import * as os from 'os'; import * as inquirer from 'inquirer'; import { Context } from '../../domain/context'; -import { constants, PluginPlatform } from 'amplify-cli-core'; +import { constants, PluginPlatform } from '@aws-amplify/amplify-cli-core'; import { writePluginsJsonFile } from '../../plugin-helpers/access-plugins-file'; import { normalizePluginDirectory } from '../../plugin-helpers/scan-plugin-platform'; import { scan } from '../../plugin-manager'; diff --git a/packages/amplify-cli/src/commands/plugin/help.ts b/packages/amplify-cli/src/commands/plugin/help.ts index d679504b36e..95eeb08ece8 100644 --- a/packages/amplify-cli/src/commands/plugin/help.ts +++ b/packages/amplify-cli/src/commands/plugin/help.ts @@ -1,5 +1,5 @@ -import { $TSContext } from 'amplify-cli-core'; -import { runHelp, commandsInfo } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; +import { runHelp, commandsInfo } from '@aws-amplify/amplify-cli-core'; export const run = (context: $TSContext) => { runHelp(context, commandsInfo); diff --git a/packages/amplify-cli/src/commands/plugin/list.ts b/packages/amplify-cli/src/commands/plugin/list.ts index 12c25f7e16a..a0bb393e265 100644 --- a/packages/amplify-cli/src/commands/plugin/list.ts +++ b/packages/amplify-cli/src/commands/plugin/list.ts @@ -1,6 +1,6 @@ import * as inquirer from 'inquirer'; import { Context } from '../../domain/context'; -import { PluginCollection } from 'amplify-cli-core'; +import { PluginCollection } from '@aws-amplify/amplify-cli-core'; import { displayGeneralInfo, displayPluginCollection, displayPluginInfoArray } from '../../plugin-helpers/display-plugin-platform'; export const run = async (context: Context) => { diff --git a/packages/amplify-cli/src/commands/plugin/new.ts b/packages/amplify-cli/src/commands/plugin/new.ts index 963f6339e3c..504d30cfd2e 100644 --- a/packages/amplify-cli/src/commands/plugin/new.ts +++ b/packages/amplify-cli/src/commands/plugin/new.ts @@ -1,6 +1,6 @@ import * as path from 'path'; import { Context } from '../../domain/context'; -import { constants } from 'amplify-cli-core'; +import { constants } from '@aws-amplify/amplify-cli-core'; import { createNewPlugin } from '../../plugin-manager'; import { addUserPluginPackage } from '../../plugin-manager'; import { AddPluginError } from '../../domain/add-plugin-result'; diff --git a/packages/amplify-cli/src/commands/plugin/remove.ts b/packages/amplify-cli/src/commands/plugin/remove.ts index 44b0c4adb93..952741d7157 100644 --- a/packages/amplify-cli/src/commands/plugin/remove.ts +++ b/packages/amplify-cli/src/commands/plugin/remove.ts @@ -1,7 +1,7 @@ import * as inquirer from 'inquirer'; import { Context } from '../../domain/context'; import { removePluginPackage, confirmAndScan } from '../../plugin-manager'; -import { PluginPlatform, constants, PluginInfo } from 'amplify-cli-core'; +import { PluginPlatform, constants, PluginInfo } from '@aws-amplify/amplify-cli-core'; import { InquirerOption, EXPAND } from '../../domain/inquirer-helper'; export const run = async (context: Context) => { diff --git a/packages/amplify-cli/src/commands/pull.ts b/packages/amplify-cli/src/commands/pull.ts index 97b7b763193..a012eb080b7 100644 --- a/packages/amplify-cli/src/commands/pull.ts +++ b/packages/amplify-cli/src/commands/pull.ts @@ -1,4 +1,4 @@ -import { $TSContext, stateManager, AmplifyError, AmplifyFault } from 'amplify-cli-core'; +import { $TSContext, stateManager, AmplifyError, AmplifyFault } from '@aws-amplify/amplify-cli-core'; import { pullBackend } from '../pull-backend'; import { preDeployPullBackend } from '../pre-deployment-pull'; import { attachBackend } from '../attach-backend'; diff --git a/packages/amplify-cli/src/commands/push.ts b/packages/amplify-cli/src/commands/push.ts index c880c3e8596..7b399148fdb 100644 --- a/packages/amplify-cli/src/commands/push.ts +++ b/packages/amplify-cli/src/commands/push.ts @@ -1,4 +1,4 @@ -import { $TSAny, $TSContext, AmplifyError } from 'amplify-cli-core'; +import { $TSAny, $TSContext, AmplifyError } from '@aws-amplify/amplify-cli-core'; import { updateCognitoTrackedFiles } from '../extensions/amplify-helpers/update-tracked-files'; import { syncCurrentCloudBackend } from '../extensions/amplify-helpers/current-cloud-backend-utils'; diff --git a/packages/amplify-cli/src/commands/run.ts b/packages/amplify-cli/src/commands/run.ts index 243059624e7..46c63720577 100644 --- a/packages/amplify-cli/src/commands/run.ts +++ b/packages/amplify-cli/src/commands/run.ts @@ -1,4 +1,4 @@ -import { $TSContext } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; export const run = async (context: $TSContext) => { context.amplify.constructExeInfo(context); diff --git a/packages/amplify-cli/src/commands/status.ts b/packages/amplify-cli/src/commands/status.ts index f21422d2fc6..d2583bb9abf 100644 --- a/packages/amplify-cli/src/commands/status.ts +++ b/packages/amplify-cli/src/commands/status.ts @@ -1,5 +1,13 @@ import * as path from 'path'; -import { ViewResourceTableParams, CLIParams, $TSAny, $TSContext, pathManager, stateManager, ApiCategoryFacade } from 'amplify-cli-core'; +import { + ViewResourceTableParams, + CLIParams, + $TSAny, + $TSContext, + pathManager, + stateManager, + ApiCategoryFacade, +} from '@aws-amplify/amplify-cli-core'; import { printer } from '@aws-amplify/amplify-prompts'; import { readProjectSchema } from 'graphql-transformer-core'; diff --git a/packages/amplify-cli/src/commands/uninstall.ts b/packages/amplify-cli/src/commands/uninstall.ts index 59af8a0e548..3da1a8a7f6e 100644 --- a/packages/amplify-cli/src/commands/uninstall.ts +++ b/packages/amplify-cli/src/commands/uninstall.ts @@ -1,4 +1,4 @@ -import { $TSContext, isPackaged, pathManager } from 'amplify-cli-core'; +import { $TSContext, isPackaged, pathManager } from '@aws-amplify/amplify-cli-core'; import * as fs from 'fs-extra'; import * as path from 'path'; import { setRegPendingDelete } from '../utils/win-utils'; diff --git a/packages/amplify-cli/src/commands/upgrade.ts b/packages/amplify-cli/src/commands/upgrade.ts index c1a230d1e09..42583a505eb 100644 --- a/packages/amplify-cli/src/commands/upgrade.ts +++ b/packages/amplify-cli/src/commands/upgrade.ts @@ -1,4 +1,4 @@ -import { $TSContext, isPackaged, pathManager } from 'amplify-cli-core'; +import { $TSContext, isPackaged, pathManager } from '@aws-amplify/amplify-cli-core'; import fetch from 'node-fetch'; import { gt } from 'semver'; import * as path from 'path'; diff --git a/packages/amplify-cli/src/conditional-local-logging-init.ts b/packages/amplify-cli/src/conditional-local-logging-init.ts index ce9d991db07..b07772252cb 100644 --- a/packages/amplify-cli/src/conditional-local-logging-init.ts +++ b/packages/amplify-cli/src/conditional-local-logging-init.ts @@ -1,4 +1,4 @@ -import { JSONUtilities } from 'amplify-cli-core'; +import { JSONUtilities } from '@aws-amplify/amplify-cli-core'; import { CLIInput } from './domain/command-input'; import { getAmplifyLogger, Redactor } from '@aws-amplify/amplify-cli-logger'; diff --git a/packages/amplify-cli/src/config-steps/c0-analyzeProject.ts b/packages/amplify-cli/src/config-steps/c0-analyzeProject.ts index b8676ccb4ec..4cb3e057462 100644 --- a/packages/amplify-cli/src/config-steps/c0-analyzeProject.ts +++ b/packages/amplify-cli/src/config-steps/c0-analyzeProject.ts @@ -6,7 +6,7 @@ import { getEnvInfo } from '../extensions/amplify-helpers/get-env-info'; import { displayConfigurationDefaults } from '../init-steps/s0-analyzeProject'; import { getFrontendPlugins } from '../extensions/amplify-helpers/get-frontend-plugins'; import { isContainersEnabled } from '../execution-manager'; -import { stateManager } from 'amplify-cli-core'; +import { stateManager } from '@aws-amplify/amplify-cli-core'; export async function analyzeProject(context) { context.exeInfo.projectConfig = stateManager.getProjectConfig(undefined, { diff --git a/packages/amplify-cli/src/config-steps/c9-onSuccess.ts b/packages/amplify-cli/src/config-steps/c9-onSuccess.ts index e3f6006ba91..69d15ce5993 100644 --- a/packages/amplify-cli/src/config-steps/c9-onSuccess.ts +++ b/packages/amplify-cli/src/config-steps/c9-onSuccess.ts @@ -1,4 +1,4 @@ -import { stateManager } from 'amplify-cli-core'; +import { stateManager } from '@aws-amplify/amplify-cli-core'; export async function onSuccess(context) { const { projectPath } = context.exeInfo; diff --git a/packages/amplify-cli/src/context-manager.ts b/packages/amplify-cli/src/context-manager.ts index 52214a998c0..1c092ca6e8b 100644 --- a/packages/amplify-cli/src/context-manager.ts +++ b/packages/amplify-cli/src/context-manager.ts @@ -1,7 +1,7 @@ -import { $TSAny, $TSContext, stateManager, IPluginPlatform, CommandLineInput } from 'amplify-cli-core'; +import { $TSAny, $TSContext, stateManager, IPluginPlatform, CommandLineInput } from '@aws-amplify/amplify-cli-core'; import * as _ from 'lodash'; import { init } from './app-config'; -import { attachExtensions, ProjectSettings } from 'amplify-cli-core'; +import { attachExtensions, ProjectSettings } from '@aws-amplify/amplify-cli-core'; import { NoUsageData, UsageData } from './domain/amplify-usageData'; import { Context } from './domain/context'; diff --git a/packages/amplify-cli/src/display-banner-messages.ts b/packages/amplify-cli/src/display-banner-messages.ts index ffa887f63af..071d0f2c570 100644 --- a/packages/amplify-cli/src/display-banner-messages.ts +++ b/packages/amplify-cli/src/display-banner-messages.ts @@ -1,4 +1,4 @@ -import { $TSAny, BannerMessage, pathManager, stateManager, skipHooks } from 'amplify-cli-core'; +import { $TSAny, BannerMessage, pathManager, stateManager, skipHooks } from '@aws-amplify/amplify-cli-core'; import { CLIInput } from './domain/command-input'; import { isCI } from 'ci-info'; import { printer } from '@aws-amplify/amplify-prompts'; diff --git a/packages/amplify-cli/src/domain/add-plugin-result.ts b/packages/amplify-cli/src/domain/add-plugin-result.ts index 693c4b8d666..6ae3a2c0e3b 100644 --- a/packages/amplify-cli/src/domain/add-plugin-result.ts +++ b/packages/amplify-cli/src/domain/add-plugin-result.ts @@ -1,4 +1,4 @@ -import { PluginVerificationResult } from 'amplify-cli-core'; +import { PluginVerificationResult } from '@aws-amplify/amplify-cli-core'; export class AddPluginResult { constructor(public isAdded: boolean = false, public pluginVerificationResult?: PluginVerificationResult, public error?: AddPluginError) {} diff --git a/packages/amplify-cli/src/domain/amplify-usageData/FlowReport.ts b/packages/amplify-cli/src/domain/amplify-usageData/FlowReport.ts index 669c526628a..6648219ee27 100644 --- a/packages/amplify-cli/src/domain/amplify-usageData/FlowReport.ts +++ b/packages/amplify-cli/src/domain/amplify-usageData/FlowReport.ts @@ -1,5 +1,5 @@ /* eslint-disable spellcheck/spell-checker */ -import { stateManager } from 'amplify-cli-core'; +import { stateManager } from '@aws-amplify/amplify-cli-core'; import { CLIInput } from '../command-input'; import { getAmplifyLogger, Redactor, IAmplifyLogger } from '@aws-amplify/amplify-cli-logger'; diff --git a/packages/amplify-cli/src/domain/amplify-usageData/NoFlowReport.ts b/packages/amplify-cli/src/domain/amplify-usageData/NoFlowReport.ts index 5f280bc563e..7173d4ffafa 100644 --- a/packages/amplify-cli/src/domain/amplify-usageData/NoFlowReport.ts +++ b/packages/amplify-cli/src/domain/amplify-usageData/NoFlowReport.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-empty-function */ -import { FlowRecorder } from 'amplify-cli-core'; +import { FlowRecorder } from '@aws-amplify/amplify-cli-core'; import { ICommandInput, IFlowReport } from '@aws-amplify/amplify-cli-shared-interfaces'; /** diff --git a/packages/amplify-cli/src/domain/amplify-usageData/NoUsageData.ts b/packages/amplify-cli/src/domain/amplify-usageData/NoUsageData.ts index 0e62018b0a7..a4c0168984e 100644 --- a/packages/amplify-cli/src/domain/amplify-usageData/NoUsageData.ts +++ b/packages/amplify-cli/src/domain/amplify-usageData/NoUsageData.ts @@ -2,7 +2,7 @@ import { IFlowData } from '@aws-amplify/amplify-cli-shared-interfaces'; import { IFlowReport } from '@aws-amplify/amplify-cli-shared-interfaces'; import { CLIInput } from '../command-input'; -import { IUsageData, IUsageDataPayload, ProjectSettings } from 'amplify-cli-core'; +import { IUsageData, IUsageDataPayload, ProjectSettings } from '@aws-amplify/amplify-cli-core'; import { CLINoFlowReport } from './NoFlowReport'; import { UsageDataPayload } from './UsageDataPayload'; diff --git a/packages/amplify-cli/src/domain/amplify-usageData/SerializableError.ts b/packages/amplify-cli/src/domain/amplify-usageData/SerializableError.ts index 3f11e5f7b68..9464011129a 100644 --- a/packages/amplify-cli/src/domain/amplify-usageData/SerializableError.ts +++ b/packages/amplify-cli/src/domain/amplify-usageData/SerializableError.ts @@ -1,4 +1,4 @@ -import { $TSAny } from 'amplify-cli-core'; +import { $TSAny } from '@aws-amplify/amplify-cli-core'; import * as path from 'path'; const stackTraceRegex = /^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i; diff --git a/packages/amplify-cli/src/domain/amplify-usageData/UsageData.ts b/packages/amplify-cli/src/domain/amplify-usageData/UsageData.ts index 96bcb822c4e..b41d64a11dd 100644 --- a/packages/amplify-cli/src/domain/amplify-usageData/UsageData.ts +++ b/packages/amplify-cli/src/domain/amplify-usageData/UsageData.ts @@ -17,7 +17,7 @@ import { StartableTimedCodePath, StoppableTimedCodePath, TimedCodePath, -} from 'amplify-cli-core'; +} from '@aws-amplify/amplify-cli-core'; import { CLIFlowReport } from './FlowReport'; import { getUrl } from './getUsageDataUrl'; import redactInput from './identifiable-input-regex'; diff --git a/packages/amplify-cli/src/domain/amplify-usageData/UsageDataPayload.ts b/packages/amplify-cli/src/domain/amplify-usageData/UsageDataPayload.ts index ec508ea93fe..3e3b54f2d8d 100644 --- a/packages/amplify-cli/src/domain/amplify-usageData/UsageDataPayload.ts +++ b/packages/amplify-cli/src/domain/amplify-usageData/UsageDataPayload.ts @@ -1,4 +1,12 @@ -import { $TSAny, isCI, CommandLineInput, InputOptions, IUsageDataPayload, ProjectSettings, TimedCodePath } from 'amplify-cli-core'; +import { + $TSAny, + isCI, + CommandLineInput, + InputOptions, + IUsageDataPayload, + ProjectSettings, + TimedCodePath, +} from '@aws-amplify/amplify-cli-core'; import { IFlowReport } from '@aws-amplify/amplify-cli-shared-interfaces'; import * as os from 'os'; import { SerializableError } from './SerializableError'; diff --git a/packages/amplify-cli/src/domain/amplify-usageData/identifiable-input-regex.ts b/packages/amplify-cli/src/domain/amplify-usageData/identifiable-input-regex.ts index 9c32f3c8065..4f81be17a47 100644 --- a/packages/amplify-cli/src/domain/amplify-usageData/identifiable-input-regex.ts +++ b/packages/amplify-cli/src/domain/amplify-usageData/identifiable-input-regex.ts @@ -1,4 +1,4 @@ -import { JSONUtilities } from 'amplify-cli-core'; +import { JSONUtilities } from '@aws-amplify/amplify-cli-core'; import { CLIInput } from '../command-input'; const containsToRedact = ['key', 'id', 'password', 'name', 'arn', 'address', 'app']; diff --git a/packages/amplify-cli/src/domain/command-input.ts b/packages/amplify-cli/src/domain/command-input.ts index 180f83dd72c..eb7553fb9d1 100644 --- a/packages/amplify-cli/src/domain/command-input.ts +++ b/packages/amplify-cli/src/domain/command-input.ts @@ -1,4 +1,4 @@ -import { CommandLineInput } from 'amplify-cli-core/src/types'; +import { CommandLineInput } from '@aws-amplify/amplify-cli-core/src/types'; export class CLIInput implements CommandLineInput { argv: Array; diff --git a/packages/amplify-cli/src/domain/context.ts b/packages/amplify-cli/src/domain/context.ts index b0a39f83845..18997d7e1c1 100644 --- a/packages/amplify-cli/src/domain/context.ts +++ b/packages/amplify-cli/src/domain/context.ts @@ -1,7 +1,7 @@ /* eslint-disable import/no-cycle */ /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable spellcheck/spell-checker */ -import { CommandLineInput, IPluginPlatform, IUsageData } from 'amplify-cli-core'; +import { CommandLineInput, IPluginPlatform, IUsageData } from '@aws-amplify/amplify-cli-core'; import { AmplifyToolkit } from './amplify-toolkit'; /** diff --git a/packages/amplify-cli/src/execution-manager.ts b/packages/amplify-cli/src/execution-manager.ts index f62002ff4ce..208a87670a7 100644 --- a/packages/amplify-cli/src/execution-manager.ts +++ b/packages/amplify-cli/src/execution-manager.ts @@ -15,7 +15,7 @@ import { HooksMeta, PluginInfo, constants, -} from 'amplify-cli-core'; +} from '@aws-amplify/amplify-cli-core'; import { isHeadlessCommand, readHeadlessPayload } from './utils/headless-input-utils'; /** diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/apply-auth-mode.ts b/packages/amplify-cli/src/extensions/amplify-helpers/apply-auth-mode.ts index 0b2a69234b1..60ca52ca319 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/apply-auth-mode.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/apply-auth-mode.ts @@ -1,4 +1,4 @@ -import { $TSAny, $TSContext } from 'amplify-cli-core'; +import { $TSAny, $TSContext } from '@aws-amplify/amplify-cli-core'; import { getProjectMeta } from './get-project-meta'; const errAuthMissingIAM = `@auth directive with 'iam' provider found, but the project has no IAM authentication provider configured.`; diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/auth-notifications.ts b/packages/amplify-cli/src/extensions/amplify-helpers/auth-notifications.ts index 1846c971de3..377b1abc6c5 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/auth-notifications.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/auth-notifications.ts @@ -1,4 +1,4 @@ -import { $TSAny, $TSContext, exitOnNextTick, FeatureFlags, pathManager, stateManager } from 'amplify-cli-core'; +import { $TSAny, $TSContext, exitOnNextTick, FeatureFlags, pathManager, stateManager } from '@aws-amplify/amplify-cli-core'; import { printer, prompter } from '@aws-amplify/amplify-prompts'; import fs from 'fs-extra'; import { DirectiveNode, DocumentNode, FieldDefinitionNode, FieldNode, parse } from 'graphql'; diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/construct-exeInfo.ts b/packages/amplify-cli/src/extensions/amplify-helpers/construct-exeInfo.ts index 1f848a85179..705bc937f70 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/construct-exeInfo.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/construct-exeInfo.ts @@ -1,5 +1,5 @@ import { getProjectDetails } from './get-project-details'; -import { JSONUtilities, $TSContext } from 'amplify-cli-core'; +import { JSONUtilities, $TSContext } from '@aws-amplify/amplify-cli-core'; export function constructExeInfo(context: $TSContext) { const projectDetails = getProjectDetails(); diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/copy-batch.ts b/packages/amplify-cli/src/extensions/amplify-helpers/copy-batch.ts index 9bb2c5c5abb..be76417eab9 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/copy-batch.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/copy-batch.ts @@ -1,4 +1,4 @@ -import { $TSContext, $TSCopyJob, JSONUtilities } from 'amplify-cli-core'; +import { $TSContext, $TSCopyJob, JSONUtilities } from '@aws-amplify/amplify-cli-core'; /** * @param context The Amplify CLI context 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 index 733d99a6ac3..a29f1ebeab0 100644 --- 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 @@ -1,4 +1,4 @@ -import { $TSAny, $TSContext, AmplifyFault, spinner, stateManager } from 'amplify-cli-core'; +import { $TSAny, $TSContext, AmplifyFault, spinner, stateManager } from '@aws-amplify/amplify-cli-core'; import sequential from 'promise-sequential'; import { notifyFieldAuthSecurityChange, notifyListQuerySecurityChange, notifySecurityEnhancement } from './auth-notifications'; import { getProviderPlugins } from './get-provider-plugins'; diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/delete-project.ts b/packages/amplify-cli/src/extensions/amplify-helpers/delete-project.ts index c2a43301fea..558de3b6df4 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/delete-project.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/delete-project.ts @@ -3,7 +3,7 @@ /* eslint-disable @typescript-eslint/no-var-requires */ import ora from 'ora'; import chalk from 'chalk'; -import { FeatureFlags, $TSContext, AmplifyFault } from 'amplify-cli-core'; +import { FeatureFlags, $TSContext, AmplifyFault } from '@aws-amplify/amplify-cli-core'; import { printer, prompter } from '@aws-amplify/amplify-prompts'; import { removeEnvFromCloud } from './remove-env-from-cloud'; import { getFrontendPlugins } from './get-frontend-plugins'; diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/editor-selection.ts b/packages/amplify-cli/src/extensions/amplify-helpers/editor-selection.ts index 6604e66202c..5eb2c5e9c8b 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/editor-selection.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/editor-selection.ts @@ -1,5 +1,5 @@ import * as inquirer from 'inquirer'; -import { JSONUtilities } from 'amplify-cli-core'; +import { JSONUtilities } from '@aws-amplify/amplify-cli-core'; import { merge } from 'lodash'; export const editors = [ diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/envResourceParams.ts b/packages/amplify-cli/src/extensions/amplify-helpers/envResourceParams.ts index 6b1fd71dacf..da5b09a68aa 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/envResourceParams.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/envResourceParams.ts @@ -1,5 +1,12 @@ import { getEnvParamManager } from '@aws-amplify/amplify-environment-parameters'; -import { $TSContext, $TSObject, stateManager, removeFromDeploymentSecrets, mergeDeploymentSecrets, $TSAny } from 'amplify-cli-core'; +import { + $TSContext, + $TSObject, + stateManager, + removeFromDeploymentSecrets, + mergeDeploymentSecrets, + $TSAny, +} from '@aws-amplify/amplify-cli-core'; import _ from 'lodash'; import { getRootStackId } from './get-root-stack-id'; diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/execute-provider-utils.ts b/packages/amplify-cli/src/extensions/amplify-helpers/execute-provider-utils.ts index 934f259e946..a0df4f55c6f 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/execute-provider-utils.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/execute-provider-utils.ts @@ -1,4 +1,4 @@ -import { $TSAny, $TSContext } from 'amplify-cli-core'; +import { $TSAny, $TSContext } from '@aws-amplify/amplify-cli-core'; import { getProviderPlugins } from './get-provider-plugins'; export async function executeProviderUtils(context: $TSContext, providerName: string, utilName: string, options?: $TSAny) { diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/get-all-envs.ts b/packages/amplify-cli/src/extensions/amplify-helpers/get-all-envs.ts index 1b532242306..f1475772e33 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/get-all-envs.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/get-all-envs.ts @@ -1,4 +1,4 @@ -import { stateManager } from 'amplify-cli-core'; +import { stateManager } from '@aws-amplify/amplify-cli-core'; /** * Get all locally configured environments diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/get-amplify-version.ts b/packages/amplify-cli/src/extensions/amplify-helpers/get-amplify-version.ts index 241eb7f2e1f..ea4385546fe 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/get-amplify-version.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/get-amplify-version.ts @@ -1,5 +1,5 @@ import * as path from 'path'; -import { JSONUtilities, $TSAny } from 'amplify-cli-core'; +import { JSONUtilities, $TSAny } from '@aws-amplify/amplify-cli-core'; export const getAmplifyVersion = (): string => { const pkg = JSONUtilities.readJson<$TSAny>(path.join(__dirname, '..', '..', '..', 'package.json')); diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/get-category-pluginInfo.ts b/packages/amplify-cli/src/extensions/amplify-helpers/get-category-pluginInfo.ts index 5698c4ed4cf..fc604cbed2f 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/get-category-pluginInfo.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/get-category-pluginInfo.ts @@ -1,4 +1,4 @@ -import { $TSContext } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; export function getCategoryPluginInfo(context: $TSContext, category: string, service?: string) { let categoryPluginInfo; diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/get-cloud-init-status.ts b/packages/amplify-cli/src/extensions/amplify-helpers/get-cloud-init-status.ts index 76700ff1176..30ff5b222b8 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/get-cloud-init-status.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/get-cloud-init-status.ts @@ -1,5 +1,5 @@ import * as fs from 'fs-extra'; -import { pathManager } from 'amplify-cli-core'; +import { pathManager } from '@aws-amplify/amplify-cli-core'; export const CLOUD_INITIALIZED = 'CLOUD_INITIALIZED'; export const CLOUD_NOT_INITIALIZED = 'CLOUD_NOT_INITIALIZED'; diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/get-env-details.ts b/packages/amplify-cli/src/extensions/amplify-helpers/get-env-details.ts index a4d09e58098..a48316ab6d7 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/get-env-details.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/get-env-details.ts @@ -1,4 +1,4 @@ -import { $TSAny, stateManager } from 'amplify-cli-core'; +import { $TSAny, stateManager } from '@aws-amplify/amplify-cli-core'; /** * Gets the TPI file diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/get-env-info.ts b/packages/amplify-cli/src/extensions/amplify-helpers/get-env-info.ts index 7f9e1e4c533..e54d231bdf8 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/get-env-info.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/get-env-info.ts @@ -1,4 +1,4 @@ -import { $TSAny, AmplifyError, stateManager } from 'amplify-cli-core'; +import { $TSAny, AmplifyError, stateManager } from '@aws-amplify/amplify-cli-core'; /** * returns the current environment info diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/get-frontend-plugins.ts b/packages/amplify-cli/src/extensions/amplify-helpers/get-frontend-plugins.ts index eafb56ed8d9..38580e78ba4 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/get-frontend-plugins.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/get-frontend-plugins.ts @@ -1,4 +1,4 @@ -import { $TSContext } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; export function getFrontendPlugins(context: $TSContext) { const frontendPlugins = {}; diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/get-imported-auth-properties.ts b/packages/amplify-cli/src/extensions/amplify-helpers/get-imported-auth-properties.ts index 026a2c56428..8aea79c27e3 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/get-imported-auth-properties.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/get-imported-auth-properties.ts @@ -1,5 +1,5 @@ import _ from 'lodash'; -import { $TSContext } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; export const getImportedAuthProperties = ( context: $TSContext, diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/get-plugin-instance.ts b/packages/amplify-cli/src/extensions/amplify-helpers/get-plugin-instance.ts index 870bdea0d96..12993573080 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/get-plugin-instance.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/get-plugin-instance.ts @@ -1,4 +1,4 @@ -import { $TSContext } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; export function getPluginInstance(context: $TSContext, pluginName: string) { let result; diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/get-project-config.ts b/packages/amplify-cli/src/extensions/amplify-helpers/get-project-config.ts index 93dea8c74ea..4ef846d4299 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/get-project-config.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/get-project-config.ts @@ -1,4 +1,4 @@ -import { stateManager } from 'amplify-cli-core'; +import { stateManager } from '@aws-amplify/amplify-cli-core'; export function getProjectConfig() { return stateManager.getProjectConfig(); diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/get-project-details.ts b/packages/amplify-cli/src/extensions/amplify-helpers/get-project-details.ts index a5afa5da639..4a38e2829b4 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/get-project-details.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/get-project-details.ts @@ -1,4 +1,4 @@ -import { $TSAny, stateManager } from 'amplify-cli-core'; +import { $TSAny, stateManager } from '@aws-amplify/amplify-cli-core'; import { getEnvInfo } from './get-env-info'; /** diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/get-project-meta.ts b/packages/amplify-cli/src/extensions/amplify-helpers/get-project-meta.ts index 5614f31a046..74171f9d72f 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/get-project-meta.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/get-project-meta.ts @@ -1,4 +1,4 @@ -import { $TSMeta, projectNotInitializedError, stateManager } from 'amplify-cli-core'; +import { $TSMeta, projectNotInitializedError, stateManager } from '@aws-amplify/amplify-cli-core'; /** * returns project meta diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/get-provider-plugins.ts b/packages/amplify-cli/src/extensions/amplify-helpers/get-provider-plugins.ts index a1d80de2fba..1feafa3486f 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/get-provider-plugins.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/get-provider-plugins.ts @@ -1,4 +1,4 @@ -import { $TSAny, $TSContext, stateManager } from 'amplify-cli-core'; +import { $TSAny, $TSContext, stateManager } from '@aws-amplify/amplify-cli-core'; import _ from 'lodash'; /** diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/get-resource-outputs.ts b/packages/amplify-cli/src/extensions/amplify-helpers/get-resource-outputs.ts index 3e50d5724a8..2397c85b079 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/get-resource-outputs.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/get-resource-outputs.ts @@ -1,4 +1,4 @@ -import { $TSMeta, AmplifyCategories, stateManager } from 'amplify-cli-core'; +import { $TSMeta, AmplifyCategories, stateManager } from '@aws-amplify/amplify-cli-core'; /** * Get the outputs of a resource diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/get-root-stack-id.ts b/packages/amplify-cli/src/extensions/amplify-helpers/get-root-stack-id.ts index d5371adf465..34877689b15 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/get-root-stack-id.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/get-root-stack-id.ts @@ -1,4 +1,4 @@ -import { stateManager } from 'amplify-cli-core'; +import { stateManager } from '@aws-amplify/amplify-cli-core'; /** * Gets the root stack id diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/get-tags.ts b/packages/amplify-cli/src/extensions/amplify-helpers/get-tags.ts index 595991791a2..876864c4d83 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/get-tags.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/get-tags.ts @@ -1,4 +1,4 @@ -import { $TSObject, HydrateTags, pathManager, stateManager, Tag } from 'amplify-cli-core'; +import { $TSObject, HydrateTags, pathManager, stateManager, Tag } from '@aws-amplify/amplify-cli-core'; import { Context } from '../../domain/context'; /** diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/get-userpoolgroup-list.ts b/packages/amplify-cli/src/extensions/amplify-helpers/get-userpoolgroup-list.ts index 0c6e86630b2..6204f1fd013 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/get-userpoolgroup-list.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/get-userpoolgroup-list.ts @@ -1,4 +1,4 @@ -import { $TSAny, JSONUtilities, pathManager } from 'amplify-cli-core'; +import { $TSAny, JSONUtilities, pathManager } from '@aws-amplify/amplify-cli-core'; import * as path from 'path'; export function getUserPoolGroupList(): $TSAny[] { diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/invoke-delete-env-params.ts b/packages/amplify-cli/src/extensions/amplify-helpers/invoke-delete-env-params.ts index 111eb830965..45558742fe9 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/invoke-delete-env-params.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/invoke-delete-env-params.ts @@ -1,4 +1,4 @@ -import { $TSContext, constants } from 'amplify-cli-core'; +import { $TSContext, constants } from '@aws-amplify/amplify-cli-core'; export const invokeDeleteEnvParamsFromService = async (context: $TSContext, envName: string): Promise => { const CloudFormationProviderName = constants.DEFAULT_PROVIDER; diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/invoke-plugin-method.ts b/packages/amplify-cli/src/extensions/amplify-helpers/invoke-plugin-method.ts index 0eeebec03fa..03a5f64dce6 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/invoke-plugin-method.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/invoke-plugin-method.ts @@ -1,4 +1,4 @@ -import { $TSAny, $TSContext, AmplifyError } from 'amplify-cli-core'; +import { $TSAny, $TSContext, AmplifyError } from '@aws-amplify/amplify-cli-core'; /** * invoke plugin method diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/leave-breadcrumbs.ts b/packages/amplify-cli/src/extensions/amplify-helpers/leave-breadcrumbs.ts index 8c8964e210c..d0605d13328 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/leave-breadcrumbs.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/leave-breadcrumbs.ts @@ -1,4 +1,4 @@ -import { JSONUtilities, pathManager } from 'amplify-cli-core'; +import { JSONUtilities, pathManager } from '@aws-amplify/amplify-cli-core'; import * as path from 'path'; import { amplifyCLIConstants } from './constants'; diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/load-runtime-plugin.ts b/packages/amplify-cli/src/extensions/amplify-helpers/load-runtime-plugin.ts index 5b931b7ffb0..f06780d0ffe 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/load-runtime-plugin.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/load-runtime-plugin.ts @@ -1,4 +1,4 @@ -import { $TSContext } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; export async function loadRuntimePlugin(context: $TSContext, pluginId: string) { if (!context.pluginPlatform.plugins.functionRuntime) { diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/on-category-outputs-change.ts b/packages/amplify-cli/src/extensions/amplify-helpers/on-category-outputs-change.ts index d12c6d2184c..452618cb7c9 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/on-category-outputs-change.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/on-category-outputs-change.ts @@ -1,5 +1,5 @@ import { getFrontendConfig } from '@aws-amplify/amplify-category-auth'; -import { $TSAny, stateManager } from 'amplify-cli-core'; +import { $TSAny, stateManager } from '@aws-amplify/amplify-cli-core'; import * as fs from 'fs-extra'; import * as path from 'path'; import sequential from 'promise-sequential'; diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/open-editor.ts b/packages/amplify-cli/src/extensions/amplify-helpers/open-editor.ts index 0d848780d46..86485b25ad1 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/open-editor.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/open-editor.ts @@ -5,7 +5,7 @@ import * as inquirer from 'inquirer'; import * as envEditor from 'env-editor'; import { editorSelection } from './editor-selection'; import { getEnvInfo } from './get-env-info'; -import { $TSContext, open } from 'amplify-cli-core'; +import { $TSContext, open } from '@aws-amplify/amplify-cli-core'; export async function openEditor(context: $TSContext, filePath: string, waitToContinue = true): Promise { const continueQuestion: inquirer.InputQuestion = { diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/path-manager.ts b/packages/amplify-cli/src/extensions/amplify-helpers/path-manager.ts index 84cf33a38a1..5cac3bf1f1c 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/path-manager.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/path-manager.ts @@ -1,4 +1,4 @@ -import { $TSAny, projectNotInitializedError } from 'amplify-cli-core'; +import { $TSAny, projectNotInitializedError } from '@aws-amplify/amplify-cli-core'; import * as fs from 'fs-extra'; import { homedir } from 'os'; import * as path from 'path'; 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 c6823bb2db8..a80b8220bfe 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/push-resources.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/push-resources.ts @@ -8,7 +8,7 @@ import { stateManager, ManuallyTimedCodePath, LocalEnvInfo, -} from 'amplify-cli-core'; +} from '@aws-amplify/amplify-cli-core'; import { generateDependentResourcesType } from '@aws-amplify/amplify-category-custom'; import { printer, prompter } from '@aws-amplify/amplify-prompts'; import { getChangedResources } from '../../commands/build'; diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/read-breadcrumbs.ts b/packages/amplify-cli/src/extensions/amplify-helpers/read-breadcrumbs.ts index 1e21d81df4a..f73aad14f59 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/read-breadcrumbs.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/read-breadcrumbs.ts @@ -1,5 +1,5 @@ import * as path from 'path'; -import { JSONUtilities, pathManager } from 'amplify-cli-core'; +import { JSONUtilities, pathManager } from '@aws-amplify/amplify-cli-core'; import { amplifyCLIConstants } from './constants'; import { leaveBreadcrumbs } from './leave-breadcrumbs'; diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/read-json-file.ts b/packages/amplify-cli/src/extensions/amplify-helpers/read-json-file.ts index 712161970a2..c8b590623b1 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/read-json-file.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/read-json-file.ts @@ -1,5 +1,5 @@ //TODO Remove this whole function once read-json removed from everywhere -import { JSONUtilities, $TSAny } from 'amplify-cli-core'; +import { JSONUtilities, $TSAny } from '@aws-amplify/amplify-cli-core'; export function readJsonFile(jsonFilePath, encoding = 'utf8', throwOnError = true): $TSAny { return JSONUtilities.readJson(jsonFilePath, { diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/remove-env-from-cloud.ts b/packages/amplify-cli/src/extensions/amplify-helpers/remove-env-from-cloud.ts index b8aeb393df9..7a9946f1339 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/remove-env-from-cloud.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/remove-env-from-cloud.ts @@ -1,4 +1,4 @@ -import { $TSAny, AmplifyFault } from 'amplify-cli-core'; +import { $TSAny, AmplifyFault } from '@aws-amplify/amplify-cli-core'; import { printer } from '@aws-amplify/amplify-prompts'; import { getProjectConfig } from './get-project-config'; import { getAllCategoryPluginInfo } from './get-all-category-pluginInfos'; diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/remove-pinpoint-policy.ts b/packages/amplify-cli/src/extensions/amplify-helpers/remove-pinpoint-policy.ts index 7bcce1f1b52..b40d2cc40b7 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/remove-pinpoint-policy.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/remove-pinpoint-policy.ts @@ -1,6 +1,6 @@ import * as path from 'path'; import * as fs from 'fs-extra'; -import { pathManager, JSONUtilities, $TSAny } from 'amplify-cli-core'; +import { pathManager, JSONUtilities, $TSAny } from '@aws-amplify/amplify-cli-core'; import _ from 'lodash'; const pinpointTemplateFileName = 'pinpoint-cloudformation-template.json'; diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/remove-resource.ts b/packages/amplify-cli/src/extensions/amplify-helpers/remove-resource.ts index c3421117876..6be3833e144 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/remove-resource.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/remove-resource.ts @@ -5,7 +5,7 @@ import { promptConfirmationRemove, ResourceDoesNotExistError, stateManager, -} from 'amplify-cli-core'; +} from '@aws-amplify/amplify-cli-core'; import { printer } from '@aws-amplify/amplify-prompts'; import * as inquirer from 'inquirer'; import _ from 'lodash'; diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/resource-status-data.ts b/packages/amplify-cli/src/extensions/amplify-helpers/resource-status-data.ts index a7007f6504d..d2e9bf6b462 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/resource-status-data.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/resource-status-data.ts @@ -3,7 +3,7 @@ /* eslint-disable no-param-reassign */ /* eslint-disable import/no-cycle */ import { hashLayerResource, ServiceName as FunctionServiceName } from '@aws-amplify/amplify-category-function'; -import { $TSAny, pathManager, projectNotInitializedError, stateManager, ViewResourceTableParams } from 'amplify-cli-core'; +import { $TSAny, pathManager, projectNotInitializedError, stateManager, ViewResourceTableParams } from '@aws-amplify/amplify-cli-core'; import { hashElement, HashElementOptions } from 'folder-hash'; import * as fs from 'fs-extra'; import _ from 'lodash'; diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/resource-status-diff.ts b/packages/amplify-cli/src/extensions/amplify-helpers/resource-status-diff.ts index ca8b392fb40..82665f2262b 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/resource-status-diff.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/resource-status-diff.ts @@ -3,7 +3,7 @@ import * as path from 'path'; import * as glob from 'glob'; import chalk from 'chalk'; import * as cfnDiff from '@aws-cdk/cloudformation-diff'; -import { $TSAny, generateCustomPoliciesInTemplate, pathManager, readCFNTemplate } from 'amplify-cli-core'; +import { $TSAny, generateCustomPoliciesInTemplate, pathManager, readCFNTemplate } from '@aws-amplify/amplify-cli-core'; import { Template } from 'cloudform-types'; import { print } from './print'; // eslint-disable-next-line import/no-cycle diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/resource-status.ts b/packages/amplify-cli/src/extensions/amplify-helpers/resource-status.ts index a7d46ab6017..4665f5d85d9 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/resource-status.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/resource-status.ts @@ -1,6 +1,6 @@ import { print } from './print'; import { CLOUD_INITIALIZED, getCloudInitStatus } from './get-cloud-init-status'; -import { ViewResourceTableParams } from 'amplify-cli-core'; +import { ViewResourceTableParams } from '@aws-amplify/amplify-cli-core'; import { viewSummaryTable, viewEnvInfo, viewResourceDiffs } from './resource-status-view'; import { getMultiCategoryStatus, getResourceStatus, getHashForResourceDir } from './resource-status-data'; diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/root-stack-status.ts b/packages/amplify-cli/src/extensions/amplify-helpers/root-stack-status.ts index 6524ca439fa..872efb19c1d 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/root-stack-status.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/root-stack-status.ts @@ -1,4 +1,4 @@ -import { pathManager } from 'amplify-cli-core'; +import { pathManager } from '@aws-amplify/amplify-cli-core'; import { rootStackFileName } from '@aws-amplify/amplify-provider-awscloudformation'; import { hashElement, HashElementOptions } from 'folder-hash'; import * as fs from 'fs-extra'; diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/service-select-prompt.ts b/packages/amplify-cli/src/extensions/amplify-helpers/service-select-prompt.ts index 21a03713754..a2b0027136e 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/service-select-prompt.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/service-select-prompt.ts @@ -1,4 +1,4 @@ -import { $TSAny, $TSContext, exitOnNextTick, ResourceDoesNotExistError, ServiceSelection } from 'amplify-cli-core'; +import { $TSAny, $TSContext, exitOnNextTick, ResourceDoesNotExistError, ServiceSelection } from '@aws-amplify/amplify-cli-core'; import * as inquirer from 'inquirer'; import { getProjectConfig } from './get-project-config'; diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/show-all-help.ts b/packages/amplify-cli/src/extensions/amplify-helpers/show-all-help.ts index 7600196116d..d512f84e365 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/show-all-help.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/show-all-help.ts @@ -1,6 +1,6 @@ import { showHelp } from './show-help'; import { listCategories } from './list-categories'; -import { isPackaged } from 'amplify-cli-core'; +import { isPackaged } from '@aws-amplify/amplify-cli-core'; export function showAllHelp(context) { context.print.info(''); diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/show-auth-acm.ts b/packages/amplify-cli/src/extensions/amplify-helpers/show-auth-acm.ts index 2eae88d6508..7f6917ed7fd 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/show-auth-acm.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/show-auth-acm.ts @@ -11,7 +11,7 @@ import { import { parse, ObjectTypeDefinitionNode, DirectiveNode, FieldDefinitionNode } from 'graphql'; import { printer } from '@aws-amplify/amplify-prompts'; import { DirectiveWrapper } from '@aws-amplify/graphql-transformer-core'; -import { FeatureFlags } from 'amplify-cli-core'; +import { FeatureFlags } from '@aws-amplify/amplify-cli-core'; export function showACM(sdl: string, nodeName: string) { const schema = parse(sdl); diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/show-helpful-provider-links.ts b/packages/amplify-cli/src/extensions/amplify-helpers/show-helpful-provider-links.ts index 2978199ed23..e3f102fdc75 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/show-helpful-provider-links.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/show-helpful-provider-links.ts @@ -1,7 +1,7 @@ import { getProjectConfig } from './get-project-config'; import { getResourceStatus } from './resource-status'; import { getProviderPlugins } from './get-provider-plugins'; -import { $TSContext } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; export async function showHelpfulProviderLinks(context: $TSContext) { const { providers } = getProjectConfig(); diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/trigger-flow.ts b/packages/amplify-cli/src/extensions/amplify-helpers/trigger-flow.ts index 69b6604cca1..b675c4ce484 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/trigger-flow.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/trigger-flow.ts @@ -1,4 +1,4 @@ -import { $TSAny, $TSContext, $TSObject, exitOnNextTick, JSONUtilities } from 'amplify-cli-core'; +import { $TSAny, $TSContext, $TSObject, exitOnNextTick, JSONUtilities } from '@aws-amplify/amplify-cli-core'; import { prompter } from '@aws-amplify/amplify-prompts'; import chalk from 'chalk'; import * as fs from 'fs-extra'; diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/update-amplify-meta.ts b/packages/amplify-cli/src/extensions/amplify-helpers/update-amplify-meta.ts index 3e4cd4ecc55..fd05291a6b2 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/update-amplify-meta.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/update-amplify-meta.ts @@ -2,7 +2,7 @@ /* eslint-disable import/no-extraneous-dependencies */ import { saveAll as saveAllEnvParams } from '@aws-amplify/amplify-environment-parameters'; import { buildTypeKeyMap, ServiceName } from '@aws-amplify/amplify-category-function'; -import { $TSAny, $TSMeta, $TSObject, JSONUtilities, pathManager, ResourceTuple, stateManager } from 'amplify-cli-core'; +import { $TSAny, $TSMeta, $TSObject, JSONUtilities, pathManager, ResourceTuple, stateManager } from '@aws-amplify/amplify-cli-core'; import { BuildType } from '@aws-amplify/amplify-function-plugin-interface'; import * as fs from 'fs-extra'; import glob from 'glob'; diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/update-backend-config.ts b/packages/amplify-cli/src/extensions/amplify-helpers/update-backend-config.ts index ce5e95d48c7..60dc85d3251 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/update-backend-config.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/update-backend-config.ts @@ -1,4 +1,4 @@ -import { $TSAny, $TSObject, stateManager } from 'amplify-cli-core'; +import { $TSAny, $TSObject, stateManager } from '@aws-amplify/amplify-cli-core'; import _ from 'lodash'; export function updateBackendConfigAfterResourceAdd(category: string, resourceName: string, options: $TSObject) { diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/update-project-config.ts b/packages/amplify-cli/src/extensions/amplify-helpers/update-project-config.ts index 2bec053bd17..a44ea14ffd9 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/update-project-config.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/update-project-config.ts @@ -1,4 +1,4 @@ -import { stateManager, $TSAny } from 'amplify-cli-core'; +import { stateManager, $TSAny } from '@aws-amplify/amplify-cli-core'; export function updateProjectConfig(projectPath: string | undefined, label: string, data: $TSAny) { const projectConfig = stateManager.getProjectConfig(projectPath, { diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/update-tracked-files.ts b/packages/amplify-cli/src/extensions/amplify-helpers/update-tracked-files.ts index f029d39fdb0..d4e9f610086 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/update-tracked-files.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/update-tracked-files.ts @@ -1,6 +1,6 @@ import * as path from 'path'; import fs from 'fs-extra'; -import { $TSAny, JSONUtilities, pathManager, stateManager } from 'amplify-cli-core'; +import { $TSAny, JSONUtilities, pathManager, stateManager } from '@aws-amplify/amplify-cli-core'; const { readJson } = JSONUtilities; diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/write-object-as-json.ts b/packages/amplify-cli/src/extensions/amplify-helpers/write-object-as-json.ts index 7d82e89702b..05b4f479c4b 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/write-object-as-json.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/write-object-as-json.ts @@ -1,5 +1,5 @@ //TODO Remove this whole function once write-object-as-json removed from everywhere -import { JSONUtilities } from 'amplify-cli-core'; +import { JSONUtilities } from '@aws-amplify/amplify-cli-core'; export function writeObjectAsJson(dest, obj, pretty) { JSONUtilities.writeJson(dest, obj, { diff --git a/packages/amplify-cli/src/index.ts b/packages/amplify-cli/src/index.ts index d16c8794e33..f32e49cacf0 100644 --- a/packages/amplify-cli/src/index.ts +++ b/packages/amplify-cli/src/index.ts @@ -11,7 +11,7 @@ import { HooksMeta, AmplifyError, constants, -} from 'amplify-cli-core'; +} from '@aws-amplify/amplify-cli-core'; import { CLIInput } from './domain/command-input'; import { isCI } from 'ci-info'; import { EventEmitter } from 'events'; diff --git a/packages/amplify-cli/src/init-steps/postInitSetup.ts b/packages/amplify-cli/src/init-steps/postInitSetup.ts index 666d821ed6a..c32af639069 100644 --- a/packages/amplify-cli/src/init-steps/postInitSetup.ts +++ b/packages/amplify-cli/src/init-steps/postInitSetup.ts @@ -1,4 +1,4 @@ -import { $TSContext, AmplifyFault, AmplifyError, getPackageManager, JSONUtilities } from 'amplify-cli-core'; +import { $TSContext, AmplifyFault, AmplifyError, getPackageManager, JSONUtilities } from '@aws-amplify/amplify-cli-core'; import { execSync } from 'child_process'; import _ from 'lodash'; import * as path from 'path'; diff --git a/packages/amplify-cli/src/init-steps/preInitSetup.ts b/packages/amplify-cli/src/init-steps/preInitSetup.ts index fa46f5b9151..e2eaacfe393 100644 --- a/packages/amplify-cli/src/init-steps/preInitSetup.ts +++ b/packages/amplify-cli/src/init-steps/preInitSetup.ts @@ -1,4 +1,4 @@ -import { $TSContext, AmplifyError, getPackageManager, LocalEnvInfo, pathManager } from 'amplify-cli-core'; +import { $TSContext, AmplifyError, getPackageManager, LocalEnvInfo, pathManager } from '@aws-amplify/amplify-cli-core'; import { execSync } from 'child_process'; import * as fs from 'fs-extra'; import * as url from 'url'; diff --git a/packages/amplify-cli/src/init-steps/s0-analyzeProject.ts b/packages/amplify-cli/src/init-steps/s0-analyzeProject.ts index 430ee2252d6..b93d4f59caa 100644 --- a/packages/amplify-cli/src/init-steps/s0-analyzeProject.ts +++ b/packages/amplify-cli/src/init-steps/s0-analyzeProject.ts @@ -1,4 +1,4 @@ -import { $TSContext, AmplifyError, LocalEnvInfo, stateManager } from 'amplify-cli-core'; +import { $TSContext, AmplifyError, LocalEnvInfo, stateManager } from '@aws-amplify/amplify-cli-core'; import * as fs from 'fs-extra'; import * as inquirer from 'inquirer'; import * as path from 'path'; diff --git a/packages/amplify-cli/src/init-steps/s1-initFrontend.ts b/packages/amplify-cli/src/init-steps/s1-initFrontend.ts index e0bc6c8ad31..49847040d42 100644 --- a/packages/amplify-cli/src/init-steps/s1-initFrontend.ts +++ b/packages/amplify-cli/src/init-steps/s1-initFrontend.ts @@ -1,4 +1,4 @@ -import { $TSAny, $TSContext } from 'amplify-cli-core'; +import { $TSAny, $TSContext } from '@aws-amplify/amplify-cli-core'; import * as inquirer from 'inquirer'; import { getFrontendPlugins } from '../extensions/amplify-helpers/get-frontend-plugins'; import { normalizeFrontendHandlerName } from '../input-params-manager'; diff --git a/packages/amplify-cli/src/init-steps/s2-initProviders.ts b/packages/amplify-cli/src/init-steps/s2-initProviders.ts index 106bfce8685..781dba32d60 100644 --- a/packages/amplify-cli/src/init-steps/s2-initProviders.ts +++ b/packages/amplify-cli/src/init-steps/s2-initProviders.ts @@ -1,4 +1,4 @@ -import { $TSAny, AmplifyError } from 'amplify-cli-core'; +import { $TSAny, AmplifyError } from '@aws-amplify/amplify-cli-core'; import * as inquirer from 'inquirer'; import sequential from 'promise-sequential'; import { getProviderPlugins } from '../extensions/amplify-helpers/get-provider-plugins'; diff --git a/packages/amplify-cli/src/init-steps/s8-scaffoldHeadless.ts b/packages/amplify-cli/src/init-steps/s8-scaffoldHeadless.ts index 7d656255c52..39b74b53cb7 100644 --- a/packages/amplify-cli/src/init-steps/s8-scaffoldHeadless.ts +++ b/packages/amplify-cli/src/init-steps/s8-scaffoldHeadless.ts @@ -9,7 +9,7 @@ import { JSONUtilities, PathConstants, pathManager, -} from 'amplify-cli-core'; +} from '@aws-amplify/amplify-cli-core'; import { insertAmplifyIgnore } from '../extensions/amplify-helpers/git-manager'; /** diff --git a/packages/amplify-cli/src/init-steps/s9-onSuccess.ts b/packages/amplify-cli/src/init-steps/s9-onSuccess.ts index 5bb26339cf0..a5d49324065 100644 --- a/packages/amplify-cli/src/init-steps/s9-onSuccess.ts +++ b/packages/amplify-cli/src/init-steps/s9-onSuccess.ts @@ -1,7 +1,7 @@ import * as fs from 'fs-extra'; import { join } from 'path'; import sequential from 'promise-sequential'; -import { CLIContextEnvironmentProvider, FeatureFlags, pathManager, stateManager, $TSContext, $TSAny } from 'amplify-cli-core'; +import { CLIContextEnvironmentProvider, FeatureFlags, pathManager, stateManager, $TSContext, $TSAny } from '@aws-amplify/amplify-cli-core'; import _ from 'lodash'; import { printer, prompter } from '@aws-amplify/amplify-prompts'; import { getFrontendPlugins } from '../extensions/amplify-helpers/get-frontend-plugins'; diff --git a/packages/amplify-cli/src/initialize-env.ts b/packages/amplify-cli/src/initialize-env.ts index df78e19cfb7..02a6c3e5aca 100644 --- a/packages/amplify-cli/src/initialize-env.ts +++ b/packages/amplify-cli/src/initialize-env.ts @@ -9,7 +9,7 @@ import { constants, spinner, LocalEnvInfo, -} from 'amplify-cli-core'; +} from '@aws-amplify/amplify-cli-core'; import { printer } from '@aws-amplify/amplify-prompts'; import { ensureEnvParamManager, IEnvironmentParameterManager, ServiceDownloadHandler } from '@aws-amplify/amplify-environment-parameters'; diff --git a/packages/amplify-cli/src/input-manager.ts b/packages/amplify-cli/src/input-manager.ts index 3e9ff51c20a..815484515e0 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, commandsInfo } from 'amplify-cli-core'; +import { constants, PluginPlatform, pathManager, stateManager, commandsInfo } from '@aws-amplify/amplify-cli-core'; import { getPluginsWithName, getAllPluginNames } from './plugin-manager'; import { InputVerificationResult } from './domain/input-verification-result'; import { insertAmplifyIgnore } from './extensions/amplify-helpers/git-manager'; diff --git a/packages/amplify-cli/src/input-params-manager.ts b/packages/amplify-cli/src/input-params-manager.ts index 766c4728666..473314de8d6 100644 --- a/packages/amplify-cli/src/input-params-manager.ts +++ b/packages/amplify-cli/src/input-params-manager.ts @@ -1,5 +1,5 @@ /* eslint-disable no-param-reassign */ -import { $TSAny, $TSContext, $TSObject, JSONUtilities } from 'amplify-cli-core'; +import { $TSAny, $TSContext, $TSObject, JSONUtilities } from '@aws-amplify/amplify-cli-core'; /** * Normalizes the input parameters diff --git a/packages/amplify-cli/src/migrate-project.ts b/packages/amplify-cli/src/migrate-project.ts index c1978f9be19..7eeaed76cbe 100644 --- a/packages/amplify-cli/src/migrate-project.ts +++ b/packages/amplify-cli/src/migrate-project.ts @@ -3,7 +3,16 @@ import * as path from 'path'; import chalk from 'chalk'; import ora from 'ora'; import { coerce, lt } from 'semver'; -import { pathManager, stateManager, $TSObject, $TSContext, JSONUtilities, $TSAny, MigrationInfo, LocalEnvInfo } from 'amplify-cli-core'; +import { + pathManager, + stateManager, + $TSObject, + $TSContext, + JSONUtilities, + $TSAny, + MigrationInfo, + LocalEnvInfo, +} from '@aws-amplify/amplify-cli-core'; import { makeId } from './extensions/amplify-helpers/make-id'; import { amplifyCLIConstants } from './extensions/amplify-helpers/constants'; import { insertAmplifyIgnore } from './extensions/amplify-helpers/git-manager'; diff --git a/packages/amplify-cli/src/plugin-helpers/access-plugins-file.ts b/packages/amplify-cli/src/plugin-helpers/access-plugins-file.ts index cb00102ac85..a0201dc8cda 100644 --- a/packages/amplify-cli/src/plugin-helpers/access-plugins-file.ts +++ b/packages/amplify-cli/src/plugin-helpers/access-plugins-file.ts @@ -1,6 +1,6 @@ import * as path from 'path'; import * as os from 'os'; -import { PluginPlatform, constants, JSONUtilities } from 'amplify-cli-core'; +import { PluginPlatform, constants, JSONUtilities } from '@aws-amplify/amplify-cli-core'; export function readPluginsJsonFile(): PluginPlatform | undefined { const pluginsFilePath = getPluginsJsonFilePath(); diff --git a/packages/amplify-cli/src/plugin-helpers/compare-plugins.ts b/packages/amplify-cli/src/plugin-helpers/compare-plugins.ts index c6b4e766d45..5e37519c4af 100644 --- a/packages/amplify-cli/src/plugin-helpers/compare-plugins.ts +++ b/packages/amplify-cli/src/plugin-helpers/compare-plugins.ts @@ -1,4 +1,4 @@ -import { PluginInfo } from 'amplify-cli-core'; +import { PluginInfo } from '@aws-amplify/amplify-cli-core'; export function twoPluginsAreTheSame(plugin0: PluginInfo, plugin1: PluginInfo) { if (plugin0.packageLocation === plugin1.packageLocation) { diff --git a/packages/amplify-cli/src/plugin-helpers/create-new-plugin.ts b/packages/amplify-cli/src/plugin-helpers/create-new-plugin.ts index 612123fdf3b..06556eb48ce 100644 --- a/packages/amplify-cli/src/plugin-helpers/create-new-plugin.ts +++ b/packages/amplify-cli/src/plugin-helpers/create-new-plugin.ts @@ -2,7 +2,7 @@ import * as path from 'path'; import * as fs from 'fs-extra'; import * as inquirer from 'inquirer'; import { Context } from '../domain/context'; -import { constants, AmplifyEvent, JSONUtilities, $TSAny } from 'amplify-cli-core'; +import { constants, AmplifyEvent, JSONUtilities, $TSAny } from '@aws-amplify/amplify-cli-core'; import { AmplifyPluginType } from '../domain/amplify-plugin-type'; import { validPluginName } from './verify-plugin'; import { createIndentation } from './display-plugin-platform'; diff --git a/packages/amplify-cli/src/plugin-helpers/display-plugin-platform.ts b/packages/amplify-cli/src/plugin-helpers/display-plugin-platform.ts index 18dd97c070f..fe9066fc762 100644 --- a/packages/amplify-cli/src/plugin-helpers/display-plugin-platform.ts +++ b/packages/amplify-cli/src/plugin-helpers/display-plugin-platform.ts @@ -1,6 +1,6 @@ import util from 'util'; import { Context } from '../domain/context'; -import { PluginInfo, PluginCollection, PluginPlatform } from 'amplify-cli-core'; +import { PluginInfo, PluginCollection, PluginPlatform } from '@aws-amplify/amplify-cli-core'; const defaultIndentationStr = ' '; diff --git a/packages/amplify-cli/src/plugin-helpers/platform-health-check.ts b/packages/amplify-cli/src/plugin-helpers/platform-health-check.ts index 0d457ff61dc..8df24d6f031 100644 --- a/packages/amplify-cli/src/plugin-helpers/platform-health-check.ts +++ b/packages/amplify-cli/src/plugin-helpers/platform-health-check.ts @@ -3,7 +3,7 @@ /* eslint-disable @typescript-eslint/explicit-function-return-type */ import * as path from 'path'; import chalk from 'chalk'; -import { JSONUtilities, $TSAny, PluginInfo, PluginPlatform } from 'amplify-cli-core'; +import { JSONUtilities, $TSAny, PluginInfo, PluginPlatform } from '@aws-amplify/amplify-cli-core'; import { satisfies } from 'semver'; /** diff --git a/packages/amplify-cli/src/plugin-helpers/scan-plugin-platform.ts b/packages/amplify-cli/src/plugin-helpers/scan-plugin-platform.ts index 2b71bcd12b0..30603163d6d 100644 --- a/packages/amplify-cli/src/plugin-helpers/scan-plugin-platform.ts +++ b/packages/amplify-cli/src/plugin-helpers/scan-plugin-platform.ts @@ -15,7 +15,7 @@ import { constants, PluginManifest, PluginInfo, -} from 'amplify-cli-core'; +} from '@aws-amplify/amplify-cli-core'; import sequential from 'promise-sequential'; export async function scanPluginPlatform(pluginPlatform?: PluginPlatform): Promise { diff --git a/packages/amplify-cli/src/plugin-helpers/verify-plugin.ts b/packages/amplify-cli/src/plugin-helpers/verify-plugin.ts index f835173ee93..79aa7d646a0 100644 --- a/packages/amplify-cli/src/plugin-helpers/verify-plugin.ts +++ b/packages/amplify-cli/src/plugin-helpers/verify-plugin.ts @@ -1,6 +1,13 @@ import * as path from 'path'; import * as fs from 'fs-extra'; -import { PluginManifest, constants, JSONUtilities, $TSAny, PluginVerificationResult, PluginVerificationError } from 'amplify-cli-core'; +import { + PluginManifest, + constants, + JSONUtilities, + $TSAny, + PluginVerificationResult, + PluginVerificationError, +} from '@aws-amplify/amplify-cli-core'; type VerificationContext = { pluginDirPath: string; diff --git a/packages/amplify-cli/src/plugin-manager.ts b/packages/amplify-cli/src/plugin-manager.ts index e2d7f92c1ed..4ef16cab49e 100644 --- a/packages/amplify-cli/src/plugin-manager.ts +++ b/packages/amplify-cli/src/plugin-manager.ts @@ -1,5 +1,5 @@ import * as inquirer from 'inquirer'; -import { PluginPlatform, PluginInfo, AmplifyEvent, constants, print } from 'amplify-cli-core'; +import { PluginPlatform, PluginInfo, AmplifyEvent, constants, print } from '@aws-amplify/amplify-cli-core'; import { readPluginsJsonFile, writePluginsJsonFile } from './plugin-helpers/access-plugins-file'; import { scanPluginPlatform, diff --git a/packages/amplify-cli/src/pre-deployment-pull.ts b/packages/amplify-cli/src/pre-deployment-pull.ts index 46efdf4cc78..d337a4d7968 100644 --- a/packages/amplify-cli/src/pre-deployment-pull.ts +++ b/packages/amplify-cli/src/pre-deployment-pull.ts @@ -1,5 +1,5 @@ import { run } from '@aws-amplify/amplify-app'; -import { $TSContext, AmplifyError, AMPLIFY_SUPPORT_DOCS, pathManager } from 'amplify-cli-core'; +import { $TSContext, AmplifyError, AMPLIFY_SUPPORT_DOCS, pathManager } from '@aws-amplify/amplify-cli-core'; import * as fs from 'fs-extra'; import fetch from 'node-fetch'; import * as path from 'path'; diff --git a/packages/amplify-cli/src/project-config-version-check.ts b/packages/amplify-cli/src/project-config-version-check.ts index 1cda5e55e1d..3c0b77e2e13 100644 --- a/packages/amplify-cli/src/project-config-version-check.ts +++ b/packages/amplify-cli/src/project-config-version-check.ts @@ -6,7 +6,7 @@ import glob from 'glob'; import { coerce, lt } from 'semver'; import { Context } from './domain/context'; import { ConfirmQuestion } from 'inquirer'; -import { pathManager, stateManager, readCFNTemplate, writeCFNTemplate } from 'amplify-cli-core'; +import { pathManager, stateManager, readCFNTemplate, writeCFNTemplate } from '@aws-amplify/amplify-cli-core'; import Resource from 'cloudform-types/types/resource'; import Lambda from 'cloudform-types/types/lambda'; diff --git a/packages/amplify-cli/src/pull-backend.ts b/packages/amplify-cli/src/pull-backend.ts index ab9d9a05a74..189ee9dba79 100644 --- a/packages/amplify-cli/src/pull-backend.ts +++ b/packages/amplify-cli/src/pull-backend.ts @@ -1,4 +1,4 @@ -import { exitOnNextTick, stateManager, $TSAny, $TSContext } from 'amplify-cli-core'; +import { exitOnNextTick, stateManager, $TSAny, $TSContext } from '@aws-amplify/amplify-cli-core'; import { initializeEnv } from './initialize-env'; import { postPullCodegen } from './amplify-service-helper'; import { printer } from '@aws-amplify/amplify-prompts'; diff --git a/packages/amplify-cli/src/utils/headless-input-utils.ts b/packages/amplify-cli/src/utils/headless-input-utils.ts index 1661cf88f8e..e070df41511 100644 --- a/packages/amplify-cli/src/utils/headless-input-utils.ts +++ b/packages/amplify-cli/src/utils/headless-input-utils.ts @@ -1,7 +1,7 @@ import readline from 'readline'; import { Context } from '../domain/context'; import { normalizeInputParams } from '../input-params-manager'; -import { $TSContext } from 'amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; const headlessPayloadReadTimeoutMilliseconds = 2000; diff --git a/packages/amplify-cli/src/utils/mobilehub-support.ts b/packages/amplify-cli/src/utils/mobilehub-support.ts index c9299735878..328833204b6 100644 --- a/packages/amplify-cli/src/utils/mobilehub-support.ts +++ b/packages/amplify-cli/src/utils/mobilehub-support.ts @@ -1,4 +1,4 @@ -import { $TSContext, AmplifyError, pathManager, stateManager } from 'amplify-cli-core'; +import { $TSContext, AmplifyError, pathManager, stateManager } from '@aws-amplify/amplify-cli-core'; /** * Mobile hub command compatibility check diff --git a/packages/amplify-cli/src/utils/post-install-initialization.ts b/packages/amplify-cli/src/utils/post-install-initialization.ts index e66ad5a437b..18e47c8e9b4 100644 --- a/packages/amplify-cli/src/utils/post-install-initialization.ts +++ b/packages/amplify-cli/src/utils/post-install-initialization.ts @@ -1,4 +1,4 @@ -import { GetPackageAssetPaths, pathManager } from 'amplify-cli-core'; +import { GetPackageAssetPaths, pathManager } from '@aws-amplify/amplify-cli-core'; import * as fs from 'fs-extra'; import * as path from 'path'; diff --git a/packages/amplify-cli/src/utils/team-provider-migrate.ts b/packages/amplify-cli/src/utils/team-provider-migrate.ts index 39585bd6110..621f8be89b0 100644 --- a/packages/amplify-cli/src/utils/team-provider-migrate.ts +++ b/packages/amplify-cli/src/utils/team-provider-migrate.ts @@ -1,6 +1,6 @@ import { externalAuthEnable } from '@aws-amplify/amplify-category-auth'; import { ensureEnvParamManager, getEnvParamManager } from '@aws-amplify/amplify-environment-parameters'; -import { mergeDeploymentSecrets, PathConstants, pathManager, stateManager } from 'amplify-cli-core'; +import { mergeDeploymentSecrets, PathConstants, pathManager, stateManager } from '@aws-amplify/amplify-cli-core'; import chalk from 'chalk'; import { Context } from '../domain/context'; import { getRootStackId } from '../extensions/amplify-helpers/get-root-stack-id'; diff --git a/packages/amplify-cli/src/utils/verify-expected-env-params.ts b/packages/amplify-cli/src/utils/verify-expected-env-params.ts index f77e29f1a3e..c5c46a6610c 100644 --- a/packages/amplify-cli/src/utils/verify-expected-env-params.ts +++ b/packages/amplify-cli/src/utils/verify-expected-env-params.ts @@ -1,4 +1,4 @@ -import { $TSContext, IAmplifyResource, stateManager, constants } from 'amplify-cli-core'; +import { $TSContext, IAmplifyResource, stateManager, constants } from '@aws-amplify/amplify-cli-core'; import { ensureEnvParamManager, IEnvironmentParameterManager, ServiceDownloadHandler } from '@aws-amplify/amplify-environment-parameters'; import { printer, prompter } from '@aws-amplify/amplify-prompts'; import { getChangedResources, getAllResources } from '../commands/build'; diff --git a/packages/amplify-cli/src/utils/win-constants.ts b/packages/amplify-cli/src/utils/win-constants.ts index 6b10c4a65a5..ab34a36b2c4 100644 --- a/packages/amplify-cli/src/utils/win-constants.ts +++ b/packages/amplify-cli/src/utils/win-constants.ts @@ -1,5 +1,5 @@ import * as path from 'path'; -import { pathManager } from 'amplify-cli-core'; +import { pathManager } from '@aws-amplify/amplify-cli-core'; import { homedir, tmpdir } from 'os'; export const oldVersionPath = path.join(pathManager.getHomeDotAmplifyDirPath(), 'bin', 'amplify-old.exe'); diff --git a/packages/amplify-cli/src/version-notifier.ts b/packages/amplify-cli/src/version-notifier.ts index 7026ddd5ef1..ab9a214ed37 100644 --- a/packages/amplify-cli/src/version-notifier.ts +++ b/packages/amplify-cli/src/version-notifier.ts @@ -1,4 +1,4 @@ -import { JSONUtilities, $TSAny, isPackaged } from 'amplify-cli-core'; +import { JSONUtilities, $TSAny, isPackaged } from '@aws-amplify/amplify-cli-core'; import { default as updateNotifier } from 'update-notifier'; import path from 'path'; import chalk from 'chalk'; diff --git a/packages/amplify-console-integration-tests/package.json b/packages/amplify-console-integration-tests/package.json index fefb80e5432..840d9f363a5 100644 --- a/packages/amplify-console-integration-tests/package.json +++ b/packages/amplify-console-integration-tests/package.json @@ -21,9 +21,9 @@ "setup-profile": "ts-node ./src/setup-profile.ts" }, "dependencies": { + "@aws-amplify/amplify-cli-core": "4.0.1", "@aws-amplify/amplify-e2e-core": "4.8.1", "@types/ini": "^1.3.30", - "amplify-cli-core": "4.0.1", "aws-sdk": "^2.1350.0", "dotenv": "^8.2.0", "fs-extra": "^8.1.0", diff --git a/packages/amplify-console-integration-tests/src/pullAndInit/amplifyArtifactsManager.ts b/packages/amplify-console-integration-tests/src/pullAndInit/amplifyArtifactsManager.ts index e2199dde9d7..4e30686a523 100644 --- a/packages/amplify-console-integration-tests/src/pullAndInit/amplifyArtifactsManager.ts +++ b/packages/amplify-console-integration-tests/src/pullAndInit/amplifyArtifactsManager.ts @@ -1,6 +1,6 @@ import * as path from 'path'; import * as fs from 'fs-extra'; -import { $TSAny } from 'amplify-cli-core'; +import { $TSAny } from '@aws-amplify/amplify-cli-core'; import * as util from '../util'; export const removeDotConfigDir = (projectRootDirPath: string): void => { diff --git a/packages/amplify-dynamodb-simulator/index.js b/packages/amplify-dynamodb-simulator/index.js index de2c093066b..33dfb64eb36 100644 --- a/packages/amplify-dynamodb-simulator/index.js +++ b/packages/amplify-dynamodb-simulator/index.js @@ -6,7 +6,7 @@ const detectPort = require('detect-port'); // eslint-disable-next-line spellcheck/spell-checker const log = require('logdown')('dynamodb-emulator'); const execa = require('execa'); -const { pathManager } = require('amplify-cli-core'); +const { pathManager } = require('@aws-amplify/amplify-cli-core'); // random port I chose in the ephemeral range. const basePort = 62224; diff --git a/packages/amplify-dynamodb-simulator/package.json b/packages/amplify-dynamodb-simulator/package.json index 64574137269..685ca4c9977 100644 --- a/packages/amplify-dynamodb-simulator/package.json +++ b/packages/amplify-dynamodb-simulator/package.json @@ -21,7 +21,7 @@ "test": "jest --logHeapUsage --passWithNoTests" }, "dependencies": { - "amplify-cli-core": "4.0.1", + "@aws-amplify/amplify-cli-core": "4.0.1", "aws-sdk": "^2.1350.0", "detect-port": "^1.3.0", "execa": "^5.1.1", diff --git a/packages/amplify-e2e-core/package.json b/packages/amplify-e2e-core/package.json index 6edc1dd7fea..9b20e15928b 100644 --- a/packages/amplify-e2e-core/package.json +++ b/packages/amplify-e2e-core/package.json @@ -22,7 +22,7 @@ "clean": "rimraf ./lib tsconfig.tsbuildinfo" }, "dependencies": { - "amplify-cli-core": "4.0.1", + "@aws-amplify/amplify-cli-core": "4.0.1", "amplify-headless-interface": "1.17.1", "aws-sdk": "^2.1350.0", "chalk": "^4.1.1", diff --git a/packages/amplify-e2e-core/src/categories/api.ts b/packages/amplify-e2e-core/src/categories/api.ts index 88253f49646..468cf2fc291 100644 --- a/packages/amplify-e2e-core/src/categories/api.ts +++ b/packages/amplify-e2e-core/src/categories/api.ts @@ -4,7 +4,7 @@ /* eslint-disable prefer-arrow/prefer-arrow-functions */ /* eslint-disable func-style */ /* eslint-disable @typescript-eslint/explicit-function-return-type */ -import { $TSAny } from 'amplify-cli-core'; +import { $TSAny } from '@aws-amplify/amplify-cli-core'; import * as fs from 'fs-extra'; import _ from 'lodash'; import * as path from 'path'; diff --git a/packages/amplify-e2e-core/src/categories/custom.ts b/packages/amplify-e2e-core/src/categories/custom.ts index 499f48e2384..e81a5959cc9 100644 --- a/packages/amplify-e2e-core/src/categories/custom.ts +++ b/packages/amplify-e2e-core/src/categories/custom.ts @@ -1,6 +1,6 @@ import { nspawn as spawn, KEY_DOWN_ARROW, getCLIPath } from '..'; import path from 'path'; -import { JSONUtilities } from 'amplify-cli-core'; +import { JSONUtilities } from '@aws-amplify/amplify-cli-core'; export const addCDKCustomResource = async (cwd: string, settings: any): Promise => { await spawn(getCLIPath(), ['add', 'custom'], { cwd, stripColors: true }) diff --git a/packages/amplify-e2e-core/src/categories/lambda-layer.ts b/packages/amplify-e2e-core/src/categories/lambda-layer.ts index e1ddd5818d0..14b8da5d896 100644 --- a/packages/amplify-e2e-core/src/categories/lambda-layer.ts +++ b/packages/amplify-e2e-core/src/categories/lambda-layer.ts @@ -1,5 +1,5 @@ /* eslint-disable import/no-cycle */ -import { $TSAny, $TSMeta, $TSObject, JSONUtilities } from 'amplify-cli-core'; +import { $TSAny, $TSMeta, $TSObject, JSONUtilities } from '@aws-amplify/amplify-cli-core'; import * as fs from 'fs-extra'; import * as path from 'path'; import { ExecutionContext, getCLIPath, nspawn as spawn } from '..'; diff --git a/packages/amplify-e2e-core/src/index.ts b/packages/amplify-e2e-core/src/index.ts index e232c8c23fa..fe4cc70584a 100644 --- a/packages/amplify-e2e-core/src/index.ts +++ b/packages/amplify-e2e-core/src/index.ts @@ -9,7 +9,7 @@ import * as ini from 'ini'; import { spawnSync } from 'child_process'; import { v4 as uuid } from 'uuid'; -import { pathManager } from 'amplify-cli-core'; +import { pathManager } from '@aws-amplify/amplify-cli-core'; import { gt } from 'semver'; import { sleep } from '.'; diff --git a/packages/amplify-e2e-core/src/init/deleteProject.ts b/packages/amplify-e2e-core/src/init/deleteProject.ts index f74f0a295e7..ef9594065f0 100644 --- a/packages/amplify-e2e-core/src/init/deleteProject.ts +++ b/packages/amplify-e2e-core/src/init/deleteProject.ts @@ -1,7 +1,7 @@ /* eslint-disable import/no-cycle */ import { nspawn as spawn, retry, getCLIPath, describeCloudFormationStack } from '..'; import { getBackendAmplifyMeta } from '../utils'; -import { $TSAny } from 'amplify-cli-core'; +import { $TSAny } from '@aws-amplify/amplify-cli-core'; /** * Runs `amplify delete` diff --git a/packages/amplify-e2e-core/src/utils/add-circleci-tags.ts b/packages/amplify-e2e-core/src/utils/add-circleci-tags.ts index 8f3bd3684f0..28233a17f43 100644 --- a/packages/amplify-e2e-core/src/utils/add-circleci-tags.ts +++ b/packages/amplify-e2e-core/src/utils/add-circleci-tags.ts @@ -1,4 +1,4 @@ -import { stateManager } from 'amplify-cli-core'; +import { stateManager } from '@aws-amplify/amplify-cli-core'; declare global { /* eslint-disable @typescript-eslint/no-namespace */ diff --git a/packages/amplify-e2e-core/src/utils/feature-flags.ts b/packages/amplify-e2e-core/src/utils/feature-flags.ts index 8c7a581296f..0f45edf4131 100644 --- a/packages/amplify-e2e-core/src/utils/feature-flags.ts +++ b/packages/amplify-e2e-core/src/utils/feature-flags.ts @@ -1,5 +1,5 @@ import _ from 'lodash'; -import { pathManager, FeatureFlagsEntry, JSONUtilities } from 'amplify-cli-core'; +import { pathManager, FeatureFlagsEntry, JSONUtilities } from '@aws-amplify/amplify-cli-core'; type FeatureFlagData = { features: FeatureFlagsEntry }; const getFeatureFlagFilePath = (projectRoot: string) => { diff --git a/packages/amplify-e2e-core/src/utils/projectMeta.ts b/packages/amplify-e2e-core/src/utils/projectMeta.ts index 57a6a4293cf..78177f2872e 100644 --- a/packages/amplify-e2e-core/src/utils/projectMeta.ts +++ b/packages/amplify-e2e-core/src/utils/projectMeta.ts @@ -2,7 +2,7 @@ import * as path from 'path'; import * as os from 'os'; import * as fs from 'fs-extra'; import _ from 'lodash'; -import { JSONUtilities, $TSAny } from 'amplify-cli-core'; +import { JSONUtilities, $TSAny } from '@aws-amplify/amplify-cli-core'; // eslint-disable-next-line spellcheck/spell-checker export const getAWSConfigAndroidPath = (projectRoot: string): string => diff --git a/packages/amplify-e2e-core/src/utils/sdk-calls.ts b/packages/amplify-e2e-core/src/utils/sdk-calls.ts index d3be77ed35f..0ebc0b24adf 100644 --- a/packages/amplify-e2e-core/src/utils/sdk-calls.ts +++ b/packages/amplify-e2e-core/src/utils/sdk-calls.ts @@ -20,7 +20,7 @@ import { } from 'aws-sdk'; import * as path from 'path'; import _ from 'lodash'; -import { $TSAny } from 'amplify-cli-core'; +import { $TSAny } from '@aws-amplify/amplify-cli-core'; import { getProjectMeta } from './projectMeta'; export const getDDBTable = async (tableName: string, region: string) => { diff --git a/packages/amplify-e2e-tests/package.json b/packages/amplify-e2e-tests/package.json index 1c906caecd1..65c2c113142 100644 --- a/packages/amplify-e2e-tests/package.json +++ b/packages/amplify-e2e-tests/package.json @@ -25,13 +25,13 @@ }, "dependencies": { "@aws-amplify/amplify-category-auth": "3.0.1", + "@aws-amplify/amplify-cli-core": "4.0.1", "@aws-amplify/amplify-e2e-core": "4.8.1", "@aws-amplify/amplify-opensearch-simulator": "1.2.3", "@aws-amplify/graphql-transformer-core": "^1.2.0", "@aws-sdk/client-appsync": "^3.303.0", "@aws-sdk/client-dynamodb": "^3.303.0", "@aws-sdk/client-ssm": "^3.303.0", - "amplify-cli-core": "4.0.1", "amplify-dynamodb-simulator": "2.5.10", "amplify-headless-interface": "1.17.1", "amplify-storage-simulator": "1.7.4", diff --git a/packages/amplify-e2e-tests/src/__tests__/analytics-pinpoint-js.test.ts b/packages/amplify-e2e-tests/src/__tests__/analytics-pinpoint-js.test.ts index 51b7fe1a5a2..5c8f4552edc 100644 --- a/packages/amplify-e2e-tests/src/__tests__/analytics-pinpoint-js.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/analytics-pinpoint-js.test.ts @@ -11,7 +11,7 @@ import { import * as fs from 'fs-extra'; import * as path from 'path'; import _ from 'lodash'; -import { JSONUtilities } from 'amplify-cli-core'; +import { JSONUtilities } from '@aws-amplify/amplify-cli-core'; describe('amplify add analytics', () => { let projRoot: string; diff --git a/packages/amplify-e2e-tests/src/__tests__/apigw.test.ts b/packages/amplify-e2e-tests/src/__tests__/apigw.test.ts index cfdb89876b0..c8139062d5f 100644 --- a/packages/amplify-e2e-tests/src/__tests__/apigw.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/apigw.test.ts @@ -11,7 +11,7 @@ import { getProjectMeta, initJSProjectWithProfile, } from '@aws-amplify/amplify-e2e-core'; -import { JSONUtilities, pathManager, stateManager } from 'amplify-cli-core'; +import { JSONUtilities, pathManager, stateManager } from '@aws-amplify/amplify-cli-core'; import * as fs from 'fs-extra'; import * as path from 'path'; import { v4 as uuid } from 'uuid'; diff --git a/packages/amplify-e2e-tests/src/__tests__/auth_6.test.ts b/packages/amplify-e2e-tests/src/__tests__/auth_6.test.ts index 5adb43a1c82..e24249e8859 100644 --- a/packages/amplify-e2e-tests/src/__tests__/auth_6.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/auth_6.test.ts @@ -1,4 +1,4 @@ -import { $TSAny } from 'amplify-cli-core'; +import { $TSAny } from '@aws-amplify/amplify-cli-core'; import { addAuthWithDefault, addAuthWithMaxOptions, diff --git a/packages/amplify-e2e-tests/src/__tests__/configure-project.test.ts b/packages/amplify-e2e-tests/src/__tests__/configure-project.test.ts index 5a3d47c60b7..b3000911320 100644 --- a/packages/amplify-e2e-tests/src/__tests__/configure-project.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/configure-project.test.ts @@ -5,7 +5,7 @@ import { deleteProjectDir, initJSProjectWithProfile, } from '@aws-amplify/amplify-e2e-core'; -import { stateManager } from 'amplify-cli-core'; +import { stateManager } from '@aws-amplify/amplify-cli-core'; describe('amplify configure project tests', () => { let projRoot: string; diff --git a/packages/amplify-e2e-tests/src/__tests__/custom_policies_container.test.ts b/packages/amplify-e2e-tests/src/__tests__/custom_policies_container.test.ts index f0eb012c049..46284ba04cf 100644 --- a/packages/amplify-e2e-tests/src/__tests__/custom_policies_container.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/custom_policies_container.test.ts @@ -11,7 +11,7 @@ import { deleteProjectDir, } from '@aws-amplify/amplify-e2e-core'; import _ from 'lodash'; -import { JSONUtilities } from 'amplify-cli-core'; +import { JSONUtilities } from '@aws-amplify/amplify-cli-core'; import AWS from 'aws-sdk'; import path from 'path'; diff --git a/packages/amplify-e2e-tests/src/__tests__/custom_policies_function.test.ts b/packages/amplify-e2e-tests/src/__tests__/custom_policies_function.test.ts index 0488ee329c2..542fab0d2d7 100644 --- a/packages/amplify-e2e-tests/src/__tests__/custom_policies_function.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/custom_policies_function.test.ts @@ -13,7 +13,8 @@ import { deleteProjectDir, generateRandomShortId, } from '@aws-amplify/amplify-e2e-core'; -import { JSONUtilities } from 'amplify-cli-core'; + +import { JSONUtilities } from '@aws-amplify/amplify-cli-core'; import { GetParameterCommand, PutParameterCommand, SSMClient } from '@aws-sdk/client-ssm'; const customIAMPolicy: CustomIAMPolicy = { diff --git a/packages/amplify-e2e-tests/src/__tests__/custom_resources.test.ts b/packages/amplify-e2e-tests/src/__tests__/custom_resources.test.ts index 2ff1f3ef3a6..fdf20042169 100644 --- a/packages/amplify-e2e-tests/src/__tests__/custom_resources.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/custom_resources.test.ts @@ -1,4 +1,4 @@ -import { isWindowsPlatform, JSONUtilities } from 'amplify-cli-core'; +import { isWindowsPlatform, JSONUtilities } from '@aws-amplify/amplify-cli-core'; import { addCDKCustomResource, addCFNCustomResource, diff --git a/packages/amplify-e2e-tests/src/__tests__/dynamodb-simulator/dynamodb-simulator.test.ts b/packages/amplify-e2e-tests/src/__tests__/dynamodb-simulator/dynamodb-simulator.test.ts index db4435cb96c..1c341f94d60 100644 --- a/packages/amplify-e2e-tests/src/__tests__/dynamodb-simulator/dynamodb-simulator.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/dynamodb-simulator/dynamodb-simulator.test.ts @@ -3,7 +3,7 @@ const ddbSimulator = require('amplify-dynamodb-simulator'); const fs = require('fs-extra'); jest.setTimeout(90 * 1000); -jest.mock('amplify-cli-core', () => ({ +jest.mock('@aws-amplify/amplify-cli-core', () => ({ pathManager: { getAmplifyPackageLibDirPath: jest.fn().mockReturnValue(path.join(process.cwd(), '../', '/amplify-dynamodb-simulator')), }, diff --git a/packages/amplify-e2e-tests/src/__tests__/export.test.ts b/packages/amplify-e2e-tests/src/__tests__/export.test.ts index bc6e553c7ff..cc618c888be 100644 --- a/packages/amplify-e2e-tests/src/__tests__/export.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/export.test.ts @@ -11,7 +11,7 @@ import { initJSProjectWithProfile, } from '@aws-amplify/amplify-e2e-core'; import * as path from 'path'; -import { JSONUtilities, readCFNTemplate } from 'amplify-cli-core'; +import { JSONUtilities, readCFNTemplate } from '@aws-amplify/amplify-cli-core'; describe('amplify export backend', () => { let projRoot: string; diff --git a/packages/amplify-e2e-tests/src/__tests__/feature-flags.test.ts b/packages/amplify-e2e-tests/src/__tests__/feature-flags.test.ts index c42d6edbbca..fb680b7fbdd 100644 --- a/packages/amplify-e2e-tests/src/__tests__/feature-flags.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/feature-flags.test.ts @@ -10,7 +10,7 @@ import { createNewProjectDir, deleteProjectDir, } from '@aws-amplify/amplify-e2e-core'; -import { pathManager } from 'amplify-cli-core'; +import { pathManager } from '@aws-amplify/amplify-cli-core'; import { addEnvironment } from '../environment/env'; describe('feature flags', () => { diff --git a/packages/amplify-e2e-tests/src/__tests__/function_3b.test.ts b/packages/amplify-e2e-tests/src/__tests__/function_3b.test.ts index 6e56d04a534..cb4364eb93b 100644 --- a/packages/amplify-e2e-tests/src/__tests__/function_3b.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/function_3b.test.ts @@ -15,7 +15,7 @@ import { createNewDynamoDBForCrudTemplate, addKinesis, } from '@aws-amplify/amplify-e2e-core'; -import { AmplifyCategories, JSONUtilities, pathManager } from 'amplify-cli-core'; +import { AmplifyCategories, JSONUtilities, pathManager } from '@aws-amplify/amplify-cli-core'; describe('dotnet function tests', () => { const helloWorldSuccessObj = { diff --git a/packages/amplify-e2e-tests/src/__tests__/import_auth_1a.test.ts b/packages/amplify-e2e-tests/src/__tests__/import_auth_1a.test.ts index 34db7854f46..d31cfdb86e2 100644 --- a/packages/amplify-e2e-tests/src/__tests__/import_auth_1a.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/import_auth_1a.test.ts @@ -1,4 +1,4 @@ -import { $TSObject, JSONUtilities } from 'amplify-cli-core'; +import { $TSObject, JSONUtilities } from '@aws-amplify/amplify-cli-core'; import { addApiWithCognitoUserPoolAuthTypeWhenAuthExists, addAuthUserPoolOnlyWithOAuth, diff --git a/packages/amplify-e2e-tests/src/__tests__/import_auth_1b.test.ts b/packages/amplify-e2e-tests/src/__tests__/import_auth_1b.test.ts index ca9ae78788f..1872e8ea9d4 100644 --- a/packages/amplify-e2e-tests/src/__tests__/import_auth_1b.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/import_auth_1b.test.ts @@ -1,4 +1,4 @@ -import { stateManager } from 'amplify-cli-core'; +import { stateManager } from '@aws-amplify/amplify-cli-core'; import { addApi, addAuthUserPoolOnlyWithOAuth, diff --git a/packages/amplify-e2e-tests/src/__tests__/import_dynamodb_1.test.ts b/packages/amplify-e2e-tests/src/__tests__/import_dynamodb_1.test.ts index d7e9518fdef..afc0ff3784d 100644 --- a/packages/amplify-e2e-tests/src/__tests__/import_dynamodb_1.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/import_dynamodb_1.test.ts @@ -1,4 +1,4 @@ -import { $TSObject, JSONUtilities } from 'amplify-cli-core'; +import { $TSObject, JSONUtilities } from '@aws-amplify/amplify-cli-core'; import { addAuthWithDefault, AddDynamoDBSettings, diff --git a/packages/amplify-e2e-tests/src/__tests__/import_s3_1.test.ts b/packages/amplify-e2e-tests/src/__tests__/import_s3_1.test.ts index 5fedfd56df8..5e8c4a7f579 100644 --- a/packages/amplify-e2e-tests/src/__tests__/import_s3_1.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/import_s3_1.test.ts @@ -1,6 +1,6 @@ import * as path from 'path'; import * as fs from 'fs-extra'; -import { $TSObject, JSONUtilities } from 'amplify-cli-core'; +import { $TSObject, JSONUtilities } from '@aws-amplify/amplify-cli-core'; import { addAuthWithDefault, addFunction, diff --git a/packages/amplify-e2e-tests/src/__tests__/init_a.test.ts b/packages/amplify-e2e-tests/src/__tests__/init_a.test.ts index 840d0799d65..a8fe2ac5343 100644 --- a/packages/amplify-e2e-tests/src/__tests__/init_a.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/init_a.test.ts @@ -14,7 +14,7 @@ import { deleteProjectDir, } from '@aws-amplify/amplify-e2e-core'; -import { JSONUtilities } from 'amplify-cli-core'; +import { JSONUtilities } from '@aws-amplify/amplify-cli-core'; import { SandboxApp } from '../types/SandboxApp'; diff --git a/packages/amplify-e2e-tests/src/__tests__/init_d.test.ts b/packages/amplify-e2e-tests/src/__tests__/init_d.test.ts index 6113cf59d80..3bd8ccb96f3 100644 --- a/packages/amplify-e2e-tests/src/__tests__/init_d.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/init_d.test.ts @@ -10,7 +10,7 @@ import { createNewProjectDir, deleteProjectDir, } from '@aws-amplify/amplify-e2e-core'; -import { isWindowsPlatform } from 'amplify-cli-core'; +import { isWindowsPlatform } from '@aws-amplify/amplify-cli-core'; describe('amplify init d', () => { let projRoot: string; diff --git a/packages/amplify-e2e-tests/src/__tests__/opensearch-simulator/opensearch-simulator.test.ts b/packages/amplify-e2e-tests/src/__tests__/opensearch-simulator/opensearch-simulator.test.ts index fab0e38a564..276b8d70e8b 100644 --- a/packages/amplify-e2e-tests/src/__tests__/opensearch-simulator/opensearch-simulator.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/opensearch-simulator/opensearch-simulator.test.ts @@ -2,7 +2,7 @@ import * as openSearchEmulator from '@aws-amplify/amplify-opensearch-simulator'; import fs from 'fs-extra'; import { join } from 'path'; import * as openpgp from 'openpgp'; -import cliCore from 'amplify-cli-core'; +import cliCore from '@aws-amplify/amplify-cli-core'; import { v4 } from 'uuid'; import execa from 'execa'; @@ -11,8 +11,8 @@ jest.setTimeout(90 * 1000); const execaMock = execa as jest.MockedFunction; (execaMock as any).mockImplementation(async () => ({ stdout: 'mock-process-output' })); -jest.mock('amplify-cli-core', () => ({ - ...(jest.requireActual('amplify-cli-core') as {}), +jest.mock('@aws-amplify/amplify-cli-core', () => ({ + ...(jest.requireActual('@aws-amplify/amplify-cli-core') as {}), pathManager: { getAmplifyPackageLibDirPath: jest.fn().mockReturnValue('mock-path-to-lib'), }, diff --git a/packages/amplify-e2e-tests/src/__tests__/pinpoint/analytics-pinpoint-config-util.ts b/packages/amplify-e2e-tests/src/__tests__/pinpoint/analytics-pinpoint-config-util.ts index 45ca29c848d..71f0ea21a85 100644 --- a/packages/amplify-e2e-tests/src/__tests__/pinpoint/analytics-pinpoint-config-util.ts +++ b/packages/amplify-e2e-tests/src/__tests__/pinpoint/analytics-pinpoint-config-util.ts @@ -9,7 +9,7 @@ import { getAppId, removeAnalytics, } from '@aws-amplify/amplify-e2e-core'; -import { JSONUtilities, $TSAny } from 'amplify-cli-core'; +import { JSONUtilities, $TSAny } from '@aws-amplify/amplify-cli-core'; import { getAmplifyFlutterConfig } from '@aws-amplify/amplify-e2e-core'; import { getAWSExports } from '../../schema-api-directives/authHelper'; diff --git a/packages/amplify-e2e-tests/src/__tests__/pinpoint/notifications-pinpoint-config-util.ts b/packages/amplify-e2e-tests/src/__tests__/pinpoint/notifications-pinpoint-config-util.ts index 56d5c00d2cf..faf56149221 100644 --- a/packages/amplify-e2e-tests/src/__tests__/pinpoint/notifications-pinpoint-config-util.ts +++ b/packages/amplify-e2e-tests/src/__tests__/pinpoint/notifications-pinpoint-config-util.ts @@ -8,7 +8,7 @@ import { getAppId, removeAllNotificationChannel, } from '@aws-amplify/amplify-e2e-core'; -import { $TSAny, JSONUtilities } from 'amplify-cli-core'; +import { $TSAny, JSONUtilities } from '@aws-amplify/amplify-cli-core'; import * as fs from 'fs-extra'; import * as path from 'path'; import { getShortId } from '../../import-helpers'; diff --git a/packages/amplify-e2e-tests/src/__tests__/schema-iterative-update-locking.test.ts b/packages/amplify-e2e-tests/src/__tests__/schema-iterative-update-locking.test.ts index 7044244832f..68980d69152 100644 --- a/packages/amplify-e2e-tests/src/__tests__/schema-iterative-update-locking.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/schema-iterative-update-locking.test.ts @@ -15,7 +15,7 @@ import { sleep, } from '@aws-amplify/amplify-e2e-core'; import S3 from 'aws-sdk/clients/s3'; -import { DeploymentState, DeploymentStatus, JSONUtilities } from 'amplify-cli-core'; +import { DeploymentState, DeploymentStatus, JSONUtilities } from '@aws-amplify/amplify-cli-core'; describe('Schema iterative update - locking', () => { let projectRoot: string; diff --git a/packages/amplify-e2e-tests/src/__tests__/storage-1a.test.ts b/packages/amplify-e2e-tests/src/__tests__/storage-1a.test.ts index b25f60ca5e3..5441e5cb13b 100644 --- a/packages/amplify-e2e-tests/src/__tests__/storage-1a.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/storage-1a.test.ts @@ -1,4 +1,4 @@ -import { $TSAny } from 'amplify-cli-core'; +import { $TSAny } from '@aws-amplify/amplify-cli-core'; import { addAuthWithDefault, addS3AndAuthWithAuthOnlyAccess, diff --git a/packages/amplify-e2e-tests/src/__tests__/storage-1b.test.ts b/packages/amplify-e2e-tests/src/__tests__/storage-1b.test.ts index bf5b2263fed..c513d1249ff 100644 --- a/packages/amplify-e2e-tests/src/__tests__/storage-1b.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/storage-1b.test.ts @@ -1,4 +1,4 @@ -import { $TSAny } from 'amplify-cli-core'; +import { $TSAny } from '@aws-amplify/amplify-cli-core'; import { addAuthWithDefault, addAuthWithGroupsAndAdminAPI, diff --git a/packages/amplify-e2e-tests/src/__tests__/storage-5.test.ts b/packages/amplify-e2e-tests/src/__tests__/storage-5.test.ts index 6cfc9d14731..17c13016a49 100644 --- a/packages/amplify-e2e-tests/src/__tests__/storage-5.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/storage-5.test.ts @@ -1,4 +1,4 @@ -import { $TSAny, $TSObject, JSONUtilities } from 'amplify-cli-core'; +import { $TSAny, $TSObject, JSONUtilities } from '@aws-amplify/amplify-cli-core'; import { addAuthWithDefault, addDDBWithTrigger, diff --git a/packages/amplify-e2e-tests/src/amplify-app-helpers/amplify-app-validation.ts b/packages/amplify-e2e-tests/src/amplify-app-helpers/amplify-app-validation.ts index f4a3ba401c1..733dd66d6c4 100644 --- a/packages/amplify-e2e-tests/src/amplify-app-helpers/amplify-app-validation.ts +++ b/packages/amplify-e2e-tests/src/amplify-app-helpers/amplify-app-validation.ts @@ -1,6 +1,6 @@ import * as fs from 'fs-extra'; import * as path from 'path'; -import { pathManager } from 'amplify-cli-core'; +import { pathManager } from '@aws-amplify/amplify-cli-core'; function validateProject(projRoot: string, platform: string) { expect(fs.existsSync(path.join(projRoot, 'amplify'))).toBe(true); diff --git a/packages/amplify-e2e-tests/src/import-helpers/expects.ts b/packages/amplify-e2e-tests/src/import-helpers/expects.ts index 6071b30ae24..8c3ed780778 100644 --- a/packages/amplify-e2e-tests/src/import-helpers/expects.ts +++ b/packages/amplify-e2e-tests/src/import-helpers/expects.ts @@ -1,7 +1,7 @@ import { getProjectMeta, getBackendAmplifyMeta, getTeamProviderInfo, getBackendConfig } from '@aws-amplify/amplify-e2e-core'; import { AuthParameters } from '@aws-amplify/amplify-category-auth'; // eslint-disable-next-line import/no-cycle -import { $TSAny } from 'amplify-cli-core'; +import { $TSAny } from '@aws-amplify/amplify-cli-core'; import { AuthProjectDetails, DynamoDBProjectDetails, readRootStack, StorageProjectDetails } from '.'; import { getAWSExports } from '../aws-exports/awsExports'; diff --git a/packages/amplify-e2e-tests/src/import-helpers/types.ts b/packages/amplify-e2e-tests/src/import-helpers/types.ts index 4f1f9fbae29..548763ec902 100644 --- a/packages/amplify-e2e-tests/src/import-helpers/types.ts +++ b/packages/amplify-e2e-tests/src/import-helpers/types.ts @@ -6,7 +6,7 @@ import { SupportedIdentityProvidersListType, } from 'aws-sdk/clients/cognitoidentityserviceprovider'; -import { $TSObject } from 'amplify-cli-core'; +import { $TSObject } from '@aws-amplify/amplify-cli-core'; export type AuthProjectDetails = { authResourceName?: string; diff --git a/packages/amplify-e2e-tests/src/import-helpers/utilities.ts b/packages/amplify-e2e-tests/src/import-helpers/utilities.ts index 45efa3a6173..097caf039cd 100644 --- a/packages/amplify-e2e-tests/src/import-helpers/utilities.ts +++ b/packages/amplify-e2e-tests/src/import-helpers/utilities.ts @@ -1,4 +1,4 @@ -import { $TSAny, $TSObject, JSONUtilities } from 'amplify-cli-core'; +import { $TSAny, $TSObject, JSONUtilities } from '@aws-amplify/amplify-cli-core'; import { addAuthIdentityPoolAndUserPoolWithOAuth, addAuthUserPoolOnlyWithOAuth, diff --git a/packages/amplify-environment-parameters/API.md b/packages/amplify-environment-parameters/API.md index 36e1bef9330..2416a88085d 100644 --- a/packages/amplify-environment-parameters/API.md +++ b/packages/amplify-environment-parameters/API.md @@ -4,7 +4,7 @@ ```ts -import { IAmplifyResource } from 'amplify-cli-core'; +import { IAmplifyResource } from '@aws-amplify/amplify-cli-core'; // @public (undocumented) export const cloneEnvParamManager: (srcEnvParamManager: IEnvironmentParameterManager, destEnvName: string) => Promise; diff --git a/packages/amplify-environment-parameters/package.json b/packages/amplify-environment-parameters/package.json index 95fd9520c30..3d6d89c054f 100644 --- a/packages/amplify-environment-parameters/package.json +++ b/packages/amplify-environment-parameters/package.json @@ -27,8 +27,8 @@ "generate-schemas": "mkdirp lib/schemas src/schemas && ts-json-schema-generator --path src/backend-parameters.d.ts --type BackendParameters --no-type-check --out lib/schemas/BackendParameters.schema.json && copyfiles --flat lib/schemas/BackendParameters.schema.json src/schemas" }, "dependencies": { + "@aws-amplify/amplify-cli-core": "4.0.1", "ajv": "^6.12.6", - "amplify-cli-core": "4.0.1", "lodash": "^4.17.21" }, "devDependencies": { diff --git a/packages/amplify-environment-parameters/src/__tests__/backend-config-parameters-controller.test.ts b/packages/amplify-environment-parameters/src/__tests__/backend-config-parameters-controller.test.ts index 389b565811c..ec448480479 100644 --- a/packages/amplify-environment-parameters/src/__tests__/backend-config-parameters-controller.test.ts +++ b/packages/amplify-environment-parameters/src/__tests__/backend-config-parameters-controller.test.ts @@ -1,7 +1,7 @@ -import { stateManager, AmplifyError } from 'amplify-cli-core'; +import { stateManager, AmplifyError } from '@aws-amplify/amplify-cli-core'; import { IBackendParametersController } from '../backend-config-parameters-controller'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); const stateManagerMock = stateManager as jest.Mocked; const AmplifyErrorMock = AmplifyError as jest.MockedClass; diff --git a/packages/amplify-environment-parameters/src/__tests__/environment-parameter-manager.test.ts b/packages/amplify-environment-parameters/src/__tests__/environment-parameter-manager.test.ts index 0ec84dd0008..6bdcd88d626 100644 --- a/packages/amplify-environment-parameters/src/__tests__/environment-parameter-manager.test.ts +++ b/packages/amplify-environment-parameters/src/__tests__/environment-parameter-manager.test.ts @@ -1,7 +1,7 @@ -import { pathManager, stateManager, AmplifyError } from 'amplify-cli-core'; +import { pathManager, stateManager, AmplifyError } from '@aws-amplify/amplify-cli-core'; import { IEnvironmentParameterManager, saveAll } from '../environment-parameter-manager'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); const stateManagerMock = stateManager as jest.Mocked; const testEnv = 'testEnv'; stateManagerMock.getLocalEnvInfo.mockReturnValue({ envName: testEnv }); diff --git a/packages/amplify-environment-parameters/src/backend-config-parameters-controller.ts b/packages/amplify-environment-parameters/src/backend-config-parameters-controller.ts index 98260bdd341..63fcd8afc28 100644 --- a/packages/amplify-environment-parameters/src/backend-config-parameters-controller.ts +++ b/packages/amplify-environment-parameters/src/backend-config-parameters-controller.ts @@ -1,4 +1,4 @@ -import { ResourceTuple, stateManager, AmplifyError } from 'amplify-cli-core'; +import { ResourceTuple, stateManager, AmplifyError } from '@aws-amplify/amplify-cli-core'; import Ajv from 'ajv'; import { BackendParameters } from './backend-parameters'; import parameterMapSchema from './schemas/BackendParameters.schema.json'; diff --git a/packages/amplify-environment-parameters/src/backend-parameters.d.ts b/packages/amplify-environment-parameters/src/backend-parameters.d.ts index 79df7a55d2f..818c6def475 100644 --- a/packages/amplify-environment-parameters/src/backend-parameters.d.ts +++ b/packages/amplify-environment-parameters/src/backend-parameters.d.ts @@ -1,4 +1,4 @@ -import { ResourceTuple } from 'amplify-cli-core'; +import { ResourceTuple } from '@aws-amplify/amplify-cli-core'; /** * Defines the shape of the mapping stored in `backend-config.json` to map ParameterStore parameters to corresponding project resources diff --git a/packages/amplify-environment-parameters/src/environment-parameter-manager.ts b/packages/amplify-environment-parameters/src/environment-parameter-manager.ts index c66d388b523..e9f7ee3347c 100644 --- a/packages/amplify-environment-parameters/src/environment-parameter-manager.ts +++ b/packages/amplify-environment-parameters/src/environment-parameter-manager.ts @@ -1,4 +1,4 @@ -import { AmplifyCategories, AmplifyError, AmplifyFault, IAmplifyResource, pathManager, stateManager } from 'amplify-cli-core'; +import { AmplifyCategories, AmplifyError, AmplifyFault, IAmplifyResource, pathManager, stateManager } from '@aws-amplify/amplify-cli-core'; import _ from 'lodash'; import { getParametersControllerInstance, IBackendParametersController } from './backend-config-parameters-controller'; import { ResourceParameterManager } from './resource-parameter-manager'; diff --git a/packages/amplify-frontend-ios/native-bindings-codegen/templates/preamble.jst b/packages/amplify-frontend-ios/native-bindings-codegen/templates/preamble.jst index e048867c6fa..313813328f1 100644 --- a/packages/amplify-frontend-ios/native-bindings-codegen/templates/preamble.jst +++ b/packages/amplify-frontend-ios/native-bindings-codegen/templates/preamble.jst @@ -19,7 +19,7 @@ const execa = require('execa'); const path = require('path'); -const { pathManager } = require('amplify-cli-core'); +const { pathManager } = require('@aws-amplify/amplify-cli-core'); const BINARY_PATH = 'resources/amplify-xcode'; const PACKAGE_NAME = 'amplify-frontend-ios'; diff --git a/packages/amplify-migration-tests/package.json b/packages/amplify-migration-tests/package.json index 3355672478f..d52f6146552 100644 --- a/packages/amplify-migration-tests/package.json +++ b/packages/amplify-migration-tests/package.json @@ -26,9 +26,9 @@ "setup-profile": "ts-node ./src/configure_tests.ts" }, "dependencies": { + "@aws-amplify/amplify-cli-core": "4.0.1", "@aws-amplify/amplify-e2e-core": "4.8.1", "@aws-cdk/cloudformation-diff": "~2.68.0", - "amplify-cli-core": "4.0.1", "aws-cdk-lib": "~2.68.0", "constructs": "^10.0.5", "fs-extra": "^8.1.0", diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests/overrides/auth-migration-a.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests/overrides/auth-migration-a.test.ts index 2d44690ee16..9d0738c7e15 100644 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests/overrides/auth-migration-a.test.ts +++ b/packages/amplify-migration-tests/src/__tests__/migration_tests/overrides/auth-migration-a.test.ts @@ -2,7 +2,7 @@ /* eslint-disable import/no-extraneous-dependencies */ /* eslint-disable jest/no-standalone-expect */ -import { $TSAny } from 'amplify-cli-core'; +import { $TSAny } from '@aws-amplify/amplify-cli-core'; import { addAuthWithCustomTrigger, amplifyPushAuth, diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests/overrides/auth-migration-b.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests/overrides/auth-migration-b.test.ts index b9021a50c0b..6217065b9a8 100644 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests/overrides/auth-migration-b.test.ts +++ b/packages/amplify-migration-tests/src/__tests__/migration_tests/overrides/auth-migration-b.test.ts @@ -2,7 +2,7 @@ /* eslint-disable import/no-extraneous-dependencies */ /* eslint-disable jest/no-standalone-expect */ -import { $TSAny } from 'amplify-cli-core'; +import { $TSAny } from '@aws-amplify/amplify-cli-core'; import { addAuthWithDefault, amplifyPushAuth, diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests/overrides/auth-migration-c.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests/overrides/auth-migration-c.test.ts index d0b793d030a..6fd33f5f4be 100644 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests/overrides/auth-migration-c.test.ts +++ b/packages/amplify-migration-tests/src/__tests__/migration_tests/overrides/auth-migration-c.test.ts @@ -2,7 +2,7 @@ /* eslint-disable import/no-extraneous-dependencies */ /* eslint-disable jest/no-standalone-expect */ -import { $TSAny } from 'amplify-cli-core'; +import { $TSAny } from '@aws-amplify/amplify-cli-core'; import { addAuthWithRecaptchaTrigger, amplifyPushAuth, diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests/overrides/auth-migration-d.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests/overrides/auth-migration-d.test.ts index bae830da1a9..2334621f55b 100644 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests/overrides/auth-migration-d.test.ts +++ b/packages/amplify-migration-tests/src/__tests__/migration_tests/overrides/auth-migration-d.test.ts @@ -2,7 +2,7 @@ /* eslint-disable import/no-extraneous-dependencies */ /* eslint-disable jest/no-standalone-expect */ -import { $TSAny } from 'amplify-cli-core'; +import { $TSAny } from '@aws-amplify/amplify-cli-core'; import { addAuthWithSignInSignOutUrl, createNewProjectDir, diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests/overrides/init-migration.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests/overrides/init-migration.test.ts index 99453746e2b..9ab79db3976 100644 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests/overrides/init-migration.test.ts +++ b/packages/amplify-migration-tests/src/__tests__/migration_tests/overrides/init-migration.test.ts @@ -8,7 +8,7 @@ import { amplifyPushOverride, replaceOverrideFileWithProjectInfo, } from '@aws-amplify/amplify-e2e-core'; -import { JSONUtilities } from 'amplify-cli-core'; +import { JSONUtilities } from '@aws-amplify/amplify-cli-core'; import { versionCheck, allowedVersionsToMigrateFrom, initJSProjectWithProfileV4_52_0 } from '../../../migration-helpers'; describe('amplify init', () => { diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/custom-stack.migration.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/custom-stack.migration.test.ts index 35507e57178..1bf3d3166c4 100644 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/custom-stack.migration.test.ts +++ b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/custom-stack.migration.test.ts @@ -1,4 +1,4 @@ -import { JSONUtilities } from 'amplify-cli-core'; +import { JSONUtilities } from '@aws-amplify/amplify-cli-core'; import { addCDKCustomResource, addCFNCustomResource, diff --git a/packages/amplify-migration-tests/src/__tests__/update_tests/auth_migration_update.test.ts b/packages/amplify-migration-tests/src/__tests__/update_tests/auth_migration_update.test.ts index cc206cd4eef..33e5bac93d4 100644 --- a/packages/amplify-migration-tests/src/__tests__/update_tests/auth_migration_update.test.ts +++ b/packages/amplify-migration-tests/src/__tests__/update_tests/auth_migration_update.test.ts @@ -1,4 +1,4 @@ -import { $TSAny } from 'amplify-cli-core'; +import { $TSAny } from '@aws-amplify/amplify-cli-core'; import { addAuthWithCustomTrigger, addAuthWithDefault, diff --git a/packages/amplify-migration-tests/src/__tests__/update_tests/storage_migration_update.test.ts b/packages/amplify-migration-tests/src/__tests__/update_tests/storage_migration_update.test.ts index d1b20457632..98739d6a28f 100644 --- a/packages/amplify-migration-tests/src/__tests__/update_tests/storage_migration_update.test.ts +++ b/packages/amplify-migration-tests/src/__tests__/update_tests/storage_migration_update.test.ts @@ -1,4 +1,4 @@ -import { $TSObject } from 'amplify-cli-core'; +import { $TSObject } from '@aws-amplify/amplify-cli-core'; import { addAuthWithDefault, addDDBWithTrigger, diff --git a/packages/amplify-migration-tests/src/migration-helpers/legacy-lambda-layer.ts b/packages/amplify-migration-tests/src/migration-helpers/legacy-lambda-layer.ts index 989198b614c..3563b93ff77 100644 --- a/packages/amplify-migration-tests/src/migration-helpers/legacy-lambda-layer.ts +++ b/packages/amplify-migration-tests/src/migration-helpers/legacy-lambda-layer.ts @@ -1,4 +1,4 @@ -import { pathManager } from 'amplify-cli-core'; +import { pathManager } from '@aws-amplify/amplify-cli-core'; import { ExecutionContext, getCLIPath, diff --git a/packages/amplify-migration-tests/src/migration-helpers/utils.ts b/packages/amplify-migration-tests/src/migration-helpers/utils.ts index 299c4de8c4c..c8ff1b0ed31 100644 --- a/packages/amplify-migration-tests/src/migration-helpers/utils.ts +++ b/packages/amplify-migration-tests/src/migration-helpers/utils.ts @@ -14,7 +14,7 @@ import { } from '@aws-amplify/amplify-e2e-core'; import * as cfnDiff from '@aws-cdk/cloudformation-diff'; import { Writable } from 'stream'; -import { AmplifyCategories } from 'amplify-cli-core'; +import { AmplifyCategories } from '@aws-amplify/amplify-cli-core'; import strip from 'strip-ansi'; /** diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/admin-login.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/admin-login.test.ts index 6483a76b909..62d41dca161 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/admin-login.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/admin-login.test.ts @@ -2,7 +2,7 @@ import { $TSContext, $TSAny } from '@aws-amplify/amplify-cli-core'; import * as adminLogin from '../admin-login'; import { AmplifySpinner } from '@aws-amplify/amplify-prompts'; -jest.mock('amplify-cli-core', () => { +jest.mock('@aws-amplify/amplify-cli-core', () => { return { open: jest.fn().mockReturnValue(Promise.reject('some spawn error')), }; 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 cec79cdaa2e..b36ab58571a 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/admin-modelgen.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/admin-modelgen.test.ts @@ -5,7 +5,7 @@ import { S3 } from '../aws-utils/aws-s3'; jest.mock('fs-extra'); jest.mock('../aws-utils/aws-s3'); -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('graphql-transformer-core'); jest.mock('../utils/admin-helpers'); diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/commands/override.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/commands/override.test.ts index a2921213cc3..7e34dc09999 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/commands/override.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/commands/override.test.ts @@ -2,7 +2,7 @@ import { run } from '../../commands/awscloudformation/override'; import { $TSContext, generateOverrideSkeleton } from '@aws-amplify/amplify-cli-core'; import * as path from 'path'; -jest.mock('amplify-cli-core', () => ({ +jest.mock('@aws-amplify/amplify-cli-core', () => ({ pathManager: { getBackendDirPath: jest.fn().mockReturnValue('mockPath'), }, diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/configuration-manager.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/configuration-manager.test.ts index 9844e108639..a017265022f 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/configuration-manager.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/configuration-manager.test.ts @@ -6,7 +6,7 @@ import * as configManager from '../configuration-manager'; import { loadConfigurationForEnv } from '../configuration-manager'; import { mocked } from 'ts-jest/utils'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('fs-extra'); jest.mock('../system-config-manager'); diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/disconnect-dependent-resources/utils.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/disconnect-dependent-resources/utils.test.ts index 5076c3c5248..fc9dd4a15d4 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/disconnect-dependent-resources/utils.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/disconnect-dependent-resources/utils.test.ts @@ -14,7 +14,7 @@ import Template from 'cloudform-types/types/template'; import { DeploymentOp, DeploymentStep } from '../../iterative-deployment'; jest.mock('fs-extra'); -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('../../utils/amplify-resource-state-utils'); const fs_mock = fs as jest.Mocked; diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/display-helpful-urls.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/display-helpful-urls.test.ts index c56283e11df..f182c25726e 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/display-helpful-urls.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/display-helpful-urls.test.ts @@ -5,7 +5,7 @@ import { SNS } from '../aws-utils/aws-sns'; import { showGraphQLTransformerVersion, showSMSSandboxWarning } from '../display-helpful-urls'; jest.mock('../aws-utils/aws-sns'); -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); const printerMock = printer as jest.Mocked; printerMock.info = jest.fn(); diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/initialize-env.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/initialize-env.test.ts index b67a85aba65..d16165af91f 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/initialize-env.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/initialize-env.test.ts @@ -1,6 +1,6 @@ import { downloadZip } from '../zip-util'; import { run } from '../initialize-env'; -import { $TSContext, AmplifyException } from 'amplify-cli-core'; +import { $TSContext, AmplifyException } from '@aws-amplify/amplify-cli-core'; jest.mock('../aws-utils/aws-s3'); jest.mock('../zip-util'); diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/initializer.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/initializer.test.ts index 0f9925dea94..3ca48695714 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/initializer.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/initializer.test.ts @@ -9,7 +9,7 @@ jest.mock('../configuration-manager'); jest.mock('../aws-utils/aws-cfn'); jest.mock('fs-extra'); jest.mock('../amplify-service-manager'); -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('../permissions-boundary/permissions-boundary'); const CloudFormationMock = CloudFormation as jest.MockedClass; diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/iterative-deployment/deployment-state-manager.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/iterative-deployment/deployment-state-manager.test.ts index 0dd05f70afc..51e63e43515 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/iterative-deployment/deployment-state-manager.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/iterative-deployment/deployment-state-manager.test.ts @@ -2,8 +2,8 @@ import { DeploymentStatus, DeploymentStepStatus, IDeploymentStateManager } from import { DeploymentStateManager } from '../../iterative-deployment/deployment-state-manager'; import { S3 } from '../../aws-utils/aws-s3'; -jest.mock('amplify-cli-core', () => ({ - ...(jest.requireActual('amplify-cli-core') as Record), +jest.mock('@aws-amplify/amplify-cli-core', () => ({ + ...(jest.requireActual('@aws-amplify/amplify-cli-core') as Record), stateManager: { getMeta: jest.fn().mockReturnValue({ providers: { diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/override-manager/transform-resource.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/override-manager/transform-resource.test.ts index 412c1bfa13c..a2f15b622a2 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/override-manager/transform-resource.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/override-manager/transform-resource.test.ts @@ -4,7 +4,7 @@ import * as path from 'path'; import { transformResourceWithOverrides } from '../../override-manager/transform-resource'; import CustomOverridePlugin from './mock-plugin/custom-override-plugin'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('@aws-amplify/amplify-prompts'); jest.mock('./mock-plugin/custom-override-plugin'); diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/permission-boundary/permissions-boundary.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/permission-boundary/permissions-boundary.test.ts index faacd594bf2..abfd084cccc 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/permission-boundary/permissions-boundary.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/permission-boundary/permissions-boundary.test.ts @@ -8,8 +8,8 @@ const permissionsBoundaryArn = 'arn:aws:iam::123456789012:policy/some-policy-nam const argName = 'permissions-boundary'; const envName = 'newEnvName'; -jest.mock('amplify-cli-core', () => ({ - ...(jest.requireActual('amplify-cli-core') as {}), +jest.mock('@aws-amplify/amplify-cli-core', () => ({ + ...(jest.requireActual('@aws-amplify/amplify-cli-core') as {}), stateManager: { getLocalEnvInfo: jest.fn(), }, diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/pre-push-cfn-processor/cfn-pre-processor.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/pre-push-cfn-processor/cfn-pre-processor.test.ts index 8e93fa25e49..b7ca0639844 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/pre-push-cfn-processor/cfn-pre-processor.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/pre-push-cfn-processor/cfn-pre-processor.test.ts @@ -4,7 +4,7 @@ import * as path from 'path'; import { preProcessCFNTemplate, writeCustomPoliciesToCFNTemplate } from '../../pre-push-cfn-processor/cfn-pre-processor'; import { prePushCfnTemplateModifier } from '../../pre-push-cfn-processor/pre-push-cfn-modifier'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('../../pre-push-cfn-processor/pre-push-cfn-modifier'); const readCFNTemplate_mock = readCFNTemplate as jest.MockedFunction; diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/pre-push-cfn-processor/modifiers/iam-role-permissions-boundary-modifier.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/pre-push-cfn-processor/modifiers/iam-role-permissions-boundary-modifier.test.ts index 35e8ba9ac2d..a91f55d60ac 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/pre-push-cfn-processor/modifiers/iam-role-permissions-boundary-modifier.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/pre-push-cfn-processor/modifiers/iam-role-permissions-boundary-modifier.test.ts @@ -3,7 +3,7 @@ import Role from 'cloudform-types/types/iam/role'; import _ from 'lodash'; import { iamRolePermissionsBoundaryModifier } from '../../../pre-push-cfn-processor/modifiers/iam-role-permissions-boundary-modifier'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); const getPermissionsBoundaryArn_mock = getPermissionsBoundaryArn as jest.MockedFunction; 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 e868f301fae..e63e7c7540d 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 @@ -13,8 +13,8 @@ const fsMock = fs as jest.Mocked; const printerMock = printer as jest.Mocked; -jest.mock('amplify-cli-core', () => ({ - ...(jest.requireActual('amplify-cli-core') as $TSObject), +jest.mock('@aws-amplify/amplify-cli-core', () => ({ + ...(jest.requireActual('@aws-amplify/amplify-cli-core') as $TSObject), pathManager: { getBackendDirPath: jest.fn().mockReturnValue('mockDirPath'), getResourceOverrideFilePath: jest.fn().mockReturnValue('mockDirPath/override.ts'), diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/push-resources.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/push-resources.test.ts index 6905865a256..2fdfe0318bb 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/push-resources.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/push-resources.test.ts @@ -11,7 +11,7 @@ const dummyNestedCFNFiles: readonly string[] = ['nested_fileA', 'nested_fileB']; const testBackendDirPath = path.join('backendTest', 'path'); // Mocks -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('fs-extra'); jest.mock('../system-config-manager'); jest.mock('glob'); diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/resource-package/resource-export.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/resource-package/resource-export.test.ts index a7a20235936..e4d92f0fbbd 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/resource-package/resource-export.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/resource-package/resource-export.test.ts @@ -25,7 +25,7 @@ const mockMeta = jest.fn(() => { }; }); -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); const stateManager_mock = stateManager as jest.Mocked; stateManager_mock.getMeta = mockMeta; stateManager_mock.getTeamProviderInfo = jest.fn().mockReturnValue({}); diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/root-stack-builder/root-stack-transform.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/root-stack-builder/root-stack-transform.test.ts index 84fb0873f37..e3c7463d8de 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/root-stack-builder/root-stack-transform.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/root-stack-builder/root-stack-transform.test.ts @@ -1,7 +1,7 @@ import { $TSContext, JSONUtilities } from '@aws-amplify/amplify-cli-core'; import { AmplifyRootStackTransform } from '../../root-stack-builder/root-stack-transform'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); const JSONUtilitiesMock = JSONUtilities as jest.Mocked; JSONUtilitiesMock.stringify.mockImplementation((data, __) => JSON.stringify(data, null, 2)); diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/setup-new-user.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/setup-new-user.test.ts index 4b699d51df6..5eed99e0071 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/setup-new-user.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/setup-new-user.test.ts @@ -16,7 +16,7 @@ const context_stub = { }, } as unknown as jest.Mocked<$TSContext>; -jest.mock('amplify-cli-core', () => ({ +jest.mock('@aws-amplify/amplify-cli-core', () => ({ open: jest.fn().mockReturnValue(Promise.resolve()), })); jest.mock('inquirer', () => ({ diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/utils/api-key-helpers.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/utils/api-key-helpers.test.ts index f2b26162ba2..91f46b788d8 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/utils/api-key-helpers.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/utils/api-key-helpers.test.ts @@ -1,7 +1,7 @@ import { getAppSyncApiConfig, getApiKeyConfig, apiKeyIsActive } from '../../utils/api-key-helpers'; -jest.mock('amplify-cli-core', () => { - const original = jest.requireActual('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core', () => { + const original = jest.requireActual('@aws-amplify/amplify-cli-core'); const amplifyMeta = { api: { myapp: { diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/utils/ssm-utils/env-parameter-ssm-helpers.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/utils/ssm-utils/env-parameter-ssm-helpers.test.ts index 765ab9fef0d..0d8776bd051 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/utils/ssm-utils/env-parameter-ssm-helpers.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/utils/ssm-utils/env-parameter-ssm-helpers.test.ts @@ -3,7 +3,7 @@ import { SSM } from '../../../aws-utils/aws-ssm'; import type { SSM as SSMType } from 'aws-sdk'; import { getEnvParametersDownloadHandler, getEnvParametersUploadHandler } from '../../../utils/ssm-utils/env-parameter-ssm-helpers'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('../../../aws-utils/aws-ssm'); const stateManagerMock = stateManager as jest.Mocked; 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 86dc7230d6b..5577b829b26 100644 --- a/packages/amplify-provider-awscloudformation/src/aws-utils/aws-cfn.js +++ b/packages/amplify-provider-awscloudformation/src/aws-utils/aws-cfn.js @@ -12,7 +12,7 @@ const { S3 } = require('./aws-s3'); const providerName = require('../constants').ProviderName; const { formUserAgentParam } = require('./user-agent'); const configurationManager = require('../configuration-manager'); -const { stateManager, pathManager, AmplifyError, AmplifyFault } = require('amplify-cli-core'); +const { stateManager, pathManager, AmplifyError, AmplifyFault } = require('@aws-amplify/amplify-cli-core'); const { fileLogger } = require('../utils/aws-logger'); const logger = fileLogger('aws-cfn'); const { pagedAWSCall } = require('./paged-call'); diff --git a/packages/amplify-util-mock/src/__e2e__/utils/index.ts b/packages/amplify-util-mock/src/__e2e__/utils/index.ts index 51a56965445..a63a2c9499f 100644 --- a/packages/amplify-util-mock/src/__e2e__/utils/index.ts +++ b/packages/amplify-util-mock/src/__e2e__/utils/index.ts @@ -17,8 +17,8 @@ const invoke = functionRuntimeContributorFactory({}).invoke; export * from './graphql-client'; -jest.mock('amplify-cli-core', () => ({ - ...(jest.requireActual('amplify-cli-core') as {}), +jest.mock('@aws-amplify/amplify-cli-core', () => ({ + ...(jest.requireActual('@aws-amplify/amplify-cli-core') as {}), pathManager: { getAmplifyPackageLibDirPath: jest.fn().mockReturnValue('../amplify-dynamodb-simulator'), getAmplifyLibRoot: jest.fn().mockReturnValue(''), diff --git a/packages/amplify-util-mock/src/__tests__/api/api.test.ts b/packages/amplify-util-mock/src/__tests__/api/api.test.ts index 3c7bc032a7b..d4c4ad4a735 100644 --- a/packages/amplify-util-mock/src/__tests__/api/api.test.ts +++ b/packages/amplify-util-mock/src/__tests__/api/api.test.ts @@ -6,8 +6,8 @@ import * as lambdaInvoke from '../../api/lambda-invoke'; import { getMockSearchableTriggerDirectory } from '../../utils'; import { ConfigOverrideManager } from '../../utils/config-override'; -jest.mock('amplify-cli-core', () => ({ - ...(jest.requireActual('amplify-cli-core') as Record), +jest.mock('@aws-amplify/amplify-cli-core', () => ({ + ...(jest.requireActual('@aws-amplify/amplify-cli-core') as Record), pathManager: { getAmplifyMetaFilePath: jest.fn(), getAWSCredentialsFilePath: jest.fn(), diff --git a/packages/amplify-util-mock/src/__tests__/api/lambda-arn-to-config.test.ts b/packages/amplify-util-mock/src/__tests__/api/lambda-arn-to-config.test.ts index 3f0492cbc8e..343c3d86d90 100644 --- a/packages/amplify-util-mock/src/__tests__/api/lambda-arn-to-config.test.ts +++ b/packages/amplify-util-mock/src/__tests__/api/lambda-arn-to-config.test.ts @@ -3,7 +3,7 @@ import { lambdaArnToConfig } from '../../api/lambda-arn-to-config'; import { ProcessedLambdaFunction } from '../../CFNParser/stack/types'; import { loadLambdaConfig } from '../../utils/lambda/load-lambda-config'; -jest.mock('amplify-cli-core', () => ({ +jest.mock('@aws-amplify/amplify-cli-core', () => ({ pathManager: { getAmplifyPackageLibDirPath: jest.fn().mockReturnValue('test/path'), }, diff --git a/packages/amplify-util-mock/src/__tests__/func/index.test.ts b/packages/amplify-util-mock/src/__tests__/func/index.test.ts index 5aa2c3d1f83..215e3a9e690 100644 --- a/packages/amplify-util-mock/src/__tests__/func/index.test.ts +++ b/packages/amplify-util-mock/src/__tests__/func/index.test.ts @@ -7,7 +7,7 @@ import * as inquirer from 'inquirer'; jest.mock('../../utils/lambda/load-lambda-config', () => ({ loadLambdaConfig: jest.fn(() => ({ handler: 'index.testHandle' })), })); -jest.mock('amplify-cli-core', () => ({ +jest.mock('@aws-amplify/amplify-cli-core', () => ({ JSONUtilities: { readJson: jest.fn(), }, diff --git a/packages/amplify-util-mock/src/__tests__/utils/lambda/populate-cfn-params.test.ts b/packages/amplify-util-mock/src/__tests__/utils/lambda/populate-cfn-params.test.ts index e78b80aeda9..bd748d900ae 100644 --- a/packages/amplify-util-mock/src/__tests__/utils/lambda/populate-cfn-params.test.ts +++ b/packages/amplify-util-mock/src/__tests__/utils/lambda/populate-cfn-params.test.ts @@ -2,7 +2,7 @@ import { stateManager } from '@aws-amplify/amplify-cli-core'; import _ from 'lodash'; import { populateCfnParams } from '../../../utils/lambda/populate-cfn-params'; -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('../../../api/api', () => ({ GRAPHQL_API_ENDPOINT_OUTPUT: 'GraphQLAPIEndpointOutput', GRAPHQL_API_KEY_OUTPUT: 'GraphQLAPIKeyOutput', diff --git a/packages/amplify-util-mock/src/__tests__/utils/lambda/populate-lambda-mock-env-vars.test.ts b/packages/amplify-util-mock/src/__tests__/utils/lambda/populate-lambda-mock-env-vars.test.ts index fb5fce41b39..880f0626b1d 100644 --- a/packages/amplify-util-mock/src/__tests__/utils/lambda/populate-lambda-mock-env-vars.test.ts +++ b/packages/amplify-util-mock/src/__tests__/utils/lambda/populate-lambda-mock-env-vars.test.ts @@ -6,7 +6,7 @@ import * as path from 'path'; import * as dotenv from 'dotenv'; jest.mock('@aws-amplify/amplify-provider-awscloudformation'); -jest.mock('amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('dotenv'); const loadConfigurationForEnv_mock = loadConfigurationForEnv as jest.MockedFunction;