diff --git a/.eslint-dictionary.json b/.eslint-dictionary.json index 32ce6d122d3..437e33e1dc4 100644 --- a/.eslint-dictionary.json +++ b/.eslint-dictionary.json @@ -412,6 +412,7 @@ "ulid", "unauth", "uncompiled", + "uncommented", "unicode", "unix", "unlink", diff --git a/codebuild_specs/e2e_workflow_base.yml b/codebuild_specs/e2e_workflow_base.yml index 5d1e46626b1..2177761b7e8 100644 --- a/codebuild_specs/e2e_workflow_base.yml +++ b/codebuild_specs/e2e_workflow_base.yml @@ -136,6 +136,12 @@ batch: compute-type: BUILD_GENERAL1_LARGE depend-on: - upb + - identifier: gen2_migrations_e2e_test + buildspec: codebuild_specs/run_gen2_migrations_e2e_tests_linux.yml + depend-on: + - build_linux + env: + compute-type: BUILD_GENERAL1_LARGE - identifier: cleanup_resources buildspec: codebuild_specs/cleanup_resources.yml depend-on: diff --git a/codebuild_specs/e2e_workflow_generated.yml b/codebuild_specs/e2e_workflow_generated.yml index e3d6a0179ec..69e2f0af9d5 100644 --- a/codebuild_specs/e2e_workflow_generated.yml +++ b/codebuild_specs/e2e_workflow_generated.yml @@ -136,6 +136,12 @@ batch: compute-type: BUILD_GENERAL1_LARGE depend-on: - upb + - identifier: gen2_migrations_e2e_test + buildspec: codebuild_specs/run_gen2_migrations_e2e_tests_linux.yml + depend-on: + - build_linux + env: + compute-type: BUILD_GENERAL1_LARGE - identifier: cleanup_resources buildspec: codebuild_specs/cleanup_resources.yml depend-on: diff --git a/packages/amplify-appsync-simulator/package.json b/packages/amplify-appsync-simulator/package.json index 5b46549050e..adc56f8561f 100644 --- a/packages/amplify-appsync-simulator/package.json +++ b/packages/amplify-appsync-simulator/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-appsync-simulator", - "version": "2.16.12-next-4.0", + "version": "2.16.11", "description": "An AppSync Simulator to test AppSync API.", "repository": { "type": "git", @@ -30,7 +30,7 @@ "extract-api": "ts-node ../../scripts/extract-api.ts" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.4.1-next-4.0", + "@aws-amplify/amplify-cli-core": "4.4.0", "@aws-amplify/amplify-prompts": "2.8.6", "@graphql-tools/schema": "^8.3.1", "@graphql-tools/utils": "^8.5.1", diff --git a/packages/amplify-category-custom/package.json b/packages/amplify-category-custom/package.json index d12ad9f3621..779896e73ba 100644 --- a/packages/amplify-category-custom/package.json +++ b/packages/amplify-category-custom/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-category-custom", - "version": "3.1.28-next-4.0", + "version": "3.1.27", "description": "amplify-cli custom resources plugin", "repository": { "type": "git", @@ -26,7 +26,7 @@ "access": "public" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.4.1-next-4.0", + "@aws-amplify/amplify-cli-core": "4.4.0", "@aws-amplify/amplify-prompts": "2.8.6", "aws-cdk-lib": "~2.187.0", "execa": "^5.1.1", diff --git a/packages/amplify-category-hosting/package.json b/packages/amplify-category-hosting/package.json index afda46a3251..2a2466d158f 100644 --- a/packages/amplify-category-hosting/package.json +++ b/packages/amplify-category-hosting/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-category-hosting", - "version": "3.5.41-next-4.0", + "version": "3.5.40", "description": "amplify-cli hosting plugin", "repository": { "type": "git", @@ -21,7 +21,7 @@ "test": "jest --logHeapUsage --coverage" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.4.1-next-4.0", + "@aws-amplify/amplify-cli-core": "4.4.0", "@aws-amplify/amplify-prompts": "2.8.6", "chalk": "^4.1.1", "fs-extra": "^8.1.0", diff --git a/packages/amplify-cli/src/domain/command-input.ts b/packages/amplify-cli/src/domain/command-input.ts index 4461a06ae93..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 '@aws-amplify/amplify-cli-core'; +import { CommandLineInput } from '@aws-amplify/amplify-cli-core/src/types'; export class CLIInput implements CommandLineInput { argv: Array; diff --git a/packages/amplify-console-hosting/package.json b/packages/amplify-console-hosting/package.json index 2f7d4b07906..1b48f1ef9af 100644 --- a/packages/amplify-console-hosting/package.json +++ b/packages/amplify-console-hosting/package.json @@ -1,14 +1,14 @@ { "name": "@aws-amplify/amplify-console-hosting", - "version": "2.5.38-next-4.0", + "version": "2.5.37", "description": "cli plugin for AWS Amplify Console hosting", "main": "lib/index.js", "types": "lib/index.d.ts", "author": "Amazon Web Services", "license": "Apache-2.0", "dependencies": { - "@aws-amplify/amplify-cli-core": "4.4.1-next-4.0", - "@aws-amplify/amplify-environment-parameters": "1.9.19-next-4.0", + "@aws-amplify/amplify-cli-core": "4.4.0", + "@aws-amplify/amplify-environment-parameters": "1.9.18", "archiver": "^5.3.0", "chalk": "^4.1.1", "cli-table3": "^0.6.0", diff --git a/packages/amplify-console-integration-tests/package.json b/packages/amplify-console-integration-tests/package.json index a3043638474..b5797e9788a 100644 --- a/packages/amplify-console-integration-tests/package.json +++ b/packages/amplify-console-integration-tests/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-console-integration-tests", - "version": "2.11.22-next-4.0", + "version": "2.11.21", "description": "", "repository": { "type": "git", @@ -21,7 +21,7 @@ "setup-profile": "ts-node ./src/setup-profile.ts" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.4.1-next-4.0", + "@aws-amplify/amplify-cli-core": "4.4.0", "@aws-amplify/amplify-e2e-core": "5.7.3", "@types/ini": "^1.3.30", "aws-sdk": "^2.1464.0", diff --git a/packages/amplify-dotnet-function-runtime-provider/package.json b/packages/amplify-dotnet-function-runtime-provider/package.json index fa91ffa0515..77e2c953c9a 100644 --- a/packages/amplify-dotnet-function-runtime-provider/package.json +++ b/packages/amplify-dotnet-function-runtime-provider/package.json @@ -1,6 +1,6 @@ { "name": "amplify-dotnet-function-runtime-provider", - "version": "2.1.4-next-4.0", + "version": "2.1.3", "description": "Provides functionality related to functions in .NET on AWS", "repository": { "type": "git", @@ -22,7 +22,7 @@ "extract-api": "ts-node ../../scripts/extract-api.ts" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.4.1-next-4.0", + "@aws-amplify/amplify-cli-core": "4.4.0", "@aws-amplify/amplify-function-plugin-interface": "1.12.1", "@aws-amplify/amplify-prompts": "2.8.6", "execa": "^5.1.1", diff --git a/packages/amplify-dynamodb-simulator/package.json b/packages/amplify-dynamodb-simulator/package.json index 566f84b78db..76fba34126c 100644 --- a/packages/amplify-dynamodb-simulator/package.json +++ b/packages/amplify-dynamodb-simulator/package.json @@ -1,6 +1,6 @@ { "name": "amplify-dynamodb-simulator", - "version": "2.9.23-next-4.0", + "version": "2.9.22", "description": "DynamoDB emulator nodejs wrapper", "repository": { "type": "git", @@ -21,7 +21,7 @@ "test": "jest --logHeapUsage --passWithNoTests" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.4.1-next-4.0", + "@aws-amplify/amplify-cli-core": "4.4.0", "aws-sdk": "^2.1464.0", "detect-port": "^1.3.0", "execa": "^5.1.1", diff --git a/packages/amplify-e2e-core/src/init/deleteProject.ts b/packages/amplify-e2e-core/src/init/deleteProject.ts index ef9594065f0..9019953d490 100644 --- a/packages/amplify-e2e-core/src/init/deleteProject.ts +++ b/packages/amplify-e2e-core/src/init/deleteProject.ts @@ -27,6 +27,6 @@ export const deleteProject = async ( .wait('Project deleted locally.') .runAsync(); } catch (e) { - console.log('Error on deleting project at:', cwd); + console.log('Error on deleting project at:', cwd, e); } }; diff --git a/packages/amplify-e2e-core/src/init/initProjectHelper.ts b/packages/amplify-e2e-core/src/init/initProjectHelper.ts index 88c32280bf4..654d73f42f8 100644 --- a/packages/amplify-e2e-core/src/init/initProjectHelper.ts +++ b/packages/amplify-e2e-core/src/init/initProjectHelper.ts @@ -62,13 +62,7 @@ export function initJSProjectWithProfile(cwd: string, settings?: Partial, gen2PropertyMap: Map): ts.ObjectLiteralExpression { + private createNestedObjectExpression(object: any, gen2PropertyMap: Map): ts.ObjectLiteralExpression { const objectLiterals = []; const clientSecretKey = 'ClientSecret'; @@ -467,7 +467,7 @@ export class BackendSynthesizer { objectLiterals.push(this.createListPropertyAssignment(mappedProperty, value)); } } - } else if (typeof value == 'object') { + } else if (typeof value == 'object' && value !== null) { objectLiterals.push( factory.createPropertyAssignment(factory.createIdentifier(key), this.createNestedObjectExpression(value, gen2PropertyMap)), ); diff --git a/packages/amplify-gen2-codegen/src/npm_package/renderer.test.ts b/packages/amplify-gen2-codegen/src/npm_package/renderer.test.ts index 5cc6379bdfe..9a6ae463f7d 100644 --- a/packages/amplify-gen2-codegen/src/npm_package/renderer.test.ts +++ b/packages/amplify-gen2-codegen/src/npm_package/renderer.test.ts @@ -23,6 +23,7 @@ const installedDependencies: Record { +void describe('Gen 2 Codegen E2E tests', () => { void describe('render pipeline', () => { void it('renders a project with no parameters', async () => { const pipeline = createGen2Renderer({ @@ -39,7 +40,7 @@ void describe('Codegen E2E tests', () => { await assert.doesNotReject(pipeline.render); }); }); - void describe('Full Migration Codegen Flow', () => { + void describe('Full Migration Gen 2 Codegen Flow', () => { let projRoot: string; let projName: string; @@ -53,15 +54,16 @@ void describe('Codegen E2E tests', () => { await cleanupProjects(projRoot, projName); }); - void it('should init a project & add auth, function, storage, api with defaults & perform full migration codegen flow', async () => { + void it.only('should init a project & add auth, function, storage, api with defaults & perform full migration codegen flow', async () => { await setupAndPushDefaultGen1Project(projRoot, projName); - const { gen1UserPoolId, gen1ClientIds, gen1IdentityPoolId, gen1FunctionName, gen1BucketName, gen1GraphqlApiId, gen1Region } = + const { gen1UserPoolId, gen1ClientIds, gen1IdentityPoolId, gen1FunctionName, gen1BucketName, gen1GraphqlApiId, gen1Region, envName } = await assertDefaultGen1Setup(projRoot); - await runCodegenCommand(projRoot); - await copyFunctionFile(projRoot, 'function', gen1FunctionName); - await copyGen1Schema(projRoot, projName); - await updatePackageDependency(projRoot, '@aws-amplify/backend'); - await npmInstall(projRoot); + runCodegenCommand(projRoot); + copyFunctionFile(projRoot, 'function', gen1FunctionName); + copyGen1Schema(projRoot, projName); + removeErrorThrowsFromFunctionFile(projRoot, 'function', extractFunctionResourceName(gen1FunctionName, envName)); + updateAmplifyBackendPackagesVersion(projRoot); + npmInstall(projRoot); const gen2StackName = await runGen2SandboxCommand(projRoot, projName); await assertAuthResource(projRoot, gen1UserPoolId, gen1ClientIds, gen1IdentityPoolId, gen1Region); await assertStorageResource(projRoot, gen1BucketName, gen1Region); @@ -74,11 +76,11 @@ void describe('Codegen E2E tests', () => { const { gen1UserPoolId, gen1ClientIds, gen1IdentityPoolId, gen1FunctionName, gen1Region } = await assertAuthWithMaxOptionsGen1Setup( projRoot, ); - await runCodegenCommand(projRoot); - await copyFunctionFile(projRoot, 'auth', gen1FunctionName); - await removeErrorThrowsFromAuthResourceFile(projRoot); - await updatePackageDependency(projRoot, '@aws-amplify/backend'); - await npmInstall(projRoot); + runCodegenCommand(projRoot); + copyFunctionFile(projRoot, 'auth', gen1FunctionName); + removeErrorThrowsFromAuthResourceFile(projRoot); + updateAmplifyBackendPackagesVersion(projRoot); + npmInstall(projRoot); await toggleSandboxSecrets(projRoot, projName, 'set'); const gen2StackName = await runGen2SandboxCommand(projRoot, projName); await toggleSandboxSecrets(projRoot, projName, 'remove'); @@ -88,12 +90,12 @@ void describe('Codegen E2E tests', () => { void it('should init a project where default auth, all possible s3 bucket resource options are selected and perform full migration codegen flow ', async () => { await setupAndPushStorageWithMaxOptionsGen1Project(projRoot, projName); - const { gen1UserPoolId, gen1ClientIds, gen1BucketName, gen1IdentityPoolId, gen1Region } = await assertStorageWithMaxOptionsGen1Setup( - projRoot, - ); - await runCodegenCommand(projRoot); - await updatePackageDependency(projRoot, '@aws-amplify/backend'); - await npmInstall(projRoot); + const { gen1UserPoolId, gen1ClientIds, gen1BucketName, gen1IdentityPoolId, gen1Region, gen1FunctionName } = + await assertStorageWithMaxOptionsGen1Setup(projRoot); + runCodegenCommand(projRoot); + updateAmplifyBackendPackagesVersion(projRoot); + npmInstall(projRoot); + removeErrorThrowsFromFunctionFile(projRoot, 'storage', extractFunctionResourceName(gen1FunctionName, envName)); await runGen2SandboxCommand(projRoot, projName); await assertAuthResource(projRoot, gen1UserPoolId, gen1ClientIds, gen1IdentityPoolId, gen1Region); await assertStorageResource(projRoot, gen1BucketName, gen1Region); diff --git a/packages/amplify-migration-e2e/src/__tests__/migration_templategen_e2e.test.ts b/packages/amplify-migration-e2e/src/__tests__/migration_templategen_e2e.test.ts index 792fea441b2..ee28a080a3d 100644 --- a/packages/amplify-migration-e2e/src/__tests__/migration_templategen_e2e.test.ts +++ b/packages/amplify-migration-e2e/src/__tests__/migration_templategen_e2e.test.ts @@ -5,9 +5,8 @@ import { assertDefaultGen1Setup } from '../assertions'; import { setupAndPushDefaultGen1Project, runCodegenCommand, runGen2SandboxCommand, cleanupProjects } from '..'; import { copyFunctionFile } from '../function_utils'; import { copyGen1Schema } from '../api_utils'; -import { updatePackageDependency } from '../updatePackageJson'; import { createS3Bucket } from '../sdk_calls'; -import { executeStackRefactorSteps, rollbackStackRefactor, runTemplategenCommand, stackRefactor } from '../templategen'; +import { runExecuteCommand, runRevertCommand } from '../templategen'; void describe('Templategen E2E tests', () => { void describe('Full Migration Templategen Flow', () => { @@ -27,42 +26,32 @@ void describe('Templategen E2E tests', () => { await deleteS3Bucket(bucketName); }); - void it('should init a project & add auth, function, storage, api with defaults & perform full migration templategen flow', async () => { + void it('should init a project & add auth, function, storage, api with defaults & perform refactor', async () => { await setupAndPushDefaultGen1Project(projRoot, projName); - const { gen1StackName, gen1FunctionName, gen1Region } = await assertDefaultGen1Setup(projRoot); - await createS3Bucket(bucketName, gen1Region); + const { gen1StackName, gen1FunctionName } = await assertDefaultGen1Setup(projRoot); assert(gen1StackName); - await runCodegenCommand(projRoot); - await copyFunctionFile(projRoot, 'function', gen1FunctionName); - await copyGen1Schema(projRoot, projName); - await updatePackageDependency(projRoot, '@aws-amplify/backend'); - await npmInstall(projRoot); + runCodegenCommand(projRoot); + copyFunctionFile(projRoot, 'function', gen1FunctionName); + copyGen1Schema(projRoot, projName); + npmInstall(projRoot); const gen2StackName = await runGen2SandboxCommand(projRoot, projName); assert(gen2StackName); - await runTemplategenCommand(projRoot, gen1StackName, gen2StackName); - await stackRefactor(projRoot, projName, 'auth', bucketName); - await stackRefactor(projRoot, projName, 'storage', bucketName); + runExecuteCommand(projRoot, gen1StackName, gen2StackName); }); - void it('should init a project & add auth, function, storage, api with defaults & perform migration templategen flow and rollback to the original state', async () => { + void it('should init a project & add auth, function, storage, api with defaults, perform refactor and revert to the original state', async () => { await setupAndPushDefaultGen1Project(projRoot, projName); const { gen1StackName, gen1FunctionName, gen1Region } = await assertDefaultGen1Setup(projRoot); await createS3Bucket(bucketName, gen1Region); assert(gen1StackName); - await runCodegenCommand(projRoot); - await copyFunctionFile(projRoot, 'function', gen1FunctionName); - await copyGen1Schema(projRoot, projName); - await updatePackageDependency(projRoot, '@aws-amplify/backend'); - await npmInstall(projRoot); + runCodegenCommand(projRoot); + copyFunctionFile(projRoot, 'function', gen1FunctionName); + copyGen1Schema(projRoot, projName); + npmInstall(projRoot); const gen2StackName = await runGen2SandboxCommand(projRoot, projName); assert(gen2StackName); - await runTemplategenCommand(projRoot, gen1StackName, gen2StackName); - - await executeStackRefactorSteps(projRoot, 'auth', bucketName); - await executeStackRefactorSteps(projRoot, 'storage', bucketName); - - await rollbackStackRefactor(projRoot, 'auth', bucketName); - await rollbackStackRefactor(projRoot, 'storage', bucketName); + runExecuteCommand(projRoot, gen1StackName, gen2StackName); + runRevertCommand(projRoot, gen1StackName, gen2StackName); }); }); }); diff --git a/packages/amplify-migration-e2e/src/assertions.ts b/packages/amplify-migration-e2e/src/assertions.ts index 2e2397b9891..76a450f0130 100644 --- a/packages/amplify-migration-e2e/src/assertions.ts +++ b/packages/amplify-migration-e2e/src/assertions.ts @@ -43,6 +43,7 @@ async function assertFunction(gen1Meta: $TSAny, gen1Region: string) { const { Arn: gen1FunctionArn, Name: gen1FunctionName } = Object.keys(gen1Meta.function).map((key) => gen1Meta.function[key])[0].output; expect(gen1FunctionArn).toBeDefined(); expect(gen1FunctionName).toBeDefined(); + assert(typeof gen1FunctionName === 'string'); const cloudFunction = await getFunction(gen1FunctionName, gen1Region); expect(cloudFunction.Configuration?.FunctionArn).toEqual(gen1FunctionArn); return { gen1FunctionName }; @@ -51,6 +52,7 @@ async function assertFunction(gen1Meta: $TSAny, gen1Region: string) { export async function assertStorage(gen1Meta: $TSAny, gen1Region: string) { const { BucketName: gen1BucketName } = Object.keys(gen1Meta.storage).map((key) => gen1Meta.storage[key])[0].output; expect(gen1BucketName).toBeDefined(); + assert(typeof gen1BucketName === 'string'); const bucketExists = await checkIfBucketExists(gen1BucketName, gen1Region); expect(bucketExists).toMatchObject({}); return { gen1BucketName }; @@ -90,6 +92,8 @@ export async function assertDefaultGen1Setup(projRoot: string) { const gen1Meta = getProjectMeta(projRoot); const gen1StackName = gen1Meta.providers.awscloudformation.StackName; const gen1Region = gen1Meta.providers.awscloudformation.Region; + assert(gen1StackName && typeof gen1StackName === 'string', 'Gen1 stack name not found in meta file'); + const envName = gen1StackName.split('-')[2]; const { gen1UserPoolId } = await assertUserPool(gen1Meta, gen1Region); const { gen1FunctionName } = await assertFunction(gen1Meta, gen1Region); assert.doesNotMatch(gen1FunctionName, /PostConfirmation/); @@ -106,6 +110,7 @@ export async function assertDefaultGen1Setup(projRoot: string) { gen1BucketName, gen1GraphqlApiId, gen1Region, + envName, }; } @@ -132,7 +137,7 @@ export async function assertStorageWithMaxOptionsGen1Setup(projRoot: string) { const { gen1ClientIds } = await assertUserPoolClients(gen1Meta, gen1Region); const { gen1IdentityPoolId } = await assertIdentityPool(gen1Meta, gen1Region); - return { gen1UserPoolId, gen1ClientIds, gen1BucketName, gen1IdentityPoolId, gen1Region }; + return { gen1UserPoolId, gen1ClientIds, gen1BucketName, gen1IdentityPoolId, gen1Region, gen1FunctionName }; } async function assertUserPoolResource(projRoot: string, gen1UserPoolId: string, gen1Region: string) { diff --git a/packages/amplify-migration-e2e/src/function_utils.ts b/packages/amplify-migration-e2e/src/function_utils.ts index 9fb66f47821..04bc2686800 100644 --- a/packages/amplify-migration-e2e/src/function_utils.ts +++ b/packages/amplify-migration-e2e/src/function_utils.ts @@ -1,6 +1,8 @@ import path from 'node:path'; import * as fs from 'fs-extra'; +import { removeErrorThrows } from './index'; +type BackendCategory = 'auth' | 'storage' | 'function'; export function copyFunctionFile(projRoot: string, category: string, gen1FunctionName: string) { const sourcePath = path.join( projRoot, @@ -22,3 +24,10 @@ export function copyFunctionFile(projRoot: string, category: string, gen1Functio content = content.replace(/(const\s+moduleNames\s*=\s*process\.env\.MODULES)(.split\(','\);)/, '$1!$2'); fs.writeFileSync(destinationPath, content, 'utf8'); } + +export function removeErrorThrowsFromFunctionFile(projRoot: string, category: BackendCategory, functionResourceName: string) { + const resourcePath = path.join(projRoot, 'amplify', category, functionResourceName, 'resource.ts'); + const resourceContent = fs.readFileSync(resourcePath, 'utf-8'); + const finalContent = removeErrorThrows(resourceContent); + fs.writeFileSync(resourcePath, finalContent, 'utf-8'); +} diff --git a/packages/amplify-migration-e2e/src/index.ts b/packages/amplify-migration-e2e/src/index.ts index 495bf7ba353..4608c21c6ee 100644 --- a/packages/amplify-migration-e2e/src/index.ts +++ b/packages/amplify-migration-e2e/src/index.ts @@ -22,6 +22,8 @@ import path from 'node:path'; import { unset } from 'lodash'; import execa from 'execa'; import { deleteGen2Sandbox } from './sandbox'; +import assert from 'node:assert'; +import { updatePackageDependency } from './updatePackageJson'; export * from './sdk_calls'; export * from './assertions'; @@ -31,6 +33,9 @@ export * from './sandbox'; export const pushTimeoutMS = 1000 * 60 * 20; // 20 minutes; +export const MIGRATE_TOOL_VERSION = '0.1.0-next-6.0'; +export const BACKEND_DATA_VERSION = '0.0.0-test-20250416182614'; + export async function setupAndPushDefaultGen1Project(projRoot: string, projName: string) { await initJSProjectWithProfile(projRoot, { name: projName, disableAmplifyAppCreation: false, includeGen2RecommendationPrompt: false }); await addAuthWithDefault(projRoot); @@ -38,9 +43,9 @@ export async function setupAndPushDefaultGen1Project(projRoot: string, projName: await functionBuild(projRoot); await addS3WithGuestAccess(projRoot); await addApiWithoutSchema(projRoot, { transformerVersion: 2 }); - await updateApiSchema(projRoot, projName, 'simple_model.graphql'); + updateApiSchema(projRoot, projName, 'simple_model.graphql'); await amplifyPush(projRoot); - await addFeatureFlag(projRoot, 'graphqltransformer', 'enablegen2migration', true); + addFeatureFlag(projRoot, 'graphqltransformer', 'enablegen2migration', true); await amplifyPushForce(projRoot); } @@ -59,18 +64,22 @@ export async function setupAndPushAuthWithMaxOptionsGen1Project(projRoot: string } export async function setupAndPushStorageWithMaxOptionsGen1Project(projRoot: string, projName: string) { + console.log(`initializing project ${projName} at ${projRoot}`); await initJSProjectWithProfile(projRoot, { name: projName, disableAmplifyAppCreation: false, includeGen2RecommendationPrompt: false }); await addAuthWithDefault(projRoot); await addS3WithTrigger(projRoot); await amplifyPushAuth(projRoot); + console.log(`pushed auth successfully`); } export function runCodegenCommand(cwd: string) { - const processResult = execa.sync(getNpxPath(), ['@aws-amplify/migrate', 'to-gen-2', 'generate-code'], { + console.log(`running codegen command in ${cwd}`); + const processResult = execa.sync(getNpxPath(), [`@aws-amplify/migrate@${MIGRATE_TOOL_VERSION}`, 'to-gen-2', 'prepare'], { cwd, env: { ...process.env, npm_config_user_agent: 'npm' }, encoding: 'utf-8', }); + console.log(processResult); if (processResult.exitCode !== 0) { throw new Error(`Codegen command exit code: ${processResult.exitCode}, message: ${processResult.stderr}`); } @@ -94,3 +103,14 @@ export function removeErrorThrows(content: string): string { }); return result.join('\n'); } + +export function extractFunctionResourceName(functionName: string, envName: string): string { + const functionResourceName = functionName.split(`-${envName}`)[0]; + assert(functionResourceName, 'Function resource name not available'); + return functionResourceName; +} + +export function updateAmplifyBackendPackagesVersion(projRoot: string) { + updatePackageDependency(projRoot, '@aws-amplify/backend-data', BACKEND_DATA_VERSION); + updatePackageDependency(projRoot, '@aws-amplify/backend', BACKEND_DATA_VERSION); +} diff --git a/packages/amplify-migration-e2e/src/sandbox.ts b/packages/amplify-migration-e2e/src/sandbox.ts index 24cdf817f41..6065c934f63 100644 --- a/packages/amplify-migration-e2e/src/sandbox.ts +++ b/packages/amplify-migration-e2e/src/sandbox.ts @@ -8,7 +8,9 @@ export async function runGen2SandboxCommand(cwd: string, identifier: string) { env: { ...process.env, npm_config_user_agent: 'npm' }, encoding: 'utf-8', }); + console.log('runGen2SandboxCommand', processResult); if (processResult.exitCode === 0) { + console.log(processResult.stdout); const match = processResult.stdout.match(/arn:aws:cloudformation:.*:stack\/([^/]+)\//); if (match) { return match[1]; diff --git a/packages/amplify-migration-e2e/src/templategen.ts b/packages/amplify-migration-e2e/src/templategen.ts index 86163bf468d..1e4ee1091d2 100644 --- a/packages/amplify-migration-e2e/src/templategen.ts +++ b/packages/amplify-migration-e2e/src/templategen.ts @@ -8,7 +8,7 @@ import { getRollbackCommandsFromReadme, getStackRefactorCommandsFromReadme, read import { envVariable } from './envVariables'; import { getGen1ResourceDetails } from './gen1ResourceDetailsFetcher'; import { getGen2ResourceDetails } from './gen2ResourceDetailsFetcher'; -import { removeProperties } from '.'; +import { MIGRATE_TOOL_VERSION, removeProperties } from '.'; export type RefactorCategory = 'auth' | 'storage'; @@ -24,11 +24,21 @@ const STATUS_EXECUTE_COMPLETE = 'EXECUTE_COMPLETE'; const STATUS_UPDATE_COMPLETE = 'UPDATE_COMPLETE'; const STATUS_FAILED = 'FAILED'; -export function runTemplategenCommand(cwd: string, gen1StackName: string, gen2StackName: string) { +export function runExecuteCommand(cwd: string, gen1StackName: string, gen2StackName: string) { const parentDir = path.resolve(cwd, '..'); const processResult = execa.sync( getNpxPath(), - ['--prefix', parentDir, '@aws-amplify/migrate', 'to-gen-2', 'generate-templates', '--from', gen1StackName, '--to', gen2StackName], + [ + '--prefix', + parentDir, + `@aws-amplify/migrate@${MIGRATE_TOOL_VERSION}`, + 'to-gen-2', + 'execute', + '--from', + gen1StackName, + '--to', + gen2StackName, + ], { cwd, env: { ...process.env, npm_config_user_agent: 'npm' }, @@ -37,7 +47,34 @@ export function runTemplategenCommand(cwd: string, gen1StackName: string, gen2St ); if (processResult.exitCode !== 0) { - throw new Error(`Templategen command exit code: ${processResult.exitCode}, message: ${processResult.stderr}`); + throw new Error(`Execute command exit code: ${processResult.exitCode}, message: ${processResult.stderr}`); + } +} + +export function runRevertCommand(cwd: string, gen1StackName: string, gen2StackName: string, version = 'latest') { + const parentDir = path.resolve(cwd, '..'); + const processResult = execa.sync( + getNpxPath(), + [ + '--prefix', + parentDir, + `@aws-amplify/migrate@${MIGRATE_TOOL_VERSION}`, + 'to-gen-2', + 'revert', + '--from', + gen1StackName, + '--to', + gen2StackName, + ], + { + cwd, + env: { ...process.env, npm_config_user_agent: 'npm' }, + encoding: 'utf-8', + }, + ); + + if (processResult.exitCode !== 0) { + throw new Error(`Revert command exit code: ${processResult.exitCode}, message: ${processResult.stderr}`); } } diff --git a/packages/amplify-migration/src/app_auth_definition_fetcher.test.ts b/packages/amplify-migration/src/app_auth_definition_fetcher.test.ts index 69b5fd1fbcc..13b04ca5097 100644 --- a/packages/amplify-migration/src/app_auth_definition_fetcher.test.ts +++ b/packages/amplify-migration/src/app_auth_definition_fetcher.test.ts @@ -209,6 +209,12 @@ describe('Auth definition Fetcher tests', () => { mockReadFile.mockResolvedValueOnce( JSON.stringify({ api: {}, + auth: { + nonImportedResource: { + service: 'Cognito', + output: {}, + }, + }, }), ); // act + assert @@ -243,4 +249,19 @@ describe('Auth definition Fetcher tests', () => { ); await expect(appAuthDefinitionFetcher.getDefinition()).rejects.toEqual(new Error('No user pool or identity pool found for import.')); }); + + it('should throw error with invalid auth configuration structure for imported auth', async () => { + mockReadFile.mockResolvedValueOnce( + JSON.stringify({ + auth: { + importedAuth: { + service: 'Cognito', + serviceType: 'imported', + output: 'invalid output', + }, + }, + }), + ); + await expect(appAuthDefinitionFetcher.getDefinition()).rejects.toEqual(new Error('Invalid auth configuration structure')); + }); }); diff --git a/packages/amplify-migration/src/app_auth_definition_fetcher.ts b/packages/amplify-migration/src/app_auth_definition_fetcher.ts index 2b748a85be7..a61a51190a3 100644 --- a/packages/amplify-migration/src/app_auth_definition_fetcher.ts +++ b/packages/amplify-migration/src/app_auth_definition_fetcher.ts @@ -25,6 +25,18 @@ export interface AppAuthDefinitionFetcher { getDefinition(): Promise; } +interface AuthOutput { + output: { + UserPoolId?: string; + AppClientIDWeb?: string; + IdentityPoolId?: string; + }; +} + +const isAuthOutput = (value: unknown): value is AuthOutput => { + return typeof value === 'object' && value !== null && 'output' in value && typeof value.output === 'object'; +}; + export class AppAuthDefinitionFetcher { constructor( private cognitoIdentityPoolClient: CognitoIdentityClient, @@ -40,7 +52,7 @@ export class AppAuthDefinitionFetcher { return JSON.parse(contents); }; - private getAuthCategory = async () => { + private getAuthCategory = async (): Promise | undefined> => { const backendEnvironment = await this.backendEnvironmentResolver.selectBackendEnvironment(); if (!backendEnvironment?.deploymentArtifacts) return undefined; const currentCloudBackendDirectory = await this.ccbFetcher.getCurrentCloudBackend(backendEnvironment.deploymentArtifacts); @@ -60,7 +72,7 @@ export class AppAuthDefinitionFetcher { } }; - private getReferenceAuth = async (authCategory: any) => { + private getReferenceAuth = async (authCategory: Record) => { const isImported = Object.entries(authCategory).some( ([, value]) => typeof value === 'object' && value !== null && 'serviceType' in value && value.serviceType === 'imported', ); @@ -68,11 +80,13 @@ export class AppAuthDefinitionFetcher { return undefined; } - const { - UserPoolId: userPoolId, - AppClientIDWeb: userPoolClientId, - IdentityPoolId: identityPoolId, - } = Object.keys(authCategory).map((key) => authCategory[key])[0].output; + const firstAuth = Object.values(authCategory)[0]; + if (!isAuthOutput(firstAuth)) { + throw new Error('Invalid auth configuration structure'); + } + + const { UserPoolId: userPoolId, AppClientIDWeb: userPoolClientId, IdentityPoolId: identityPoolId } = firstAuth.output; + if (!userPoolId && !userPoolClientId && !identityPoolId) { throw new Error('No user pool or identity pool found for import.'); } diff --git a/packages/amplify-migration/src/commands/gen2/execute/execute_command.test.ts b/packages/amplify-migration/src/commands/gen2/execute/execute_command.test.ts index 71563051d55..431ebdab0a8 100644 --- a/packages/amplify-migration/src/commands/gen2/execute/execute_command.test.ts +++ b/packages/amplify-migration/src/commands/gen2/execute/execute_command.test.ts @@ -46,7 +46,7 @@ describe('Gen2ExecuteCommand', () => { await assert.rejects( () => runCommandAsync(parser, 'execute --from foo --to bar --resourceMappings resourceMap.json'), (err: Error) => { - assert.equal(err.message, 'Expected resourceMap to start with file://'); + assert.equal(err.message, 'Expected resourceMappings to start with file://'); return true; }, ); @@ -57,7 +57,7 @@ describe('Gen2ExecuteCommand', () => { await assert.rejects( () => runCommandAsync(parser, 'execute --from foo --to bar --resourceMappings file://'), (err: Error) => { - assert.equal(err.message, 'Expected resourceMap to have a path after file://'); + assert.equal(err.message, 'Expected resourceMappings to have a path after file://'); return true; }, ); diff --git a/packages/amplify-migration/src/commands/gen2/execute/execute_command.ts b/packages/amplify-migration/src/commands/gen2/execute/execute_command.ts index 088b72cd95d..5e96b15451e 100644 --- a/packages/amplify-migration/src/commands/gen2/execute/execute_command.ts +++ b/packages/amplify-migration/src/commands/gen2/execute/execute_command.ts @@ -71,11 +71,11 @@ export class Gen2ExecuteCommand implements CommandModule + import { $TSAny } from '@aws-amplify/amplify-cli-core'; import execa from 'execa'; import { GetPackageAssetPaths } from '@aws-amplify/amplify-cli-core'; diff --git a/packages/amplify-opensearch-simulator/package.json b/packages/amplify-opensearch-simulator/package.json index eaca0bc209a..597b8f440e5 100644 --- a/packages/amplify-opensearch-simulator/package.json +++ b/packages/amplify-opensearch-simulator/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-opensearch-simulator", - "version": "1.7.19-next-4.0", + "version": "1.7.18", "description": "Opensearch local simulator", "repository": { "type": "git", @@ -25,7 +25,7 @@ "extract-api": "ts-node ../../scripts/extract-api.ts" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.4.1-next-4.0", + "@aws-amplify/amplify-cli-core": "4.4.0", "@aws-amplify/amplify-prompts": "2.8.6", "aws-sdk": "^2.1464.0", "detect-port": "^1.3.0", diff --git a/packages/amplify-python-function-runtime-provider/package.json b/packages/amplify-python-function-runtime-provider/package.json index 9713ccf0c2f..4f7974c91e3 100644 --- a/packages/amplify-python-function-runtime-provider/package.json +++ b/packages/amplify-python-function-runtime-provider/package.json @@ -1,6 +1,6 @@ { "name": "amplify-python-function-runtime-provider", - "version": "2.4.51-next-4.0", + "version": "2.4.50", "description": "Provides functionality related to functions in Python on AWS", "repository": { "type": "git", @@ -25,7 +25,7 @@ "extract-api": "ts-node ../../scripts/extract-api.ts" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.4.1-next-4.0", + "@aws-amplify/amplify-cli-core": "4.4.0", "@aws-amplify/amplify-function-plugin-interface": "1.12.1", "execa": "^5.1.1", "glob": "^7.2.0", diff --git a/shared-scripts.sh b/shared-scripts.sh index 77b63ba8448..01fdc2a0491 100644 --- a/shared-scripts.sh +++ b/shared-scripts.sh @@ -350,6 +350,26 @@ function _runE2ETestsLinux { _loadTestAccountCredentials retry runE2eTestCb } + +function _runGen2MigrationE2ETestsLinux { + echo RUN Gen2 Migration E2E Tests Linux + _loadE2ECache + _install_packaged_cli_linux + # select region + export CLI_REGION=$(yarn ts-node ./scripts/select-region-for-e2e-test.ts) + echo "Test will run in $CLI_REGION" + # verify installation + which amplify + amplify version + source .circleci/local_publish_helpers_codebuild.sh && startLocalRegistry "$CODEBUILD_SRC_DIR/.circleci/verdaccio.yaml" + setNpmRegistryUrlToLocal + changeNpmGlobalPath + amplify version + cd packages/amplify-migration-e2e + _loadTestAccountCredentials + retry runE2eTestCb +} + function _unassumeTestAccountCredentials { echo "Unassume Role" unset AWS_ACCESS_KEY_ID diff --git a/yarn.lock b/yarn.lock index 932def0f6fc..c7e45b4840f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -100,45 +100,11 @@ __metadata: languageName: unknown linkType: soft -"@aws-amplify/amplify-appsync-simulator@npm:2.16.11": - version: 2.16.11 - resolution: "@aws-amplify/amplify-appsync-simulator@npm:2.16.11" - dependencies: - "@aws-amplify/amplify-cli-core": 4.4.0 - "@aws-amplify/amplify-prompts": 2.8.6 - "@graphql-tools/schema": ^8.3.1 - "@graphql-tools/utils": ^8.5.1 - amplify-velocity-template: 1.4.15 - aws-sdk: ^2.1464.0 - chalk: ^4.1.1 - cors: ^2.8.5 - dataloader: ^2.0.0 - express: ^4.21.2 - get-port: ^5.1.1 - graphql: ^15.5.0 - graphql-iso-date: ^3.6.1 - graphql-subscriptions: ^1.1.0 - js-string-escape: ^1.0.1 - jwt-decode: ^2.2.0 - libphonenumber-js: 1.9.47 - lodash: ^4.17.21 - moment: ^2.24.0 - moment-jdateformatparser: ^1.2.1 - moment-timezone: 0.5.35 - promise-toolbox: ^0.20.0 - slash: ^3.0.0 - ulid: ^2.3.0 - uuid: ^8.3.2 - ws: ^8.5.0 - checksum: a22f6540dc6f8744462c215f0e1ef439bba609f5188e2435475e4576cd64adfae265cef7f0552bbfb365fdf696bd796580241b5f80e56782a6e4c6758886231c - languageName: node - linkType: hard - -"@aws-amplify/amplify-appsync-simulator@workspace:packages/amplify-appsync-simulator": +"@aws-amplify/amplify-appsync-simulator@2.16.11, @aws-amplify/amplify-appsync-simulator@workspace:packages/amplify-appsync-simulator": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-appsync-simulator@workspace:packages/amplify-appsync-simulator" dependencies: - "@aws-amplify/amplify-cli-core": 4.4.1-next-4.0 + "@aws-amplify/amplify-cli-core": 4.4.0 "@aws-amplify/amplify-graphiql-explorer": 2.6.0 "@aws-amplify/amplify-prompts": 2.8.6 "@graphql-tools/schema": ^8.3.1 @@ -275,27 +241,11 @@ __metadata: languageName: unknown linkType: soft -"@aws-amplify/amplify-category-custom@npm:3.1.27": - version: 3.1.27 - resolution: "@aws-amplify/amplify-category-custom@npm:3.1.27" - dependencies: - "@aws-amplify/amplify-cli-core": 4.4.0 - "@aws-amplify/amplify-prompts": 2.8.6 - aws-cdk-lib: ~2.177.0 - execa: ^5.1.1 - fs-extra: ^8.1.0 - glob: ^7.2.0 - ora: ^4.0.3 - uuid: ^8.3.2 - checksum: cfa80eb8ca9f829e65ff7a1562d6cefe08421d12b80632e48a05fd0dec07ad652dfdba5801137251d18c472a7cc87ce708467a218fe32cce95dffd1339a8d3f0 - languageName: node - linkType: hard - -"@aws-amplify/amplify-category-custom@workspace:packages/amplify-category-custom": +"@aws-amplify/amplify-category-custom@3.1.27, @aws-amplify/amplify-category-custom@workspace:packages/amplify-category-custom": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-category-custom@workspace:packages/amplify-category-custom" dependencies: - "@aws-amplify/amplify-cli-core": 4.4.1-next-4.0 + "@aws-amplify/amplify-cli-core": 4.4.0 "@aws-amplify/amplify-prompts": 2.8.6 "@types/lodash": ^4.14.149 aws-cdk-lib: ~2.187.0 @@ -356,28 +306,11 @@ __metadata: languageName: unknown linkType: soft -"@aws-amplify/amplify-category-hosting@npm:3.5.40": - version: 3.5.40 - resolution: "@aws-amplify/amplify-category-hosting@npm:3.5.40" - dependencies: - "@aws-amplify/amplify-cli-core": 4.4.0 - "@aws-amplify/amplify-prompts": 2.8.6 - chalk: ^4.1.1 - fs-extra: ^8.1.0 - mime-types: ^2.1.26 - minimatch: ^3.0.4 - moment: ^2.24.0 - ora: ^4.0.3 - promise-sequential: ^1.1.1 - checksum: fc313cbab6747ed41190667452fd5248c2c466f0e5ebf56deac08c4208208b864e9b73cdd57b927ac85bd800e1889eb3efcbf2066ee89c1def9a6262e7b1f438 - languageName: node - linkType: hard - -"@aws-amplify/amplify-category-hosting@workspace:packages/amplify-category-hosting": +"@aws-amplify/amplify-category-hosting@3.5.40, @aws-amplify/amplify-category-hosting@workspace:packages/amplify-category-hosting": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-category-hosting@workspace:packages/amplify-category-hosting" dependencies: - "@aws-amplify/amplify-cli-core": 4.4.1-next-4.0 + "@aws-amplify/amplify-cli-core": 4.4.0 "@aws-amplify/amplify-prompts": 2.8.6 chalk: ^4.1.1 fs-extra: ^8.1.0 @@ -550,45 +483,6 @@ __metadata: languageName: node linkType: hard -"@aws-amplify/amplify-cli-core@npm:4.4.1-next-4.0": - version: 4.4.1-next-4.0 - resolution: "@aws-amplify/amplify-cli-core@npm:4.4.1-next-4.0" - dependencies: - "@aws-amplify/amplify-cli-logger": 1.3.8 - "@aws-amplify/amplify-function-plugin-interface": 1.12.1 - "@aws-amplify/amplify-prompts": 2.8.6 - "@aws-amplify/graphql-transformer-interfaces": ^3.12.0 - "@aws-sdk/util-arn-parser": ^3.310.0 - "@yarnpkg/lockfile": ^1.1.0 - ajv: ^6.12.6 - aws-cdk-lib: ~2.177.0 - chalk: ^4.1.1 - ci-info: ^3.8.0 - cli-table3: ^0.6.0 - cloudform-types: ^4.2.0 - colors: 1.4.0 - dotenv: ^8.2.0 - ejs: ^3.1.7 - execa: ^5.1.1 - fs-extra: ^8.1.0 - globby: ^11.0.3 - hjson: ^3.2.1 - inquirer: ^7.3.3 - js-yaml: ^4.0.0 - lodash: ^4.17.21 - node-fetch: ^2.6.7 - open: ^8.4.0 - ora: ^4.0.3 - proxy-agent: ^6.3.0 - semver: ^7.5.4 - typescript-json-schema: ~0.52.0 - which: ^2.0.2 - yaml: ^2.2.2 - yauzl: ^3.1.3 - checksum: 322e01420f895953c41e9299a9398a2ce42afc819ac035535896b415fd32aaa33c061c6c636705f9a4c8dbd838d56289b1e0ed3ffddf8ef42615714533c3a345 - languageName: node - linkType: hard - "@aws-amplify/amplify-cli-logger@1.3.8, @aws-amplify/amplify-cli-logger@workspace:packages/amplify-cli-logger": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-cli-logger@workspace:packages/amplify-cli-logger" @@ -606,32 +500,12 @@ __metadata: languageName: unknown linkType: soft -"@aws-amplify/amplify-console-hosting@npm:2.5.37": - version: 2.5.37 - resolution: "@aws-amplify/amplify-console-hosting@npm:2.5.37" - dependencies: - "@aws-amplify/amplify-cli-core": 4.4.0 - "@aws-amplify/amplify-environment-parameters": 1.9.18 - archiver: ^5.3.0 - chalk: ^4.1.1 - cli-table3: ^0.6.0 - execa: ^5.1.1 - fs-extra: ^8.1.0 - glob: ^7.2.0 - inquirer: ^7.3.3 - node-fetch: ^2.6.7 - ora: ^4.0.3 - proxy-agent: ^6.3.0 - checksum: 849909ac6dcd20d937b7bbab4ce2d01115062fa1bf85fcf5f62659966d5d5cd7a498566754d9f466d90762adb386874bf6db451428cfdf8414cf70b42033d7d9 - languageName: node - linkType: hard - -"@aws-amplify/amplify-console-hosting@workspace:packages/amplify-console-hosting": +"@aws-amplify/amplify-console-hosting@2.5.37, @aws-amplify/amplify-console-hosting@workspace:packages/amplify-console-hosting": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-console-hosting@workspace:packages/amplify-console-hosting" dependencies: - "@aws-amplify/amplify-cli-core": 4.4.1-next-4.0 - "@aws-amplify/amplify-environment-parameters": 1.9.19-next-4.0 + "@aws-amplify/amplify-cli-core": 4.4.0 + "@aws-amplify/amplify-environment-parameters": 1.9.18 archiver: ^5.3.0 chalk: ^4.1.1 cli-table3: ^0.6.0 @@ -649,7 +523,7 @@ __metadata: version: 0.0.0-use.local resolution: "@aws-amplify/amplify-console-integration-tests@workspace:packages/amplify-console-integration-tests" dependencies: - "@aws-amplify/amplify-cli-core": 4.4.1-next-4.0 + "@aws-amplify/amplify-cli-core": 4.4.0 "@aws-amplify/amplify-e2e-core": 5.7.3 "@types/ini": ^1.3.30 aws-sdk: ^2.1464.0 @@ -724,11 +598,11 @@ __metadata: languageName: unknown linkType: soft -"@aws-amplify/amplify-environment-parameters@1.9.19-next-4.0, @aws-amplify/amplify-environment-parameters@workspace:packages/amplify-environment-parameters": +"@aws-amplify/amplify-environment-parameters@1.9.18, @aws-amplify/amplify-environment-parameters@workspace:packages/amplify-environment-parameters": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-environment-parameters@workspace:packages/amplify-environment-parameters" dependencies: - "@aws-amplify/amplify-cli-core": 4.4.1-next-4.0 + "@aws-amplify/amplify-cli-core": 4.4.0 ajv: ^6.12.6 aws-sdk: ^2.1464.0 lodash: ^4.17.21 @@ -737,17 +611,6 @@ __metadata: languageName: unknown linkType: soft -"@aws-amplify/amplify-environment-parameters@npm:1.9.18": - version: 1.9.18 - resolution: "@aws-amplify/amplify-environment-parameters@npm:1.9.18" - dependencies: - "@aws-amplify/amplify-cli-core": 4.4.0 - ajv: ^6.12.6 - lodash: ^4.17.21 - checksum: 5f8ae0fddc21de6113b932c92d03b23746e6ea77356b6d4a869ffaf40d7d87702c42ecbbc8fe9ac2f3cbbb0bf0b5dd61bdbfbc54c2b71ccace4519abddde490b - languageName: node - linkType: hard - "@aws-amplify/amplify-frontend-android@3.5.8, @aws-amplify/amplify-frontend-android@workspace:packages/amplify-frontend-android": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-frontend-android@workspace:packages/amplify-frontend-android" @@ -768,24 +631,11 @@ __metadata: languageName: unknown linkType: soft -"@aws-amplify/amplify-frontend-ios@npm:3.7.11": - version: 3.7.11 - resolution: "@aws-amplify/amplify-frontend-ios@npm:3.7.11" - dependencies: - "@aws-amplify/amplify-cli-core": 4.4.0 - execa: ^5.1.1 - fs-extra: ^8.1.0 - graphql-config: ^2.2.1 - lodash: ^4.17.21 - checksum: 23682a146ba63a515e6cc03f3ccf664ecdee0664b929048fd7e48d5634a8ee82eee8179288557711de48cd1b9330926827cc268f4c2a8669c65ec47a333c28fb - languageName: node - linkType: hard - -"@aws-amplify/amplify-frontend-ios@workspace:packages/amplify-frontend-ios": +"@aws-amplify/amplify-frontend-ios@3.7.11, @aws-amplify/amplify-frontend-ios@workspace:packages/amplify-frontend-ios": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-frontend-ios@workspace:packages/amplify-frontend-ios" dependencies: - "@aws-amplify/amplify-cli-core": 4.4.1-next-4.0 + "@aws-amplify/amplify-cli-core": 4.4.0 execa: ^5.1.1 fs-extra: ^8.1.0 graphql-config: ^2.2.1 @@ -793,28 +643,11 @@ __metadata: languageName: unknown linkType: soft -"@aws-amplify/amplify-frontend-javascript@npm:3.10.21": - version: 3.10.21 - resolution: "@aws-amplify/amplify-frontend-javascript@npm:3.10.21" - dependencies: - "@aws-amplify/amplify-cli-core": 4.4.0 - "@babel/core": ^7.23.2 - "@babel/plugin-transform-modules-commonjs": 7.10.4 - chalk: ^4.1.1 - execa: ^5.1.1 - fs-extra: ^8.1.0 - graphql-config: ^2.2.1 - inquirer: ^7.3.3 - lodash: ^4.17.21 - checksum: 8e0f7746aa80b43f9a6b58f807869f8e128f00b3e0fd0d70f72ae6bc57b432e8641a56fd20ec63befe9a90e463f47d752c26a1fb2e5ba48bf93d6a43f47709e5 - languageName: node - linkType: hard - -"@aws-amplify/amplify-frontend-javascript@workspace:packages/amplify-frontend-javascript": +"@aws-amplify/amplify-frontend-javascript@3.10.21, @aws-amplify/amplify-frontend-javascript@workspace:packages/amplify-frontend-javascript": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-frontend-javascript@workspace:packages/amplify-frontend-javascript" dependencies: - "@aws-amplify/amplify-cli-core": 4.4.1-next-4.0 + "@aws-amplify/amplify-cli-core": 4.4.0 "@babel/core": ^7.23.2 "@babel/plugin-transform-modules-commonjs": 7.10.4 chalk: ^4.1.1 @@ -1056,32 +889,11 @@ __metadata: languageName: unknown linkType: soft -"@aws-amplify/amplify-opensearch-simulator@npm:1.7.18": - version: 1.7.18 - resolution: "@aws-amplify/amplify-opensearch-simulator@npm:1.7.18" - dependencies: - "@aws-amplify/amplify-cli-core": 4.4.0 - "@aws-amplify/amplify-prompts": 2.8.6 - aws-sdk: ^2.1464.0 - detect-port: ^1.3.0 - execa: ^5.1.1 - fs-extra: ^8.1.0 - get-port: ^5.1.1 - gunzip-maybe: ^1.4.2 - node-fetch: ^2.6.7 - openpgp: ^5.10.2 - promise-toolbox: ^0.20.0 - tar: ^6.1.11 - wait-port: ^0.2.7 - checksum: 4b22a23c6689c7a8277d2579f907c3c58a6420ef46d1db77bf64758f020d7c90be2192e98957fd3cd995215a86279be3bbcfc8eb14abea663c1de97f06dbc8e9 - languageName: node - linkType: hard - -"@aws-amplify/amplify-opensearch-simulator@workspace:packages/amplify-opensearch-simulator": +"@aws-amplify/amplify-opensearch-simulator@1.7.18, @aws-amplify/amplify-opensearch-simulator@workspace:packages/amplify-opensearch-simulator": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-opensearch-simulator@workspace:packages/amplify-opensearch-simulator" dependencies: - "@aws-amplify/amplify-cli-core": 4.4.1-next-4.0 + "@aws-amplify/amplify-cli-core": 4.4.0 "@aws-amplify/amplify-prompts": 2.8.6 "@types/node": ^12.12.6 "@types/openpgp": ^4.4.19 @@ -2190,14 +2002,14 @@ __metadata: languageName: node linkType: hard -"@aws-cdk/asset-awscli-v1@npm:^2.2.202, @aws-cdk/asset-awscli-v1@npm:^2.2.208, @aws-cdk/asset-awscli-v1@npm:^2.2.229": +"@aws-cdk/asset-awscli-v1@npm:^2.2.202, @aws-cdk/asset-awscli-v1@npm:^2.2.229": version: 2.2.232 resolution: "@aws-cdk/asset-awscli-v1@npm:2.2.232" checksum: c91a2e80d3ee22ac390d61d9c799bfdd344a97dbe18a7fccaba89b0995a025c620911c0ced5d748b878bec6eb5bbf2cb87a381525776ce19ba7ff9842811814a languageName: node linkType: hard -"@aws-cdk/asset-kubectl-v20@npm:^2.1.2, @aws-cdk/asset-kubectl-v20@npm:^2.1.3": +"@aws-cdk/asset-kubectl-v20@npm:^2.1.2": version: 2.1.4 resolution: "@aws-cdk/asset-kubectl-v20@npm:2.1.4" checksum: ab9353104f8a49807c906ce0193a838c3c82f25e6fecfa5b5341d722730574b4b5824fbf62b17fe69f07df34796a3e77513a55327e05f34556b518b0424041d7 @@ -2231,16 +2043,6 @@ __metadata: languageName: node linkType: hard -"@aws-cdk/cloud-assembly-schema@npm:^39.2.0": - version: 39.2.20 - resolution: "@aws-cdk/cloud-assembly-schema@npm:39.2.20" - dependencies: - jsonschema: ~1.4.1 - semver: ^7.7.1 - checksum: 94a96dc318627f2e3dfdd984134ad106f1e592d2eae41cd690069726c2f7aa4155e9f5196e71281eb199dc61b5f23cfbdbef59b8fda84d44da7a1aefb4a109af - languageName: node - linkType: hard - "@aws-cdk/cloud-assembly-schema@npm:^41.0.0": version: 41.2.0 resolution: "@aws-cdk/cloud-assembly-schema@npm:41.2.0" @@ -13823,26 +13625,11 @@ __metadata: languageName: node linkType: hard -"amplify-dotnet-function-runtime-provider@npm:2.1.3": - version: 2.1.3 - resolution: "amplify-dotnet-function-runtime-provider@npm:2.1.3" - dependencies: - "@aws-amplify/amplify-cli-core": 4.4.0 - "@aws-amplify/amplify-function-plugin-interface": 1.12.1 - "@aws-amplify/amplify-prompts": 2.8.6 - execa: ^5.1.1 - fs-extra: ^8.1.0 - glob: ^7.2.0 - which: ^2.0.2 - checksum: d53fc14a7b5b8962830e02ec6eb6652b70c7d4aaebc55cc49fadbc99e54f69fcf2ae5c17032e0b5363730f7b18ee55a8d735631eeca2a9146a327efec74770f8 - languageName: node - linkType: hard - -"amplify-dotnet-function-runtime-provider@workspace:packages/amplify-dotnet-function-runtime-provider": +"amplify-dotnet-function-runtime-provider@2.1.3, amplify-dotnet-function-runtime-provider@workspace:packages/amplify-dotnet-function-runtime-provider": version: 0.0.0-use.local resolution: "amplify-dotnet-function-runtime-provider@workspace:packages/amplify-dotnet-function-runtime-provider" dependencies: - "@aws-amplify/amplify-cli-core": 4.4.1-next-4.0 + "@aws-amplify/amplify-cli-core": 4.4.0 "@aws-amplify/amplify-function-plugin-interface": 1.12.1 "@aws-amplify/amplify-prompts": 2.8.6 "@types/node": ^12.12.6 @@ -13854,28 +13641,11 @@ __metadata: languageName: unknown linkType: soft -"amplify-dynamodb-simulator@npm:2.9.22": - version: 2.9.22 - resolution: "amplify-dynamodb-simulator@npm:2.9.22" - dependencies: - "@aws-amplify/amplify-cli-core": 4.4.0 - aws-sdk: ^2.1464.0 - detect-port: ^1.3.0 - execa: ^5.1.1 - fs-extra: ^8.1.0 - logdown: ^3.3.0 - promise-toolbox: ^0.20.0 - wait-port: ^0.2.7 - which: ^2.0.2 - checksum: c156ab81a488a41404c7532eee4ea739c84642c9e872d6f53ab613408ce39a2783b971949bbfb59e5489ca218571dfbcfc3db30fee9f1cfb8615103e5b557288 - languageName: node - linkType: hard - -"amplify-dynamodb-simulator@workspace:packages/amplify-dynamodb-simulator": +"amplify-dynamodb-simulator@2.9.22, amplify-dynamodb-simulator@workspace:packages/amplify-dynamodb-simulator": version: 0.0.0-use.local resolution: "amplify-dynamodb-simulator@workspace:packages/amplify-dynamodb-simulator" dependencies: - "@aws-amplify/amplify-cli-core": 4.4.1-next-4.0 + "@aws-amplify/amplify-cli-core": 4.4.0 aws-sdk: ^2.1464.0 detect-port: ^1.3.0 execa: ^5.1.1 @@ -13948,28 +13718,11 @@ __metadata: languageName: unknown linkType: soft -"amplify-go-function-runtime-provider@npm:2.3.50": - version: 2.3.50 - resolution: "amplify-go-function-runtime-provider@npm:2.3.50" - dependencies: - "@aws-amplify/amplify-cli-core": 4.4.0 - "@aws-amplify/amplify-function-plugin-interface": 1.12.1 - archiver: ^5.3.0 - execa: ^5.1.1 - fs-extra: ^8.1.0 - get-port: ^5.1.1 - glob: ^7.2.0 - semver: ^7.5.4 - which: ^2.0.2 - checksum: 73105a6dcce64de371ba855678a97aa5b7b8226d49eafca64808a598016fa037555d5bf8ac08fd604a72cdf3a723410dd59db457baf6c8ad2201c26cfdc37a43 - languageName: node - linkType: hard - -"amplify-go-function-runtime-provider@workspace:packages/amplify-go-function-runtime-provider": +"amplify-go-function-runtime-provider@2.3.50, amplify-go-function-runtime-provider@workspace:packages/amplify-go-function-runtime-provider": version: 0.0.0-use.local resolution: "amplify-go-function-runtime-provider@workspace:packages/amplify-go-function-runtime-provider" dependencies: - "@aws-amplify/amplify-cli-core": 4.4.1-next-4.0 + "@aws-amplify/amplify-cli-core": 4.4.0 "@aws-amplify/amplify-function-plugin-interface": 1.12.1 "@types/archiver": ^5.1.1 "@types/node": ^12.12.6 @@ -13995,26 +13748,11 @@ __metadata: languageName: unknown linkType: soft -"amplify-java-function-runtime-provider@npm:2.3.50": - version: 2.3.50 - resolution: "amplify-java-function-runtime-provider@npm:2.3.50" - dependencies: - "@aws-amplify/amplify-cli-core": 4.4.0 - "@aws-amplify/amplify-function-plugin-interface": 1.12.1 - execa: ^5.1.1 - fs-extra: ^8.1.0 - glob: ^7.2.0 - semver: ^7.5.4 - which: ^2.0.2 - checksum: b98f68fc6ff40dcea34acd6f300f83d5d94500e857cc349ae3ad3abee2335ebdf6dea9362583dadafcbc0ccb166f1c70948710d66e6730cc0e6c5a14865b7a0f - languageName: node - linkType: hard - -"amplify-java-function-runtime-provider@workspace:packages/amplify-java-function-runtime-provider": +"amplify-java-function-runtime-provider@2.3.50, amplify-java-function-runtime-provider@workspace:packages/amplify-java-function-runtime-provider": version: 0.0.0-use.local resolution: "amplify-java-function-runtime-provider@workspace:packages/amplify-java-function-runtime-provider" dependencies: - "@aws-amplify/amplify-cli-core": 4.4.1-next-4.0 + "@aws-amplify/amplify-cli-core": 4.4.0 "@aws-amplify/amplify-function-plugin-interface": 1.12.1 "@types/node": ^12.12.6 "@types/semver": ^7.1.0 @@ -14052,26 +13790,11 @@ __metadata: languageName: unknown linkType: soft -"amplify-python-function-runtime-provider@npm:2.4.50": - version: 2.4.50 - resolution: "amplify-python-function-runtime-provider@npm:2.4.50" - dependencies: - "@aws-amplify/amplify-cli-core": 4.4.0 - "@aws-amplify/amplify-function-plugin-interface": 1.12.1 - execa: ^5.1.1 - glob: ^7.2.0 - ini: ^1.3.5 - semver: ^7.5.4 - which: ^2.0.2 - checksum: 3a6f6f86c547e32afe0ed06c54954176fa232c43ac617c83d3f7b27e69f2f0b9a9ea7f6206cce34f2979fe42ddf4ce5fed78016cd675eea51cbb2fd4ba7d289c - languageName: node - linkType: hard - -"amplify-python-function-runtime-provider@workspace:packages/amplify-python-function-runtime-provider": +"amplify-python-function-runtime-provider@2.4.50, amplify-python-function-runtime-provider@workspace:packages/amplify-python-function-runtime-provider": version: 0.0.0-use.local resolution: "amplify-python-function-runtime-provider@workspace:packages/amplify-python-function-runtime-provider" dependencies: - "@aws-amplify/amplify-cli-core": 4.4.1-next-4.0 + "@aws-amplify/amplify-cli-core": 4.4.0 "@aws-amplify/amplify-function-plugin-interface": 1.12.1 "@types/fs-extra": ^8.0.1 "@types/node": ^12.12.6 @@ -14895,31 +14618,6 @@ __metadata: languageName: node linkType: hard -"aws-cdk-lib@npm:~2.177.0": - version: 2.177.0 - resolution: "aws-cdk-lib@npm:2.177.0" - dependencies: - "@aws-cdk/asset-awscli-v1": ^2.2.208 - "@aws-cdk/asset-kubectl-v20": ^2.1.3 - "@aws-cdk/asset-node-proxy-agent-v6": ^2.1.0 - "@aws-cdk/cloud-assembly-schema": ^39.2.0 - "@balena/dockerignore": ^1.0.2 - case: 1.6.3 - fs-extra: ^11.2.0 - ignore: ^5.3.2 - jsonschema: ^1.4.1 - mime-types: ^2.1.35 - minimatch: ^3.1.2 - punycode: ^2.3.1 - semver: ^7.6.3 - table: ^6.8.2 - yaml: 1.10.2 - peerDependencies: - constructs: ^10.0.0 - checksum: 5285957a8b62466490443219bbf6a93fe01d18713f19f2233808380a40fbeb54f1902a9b225803dabd3f74d30386a3c28ae996cb2e741534c6530ed2ff3907b3 - languageName: node - linkType: hard - "aws-cdk-lib@npm:~2.187.0": version: 2.187.0 resolution: "aws-cdk-lib@npm:2.187.0" @@ -31024,7 +30722,7 @@ __metadata: languageName: node linkType: hard -"table@npm:^6.0.9, table@npm:^6.8.1, table@npm:^6.8.2, table@npm:^6.9.0": +"table@npm:^6.0.9, table@npm:^6.8.1, table@npm:^6.9.0": version: 6.9.0 resolution: "table@npm:6.9.0" dependencies: