Skip to content

Commit

Permalink
chore: complete cli core migration (aws-amplify#12408)
Browse files Browse the repository at this point in the history
* chore: complete prefixing cli-core migration

* chore: generate api extract and sort package.json

* feat(amplify-util-uibuilder): support StorageField (aws-amplify#12386)

* feat((amplify-util-uibuilder): support StorageField

* chore: update all aws-sdk versions to ^2.1350.0

* fix: revert changes to package.json.ejs

* chore: add **/aws-sdk to package.json under resolutions

* fix: revert white space changes in package.json.ejs

* fix: bump codegen-ui to 2.12.1

* chore: bump lint memory

---------

Co-authored-by: Hein Jeong <[email protected]>
Co-authored-by: Kamil Sobol <[email protected]>

* chore: reclassify CFN deployment errors if all the errors are from custom resources (aws-amplify#12398)

* chore: reclassify CFN deployment errors if all the errors are from custom resources

* fix: run prettier

* fix: correctly scope amplify-cli-core

* fix: pr review updates

* fix: reclassify BucketNotExists error during init-env (aws-amplify#12399)

* feat: create new NodeJS functions with nodejs18.x runtime (aws-amplify#12394)

* chore: use node 18 in the packaged cli

* chore: force prebuild-install to 7.11

* chore: try update

* Revert "chore: try update"

This reverts commit 6332c61.

* chore: disable deprecation flags

* chore: try node18 image

* chore: more memory

* chore: less parallelization

* chore: try newer windows

* Revert "chore: try newer windows"

This reverts commit 59d5e6d.

* chore: install node 18 on windows

* chore: install node 18 on windows

* chore: try this

* chore: try this

* chore: try this

* chore: try this

* Revert "Revert "chore: try newer windows""

This reverts commit dcac927.

* chore: try this

* chore: try this

* chore: consolidate steps

* chore: parallel in UT

* chore: parallel in UT

* chore: remove dotnet migration test

* chore: fix results script

* chore: fix dotnet

* chore: install create react app

* chore: allow old ssl

* Revert "chore: allow old ssl"

This reverts commit 08d03f9.

* chore: use new react scripts

* chore: poke ci

* chore: fix init test

* chore: use usual ECR repo

* chore: use previous windows image

* Revert "chore: use previous windows image"

This reverts commit f3299f1.

* chore: update pkg

* chore: remove sequential promise

* chore: run this in us west

* Revert "chore: remove sequential promise"

This reverts commit f053413.

* chore: wait for selection

* chore: wait for selection

* chore: wait for selection

* chore: wait for choice first

* feat: generate nodejs18 lambdas

* chore: dont use modules

* chore: undo that

* chore: make crud work

* chore: fix test

* chore: fix that test

* chore: refactor imports

* chore: fix test

* chore: fix test

* chore: fix test

* chore: fix test

* chore: fix test

* chore: add nodejs12.x to migrate from

* chore: fix test

* chore: fix test

* chore: test nodejs crud

* chore: update tests

* chore: pr feedback

* fix: block auth w/ triggers push if not migrated to cli-inputs (aws-amplify#12337)

* fix: catch undefined LogicalName when Lambda Layer versions are deleted from the console (aws-amplify#12351)

* fix: throw a descriptive AmplifyError when an existing lambda layer LogicalName is undefined

* chore: migrate missing files

* chore: fixing failing tests

* chore: sort package.json

* chore: complete prefixing cli-core migration

* chore: regenerate yarn.lock and address codeQL warnings

* chore: lint file

---------

Co-authored-by: Hein Jeong <[email protected]>
Co-authored-by: Hein Jeong <[email protected]>
Co-authored-by: Kamil Sobol <[email protected]>
Co-authored-by: Amplifiyer <[email protected]>
Co-authored-by: Edward Foyle <[email protected]>
Co-authored-by: Spencer Stolworthy <[email protected]>
  • Loading branch information
7 people committed Apr 7, 2023
1 parent cd2b204 commit b830929
Show file tree
Hide file tree
Showing 396 changed files with 565 additions and 586 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof stateManager>;
stateManagerMock.getMeta.mockReturnValue({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, unknown>),
jest.mock('@aws-amplify/amplify-cli-core', () => ({
...(jest.requireActual('@aws-amplify/amplify-cli-core') as Record<string, unknown>),
FeatureFlags: {
getBoolean: jest.fn().mockReturnValue(true),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
Original file line number Diff line number Diff line change
@@ -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<string, unknown>),
jest.mock('@aws-amplify/amplify-cli-core', () => ({
...(jest.requireActual('@aws-amplify/amplify-cli-core') as Record<string, unknown>),
stateManager: {
getLocalEnvInfo: jest.fn().mockReturnValue('testEnv'),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof getSupportedServices>;
getSupportedServicesMock.mockReturnValue({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
Original file line number Diff line number Diff line change
@@ -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(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
jest.mock('amplify-cli-core', () => {
jest.mock('@aws-amplify/amplify-cli-core', () => {
return {
FeatureFlags: {
getBoolean: jest.fn().mockImplementation((name, defaultValue) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-category-auth/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof stateManager>;
stateManager_mock.getMeta.mockReturnValue({
providers: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof stateManager>;
stateManager_mock.getMeta.mockReturnValue({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
},
Expand Down Expand Up @@ -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,
},
Expand All @@ -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,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof pathManager>;
pathManager_mock.getBackendDirPath.mockReturnValue('mockpath');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof pathManager>;
Expand Down
Original file line number Diff line number Diff line change
@@ -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<typeof pathManager>;
const stateManagerMock = stateManager as jest.Mocked<typeof stateManager>;
const readCFNTemplateMock = readCFNTemplate as jest.MockedFunction<typeof readCFNTemplate>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof pathManager>;
const stateManager_mock = stateManager as jest.Mocked<typeof stateManager>;
pathManager_mock.getResourceDirectoryPath.mockReturnValue('fakeProject/amplify/backend/myLayer/');
Expand Down Expand Up @@ -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'),
},
Expand Down
Original file line number Diff line number Diff line change
@@ -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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
@@ -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';

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { run } from '../../../commands/geo/add';
const mockAddResource = addResource as jest.MockedFunction<typeof addResource>;
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', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { run } from '../../../commands/geo/update';
const mockUpdateResource = updateResource as jest.MockedFunction<typeof updateResource>;
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', () => {
Expand Down
Loading

0 comments on commit b830929

Please sign in to comment.