From 08bb586e2f57d38fcc8bedb4760bc79222ade400 Mon Sep 17 00:00:00 2001 From: Kevin Shan Date: Wed, 11 Dec 2024 10:58:09 -0800 Subject: [PATCH 01/12] chore: construct dependencies fix Signed-off-by: Kevin Shan --- package.json | 60 ++++++++++++++++++- packages/amplify-data-construct/.jsii | 31 +++++++++- packages/amplify-data-construct/package.json | 60 ++++++++++++++++++- packages/amplify-graphql-api-construct/.jsii | 31 +++++++++- .../package.json | 60 ++++++++++++++++++- 5 files changed, 237 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 2c7624295b..ddcc547b83 100755 --- a/package.json +++ b/package.json @@ -226,6 +226,35 @@ "@aws-amplify/graphql-api-construct/@aws-sdk/client-sso", "@aws-amplify/graphql-api-construct/@aws-sdk/token-providers", "@aws-amplify/graphql-api-construct/semver", + "@aws-amplify/graphql-api-construct/@aws-cdk/assert", + "@aws-amplify/graphql-api-construct/@aws-cdk/cloudformation-diff", + "@aws-amplify/graphql-api-construct/json-schema-to-ts", + "@aws-amplify/graphql-api-construct/@aws-cdk/cfnspec", + "@aws-amplify/graphql-api-construct/chalk", + "@aws-amplify/graphql-api-construct/diff", + "@aws-amplify/graphql-api-construct/fast-deep-equal", + "@aws-amplify/graphql-api-construct/string-width", + "@aws-amplify/graphql-api-construct/table", + "@aws-amplify/graphql-api-construct/@babel/runtime", + "@aws-amplify/graphql-api-construct/ts-algebra", + "@aws-amplify/graphql-api-construct/ansi-styles", + "@aws-amplify/graphql-api-construct/supports-color", + "@aws-amplify/graphql-api-construct/emoji-regex", + "@aws-amplify/graphql-api-construct/is-fullwidth-code-point", + "@aws-amplify/graphql-api-construct/strip-ansi", + "@aws-amplify/graphql-api-construct/ajv", + "@aws-amplify/graphql-api-construct/lodash.truncate", + "@aws-amplify/graphql-api-construct/slice-ansi", + "@aws-amplify/graphql-api-construct/regenerator-runtime", + "@aws-amplify/graphql-api-construct/at-least-node", + "@aws-amplify/graphql-api-construct/color-convert", + "@aws-amplify/graphql-api-construct/has-flag", + "@aws-amplify/graphql-api-construct/ansi-regex", + "@aws-amplify/graphql-api-construct/fast-uri", + "@aws-amplify/graphql-api-construct/json-schema-traverse", + "@aws-amplify/graphql-api-construct/require-from-string", + "@aws-amplify/graphql-api-construct/astral-regex", + "@aws-amplify/graphql-api-construct/color-name", "@aws-amplify/data-construct/@aws-amplify/graphql-transformer", "@aws-amplify/data-construct/@aws-amplify/graphql-transformer-core", "@aws-amplify/data-construct/@aws-amplify/graphql-transformer-interfaces", @@ -349,7 +378,36 @@ "@aws-amplify/data-construct/strnum", "@aws-amplify/data-construct/@aws-sdk/client-sso", "@aws-amplify/data-construct/@aws-sdk/token-providers", - "@aws-amplify/data-construct/semver" + "@aws-amplify/data-construct/semver", + "@aws-amplify/data-construct/@aws-cdk/assert", + "@aws-amplify/data-construct/@aws-cdk/cloudformation-diff", + "@aws-amplify/data-construct/json-schema-to-ts", + "@aws-amplify/data-construct/@aws-cdk/cfnspec", + "@aws-amplify/data-construct/chalk", + "@aws-amplify/data-construct/diff", + "@aws-amplify/data-construct/fast-deep-equal", + "@aws-amplify/data-construct/string-width", + "@aws-amplify/data-construct/table", + "@aws-amplify/data-construct/@babel/runtime", + "@aws-amplify/data-construct/ts-algebra", + "@aws-amplify/data-construct/ansi-styles", + "@aws-amplify/data-construct/supports-color", + "@aws-amplify/data-construct/emoji-regex", + "@aws-amplify/data-construct/is-fullwidth-code-point", + "@aws-amplify/data-construct/strip-ansi", + "@aws-amplify/data-construct/ajv", + "@aws-amplify/data-construct/lodash.truncate", + "@aws-amplify/data-construct/slice-ansi", + "@aws-amplify/data-construct/regenerator-runtime", + "@aws-amplify/data-construct/at-least-node", + "@aws-amplify/data-construct/color-convert", + "@aws-amplify/data-construct/has-flag", + "@aws-amplify/data-construct/ansi-regex", + "@aws-amplify/data-construct/fast-uri", + "@aws-amplify/data-construct/json-schema-traverse", + "@aws-amplify/data-construct/require-from-string", + "@aws-amplify/data-construct/astral-regex", + "@aws-amplify/data-construct/color-name" ] }, "devDependencies": { diff --git a/packages/amplify-data-construct/.jsii b/packages/amplify-data-construct/.jsii index 14c56f9c47..510263b665 100644 --- a/packages/amplify-data-construct/.jsii +++ b/packages/amplify-data-construct/.jsii @@ -28,6 +28,9 @@ "@aws-amplify/graphql-transformer-interfaces": "4.2.0", "@aws-amplify/platform-core": "^1.0.0", "@aws-amplify/plugin-types": "^1.0.0", + "@aws-cdk/assert": "^2.68.0", + "@aws-cdk/cfnspec": "2.68.0", + "@aws-cdk/cloudformation-diff": "2.68.0", "@aws-crypto/crc32": "5.2.0", "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "^5.2.0", @@ -56,6 +59,7 @@ "@aws-sdk/util-locate-window": "^3.0.0", "@aws-sdk/util-user-agent-browser": "3.609.0", "@aws-sdk/util-user-agent-node": "3.614.0", + "@babel/runtime": "^7.18.3", "@smithy/abort-controller": "^3.1.1", "@smithy/config-resolver": "^3.0.5", "@smithy/core": "^2.4.0", @@ -100,29 +104,54 @@ "@smithy/util-stream": "^3.1.3", "@smithy/util-uri-escape": "^3.0.0", "@smithy/util-utf8": "^3.0.0", + "ajv": "^8.0.1", + "ansi-regex": "^5.0.1", + "ansi-styles": "^4.1.0", + "astral-regex": "^2.0.0", + "at-least-node": "^1.0.0", "bowser": "^2.11.0", + "chalk": "^4", "charenc": "^0.0.2", "ci-info": "^3.2.0", + "color-convert": "^2.0.1", + "color-name": "~1.1.4", "crypt": "^0.0.2", + "diff": "^5.1.0", + "emoji-regex": "^8.0.0", + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", "fast-xml-parser": "4.4.1", "fs-extra": "^8.1.0", "graceful-fs": "^4.2.0", "graphql": "^15.5.0", "graphql-mapping-template": "5.0.1", "graphql-transformer-common": "5.1.1", + "has-flag": "^4.0.0", "hjson": "^3.2.2", "immer": "^9.0.12", "is-buffer": "~1.1.6", "is-ci": "^3.0.1", + "is-fullwidth-code-point": "^3.0.0", + "json-schema-to-ts": "^3.1.1", + "json-schema-traverse": "^1.0.0", "jsonfile": "^4.0.0", "libphonenumber-js": "1.9.47", "lodash": "^4.17.21", "lodash.mergewith": "^4.6.2", + "lodash.truncate": "^4.4.2", "md5": "^2.2.1", "object-hash": "^3.0.0", "pluralize": "8.0.0", + "regenerator-runtime": "^0.14.0", + "require-from-string": "^2.0.2", "semver": "^7.6.3", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", "strnum": "^1.0.5", + "supports-color": "^7.1.0", + "table": "^6.8.1", + "ts-algebra": "^2.0.0", "ts-dedent": "^2.0.0", "tslib": "^2.6.2", "universalify": "^0.1.0", @@ -4027,5 +4056,5 @@ }, "types": {}, "version": "1.14.2", - "fingerprint": "FMswzzna/8JASQVcVLrxNDZOHXYyZKRJ+RppKV1kPYU=" + "fingerprint": "RTfNcFrHD4q0mWFUXzMPgp9jaKN0jqAhFM2pyV5xZnA=" } \ No newline at end of file diff --git a/packages/amplify-data-construct/package.json b/packages/amplify-data-construct/package.json index ef7bc797eb..7a7fa74358 100644 --- a/packages/amplify-data-construct/package.json +++ b/packages/amplify-data-construct/package.json @@ -154,7 +154,36 @@ "strnum", "@aws-sdk/token-providers", "@aws-sdk/client-sso", - "semver" + "semver", + "@aws-cdk/assert", + "@aws-cdk/cloudformation-diff", + "json-schema-to-ts", + "@aws-cdk/cfnspec", + "chalk", + "diff", + "fast-deep-equal", + "string-width", + "table", + "@babel/runtime", + "ts-algebra", + "ansi-styles", + "supports-color", + "emoji-regex", + "is-fullwidth-code-point", + "strip-ansi", + "ajv", + "lodash.truncate", + "slice-ansi", + "regenerator-runtime", + "at-least-node", + "color-convert", + "has-flag", + "ansi-regex", + "fast-uri", + "json-schema-traverse", + "require-from-string", + "astral-regex", + "color-name" ], "dependencies": { "@aws-amplify/ai-constructs": "^1.0.0", @@ -180,6 +209,9 @@ "@aws-amplify/graphql-transformer-interfaces": "4.2.0", "@aws-amplify/platform-core": "^1.0.0", "@aws-amplify/plugin-types": "^1.0.0", + "@aws-cdk/assert": "^2.68.0", + "@aws-cdk/cfnspec": "2.68.0", + "@aws-cdk/cloudformation-diff": "2.68.0", "@aws-crypto/crc32": "5.2.0", "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "^5.2.0", @@ -208,6 +240,7 @@ "@aws-sdk/util-locate-window": "^3.0.0", "@aws-sdk/util-user-agent-browser": "3.609.0", "@aws-sdk/util-user-agent-node": "3.614.0", + "@babel/runtime": "^7.18.3", "@smithy/abort-controller": "^3.1.1", "@smithy/config-resolver": "^3.0.5", "@smithy/core": "^2.4.0", @@ -252,29 +285,54 @@ "@smithy/util-stream": "^3.1.3", "@smithy/util-uri-escape": "^3.0.0", "@smithy/util-utf8": "^3.0.0", + "ajv": "^8.0.1", + "ansi-regex": "^5.0.1", + "ansi-styles": "^4.1.0", + "astral-regex": "^2.0.0", + "at-least-node": "^1.0.0", "bowser": "^2.11.0", + "chalk": "^4", "charenc": "^0.0.2", "ci-info": "^3.2.0", + "color-convert": "^2.0.1", + "color-name": "~1.1.4", "crypt": "^0.0.2", + "diff": "^5.1.0", + "emoji-regex": "^8.0.0", + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", "fast-xml-parser": "4.4.1", "fs-extra": "^8.1.0", "graceful-fs": "^4.2.0", "graphql": "^15.5.0", "graphql-mapping-template": "5.0.1", "graphql-transformer-common": "5.1.1", + "has-flag": "^4.0.0", "hjson": "^3.2.2", "immer": "^9.0.12", "is-buffer": "~1.1.6", "is-ci": "^3.0.1", + "is-fullwidth-code-point": "^3.0.0", + "json-schema-to-ts": "^3.1.1", + "json-schema-traverse": "^1.0.0", "jsonfile": "^4.0.0", "libphonenumber-js": "1.9.47", "lodash": "^4.17.21", "lodash.mergewith": "^4.6.2", + "lodash.truncate": "^4.4.2", "md5": "^2.2.1", "object-hash": "^3.0.0", "pluralize": "8.0.0", + "regenerator-runtime": "^0.14.0", + "require-from-string": "^2.0.2", "semver": "^7.6.3", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", "strnum": "^1.0.5", + "supports-color": "^7.1.0", + "table": "^6.8.1", + "ts-algebra": "^2.0.0", "ts-dedent": "^2.0.0", "tslib": "^2.6.2", "universalify": "^0.1.0", diff --git a/packages/amplify-graphql-api-construct/.jsii b/packages/amplify-graphql-api-construct/.jsii index 7631d3f886..a2ca39e974 100644 --- a/packages/amplify-graphql-api-construct/.jsii +++ b/packages/amplify-graphql-api-construct/.jsii @@ -28,6 +28,9 @@ "@aws-amplify/graphql-transformer-interfaces": "4.2.0", "@aws-amplify/platform-core": "^1.0.0", "@aws-amplify/plugin-types": "^1.0.0", + "@aws-cdk/assert": "^2.68.0", + "@aws-cdk/cfnspec": "2.68.0", + "@aws-cdk/cloudformation-diff": "2.68.0", "@aws-crypto/crc32": "5.2.0", "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "^5.2.0", @@ -56,6 +59,7 @@ "@aws-sdk/util-locate-window": "^3.0.0", "@aws-sdk/util-user-agent-browser": "3.609.0", "@aws-sdk/util-user-agent-node": "3.614.0", + "@babel/runtime": "^7.18.3", "@smithy/abort-controller": "^3.1.1", "@smithy/config-resolver": "^3.0.5", "@smithy/core": "^2.4.0", @@ -100,29 +104,54 @@ "@smithy/util-stream": "^3.1.3", "@smithy/util-uri-escape": "^3.0.0", "@smithy/util-utf8": "^3.0.0", + "ajv": "^8.0.1", + "ansi-regex": "^5.0.1", + "ansi-styles": "^4.1.0", + "astral-regex": "^2.0.0", + "at-least-node": "^1.0.0", "bowser": "^2.11.0", + "chalk": "^4", "charenc": "^0.0.2", "ci-info": "^3.2.0", + "color-convert": "^2.0.1", + "color-name": "~1.1.4", "crypt": "^0.0.2", + "diff": "^5.1.0", + "emoji-regex": "^8.0.0", + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", "fast-xml-parser": "4.4.1", "fs-extra": "^8.1.0", "graceful-fs": "^4.2.0", "graphql": "^15.5.0", "graphql-mapping-template": "5.0.1", "graphql-transformer-common": "5.1.1", + "has-flag": "^4.0.0", "hjson": "^3.2.2", "immer": "^9.0.12", "is-buffer": "~1.1.6", "is-ci": "^3.0.1", + "is-fullwidth-code-point": "^3.0.0", + "json-schema-to-ts": "^3.1.1", + "json-schema-traverse": "^1.0.0", "jsonfile": "^4.0.0", "libphonenumber-js": "1.9.47", "lodash": "^4.17.21", "lodash.mergewith": "^4.6.2", + "lodash.truncate": "^4.4.2", "md5": "^2.2.1", "object-hash": "^3.0.0", "pluralize": "8.0.0", + "regenerator-runtime": "^0.14.0", + "require-from-string": "^2.0.2", "semver": "^7.6.3", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", "strnum": "^1.0.5", + "supports-color": "^7.1.0", + "table": "^6.8.1", + "ts-algebra": "^2.0.0", "ts-dedent": "^2.0.0", "tslib": "^2.6.2", "universalify": "^0.1.0", @@ -9365,5 +9394,5 @@ } }, "version": "1.18.2", - "fingerprint": "YYygZNVWWdM+IfoWx8aG4m7aCLA2fMqBNLqYSazlA0M=" + "fingerprint": "uN7bAlteScm304GLowJ9zVuVWrDSdComi7RBqGAmHZ0=" } \ No newline at end of file diff --git a/packages/amplify-graphql-api-construct/package.json b/packages/amplify-graphql-api-construct/package.json index 6c4f1aa3da..ee2d3fbeb2 100644 --- a/packages/amplify-graphql-api-construct/package.json +++ b/packages/amplify-graphql-api-construct/package.json @@ -155,7 +155,36 @@ "strnum", "@aws-sdk/token-providers", "@aws-sdk/client-sso", - "semver" + "semver", + "@aws-cdk/assert", + "@aws-cdk/cloudformation-diff", + "json-schema-to-ts", + "@aws-cdk/cfnspec", + "chalk", + "diff", + "fast-deep-equal", + "string-width", + "table", + "@babel/runtime", + "ts-algebra", + "ansi-styles", + "supports-color", + "emoji-regex", + "is-fullwidth-code-point", + "strip-ansi", + "ajv", + "lodash.truncate", + "slice-ansi", + "regenerator-runtime", + "at-least-node", + "color-convert", + "has-flag", + "ansi-regex", + "fast-uri", + "json-schema-traverse", + "require-from-string", + "astral-regex", + "color-name" ], "dependencies": { "@aws-amplify/ai-constructs": "^1.0.0", @@ -180,6 +209,9 @@ "@aws-amplify/graphql-transformer-interfaces": "4.2.0", "@aws-amplify/platform-core": "^1.0.0", "@aws-amplify/plugin-types": "^1.0.0", + "@aws-cdk/assert": "^2.68.0", + "@aws-cdk/cfnspec": "2.68.0", + "@aws-cdk/cloudformation-diff": "2.68.0", "@aws-crypto/crc32": "5.2.0", "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "^5.2.0", @@ -208,6 +240,7 @@ "@aws-sdk/util-locate-window": "^3.0.0", "@aws-sdk/util-user-agent-browser": "3.609.0", "@aws-sdk/util-user-agent-node": "3.614.0", + "@babel/runtime": "^7.18.3", "@smithy/abort-controller": "^3.1.1", "@smithy/config-resolver": "^3.0.5", "@smithy/core": "^2.4.0", @@ -252,29 +285,54 @@ "@smithy/util-stream": "^3.1.3", "@smithy/util-uri-escape": "^3.0.0", "@smithy/util-utf8": "^3.0.0", + "ajv": "^8.0.1", + "ansi-regex": "^5.0.1", + "ansi-styles": "^4.1.0", + "astral-regex": "^2.0.0", + "at-least-node": "^1.0.0", "bowser": "^2.11.0", + "chalk": "^4", "charenc": "^0.0.2", "ci-info": "^3.2.0", + "color-convert": "^2.0.1", + "color-name": "~1.1.4", "crypt": "^0.0.2", + "diff": "^5.1.0", + "emoji-regex": "^8.0.0", + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", "fast-xml-parser": "4.4.1", "fs-extra": "^8.1.0", "graceful-fs": "^4.2.0", "graphql": "^15.5.0", "graphql-mapping-template": "5.0.1", "graphql-transformer-common": "5.1.1", + "has-flag": "^4.0.0", "hjson": "^3.2.2", "immer": "^9.0.12", "is-buffer": "~1.1.6", "is-ci": "^3.0.1", + "is-fullwidth-code-point": "^3.0.0", + "json-schema-to-ts": "^3.1.1", + "json-schema-traverse": "^1.0.0", "jsonfile": "^4.0.0", "libphonenumber-js": "1.9.47", "lodash": "^4.17.21", "lodash.mergewith": "^4.6.2", + "lodash.truncate": "^4.4.2", "md5": "^2.2.1", "object-hash": "^3.0.0", "pluralize": "8.0.0", + "regenerator-runtime": "^0.14.0", + "require-from-string": "^2.0.2", "semver": "^7.6.3", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", "strnum": "^1.0.5", + "supports-color": "^7.1.0", + "table": "^6.8.1", + "ts-algebra": "^2.0.0", "ts-dedent": "^2.0.0", "tslib": "^2.6.2", "universalify": "^0.1.0", From 9ce1b61c2a384f44c3fb0cbb3ca8d24c61010916 Mon Sep 17 00:00:00 2001 From: Kevin Shan Date: Wed, 11 Dec 2024 15:30:50 -0800 Subject: [PATCH 02/12] chore: verification scripts update + remove non-runtime bundled packages Signed-off-by: Kevin Shan --- package.json | 4 -- packages/amplify-data-construct/package.json | 8 --- .../package.json | 8 --- scripts/verify-construct-dependencies.ts | 71 +++++++++++++++++-- 4 files changed, 67 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index ddcc547b83..b6a3865e10 100755 --- a/package.json +++ b/package.json @@ -381,15 +381,12 @@ "@aws-amplify/data-construct/semver", "@aws-amplify/data-construct/@aws-cdk/assert", "@aws-amplify/data-construct/@aws-cdk/cloudformation-diff", - "@aws-amplify/data-construct/json-schema-to-ts", "@aws-amplify/data-construct/@aws-cdk/cfnspec", "@aws-amplify/data-construct/chalk", "@aws-amplify/data-construct/diff", "@aws-amplify/data-construct/fast-deep-equal", "@aws-amplify/data-construct/string-width", "@aws-amplify/data-construct/table", - "@aws-amplify/data-construct/@babel/runtime", - "@aws-amplify/data-construct/ts-algebra", "@aws-amplify/data-construct/ansi-styles", "@aws-amplify/data-construct/supports-color", "@aws-amplify/data-construct/emoji-regex", @@ -398,7 +395,6 @@ "@aws-amplify/data-construct/ajv", "@aws-amplify/data-construct/lodash.truncate", "@aws-amplify/data-construct/slice-ansi", - "@aws-amplify/data-construct/regenerator-runtime", "@aws-amplify/data-construct/at-least-node", "@aws-amplify/data-construct/color-convert", "@aws-amplify/data-construct/has-flag", diff --git a/packages/amplify-data-construct/package.json b/packages/amplify-data-construct/package.json index 7a7fa74358..6e429925ab 100644 --- a/packages/amplify-data-construct/package.json +++ b/packages/amplify-data-construct/package.json @@ -157,15 +157,12 @@ "semver", "@aws-cdk/assert", "@aws-cdk/cloudformation-diff", - "json-schema-to-ts", "@aws-cdk/cfnspec", "chalk", "diff", "fast-deep-equal", "string-width", "table", - "@babel/runtime", - "ts-algebra", "ansi-styles", "supports-color", "emoji-regex", @@ -174,7 +171,6 @@ "ajv", "lodash.truncate", "slice-ansi", - "regenerator-runtime", "at-least-node", "color-convert", "has-flag", @@ -240,7 +236,6 @@ "@aws-sdk/util-locate-window": "^3.0.0", "@aws-sdk/util-user-agent-browser": "3.609.0", "@aws-sdk/util-user-agent-node": "3.614.0", - "@babel/runtime": "^7.18.3", "@smithy/abort-controller": "^3.1.1", "@smithy/config-resolver": "^3.0.5", "@smithy/core": "^2.4.0", @@ -313,7 +308,6 @@ "is-buffer": "~1.1.6", "is-ci": "^3.0.1", "is-fullwidth-code-point": "^3.0.0", - "json-schema-to-ts": "^3.1.1", "json-schema-traverse": "^1.0.0", "jsonfile": "^4.0.0", "libphonenumber-js": "1.9.47", @@ -323,7 +317,6 @@ "md5": "^2.2.1", "object-hash": "^3.0.0", "pluralize": "8.0.0", - "regenerator-runtime": "^0.14.0", "require-from-string": "^2.0.2", "semver": "^7.6.3", "slice-ansi": "^4.0.0", @@ -332,7 +325,6 @@ "strnum": "^1.0.5", "supports-color": "^7.1.0", "table": "^6.8.1", - "ts-algebra": "^2.0.0", "ts-dedent": "^2.0.0", "tslib": "^2.6.2", "universalify": "^0.1.0", diff --git a/packages/amplify-graphql-api-construct/package.json b/packages/amplify-graphql-api-construct/package.json index ee2d3fbeb2..d459676acf 100644 --- a/packages/amplify-graphql-api-construct/package.json +++ b/packages/amplify-graphql-api-construct/package.json @@ -158,15 +158,12 @@ "semver", "@aws-cdk/assert", "@aws-cdk/cloudformation-diff", - "json-schema-to-ts", "@aws-cdk/cfnspec", "chalk", "diff", "fast-deep-equal", "string-width", "table", - "@babel/runtime", - "ts-algebra", "ansi-styles", "supports-color", "emoji-regex", @@ -175,7 +172,6 @@ "ajv", "lodash.truncate", "slice-ansi", - "regenerator-runtime", "at-least-node", "color-convert", "has-flag", @@ -240,7 +236,6 @@ "@aws-sdk/util-locate-window": "^3.0.0", "@aws-sdk/util-user-agent-browser": "3.609.0", "@aws-sdk/util-user-agent-node": "3.614.0", - "@babel/runtime": "^7.18.3", "@smithy/abort-controller": "^3.1.1", "@smithy/config-resolver": "^3.0.5", "@smithy/core": "^2.4.0", @@ -313,7 +308,6 @@ "is-buffer": "~1.1.6", "is-ci": "^3.0.1", "is-fullwidth-code-point": "^3.0.0", - "json-schema-to-ts": "^3.1.1", "json-schema-traverse": "^1.0.0", "jsonfile": "^4.0.0", "libphonenumber-js": "1.9.47", @@ -323,7 +317,6 @@ "md5": "^2.2.1", "object-hash": "^3.0.0", "pluralize": "8.0.0", - "regenerator-runtime": "^0.14.0", "require-from-string": "^2.0.2", "semver": "^7.6.3", "slice-ansi": "^4.0.0", @@ -332,7 +325,6 @@ "strnum": "^1.0.5", "supports-color": "^7.1.0", "table": "^6.8.1", - "ts-algebra": "^2.0.0", "ts-dedent": "^2.0.0", "tslib": "^2.6.2", "universalify": "^0.1.0", diff --git a/scripts/verify-construct-dependencies.ts b/scripts/verify-construct-dependencies.ts index 528c525d7e..75553d52b9 100644 --- a/scripts/verify-construct-dependencies.ts +++ b/scripts/verify-construct-dependencies.ts @@ -8,12 +8,12 @@ type DepsClosure = { registryDeps: Array; }; -type ConstructPackageConfiguration = { +type PackageConfiguration = { packageName: string; packageDir: string; }; -const CONSTRUCT_PACKAGE_CONFIGURATIONS: ConstructPackageConfiguration[] = [ +const CONSTRUCT_PACKAGE_CONFIGURATIONS: PackageConfiguration[] = [ { packageName: '@aws-amplify/graphql-api-construct', packageDir: 'amplify-graphql-api-construct', @@ -24,6 +24,13 @@ const CONSTRUCT_PACKAGE_CONFIGURATIONS: ConstructPackageConfiguration[] = [ }, ]; +const SKIP_TRANSITIVE_REPO_PACKAGES: PackageConfiguration[] = [ + { + packageName: '@aws-amplify/graphql-conversation-transformer', + packageDir: 'amplify-graphql-conversation-transformer', + }, +]; + const PACKAGES_DIR = 'packages'; const NON_JSII_DEPENDENCIES_FILENAME = 'nonJsiiDependencies.json'; const PACKAGE_JSON_FILENAME = 'package.json'; @@ -62,6 +69,49 @@ const getPackageDependencies = (subDirectory: string): [string, Array] = const getRepoPackages = (): Record> => Object.fromEntries(fs.readdirSync(PACKAGES_DIR).filter(isPackageDirectory).map(getPackageDependencies)); +/** + * Return a set of package names which transitive dependencies should not be included in dependency tree. + * @returns a set of package names. + */ +const getSkipTransitivePackage = (): Set => { + return new Set( + SKIP_TRANSITIVE_REPO_PACKAGES.map((config: PackageConfiguration) => { + const packageJsonContents = fs.readFileSync(path.join(PACKAGES_DIR, config.packageDir, PACKAGE_JSON_FILENAME), 'utf-8'); + const packageJson = JSON.parse(packageJsonContents); + return `${packageJson.name}@${packageJson.version}`; + }), + ); +}; + +/** + * Return the source package in the dependency chain (repo package). + * @param dep The dependency to trace + * @param depParents Map of dependencies to their parents + * @param repoPackages Set of repository packages to stop at + * @returns the source package name. + */ +const getSourcePackage = (dep: string, depParents: Map, repoPackages: Set): string => { + let current = dep; + + // If the starting dep is already a repo package, return it + if (repoPackages.has(current)) { + return current; + } + + let parent = depParents.get(current); + + while (parent) { + current = parent; + // Stop if reached a repo package + if (repoPackages.has(current)) { + break; + } + parent = depParents.get(current); + } + + return current; +}; + /** * Given a set of input deps, compute the full closure of local and remote deps. * @@ -73,6 +123,7 @@ const getRepoPackages = (): Record> => */ const computeDepsClosure = (deps: string[]): DepsClosure => { const repoPackageClosures = getRepoPackages(); + const skipTransitiveDepsFor = getSkipTransitivePackage(); const repoPackages = new Set(Object.keys(repoPackageClosures)); const lockfileContents = lockfile.parse(fs.readFileSync('yarn.lock', 'utf8')).object; @@ -80,6 +131,10 @@ const computeDepsClosure = (deps: string[]): DepsClosure => { const repoDepClosure = new Set(); const registryDepClosure = new Set(); const seenDeps = new Set(); + + // Track where dependencies came from + const depParents = new Map(); + let currDeps: string[] = [...deps]; do { const stageDeps: string[] = []; @@ -88,12 +143,20 @@ const computeDepsClosure = (deps: string[]): DepsClosure => { seenDeps.add(currDep); if (repoPackages.has(currDep)) { repoDepClosure.add(currDep); - stageDeps.push(...repoPackageClosures[currDep]); + + const nextDeps = repoPackageClosures[currDep]; + nextDeps.forEach((dep) => depParents.set(dep, currDep)); + stageDeps.push(...nextDeps); } else { registryDepClosure.add(currDep); const lockfileDeps = lockfileContents[currDep].dependencies ?? {}; const lockfileDepsList = Object.entries(lockfileDeps).map(([packageName, semverPattern]) => `${packageName}@${semverPattern}`); - stageDeps.push(...lockfileDepsList); + + const sourcePackage = getSourcePackage(currDep, depParents, repoPackages); + if (!skipTransitiveDepsFor.has(sourcePackage)) { + lockfileDepsList.forEach((dep) => depParents.set(dep, sourcePackage)); + stageDeps.push(...lockfileDepsList); + } } }); currDeps = stageDeps; From 201395091006b99f4cdce809e33712879725a22e Mon Sep 17 00:00:00 2001 From: Kevin Shan Date: Wed, 11 Dec 2024 17:02:13 -0800 Subject: [PATCH 03/12] chore: root package.json fix + dependency sort Signed-off-by: Kevin Shan --- package.json | 473 +++++++++--------- packages/amplify-data-construct/package.json | 160 +++--- .../package.json | 158 +++--- 3 files changed, 395 insertions(+), 396 deletions(-) diff --git a/package.json b/package.json index b6a3865e10..25830138ef 100755 --- a/package.json +++ b/package.json @@ -103,169 +103,19 @@ "packages/*" ], "nohoist": [ + "@aws-amplify/ai-constructs", + "@aws-amplify/backend-output-schemas", + "@aws-amplify/backend-output-storage", "@aws-amplify/cli-internal/amplify-codegen", - "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-transformer", - "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-transformer-core", - "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-transformer-interfaces", - "@aws-amplify/graphql-api-construct/zod", - "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-auth-transformer", - "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-conversation-transformer", - "@aws-amplify/graphql-api-construct/@aws-amplify/ai-constructs", - "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-default-value-transformer", - "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-directives", - "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-function-transformer", - "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-generation-transformer", - "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-http-transformer", - "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-index-transformer", - "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-maps-to-transformer", - "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-model-transformer", - "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-predictions-transformer", - "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-relational-transformer", - "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-searchable-transformer", - "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-sql-transformer", - "@aws-amplify/graphql-api-construct/@aws-amplify/backend-output-schemas", - "@aws-amplify/graphql-api-construct/@aws-amplify/backend-output-storage", - "@aws-amplify/graphql-api-construct/@aws-amplify/platform-core", - "@aws-amplify/graphql-api-construct/@aws-amplify/plugin-types", - "@aws-amplify/graphql-api-construct/fs-extra", - "@aws-amplify/graphql-api-construct/graphql", - "@aws-amplify/graphql-api-construct/graphql-transformer-common", - "@aws-amplify/graphql-api-construct/hjson", - "@aws-amplify/graphql-api-construct/lodash", - "@aws-amplify/graphql-api-construct/md5", - "@aws-amplify/graphql-api-construct/object-hash", - "@aws-amplify/graphql-api-construct/ts-dedent", - "@aws-amplify/graphql-api-construct/charenc", - "@aws-amplify/graphql-api-construct/crypt", - "@aws-amplify/graphql-api-construct/graceful-fs", - "@aws-amplify/graphql-api-construct/graphql-mapping-template", - "@aws-amplify/graphql-api-construct/immer", - "@aws-amplify/graphql-api-construct/is-buffer", - "@aws-amplify/graphql-api-construct/jsonfile", - "@aws-amplify/graphql-api-construct/libphonenumber-js", - "@aws-amplify/graphql-api-construct/pluralize", - "@aws-amplify/graphql-api-construct/universalify", - "@aws-amplify/graphql-api-construct/@aws-sdk/client-sts", - "@aws-amplify/graphql-api-construct/is-ci", - "@aws-amplify/graphql-api-construct/lodash.mergewith", - "@aws-amplify/graphql-api-construct/uuid", - "@aws-amplify/graphql-api-construct/@aws-crypto/sha256-browser", - "@aws-amplify/graphql-api-construct/@aws-crypto/sha256-js", - "@aws-amplify/graphql-api-construct/@aws-sdk/client-sso-oidc", - "@aws-amplify/graphql-api-construct/@aws-sdk/core", - "@aws-amplify/graphql-api-construct/@aws-sdk/credential-provider-node", - "@aws-amplify/graphql-api-construct/@aws-sdk/middleware-host-header", - "@aws-amplify/graphql-api-construct/@aws-sdk/middleware-logger", - "@aws-amplify/graphql-api-construct/@aws-sdk/middleware-recursion-detection", - "@aws-amplify/graphql-api-construct/@aws-sdk/middleware-user-agent", - "@aws-amplify/graphql-api-construct/@aws-sdk/region-config-resolver", - "@aws-amplify/graphql-api-construct/@aws-sdk/types", - "@aws-amplify/graphql-api-construct/@aws-sdk/util-endpoints", - "@aws-amplify/graphql-api-construct/@aws-sdk/util-user-agent-browser", - "@aws-amplify/graphql-api-construct/@aws-sdk/util-user-agent-node", - "@aws-amplify/graphql-api-construct/@smithy/config-resolver", - "@aws-amplify/graphql-api-construct/@smithy/core", - "@aws-amplify/graphql-api-construct/@smithy/fetch-http-handler", - "@aws-amplify/graphql-api-construct/@smithy/hash-node", - "@aws-amplify/graphql-api-construct/@smithy/invalid-dependency", - "@aws-amplify/graphql-api-construct/@smithy/middleware-content-length", - "@aws-amplify/graphql-api-construct/@smithy/middleware-endpoint", - "@aws-amplify/graphql-api-construct/@smithy/middleware-retry", - "@aws-amplify/graphql-api-construct/@smithy/middleware-serde", - "@aws-amplify/graphql-api-construct/@smithy/middleware-stack", - "@aws-amplify/graphql-api-construct/@smithy/node-config-provider", - "@aws-amplify/graphql-api-construct/@smithy/node-http-handler", - "@aws-amplify/graphql-api-construct/@smithy/protocol-http", - "@aws-amplify/graphql-api-construct/@smithy/smithy-client", - "@aws-amplify/graphql-api-construct/@smithy/types", - "@aws-amplify/graphql-api-construct/@smithy/url-parser", - "@aws-amplify/graphql-api-construct/@smithy/util-base64", - "@aws-amplify/graphql-api-construct/@smithy/util-body-length-browser", - "@aws-amplify/graphql-api-construct/@smithy/util-body-length-node", - "@aws-amplify/graphql-api-construct/@smithy/util-defaults-mode-browser", - "@aws-amplify/graphql-api-construct/@smithy/util-defaults-mode-node", - "@aws-amplify/graphql-api-construct/@smithy/util-endpoints", - "@aws-amplify/graphql-api-construct/@smithy/util-middleware", - "@aws-amplify/graphql-api-construct/@smithy/util-retry", - "@aws-amplify/graphql-api-construct/@smithy/util-utf8", - "@aws-amplify/graphql-api-construct/tslib", - "@aws-amplify/graphql-api-construct/ci-info", - "@aws-amplify/graphql-api-construct/@aws-crypto/supports-web-crypto", - "@aws-amplify/graphql-api-construct/@aws-crypto/util", - "@aws-amplify/graphql-api-construct/@aws-sdk/util-locate-window", - "@aws-amplify/graphql-api-construct/@smithy/signature-v4", - "@aws-amplify/graphql-api-construct/fast-xml-parser", - "@aws-amplify/graphql-api-construct/@aws-sdk/credential-provider-env", - "@aws-amplify/graphql-api-construct/@aws-sdk/credential-provider-http", - "@aws-amplify/graphql-api-construct/@aws-sdk/credential-provider-ini", - "@aws-amplify/graphql-api-construct/@aws-sdk/credential-provider-process", - "@aws-amplify/graphql-api-construct/@aws-sdk/credential-provider-sso", - "@aws-amplify/graphql-api-construct/@aws-sdk/credential-provider-web-identity", - "@aws-amplify/graphql-api-construct/@aws-sdk/client-bedrock-runtime", - "@aws-amplify/graphql-api-construct/@smithy/eventstream-serde-browser", - "@aws-amplify/graphql-api-construct/@smithy/eventstream-serde-config-resolver", - "@aws-amplify/graphql-api-construct/@smithy/eventstream-serde-node", - "@aws-amplify/graphql-api-construct/@smithy/eventstream-serde-universal", - "@aws-amplify/graphql-api-construct/@smithy/eventstream-codec", - "@aws-amplify/graphql-api-construct/@aws-crypto/crc32", - "@aws-amplify/graphql-api-construct/@smithy/credential-provider-imds", - "@aws-amplify/graphql-api-construct/@smithy/property-provider", - "@aws-amplify/graphql-api-construct/@smithy/shared-ini-file-loader", - "@aws-amplify/graphql-api-construct/@smithy/util-config-provider", - "@aws-amplify/graphql-api-construct/bowser", - "@aws-amplify/graphql-api-construct/@smithy/querystring-builder", - "@aws-amplify/graphql-api-construct/@smithy/util-buffer-from", - "@aws-amplify/graphql-api-construct/@smithy/service-error-classification", - "@aws-amplify/graphql-api-construct/@smithy/abort-controller", - "@aws-amplify/graphql-api-construct/@smithy/util-stream", - "@aws-amplify/graphql-api-construct/@smithy/querystring-parser", - "@aws-amplify/graphql-api-construct/@smithy/is-array-buffer", - "@aws-amplify/graphql-api-construct/@smithy/util-hex-encoding", - "@aws-amplify/graphql-api-construct/@smithy/util-uri-escape", - "@aws-amplify/graphql-api-construct/strnum", - "@aws-amplify/graphql-api-construct/@aws-sdk/client-sso", - "@aws-amplify/graphql-api-construct/@aws-sdk/token-providers", - "@aws-amplify/graphql-api-construct/semver", - "@aws-amplify/graphql-api-construct/@aws-cdk/assert", - "@aws-amplify/graphql-api-construct/@aws-cdk/cloudformation-diff", - "@aws-amplify/graphql-api-construct/json-schema-to-ts", - "@aws-amplify/graphql-api-construct/@aws-cdk/cfnspec", - "@aws-amplify/graphql-api-construct/chalk", - "@aws-amplify/graphql-api-construct/diff", - "@aws-amplify/graphql-api-construct/fast-deep-equal", - "@aws-amplify/graphql-api-construct/string-width", - "@aws-amplify/graphql-api-construct/table", - "@aws-amplify/graphql-api-construct/@babel/runtime", - "@aws-amplify/graphql-api-construct/ts-algebra", - "@aws-amplify/graphql-api-construct/ansi-styles", - "@aws-amplify/graphql-api-construct/supports-color", - "@aws-amplify/graphql-api-construct/emoji-regex", - "@aws-amplify/graphql-api-construct/is-fullwidth-code-point", - "@aws-amplify/graphql-api-construct/strip-ansi", - "@aws-amplify/graphql-api-construct/ajv", - "@aws-amplify/graphql-api-construct/lodash.truncate", - "@aws-amplify/graphql-api-construct/slice-ansi", - "@aws-amplify/graphql-api-construct/regenerator-runtime", - "@aws-amplify/graphql-api-construct/at-least-node", - "@aws-amplify/graphql-api-construct/color-convert", - "@aws-amplify/graphql-api-construct/has-flag", - "@aws-amplify/graphql-api-construct/ansi-regex", - "@aws-amplify/graphql-api-construct/fast-uri", - "@aws-amplify/graphql-api-construct/json-schema-traverse", - "@aws-amplify/graphql-api-construct/require-from-string", - "@aws-amplify/graphql-api-construct/astral-regex", - "@aws-amplify/graphql-api-construct/color-name", - "@aws-amplify/data-construct/@aws-amplify/graphql-transformer", - "@aws-amplify/data-construct/@aws-amplify/graphql-transformer-core", - "@aws-amplify/data-construct/@aws-amplify/graphql-transformer-interfaces", - "@aws-amplify/data-construct/zod", + "@aws-amplify/data-construct/@aws-amplify/ai-constructs", + "@aws-amplify/data-construct/@aws-amplify/backend-output-schemas", + "@aws-amplify/data-construct/@aws-amplify/backend-output-storage", "@aws-amplify/data-construct/@aws-amplify/graphql-auth-transformer", "@aws-amplify/data-construct/@aws-amplify/graphql-conversation-transformer", - "@aws-amplify/data-construct/@aws-amplify/ai-constructs", "@aws-amplify/data-construct/@aws-amplify/graphql-default-value-transformer", "@aws-amplify/data-construct/@aws-amplify/graphql-directives", - "@aws-amplify/data-construct/@aws-amplify/graphql-generation-transformer", "@aws-amplify/data-construct/@aws-amplify/graphql-function-transformer", + "@aws-amplify/data-construct/@aws-amplify/graphql-generation-transformer", "@aws-amplify/data-construct/@aws-amplify/graphql-http-transformer", "@aws-amplify/data-construct/@aws-amplify/graphql-index-transformer", "@aws-amplify/data-construct/@aws-amplify/graphql-maps-to-transformer", @@ -274,60 +124,55 @@ "@aws-amplify/data-construct/@aws-amplify/graphql-relational-transformer", "@aws-amplify/data-construct/@aws-amplify/graphql-searchable-transformer", "@aws-amplify/data-construct/@aws-amplify/graphql-sql-transformer", - "@aws-amplify/data-construct/@aws-amplify/backend-output-schemas", - "@aws-amplify/data-construct/@aws-amplify/backend-output-storage", - "@aws-amplify/data-construct/fs-extra", - "@aws-amplify/data-construct/graphql", - "@aws-amplify/data-construct/graphql-transformer-common", - "@aws-amplify/data-construct/hjson", - "@aws-amplify/data-construct/lodash", - "@aws-amplify/data-construct/md5", - "@aws-amplify/data-construct/object-hash", - "@aws-amplify/data-construct/ts-dedent", - "@aws-amplify/data-construct/charenc", - "@aws-amplify/data-construct/crypt", - "@aws-amplify/data-construct/graceful-fs", - "@aws-amplify/data-construct/graphql-mapping-template", - "@aws-amplify/data-construct/immer", - "@aws-amplify/data-construct/is-buffer", - "@aws-amplify/data-construct/jsonfile", - "@aws-amplify/data-construct/libphonenumber-js", - "@aws-amplify/data-construct/pluralize", - "@aws-amplify/data-construct/universalify", + "@aws-amplify/data-construct/@aws-amplify/graphql-transformer", + "@aws-amplify/data-construct/@aws-amplify/graphql-transformer-core", + "@aws-amplify/data-construct/@aws-amplify/graphql-transformer-interfaces", "@aws-amplify/data-construct/@aws-amplify/platform-core", "@aws-amplify/data-construct/@aws-amplify/plugin-types", - "@aws-amplify/data-construct/@aws-amplify/plugin-types", - "@aws-amplify/data-construct/@aws-sdk/client-sts", - "@aws-amplify/data-construct/is-ci", - "@aws-amplify/data-construct/lodash.mergewith", - "@aws-amplify/data-construct/uuid", + "@aws-amplify/data-construct/@aws-cdk/assert", + "@aws-amplify/data-construct/@aws-cdk/cfnspec", + "@aws-amplify/data-construct/@aws-cdk/cloudformation-diff", + "@aws-amplify/data-construct/@aws-crypto/crc32", "@aws-amplify/data-construct/@aws-crypto/sha256-browser", "@aws-amplify/data-construct/@aws-crypto/sha256-js", + "@aws-amplify/data-construct/@aws-crypto/supports-web-crypto", + "@aws-amplify/data-construct/@aws-crypto/util", + "@aws-amplify/data-construct/@aws-sdk/client-bedrock-runtime", + "@aws-amplify/data-construct/@aws-sdk/client-sso", "@aws-amplify/data-construct/@aws-sdk/client-sso-oidc", + "@aws-amplify/data-construct/@aws-sdk/client-sts", "@aws-amplify/data-construct/@aws-sdk/core", + "@aws-amplify/data-construct/@aws-sdk/credential-provider-env", + "@aws-amplify/data-construct/@aws-sdk/credential-provider-http", + "@aws-amplify/data-construct/@aws-sdk/credential-provider-ini", "@aws-amplify/data-construct/@aws-sdk/credential-provider-node", + "@aws-amplify/data-construct/@aws-sdk/credential-provider-process", + "@aws-amplify/data-construct/@aws-sdk/credential-provider-sso", + "@aws-amplify/data-construct/@aws-sdk/credential-provider-web-identity", "@aws-amplify/data-construct/@aws-sdk/middleware-host-header", "@aws-amplify/data-construct/@aws-sdk/middleware-logger", "@aws-amplify/data-construct/@aws-sdk/middleware-recursion-detection", "@aws-amplify/data-construct/@aws-sdk/middleware-user-agent", "@aws-amplify/data-construct/@aws-sdk/region-config-resolver", + "@aws-amplify/data-construct/@aws-sdk/token-providers", "@aws-amplify/data-construct/@aws-sdk/types", "@aws-amplify/data-construct/@aws-sdk/util-endpoints", + "@aws-amplify/data-construct/@aws-sdk/util-locate-window", "@aws-amplify/data-construct/@aws-sdk/util-user-agent-browser", "@aws-amplify/data-construct/@aws-sdk/util-user-agent-node", - "@aws-amplify/data-construct/semver", - "@aws-amplify/data-construct/@aws-sdk/client-bedrock-runtime", + "@aws-amplify/data-construct/@smithy/abort-controller", + "@aws-amplify/data-construct/@smithy/config-resolver", + "@aws-amplify/data-construct/@smithy/core", + "@aws-amplify/data-construct/@smithy/credential-provider-imds", + "@aws-amplify/data-construct/@smithy/eventstream-codec", "@aws-amplify/data-construct/@smithy/eventstream-serde-browser", "@aws-amplify/data-construct/@smithy/eventstream-serde-config-resolver", "@aws-amplify/data-construct/@smithy/eventstream-serde-node", "@aws-amplify/data-construct/@smithy/eventstream-serde-universal", - "@aws-amplify/data-construct/@smithy/eventstream-codec", - "@aws-amplify/data-construct/@aws-crypto/crc32", - "@aws-amplify/data-construct/@smithy/config-resolver", - "@aws-amplify/data-construct/@smithy/core", "@aws-amplify/data-construct/@smithy/fetch-http-handler", "@aws-amplify/data-construct/@smithy/hash-node", "@aws-amplify/data-construct/@smithy/invalid-dependency", + "@aws-amplify/data-construct/@smithy/is-array-buffer", "@aws-amplify/data-construct/@smithy/middleware-content-length", "@aws-amplify/data-construct/@smithy/middleware-endpoint", "@aws-amplify/data-construct/@smithy/middleware-retry", @@ -335,75 +180,229 @@ "@aws-amplify/data-construct/@smithy/middleware-stack", "@aws-amplify/data-construct/@smithy/node-config-provider", "@aws-amplify/data-construct/@smithy/node-http-handler", + "@aws-amplify/data-construct/@smithy/property-provider", "@aws-amplify/data-construct/@smithy/protocol-http", + "@aws-amplify/data-construct/@smithy/querystring-builder", + "@aws-amplify/data-construct/@smithy/querystring-parser", + "@aws-amplify/data-construct/@smithy/service-error-classification", + "@aws-amplify/data-construct/@smithy/shared-ini-file-loader", + "@aws-amplify/data-construct/@smithy/signature-v4", "@aws-amplify/data-construct/@smithy/smithy-client", "@aws-amplify/data-construct/@smithy/types", "@aws-amplify/data-construct/@smithy/url-parser", "@aws-amplify/data-construct/@smithy/util-base64", "@aws-amplify/data-construct/@smithy/util-body-length-browser", "@aws-amplify/data-construct/@smithy/util-body-length-node", + "@aws-amplify/data-construct/@smithy/util-buffer-from", + "@aws-amplify/data-construct/@smithy/util-config-provider", "@aws-amplify/data-construct/@smithy/util-defaults-mode-browser", "@aws-amplify/data-construct/@smithy/util-defaults-mode-node", "@aws-amplify/data-construct/@smithy/util-endpoints", + "@aws-amplify/data-construct/@smithy/util-hex-encoding", "@aws-amplify/data-construct/@smithy/util-middleware", "@aws-amplify/data-construct/@smithy/util-retry", - "@aws-amplify/data-construct/@smithy/util-utf8", - "@aws-amplify/data-construct/tslib", - "@aws-amplify/data-construct/ci-info", - "@aws-amplify/data-construct/@aws-crypto/supports-web-crypto", - "@aws-amplify/data-construct/@aws-crypto/util", - "@aws-amplify/data-construct/@aws-sdk/util-locate-window", - "@aws-amplify/data-construct/@smithy/signature-v4", - "@aws-amplify/data-construct/fast-xml-parser", - "@aws-amplify/data-construct/@aws-sdk/credential-provider-env", - "@aws-amplify/data-construct/@aws-sdk/credential-provider-http", - "@aws-amplify/data-construct/@aws-sdk/credential-provider-ini", - "@aws-amplify/data-construct/@aws-sdk/credential-provider-process", - "@aws-amplify/data-construct/@aws-sdk/credential-provider-sso", - "@aws-amplify/data-construct/@aws-sdk/credential-provider-web-identity", - "@aws-amplify/data-construct/@smithy/credential-provider-imds", - "@aws-amplify/data-construct/@smithy/property-provider", - "@aws-amplify/data-construct/@smithy/shared-ini-file-loader", - "@aws-amplify/data-construct/@smithy/util-config-provider", - "@aws-amplify/data-construct/bowser", - "@aws-amplify/data-construct/@smithy/querystring-builder", - "@aws-amplify/data-construct/@smithy/util-buffer-from", - "@aws-amplify/data-construct/@smithy/service-error-classification", - "@aws-amplify/data-construct/@smithy/abort-controller", "@aws-amplify/data-construct/@smithy/util-stream", - "@aws-amplify/data-construct/@smithy/querystring-parser", - "@aws-amplify/data-construct/@smithy/is-array-buffer", - "@aws-amplify/data-construct/@smithy/util-hex-encoding", "@aws-amplify/data-construct/@smithy/util-uri-escape", - "@aws-amplify/data-construct/strnum", - "@aws-amplify/data-construct/@aws-sdk/client-sso", - "@aws-amplify/data-construct/@aws-sdk/token-providers", - "@aws-amplify/data-construct/semver", - "@aws-amplify/data-construct/@aws-cdk/assert", - "@aws-amplify/data-construct/@aws-cdk/cloudformation-diff", - "@aws-amplify/data-construct/@aws-cdk/cfnspec", - "@aws-amplify/data-construct/chalk", - "@aws-amplify/data-construct/diff", - "@aws-amplify/data-construct/fast-deep-equal", - "@aws-amplify/data-construct/string-width", - "@aws-amplify/data-construct/table", - "@aws-amplify/data-construct/ansi-styles", - "@aws-amplify/data-construct/supports-color", - "@aws-amplify/data-construct/emoji-regex", - "@aws-amplify/data-construct/is-fullwidth-code-point", - "@aws-amplify/data-construct/strip-ansi", + "@aws-amplify/data-construct/@smithy/util-utf8", "@aws-amplify/data-construct/ajv", - "@aws-amplify/data-construct/lodash.truncate", - "@aws-amplify/data-construct/slice-ansi", + "@aws-amplify/data-construct/ansi-regex", + "@aws-amplify/data-construct/ansi-styles", + "@aws-amplify/data-construct/astral-regex", "@aws-amplify/data-construct/at-least-node", + "@aws-amplify/data-construct/bowser", + "@aws-amplify/data-construct/chalk", + "@aws-amplify/data-construct/charenc", + "@aws-amplify/data-construct/ci-info", "@aws-amplify/data-construct/color-convert", - "@aws-amplify/data-construct/has-flag", - "@aws-amplify/data-construct/ansi-regex", + "@aws-amplify/data-construct/color-name", + "@aws-amplify/data-construct/crypt", + "@aws-amplify/data-construct/diff", + "@aws-amplify/data-construct/emoji-regex", + "@aws-amplify/data-construct/fast-deep-equal", "@aws-amplify/data-construct/fast-uri", + "@aws-amplify/data-construct/fast-xml-parser", + "@aws-amplify/data-construct/fs-extra", + "@aws-amplify/data-construct/graceful-fs", + "@aws-amplify/data-construct/graphql", + "@aws-amplify/data-construct/graphql-mapping-template", + "@aws-amplify/data-construct/graphql-transformer-common", + "@aws-amplify/data-construct/has-flag", + "@aws-amplify/data-construct/hjson", + "@aws-amplify/data-construct/immer", + "@aws-amplify/data-construct/is-buffer", + "@aws-amplify/data-construct/is-ci", + "@aws-amplify/data-construct/is-fullwidth-code-point", "@aws-amplify/data-construct/json-schema-traverse", + "@aws-amplify/data-construct/jsonfile", + "@aws-amplify/data-construct/libphonenumber-js", + "@aws-amplify/data-construct/lodash", + "@aws-amplify/data-construct/lodash.mergewith", + "@aws-amplify/data-construct/lodash.truncate", + "@aws-amplify/data-construct/md5", + "@aws-amplify/data-construct/object-hash", + "@aws-amplify/data-construct/pluralize", "@aws-amplify/data-construct/require-from-string", - "@aws-amplify/data-construct/astral-regex", - "@aws-amplify/data-construct/color-name" + "@aws-amplify/data-construct/semver", + "@aws-amplify/data-construct/slice-ansi", + "@aws-amplify/data-construct/string-width", + "@aws-amplify/data-construct/strip-ansi", + "@aws-amplify/data-construct/strnum", + "@aws-amplify/data-construct/supports-color", + "@aws-amplify/data-construct/table", + "@aws-amplify/data-construct/ts-dedent", + "@aws-amplify/data-construct/tslib", + "@aws-amplify/data-construct/universalify", + "@aws-amplify/data-construct/uuid", + "@aws-amplify/data-construct/zod", + "@aws-amplify/graphql-api-construct/@aws-amplify/ai-constructs", + "@aws-amplify/graphql-api-construct/@aws-amplify/backend-output-schemas", + "@aws-amplify/graphql-api-construct/@aws-amplify/backend-output-storage", + "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-auth-transformer", + "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-conversation-transformer", + "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-default-value-transformer", + "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-directives", + "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-function-transformer", + "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-generation-transformer", + "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-http-transformer", + "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-index-transformer", + "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-maps-to-transformer", + "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-model-transformer", + "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-predictions-transformer", + "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-relational-transformer", + "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-searchable-transformer", + "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-sql-transformer", + "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-transformer", + "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-transformer-core", + "@aws-amplify/graphql-api-construct/@aws-amplify/graphql-transformer-interfaces", + "@aws-amplify/graphql-api-construct/@aws-amplify/platform-core", + "@aws-amplify/graphql-api-construct/@aws-amplify/plugin-types", + "@aws-amplify/graphql-api-construct/@aws-cdk/assert", + "@aws-amplify/graphql-api-construct/@aws-cdk/cfnspec", + "@aws-amplify/graphql-api-construct/@aws-cdk/cloudformation-diff", + "@aws-amplify/graphql-api-construct/@aws-crypto/crc32", + "@aws-amplify/graphql-api-construct/@aws-crypto/sha256-browser", + "@aws-amplify/graphql-api-construct/@aws-crypto/sha256-js", + "@aws-amplify/graphql-api-construct/@aws-crypto/supports-web-crypto", + "@aws-amplify/graphql-api-construct/@aws-crypto/util", + "@aws-amplify/graphql-api-construct/@aws-sdk/client-bedrock-runtime", + "@aws-amplify/graphql-api-construct/@aws-sdk/client-sso", + "@aws-amplify/graphql-api-construct/@aws-sdk/client-sso-oidc", + "@aws-amplify/graphql-api-construct/@aws-sdk/client-sts", + "@aws-amplify/graphql-api-construct/@aws-sdk/core", + "@aws-amplify/graphql-api-construct/@aws-sdk/credential-provider-env", + "@aws-amplify/graphql-api-construct/@aws-sdk/credential-provider-http", + "@aws-amplify/graphql-api-construct/@aws-sdk/credential-provider-ini", + "@aws-amplify/graphql-api-construct/@aws-sdk/credential-provider-node", + "@aws-amplify/graphql-api-construct/@aws-sdk/credential-provider-process", + "@aws-amplify/graphql-api-construct/@aws-sdk/credential-provider-sso", + "@aws-amplify/graphql-api-construct/@aws-sdk/credential-provider-web-identity", + "@aws-amplify/graphql-api-construct/@aws-sdk/middleware-host-header", + "@aws-amplify/graphql-api-construct/@aws-sdk/middleware-logger", + "@aws-amplify/graphql-api-construct/@aws-sdk/middleware-recursion-detection", + "@aws-amplify/graphql-api-construct/@aws-sdk/middleware-user-agent", + "@aws-amplify/graphql-api-construct/@aws-sdk/region-config-resolver", + "@aws-amplify/graphql-api-construct/@aws-sdk/token-providers", + "@aws-amplify/graphql-api-construct/@aws-sdk/types", + "@aws-amplify/graphql-api-construct/@aws-sdk/util-endpoints", + "@aws-amplify/graphql-api-construct/@aws-sdk/util-locate-window", + "@aws-amplify/graphql-api-construct/@aws-sdk/util-user-agent-browser", + "@aws-amplify/graphql-api-construct/@aws-sdk/util-user-agent-node", + "@aws-amplify/graphql-api-construct/@smithy/abort-controller", + "@aws-amplify/graphql-api-construct/@smithy/config-resolver", + "@aws-amplify/graphql-api-construct/@smithy/core", + "@aws-amplify/graphql-api-construct/@smithy/credential-provider-imds", + "@aws-amplify/graphql-api-construct/@smithy/eventstream-codec", + "@aws-amplify/graphql-api-construct/@smithy/eventstream-serde-browser", + "@aws-amplify/graphql-api-construct/@smithy/eventstream-serde-config-resolver", + "@aws-amplify/graphql-api-construct/@smithy/eventstream-serde-node", + "@aws-amplify/graphql-api-construct/@smithy/eventstream-serde-universal", + "@aws-amplify/graphql-api-construct/@smithy/fetch-http-handler", + "@aws-amplify/graphql-api-construct/@smithy/hash-node", + "@aws-amplify/graphql-api-construct/@smithy/invalid-dependency", + "@aws-amplify/graphql-api-construct/@smithy/is-array-buffer", + "@aws-amplify/graphql-api-construct/@smithy/middleware-content-length", + "@aws-amplify/graphql-api-construct/@smithy/middleware-endpoint", + "@aws-amplify/graphql-api-construct/@smithy/middleware-retry", + "@aws-amplify/graphql-api-construct/@smithy/middleware-serde", + "@aws-amplify/graphql-api-construct/@smithy/middleware-stack", + "@aws-amplify/graphql-api-construct/@smithy/node-config-provider", + "@aws-amplify/graphql-api-construct/@smithy/node-http-handler", + "@aws-amplify/graphql-api-construct/@smithy/property-provider", + "@aws-amplify/graphql-api-construct/@smithy/protocol-http", + "@aws-amplify/graphql-api-construct/@smithy/querystring-builder", + "@aws-amplify/graphql-api-construct/@smithy/querystring-parser", + "@aws-amplify/graphql-api-construct/@smithy/service-error-classification", + "@aws-amplify/graphql-api-construct/@smithy/shared-ini-file-loader", + "@aws-amplify/graphql-api-construct/@smithy/signature-v4", + "@aws-amplify/graphql-api-construct/@smithy/smithy-client", + "@aws-amplify/graphql-api-construct/@smithy/types", + "@aws-amplify/graphql-api-construct/@smithy/url-parser", + "@aws-amplify/graphql-api-construct/@smithy/util-base64", + "@aws-amplify/graphql-api-construct/@smithy/util-body-length-browser", + "@aws-amplify/graphql-api-construct/@smithy/util-body-length-node", + "@aws-amplify/graphql-api-construct/@smithy/util-buffer-from", + "@aws-amplify/graphql-api-construct/@smithy/util-config-provider", + "@aws-amplify/graphql-api-construct/@smithy/util-defaults-mode-browser", + "@aws-amplify/graphql-api-construct/@smithy/util-defaults-mode-node", + "@aws-amplify/graphql-api-construct/@smithy/util-endpoints", + "@aws-amplify/graphql-api-construct/@smithy/util-hex-encoding", + "@aws-amplify/graphql-api-construct/@smithy/util-middleware", + "@aws-amplify/graphql-api-construct/@smithy/util-retry", + "@aws-amplify/graphql-api-construct/@smithy/util-stream", + "@aws-amplify/graphql-api-construct/@smithy/util-uri-escape", + "@aws-amplify/graphql-api-construct/@smithy/util-utf8", + "@aws-amplify/graphql-api-construct/ajv", + "@aws-amplify/graphql-api-construct/ansi-regex", + "@aws-amplify/graphql-api-construct/ansi-styles", + "@aws-amplify/graphql-api-construct/astral-regex", + "@aws-amplify/graphql-api-construct/at-least-node", + "@aws-amplify/graphql-api-construct/bowser", + "@aws-amplify/graphql-api-construct/chalk", + "@aws-amplify/graphql-api-construct/charenc", + "@aws-amplify/graphql-api-construct/ci-info", + "@aws-amplify/graphql-api-construct/color-convert", + "@aws-amplify/graphql-api-construct/color-name", + "@aws-amplify/graphql-api-construct/crypt", + "@aws-amplify/graphql-api-construct/diff", + "@aws-amplify/graphql-api-construct/emoji-regex", + "@aws-amplify/graphql-api-construct/fast-deep-equal", + "@aws-amplify/graphql-api-construct/fast-uri", + "@aws-amplify/graphql-api-construct/fast-xml-parser", + "@aws-amplify/graphql-api-construct/fs-extra", + "@aws-amplify/graphql-api-construct/graceful-fs", + "@aws-amplify/graphql-api-construct/graphql", + "@aws-amplify/graphql-api-construct/graphql-mapping-template", + "@aws-amplify/graphql-api-construct/graphql-transformer-common", + "@aws-amplify/graphql-api-construct/has-flag", + "@aws-amplify/graphql-api-construct/hjson", + "@aws-amplify/graphql-api-construct/immer", + "@aws-amplify/graphql-api-construct/is-buffer", + "@aws-amplify/graphql-api-construct/is-ci", + "@aws-amplify/graphql-api-construct/is-fullwidth-code-point", + "@aws-amplify/graphql-api-construct/json-schema-traverse", + "@aws-amplify/graphql-api-construct/jsonfile", + "@aws-amplify/graphql-api-construct/libphonenumber-js", + "@aws-amplify/graphql-api-construct/lodash", + "@aws-amplify/graphql-api-construct/lodash.mergewith", + "@aws-amplify/graphql-api-construct/lodash.truncate", + "@aws-amplify/graphql-api-construct/md5", + "@aws-amplify/graphql-api-construct/object-hash", + "@aws-amplify/graphql-api-construct/pluralize", + "@aws-amplify/graphql-api-construct/require-from-string", + "@aws-amplify/graphql-api-construct/semver", + "@aws-amplify/graphql-api-construct/slice-ansi", + "@aws-amplify/graphql-api-construct/string-width", + "@aws-amplify/graphql-api-construct/strip-ansi", + "@aws-amplify/graphql-api-construct/strnum", + "@aws-amplify/graphql-api-construct/supports-color", + "@aws-amplify/graphql-api-construct/table", + "@aws-amplify/graphql-api-construct/ts-dedent", + "@aws-amplify/graphql-api-construct/tslib", + "@aws-amplify/graphql-api-construct/universalify", + "@aws-amplify/graphql-api-construct/uuid", + "@aws-amplify/graphql-api-construct/zod", + "@aws-amplify/platform-core", + "@aws-amplify/plugin-types" ] }, "devDependencies": { diff --git a/packages/amplify-data-construct/package.json b/packages/amplify-data-construct/package.json index 6e429925ab..d7cbf32df6 100644 --- a/packages/amplify-data-construct/package.json +++ b/packages/amplify-data-construct/package.json @@ -33,6 +33,7 @@ "access": "public" }, "bundledDependencies": [ + "@aws-amplify/ai-constructs", "@aws-amplify/backend-output-schemas", "@aws-amplify/backend-output-storage", "@aws-amplify/graphql-auth-transformer", @@ -40,6 +41,7 @@ "@aws-amplify/graphql-default-value-transformer", "@aws-amplify/graphql-directives", "@aws-amplify/graphql-function-transformer", + "@aws-amplify/graphql-generation-transformer", "@aws-amplify/graphql-http-transformer", "@aws-amplify/graphql-index-transformer", "@aws-amplify/graphql-maps-to-transformer", @@ -48,62 +50,55 @@ "@aws-amplify/graphql-relational-transformer", "@aws-amplify/graphql-searchable-transformer", "@aws-amplify/graphql-sql-transformer", - "@aws-amplify/graphql-generation-transformer", - "@aws-amplify/ai-constructs", "@aws-amplify/graphql-transformer", "@aws-amplify/graphql-transformer-core", "@aws-amplify/graphql-transformer-interfaces", "@aws-amplify/platform-core", "@aws-amplify/plugin-types", - "@aws-sdk/client-bedrock-runtime", - "@smithy/eventstream-serde-browser", - "@smithy/eventstream-serde-config-resolver", - "@smithy/eventstream-serde-node", - "@smithy/eventstream-serde-universal", - "@smithy/eventstream-codec", + "@aws-cdk/assert", + "@aws-cdk/cfnspec", + "@aws-cdk/cloudformation-diff", "@aws-crypto/crc32", - "charenc", - "crypt", - "fs-extra", - "graceful-fs", - "graphql", - "graphql-mapping-template", - "graphql-transformer-common", - "hjson", - "immer", - "is-buffer", - "jsonfile", - "libphonenumber-js", - "lodash", - "md5", - "object-hash", - "pluralize", - "ts-dedent", - "universalify", - "zod", - "@aws-sdk/client-sts", - "is-ci", - "lodash.mergewith", - "uuid", "@aws-crypto/sha256-browser", "@aws-crypto/sha256-js", + "@aws-crypto/supports-web-crypto", + "@aws-crypto/util", + "@aws-sdk/client-bedrock-runtime", + "@aws-sdk/client-sso", "@aws-sdk/client-sso-oidc", + "@aws-sdk/client-sts", "@aws-sdk/core", + "@aws-sdk/credential-provider-env", + "@aws-sdk/credential-provider-http", + "@aws-sdk/credential-provider-ini", "@aws-sdk/credential-provider-node", + "@aws-sdk/credential-provider-process", + "@aws-sdk/credential-provider-sso", + "@aws-sdk/credential-provider-web-identity", "@aws-sdk/middleware-host-header", "@aws-sdk/middleware-logger", "@aws-sdk/middleware-recursion-detection", "@aws-sdk/middleware-user-agent", "@aws-sdk/region-config-resolver", + "@aws-sdk/token-providers", "@aws-sdk/types", "@aws-sdk/util-endpoints", + "@aws-sdk/util-locate-window", "@aws-sdk/util-user-agent-browser", "@aws-sdk/util-user-agent-node", + "@smithy/abort-controller", "@smithy/config-resolver", "@smithy/core", + "@smithy/credential-provider-imds", + "@smithy/eventstream-codec", + "@smithy/eventstream-serde-browser", + "@smithy/eventstream-serde-config-resolver", + "@smithy/eventstream-serde-node", + "@smithy/eventstream-serde-universal", "@smithy/fetch-http-handler", "@smithy/hash-node", "@smithy/invalid-dependency", + "@smithy/is-array-buffer", "@smithy/middleware-content-length", "@smithy/middleware-endpoint", "@smithy/middleware-retry", @@ -111,75 +106,80 @@ "@smithy/middleware-stack", "@smithy/node-config-provider", "@smithy/node-http-handler", + "@smithy/property-provider", "@smithy/protocol-http", + "@smithy/querystring-builder", + "@smithy/querystring-parser", + "@smithy/service-error-classification", + "@smithy/shared-ini-file-loader", + "@smithy/signature-v4", "@smithy/smithy-client", "@smithy/types", "@smithy/url-parser", "@smithy/util-base64", "@smithy/util-body-length-browser", "@smithy/util-body-length-node", + "@smithy/util-buffer-from", + "@smithy/util-config-provider", "@smithy/util-defaults-mode-browser", "@smithy/util-defaults-mode-node", "@smithy/util-endpoints", + "@smithy/util-hex-encoding", "@smithy/util-middleware", "@smithy/util-retry", - "@smithy/util-utf8", - "tslib", - "ci-info", - "@aws-crypto/supports-web-crypto", - "@aws-crypto/util", - "@aws-sdk/util-locate-window", - "@smithy/signature-v4", - "fast-xml-parser", - "@aws-sdk/credential-provider-env", - "@aws-sdk/credential-provider-http", - "@aws-sdk/credential-provider-ini", - "@aws-sdk/credential-provider-process", - "@aws-sdk/credential-provider-sso", - "@aws-sdk/credential-provider-web-identity", - "@smithy/credential-provider-imds", - "@smithy/property-provider", - "@smithy/shared-ini-file-loader", - "@smithy/util-config-provider", - "bowser", - "@smithy/querystring-builder", - "@smithy/util-buffer-from", - "@smithy/service-error-classification", - "@smithy/abort-controller", "@smithy/util-stream", - "@smithy/querystring-parser", - "@smithy/is-array-buffer", - "@smithy/util-hex-encoding", "@smithy/util-uri-escape", - "strnum", - "@aws-sdk/token-providers", - "@aws-sdk/client-sso", - "semver", - "@aws-cdk/assert", - "@aws-cdk/cloudformation-diff", - "@aws-cdk/cfnspec", - "chalk", - "diff", - "fast-deep-equal", - "string-width", - "table", - "ansi-styles", - "supports-color", - "emoji-regex", - "is-fullwidth-code-point", - "strip-ansi", + "@smithy/util-utf8", "ajv", - "lodash.truncate", - "slice-ansi", + "ansi-regex", + "ansi-styles", + "astral-regex", "at-least-node", + "bowser", + "chalk", + "charenc", + "ci-info", "color-convert", - "has-flag", - "ansi-regex", + "color-name", + "crypt", + "diff", + "emoji-regex", + "fast-deep-equal", "fast-uri", + "fast-xml-parser", + "fs-extra", + "graceful-fs", + "graphql", + "graphql-mapping-template", + "graphql-transformer-common", + "has-flag", + "hjson", + "immer", + "is-buffer", + "is-ci", + "is-fullwidth-code-point", "json-schema-traverse", + "jsonfile", + "libphonenumber-js", + "lodash", + "lodash.mergewith", + "lodash.truncate", + "md5", + "object-hash", + "pluralize", "require-from-string", - "astral-regex", - "color-name" + "semver", + "slice-ansi", + "string-width", + "strip-ansi", + "strnum", + "supports-color", + "table", + "ts-dedent", + "tslib", + "universalify", + "uuid", + "zod" ], "dependencies": { "@aws-amplify/ai-constructs": "^1.0.0", diff --git a/packages/amplify-graphql-api-construct/package.json b/packages/amplify-graphql-api-construct/package.json index d459676acf..c6c0b97119 100644 --- a/packages/amplify-graphql-api-construct/package.json +++ b/packages/amplify-graphql-api-construct/package.json @@ -34,6 +34,7 @@ "access": "public" }, "bundledDependencies": [ + "@aws-amplify/ai-constructs", "@aws-amplify/backend-output-schemas", "@aws-amplify/backend-output-storage", "@aws-amplify/graphql-auth-transformer", @@ -55,56 +56,50 @@ "@aws-amplify/graphql-transformer-interfaces", "@aws-amplify/platform-core", "@aws-amplify/plugin-types", - "@aws-amplify/ai-constructs", - "@aws-sdk/client-bedrock-runtime", - "@smithy/eventstream-serde-browser", - "@smithy/eventstream-serde-config-resolver", - "@smithy/eventstream-serde-node", - "@smithy/eventstream-serde-universal", - "@smithy/eventstream-codec", + "@aws-cdk/assert", + "@aws-cdk/cfnspec", + "@aws-cdk/cloudformation-diff", "@aws-crypto/crc32", - "charenc", - "crypt", - "fs-extra", - "graceful-fs", - "graphql", - "graphql-mapping-template", - "graphql-transformer-common", - "hjson", - "immer", - "is-buffer", - "jsonfile", - "libphonenumber-js", - "lodash", - "md5", - "object-hash", - "pluralize", - "ts-dedent", - "universalify", - "zod", - "@aws-sdk/client-sts", - "is-ci", - "lodash.mergewith", - "uuid", "@aws-crypto/sha256-browser", "@aws-crypto/sha256-js", + "@aws-crypto/supports-web-crypto", + "@aws-crypto/util", + "@aws-sdk/client-bedrock-runtime", + "@aws-sdk/client-sso", "@aws-sdk/client-sso-oidc", + "@aws-sdk/client-sts", "@aws-sdk/core", + "@aws-sdk/credential-provider-env", + "@aws-sdk/credential-provider-http", + "@aws-sdk/credential-provider-ini", "@aws-sdk/credential-provider-node", + "@aws-sdk/credential-provider-process", + "@aws-sdk/credential-provider-sso", + "@aws-sdk/credential-provider-web-identity", "@aws-sdk/middleware-host-header", "@aws-sdk/middleware-logger", "@aws-sdk/middleware-recursion-detection", "@aws-sdk/middleware-user-agent", "@aws-sdk/region-config-resolver", + "@aws-sdk/token-providers", "@aws-sdk/types", "@aws-sdk/util-endpoints", + "@aws-sdk/util-locate-window", "@aws-sdk/util-user-agent-browser", "@aws-sdk/util-user-agent-node", + "@smithy/abort-controller", "@smithy/config-resolver", "@smithy/core", + "@smithy/credential-provider-imds", + "@smithy/eventstream-codec", + "@smithy/eventstream-serde-browser", + "@smithy/eventstream-serde-config-resolver", + "@smithy/eventstream-serde-node", + "@smithy/eventstream-serde-universal", "@smithy/fetch-http-handler", "@smithy/hash-node", "@smithy/invalid-dependency", + "@smithy/is-array-buffer", "@smithy/middleware-content-length", "@smithy/middleware-endpoint", "@smithy/middleware-retry", @@ -112,75 +107,80 @@ "@smithy/middleware-stack", "@smithy/node-config-provider", "@smithy/node-http-handler", + "@smithy/property-provider", "@smithy/protocol-http", + "@smithy/querystring-builder", + "@smithy/querystring-parser", + "@smithy/service-error-classification", + "@smithy/shared-ini-file-loader", + "@smithy/signature-v4", "@smithy/smithy-client", "@smithy/types", "@smithy/url-parser", "@smithy/util-base64", "@smithy/util-body-length-browser", "@smithy/util-body-length-node", + "@smithy/util-buffer-from", + "@smithy/util-config-provider", "@smithy/util-defaults-mode-browser", "@smithy/util-defaults-mode-node", "@smithy/util-endpoints", + "@smithy/util-hex-encoding", "@smithy/util-middleware", "@smithy/util-retry", - "@smithy/util-utf8", - "tslib", - "ci-info", - "@aws-crypto/supports-web-crypto", - "@aws-crypto/util", - "@aws-sdk/util-locate-window", - "@smithy/signature-v4", - "fast-xml-parser", - "@aws-sdk/credential-provider-env", - "@aws-sdk/credential-provider-http", - "@aws-sdk/credential-provider-ini", - "@aws-sdk/credential-provider-process", - "@aws-sdk/credential-provider-sso", - "@aws-sdk/credential-provider-web-identity", - "@smithy/credential-provider-imds", - "@smithy/property-provider", - "@smithy/shared-ini-file-loader", - "@smithy/util-config-provider", - "bowser", - "@smithy/querystring-builder", - "@smithy/util-buffer-from", - "@smithy/service-error-classification", - "@smithy/abort-controller", "@smithy/util-stream", - "@smithy/querystring-parser", - "@smithy/is-array-buffer", - "@smithy/util-hex-encoding", "@smithy/util-uri-escape", - "strnum", - "@aws-sdk/token-providers", - "@aws-sdk/client-sso", - "semver", - "@aws-cdk/assert", - "@aws-cdk/cloudformation-diff", - "@aws-cdk/cfnspec", - "chalk", - "diff", - "fast-deep-equal", - "string-width", - "table", - "ansi-styles", - "supports-color", - "emoji-regex", - "is-fullwidth-code-point", - "strip-ansi", + "@smithy/util-utf8", "ajv", - "lodash.truncate", - "slice-ansi", + "ansi-regex", + "ansi-styles", + "astral-regex", "at-least-node", + "bowser", + "chalk", + "charenc", + "ci-info", "color-convert", - "has-flag", - "ansi-regex", + "color-name", + "crypt", + "diff", + "emoji-regex", + "fast-deep-equal", "fast-uri", + "fast-xml-parser", + "fs-extra", + "graceful-fs", + "graphql", + "graphql-mapping-template", + "graphql-transformer-common", + "has-flag", + "hjson", + "immer", + "is-buffer", + "is-ci", + "is-fullwidth-code-point", "json-schema-traverse", + "jsonfile", + "libphonenumber-js", + "lodash", + "lodash.mergewith", + "lodash.truncate", + "md5", + "object-hash", + "pluralize", "require-from-string", - "astral-regex", - "color-name" + "semver", + "slice-ansi", + "string-width", + "strip-ansi", + "strnum", + "supports-color", + "table", + "ts-dedent", + "tslib", + "universalify", + "uuid", + "zod" ], "dependencies": { "@aws-amplify/ai-constructs": "^1.0.0", From a4509c1b44cd22315422c1a2ca86d374817f63c5 Mon Sep 17 00:00:00 2001 From: Kevin Shan Date: Wed, 11 Dec 2024 23:43:41 -0800 Subject: [PATCH 04/12] fix: bump awd-cde-lib version to resolve dependency conflict with @aws-amplify/auth-construct Signed-off-by: Kevin Shan --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 25830138ef..d6b86ac90f 100755 --- a/package.json +++ b/package.json @@ -459,7 +459,7 @@ "**/istanbul/async": "^2.6.4", "**/jake/async": "^2.6.4", "**/nth-check": "^2.0.1", - "aws-cdk-lib": "~2.158.0", + "aws-cdk-lib": "^2.168.0", "lodash": "^4.17.21", "node-fetch": "^2.6.7", "cross-fetch": "^2.2.6", From ac2f5589d5df46aad9e8c8e2cfe846f4ceb86ff2 Mon Sep 17 00:00:00 2001 From: Kevin Shan Date: Thu, 12 Dec 2024 00:46:30 -0800 Subject: [PATCH 05/12] chore: yarn.lock build Signed-off-by: Kevin Shan --- packages/amplify-data-construct/.jsii | 45 ++++++++++++++++--- packages/amplify-graphql-api-construct/.jsii | 47 +++++++++++++++++--- yarn.lock | 32 ++++++------- 3 files changed, 97 insertions(+), 27 deletions(-) diff --git a/packages/amplify-data-construct/.jsii b/packages/amplify-data-construct/.jsii index 510263b665..625bb68db6 100644 --- a/packages/amplify-data-construct/.jsii +++ b/packages/amplify-data-construct/.jsii @@ -59,7 +59,6 @@ "@aws-sdk/util-locate-window": "^3.0.0", "@aws-sdk/util-user-agent-browser": "3.609.0", "@aws-sdk/util-user-agent-node": "3.614.0", - "@babel/runtime": "^7.18.3", "@smithy/abort-controller": "^3.1.1", "@smithy/config-resolver": "^3.0.5", "@smithy/core": "^2.4.0", @@ -132,7 +131,6 @@ "is-buffer": "~1.1.6", "is-ci": "^3.0.1", "is-fullwidth-code-point": "^3.0.0", - "json-schema-to-ts": "^3.1.1", "json-schema-traverse": "^1.0.0", "jsonfile": "^4.0.0", "libphonenumber-js": "1.9.47", @@ -142,7 +140,6 @@ "md5": "^2.2.1", "object-hash": "^3.0.0", "pluralize": "8.0.0", - "regenerator-runtime": "^0.14.0", "require-from-string": "^2.0.2", "semver": "^7.6.3", "slice-ansi": "^4.0.0", @@ -151,7 +148,6 @@ "strnum": "^1.0.5", "supports-color": "^7.1.0", "table": "^6.8.1", - "ts-algebra": "^2.0.0", "ts-dedent": "^2.0.0", "tslib": "^2.6.2", "universalify": "^0.1.0", @@ -1179,6 +1175,19 @@ } } }, + "aws-cdk-lib.aws_connectcampaignsv2": { + "targets": { + "dotnet": { + "package": "Amazon.CDK.AWS.ConnectCampaignsV2" + }, + "java": { + "package": "software.amazon.awscdk.services.connectcampaignsv2" + }, + "python": { + "module": "aws_cdk.aws_connectcampaignsv2" + } + } + }, "aws-cdk-lib.aws_controltower": { "targets": { "dotnet": { @@ -1998,6 +2007,19 @@ } } }, + "aws-cdk-lib.aws_invoicing": { + "targets": { + "dotnet": { + "package": "Amazon.CDK.AWS.Invoicing" + }, + "java": { + "package": "software.amazon.awscdk.services.invoicing" + }, + "python": { + "module": "aws_cdk.aws_invoicing" + } + } + }, "aws-cdk-lib.aws_iot": { "targets": { "dotnet": { @@ -2986,6 +3008,19 @@ } } }, + "aws-cdk-lib.aws_rbin": { + "targets": { + "dotnet": { + "package": "Amazon.CDK.AWS.Rbin" + }, + "java": { + "package": "software.amazon.awscdk.services.rbin" + }, + "python": { + "module": "aws_cdk.aws_rbin" + } + } + }, "aws-cdk-lib.aws_rds": { "targets": { "dotnet": { @@ -4056,5 +4091,5 @@ }, "types": {}, "version": "1.14.2", - "fingerprint": "RTfNcFrHD4q0mWFUXzMPgp9jaKN0jqAhFM2pyV5xZnA=" + "fingerprint": "itI0JYBEeH+3qs8edODOmiLC/v514mFvYvaD4OhF7BY=" } \ No newline at end of file diff --git a/packages/amplify-graphql-api-construct/.jsii b/packages/amplify-graphql-api-construct/.jsii index a2ca39e974..75c7dbf5cb 100644 --- a/packages/amplify-graphql-api-construct/.jsii +++ b/packages/amplify-graphql-api-construct/.jsii @@ -59,7 +59,6 @@ "@aws-sdk/util-locate-window": "^3.0.0", "@aws-sdk/util-user-agent-browser": "3.609.0", "@aws-sdk/util-user-agent-node": "3.614.0", - "@babel/runtime": "^7.18.3", "@smithy/abort-controller": "^3.1.1", "@smithy/config-resolver": "^3.0.5", "@smithy/core": "^2.4.0", @@ -132,7 +131,6 @@ "is-buffer": "~1.1.6", "is-ci": "^3.0.1", "is-fullwidth-code-point": "^3.0.0", - "json-schema-to-ts": "^3.1.1", "json-schema-traverse": "^1.0.0", "jsonfile": "^4.0.0", "libphonenumber-js": "1.9.47", @@ -142,7 +140,6 @@ "md5": "^2.2.1", "object-hash": "^3.0.0", "pluralize": "8.0.0", - "regenerator-runtime": "^0.14.0", "require-from-string": "^2.0.2", "semver": "^7.6.3", "slice-ansi": "^4.0.0", @@ -151,7 +148,6 @@ "strnum": "^1.0.5", "supports-color": "^7.1.0", "table": "^6.8.1", - "ts-algebra": "^2.0.0", "ts-dedent": "^2.0.0", "tslib": "^2.6.2", "universalify": "^0.1.0", @@ -1171,6 +1167,19 @@ } } }, + "aws-cdk-lib.aws_connectcampaignsv2": { + "targets": { + "dotnet": { + "package": "Amazon.CDK.AWS.ConnectCampaignsV2" + }, + "java": { + "package": "software.amazon.awscdk.services.connectcampaignsv2" + }, + "python": { + "module": "aws_cdk.aws_connectcampaignsv2" + } + } + }, "aws-cdk-lib.aws_controltower": { "targets": { "dotnet": { @@ -1990,6 +1999,19 @@ } } }, + "aws-cdk-lib.aws_invoicing": { + "targets": { + "dotnet": { + "package": "Amazon.CDK.AWS.Invoicing" + }, + "java": { + "package": "software.amazon.awscdk.services.invoicing" + }, + "python": { + "module": "aws_cdk.aws_invoicing" + } + } + }, "aws-cdk-lib.aws_iot": { "targets": { "dotnet": { @@ -2978,6 +3000,19 @@ } } }, + "aws-cdk-lib.aws_rbin": { + "targets": { + "dotnet": { + "package": "Amazon.CDK.AWS.Rbin" + }, + "java": { + "package": "software.amazon.awscdk.services.rbin" + }, + "python": { + "module": "aws_cdk.aws_rbin" + } + } + }, "aws-cdk-lib.aws_rds": { "targets": { "dotnet": { @@ -7988,7 +8023,7 @@ "kind": "enum", "locationInModule": { "filename": "../../node_modules/aws-cdk-lib/aws-logs/lib/log-group.d.ts", - "line": 157 + "line": 238 }, "members": [ { @@ -9394,5 +9429,5 @@ } }, "version": "1.18.2", - "fingerprint": "uN7bAlteScm304GLowJ9zVuVWrDSdComi7RBqGAmHZ0=" + "fingerprint": "RwmtYGXcfNZiT2Mkp2Mk1UB2/tPS3w6A0sOH70tccUY=" } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 7b10d68d60..06cb1298f7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -417,12 +417,12 @@ dependencies: "@aws-cdk/cloudformation-diff" "2.68.0" -"@aws-cdk/asset-awscli-v1@^2.2.202": - version "2.2.212" - resolved "https://registry.npmjs.org/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.212.tgz#dd93cdd383d9b97a8dfeac32c08d9d68488cda38" - integrity sha512-7WqbnWUkBBcAzEdfRrpz6sCOheUPf4JEUdGvzJ4EEufXeT7v7nRbRmTvUBbQ+OQlCv9UrVj9XuFxKPjkvneGMQ== +"@aws-cdk/asset-awscli-v1@^2.2.208": + version "2.2.214" + resolved "https://registry.npmjs.org/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.214.tgz#7d3554aae08f5b51fc1373bb39e5b4549b4c25c7" + integrity sha512-JeuX1xoYWXEeFD4RyAyvv8OD/NPdbLD6leKKpFLECWqsKY1YrwX0U8lr753CskflwaDGpU42pyyjPdiMZ7NiWA== -"@aws-cdk/asset-kubectl-v20@^2.1.2": +"@aws-cdk/asset-kubectl-v20@^2.1.3": version "2.1.3" resolved "https://registry.npmjs.org/@aws-cdk/asset-kubectl-v20/-/asset-kubectl-v20-2.1.3.tgz#80e09004be173995e91614e34d947da11dd9ff4d" integrity sha512-cDG1w3ieM6eOT9mTefRuTypk95+oyD7P5X/wRltwmYxU7nZc3+076YEVS6vrjDKr3ADYbfn0lDKpfB1FBtO9CQ== @@ -445,10 +445,10 @@ fs-extra "^9.1.0" md5 "^2.3.0" -"@aws-cdk/cloud-assembly-schema@^36.0.24": - version "36.3.0" - resolved "https://registry.npmjs.org/@aws-cdk/cloud-assembly-schema/-/cloud-assembly-schema-36.3.0.tgz#17aeb389cbbff72f2b8d5b3b25d8d21d6ec3f0ef" - integrity sha512-mLSYgcMFTNCXrGAD7xob95p9s47/7WwEWUJiexxM46H2GxiijhlhLQJs31AS5uRRP6Cx1DLEu4qayKAUOOVGrw== +"@aws-cdk/cloud-assembly-schema@^38.0.1": + version "38.0.1" + resolved "https://registry.npmjs.org/@aws-cdk/cloud-assembly-schema/-/cloud-assembly-schema-38.0.1.tgz#cdf4684ae8778459e039cd44082ea644a3504ca9" + integrity sha512-KvPe+NMWAulfNVwY7jenFhzhuLhLqJ/OPy5jx7wUstbjnYnjRVLpUHPU3yCjXFE0J8cuJVdx95BJ4rOs66Pi9w== dependencies: jsonschema "^1.4.1" semver "^7.6.3" @@ -8633,15 +8633,15 @@ aws-appsync@^4.1.1: url "^0.11.0" uuid "3.x" -aws-cdk-lib@2.158.0, aws-cdk-lib@~2.129.0, aws-cdk-lib@~2.158.0: - version "2.158.0" - resolved "https://registry.npmjs.org/aws-cdk-lib/-/aws-cdk-lib-2.158.0.tgz#f39a3ee7afdd16986cdd9811ff4e1a593b931304" - integrity sha512-Pl9CCLM+XRTy6nyyRJM1INEMtwIlZOib0FWyq9i9E388vurw7sNVJ6tAsfLpGIOLHsFQCbF4f6OZ0KSVxmMaiA== +aws-cdk-lib@2.158.0, aws-cdk-lib@^2.168.0, aws-cdk-lib@~2.129.0: + version "2.173.0" + resolved "https://registry.npmjs.org/aws-cdk-lib/-/aws-cdk-lib-2.173.0.tgz#5dddde721cc1218eb38366b84bc105ebab39b58f" + integrity sha512-Da1JUwG8eL+chRSB+c2I4dRf54DWe/wmWKj9CBthNdsE9XCB8odyEcMpmgBC+R160o7ioYY2DBsAaKIIRa9XQw== dependencies: - "@aws-cdk/asset-awscli-v1" "^2.2.202" - "@aws-cdk/asset-kubectl-v20" "^2.1.2" + "@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" "^36.0.24" + "@aws-cdk/cloud-assembly-schema" "^38.0.1" "@balena/dockerignore" "^1.0.2" case "1.6.3" fs-extra "^11.2.0" From 55db4ab3f1f44cecb32b9483ea8ccfc2eb6dc538 Mon Sep 17 00:00:00 2001 From: Kevin Shan Date: Thu, 12 Dec 2024 02:12:22 -0800 Subject: [PATCH 06/12] fix: bump aws-cdk lib version to 2.168.0 Signed-off-by: Kevin Shan --- packages/amplify-data-construct/.jsii | 4 ++-- packages/amplify-data-construct/package.json | 4 ++-- packages/amplify-graphql-api-construct-tests/package.json | 2 +- .../src/__tests__/__snapshots__/base-cdk.test.ts.snap | 4 ++-- .../src/__tests__/admin-role.test.ts | 4 ++-- .../src/__tests__/base-cdk.test.ts | 2 +- .../src/__tests__/data-construct.test.ts | 2 +- packages/amplify-graphql-api-construct-tests/src/commands.ts | 2 +- packages/amplify-graphql-api-construct/.jsii | 4 ++-- packages/amplify-graphql-api-construct/package.json | 4 ++-- packages/amplify-graphql-auth-transformer/package.json | 2 +- .../amplify-graphql-conversation-transformer/package.json | 2 +- packages/amplify-graphql-function-transformer/package.json | 2 +- packages/amplify-graphql-generation-transformer/package.json | 2 +- packages/amplify-graphql-http-transformer/package.json | 2 +- packages/amplify-graphql-index-transformer/package.json | 2 +- packages/amplify-graphql-model-transformer/package.json | 2 +- .../amplify-graphql-name-mapping-transformer/package.json | 2 +- packages/amplify-graphql-predictions-transformer/package.json | 2 +- packages/amplify-graphql-relational-transformer/package.json | 2 +- packages/amplify-graphql-searchable-transformer/package.json | 2 +- packages/amplify-graphql-sql-transformer/package.json | 2 +- packages/amplify-graphql-transformer-core/package.json | 2 +- packages/amplify-graphql-transformer-interfaces/package.json | 2 +- packages/amplify-graphql-transformer-test-utils/package.json | 2 +- packages/amplify-graphql-transformer/package.json | 2 +- .../resources/jsonServer/package.json | 4 ++-- yarn.lock | 2 +- 28 files changed, 35 insertions(+), 35 deletions(-) diff --git a/packages/amplify-data-construct/.jsii b/packages/amplify-data-construct/.jsii index 625bb68db6..0b081325ce 100644 --- a/packages/amplify-data-construct/.jsii +++ b/packages/amplify-data-construct/.jsii @@ -156,7 +156,7 @@ }, "dependencies": { "@aws-amplify/graphql-api-construct": "1.18.2", - "aws-cdk-lib": "^2.158.0", + "aws-cdk-lib": "^2.168.0", "constructs": "^10.3.0" }, "dependencyClosure": { @@ -4091,5 +4091,5 @@ }, "types": {}, "version": "1.14.2", - "fingerprint": "itI0JYBEeH+3qs8edODOmiLC/v514mFvYvaD4OhF7BY=" + "fingerprint": "APjytkZM54Hm1aMlPGMXzuoTZBDCo4V2Abg4rDYBE1A=" } \ No newline at end of file diff --git a/packages/amplify-data-construct/package.json b/packages/amplify-data-construct/package.json index d7cbf32df6..39bbf369f9 100644 --- a/packages/amplify-data-construct/package.json +++ b/packages/amplify-data-construct/package.json @@ -334,7 +334,7 @@ "devDependencies": { "@types/fs-extra": "^8.0.1", "@types/node": "^18.0.0", - "aws-cdk-lib": "2.158.0", + "aws-cdk-lib": "2.168.0", "constructs": "10.3.0", "jsii": "^5.4.23", "jsii-pacmak": "^1.84.0", @@ -344,7 +344,7 @@ "ts-node": "^8.10.1" }, "peerDependencies": { - "aws-cdk-lib": "^2.158.0", + "aws-cdk-lib": "^2.168.0", "constructs": "^10.3.0" }, "stability": "stable", diff --git a/packages/amplify-graphql-api-construct-tests/package.json b/packages/amplify-graphql-api-construct-tests/package.json index e4d78a223b..72bf0b75bb 100644 --- a/packages/amplify-graphql-api-construct-tests/package.json +++ b/packages/amplify-graphql-api-construct-tests/package.json @@ -51,7 +51,7 @@ "@aws-amplify/graphql-transformer-core": "3.3.1", "@aws-amplify/graphql-transformer-interfaces": "4.2.0", "@types/node": "^18.0.0", - "aws-cdk-lib": "2.158.0", + "aws-cdk-lib": "2.168.0", "constructs": "10.3.0", "ts-node": "^8.10.2" }, diff --git a/packages/amplify-graphql-api-construct-tests/src/__tests__/__snapshots__/base-cdk.test.ts.snap b/packages/amplify-graphql-api-construct-tests/src/__tests__/__snapshots__/base-cdk.test.ts.snap index 22228fd1ce..3d5b56bbde 100644 --- a/packages/amplify-graphql-api-construct-tests/src/__tests__/__snapshots__/base-cdk.test.ts.snap +++ b/packages/amplify-graphql-api-construct-tests/src/__tests__/__snapshots__/base-cdk.test.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`CDK GraphQL Transformer CDK base case - aws-cdk-lib@2.158.0 1`] = ` +exports[`CDK GraphQL Transformer CDK base case - aws-cdk-lib@2.168.0 1`] = ` Object { "body": Object { "data": Object { @@ -14,7 +14,7 @@ Object { } `; -exports[`CDK GraphQL Transformer CDK base case - aws-cdk-lib@2.158.0 2`] = ` +exports[`CDK GraphQL Transformer CDK base case - aws-cdk-lib@2.168.0 2`] = ` Object { "body": Object { "data": Object { diff --git a/packages/amplify-graphql-api-construct-tests/src/__tests__/admin-role.test.ts b/packages/amplify-graphql-api-construct-tests/src/__tests__/admin-role.test.ts index 90fffa0541..b697b47f6d 100644 --- a/packages/amplify-graphql-api-construct-tests/src/__tests__/admin-role.test.ts +++ b/packages/amplify-graphql-api-construct-tests/src/__tests__/admin-role.test.ts @@ -29,10 +29,10 @@ describe('CDK Auth Modes', () => { test('Can be invoked with Admin Roles defined', async () => { const templatePath = path.resolve(path.join(__dirname, 'backends', 'admin-role')); const name = await initCDKProject(projRoot, templatePath, { - cdkVersion: '2.158.0', // Explicitly declaring this, since this version needs to match cognito idp + cdkVersion: '2.168.0', // Explicitly declaring this, since this version needs to match cognito idp additionalDependencies: [ 'esbuild', // required to bundle the lambda function - '@aws-cdk/aws-cognito-identitypool-alpha@2.158.0-alpha.0', // using alpha cognito idp resource for auth config + '@aws-cdk/aws-cognito-identitypool-alpha@2.168.0-alpha.0', // using alpha cognito idp resource for auth config '@aws-crypto/sha256-js', // All remaining deps are required for the lambda to sign the request to appsync '@aws-sdk/credential-provider-node', '@aws-sdk/protocol-http', diff --git a/packages/amplify-graphql-api-construct-tests/src/__tests__/base-cdk.test.ts b/packages/amplify-graphql-api-construct-tests/src/__tests__/base-cdk.test.ts index c206678415..a4edb68e05 100644 --- a/packages/amplify-graphql-api-construct-tests/src/__tests__/base-cdk.test.ts +++ b/packages/amplify-graphql-api-construct-tests/src/__tests__/base-cdk.test.ts @@ -30,7 +30,7 @@ describe('CDK GraphQL Transformer', () => { deleteProjectDir(projRoot); }); - ['2.158.0', 'latest'].forEach((cdkVersion) => { + ['2.168.0', 'latest'].forEach((cdkVersion) => { test(`CDK base case - aws-cdk-lib@${cdkVersion}`, async () => { const templatePath = path.resolve(path.join(__dirname, 'backends', 'base-cdk')); const name = await initCDKProject(projRoot, templatePath, { cdkVersion }); diff --git a/packages/amplify-graphql-api-construct-tests/src/__tests__/data-construct.test.ts b/packages/amplify-graphql-api-construct-tests/src/__tests__/data-construct.test.ts index b900210c8c..e181a3f093 100644 --- a/packages/amplify-graphql-api-construct-tests/src/__tests__/data-construct.test.ts +++ b/packages/amplify-graphql-api-construct-tests/src/__tests__/data-construct.test.ts @@ -25,7 +25,7 @@ describe('Data Construct', () => { deleteProjectDir(projRoot); }); - ['2.158.0', 'latest'].forEach((cdkVersion) => { + ['2.168.0', 'latest'].forEach((cdkVersion) => { test(`Data Construct - aws-cdk-lib@${cdkVersion}`, async () => { const templatePath = path.resolve(path.join(__dirname, 'backends', 'data-construct')); const name = await initCDKProject(projRoot, templatePath, { cdkVersion, construct: 'Data' }); diff --git a/packages/amplify-graphql-api-construct-tests/src/commands.ts b/packages/amplify-graphql-api-construct-tests/src/commands.ts index 1ee80d65c9..26a7bd661c 100644 --- a/packages/amplify-graphql-api-construct-tests/src/commands.ts +++ b/packages/amplify-graphql-api-construct-tests/src/commands.ts @@ -78,7 +78,7 @@ export type InitCDKProjectProps = { * @returns a promise which resolves to the stack name */ export const initCDKProject = async (cwd: string, templatePath: string, props?: InitCDKProjectProps): Promise => { - const { cdkVersion = '2.158.0', additionalDependencies = [] } = props ?? {}; + const { cdkVersion = '2.168.0', additionalDependencies = [] } = props ?? {}; await spawn(getNpxPath(), ['cdk', 'init', 'app', '--language', 'typescript'], { cwd, diff --git a/packages/amplify-graphql-api-construct/.jsii b/packages/amplify-graphql-api-construct/.jsii index 75c7dbf5cb..573cbf3af4 100644 --- a/packages/amplify-graphql-api-construct/.jsii +++ b/packages/amplify-graphql-api-construct/.jsii @@ -155,7 +155,7 @@ "zod": "^3.22.2" }, "dependencies": { - "aws-cdk-lib": "^2.158.0", + "aws-cdk-lib": "^2.168.0", "constructs": "^10.3.0" }, "dependencyClosure": { @@ -9429,5 +9429,5 @@ } }, "version": "1.18.2", - "fingerprint": "RwmtYGXcfNZiT2Mkp2Mk1UB2/tPS3w6A0sOH70tccUY=" + "fingerprint": "0uN/9Ct5lzlmajNFfuHjXBZPQpsDnV9/bS6+qEURCqg=" } \ No newline at end of file diff --git a/packages/amplify-graphql-api-construct/package.json b/packages/amplify-graphql-api-construct/package.json index c6c0b97119..0e951faabf 100644 --- a/packages/amplify-graphql-api-construct/package.json +++ b/packages/amplify-graphql-api-construct/package.json @@ -335,7 +335,7 @@ "@aws-amplify/graphql-transformer-test-utils": "1.0.8", "@types/fs-extra": "^8.0.1", "@types/node": "^18.0.0", - "aws-cdk-lib": "2.158.0", + "aws-cdk-lib": "2.168.0", "constructs": "10.3.0", "jsii": "^5.4.23", "jsii-docgen": "9.1.2", @@ -346,7 +346,7 @@ "ts-node": "^8.10.1" }, "peerDependencies": { - "aws-cdk-lib": "^2.158.0", + "aws-cdk-lib": "^2.168.0", "constructs": "^10.3.0" }, "stability": "stable", diff --git a/packages/amplify-graphql-auth-transformer/package.json b/packages/amplify-graphql-auth-transformer/package.json index bd69324b4d..e022bc0fa9 100644 --- a/packages/amplify-graphql-auth-transformer/package.json +++ b/packages/amplify-graphql-auth-transformer/package.json @@ -50,7 +50,7 @@ "@types/node": "^18.0.0" }, "peerDependencies": { - "aws-cdk-lib": "^2.158.0", + "aws-cdk-lib": "^2.168.0", "constructs": "^10.3.0" }, "jest": { diff --git a/packages/amplify-graphql-conversation-transformer/package.json b/packages/amplify-graphql-conversation-transformer/package.json index a97bc5682e..4ad0719129 100644 --- a/packages/amplify-graphql-conversation-transformer/package.json +++ b/packages/amplify-graphql-conversation-transformer/package.json @@ -43,7 +43,7 @@ "esbuild": "^0.24.0" }, "peerDependencies": { - "aws-cdk-lib": "^2.158.0", + "aws-cdk-lib": "^2.168.0", "constructs": "^10.3.0" }, "jest": { diff --git a/packages/amplify-graphql-function-transformer/package.json b/packages/amplify-graphql-function-transformer/package.json index 37620c43ae..0ef9b4eb3f 100644 --- a/packages/amplify-graphql-function-transformer/package.json +++ b/packages/amplify-graphql-function-transformer/package.json @@ -40,7 +40,7 @@ "@aws-amplify/graphql-transformer-test-utils": "1.0.8" }, "peerDependencies": { - "aws-cdk-lib": "^2.158.0", + "aws-cdk-lib": "^2.168.0", "constructs": "^10.3.0" }, "jest": { diff --git a/packages/amplify-graphql-generation-transformer/package.json b/packages/amplify-graphql-generation-transformer/package.json index ecfdc44b39..b25f5892eb 100644 --- a/packages/amplify-graphql-generation-transformer/package.json +++ b/packages/amplify-graphql-generation-transformer/package.json @@ -36,7 +36,7 @@ "@aws-amplify/graphql-transformer-test-utils": "1.0.8" }, "peerDependencies": { - "aws-cdk-lib": "^2.158.0", + "aws-cdk-lib": "^2.168.0", "constructs": "^10.3.0" }, "jest": { diff --git a/packages/amplify-graphql-http-transformer/package.json b/packages/amplify-graphql-http-transformer/package.json index a7af35455f..22b130e746 100644 --- a/packages/amplify-graphql-http-transformer/package.json +++ b/packages/amplify-graphql-http-transformer/package.json @@ -40,7 +40,7 @@ "@aws-amplify/graphql-transformer-test-utils": "1.0.8" }, "peerDependencies": { - "aws-cdk-lib": "^2.158.0", + "aws-cdk-lib": "^2.168.0", "constructs": "^10.3.0" }, "jest": { diff --git a/packages/amplify-graphql-index-transformer/package.json b/packages/amplify-graphql-index-transformer/package.json index 5556887562..0bb8092b06 100644 --- a/packages/amplify-graphql-index-transformer/package.json +++ b/packages/amplify-graphql-index-transformer/package.json @@ -41,7 +41,7 @@ "@aws-amplify/graphql-transformer-test-utils": "1.0.8" }, "peerDependencies": { - "aws-cdk-lib": "^2.158.0", + "aws-cdk-lib": "^2.168.0", "constructs": "^10.3.0" }, "jest": { diff --git a/packages/amplify-graphql-model-transformer/package.json b/packages/amplify-graphql-model-transformer/package.json index b85916fdd6..715b4d4a90 100644 --- a/packages/amplify-graphql-model-transformer/package.json +++ b/packages/amplify-graphql-model-transformer/package.json @@ -42,7 +42,7 @@ "graphql-transformer-common": "5.1.1" }, "peerDependencies": { - "aws-cdk-lib": "^2.158.0", + "aws-cdk-lib": "^2.168.0", "constructs": "^10.3.0" }, "devDependencies": { diff --git a/packages/amplify-graphql-name-mapping-transformer/package.json b/packages/amplify-graphql-name-mapping-transformer/package.json index dd5f9c232d..148b63f100 100644 --- a/packages/amplify-graphql-name-mapping-transformer/package.json +++ b/packages/amplify-graphql-name-mapping-transformer/package.json @@ -38,7 +38,7 @@ "graphql-transformer-common": "5.1.1" }, "peerDependencies": { - "aws-cdk-lib": "^2.158.0", + "aws-cdk-lib": "^2.168.0", "constructs": "^10.3.0" }, "devDependencies": { diff --git a/packages/amplify-graphql-predictions-transformer/package.json b/packages/amplify-graphql-predictions-transformer/package.json index f40263d363..e660db55d5 100644 --- a/packages/amplify-graphql-predictions-transformer/package.json +++ b/packages/amplify-graphql-predictions-transformer/package.json @@ -37,7 +37,7 @@ "graphql-transformer-common": "5.1.1" }, "peerDependencies": { - "aws-cdk-lib": "^2.158.0", + "aws-cdk-lib": "^2.168.0", "constructs": "^10.3.0" }, "devDependencies": { diff --git a/packages/amplify-graphql-relational-transformer/package.json b/packages/amplify-graphql-relational-transformer/package.json index f199a5d149..61eb3894d2 100644 --- a/packages/amplify-graphql-relational-transformer/package.json +++ b/packages/amplify-graphql-relational-transformer/package.json @@ -43,7 +43,7 @@ "@aws-amplify/graphql-transformer-test-utils": "1.0.8" }, "peerDependencies": { - "aws-cdk-lib": "^2.158.0", + "aws-cdk-lib": "^2.168.0", "constructs": "^10.3.0" }, "jest": { diff --git a/packages/amplify-graphql-searchable-transformer/package.json b/packages/amplify-graphql-searchable-transformer/package.json index 526d66ba46..050a343e8a 100644 --- a/packages/amplify-graphql-searchable-transformer/package.json +++ b/packages/amplify-graphql-searchable-transformer/package.json @@ -38,7 +38,7 @@ "graphql-transformer-common": "5.1.1" }, "peerDependencies": { - "aws-cdk-lib": "^2.158.0", + "aws-cdk-lib": "^2.168.0", "constructs": "^10.3.0" }, "devDependencies": { diff --git a/packages/amplify-graphql-sql-transformer/package.json b/packages/amplify-graphql-sql-transformer/package.json index f2d98a36b6..feaaf28e0c 100644 --- a/packages/amplify-graphql-sql-transformer/package.json +++ b/packages/amplify-graphql-sql-transformer/package.json @@ -41,7 +41,7 @@ "@aws-amplify/graphql-transformer-test-utils": "1.0.8" }, "peerDependencies": { - "aws-cdk-lib": "^2.158.0", + "aws-cdk-lib": "^2.168.0", "constructs": "^10.3.0" }, "jest": { diff --git a/packages/amplify-graphql-transformer-core/package.json b/packages/amplify-graphql-transformer-core/package.json index 63dc7241f7..193de58444 100644 --- a/packages/amplify-graphql-transformer-core/package.json +++ b/packages/amplify-graphql-transformer-core/package.json @@ -43,7 +43,7 @@ "ts-dedent": "^2.0.0" }, "peerDependencies": { - "aws-cdk-lib": "^2.158.0", + "aws-cdk-lib": "^2.168.0", "constructs": "^10.3.0" }, "devDependencies": { diff --git a/packages/amplify-graphql-transformer-interfaces/package.json b/packages/amplify-graphql-transformer-interfaces/package.json index a56859b3d8..e611984352 100644 --- a/packages/amplify-graphql-transformer-interfaces/package.json +++ b/packages/amplify-graphql-transformer-interfaces/package.json @@ -31,7 +31,7 @@ "graphql": "^15.5.0" }, "peerDependencies": { - "aws-cdk-lib": "^2.158.0", + "aws-cdk-lib": "^2.168.0", "constructs": "^10.3.0" }, "jest": { diff --git a/packages/amplify-graphql-transformer-test-utils/package.json b/packages/amplify-graphql-transformer-test-utils/package.json index a4d46eed8c..4f1c260501 100644 --- a/packages/amplify-graphql-transformer-test-utils/package.json +++ b/packages/amplify-graphql-transformer-test-utils/package.json @@ -39,7 +39,7 @@ "ts-jest": "^29.0.0" }, "peerDependencies": { - "aws-cdk-lib": "^2.158.0", + "aws-cdk-lib": "^2.168.0", "constructs": "^10.3.0" }, "jest": { diff --git a/packages/amplify-graphql-transformer/package.json b/packages/amplify-graphql-transformer/package.json index 3cc89f74f8..b4111a888f 100644 --- a/packages/amplify-graphql-transformer/package.json +++ b/packages/amplify-graphql-transformer/package.json @@ -54,7 +54,7 @@ "ts-jest": "^29.0.0" }, "peerDependencies": { - "aws-cdk-lib": "^2.158.0", + "aws-cdk-lib": "^2.168.0", "constructs": "^10.3.0" }, "jest": { diff --git a/packages/graphql-transformers-e2e-tests/resources/jsonServer/package.json b/packages/graphql-transformers-e2e-tests/resources/jsonServer/package.json index fd02cc444c..8a07b3a987 100644 --- a/packages/graphql-transformers-e2e-tests/resources/jsonServer/package.json +++ b/packages/graphql-transformers-e2e-tests/resources/jsonServer/package.json @@ -3,12 +3,12 @@ "private": true, "version": "1.0.0", "devDependencies": { - "aws-cdk": "~2.158.0", + "aws-cdk": "~2.168.0", "@types/node": "*", "typescript": "*" }, "dependencies": { - "aws-cdk-lib": "~2.158.0", + "aws-cdk-lib": "~2.168.0", "constructs": "^10.3.0" } } diff --git a/yarn.lock b/yarn.lock index 06cb1298f7..a37e734fde 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8633,7 +8633,7 @@ aws-appsync@^4.1.1: url "^0.11.0" uuid "3.x" -aws-cdk-lib@2.158.0, aws-cdk-lib@^2.168.0, aws-cdk-lib@~2.129.0: +aws-cdk-lib@2.168.0, aws-cdk-lib@^2.168.0, aws-cdk-lib@~2.129.0: version "2.173.0" resolved "https://registry.npmjs.org/aws-cdk-lib/-/aws-cdk-lib-2.173.0.tgz#5dddde721cc1218eb38366b84bc105ebab39b58f" integrity sha512-Da1JUwG8eL+chRSB+c2I4dRf54DWe/wmWKj9CBthNdsE9XCB8odyEcMpmgBC+R160o7ioYY2DBsAaKIIRa9XQw== From f63850dbfa13a8df27212216386f45c56255e39f Mon Sep 17 00:00:00 2001 From: Kevin Shan Date: Thu, 12 Dec 2024 11:06:49 -0800 Subject: [PATCH 07/12] chore: move deps verification changes to separate PR --- scripts/verify-construct-dependencies.ts | 71 ++---------------------- 1 file changed, 4 insertions(+), 67 deletions(-) diff --git a/scripts/verify-construct-dependencies.ts b/scripts/verify-construct-dependencies.ts index 75553d52b9..528c525d7e 100644 --- a/scripts/verify-construct-dependencies.ts +++ b/scripts/verify-construct-dependencies.ts @@ -8,12 +8,12 @@ type DepsClosure = { registryDeps: Array; }; -type PackageConfiguration = { +type ConstructPackageConfiguration = { packageName: string; packageDir: string; }; -const CONSTRUCT_PACKAGE_CONFIGURATIONS: PackageConfiguration[] = [ +const CONSTRUCT_PACKAGE_CONFIGURATIONS: ConstructPackageConfiguration[] = [ { packageName: '@aws-amplify/graphql-api-construct', packageDir: 'amplify-graphql-api-construct', @@ -24,13 +24,6 @@ const CONSTRUCT_PACKAGE_CONFIGURATIONS: PackageConfiguration[] = [ }, ]; -const SKIP_TRANSITIVE_REPO_PACKAGES: PackageConfiguration[] = [ - { - packageName: '@aws-amplify/graphql-conversation-transformer', - packageDir: 'amplify-graphql-conversation-transformer', - }, -]; - const PACKAGES_DIR = 'packages'; const NON_JSII_DEPENDENCIES_FILENAME = 'nonJsiiDependencies.json'; const PACKAGE_JSON_FILENAME = 'package.json'; @@ -69,49 +62,6 @@ const getPackageDependencies = (subDirectory: string): [string, Array] = const getRepoPackages = (): Record> => Object.fromEntries(fs.readdirSync(PACKAGES_DIR).filter(isPackageDirectory).map(getPackageDependencies)); -/** - * Return a set of package names which transitive dependencies should not be included in dependency tree. - * @returns a set of package names. - */ -const getSkipTransitivePackage = (): Set => { - return new Set( - SKIP_TRANSITIVE_REPO_PACKAGES.map((config: PackageConfiguration) => { - const packageJsonContents = fs.readFileSync(path.join(PACKAGES_DIR, config.packageDir, PACKAGE_JSON_FILENAME), 'utf-8'); - const packageJson = JSON.parse(packageJsonContents); - return `${packageJson.name}@${packageJson.version}`; - }), - ); -}; - -/** - * Return the source package in the dependency chain (repo package). - * @param dep The dependency to trace - * @param depParents Map of dependencies to their parents - * @param repoPackages Set of repository packages to stop at - * @returns the source package name. - */ -const getSourcePackage = (dep: string, depParents: Map, repoPackages: Set): string => { - let current = dep; - - // If the starting dep is already a repo package, return it - if (repoPackages.has(current)) { - return current; - } - - let parent = depParents.get(current); - - while (parent) { - current = parent; - // Stop if reached a repo package - if (repoPackages.has(current)) { - break; - } - parent = depParents.get(current); - } - - return current; -}; - /** * Given a set of input deps, compute the full closure of local and remote deps. * @@ -123,7 +73,6 @@ const getSourcePackage = (dep: string, depParents: Map, repoPack */ const computeDepsClosure = (deps: string[]): DepsClosure => { const repoPackageClosures = getRepoPackages(); - const skipTransitiveDepsFor = getSkipTransitivePackage(); const repoPackages = new Set(Object.keys(repoPackageClosures)); const lockfileContents = lockfile.parse(fs.readFileSync('yarn.lock', 'utf8')).object; @@ -131,10 +80,6 @@ const computeDepsClosure = (deps: string[]): DepsClosure => { const repoDepClosure = new Set(); const registryDepClosure = new Set(); const seenDeps = new Set(); - - // Track where dependencies came from - const depParents = new Map(); - let currDeps: string[] = [...deps]; do { const stageDeps: string[] = []; @@ -143,20 +88,12 @@ const computeDepsClosure = (deps: string[]): DepsClosure => { seenDeps.add(currDep); if (repoPackages.has(currDep)) { repoDepClosure.add(currDep); - - const nextDeps = repoPackageClosures[currDep]; - nextDeps.forEach((dep) => depParents.set(dep, currDep)); - stageDeps.push(...nextDeps); + stageDeps.push(...repoPackageClosures[currDep]); } else { registryDepClosure.add(currDep); const lockfileDeps = lockfileContents[currDep].dependencies ?? {}; const lockfileDepsList = Object.entries(lockfileDeps).map(([packageName, semverPattern]) => `${packageName}@${semverPattern}`); - - const sourcePackage = getSourcePackage(currDep, depParents, repoPackages); - if (!skipTransitiveDepsFor.has(sourcePackage)) { - lockfileDepsList.forEach((dep) => depParents.set(dep, sourcePackage)); - stageDeps.push(...lockfileDepsList); - } + stageDeps.push(...lockfileDepsList); } }); currDeps = stageDeps; From ebb47b31aa75c9521d00fbc4b4f96a487783c480 Mon Sep 17 00:00:00 2001 From: Kevin Shan Date: Thu, 12 Dec 2024 12:36:08 -0800 Subject: [PATCH 08/12] fix: cdk dep fix --- packages/amplify-graphql-api-construct-tests/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/amplify-graphql-api-construct-tests/package.json b/packages/amplify-graphql-api-construct-tests/package.json index 72bf0b75bb..c0e012e72f 100644 --- a/packages/amplify-graphql-api-construct-tests/package.json +++ b/packages/amplify-graphql-api-construct-tests/package.json @@ -25,7 +25,7 @@ "@aws-amplify/auth-construct": "^1.0.0", "@aws-amplify/core": "^2.1.0", "@aws-amplify/graphql-api-construct": "1.18.2", - "@aws-cdk/aws-cognito-identitypool-alpha": "2.152.0-alpha.0", + "@aws-cdk/aws-cognito-identitypool-alpha": "2.168.0-alpha.0", "@aws-sdk/client-cloudformation": "3.624.0", "@aws-sdk/client-appsync": "3.624.0", "@aws-sdk/client-cloudwatch-logs": "3.624.0", From 7d33595e52d527fef49dc545fe3bb7e9d617f458 Mon Sep 17 00:00:00 2001 From: Kevin Shan Date: Thu, 12 Dec 2024 12:54:40 -0800 Subject: [PATCH 09/12] chore: update yarn.lock --- yarn.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yarn.lock b/yarn.lock index a37e734fde..979ef24d1c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -432,10 +432,10 @@ resolved "https://registry.npmjs.org/@aws-cdk/asset-node-proxy-agent-v6/-/asset-node-proxy-agent-v6-2.1.0.tgz#6d3c7860354d4856a7e75375f2f0ecab313b4989" integrity sha512-7bY3J8GCVxLupn/kNmpPc5VJz8grx+4RKfnnJiO1LG+uxkZfANZG3RMHhE+qQxxwkyQ9/MfPtTpf748UhR425A== -"@aws-cdk/aws-cognito-identitypool-alpha@2.152.0-alpha.0": - version "2.152.0-alpha.0" - resolved "https://registry.npmjs.org/@aws-cdk/aws-cognito-identitypool-alpha/-/aws-cognito-identitypool-alpha-2.152.0-alpha.0.tgz#5d29345675171afd1eaa594da59561b38ff0ea9d" - integrity sha512-6KbF4jog139kAARMBNDbbGQYSon+ggG4peQgv3hDFH49l6r6w+SbrW+jFzgfTGhQLDrlQEB4rPh7EW64xxtfVg== +"@aws-cdk/aws-cognito-identitypool-alpha@2.168.0-alpha.0": + version "2.168.0-alpha.0" + resolved "https://registry.npmjs.org/@aws-cdk/aws-cognito-identitypool-alpha/-/aws-cognito-identitypool-alpha-2.168.0-alpha.0.tgz#f17f6ed4833fcd50aedf3f79f1ab9378d9ca262b" + integrity sha512-1O/OZBUsKDQ+SQzrlserR1I+i7lF7ENZTy2IUoNrGGNc1XYLw+2OnLg7PUjsiGhwEkbHqVIGsSHQkT4BZ0qzDg== "@aws-cdk/cfnspec@2.68.0": version "2.68.0" From 9d7624df156023c1314bea96ea65ac029cd21493 Mon Sep 17 00:00:00 2001 From: Kevin Shan Date: Thu, 12 Dec 2024 13:36:02 -0800 Subject: [PATCH 10/12] chore: test dep fix --- .../src/__tests__/admin-role.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/amplify-graphql-api-construct-tests/src/__tests__/admin-role.test.ts b/packages/amplify-graphql-api-construct-tests/src/__tests__/admin-role.test.ts index b697b47f6d..90fffa0541 100644 --- a/packages/amplify-graphql-api-construct-tests/src/__tests__/admin-role.test.ts +++ b/packages/amplify-graphql-api-construct-tests/src/__tests__/admin-role.test.ts @@ -29,10 +29,10 @@ describe('CDK Auth Modes', () => { test('Can be invoked with Admin Roles defined', async () => { const templatePath = path.resolve(path.join(__dirname, 'backends', 'admin-role')); const name = await initCDKProject(projRoot, templatePath, { - cdkVersion: '2.168.0', // Explicitly declaring this, since this version needs to match cognito idp + cdkVersion: '2.158.0', // Explicitly declaring this, since this version needs to match cognito idp additionalDependencies: [ 'esbuild', // required to bundle the lambda function - '@aws-cdk/aws-cognito-identitypool-alpha@2.168.0-alpha.0', // using alpha cognito idp resource for auth config + '@aws-cdk/aws-cognito-identitypool-alpha@2.158.0-alpha.0', // using alpha cognito idp resource for auth config '@aws-crypto/sha256-js', // All remaining deps are required for the lambda to sign the request to appsync '@aws-sdk/credential-provider-node', '@aws-sdk/protocol-http', From c34bd69e875189fb860c76ba3fb9e60273e5e592 Mon Sep 17 00:00:00 2001 From: Kevin Shan Date: Thu, 12 Dec 2024 14:01:51 -0800 Subject: [PATCH 11/12] chore: test deps fix --- packages/amplify-graphql-api-construct-tests/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/amplify-graphql-api-construct-tests/package.json b/packages/amplify-graphql-api-construct-tests/package.json index c0e012e72f..72bf0b75bb 100644 --- a/packages/amplify-graphql-api-construct-tests/package.json +++ b/packages/amplify-graphql-api-construct-tests/package.json @@ -25,7 +25,7 @@ "@aws-amplify/auth-construct": "^1.0.0", "@aws-amplify/core": "^2.1.0", "@aws-amplify/graphql-api-construct": "1.18.2", - "@aws-cdk/aws-cognito-identitypool-alpha": "2.168.0-alpha.0", + "@aws-cdk/aws-cognito-identitypool-alpha": "2.152.0-alpha.0", "@aws-sdk/client-cloudformation": "3.624.0", "@aws-sdk/client-appsync": "3.624.0", "@aws-sdk/client-cloudwatch-logs": "3.624.0", diff --git a/yarn.lock b/yarn.lock index 979ef24d1c..a37e734fde 100644 --- a/yarn.lock +++ b/yarn.lock @@ -432,10 +432,10 @@ resolved "https://registry.npmjs.org/@aws-cdk/asset-node-proxy-agent-v6/-/asset-node-proxy-agent-v6-2.1.0.tgz#6d3c7860354d4856a7e75375f2f0ecab313b4989" integrity sha512-7bY3J8GCVxLupn/kNmpPc5VJz8grx+4RKfnnJiO1LG+uxkZfANZG3RMHhE+qQxxwkyQ9/MfPtTpf748UhR425A== -"@aws-cdk/aws-cognito-identitypool-alpha@2.168.0-alpha.0": - version "2.168.0-alpha.0" - resolved "https://registry.npmjs.org/@aws-cdk/aws-cognito-identitypool-alpha/-/aws-cognito-identitypool-alpha-2.168.0-alpha.0.tgz#f17f6ed4833fcd50aedf3f79f1ab9378d9ca262b" - integrity sha512-1O/OZBUsKDQ+SQzrlserR1I+i7lF7ENZTy2IUoNrGGNc1XYLw+2OnLg7PUjsiGhwEkbHqVIGsSHQkT4BZ0qzDg== +"@aws-cdk/aws-cognito-identitypool-alpha@2.152.0-alpha.0": + version "2.152.0-alpha.0" + resolved "https://registry.npmjs.org/@aws-cdk/aws-cognito-identitypool-alpha/-/aws-cognito-identitypool-alpha-2.152.0-alpha.0.tgz#5d29345675171afd1eaa594da59561b38ff0ea9d" + integrity sha512-6KbF4jog139kAARMBNDbbGQYSon+ggG4peQgv3hDFH49l6r6w+SbrW+jFzgfTGhQLDrlQEB4rPh7EW64xxtfVg== "@aws-cdk/cfnspec@2.68.0": version "2.68.0" From 1bd0519ec15ad837730cd3a84a360c7dfc31bbe3 Mon Sep 17 00:00:00 2001 From: Kevin Shan Date: Fri, 13 Dec 2024 08:59:23 -0800 Subject: [PATCH 12/12] fix: cdk aws-sdk bundling fix --- .../src/__tests__/admin-role.test.ts | 4 ++-- .../src/__tests__/backends/admin-role/app.ts | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/amplify-graphql-api-construct-tests/src/__tests__/admin-role.test.ts b/packages/amplify-graphql-api-construct-tests/src/__tests__/admin-role.test.ts index 90fffa0541..b697b47f6d 100644 --- a/packages/amplify-graphql-api-construct-tests/src/__tests__/admin-role.test.ts +++ b/packages/amplify-graphql-api-construct-tests/src/__tests__/admin-role.test.ts @@ -29,10 +29,10 @@ describe('CDK Auth Modes', () => { test('Can be invoked with Admin Roles defined', async () => { const templatePath = path.resolve(path.join(__dirname, 'backends', 'admin-role')); const name = await initCDKProject(projRoot, templatePath, { - cdkVersion: '2.158.0', // Explicitly declaring this, since this version needs to match cognito idp + cdkVersion: '2.168.0', // Explicitly declaring this, since this version needs to match cognito idp additionalDependencies: [ 'esbuild', // required to bundle the lambda function - '@aws-cdk/aws-cognito-identitypool-alpha@2.158.0-alpha.0', // using alpha cognito idp resource for auth config + '@aws-cdk/aws-cognito-identitypool-alpha@2.168.0-alpha.0', // using alpha cognito idp resource for auth config '@aws-crypto/sha256-js', // All remaining deps are required for the lambda to sign the request to appsync '@aws-sdk/credential-provider-node', '@aws-sdk/protocol-http', diff --git a/packages/amplify-graphql-api-construct-tests/src/__tests__/backends/admin-role/app.ts b/packages/amplify-graphql-api-construct-tests/src/__tests__/backends/admin-role/app.ts index 54d9292764..35ff6c15a7 100644 --- a/packages/amplify-graphql-api-construct-tests/src/__tests__/backends/admin-role/app.ts +++ b/packages/amplify-graphql-api-construct-tests/src/__tests__/backends/admin-role/app.ts @@ -38,6 +38,9 @@ const apiInvoker = new NodejsFunction(stack, 'ApiInvoker', { entry: path.join(__dirname, 'apiInvoker.ts'), runtime: Runtime.NODEJS_18_X, role: executionRole, + bundling: { + nodeModules: ['@smithy/util-utf8'], // Force inclusion + }, }); if (!apiInvoker.role) throw new Error('expected an api invoker role');