diff --git a/.circleci/amplify_init.exp b/.circleci/amplify_init.exp index 0005e0aa76a..5e76d24d053 100644 --- a/.circleci/amplify_init.exp +++ b/.circleci/amplify_init.exp @@ -31,6 +31,6 @@ send -- "$env(AWS_SECRET_ACCESS_KEY)\r" expect -exact "region:" log_user 1; send -- "j\r" -expect "Help improve Amplify CLI by sharing non sensitive configurations on failures" +expect "Help improve Amplify CLI by sharing non-sensitive project configurations on failures" send -- "\r" interact; diff --git a/.circleci/cb-publish-step-1-set-versions.sh b/.circleci/cb-publish-step-1-set-versions.sh new file mode 100755 index 00000000000..7f1dfeeacca --- /dev/null +++ b/.circleci/cb-publish-step-1-set-versions.sh @@ -0,0 +1,38 @@ +#!/bin/bash -e + +git config --global user.name aws-amplify-bot +git config --global user.email aws@amazon.com + +if [[ "$PROJECT_NAME" == "TaggedReleaseWithoutE2E" ]]; then + if [ -z "$NPM_TAG" ]; then + echo "Tag name is missing. Make sure CodeBuild workflow was started with NPM_TAG environment variable" + exit 1 + fi + + if [[ "$BRANCH_NAME" == "main" ]] || [[ "$BRANCH_NAME" == "dev" ]] || [[ "$BRANCH_NAME" == "hotfix" ]] || [[ "$BRANCH_NAME" == "release" ]]; then + echo "You can't use $BRANCH_NAME for tagged release" + exit 1 + fi + + npx lerna version --exact --preid=$NPM_TAG --conventional-commits --conventional-prerelease --yes --no-push --include-merged-tags --message "chore(release): Publish tagged release $NPM_TAG" --no-commit-hooks --force-publish '@aws-amplify/cli-internal' + +# @latest release +elif [[ "$PROJECT_NAME" == "Release" ]]; then + + if [[ "$BRANCH_NAME" != "release" ]]; then + echo "Release must run from release branch. Branch provided was $BRANCH_NAME." + exit 1 + fi + + # create release commit and release tags + npx lerna version --exact --conventional-commits --conventional-graduate --yes --no-push --include-merged-tags --message "chore(release): Publish latest" --no-commit-hooks --force-publish '@aws-amplify/cli-internal' + +# release candidate +elif [[ "$PROJECT_NAME" == "RC" ]]; then + # create release commit and release tags + npx lerna version --preid=rc.$(git rev-parse --short=15 HEAD) --exact --conventional-prerelease --conventional-commits --yes --no-push --include-merged-tags --message "chore(release): Publish rc" --no-commit-hooks --force-publish '@aws-amplify/cli-internal' +# local publish for testing / building binary, dev branch build, e2e tests +else + # create release commit and release tags + npx lerna version --preid=dev.$(git rev-parse HEAD) --exact --conventional-prerelease --conventional-commits --yes --no-push --include-merged-tags --message "chore(release): Publish dev" --no-commit-hooks --force-publish '@aws-amplify/cli-internal' +fi diff --git a/.circleci/publish-step-2-verdaccio.sh b/.circleci/cb-publish-step-2-verdaccio.sh similarity index 76% rename from .circleci/publish-step-2-verdaccio.sh rename to .circleci/cb-publish-step-2-verdaccio.sh index c27881e6d6d..45e2c359b14 100755 --- a/.circleci/publish-step-2-verdaccio.sh +++ b/.circleci/cb-publish-step-2-verdaccio.sh @@ -8,8 +8,15 @@ function lernaPublishExitOnFailure { set -e # run lerna publish with the args that were passed to this function # duplicate stdout to a temp file - # grep the temp file for the lerna err token and return exit 1 if found (-v option inverts grep exit code) - npx lerna publish "$@" | tee /tmp/publish-results && grep -qvz "lerna ERR!" < /tmp/publish-results + npx lerna publish "$@" 2>&1 | tee /tmp/publish-results + # grep the temp file for the lerna err token and return exit 1 + number_of_lerna_errors=$(grep "lerna ERR" /tmp/publish-results | wc -l) + if [[ number_of_lerna_errors -gt 0 ]]; then + echo "Fail! Lerna error." + exit 1; + else + echo "Success! Lerna publish succeeded." + fi } npmRegistryUrl=$(npm get registry) diff --git a/.circleci/publish-step-3-npm.sh b/.circleci/cb-publish-step-3-npm.sh similarity index 58% rename from .circleci/publish-step-3-npm.sh rename to .circleci/cb-publish-step-3-npm.sh index f0f3765c79d..a779aff6c15 100755 --- a/.circleci/publish-step-3-npm.sh +++ b/.circleci/cb-publish-step-3-npm.sh @@ -8,8 +8,15 @@ function lernaPublishExitOnFailure { set -e # run lerna publish with the args that were passed to this function # duplicate stdout to a temp file - # grep the temp file for the lerna err token and return exit 1 if found (-v option inverts grep exit code) - npx lerna publish "$@" | tee /tmp/publish-results && grep -qvz "lerna ERR!" < /tmp/publish-results + npx lerna publish "$@" 2>&1 | tee /tmp/publish-results + # grep the temp file for the lerna err token and return exit 1 + number_of_lerna_errors=$(grep "lerna ERR" /tmp/publish-results | wc -l) + if [[ number_of_lerna_errors -gt 0 ]]; then + echo "Fail! Lerna error." + exit 1; + else + echo "Success! Lerna publish succeeded." + fi } # verifies that binaries are uploaded and available before publishing to NPM @@ -23,22 +30,20 @@ function verifyPkgIsAvailable { # check binaries # send HEAD requests to check for binary presence # curl --fail exits with non-zero code and makes this script fail - curl -I --fail https://package.cli.amplify.aws/$desiredPkgVersion/amplify-pkg-linux-x64.tgz - curl -I --fail https://package.cli.amplify.aws/$desiredPkgVersion/amplify-pkg-linux-arm64.tgz - curl -I --fail https://package.cli.amplify.aws/$desiredPkgVersion/amplify-pkg-macos-x64.tgz - curl -I --fail https://package.cli.amplify.aws/$desiredPkgVersion/amplify-pkg-win-x64.tgz + curl -I --fail https://$PKG_CLI_CLOUDFRONT_URL/$desiredPkgVersion/amplify-pkg-linux-x64.tgz + curl -I --fail https://$PKG_CLI_CLOUDFRONT_URL/$desiredPkgVersion/amplify-pkg-linux-arm64.tgz + curl -I --fail https://$PKG_CLI_CLOUDFRONT_URL/$desiredPkgVersion/amplify-pkg-macos-x64.tgz + curl -I --fail https://$PKG_CLI_CLOUDFRONT_URL/$desiredPkgVersion/amplify-pkg-win-x64.tgz } -if [[ "$CIRCLE_BRANCH" =~ ^tagged-release ]]; then - if [[ "$CIRCLE_BRANCH" =~ ^tagged-release-without-e2e-tests\/.* ]]; then - # Remove tagged-release-without-e2e-tests/ - export NPM_TAG="${CIRCLE_BRANCH/tagged-release-without-e2e-tests\//}" - elif [[ "$CIRCLE_BRANCH" =~ ^tagged-release\/.* ]]; then - # Remove tagged-release/ - export NPM_TAG="${CIRCLE_BRANCH/tagged-release\//}" - fi +if [[ "$PROJECT_NAME" == "TaggedReleaseWithoutE2E" ]]; then if [ -z "$NPM_TAG" ]; then - echo "Tag name is missing. Name your branch with either tagged-release/ or tagged-release-without-e2e-tests/" + echo "Tag name is missing. Make sure CodeBuild workflow was started with NPM_TAG environment variable" + exit 1 + fi + + if [[ "$BRANCH_NAME" == "main" ]] || [[ "$BRANCH_NAME" == "dev" ]] || [[ "$BRANCH_NAME" == "hotfix" ]] || [[ "$BRANCH_NAME" == "release" ]]; then + echo "You can't use $BRANCH_NAME for tagged release" exit 1 fi @@ -49,7 +54,13 @@ if [[ "$CIRCLE_BRANCH" =~ ^tagged-release ]]; then lernaPublishExitOnFailure from-git --yes --no-push --dist-tag=$NPM_TAG # @latest release -elif [[ "$CIRCLE_BRANCH" == "release" ]]; then +elif [[ "$PROJECT_NAME" == "Release" ]]; then + + if [[ "$BRANCH_NAME" != "release" ]]; then + echo "Release must run from release branch. Branch provided was $BRANCH_NAME." + exit 1 + fi + # verify that binary has been uploaded verifyPkgIsAvailable @@ -57,7 +68,7 @@ elif [[ "$CIRCLE_BRANCH" == "release" ]]; then lernaPublishExitOnFailure from-git --yes --no-push # release candidate or local publish for testing / building binary -elif [[ "$CIRCLE_BRANCH" =~ ^run-e2e-with-rc\/.* ]] || [[ "$CIRCLE_BRANCH" =~ ^release_rc\/.* ]]; then +elif [[ "$PROJECT_NAME" == "RC" ]]; then # verify that binary has been uploaded verifyPkgIsAvailable @@ -65,6 +76,6 @@ elif [[ "$CIRCLE_BRANCH" =~ ^run-e2e-with-rc\/.* ]] || [[ "$CIRCLE_BRANCH" =~ ^r # publish versions that were just computed lernaPublishExitOnFailure from-git --yes --no-push --dist-tag rc else - echo "branch name" "$CIRCLE_BRANCH" "did not match any branch publish rules." + echo "Project name" "$PROJECT_NAME" "did not match any publish rules." exit 1 fi diff --git a/.circleci/cb-publish-step-4-push-to-git.sh b/.circleci/cb-publish-step-4-push-to-git.sh new file mode 100755 index 00000000000..08e4172a1a1 --- /dev/null +++ b/.circleci/cb-publish-step-4-push-to-git.sh @@ -0,0 +1,40 @@ +#!/bin/bash -e + +git config --global user.name aws-amplify-bot +git config --global user.email aws@amazon.com + +if [[ "$BRANCH_NAME" == "" ]]; then + echo "BRANCH_NAME must be defined for push to git step." + exit 1 +fi + +if [[ "$PROJECT_NAME" == "TaggedReleaseWithoutE2E" ]] || [[ "$PROJECT_NAME" == "RC" ]]; then + # push release commit + git push origin "$BRANCH_NAME" --no-verify + + # push release tags + git tag --points-at HEAD | xargs git push origin --no-verify + +# @latest release +elif [[ "$PROJECT_NAME" == "Release" ]]; then + # push release commit + git push origin "$BRANCH_NAME" --no-verify + + # push release tags + git tag --points-at HEAD | xargs git push origin --no-verify + + # fast forward main to release + git fetch origin main + git checkout main + git merge release --ff-only + git push origin main --no-verify + + # fast forward hotfix to release + git fetch origin hotfix + git checkout hotfix + git merge release --ff-only + git push origin hotfix --no-verify +else + echo "Project name" "$PROJECT_NAME" "did not match any publish rules." + exit 1 +fi diff --git a/.circleci/codebuild-checkout.sh b/.circleci/codebuild-checkout.sh new file mode 100755 index 00000000000..f83d32cf265 --- /dev/null +++ b/.circleci/codebuild-checkout.sh @@ -0,0 +1,45 @@ +#!/bin/bash -e + +# This script checks out a branch & loads git tags. + +# Get the hash that CodeBuild used to start workflow and use it later to validate that we didn't change it after transformations below. +INITIAL_HEAD_HASH=$(git rev-parse HEAD) + +git status + +echo "PROJECT_NAME=$PROJECT_NAME" +echo "CODEBUILD_SOURCE_VERSION=$CODEBUILD_SOURCE_VERSION" +echo "BRANCH_NAME=$BRANCH_NAME" +echo "CODEBUILD_WEBHOOK_TRIGGER=$CODEBUILD_WEBHOOK_TRIGGER" + +# Codebuild doesn't checkout the branch by default +if [[ "$PROJECT_NAME" == "AmplifyCLI-PR-Testing" ]]; then + # If we're in PR workflow create temporary local branch. + echo "Creating temporary local branch for PR build" + TEMP_BRANCH_NAME=$(cat /proc/sys/kernel/random/uuid) + git checkout -b $TEMP_BRANCH_NAME +elif [[ "$CODEBUILD_WEBHOOK_TRIGGER" == "branch/dev" ]]; then + # We're in E2E workflow triggered after pushing to dev. + echo "Checking out dev" + git checkout dev +elif [[ "$BRANCH_NAME" == "" ]]; then + echo "BRANCH_NAME must be defined for non-PR builds" + exit 1 +else + echo "Checking out $BRANCH_NAME" + git checkout $BRANCH_NAME +fi + +git show --summary + +echo "Fetching tags" +git fetch --all --tags + +# A sanity check that we haven't altered commit we're building from. This must be last section in this script +HEAD_HASH=$(git rev-parse HEAD) +if [[ "$INITIAL_HEAD_HASH" != "$HEAD_HASH" ]]; then + echo "Fail! Detected a drift of commit we attempt to build!" + echo "INITIAL_HEAD_HASH=$INITIAL_HEAD_HASH" + echo "HEAD_HASH=$HEAD_HASH" + exit 1 +fi diff --git a/.circleci/config.base.yml b/.circleci/config.base.yml deleted file mode 100644 index 1c334687f6b..00000000000 --- a/.circleci/config.base.yml +++ /dev/null @@ -1,1469 +0,0 @@ -version: 2.1 -orbs: - aws-ecr: circleci/aws-ecr@6.15.3 -machine: - environment: - PATH: '${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin' - -parameters: - nightly_console_integration_tests: - type: boolean - default: false - setup: - type: boolean - default: true - -executors: - w_medium: &windows-e2e-executor-medium - machine: - image: 'windows-server-2022-gui:current' - resource_class: 'windows.medium' - shell: bash.exe - working_directory: ~/repo - environment: - AMPLIFY_DIR: C:/home/circleci/repo/out - AMPLIFY_PATH: C:/home/circleci/repo/out/amplify.exe - - w_xlarge: &windows-e2e-executor-xlarge - machine: - image: 'windows-server-2022-gui:current' - resource_class: 'windows.xlarge' - shell: bash.exe - working_directory: ~/repo - environment: - AMPLIFY_DIR: C:/home/circleci/repo/out - AMPLIFY_PATH: C:/home/circleci/repo/out/amplify.exe - l_xlarge: &linux-e2e-executor-xlarge - docker: - - image: public.ecr.aws/j4f5f3h7/amplify-cli-e2e-base-image-repo-public:node18 - working_directory: ~/repo - resource_class: xlarge - environment: - AMPLIFY_DIR: /home/circleci/repo/out - AMPLIFY_PATH: /home/circleci/repo/out/amplify-pkg-linux-x64 - # If you update this name, make sure to update it in split-e2e-tests.ts as well - l_large: &linux-e2e-executor-large - docker: - - image: public.ecr.aws/j4f5f3h7/amplify-cli-e2e-base-image-repo-public:node18 - working_directory: ~/repo - resource_class: large - environment: - AMPLIFY_DIR: /home/circleci/repo/out - AMPLIFY_PATH: /home/circleci/repo/out/amplify-pkg-linux-x64 - # If you update this name, make sure to update it in split-e2e-tests.ts as well - l_medium: &linux-e2e-executor-medium - docker: - - image: public.ecr.aws/j4f5f3h7/amplify-cli-e2e-base-image-repo-public:node18 - working_directory: ~/repo - resource_class: medium - environment: - AMPLIFY_DIR: /home/circleci/repo/out - AMPLIFY_PATH: /home/circleci/repo/out/amplify-pkg-linux-x64 - l_small: &linux-e2e-executor-small - docker: - - image: public.ecr.aws/j4f5f3h7/amplify-cli-e2e-base-image-repo-public:latest - working_directory: ~/repo - resource_class: small - environment: - AMPLIFY_DIR: /home/circleci/repo/out - AMPLIFY_PATH: /home/circleci/repo/out/amplify-pkg-linux-x64 - -defaults: &defaults - working_directory: ~/repo - parameters: - os: - type: executor - default: l_medium - executor: << parameters.os >> - -scan_e2e_test_artifacts: &scan_e2e_test_artifacts - name: Scan And Cleanup E2E Test Artifacts - no_output_timeout: 90m - command: | - if ! yarn ts-node .circleci/scan_artifacts.ts; then - echo "Cleaning the repository" - git clean -fdx - exit 1 - fi - when: always - -install_cli_from_local_registry: &install_cli_from_local_registry - name: Start verdaccio, install node CLI and amplify-app - command: | - source .circleci/local_publish_helpers.sh - startLocalRegistry "$(pwd)/.circleci/verdaccio.yaml" - setNpmRegistryUrlToLocal - changeNpmGlobalPath - npm install -g @aws-amplify/cli - npm install -g amplify-app - unsetNpmRegistryUrl - -jobs: - build: - parameters: - os: - type: executor - default: l_xlarge - executor: l_xlarge - steps: - - checkout - - run: yarn --immutable - - run: yarn production-build - - run: - name: Build tests - command: yarn build-tests - - run: - # setting versions in build step so that commit and git tags are cached and available for all steps in pipeline - name: Set versions - command: ./.circleci/publish-step-1-set-versions.sh - - save_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - paths: - - ~/repo - - save_cache: - key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }} - paths: - - ~/.cache - - save_cache: - key: amplify-cli-ssh-deps-{{ .Branch }} - paths: - - ~/.ssh - build_tests_standalone: - parameters: - os: - type: executor - default: l_xlarge - executor: l_xlarge - steps: - - checkout - - run: yarn install --immutable - - run: - name: Build tests - command: yarn build-tests - build_windows_workspace_for_e2e: - parameters: - os: - type: executor - default: w_xlarge - executor: w_xlarge - steps: - - when: - condition: - equal: [*windows-e2e-executor-xlarge, << parameters.os >>] - steps: - - install_node_windows - - checkout - - run: cd scripts && yarn && yarn ts-node remove-pkg-fetch-checksum.ts && cd - - - run: yarn --immutable - - run: yarn production-build - - run: - name: Build tests - command: yarn build-tests - - persist_to_workspace: - root: ~/. - paths: - - repo - - .cache - - .ssh - test: - <<: *linux-e2e-executor-xlarge - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }} - - run: - name: Run tests - command: yarn test-ci - - run: - name: Collect code coverage - command: yarn coverage - environment: - NODE_OPTIONS: --max-old-space-size=5120 - - validate_cdk_version: - <<: *linux-e2e-executor-medium - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }} - - run: - name: Validate cdk version - command: | - yarn ts-node .circleci/validate_cdk_version.ts - - lint: - <<: *linux-e2e-executor-large - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }} - - run: yarn lint-check - - run: yarn lint-check-package-json - - run: yarn prettier-check - environment: - NODE_OPTIONS: --max-old-space-size=5120 - - verify-api-extract: - <<: *linux-e2e-executor-xlarge - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }} - - run: - name: extract api - command: | - yarn verify-api-extract - - verify-yarn-lock: - <<: *linux-e2e-executor-medium - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }} - - run: - name: verify yarn lock - command: | - yarn verify-yarn-lock - - verify-versions-match: - <<: *linux-e2e-executor-medium - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }} - - restore_cache: - key: amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }} - - run: - name: verify versions match - command: | - source .circleci/local_publish_helpers.sh - startLocalRegistry "$(pwd)/.circleci/verdaccio.yaml" - setNpmRegistryUrlToLocal - checkPackageVersionsInLocalNpmRegistry - - mock_e2e_tests: - <<: *linux-e2e-executor-large - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }} - - run: - name: Run Transformer end-to-end tests with mock server - command: | - source .circleci/local_publish_helpers.sh - cd packages/amplify-util-mock/ - yarn e2e - no_output_timeout: 90m - environment: - JEST_JUNIT_OUTPUT: 'reports/junit/js-test-results.xml' - NODE_OPTIONS: --max-old-space-size=4096 - - store_test_results: - path: ~/repo/packages/amplify-util-mock/ - - publish_to_local_registry: - <<: *linux-e2e-executor-large - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }} - - run: - name: Publish to verdaccio - command: | - source .circleci/local_publish_helpers.sh - startLocalRegistry "$(pwd)/.circleci/verdaccio.yaml" - setNpmRegistryUrlToLocal - ./.circleci/publish-step-2-verdaccio.sh - unsetNpmRegistryUrl - - run: - name: Generate unified changelog - command: | - git reset --soft HEAD~1 - yarn ts-node scripts/unified-changelog.ts - cat UNIFIED_CHANGELOG.md - - run: - name: Save new amplify GitHub tag - command: node scripts/echo-current-cli-version.js > .amplify-pkg-version - - save_cache: - key: amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }} - paths: - - ~/verdaccio-cache/ - - save_cache: - key: amplify-unified-changelog-{{ .Branch }}-{{ .Revision }} - paths: - - ~/repo/UNIFIED_CHANGELOG.md - - save_cache: - key: amplfiy-pkg-tag-{{ .Branch }}-{{ .Revision }} - paths: - - ~/repo/.amplify-pkg-version - - upload_pkg_binaries: - <<: *linux-e2e-executor-large - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-pkg-binaries-linux-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-pkg-binaries-macos-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-pkg-binaries-win-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-pkg-binaries-arm-{{ .Branch }}-{{ .Revision }} - - run: - name: Consolidate binaries cache and upload - command: | - source .circleci/local_publish_helpers.sh - uploadPkgCli - - save_cache: - key: amplify-pkg-binaries-{{ .Branch }}-{{ .Revision }} - paths: - - ~/repo/out - - build_pkg_binaries_linux: - <<: *linux-e2e-executor-large - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }} - - restore_cache: - key: amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }} - - run: - name: Start verdaccio and package CLI - command: | - source .circleci/local_publish_helpers.sh - startLocalRegistry "$(pwd)/.circleci/verdaccio.yaml" - setNpmRegistryUrlToLocal - generatePkgCli linux - unsetNpmRegistryUrl - - save_cache: - key: amplify-pkg-binaries-linux-{{ .Branch }}-{{ .Revision }} - paths: - - ~/repo/out - - store_artifacts: - path: ~/repo/out - - build_pkg_binaries_macos: - <<: *linux-e2e-executor-large - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }} - - restore_cache: - key: amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }} - - run: - name: Start verdaccio and package CLI - command: | - source .circleci/local_publish_helpers.sh - startLocalRegistry "$(pwd)/.circleci/verdaccio.yaml" - setNpmRegistryUrlToLocal - generatePkgCli macos - unsetNpmRegistryUrl - - save_cache: - key: amplify-pkg-binaries-macos-{{ .Branch }}-{{ .Revision }} - paths: - - ~/repo/out - - store_artifacts: - path: ~/repo/out - - build_pkg_binaries_win: - <<: *linux-e2e-executor-large - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }} - - restore_cache: - key: amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }} - - run: - name: Start verdaccio and package CLI - command: | - source .circleci/local_publish_helpers.sh - startLocalRegistry "$(pwd)/.circleci/verdaccio.yaml" - setNpmRegistryUrlToLocal - generatePkgCli win - unsetNpmRegistryUrl - - save_cache: - key: amplify-pkg-binaries-win-{{ .Branch }}-{{ .Revision }} - paths: - - ~/repo/out - - store_artifacts: - path: ~/repo/out - - build_pkg_binaries_arm: - <<: *linux-e2e-executor-large - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }} - - restore_cache: - key: amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }} - - run: - name: Start verdaccio and package CLI - command: | - source .circleci/local_publish_helpers.sh - startLocalRegistry "$(pwd)/.circleci/verdaccio.yaml" - setNpmRegistryUrlToLocal - changeNpmGlobalPath - generatePkgCli arm - unsetNpmRegistryUrl - - save_cache: - key: amplify-pkg-binaries-arm-{{ .Branch }}-{{ .Revision }} - paths: - - ~/repo/out - - store_artifacts: - path: ~/repo/out - - verify_pkg_binaries: - <<: *linux-e2e-executor-large - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-pkg-binaries-linux-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-pkg-binaries-macos-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-pkg-binaries-win-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-pkg-binaries-arm-{{ .Branch }}-{{ .Revision }} - - run: - name: Verify packaged CLI - command: | - source .circleci/local_publish_helpers.sh - verifyPkgCli - - amplify_sudo_install_test: - <<: *defaults - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-pkg-binaries-{{ .Branch }}-{{ .Revision }} - - run: - name: Start verdaccio and Install Amplify CLI as sudo - command: | - source .circleci/local_publish_helpers.sh - startLocalRegistry "$(pwd)/.circleci/verdaccio.yaml" - setSudoNpmRegistryUrlToLocal - changeSudoNpmGlobalPath - sudo npm install -g @aws-amplify/cli - unsetSudoNpmRegistryUrl - amplify version - - amplify_install_test: - <<: *defaults - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-pkg-binaries-{{ .Branch }}-{{ .Revision }} - - run: - name: Start verdaccio and Install Amplify CLI - command: | - source .circleci/local_publish_helpers.sh - startLocalRegistry "$(pwd)/.circleci/verdaccio.yaml" - setNpmRegistryUrlToLocal - changeNpmGlobalPath - # limit memory for new processes to 1GB - # this is to make sure that install can work on small VMs - # i.e. not buffer content in memory while installing binary - ulimit -Sv 1000000 - npm install -g @aws-amplify/cli - unsetNpmRegistryUrl - amplify version - - amplify_e2e_tests_pkg: - parameters: - os: - type: executor - default: l_medium - executor: << parameters.os >> - working_directory: ~/repo - steps: - - when: - condition: - equal: [*windows-e2e-executor-medium, << parameters.os >>] - steps: - - install_node_windows - - attach_workspace: - at: ~/. - - run: - name: Git enable long paths - command: git config --global core.longpaths true - - when: - condition: - or: - - equal: [*linux-e2e-executor-large, << parameters.os >>] - - equal: [*linux-e2e-executor-medium, << parameters.os >>] - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }} - - restore_cache: - key: amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-build-artifact-{{ .Revision }} - - restore_cache: - key: amplify-pkg-binaries-{{ .Branch }}-{{ .Revision }} - - rename_binary_for_windows: - os: << parameters.os >> - - install_packaged_cli: - os: << parameters.os >> - - run_e2e_tests: - os: << parameters.os >> - - scan_e2e_test_artifacts: - os: << parameters.os >> - - store_test_results: - path: ~/repo/packages/amplify-e2e-tests/ - - store_artifacts: - path: ~/repo/packages/amplify-e2e-tests/amplify-e2e-reports - - amplify_migration_tests_v8: - parameters: - os: - type: executor - default: l_large - executor: << parameters.os >> - environment: - AMPLIFY_PATH: /home/circleci/.npm-global/bin/amplify - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }} - - restore_cache: - key: amplify-pkg-binaries-{{ .Branch }}-{{ .Revision }} - - run: - name: Run tests migrating from CLI v8.2.0 - command: | - source .circleci/local_publish_helpers.sh - changeNpmGlobalPath - cd packages/amplify-migration-tests - unset IS_AMPLIFY_CI - echo $IS_AMPLIFY_CI - retry yarn migration_v8.2.0 --no-cache --maxWorkers=4 --forceExit $TEST_SUITE - no_output_timeout: 65m - - run: *scan_e2e_test_artifacts - - store_test_results: - path: ~/repo/packages/amplify-migration-tests/ - - store_artifacts: - path: ~/repo/packages/amplify-migration-tests/amplify-migration-reports - working_directory: ~/repo - - amplify_migration_tests_v10: - parameters: - os: - type: executor - default: l_large - executor: << parameters.os >> - environment: - AMPLIFY_PATH: /home/circleci/.amplify/bin/amplify - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }} - - restore_cache: - key: amplify-pkg-binaries-{{ .Branch }}-{{ .Revision }} - - run: - name: Run tests migrating from CLI v10.5.1 - command: | - source .circleci/local_publish_helpers.sh - changeNpmGlobalPath - cd packages/amplify-migration-tests - unset IS_AMPLIFY_CI - echo $IS_AMPLIFY_CI - retry yarn migration_v10.5.1 --no-cache --maxWorkers=4 --forceExit $TEST_SUITE - no_output_timeout: 65m - - run: *scan_e2e_test_artifacts - - store_test_results: - path: ~/repo/packages/amplify-migration-tests/ - - store_artifacts: - path: ~/repo/packages/amplify-migration-tests/amplify-migration-reports - working_directory: ~/repo - - amplify_migration_tests_non_multi_env_layers: - parameters: - os: - type: executor - default: l_large - executor: << parameters.os >> - environment: - AMPLIFY_PATH: /home/circleci/.npm-global/lib/node_modules/@aws-amplify/cli/bin/amplify - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-pkg-binaries-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }} - - run: - name: Run tests migrating from CLI v4.28.2 - command: | - source .circleci/local_publish_helpers.sh - changeNpmGlobalPath - cd packages/amplify-migration-tests - retry yarn migration_v4.28.2_nonmultienv_layers --no-cache --maxWorkers=4 --forceExit $TEST_SUITE - no_output_timeout: 90m - - run: *scan_e2e_test_artifacts - - store_test_results: - path: ~/repo/packages/amplify-migration-tests/ - - store_artifacts: - path: ~/repo/packages/amplify-migration-tests/amplify-migration-reports - working_directory: ~/repo - - amplify_migration_tests_multi_env_layers: - parameters: - os: - type: executor - default: l_large - executor: << parameters.os >> - environment: - AMPLIFY_PATH: /home/circleci/.npm-global/lib/node_modules/@aws-amplify/cli/bin/amplify - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }} - - restore_cache: - key: amplify-pkg-binaries-{{ .Branch }}-{{ .Revision }} - - run: - name: Run tests migrating from CLI v4.52.0 - command: | - source .circleci/local_publish_helpers.sh - changeNpmGlobalPath - cd packages/amplify-migration-tests - retry yarn migration_v4.52.0_multienv_layers --no-cache --maxWorkers=4 --forceExit $TEST_SUITE - no_output_timeout: 90m - - run: *scan_e2e_test_artifacts - - store_test_results: - path: ~/repo/packages/amplify-migration-tests/ - - store_artifacts: - path: ~/repo/packages/amplify-migration-tests/amplify-migration-reports - working_directory: ~/repo - - amplify_general_config_tests: - parameters: - os: - type: executor - default: l_large - executor: << parameters.os >> - environment: - AMPLIFY_PATH: /home/circleci/repo/out/amplify-pkg-linux-x64 - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }} - - restore_cache: - key: amplify-pkg-binaries-{{ .Branch }}-{{ .Revision }} - - run: - name: Run tests using general profile - command: | - source .circleci/local_publish_helpers.sh - cd packages/amplify-e2e-tests - retry yarn general-config-e2e --no-cache --maxWorkers=3 --forceExit $TEST_SUITE - no_output_timeout: 90m - - run: *scan_e2e_test_artifacts - - store_test_results: - path: ~/repo/packages/amplify-e2e-tests/ - - store_artifacts: - path: ~/repo/packages/amplify-e2e-tests/amplify-e2e-reports - working_directory: ~/repo - - amplify_console_integration_tests: - parameters: - os: - type: executor - default: l_large - executor: << parameters.os >> - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }} - - run: *install_cli_from_local_registry - - run: - command: | - echo "export PATH=~/.npm-global/bin:$PATH" >> $BASH_ENV - source $BASH_ENV - source .circleci/local_publish_helpers.sh - amplify -v - cd packages/amplify-console-integration-tests - retry yarn console-integration --no-cache --maxWorkers=4 --forceExit - name: 'Run Amplify Console integration tests' - no_output_timeout: 90m - - run: *scan_e2e_test_artifacts - - store_test_results: - path: ~/repo/packages/amplify-console-integration-tests/ - - store_artifacts: - path: ~/repo/packages/amplify-console-integration-tests/console-integration-reports - working_directory: ~/repo - - integration_test: - working_directory: /home/circleci/repo - resource_class: large - docker: - - image: cypress/base:14.17.0 - environment: - TERM: dumb - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }} - - run: cd .circleci/ && chmod +x aws.sh - - run: - name: Setup Dependencies - command: | - apt-get update - apt-get install -y sudo - sudo apt-get install -y tcl - sudo apt-get install -y expect - sudo apt-get install -y zip - sudo apt-get install -y lsof - sudo apt-get install -y python python-pip libpython-dev - sudo apt-get install -y jq - pip install awscli - - run: expect .circleci/aws_configure.exp - - run: - name: Configure Amplify CLI - command: | - yarn rm-dev-link && yarn link-dev && yarn rm-aa-dev-link && yarn link-aa-dev - echo 'export PATH="$(pwd)/.bin:$PATH"' >> $BASH_ENV - source $BASH_ENV - amplify-dev - - run: - name: Clone auth test package - command: | - cd .. - git clone $AUTH_CLONE_URL - cd aws-amplify-cypress-auth - yarn - yarn add cypress@6.8.0 --save - - run: cd .circleci/ && chmod +x auth.sh - - run: cd .circleci/ && chmod +x amplify_init.sh - - run: cd .circleci/ && chmod +x amplify_init.exp - - run: expect .circleci/amplify_init.exp ../aws-amplify-cypress-auth - - run: expect .circleci/enable_auth.exp - - run: cd ../aws-amplify-cypress-auth - - run: yarn --immutable - - run: cd ../aws-amplify-cypress-auth/src && cat $(find . -type f -name 'aws-exports*') - - run: - name: Start Auth test server in background - command: | - cd ../aws-amplify-cypress-auth - pwd - yarn start - background: true - - run: cat $(find ../repo -type f -name 'auth_spec*') - - run: - name: Run cypress tests for auth - command: | - cd ../aws-amplify-cypress-auth - cp ../repo/cypress.json . - cp -R ../repo/cypress . - yarn cypress run --spec $(find . -type f -name 'auth_spec*') - - run: sudo kill -9 $(lsof -t -i:3000) - - run: cd .circleci/ && chmod +x delete_auth.sh - - run: expect .circleci/delete_auth.exp - - run: - name: Clone API test package - command: | - cd .. - git clone $API_CLONE_URL - cd aws-amplify-cypress-api - yarn - - run: cd .circleci/ && chmod +x api.sh - - run: expect .circleci/amplify_init.exp ../aws-amplify-cypress-api - - run: expect .circleci/enable_api.exp - - run: cd ../aws-amplify-cypress-api - - run: yarn --immutable - - run: cd ../aws-amplify-cypress-api/src && cat $(find . -type f -name 'aws-exports*') - - run: - name: Start API test server in background - command: | - cd ../aws-amplify-cypress-api - pwd - yarn start - background: true - - run: - name: Run cypress tests for api - command: | - cd ../aws-amplify-cypress-api - yarn add cypress@6.8.0 --save - cp ../repo/cypress.json . - cp -R ../repo/cypress . - yarn cypress run --spec $(find . -type f -name 'api_spec*') - - run: cd .circleci/ && chmod +x delete_api.sh - - run: expect .circleci/delete_api.exp - - run: *scan_e2e_test_artifacts - - store_artifacts: - path: ~/aws-amplify-cypress-auth/cypress/videos - - store_artifacts: - path: ~/aws-amplify-cypress-auth/cypress/screenshots - - store_artifacts: - path: ~/aws-amplify-cypress-api/cypress/videos - - store_artifacts: - path: ~/aws-amplify-cypress-api/cypress/screenshots - - publish_to_npm: - <<: *linux-e2e-executor-large - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - keys: - - amplify-cli-ssh-deps-{{ .Branch }} - - restore_cache: - key: amplify-pkg-binaries-{{ .Branch }}-{{ .Revision }} - - run: - name: Authenticate with npm - command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc - - run: - name: Publish Amplify CLI - command: | - bash ./.circleci/publish-step-3-npm.sh - post_publish_push_to_git: - <<: *linux-e2e-executor-large - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - keys: - - amplify-cli-ssh-deps-{{ .Branch }} - - restore_cache: - key: amplify-pkg-binaries-{{ .Branch }}-{{ .Revision }} - - run: - name: Push release commit and tags - command: | - bash ./.circleci/publish-step-4-push-to-git.sh - github_prerelease: - <<: *linux-e2e-executor-large - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-unified-changelog-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-pkg-binaries-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplfiy-pkg-tag-{{ .Branch }}-{{ .Revision }} - - run: - name: Compress binaries - command: | - cd out - mv amplify-pkg-macos-x64 amplify-pkg-macos - mv amplify-pkg-linux-x64 amplify-pkg-linux - mv amplify-pkg-win-x64.exe amplify-pkg-win.exe - tar zcvf amplify-pkg-macos.tgz amplify-pkg-macos - tar zcvf amplify-pkg-linux.tgz amplify-pkg-linux - tar zcvf amplify-pkg-win.exe.tgz amplify-pkg-win.exe - - run: - name: Publish Amplify CLI GitHub prerelease - command: | - commit=$(git rev-parse HEAD) - version=$(cat .amplify-pkg-version) - yarn ts-node scripts/github-prerelease.ts $version $commit - - github_prerelease_install_sanity_check: - <<: *linux-e2e-executor-large - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplfiy-pkg-tag-{{ .Branch }}-{{ .Revision }} - - run: - name: Install packaged Amplify CLI - command: | - version=$(cat .amplify-pkg-version) - curl -sL https://aws-amplify.github.io/amplify-cli/install | version=v$version bash - echo "export PATH=$PATH:$HOME/.amplify/bin" >> $BASH_ENV - - run: - name: Sanity check install - command: | - amplify version - github_release: - <<: *linux-e2e-executor-large - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-pkg-binaries-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplfiy-pkg-tag-{{ .Branch }}-{{ .Revision }} - - run: - name: Publish Amplify CLI GitHub release - command: | - commit=$(git rev-parse HEAD) - version=$(cat .amplify-pkg-version) - yarn ts-node scripts/github-release.ts $version $commit - npm_rollback_access: - <<: *linux-e2e-executor-large - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - keys: - - amplify-cli-ssh-deps-{{ .Branch }} - - restore_cache: - key: amplify-pkg-binaries-{{ .Branch }}-{{ .Revision }} - - run: - name: Authenticate with npm - command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc - cleanup_resources: - <<: *linux-e2e-executor-large - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }} - - run: - name: 'Run cleanup script' - command: | - cd packages/amplify-e2e-tests - yarn clean-e2e-resources - no_output_timeout: 90m - - run: *scan_e2e_test_artifacts - - store_artifacts: - path: ~/repo/packages/amplify-e2e-tests/amplify-e2e-reports - working_directory: ~/repo - - trigger_e2e_workflow_cleanup: - <<: *linux-e2e-executor-medium - steps: - - run: - name: 'Trigger Cleanup for this Workflow' - command: | - echo "Triggering cleanup for Workflow $CIRCLE_WORKFLOW_ID" - curl --request POST \ - --url https://circleci.com/api/v2/project/gh/aws-amplify/amplify-cli/pipeline \ - --header "Circle-Token: $AMPLIFY_CLI_CIRCLECI_TRIGGER_TOKEN" \ - --header "content-type: application/json" \ - --data '{"branch":"'$CIRCLE_BRANCH'","parameters":{"e2e_workflow_cleanup":true,"setup":false,"e2e_workflow_cleanup_workflow_id":"'$CIRCLE_WORKFLOW_ID'"}}' - - wait_for_all: - <<: *linux-e2e-executor-small - steps: - - restore_cache: - key: amplify-cli-repo-{{ .Branch }}-{{ .Revision }} - - restore_cache: - key: amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }} - - run: - name: 'Wait for all required jobs to finish' - command: | - while [[ $(curl --location --request GET "https://circleci.com/api/v2/workflow/$CIRCLE_WORKFLOW_ID/job" --header "Circle-Token: $CIRCLECI_TOKEN"| jq -r '.items[]|select(.name != "wait_for_all")|.status' | grep -c "running") -gt 0 ]] - do - sleep 60 - done - no_output_timeout: 180m - - run: - name: 'Collect Results' - command: yarn workflow-results - - run: *scan_e2e_test_artifacts - - store_artifacts: - path: ~/repo/artifacts - - working_directory: ~/repo - -workflows: - version: 3 - build_test_deploy_v3: - jobs: - - build: - filters: - branches: - ignore: - - beta - - build_tests_standalone - - build_windows_workspace_for_e2e: - filters: - branches: - only: - - dev - - /run-e2e-with-rc\/.*/ - - /tagged-release\/.*/ - - /run-e2e\/.*/ - - lint: - requires: - - build - filters: - branches: - ignore: - - beta - - release - - /release_rc\/.*/ - - /run-e2e\/.*/ - - verify-api-extract: - requires: - - build - filters: - branches: - ignore: - - beta - - release - - /release_rc\/.*/ - - /tagged-release-without-e2e-tests\/.*/ - - verify-yarn-lock: - requires: - - build - - verify-versions-match: - requires: - - publish_to_local_registry - - test: - requires: - - build - filters: - branches: - ignore: - - beta - - release - - /release_rc\/.*/ - - /tagged-release-without-e2e-tests\/.*/ - - validate_cdk_version: - requires: - - build - - mock_e2e_tests: - requires: - - build - filters: - branches: - ignore: - - beta - - release - - /tagged-release-without-e2e-tests\/.*/ - - integration_test: - context: - - e2e-test-context - filters: - branches: - only: - - dev - - /run-e2e-with-rc\/.*/ - - /tagged-release\/.*/ - - /run-e2e\/.*/ - requires: - - build - - publish_to_local_registry: - requires: - - build - - upload_pkg_binaries: - filters: - branches: - only: - - dev - - release - - /release_rc\/.*/ - - /run-e2e-with-rc\/.*/ - - /tagged-release\/.*/ - - /tagged-release-without-e2e-tests\/.*/ - - /run-e2e\/.*/ - context: - - e2e-auth-credentials - - e2e-test-context - - amplify-s3-upload - requires: - - build_pkg_binaries_linux - - build_pkg_binaries_macos - - build_pkg_binaries_win - - build_pkg_binaries_arm - - build_pkg_binaries_linux: - requires: - - publish_to_local_registry - - build_pkg_binaries_macos: - requires: - - publish_to_local_registry - - build_pkg_binaries_win: - requires: - - publish_to_local_registry - - build_pkg_binaries_arm: - requires: - - publish_to_local_registry - - verify_pkg_binaries: - requires: - - build_pkg_binaries_linux - - build_pkg_binaries_macos - - build_pkg_binaries_win - - build_pkg_binaries_arm - - amplify_sudo_install_test: - context: amplify-ecr-image-pull - requires: - - upload_pkg_binaries - filters: - branches: - only: - - dev - - /run-e2e-with-rc\/.*/ - - /tagged-release\/.*/ - - /run-e2e\/.*/ - - amplify_install_test: - context: amplify-ecr-image-pull - requires: - - upload_pkg_binaries - filters: - branches: - only: - - dev - - /run-e2e-with-rc\/.*/ - - /tagged-release\/.*/ - - /run-e2e\/.*/ - - cleanup_resources: - context: - - cleanup-resources - - e2e-test-context - requires: - - build - filters: - branches: - only: - - dev - - /tagged-release\/.*/ - - /run-e2e\/.*/ - - amplify_e2e_tests_pkg: - context: - - cleanup-resources - - e2e-auth-credentials - - e2e-test-context - filters: - branches: - only: - - dev - - /run-e2e-with-rc\/.*/ - - /tagged-release\/.*/ - - /run-e2e\/.*/ - requires: - - upload_pkg_binaries - - build_windows_workspace_for_e2e - - amplify_migration_tests_v10: - context: - - e2e-auth-credentials - - cleanup-resources - - e2e-test-context - filters: - branches: - only: - - dev - - /run-e2e-with-rc\/.*/ - - /tagged-release\/.*/ - - /run-e2e\/.*/ - requires: - - upload_pkg_binaries - - amplify_migration_tests_v8: - context: - - e2e-auth-credentials - - cleanup-resources - - e2e-test-context - filters: - branches: - only: - - dev - - /run-e2e-with-rc\/.*/ - - /tagged-release\/.*/ - - /run-e2e\/.*/ - requires: - - upload_pkg_binaries - - amplify_migration_tests_non_multi_env_layers: - context: - - e2e-auth-credentials - - cleanup-resources - - e2e-test-context - filters: - branches: - only: - - dev - - /run-e2e-with-rc\/.*/ - - /tagged-release\/.*/ - - /run-e2e\/.*/ - requires: - - upload_pkg_binaries - - amplify_migration_tests_multi_env_layers: - context: - - e2e-auth-credentials - - cleanup-resources - - e2e-test-context - filters: - branches: - only: - - dev - - /run-e2e-with-rc\/.*/ - - /tagged-release\/.*/ - - /run-e2e\/.*/ - requires: - - upload_pkg_binaries - - amplify_general_config_tests: - context: - - e2e-auth-credentials - - cleanup-resources - - e2e-test-context - filters: - branches: - only: - - dev - - /run-e2e-with-rc\/.*/ - - /tagged-release\/.*/ - - /run-e2e\/.*/ - requires: - - upload_pkg_binaries - - amplify_console_integration_tests: - context: - - e2e-auth-credentials - - cleanup-resources - - console-e2e-test - - e2e-test-context - filters: - branches: - only: - - dev - - /run-e2e-with-rc\/.*/ - - /tagged-release\/.*/ - - /run-e2e\/.*/ - requires: - - upload_pkg_binaries - - github_prerelease: - context: github-publish - requires: - - upload_pkg_binaries - filters: - branches: - only: - - release - - github_prerelease_install_sanity_check: - requires: - - github_prerelease - filters: - branches: - only: - - release - - wait_for_all: - context: - - cleanup-resources - - e2e-test-context - requires: - - build - filters: - branches: - only: - - dev - - /run-e2e-with-rc\/.*/ - - /tagged-release\/.*/ - - /run-e2e\/.*/ - - - trigger_e2e_workflow_cleanup: - context: - - cleanup-resources - - e2e-test-context - requires: - - wait_for_all - filters: - branches: - only: - - dev - - /run-e2e-with-rc\/.*/ - - /tagged-release\/.*/ - - /run-e2e\/.*/ - - - publish_to_npm: - context: - - npm-publish - requires: - - test - - mock_e2e_tests - - integration_test - - amplify_e2e_tests_pkg - - amplify_sudo_install_test - - amplify_install_test - - amplify_console_integration_tests - - amplify_migration_tests_v10 - - amplify_migration_tests_v8 - - amplify_migration_tests_non_multi_env_layers - - amplify_migration_tests_multi_env_layers - - github_prerelease_install_sanity_check - - upload_pkg_binaries - - verify-versions-match - filters: - branches: - only: - - release - - /release_rc\/.*/ - - /run-e2e-with-rc\/.*/ - - /tagged-release\/.*/ - - /tagged-release-without-e2e-tests\/.*/ - - npm_rollback_access: - context: - - npm-publish - requires: - - upload_pkg_binaries - - verify-versions-match - filters: - branches: - only: - - release - - post_publish_push_to_git: - requires: - - publish_to_npm - filters: - branches: - only: - - release - - /release_rc\/.*/ - - /run-e2e-with-rc\/.*/ - - /tagged-release\/.*/ - - /tagged-release-without-e2e-tests\/.*/ - - github_release: - context: github-publish - requires: - - post_publish_push_to_git - filters: - branches: - only: - - release - -commands: - install_packaged_cli: - description: 'Install Amplify Packaged CLI to PATH' - parameters: - os: - type: executor - default: l_large - steps: - - when: - condition: - equal: [*windows-e2e-executor-medium, << parameters.os >>] - steps: - - run: - shell: powershell.exe - name: Rename the Packaged CLI to amplify - command: | - # rename the command to amplify - cd /home/circleci/repo/out - cp amplify-pkg-win-x64.exe amplify.exe - - run: - shell: powershell.exe - name: Move to CLI Binary to already existing PATH - command: | - # This is a Hack to make sure the Amplify CLI is in the PATH - cp /home/circleci/repo/out/amplify.exe $env:homedrive\$env:homepath\AppData\Local\Microsoft\WindowsApps - - run: - name: Confirm Amplify CLI is installed and available in PATH - command: amplify version - - - when: - condition: - or: - - equal: [*linux-e2e-executor-large, << parameters.os >>] - - equal: [*linux-e2e-executor-medium, << parameters.os >>] - steps: - - run: - name: Symlink Amplify packaged CLI - command: | - cd out - ln -sf amplify-pkg-linux-x64 amplify - echo "export PATH=$AMPLIFY_DIR:$PATH:/home/circleci/repo/node_modules/.bin/" >> $BASH_ENV - source $BASH_ENV - - run: - name: Confirm Amplify CLI is installed and available in PATH - command: amplify version - - rename_binary_for_windows: - description: 'Rename binary for windows' - parameters: - os: - type: executor - default: w_medium - steps: - - when: - condition: - equal: [*windows-e2e-executor-medium, << parameters.os >>] - steps: - - run: - shell: powershell.exe - command: cp /home/circleci/repo/out/amplify-pkg-win-x64.exe $env:homedrive\$env:homepath\AppData\Local\Microsoft\WindowsApps\amplify.exe - run_e2e_tests: - description: 'Run Amplify E2E tests' - parameters: - os: - type: executor - default: l_medium - steps: - - when: - condition: - equal: [*windows-e2e-executor-medium, << parameters.os >>] - steps: - - run: - name: Run E2e Tests - shell: bash.exe - command: | - source .circleci/local_publish_helpers.sh - source $BASH_ENV - amplify version - cd packages/amplify-e2e-tests - retry runE2eTest - no_output_timeout: 65m - - when: - condition: - or: - - equal: [*linux-e2e-executor-large, << parameters.os >>] - - equal: [*linux-e2e-executor-medium, << parameters.os >>] - steps: - - run: - name: Run E2e Tests - command: | - source .circleci/local_publish_helpers.sh - startLocalRegistry "$(pwd)/.circleci/verdaccio.yaml" - setNpmRegistryUrlToLocal - changeNpmGlobalPath - source $BASH_ENV - amplify version - cd packages/amplify-e2e-tests - retry runE2eTest - no_output_timeout: 65m - scan_e2e_test_artifacts: - description: 'Scan And Cleanup E2E Test Artifacts' - parameters: - os: - type: executor - default: l_large - steps: - - run: - name: Scan E2E artifacts - no_output_timeout: 2m - command: | - if ! yarn ts-node .circleci/scan_artifacts.ts; then - echo "Cleaning the repository" - git clean -fdx - exit 1 - fi - when: always - install_node_windows: - description: Install Node 18 on Windows - steps: - - run: - name: Install Node 18 - command: | - nvm version - nvm install 18.15.0 - nvm use 18.15.0 - nvm ls - - run: - name: Check Node, install yarn - command: | - node --version - npm --version - npm install -g yarn - yarn --version diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index d604dbc8b66..00000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,268 +0,0 @@ -version: 2.1 - -# this allows you to use CircleCI's dynamic configuration feature -setup: true - -# the continuation orb is required in order to use dynamic configuration -orbs: - continuation: circleci/continuation@0.1.2 - -parameters: - nightly_console_integration_tests: - type: boolean - default: false - e2e_resource_cleanup: - type: boolean - default: false - e2e_workflow_cleanup: - type: boolean - default: false - e2e_workflow_cleanup_workflow_id: - type: string - default: '' - setup: - type: boolean - default: true - -executors: - l_large: &linux-e2e-executor-large - docker: - - image: public.ecr.aws/j4f5f3h7/amplify-cli-e2e-base-image-repo-public:node18 - working_directory: ~/repo - resource_class: large - environment: - AMPLIFY_DIR: /home/circleci/repo/out - AMPLIFY_PATH: /home/circleci/repo/out/amplify-pkg-linux-x64 - l_xlarge: &linux-e2e-executor-xlarge - docker: - - image: public.ecr.aws/j4f5f3h7/amplify-cli-e2e-base-image-repo-public:node18 - working_directory: ~/repo - resource_class: xlarge - environment: - AMPLIFY_DIR: /home/circleci/repo/out - AMPLIFY_PATH: /home/circleci/repo/out/amplify-pkg-linux-x64 - -# our defined job, and its steps -jobs: - setup: - executor: 'l_large' - steps: - - checkout # checkout code - - run: # run a command - name: Generate config - command: | - cd scripts - yarn - yarn split-e2e-tests - - continuation/continue: - configuration_path: .circleci/generated_config.yml # use newly generated config to continue - build: - parameters: - os: - type: executor - default: l_xlarge - executor: << parameters.os >> - steps: - - checkout - - restore_cache: - key: >- - amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }} - - run: yarn --immutable - - run: yarn production-build - - save_cache: - key: >- - amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }} - paths: - - ~/.cache - - save_cache: - key: amplify-cli-ssh-deps-{{ .Branch }} - paths: - - ~/.ssh - - when: - condition: - equal: - - docker: - - image: >- - public.ecr.aws/j4f5f3h7/amplify-cli-e2e-base-image-repo-public:node18 - working_directory: ~/repo - resource_class: xlarge - environment: - AMPLIFY_DIR: /home/circleci/repo/out - AMPLIFY_PATH: /home/circleci/repo/out/amplify-pkg-linux-x64 - - << parameters.os >> - steps: - - persist_to_workspace: - root: . - paths: . - publish_to_local_registry: - docker: - - image: public.ecr.aws/j4f5f3h7/amplify-cli-e2e-base-image-repo-public:node18 - working_directory: ~/repo - resource_class: large - environment: - AMPLIFY_DIR: /home/circleci/repo/out - AMPLIFY_PATH: /home/circleci/repo/out/amplify-pkg-linux-x64 - steps: - - attach_workspace: - at: ./ - - restore_cache: - key: >- - amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }} - - run: - name: Publish to verdaccio - command: | - source .circleci/local_publish_helpers.sh - startLocalRegistry "$(pwd)/.circleci/verdaccio.yaml" - setNpmRegistryUrlToLocal - git config user.email not@used.com - git config user.name "Doesnt Matter" - yarn publish-to-verdaccio - unsetNpmRegistryUrl - - run: - name: Generate unified changelog - command: | - git reset --hard HEAD - yarn update-versions - yarn ts-node scripts/unified-changelog.ts - - run: - name: Save new amplify GitHub tag - command: node scripts/echo-current-cli-version.js > .amplify-pkg-version - - save_cache: - key: amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }} - paths: - - ~/verdaccio-cache/ - - save_cache: - key: amplify-unified-changelog-{{ .Branch }}-{{ .Revision }} - paths: - - ~/repo/UNIFIED_CHANGELOG.md - - save_cache: - key: amplfiy-pkg-tag-{{ .Branch }}-{{ .Revision }} - paths: - - ~/repo/.amplify-pkg-version - amplify_console_integration_tests: - working_directory: ~/repo - parameters: - os: - type: executor - default: l_large - executor: << parameters.os >> - steps: - - attach_workspace: - at: ./ - - restore_cache: - key: amplify-verdaccio-cache-{{ .Branch }}-{{ .Revision }} - - run: - name: Start verdaccio, install node CLI and amplify-app - command: | - source .circleci/local_publish_helpers.sh - startLocalRegistry "$(pwd)/.circleci/verdaccio.yaml" - setNpmRegistryUrlToLocal - changeNpmGlobalPath - npm install -g @aws-amplify/cli - npm install -g amplify-app - unsetNpmRegistryUrl - - run: - command: | - echo "export PATH=~/.npm-global/bin:$PATH" >> $BASH_ENV - source $BASH_ENV - source .circleci/local_publish_helpers.sh - amplify -v - cd packages/amplify-console-integration-tests - retry yarn console-integration --no-cache --maxWorkers=4 - name: Run Amplify Console integration tests - no_output_timeout: 90m - - run: - name: Scan And Cleanup E2E Test Artifacts - command: | - if ! yarn ts-node .circleci/scan_artifacts.ts; then - echo "Cleaning the repository" - git clean -fdx - exit 1 - fi - when: always - - store_test_results: - path: packages/amplify-console-integration-tests/ - - store_artifacts: - path: >- - ~/repo/packages/amplify-console-integration-tests/console-integration-reports - cleanup_resources: - docker: - - image: public.ecr.aws/j4f5f3h7/amplify-cli-e2e-base-image-repo-public:node18 - working_directory: ~/repo - resource_class: large - environment: - AMPLIFY_DIR: /home/circleci/repo/out - AMPLIFY_PATH: /home/circleci/repo/out/amplify-pkg-linux-x64 - steps: - - attach_workspace: - at: ./ - - restore_cache: - key: >- - amplify-cli-yarn-deps-{{ .Branch }}-{{ checksum "yarn.lock" }} - - when: - condition: - equal: [true, << pipeline.parameters.e2e_workflow_cleanup >>] - steps: - - run: - name: Run cleanup script for specific workflow - command: | - echo "Cleaning up for Workflow << pipeline.parameters.e2e_workflow_cleanup_workflow_id >>" - cd packages/amplify-e2e-tests - yarn clean-e2e-resources workflow << pipeline.parameters.e2e_workflow_cleanup_workflow_id >> - no_output_timeout: 90m - - when: - condition: - equal: [true, << pipeline.parameters.e2e_resource_cleanup >>] - steps: - - run: - name: Run cleanup script - command: | - cd packages/amplify-e2e-tests - yarn clean-e2e-resources - no_output_timeout: 90m - - run: - name: Scan And Cleanup E2E Test Artifacts - command: | - if ! yarn ts-node .circleci/scan_artifacts.ts; then - echo "Cleaning the repository" - git clean -fdx - exit 1 - fi - when: always - - store_artifacts: - path: ~/repo/packages/amplify-e2e-tests/amplify-e2e-reports - -# our single workflow, that triggers the setup job defined above -workflows: - setup: - when: << pipeline.parameters.setup >> - jobs: - - setup - nightly_console_integration_tests: - when: << pipeline.parameters.nightly_console_integration_tests >> - jobs: - - build - - publish_to_local_registry: - requires: - - build - - amplify_console_integration_tests: - context: - - console-e2e-test - - e2e-auth-credentials - - e2e-test-context - requires: - - build - - publish_to_local_registry - e2e_resource_cleanup: - when: - or: - - equal: [true, << pipeline.parameters.e2e_resource_cleanup >>] - - equal: [true, << pipeline.parameters.e2e_workflow_cleanup >>] - jobs: - - build - - cleanup_resources: - context: - - cleanup-resources - - e2e-test-context - requires: - - build diff --git a/.circleci/local_publish_helpers.sh b/.circleci/local_publish_helpers_codebuild.sh similarity index 74% rename from .circleci/local_publish_helpers.sh rename to .circleci/local_publish_helpers_codebuild.sh index 3017ae6aeda..1ca8b1e68f9 100644 --- a/.circleci/local_publish_helpers.sh +++ b/.circleci/local_publish_helpers_codebuild.sh @@ -23,42 +23,37 @@ function startLocalRegistry { done } -function uploadPkgCli { - aws configure --profile=s3-uploader set aws_access_key_id $S3_ACCESS_KEY - aws configure --profile=s3-uploader set aws_secret_access_key $S3_SECRET_ACCESS_KEY - aws configure --profile=s3-uploader set aws_session_token $S3_AWS_SESSION_TOKEN +function uploadPkgCliCodeBuild { + # fail and exit if any command fails + set -e + cd out/ - export hash=$(git rev-parse HEAD | cut -c 1-12) export version=$(./amplify-pkg-linux-x64 --version) - if [[ "$CIRCLE_BRANCH" == "release" ]] || [[ "$CIRCLE_BRANCH" =~ ^run-e2e-with-rc\/.* ]] || [[ "$CIRCLE_BRANCH" =~ ^release_rc\/.* ]] || [[ "$CIRCLE_BRANCH" =~ ^tagged-release ]]; then - aws --profile=s3-uploader s3 cp amplify-pkg-win-x64.tgz s3://aws-amplify-cli-do-not-delete/$(echo $version)/amplify-pkg-win-x64-$(echo $hash).tgz - aws --profile=s3-uploader s3 cp amplify-pkg-macos-x64.tgz s3://aws-amplify-cli-do-not-delete/$(echo $version)/amplify-pkg-macos-x64-$(echo $hash).tgz - aws --profile=s3-uploader s3 cp amplify-pkg-linux-arm64.tgz s3://aws-amplify-cli-do-not-delete/$(echo $version)/amplify-pkg-linux-arm64-$(echo $hash).tgz - aws --profile=s3-uploader s3 cp amplify-pkg-linux-x64.tgz s3://aws-amplify-cli-do-not-delete/$(echo $version)/amplify-pkg-linux-x64-$(echo $hash).tgz - - ALREADY_EXISTING_FILES="$(set -o pipefail && aws --profile=s3-uploader s3 ls s3://aws-amplify-cli-do-not-delete/$(echo $version)/amplify-pkg-linux-x64 | ( egrep -v "amplify-pkg-linux-x64-.*" || true ) | wc -l | xargs)" - INCORRECT_PERMISSIONS=$? - - if [ INCORRECT_PERMISSIONS -ne "0" ]; then - echo "Insufficient permissions to list s3://aws-amplify-cli-do-not-delete/$(echo $version)/amplify-pkg-linux-x64" - exit 1 - fi - - if [ ALREADY_EXISTING_FILES -ne "0" ]; then - echo "Cannot overwrite existing file at s3://aws-amplify-cli-do-not-delete/$(echo $version)/amplify-pkg-linux-x64.tgz" - exit 1 - fi - - aws --profile=s3-uploader s3 cp amplify-pkg-win-x64.tgz s3://aws-amplify-cli-do-not-delete/$(echo $version)/amplify-pkg-win-x64.tgz - aws --profile=s3-uploader s3 cp amplify-pkg-macos-x64.tgz s3://aws-amplify-cli-do-not-delete/$(echo $version)/amplify-pkg-macos-x64.tgz - aws --profile=s3-uploader s3 cp amplify-pkg-linux-arm64.tgz s3://aws-amplify-cli-do-not-delete/$(echo $version)/amplify-pkg-linux-arm64.tgz - aws --profile=s3-uploader s3 cp amplify-pkg-linux-x64.tgz s3://aws-amplify-cli-do-not-delete/$(echo $version)/amplify-pkg-linux-x64.tgz - - else - aws --profile=s3-uploader s3 cp amplify-pkg-linux-x64.tgz s3://aws-amplify-cli-do-not-delete/$(echo $version)/amplify-pkg-linux-x64-$(echo $hash).tgz + # validate that version is uploaded in right build + if [[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + if [[ "$PROJECT_NAME" != "Release" ]]; then + echo "Invalid project name $PROJECT_NAME for $version release." + exit 1 + fi + elif [[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+-rc\. ]]; then + if [[ "$PROJECT_NAME" != "RC" ]]; then + echo "Invalid project name $PROJECT_NAME for $version RC release." + exit 1 + fi + elif [[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+-$ ]]; then + echo "Version $version is missing a tag"; + exit 1 fi + # It's ok to re-upload binaries for the same build to make this step idempotent + # Versioning is handled by cb-publish-step-1-set-versions script + # Version conflicts are caught at cb-publish-step-2-verdaccio script + aws s3 cp amplify-pkg-win-x64.tgz s3://$PKG_CLI_BUCKET_NAME/$(echo $version)/amplify-pkg-win-x64.tgz + aws s3 cp amplify-pkg-macos-x64.tgz s3://$PKG_CLI_BUCKET_NAME/$(echo $version)/amplify-pkg-macos-x64.tgz + aws s3 cp amplify-pkg-linux-arm64.tgz s3://$PKG_CLI_BUCKET_NAME/$(echo $version)/amplify-pkg-linux-arm64.tgz + aws s3 cp amplify-pkg-linux-x64.tgz s3://$PKG_CLI_BUCKET_NAME/$(echo $version)/amplify-pkg-linux-x64.tgz + cd .. } @@ -144,10 +139,10 @@ function verifyPkgCli { fi } - verifySinglePkg "amplify-pkg-linux-x64" "amplify-pkg-linux-x64.tgz" $((700 * 1024 * 1024)) - verifySinglePkg "amplify-pkg-macos-x64" "amplify-pkg-macos-x64.tgz" $((700 * 1024 * 1024)) - verifySinglePkg "amplify-pkg-win-x64.exe" "amplify-pkg-win-x64.tgz" $((700 * 1024 * 1024)) - verifySinglePkg "amplify-pkg-linux-arm64" "amplify-pkg-linux-arm64.tgz" $((550 * 1024 * 1024)) + verifySinglePkg "amplify-pkg-linux-x64" "amplify-pkg-linux-x64.tgz" $((900 * 1024 * 1024)) + verifySinglePkg "amplify-pkg-macos-x64" "amplify-pkg-macos-x64.tgz" $((900 * 1024 * 1024)) + verifySinglePkg "amplify-pkg-win-x64.exe" "amplify-pkg-win-x64.tgz" $((890 * 1024 * 1024)) + verifySinglePkg "amplify-pkg-linux-arm64" "amplify-pkg-linux-arm64.tgz" $((750 * 1024 * 1024)) } function unsetNpmRegistryUrl { @@ -236,7 +231,8 @@ function retry { resetAwsAccountCredentials TEST_SUITE=${TEST_SUITE:-"TestSuiteNotSet"} - aws cloudwatch put-metric-data --metric-name FlakyE2ETests --namespace amplify-cli-e2e-tests --unit Count --value $n --dimensions testFile=$TEST_SUITE + # if a test takes a long time to complete, the token may expire before reaching this call, but we should still allow the test to pass + aws cloudwatch put-metric-data --metric-name FlakyE2ETests --namespace amplify-cli-e2e-tests --unit Count --value $n --dimensions testFile=$TEST_SUITE || true echo "Attempt $n succeeded." exit 0 # don't fail the step if putting the metric fails } @@ -277,17 +273,6 @@ function setAwsAccountCredentials { useChildAccountCredentials fi } -function runE2eTest { - FAILED_TEST_REGEX_FILE="./amplify-e2e-reports/amplify-e2e-failed-test.txt" - - if [ -f $FAILED_TEST_REGEX_FILE ]; then - # read the content of failed tests - failedTests=$(<$FAILED_TEST_REGEX_FILE) - yarn e2e --forceExit --no-cache --maxWorkers=4 $TEST_SUITE -t "$failedTests" - else - yarn e2e --forceExit --no-cache --maxWorkers=4 $TEST_SUITE - fi -} function runE2eTestCb { _setupCoverage @@ -296,9 +281,19 @@ function runE2eTestCb { if [ -f $FAILED_TEST_REGEX_FILE ]; then # read the content of failed tests failedTests=$(<$FAILED_TEST_REGEX_FILE) - NODE_V8_COVERAGE=$E2E_TEST_COVERAGE_DIR yarn e2e --forceExit --no-cache --maxWorkers=4 $TEST_SUITE -t "$failedTests" + if [[ ! -z "$DISABLE_COVERAGE" ]]; then + echo Running WITHOUT coverage + yarn e2e --forceExit --no-cache --maxWorkers=4 $TEST_SUITE -t "$failedTests" + else + NODE_V8_COVERAGE=$E2E_TEST_COVERAGE_DIR yarn e2e --forceExit --no-cache --maxWorkers=4 $TEST_SUITE -t "$failedTests" + fi else - NODE_V8_COVERAGE=$E2E_TEST_COVERAGE_DIR yarn e2e --forceExit --no-cache --maxWorkers=4 $TEST_SUITE + if [[ ! -z "$DISABLE_COVERAGE" ]]; then + echo Running WITHOUT coverage + yarn e2e --forceExit --no-cache --maxWorkers=4 $TEST_SUITE + else + NODE_V8_COVERAGE=$E2E_TEST_COVERAGE_DIR yarn e2e --forceExit --no-cache --maxWorkers=4 $TEST_SUITE + fi fi } @@ -328,7 +323,7 @@ function checkPackageVersionsInLocalNpmRegistry { if [[ $cli_internal_version != $cli_version ]]; then echo "Versions did not match." - echo "Manual fix: add a proper conventional commit that touches the amplify-cli-npm package to correct its version bump. For example https://github.com/aws-amplify/amplify-cli/commit/6f14792d1db424aa428ec4836fed7d6dd5cccfd0" + echo "Manual fix: add a proper conventional commit that touches the amplify-cli-npm package to correct its version bump. For example https://github.com/aws-amplify/amplify-cli/pull/13759/commits/15dcd96feae925ff26ca51abfb4a0477890af745" exit 1 else echo "Versions matched." diff --git a/.circleci/publish-codebuild.sh b/.circleci/publish-codebuild.sh deleted file mode 100755 index ac9464cbf6a..00000000000 --- a/.circleci/publish-codebuild.sh +++ /dev/null @@ -1,157 +0,0 @@ -#!/bin/bash -e -export BRANCH_NAME="$(git symbolic-ref HEAD --short 2>/dev/null)" -if [ "$BRANCH_NAME" = "" ] ; then - BRANCH_NAME="$(git rev-parse HEAD | xargs git name-rev | cut -d' ' -f2 | sed 's/remotes\/origin\///g')"; -fi -git checkout $BRANCH_NAME -echo "fetching tags" -git fetch --tags https://github.com/aws-amplify/amplify-cli - -# lerna has a bug (https://github.com/lerna/lerna/issues/1066) where failed publishes do not set the exit code properly -# this causes the script to keep running even after failed publishes -# this function forces failed publishes to exit on failure -function lernaPublishExitOnFailure { - # exit on failure - set -e - if [[ "$LOCAL_PUBLISH_TO_LATEST" == "true" ]]; then - # registy URL update changes .yarnrc.yml file - git update-index --assume-unchanged .yarnrc.yml - fi - - # run lerna publish with the args that were passed to this function - # duplicate stdout to a temp file - # grep the temp file for the lerna err token and return exit 1 if found (-v option inverts grep exit code) - npx lerna publish "$@" | tee /tmp/publish-results && grep -qvz "lerna ERR!" < /tmp/publish-results -} - -# verifies that binaries are uploaded and available before publishing to NPM -function verifyPkgIsAvailable { - # exit on failure - set -e - - # read version of @aws-amplify/cli - desiredPkgVersion=$(npx lerna list --scope @aws-amplify/cli --json | jq -r '.[0].version') - - # check binaries - # send HEAD requests to check for binary presence - # curl --fail exits with non-zero code and makes this script fail - curl -I --fail https://package.cli.amplify.aws/$desiredPkgVersion/amplify-pkg-linux-x64.tgz - curl -I --fail https://package.cli.amplify.aws/$desiredPkgVersion/amplify-pkg-linux-arm64.tgz - curl -I --fail https://package.cli.amplify.aws/$desiredPkgVersion/amplify-pkg-macos-x64.tgz - curl -I --fail https://package.cli.amplify.aws/$desiredPkgVersion/amplify-pkg-win-x64.tgz -} - -if [ -z "$GITHUB_EMAIL" ]; then - if [[ "$LOCAL_PUBLISH_TO_LATEST" == "true" ]]; then - git config --global user.email not@used.com - else - echo "GITHUB_EMAIL email is missing" - exit 1 - fi -else - git config --global user.email $GITHUB_EMAIL -fi - -if [ -z "$GITHUB_USER" ]; then - if [[ "$LOCAL_PUBLISH_TO_LATEST" == "true" ]]; then - git config --global user.name "Doesnt Matter" - else - echo "GITHUB_USER email is missing" - exit 1 - fi -else - git config --global user.name $GITHUB_USER -fi - -if [[ "$BRANCH_NAME" =~ ^tagged-release ]]; then - if [[ "$BRANCH_NAME" =~ ^tagged-release-without-e2e-tests\/.* ]]; then - # Remove tagged-release-without-e2e-tests/ - export NPM_TAG="${BRANCH_NAME/tagged-release-without-e2e-tests\//}" - elif [[ "$BRANCH_NAME" =~ ^tagged-release\/.* ]]; then - # Remove tagged-release/ - export NPM_TAG="${BRANCH_NAME/tagged-release\//}" - fi - if [ -z "$NPM_TAG" ]; then - echo "Tag name is missing. Name your branch with either tagged-release/ or tagged-release-without-e2e-tests/" - exit 1 - fi - - if [[ "$LOCAL_PUBLISH_TO_LATEST" == "true" ]]; then - echo "Publishing to local registry under latest tag" - lernaPublishExitOnFailure --exact --preid=$NPM_TAG --conventional-commits --conventional-prerelease --no-push --yes --include-merged-tags - else - echo "Publishing to NPM under $NPM_TAG tag" - lernaPublishExitOnFailure --exact --dist-tag=$NPM_TAG --preid=$NPM_TAG --conventional-commits --conventional-prerelease --message "chore(release): Publish tagged release $NPM_TAG [ci skip]" --yes --include-merged-tags - fi - -# @latest release -elif [[ "$BRANCH_NAME" == "release" ]]; then - # create release commit and release tags - npx lerna version --exact --conventional-commits --conventional-graduate --yes --no-push --include-merged-tags --message "chore(release): Publish latest [ci skip]" - - if [[ "$LOCAL_PUBLISH_TO_LATEST" != "true" ]]; then - # verify that binary has been uploaded - verifyPkgIsAvailable - fi - - # publish versions that were just computed - lernaPublishExitOnFailure from-git --yes --no-push - - if [[ "$LOCAL_PUBLISH_TO_LATEST" == "true" ]]; then - echo "Published packages to verdaccio" - echo "Exiting without pushing release commit or release tags" - exit 0 - fi - - # push release commit - git push origin "$BRANCH_NAME" - - # push release tags - git tag --points-at HEAD | xargs git push origin - - # fast forward main to release - git fetch origin main - git checkout main - git merge release --ff-only - git push origin main - - # fast forward hotfix to release - git fetch origin hotfix - git checkout hotfix - git merge release --ff-only - git push origin hotfix - -# release candidate or local publish for testing / building binary -elif [[ "$BRANCH_NAME" =~ ^run-e2e-with-rc\/.* ]] || [[ "$BRANCH_NAME" =~ ^release_rc\/.* ]] || [[ "$LOCAL_PUBLISH_TO_LATEST" == "true" ]]; then - - # force @aws-amplify/cli-internal to be versioned in case this pipeline run does not have any commits that modify the CLI packages - if [[ "$LOCAL_PUBLISH_TO_LATEST" == "true" ]]; then - force_publish_local_args="--force-publish '@aws-amplify/cli-internal'" - fi - # create release commit and release tags - npx lerna version --preid=rc.$(git rev-parse --short HEAD) --exact --conventional-prerelease --conventional-commits --yes --no-push --include-merged-tags --message "chore(release): Publish rc [ci skip]" $(echo $force_publish_local_args) --no-commit-hooks - - - # if publishing locally to verdaccio - if [[ "$LOCAL_PUBLISH_TO_LATEST" == "true" ]]; then - # publish to verdaccio with no dist tag (default to latest) - lernaPublishExitOnFailure from-git --yes --no-push - echo "Published packages to verdaccio" - echo "Exiting without pushing release commit or release tags" - exit 0 - fi - - # verify that binary has been uploaded - verifyPkgIsAvailable - - # publish versions that were just computed - lernaPublishExitOnFailure from-git --yes --no-push --dist-tag rc - - # push release commit - git push origin "$BRANCH_NAME" - - # push release tags - git tag --points-at HEAD | xargs git push origin -else - echo "branch name" "$BRANCH_NAME" "did not match any branch publish rules. Skipping publish" -fi diff --git a/.circleci/publish-step-1-set-versions.sh b/.circleci/publish-step-1-set-versions.sh deleted file mode 100755 index de28db6c363..00000000000 --- a/.circleci/publish-step-1-set-versions.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -e - -git config --global user.name aws-amplify-bot -git config --global user.email aws@amazon.com - -if [[ "$CIRCLE_BRANCH" =~ ^tagged-release ]]; then - if [[ "$CIRCLE_BRANCH" =~ ^tagged-release-without-e2e-tests\/.* ]]; then - # Remove tagged-release-without-e2e-tests/ - export NPM_TAG="${CIRCLE_BRANCH/tagged-release-without-e2e-tests\//}" - elif [[ "$CIRCLE_BRANCH" =~ ^tagged-release\/.* ]]; then - # Remove tagged-release/ - export NPM_TAG="${CIRCLE_BRANCH/tagged-release\//}" - fi - if [ -z "$NPM_TAG" ]; then - echo "Tag name is missing. Name your branch with either tagged-release/ or tagged-release-without-e2e-tests/" - exit 1 - fi - - npx lerna version --exact --preid=$NPM_TAG --conventional-commits --conventional-prerelease --yes --no-push --include-merged-tags --message "chore(release): Publish tagged release $NPM_TAG [ci skip]" --no-commit-hooks --force-publish '@aws-amplify/cli-internal' - -# @latest release -elif [[ "$CIRCLE_BRANCH" == "release" ]]; then - # create release commit and release tags - npx lerna version --exact --conventional-commits --conventional-graduate --yes --no-push --include-merged-tags --message "chore(release): Publish latest [ci skip]" --force-publish '@aws-amplify/cli-internal' - -# release candidate or local publish for testing / building binary -else - # create release commit and release tags - npx lerna version --preid=rc.$(git rev-parse --short HEAD) --exact --conventional-prerelease --conventional-commits --yes --no-push --include-merged-tags --message "chore(release): Publish rc [ci skip]" --no-commit-hooks --force-publish '@aws-amplify/cli-internal' -fi diff --git a/.circleci/publish-step-4-push-to-git.sh b/.circleci/publish-step-4-push-to-git.sh deleted file mode 100755 index 6267d9e4a73..00000000000 --- a/.circleci/publish-step-4-push-to-git.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -e - -git config --global user.name aws-amplify-bot -git config --global user.email aws@amazon.com - -if [[ "$CIRCLE_BRANCH" =~ ^tagged-release ]] || [[ "$CIRCLE_BRANCH" =~ ^run-e2e-with-rc\/.* ]] || [[ "$CIRCLE_BRANCH" =~ ^release_rc\/.* ]]; then - # push release commit - git push origin "$CIRCLE_BRANCH" - - # push release tags - git tag --points-at HEAD | xargs git push origin - -# @latest release -elif [[ "$CIRCLE_BRANCH" == "release" ]]; then - # push release commit - git push origin "$CIRCLE_BRANCH" - - # push release tags - git tag --points-at HEAD | xargs git push origin - - # fast forward main to release - git fetch origin main - git checkout main - git merge release --ff-only - git push origin main - - # fast forward hotfix to release - git fetch origin hotfix - git checkout hotfix - git merge release --ff-only - git push origin hotfix -else - echo "branch name" "$CIRCLE_BRANCH" "did not match any branch publish rules." - exit 1 -fi diff --git a/.eslint-dictionary.json b/.eslint-dictionary.json index 4d82a32f832..f6324edd864 100644 --- a/.eslint-dictionary.json +++ b/.eslint-dictionary.json @@ -6,6 +6,7 @@ "admingroup", "adminui", "aggs", + "al2023", "allowlist", "alphanumerics", "amazonaws", @@ -198,6 +199,7 @@ "igrantable", "indexable", "indicies", + "Infos", "integ", "integtest", "integtestfn", @@ -217,6 +219,7 @@ "junit", "jwks", "keyless", + "keyout", "keyphrase", "kinesis", "lang", @@ -276,7 +279,9 @@ "openid", "openpgp", "opensearch", + "openssl", "orgs", + "Parti", "parens", "pathname", "pathnames", @@ -289,6 +294,7 @@ "pipfile", "pkill", "pluggable", + "pnpm", "poller", "polly", "positionally", diff --git a/.eslintrc.js b/.eslintrc.js index a0dbdce9324..dd8c24c2f82 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -102,22 +102,26 @@ module.exports = { }, { // edit rules here to modify test linting - files: ['__tests__/**', '*.test.ts', '**/amplify-e2e-tests/**'], - plugins: ['jest'], - extends: ['plugin:jest/recommended'], - rules: { - '@typescript-eslint/unbound-method': 'off', - 'jest/unbound-method': 'error', - '@typescript-eslint/no-explicit-any': 'off', - 'spellcheck/spell-checker': 'off', + files: ['**/__tests__/**', '**/__test__/**', '*.test.ts', '**/amplify-e2e-*/**', '**/test/**', '**/tests/**', '**/__e2e__/**'], + parserOptions: { + project: ['tsconfig.tests.json'], }, - }, - { - // disable spell checker in tests - files: ['**/__tests__/**', '**/__test__/**', '*.test.ts', 'packages/amplify-e2e-*/**', '**/test/**', '**/tests/**'], - plugins: ['jest'], - extends: ['plugin:jest/recommended'], rules: { + '@typescript-eslint/ban-ts-comment': 'off', + '@typescript-eslint/ban-types': 'off', + '@typescript-eslint/no-empty-function': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-inferrable-types': 'off', + '@typescript-eslint/no-non-null-assertion': 'off', + '@typescript-eslint/no-unused-vars': 'error', + 'consistent-return': 'error', + 'import/no-extraneous-dependencies': 'error', + 'no-constant-condition': 'off', + 'no-restricted-syntax': 'off', + 'no-useless-catch': 'error', + 'no-useless-escape': 'off', + 'no-var': 'error', + 'prefer-const': 'error', 'spellcheck/spell-checker': 'off', }, }, @@ -132,8 +136,6 @@ module.exports = { // Files / paths / globs that shouldn't be linted at all // (note that only .js, .jsx, .ts, and .tsx files are linted in the first place) ignorePatterns: [ - '**/__tests__/**', - '**.test.**', '.eslintrc.js', 'scripts/', 'node_modules', @@ -142,7 +144,6 @@ module.exports = { '__mocks__', 'coverage', 'packages/**/lib', - '**/__e2e__/**', // Forked package 'amplify-velocity-template', @@ -207,6 +208,8 @@ module.exports = { '/packages/amplify-category-custom/src/utils/generate-cfn-from-cdk.ts', '/packages/amplify-environment-parameters/lib', '/packages/amplify-opensearch-simulator/lib', + '/packages/amplify-nodejs-function-runtime-provider/src/__tests__/utils/handlerWithSyntaxError.js', + '/packages/amplify-frontend-ios/tests/sample*', // Ignore CHANGELOG.md files '/packages/*/CHANGELOG.md', diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 14c024fc20c..d58d4d29030 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,15 +1,24 @@ -# Amplify CLI Team owns the full repo by default. - -* @aws-amplify/amplify-cli +# Require at least one Amplify CLI Admin to approve changes. +# Non-admin reviewers participate in pull request review quorum by having write access to repository. +* @aws-amplify/amplify-cli-admins # Add Data team folks focused on GQL transform/codegen to ownership for packages which will be migrated, in addition to the existing cli team. +/packages/amplify-graphiql-explorer @aws-amplify/amplify-cli-admins @aws-amplify/amplify-data-buildtime +/packages/amplify-velocity-template @aws-amplify/amplify-cli-admins @aws-amplify/amplify-data-buildtime -/packages/amplify-graphiql-explorer @aws-amplify/amplify-cli @aws-amplify/amplify-data-buildtime -/packages/amplify-velocity-template @aws-amplify/amplify-cli @aws-amplify/amplify-data-buildtime - -# Add folks focused on reviewing changes to CI/CD scripts/buildspecs +# Add Studio Backend team folks focused on GQL transform/codegen to ownership for packages which will be migrated, in addition to the existing cli team. +/packages/amplify-migration @aws-amplify/amplify-cli-admins @aws-amplify/amplify-studio-backend-admins +/packages/amplify-gen2-codegen @aws-amplify/amplify-cli-admins @aws-amplify/amplify-studio-backend-admins +/packages/amplify-gen1-codegen-auth-adapter @aws-amplify/amplify-cli-admins @aws-amplify/amplify-studio-backend-admins +/packages/amplify-gen1-codegen-data-adapter @aws-amplify/amplify-cli-admins @aws-amplify/amplify-studio-backend-admins +/packages/amplify-gen1-codegen-function-adapter @aws-amplify/amplify-cli-admins @aws-amplify/amplify-studio-backend-admins +/packages/amplify-gen1-codegen-storage-adapter @aws-amplify/amplify-cli-admins @aws-amplify/amplify-studio-backend-admins -/.circleci/ @aws-amplify/amplify-cli-admins -/scripts/ @aws-amplify/amplify-cli-admins -/shared-scripts.sh @aws-amplify/amplify-cli-admins -/codebuild_specs/ @aws-amplify/amplify-cli-admins +# Templates with IAM resources +packages/amplify-provider-awscloudformation/resources/rootStackTemplate.json @aws-amplify/amplify-cli-admins +packages/amplify-provider-awscloudformation/src/root-stack-builder/root-stack-builder.ts @aws-amplify/amplify-cli-admins +packages/amplify-provider-awscloudformation/resources/update-idp-roles-cfn.json @aws-amplify/amplify-cli-admins +packages/amplify-category-auth/src/provider-utils/awscloudformation/auth-stack-builder/auth-user-pool-group-stack-builder.ts @aws-amplify/amplify-cli-admins +packages/amplify-category-storage/resources/triggers/s3/lambda-cloudformation-template.json.ejs @aws-amplify/amplify-cli-admins +packages/amplify-category-storage/resources/triggers/dynamoDB/lambda-cloudformation-template.json.ejs @aws-amplify/amplify-cli-admins +packages/amplify-category-predictions/src/provider-utils/awscloudformation/triggers/s3/lambda-cloudformation-template.json.ejs @aws-amplify/amplify-cli-admins diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index e85986214ca..f3b47305f35 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,4 +1,4 @@ -blank_issues_enabled: true +blank_issues_enabled: false contact_links: - name: I want help writing my Amplify application url: https://discord.com/invite/amplify diff --git a/.github/actions/install-cli/action.yml b/.github/actions/install-cli/action.yml new file mode 100644 index 00000000000..05726839617 --- /dev/null +++ b/.github/actions/install-cli/action.yml @@ -0,0 +1,29 @@ +name: Install Amplify CLI +description: Installs Amplify CLI +inputs: + cli-version: + description: a version of Amplify CLI + required: true +runs: + using: 'composite' + steps: + - name: Install CLI + shell: bash + if: runner.os != 'Windows' + run: | + npm install -g @aws-amplify/cli@${{ inputs.cli-version }} + AMPLIFY_PATH=$(which amplify) + echo "AMPLIFY_PATH=$AMPLIFY_PATH" + echo "AMPLIFY_PATH=$AMPLIFY_PATH" >> $GITHUB_ENV + + - name: Install CLI Windows + shell: powershell + if: runner.os == 'Windows' + run: | + npm install -g @aws-amplify/cli@${{ inputs.cli-version }} + # "where.exe" is used instead of "where" to disambiguate + # "where" is aliased to "Where-Object" in powershell, i.e. not pointing to the tool we want + # "amplify.cmd" is searched because "where.exe amplify" returns ambiguous list + $AMPLIFY_PATH=(where.exe amplify.cmd) + echo "AMPLIFY_PATH=$AMPLIFY_PATH" + "AMPLIFY_PATH=$AMPLIFY_PATH" >> $env:GITHUB_ENV diff --git a/.github/actions/run-smoke-tests/action.yml b/.github/actions/run-smoke-tests/action.yml new file mode 100644 index 00000000000..86967074f03 --- /dev/null +++ b/.github/actions/run-smoke-tests/action.yml @@ -0,0 +1,76 @@ +name: Run Smoke Tests +description: Executes Smoke Tests +inputs: + role-to-assume: + description: an IAM role to use in tests + required: true + cli-version: + description: version of Amplify CLI + required: true + region: + description: an AWS region to run in + required: false + default: us-west-2 +runs: + using: 'composite' + steps: + - name: Verify Amplify Path + shell: bash + run: | + if [[ -z "$AMPLIFY_PATH" ]]; then + echo "AMPLIFY_PATH must be defined" + exit 1 + fi + echo "AMPLIFY_PATH=$AMPLIFY_PATH" + $AMPLIFY_PATH version + + - name: Yarn build on Windows + shell: bash + if: runner.os == 'Windows' + run: | + cd scripts + yarn + + - name: Install Dependencies + shell: bash + run: yarn install --immutable + + - name: Build + shell: bash + run: yarn build-tests + + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@04b98b3f9e85f563fb061be8751a0352327246b0 # v3.0.1 + with: + role-to-assume: ${{ inputs.role-to-assume }} + aws-region: ${{ inputs.region }} + + # For iOS tests + - name: Setup Ruby + uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # v1.152.0 + if: runner.os == 'macOS' + with: + ruby-version: '3.2.1' + + # For iOS tests + - name: Set Default Xcode Version + if: runner.os == 'macOS' + shell: bash + run: | + sudo xcode-select -s "/Applications/Xcode_14.1.app" + xcodebuild -version + + - name: Run Smoke Tests + shell: bash + run: yarn smoketest -- --forceExit --no-cache --maxWorkers=2 + env: + CLI_REGION: ${{ inputs.region }} + CI: true + CIRCLECI: true + + - name: Upload Report + uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 #v4.6.0 + if: always() + with: + name: test report ${{ runner.os }} ${{ inputs.cli-version }} + path: packages/amplify-e2e-tests/amplify-e2e-reports diff --git a/.github/workflows/build-test-mac.yml b/.github/workflows/build-test-mac.yml new file mode 100644 index 00000000000..2cfee07efb0 --- /dev/null +++ b/.github/workflows/build-test-mac.yml @@ -0,0 +1,32 @@ +name: Build and Test on Mac + +on: + push: + branches: [dev] + pull_request: + +env: + NODE_OPTIONS: --max-old-space-size=8096 + +jobs: + build-and-test: + runs-on: macos-latest-xl + steps: + - name: Checkout Code + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + with: + persist-credentials: false + + - name: Install Python + uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1 + with: + python-version: '3.11' + + - name: Install Dependencies + run: yarn install + + - name: Build + run: yarn build + + - name: Test + run: yarn test-ci diff --git a/.github/workflows/closed-issue-message.yml b/.github/workflows/closed-issue-message.yml index b96fff9a4e7..8cb2db494c8 100644 --- a/.github/workflows/closed-issue-message.yml +++ b/.github/workflows/closed-issue-message.yml @@ -11,7 +11,5 @@ jobs: # These inputs are both required repo-token: '${{ secrets.GITHUB_TOKEN }}' message: | - ### ⚠️COMMENT VISIBILITY WARNING⚠️ - Comments on closed issues are hard for our team to see. + This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one. - If you wish to keep having a conversation with other community members under this issue feel free to do so. diff --git a/.github/workflows/codeql-tests.yaml b/.github/workflows/codeql-tests.yaml index 2ad62442d0c..db013bda13a 100644 --- a/.github/workflows/codeql-tests.yaml +++ b/.github/workflows/codeql-tests.yaml @@ -3,6 +3,7 @@ name: 'CodeQL Tests' on: push: + branches: [dev] pull_request: jobs: diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml index e722670c467..4fcb4435b0b 100644 --- a/.github/workflows/codeql.yaml +++ b/.github/workflows/codeql.yaml @@ -3,6 +3,7 @@ name: 'CodeQL' on: push: + branches: [dev] pull_request: jobs: diff --git a/.github/workflows/smoke-tests-canaries.yml b/.github/workflows/smoke-tests-canaries.yml new file mode 100644 index 00000000000..c701bff8bc1 --- /dev/null +++ b/.github/workflows/smoke-tests-canaries.yml @@ -0,0 +1,17 @@ +name: Smoke Tests - Canaries + +# This is required by aws-actions/configure-aws-credentials +permissions: + id-token: write + contents: read + +on: + schedule: + - cron: '0 16 * * *' # Everyday 16:00 UTC + +jobs: + call-smoke-tests: + uses: ./.github/workflows/smoke-tests.yml + secrets: inherit + with: + versions: '["rc", "latest"]' diff --git a/.github/workflows/smoke-tests-manual.yml b/.github/workflows/smoke-tests-manual.yml new file mode 100644 index 00000000000..534a7d8b3f6 --- /dev/null +++ b/.github/workflows/smoke-tests-manual.yml @@ -0,0 +1,27 @@ +name: Smoke Tests - Manual Run + +# This is required by aws-actions/configure-aws-credentials +permissions: + id-token: write + contents: read + +on: + workflow_dispatch: + inputs: + os: + required: false + type: string + default: '["macos-latest-xl", "ubuntu-latest", "amplify-cli_windows-latest_8-core"]' + versions: + required: false + type: string + default: '["rc", "latest"]' + +jobs: + call-smoke-tests: + if: github.event_name == 'workflow_dispatch' + uses: ./.github/workflows/smoke-tests.yml + secrets: inherit + with: + os: ${{ github.event.inputs.os }} + versions: ${{ github.event.inputs.versions }} diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml new file mode 100644 index 00000000000..73235ea41a7 --- /dev/null +++ b/.github/workflows/smoke-tests.yml @@ -0,0 +1,60 @@ +name: Smoke Tests + +# This is required by aws-actions/configure-aws-credentials +permissions: + id-token: write + contents: read + +on: + workflow_call: + inputs: + os: + required: false + type: string + default: '["macos-latest-xl", "ubuntu-latest", "amplify-cli_windows-latest_8-core"]' + versions: + required: false + type: string + default: '["rc", "latest"]' + +env: + NODE_OPTIONS: --max-old-space-size=8096 + IS_AMPLIFY_CLI_SMOKE_TEST_RUN: true + +jobs: + run-smoke-tests: + strategy: + fail-fast: false + matrix: + os: ${{ fromJson(inputs.os) }} + cli-version: ${{ fromJson(inputs.versions) }} + name: Smoke Tests ${{ matrix.os }} ${{ matrix.cli-version }} + runs-on: ${{ matrix.os }} + steps: + - name: Checkout Code + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + with: + persist-credentials: false + + - name: Install Python + uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1 + with: + python-version: '3.11' + + - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # version 4.0.2 + if: runner.os == 'Windows' + with: + # Pin node to version before 18.20.2 due to https://github.com/nodejs/node/issues/52554 + # Amplify App tries to spawn npm.cmd here https://github.com/aws-amplify/amplify-cli/blob/9571383521e6536ecf6568876609654393b27abb/packages/amplify-app/src/index.js#L88-L93 + node-version: 18.20.0 + + - name: Install Amplify CLI + uses: ./.github/actions/install-cli + with: + cli-version: ${{ matrix.cli-version }} + + - name: Run Smoke Tests + uses: ./.github/actions/run-smoke-tests + with: + role-to-assume: ${{ secrets.SMOKE_TESTS_ROLE_ARN }} + cli-version: ${{ matrix.cli-version }} diff --git a/.gitignore b/.gitignore index 8427f0d97f6..08c73d3f33c 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,6 @@ !.yarn/sdks !.yarn/versions **/.DS_Store -.circleci/generated_config.yml scripts/cci-job.data.json scripts/cci-test.data.json scripts/.yarn/* @@ -22,9 +21,8 @@ node_modules out pkg/node_modules pkg/yarn.lock -lerna-debug.log -npm-debug.log -yarn-error.log +*.log +logs coverage .nyc_output .env diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100755 index 00000000000..64e5241314b --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,11 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +# Define color variables +GREEN='\033[0;32m' +CYAN='\033[0;36m' +NC='\033[0m' # No color + +echo "${GREEN}Running commit-msg hook${NC}" +echo "${CYAN}Running npx --no -- commitlint --edit $1${NC}" +npx --no -- commitlint --edit "$1" diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 00000000000..0b8e574c8fa --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,21 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +# Define color variables +GREEN='\033[0;32m' +CYAN='\033[0;36m' +NC='\033[0m' # No color + +echo "${GREEN}Running pre-commit hook${NC}" +echo "${CYAN}Running yarn prettier staged files${NC}" +git diff --name-only --cached --diff-filter=ACM | grep -E '\.(js|jsx|ts|tsx)$' | xargs --no-run-if-empty yarn prettier --write +echo "${CYAN}Running yarn lint-staged${NC}" +yarn lint-fix +echo "${CYAN}Running yarn stage prettified files${NC}" +git diff --name-only --cached --diff-filter=ACM | xargs git add +echo "${CYAN}Running yarn lint-fix${NC}" +yarn lint-fix +echo "${CYAN}Running ./scripts/package-json-check.sh${NC}" +./scripts/package-json-check.sh +echo "${CYAN}Running yarn verify-commit${NC}" +yarn verify-commit diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100755 index 00000000000..9af535e1b0b --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1,11 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +# Define color variables +GREEN='\033[0;32m' +CYAN='\033[0;36m' +NC='\033[0m' # No color + +echo "${GREEN}Running pre-push hook${NC}" +echo "${CYAN}Running yarn build-tests-changed" +yarn build-tests-changed diff --git a/.prettierignore b/.prettierignore index b8849d7c2b7..743cc738d61 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,4 +1,6 @@ .yarn +.prettierignore +yarn.lock packages/*/build packages/*/lib coverage @@ -12,6 +14,12 @@ packages/amplify-cli-core/src/__tests__/testFiles/packageManager-npm/package-loc packages/amplify-cli-core/src/__tests__/testFiles/testProject-initialize-json-error/amplify/cli.json packages/amplify-e2e-core/dist/index.html packages/amplify-e2e-tests/amplify-e2e-reports +packages/amplify-e2e-tests/resources/example-ios-app packages/amplify-environment-parameters/src/schemas/BackendParameters.schema.json packages/amplify-nodejs-function-runtime-provider/src/__tests__/utils/handlerWithSyntaxError.js packages/amplify-velocity-template/src/parse/velocity.yy +packages/amplify-frontend-ios/tests/sample** + +# Exceptions: +!packages/amplify-category-hosting/lib +!packages/amplify-frontend-*/lib diff --git a/.vscode/settings.json b/.vscode/settings.json index b73ffcb1952..e98ca2b2966 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -20,6 +20,6 @@ "**/.pnp.*": true }, "typescript.enablePromptUseWorkspaceTsdk": true, - "prettier.prettierPath": "../node_modules/prettier", + "prettier.prettierPath": "./node_modules/prettier", "jest.jestCommandLine": "./node_modules/.bin/jest" } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b4d1ee2ddd1..84e15eae2ee 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -47,8 +47,6 @@ This section should get you running with **Amplify CLI** and get you familiar wi npm install --global yarn ``` - > If you are using Yarn v2, run `yarn set version classic` to change to Yarn Classic. - > Ensure that `.bin` directory is added to your PATH. For example, add `export PATH=":$PATH"` to your shell profile file on Linux or macOS. 2. Ensure you have [Java](https://aws.amazon.com/corretto/) installed and `java` command is available in your system. This is required for DynamoDB emulator. @@ -78,13 +76,23 @@ This section should get you running with **Amplify CLI** and get you familiar wi ```sh # Linux / macOS - yarn setup-dev + yarn && yarn setup-dev # Windows - yarn setup-dev-win - ## Must be run in Powershell + yarn && yarn setup-dev-win + ## Preferably run in Git Bash ``` + ### Additional Instructions for Windows Users: + + Prior to running the `setup-dev` script: + + 1. Install the Visual C++ Build Environment by installing Visual Studio Community Edition. When selecting options, only 'Desktop Development for C++' needs to be added. + 2. Open a terminal window/command prompt and run `npm config edit` and add or modify `msvs_version` setting to be your version of Visual Studio (e.g. `msvs_version=22`) + 3. If you run into the build error 'MSB8040: Spectre-mitigated libraries are required for this project' open the Visual Studio installer, press the 'Modify' button for your version of Visual Studio, then navigate to the 'Individual Components' and search for 'Spectre'. Install options that look like "MSVC v143 - VS 2022 C++ x64/x86 Spectre-mitigated libs (Latest)", you should only need the x86-64 version, but can optionally install versions for ARM and ARM64/ARM64EC. + 4. Go back to the terminal window/command prompt and navigate to the 'amplify-cli' folder and run `yarn clean cache --all` + 5. You should now be ready to run the `setup-dev` script + > NOTE: Make sure to always [sync your fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork) with _dev_ branch of amplify-cli ### Architecture of the codebase @@ -123,9 +131,10 @@ If the change is a breaking change ([as defined by semantic versioning](https:// 1. Within your local fork, create a new branch based on the issue you're addressing - e.g. `git checkout -b category-auth/admin-auth-support` - Use grouping tokens at the beginning of the branch names. For e.g, if you are working on changes specific to `amplify-category-auth`, then you could start the branch name as `category-auth/...` - Use slashes to separate parts of branch names +1. Before your first commit, install [git-secrets plugin](https://github.com/awslabs/git-secrets#installing-git-secrets) 1. Once your work is committed and you're ready to share, run `yarn test`. Manually test your changes in a sample app with different edge cases and also test across different platforms if possible. 1. Run `yarn lint-fix` to find and fix any linting errors -1. Run `yarn prettify:changes` to fix styling issues +1. Run `yarn prettier-changes` to fix styling issues 1. Then, push your branch: `git push origin HEAD` (pushes the current branch to origin remote) 1. Open GitHub to create a PR from your newly published branch. Fill out the PR template and submit a PR. 1. Finally, the Amplify CLI team will review your PR. Add reviewers based on the core member who is tracking the issue with you or code owners. _In the meantime, address any automated check that fail (such as linting, unit tests, etc. in CI)_ @@ -172,17 +181,7 @@ Valid commit types are as follows: ### Git Hooks -You will notice the extra actions carried out when you run the `git commit` or `git push` commands on this monorepo, that's because the following git hooks are configured using [husky](https://github.com/typicode/husky/tree/main) (you can see them in the root [package.json](https://github.com/aws-amplify/amplify-cli/blob/f2ac2b27b6b0dbf0c52edbc696c35b71f539c944/package.json#L61) file): - -```json -"husky": { - "hooks": { - "commit-msg": "commitlint -E HUSKY_GIT_PARAMS", - "pre-push": "yarn verify-api-extract && yarn build-tests-changed && yarn split-e2e-tests", - "pre-commit": "yarn verify-commit" - } -} -``` +You will notice the extra actions carried out when you run the `git commit` or `git push` commands on this monorepo, that's because the following git hooks are configured using [husky](https://github.com/typicode/husky/tree/main) (you can see them in [.husky](.husky) file): > NOTE: To ensure those git hooks properly execute, run `yarn` or `npm install` at the root of this monorepo to install the necessary dev dependency packages. diff --git a/Readme.md b/Readme.md index 937a652d97c..04cb431843e 100644 --- a/Readme.md +++ b/Readme.md @@ -9,9 +9,6 @@ - - build:started -

### Reporting Bugs/Feature Requests @@ -20,7 +17,17 @@ [![Feature Requests](https://img.shields.io/github/issues/aws-amplify/amplify-cli/feature-request?color=ff9001&label=feature%20requests)](https://github.com/aws-amplify/amplify-cli/issues?q=is%3Aissue+label%3Afeature-request+is%3Aopen) [![Closed Issues](https://img.shields.io/github/issues-closed/aws-amplify/amplify-cli?color=%2325CC00&label=issues%20closed)](https://github.com/aws-amplify/amplify-cli/issues?q=is%3Aissue+is%3Aclosed+) -# AWS Amplify CLI +> [!Important] +> +> # Amplify Gen 2 is now generally available +> +> If you are starting a new project, we recommend starting with [Amplify Gen 2](https://github.com/aws-amplify/amplify-backend). +> +> If you are an existing Gen 1 customer, we recommend that you continue working with your Gen 1 Amplify project. We are actively developing migration tooling to aid in transitioning your project from Gen 1 to Gen 2. We remain committed to supporting both Gen 1 and Gen 2 for the foreseeable future. +> +> Customers on Gen 1 will continue to receive support for high-priority bugs and essential security updates. + +# AWS Amplify CLI (Gen 1) The AWS Amplify CLI is a toolchain which includes a robust feature set for simplifying mobile and web application development. The CLI uses AWS CloudFormation and nested stacks to allow you to add or modify configurations locally before you push them for execution in your account. @@ -42,13 +49,6 @@ $ npm install -g @aws-amplify/cli $ amplify configure ``` -**_Note_**: If you're having permission issues on your system installing the CLI, please try the following command: - -```bash -$ sudo npm install -g @aws-amplify/cli --unsafe-perm=true -$ amplify configure -``` - ## Commands Summary The Amplify CLI supports the commands shown in the following table. diff --git a/codebuild_specs/aggregate_e2e_reports.yml b/codebuild_specs/aggregate_e2e_reports.yml index e0e1e428477..5b47fe24fee 100644 --- a/codebuild_specs/aggregate_e2e_reports.yml +++ b/codebuild_specs/aggregate_e2e_reports.yml @@ -7,12 +7,16 @@ phases: - cd ./scripts - npm install -g ts-node - npm install aws-sdk - - ts-node ./wait-for-all-codebuild.ts $CODEBUILD_RESOLVED_SOURCE_VERSION ../$WAIT_FOR_IDS_FILE_PATH AmplifyCLI-E2E-Testing + - ts-node ./wait-for-all-codebuild.ts $CODEBUILD_RESOLVED_SOURCE_VERSION ../$WAIT_FOR_IDS_FILE_PATH $PROJECT_NAME $CODEBUILD_WEBHOOK_TRIGGER - cd .. - source ./shared-scripts.sh && _downloadReportsFromS3 $CODEBUILD_SOURCE_VERSION + - mkdir artifacts && echo "empty artifact" > artifacts/empty-artifact.txt reports: e2e-reports: files: - '*.xml' file-format: 'JUNITXML' base-directory: '$CODEBUILD_SRC_DIR/aggregate_reports' +artifacts: + files: + - 'artifacts/*' diff --git a/codebuild_specs/migration_tests_v10.yml b/codebuild_specs/amplify_console_integration_tests.yml similarity index 61% rename from codebuild_specs/migration_tests_v10.yml rename to codebuild_specs/amplify_console_integration_tests.yml index 83501f0e397..4978cf3fe3e 100644 --- a/codebuild_specs/migration_tests_v10.yml +++ b/codebuild_specs/amplify_console_integration_tests.yml @@ -1,10 +1,12 @@ version: 0.2 env: shell: bash - compute-type: BUILD_GENERAL1_SMALL variables: + E2E_TEST_COVERAGE_DIR: node_v8_coverage CI: true CIRCLECI: true + IS_AMPLIFY_CI: true + CLI_REGION: us-east-1 # mock values to test artifact scanning ENV_VAR_WITH_SECRETS: 'MOCK_ENV_VAR_FOR_SCANNING_SECRETS' MOCK_ENV_VAR_FOR_SCANNING_SECRETS: 'abc123xyz' @@ -24,23 +26,18 @@ env: phases: build: commands: - # you can provide a codebuild source version to use old cache and skip all other jobs :) - - export NODE_OPTIONS=--max-old-space-size=8096 - - export AMPLIFY_DIR=$CODEBUILD_SRC_DIR/out - - export AMPLIFY_PATH=$HOME/.amplify/bin/amplify - - echo $AMPLIFY_DIR - - echo $AMPLIFY_PATH - - source ./shared-scripts.sh && _runMigrationV10Test + - source ./shared-scripts.sh && _amplifyConsoleIntegrationTests post_build: commands: - source ./shared-scripts.sh && _scanArtifacts - - source ./shared-scripts.sh && _uploadReportsToS3 $CODEBUILD_SOURCE_VERSION $CODEBUILD_BATCH_BUILD_IDENTIFIER amplify-migration-tests + +artifacts: + files: + - console-integration-reports/* + base-directory: packages/amplify-console-integration-tests/ reports: e2e-reports: files: - '*.xml' file-format: 'JUNITXML' - base-directory: '$CODEBUILD_SRC_DIR/packages/amplify-migration-tests/reports/junit' -artifacts: - files: - - $CODEBUILD_SRC_DIR/packages/amplify-migration-tests/amplify-migration-reports/* + base-directory: '$CODEBUILD_SRC_DIR/packages/amplify-console-integration-tests/reports/junit' diff --git a/codebuild_specs/amplify_general_config_tests.yml b/codebuild_specs/amplify_general_config_tests.yml new file mode 100644 index 00000000000..4b6b4006ae6 --- /dev/null +++ b/codebuild_specs/amplify_general_config_tests.yml @@ -0,0 +1,15 @@ +version: 0.2 +env: + shell: bash + variables: + E2E_TEST_COVERAGE_DIR: node_v8_coverage + CI: true + CIRCLECI: true + CLI_REGION: us-east-1 +phases: + build: + commands: + - source ./shared-scripts.sh && _amplifyGeneralConfigTests +artifacts: + files: + - 'shared-scripts.sh' diff --git a/codebuild_specs/amplify_install_test.yml b/codebuild_specs/amplify_install_test.yml new file mode 100644 index 00000000000..dcdb663a6c7 --- /dev/null +++ b/codebuild_specs/amplify_install_test.yml @@ -0,0 +1,22 @@ +version: 0.2 +env: + shell: bash + variables: + E2E_TEST_COVERAGE_DIR: node_v8_coverage + CI: true + CIRCLECI: true + IS_AMPLIFY_CI: true +phases: + build: + commands: + - source ./shared-scripts.sh && _amplifyInstallTestSetup + # limit memory for new processes to 1GB + # this is to make sure that install can work on small VMs + # i.e. not buffer content in memory while installing binary + - ulimit -Sv 1000000 + - npm install -g @aws-amplify/cli + - source .circleci/local_publish_helpers_codebuild.sh && unsetNpmRegistryUrl + - amplify version +artifacts: + files: + - 'shared-scripts.sh' diff --git a/codebuild_specs/amplify_sudo_install_test.yml b/codebuild_specs/amplify_sudo_install_test.yml new file mode 100644 index 00000000000..43756b5c2d5 --- /dev/null +++ b/codebuild_specs/amplify_sudo_install_test.yml @@ -0,0 +1,18 @@ +version: 0.2 +env: + shell: bash + variables: + E2E_TEST_COVERAGE_DIR: node_v8_coverage + CI: true + CIRCLECI: true + IS_AMPLIFY_CI: true +phases: + build: + commands: + - source ./shared-scripts.sh && _amplifySudoInstallTestSetup + - sudo npm install -g @aws-amplify/cli + - source .circleci/local_publish_helpers_codebuild.sh && unsetSudoNpmRegistryUrl + # - amplify version +artifacts: + files: + - 'shared-scripts.sh' diff --git a/codebuild_specs/build_linux.yml b/codebuild_specs/build_linux.yml index 273b055f828..c178e9912a8 100644 --- a/codebuild_specs/build_linux.yml +++ b/codebuild_specs/build_linux.yml @@ -4,6 +4,7 @@ env: phases: build: commands: + - ./.circleci/codebuild-checkout.sh - source ./shared-scripts.sh && _buildLinux artifacts: diff --git a/codebuild_specs/build_tests_standalone.yml b/codebuild_specs/build_tests_standalone.yml new file mode 100644 index 00000000000..6953e269e4e --- /dev/null +++ b/codebuild_specs/build_tests_standalone.yml @@ -0,0 +1,11 @@ +version: 0.2 +env: + shell: bash +phases: + build: + commands: + - echo "Build Tests Standalone" + - source ./shared-scripts.sh && _buildTestsStandalone +artifacts: + files: + - 'shared-scripts.sh' diff --git a/codebuild_specs/build_windows.yml b/codebuild_specs/build_windows.yml index 3ca802dbd32..105cedf9655 100644 --- a/codebuild_specs/build_windows.yml +++ b/codebuild_specs/build_windows.yml @@ -6,7 +6,6 @@ phases: commands: - cd scripts - yarn - - yarn ts-node remove-pkg-fetch-checksum.ts - cd .. - yarn --immutable - yarn production-build diff --git a/codebuild_specs/cleanup_resources.yml b/codebuild_specs/cleanup_resources.yml index c9249fc7446..d9d143c3410 100644 --- a/codebuild_specs/cleanup_resources.yml +++ b/codebuild_specs/cleanup_resources.yml @@ -4,4 +4,8 @@ env: phases: build: commands: - - echo cleanup running + - npm install -g ts-node + - source ./shared-scripts.sh && _cleanUpResources +artifacts: + files: + - 'shared-scripts.sh' diff --git a/codebuild_specs/deployment_verification_post_release.yml b/codebuild_specs/deployment_verification_post_release.yml new file mode 100644 index 00000000000..dddebba497d --- /dev/null +++ b/codebuild_specs/deployment_verification_post_release.yml @@ -0,0 +1,11 @@ +version: 0.2 +env: + shell: bash +phases: + build: + commands: + - source ./shared-scripts.sh && _deploymentVerificationPostRelease + +artifacts: + files: + - 'shared-scripts.sh' diff --git a/codebuild_specs/deployment_verification_rc_or_tagged.yml b/codebuild_specs/deployment_verification_rc_or_tagged.yml new file mode 100644 index 00000000000..59135009e72 --- /dev/null +++ b/codebuild_specs/deployment_verification_rc_or_tagged.yml @@ -0,0 +1,11 @@ +version: 0.2 +env: + shell: bash +phases: + build: + commands: + - source ./shared-scripts.sh && _deploymentVerificationRCOrTagged + +artifacts: + files: + - 'shared-scripts.sh' diff --git a/codebuild_specs/e2e_workflow.yml b/codebuild_specs/e2e_workflow.yml index 8710be0fc06..a6f2b52c5b6 100644 --- a/codebuild_specs/e2e_workflow.yml +++ b/codebuild_specs/e2e_workflow.yml @@ -26,73 +26,88 @@ batch: image: $WINDOWS_IMAGE_2019 - identifier: test buildspec: codebuild_specs/test.yml + depend-on: + - build_linux env: compute-type: BUILD_GENERAL1_LARGE + - identifier: lint + buildspec: codebuild_specs/lint.yml depend-on: - build_linux - - identifier: mock_e2e_tests - buildspec: codebuild_specs/mock_e2e_tests.yml env: compute-type: BUILD_GENERAL1_LARGE + - identifier: mock_e2e_tests + buildspec: codebuild_specs/mock_e2e_tests.yml depend-on: - build_linux + env: + compute-type: BUILD_GENERAL1_LARGE - identifier: validate_cdk_version buildspec: codebuild_specs/validate_cdk_version.yml depend-on: - build_linux - identifier: verify_api_extract buildspec: codebuild_specs/verify_api_extract.yml - env: - compute-type: BUILD_GENERAL1_LARGE depend-on: - build_linux + env: + compute-type: BUILD_GENERAL1_LARGE - identifier: verify_yarn_lock buildspec: codebuild_specs/verify_yarn_lock.yml depend-on: - build_linux - identifier: publish_to_local_registry buildspec: codebuild_specs/publish_to_local_registry.yml - env: - compute-type: BUILD_GENERAL1_LARGE depend-on: - build_linux - - identifier: build_pkg_binaries_arm - buildspec: codebuild_specs/build_pkg_binaries_arm.yml env: compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_arm + buildspec: codebuild_specs/build_pkg_binaries_arm.yml depend-on: - publish_to_local_registry - - identifier: build_pkg_binaries_linux - buildspec: codebuild_specs/build_pkg_binaries_linux.yml env: compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_linux + buildspec: codebuild_specs/build_pkg_binaries_linux.yml depend-on: - publish_to_local_registry - - identifier: build_pkg_binaries_macos - buildspec: codebuild_specs/build_pkg_binaries_macos.yml env: compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_macos + buildspec: codebuild_specs/build_pkg_binaries_macos.yml depend-on: - publish_to_local_registry - - identifier: build_pkg_binaries_win - buildspec: codebuild_specs/build_pkg_binaries_win.yml env: compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_win + buildspec: codebuild_specs/build_pkg_binaries_win.yml depend-on: - publish_to_local_registry - - identifier: upload_pkg_binaries - buildspec: codebuild_specs/upload_pkg_binaries.yml env: compute-type: BUILD_GENERAL1_LARGE + - identifier: upb + buildspec: codebuild_specs/upload_pkg_binaries.yml depend-on: - build_pkg_binaries_arm - build_pkg_binaries_linux - build_pkg_binaries_macos - build_pkg_binaries_win + env: + compute-type: BUILD_GENERAL1_LARGE - identifier: verify_versions_match buildspec: codebuild_specs/verify_versions_match.yml depend-on: - publish_to_local_registry + - identifier: verify_pkg_cli + buildspec: codebuild_specs/verify_pkg_cli.yml + depend-on: + - build_pkg_binaries_arm + - build_pkg_binaries_linux + - build_pkg_binaries_macos + - build_pkg_binaries_win + env: + compute-type: BUILD_GENERAL1_LARGE - identifier: run_e2e_tests_linux buildspec: codebuild_specs/run_e2e_tests_linux.yml env: @@ -102,7 +117,7 @@ batch: TEST_SUITE: src/__tests__/auth_2a.test.ts|src/__tests__/auth_2b.test.ts|src/__tests__/auth_2d.test.ts debug-session: true depend-on: - - upload_pkg_binaries + - upb - identifier: run_e2e_tests_linux_2 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: @@ -112,7 +127,7 @@ batch: TEST_SUITE: src/__tests__/auth_2f.test.ts debug-session: true depend-on: - - upload_pkg_binaries + - upb - identifier: run_coverage_linux buildspec: codebuild_specs/run_coverage_linux.yml env: @@ -132,14 +147,31 @@ batch: TEST_SUITE: src/__tests__/auth_2a.test.ts|src/__tests__/auth_2b.test.ts|src/__tests__/auth_2d.test.ts|src/__tests__/auth_2f.test.ts depend-on: - build_windows - - upload_pkg_binaries + - upb - identifier: integration_test buildspec: codebuild_specs/integration_test.yml + depend-on: + - build_linux env: compute-type: BUILD_GENERAL1_LARGE - debug-session: true + - identifier: amplify_sudo_install_test + buildspec: codebuild_specs/amplify_sudo_install_test.yml + env: + compute-type: BUILD_GENERAL1_MEDIUM depend-on: - - build_linux + - upb + - identifier: amplify_install_test + buildspec: codebuild_specs/amplify_install_test.yml + env: + compute-type: BUILD_GENERAL1_MEDIUM + depend-on: + - upb + - identifier: amplify_console_integration_tests + buildspec: codebuild_specs/amplify_console_integration_tests.yml + env: + compute-type: BUILD_GENERAL1_LARGE + depend-on: + - upb - identifier: aggregate_e2e_reports buildspec: codebuild_specs/aggregate_e2e_reports.yml env: @@ -148,4 +180,4 @@ batch: WAIT_FOR_IDS_FILE_PATH: ./codebuild_specs/wait_for_ids_local.json debug-session: true depend-on: - - upload_pkg_binaries + - upb diff --git a/codebuild_specs/e2e_workflow_base.yml b/codebuild_specs/e2e_workflow_base.yml index e24facb8c51..5d1e46626b1 100644 --- a/codebuild_specs/e2e_workflow_base.yml +++ b/codebuild_specs/e2e_workflow_base.yml @@ -6,14 +6,16 @@ env: AWS_DEFAULT_REGION: us-east-1 AWS_REGION: us-east-1 CDK_DEFAULT_REGION: us-east-1 - CLI_REGION: us-east-1 - TEST_SUITE: src/__tests__/auth_2b.test.ts AMPLIFY_DIR: '$CODEBUILD_SRC_DIR/out' AMPLIFY_PATH: '$CODEBUILD_SRC_DIR/out/amplify-pkg-linux-x64' batch: fast-fail: false build-graph: + - identifier: build_tests_standalone + buildspec: codebuild_specs/build_tests_standalone.yml + env: + compute-type: BUILD_GENERAL1_LARGE - identifier: build_linux buildspec: codebuild_specs/build_linux.yml env: @@ -26,70 +28,115 @@ batch: image: $WINDOWS_IMAGE_2019 - identifier: test buildspec: codebuild_specs/test.yml + depend-on: + - build_linux env: compute-type: BUILD_GENERAL1_LARGE + - identifier: lint + buildspec: codebuild_specs/lint.yml depend-on: - build_linux - - identifier: mock_e2e_tests - buildspec: codebuild_specs/mock_e2e_tests.yml env: compute-type: BUILD_GENERAL1_LARGE + - identifier: mock_e2e_tests + buildspec: codebuild_specs/mock_e2e_tests.yml depend-on: - build_linux + env: + compute-type: BUILD_GENERAL1_LARGE - identifier: validate_cdk_version buildspec: codebuild_specs/validate_cdk_version.yml depend-on: - build_linux - identifier: verify_api_extract buildspec: codebuild_specs/verify_api_extract.yml - env: - compute-type: BUILD_GENERAL1_LARGE depend-on: - build_linux + env: + compute-type: BUILD_GENERAL1_LARGE - identifier: verify_yarn_lock buildspec: codebuild_specs/verify_yarn_lock.yml depend-on: - build_linux - identifier: publish_to_local_registry buildspec: codebuild_specs/publish_to_local_registry.yml - env: - compute-type: BUILD_GENERAL1_LARGE depend-on: - build_linux - - identifier: build_pkg_binaries_arm - buildspec: codebuild_specs/build_pkg_binaries_arm.yml env: compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_arm + buildspec: codebuild_specs/build_pkg_binaries_arm.yml depend-on: - publish_to_local_registry - - identifier: build_pkg_binaries_linux - buildspec: codebuild_specs/build_pkg_binaries_linux.yml env: compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_linux + buildspec: codebuild_specs/build_pkg_binaries_linux.yml depend-on: - publish_to_local_registry - - identifier: build_pkg_binaries_macos - buildspec: codebuild_specs/build_pkg_binaries_macos.yml env: compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_macos + buildspec: codebuild_specs/build_pkg_binaries_macos.yml depend-on: - publish_to_local_registry - - identifier: build_pkg_binaries_win - buildspec: codebuild_specs/build_pkg_binaries_win.yml env: compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_win + buildspec: codebuild_specs/build_pkg_binaries_win.yml depend-on: - publish_to_local_registry - - identifier: upb - buildspec: codebuild_specs/upload_pkg_binaries.yml env: compute-type: BUILD_GENERAL1_LARGE + - identifier: upb + buildspec: codebuild_specs/upload_pkg_binaries.yml depend-on: - build_pkg_binaries_arm - build_pkg_binaries_linux - build_pkg_binaries_macos - build_pkg_binaries_win + env: + compute-type: BUILD_GENERAL1_LARGE - identifier: verify_versions_match buildspec: codebuild_specs/verify_versions_match.yml depend-on: - publish_to_local_registry + - identifier: verify_pkg_cli + buildspec: codebuild_specs/verify_pkg_cli.yml + depend-on: + - build_pkg_binaries_arm + - build_pkg_binaries_linux + - build_pkg_binaries_macos + - build_pkg_binaries_win + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: integration_test + buildspec: codebuild_specs/integration_test.yml + depend-on: + - build_linux + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: amplify_sudo_install_test + buildspec: codebuild_specs/amplify_sudo_install_test.yml + depend-on: + - upb + - identifier: amplify_install_test + buildspec: codebuild_specs/amplify_install_test.yml + depend-on: + - upb + - identifier: amplify_console_integration_tests + buildspec: codebuild_specs/amplify_console_integration_tests.yml + env: + compute-type: BUILD_GENERAL1_LARGE + depend-on: + - upb + - identifier: amplify_general_config_tests + buildspec: codebuild_specs/amplify_general_config_tests.yml + env: + compute-type: BUILD_GENERAL1_LARGE + depend-on: + - upb + - identifier: cleanup_resources + buildspec: codebuild_specs/cleanup_resources.yml + depend-on: + - aggregate_e2e_reports diff --git a/codebuild_specs/e2e_workflow_generated.yml b/codebuild_specs/e2e_workflow_generated.yml index 49aa41278bd..e3d6a0179ec 100644 --- a/codebuild_specs/e2e_workflow_generated.yml +++ b/codebuild_specs/e2e_workflow_generated.yml @@ -7,13 +7,15 @@ env: AWS_DEFAULT_REGION: us-east-1 AWS_REGION: us-east-1 CDK_DEFAULT_REGION: us-east-1 - CLI_REGION: us-east-1 - TEST_SUITE: src/__tests__/auth_2b.test.ts AMPLIFY_DIR: $CODEBUILD_SRC_DIR/out AMPLIFY_PATH: $CODEBUILD_SRC_DIR/out/amplify-pkg-linux-x64 batch: fast-fail: false build-graph: + - identifier: build_tests_standalone + buildspec: codebuild_specs/build_tests_standalone.yml + env: + compute-type: BUILD_GENERAL1_LARGE - identifier: build_linux buildspec: codebuild_specs/build_linux.yml env: @@ -26,791 +28,996 @@ batch: image: $WINDOWS_IMAGE_2019 - identifier: test buildspec: codebuild_specs/test.yml + depend-on: + - build_linux env: compute-type: BUILD_GENERAL1_LARGE + - identifier: lint + buildspec: codebuild_specs/lint.yml depend-on: - build_linux - - identifier: mock_e2e_tests - buildspec: codebuild_specs/mock_e2e_tests.yml env: compute-type: BUILD_GENERAL1_LARGE + - identifier: mock_e2e_tests + buildspec: codebuild_specs/mock_e2e_tests.yml depend-on: - build_linux + env: + compute-type: BUILD_GENERAL1_LARGE - identifier: validate_cdk_version buildspec: codebuild_specs/validate_cdk_version.yml depend-on: - build_linux - identifier: verify_api_extract buildspec: codebuild_specs/verify_api_extract.yml - env: - compute-type: BUILD_GENERAL1_LARGE depend-on: - build_linux + env: + compute-type: BUILD_GENERAL1_LARGE - identifier: verify_yarn_lock buildspec: codebuild_specs/verify_yarn_lock.yml depend-on: - build_linux - identifier: publish_to_local_registry buildspec: codebuild_specs/publish_to_local_registry.yml - env: - compute-type: BUILD_GENERAL1_LARGE depend-on: - build_linux - - identifier: build_pkg_binaries_arm - buildspec: codebuild_specs/build_pkg_binaries_arm.yml env: compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_arm + buildspec: codebuild_specs/build_pkg_binaries_arm.yml depend-on: - publish_to_local_registry - - identifier: build_pkg_binaries_linux - buildspec: codebuild_specs/build_pkg_binaries_linux.yml env: compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_linux + buildspec: codebuild_specs/build_pkg_binaries_linux.yml depend-on: - publish_to_local_registry - - identifier: build_pkg_binaries_macos - buildspec: codebuild_specs/build_pkg_binaries_macos.yml env: compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_macos + buildspec: codebuild_specs/build_pkg_binaries_macos.yml depend-on: - publish_to_local_registry - - identifier: build_pkg_binaries_win - buildspec: codebuild_specs/build_pkg_binaries_win.yml env: compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_win + buildspec: codebuild_specs/build_pkg_binaries_win.yml depend-on: - publish_to_local_registry - - identifier: upb - buildspec: codebuild_specs/upload_pkg_binaries.yml env: compute-type: BUILD_GENERAL1_LARGE + - identifier: upb + buildspec: codebuild_specs/upload_pkg_binaries.yml depend-on: - build_pkg_binaries_arm - build_pkg_binaries_linux - build_pkg_binaries_macos - build_pkg_binaries_win + env: + compute-type: BUILD_GENERAL1_LARGE - identifier: verify_versions_match buildspec: codebuild_specs/verify_versions_match.yml depend-on: - publish_to_local_registry - - identifier: l_datastore_modelgen_amplify_app_diagnose_hooks_a + - identifier: verify_pkg_cli + buildspec: codebuild_specs/verify_pkg_cli.yml + depend-on: + - build_pkg_binaries_arm + - build_pkg_binaries_linux + - build_pkg_binaries_macos + - build_pkg_binaries_win + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: integration_test + buildspec: codebuild_specs/integration_test.yml + depend-on: + - build_linux + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: amplify_sudo_install_test + buildspec: codebuild_specs/amplify_sudo_install_test.yml + depend-on: + - upb + - identifier: amplify_install_test + buildspec: codebuild_specs/amplify_install_test.yml + depend-on: + - upb + - identifier: amplify_console_integration_tests + buildspec: codebuild_specs/amplify_console_integration_tests.yml + env: + compute-type: BUILD_GENERAL1_LARGE + depend-on: + - upb + - identifier: amplify_general_config_tests + buildspec: codebuild_specs/amplify_general_config_tests.yml + env: + compute-type: BUILD_GENERAL1_LARGE + depend-on: + - upb + - identifier: cleanup_resources + buildspec: codebuild_specs/cleanup_resources.yml + depend-on: + - aggregate_e2e_reports + - identifier: l_diagnose_hooks_a_mock_api buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/datastore-modelgen.test.ts|src/__tests__/amplify-app.test.ts|src/__tests__/diagnose.test.ts|src/__tests__/hooks-a.test.ts - CLI_REGION: ap-northeast-1 + TEST_SUITE: src/__tests__/diagnose.test.ts|src/__tests__/hooks-a.test.ts|src/__tests__/mock-api.test.ts depend-on: - upb - - identifier: l_mock_api_analytics_kinesis_analytics_pinpoint_flutter_analytics_pinpoint_js + - identifier: l_analytics_kinesis_analytics_pinpoint_flutter_analytics_pinpoint_js buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/mock-api.test.ts|src/__tests__/analytics-kinesis.test.ts|src/__tests__/analytics-pinpoint-flutter.test.ts|src/__tests__/analytics-pinpoint-js.test.ts - CLI_REGION: us-west-2 + TEST_SUITE: src/__tests__/analytics-kinesis.test.ts|src/__tests__/analytics-pinpoint-flutter.test.ts|src/__tests__/analytics-pinpoint-js.test.ts depend-on: - upb - - identifier: l_auth_2a_auth_2b_auth_2d_auth_2f + - identifier: l_auth_2a_auth_2b_auth_2d buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/auth_2a.test.ts|src/__tests__/auth_2b.test.ts|src/__tests__/auth_2d.test.ts|src/__tests__/auth_2f.test.ts - CLI_REGION: ap-northeast-1 + TEST_SUITE: src/__tests__/auth_2a.test.ts|src/__tests__/auth_2b.test.ts|src/__tests__/auth_2d.test.ts depend-on: - upb - - identifier: l_notifications_lifecycle_uibuilder_notifications_analytics_compatibility_in_app_1_notifications_analytics_compatibility_sms_2 + - identifier: l_auth_2f_notifications_lifecycle_notifications_analytics_compatibility_in_app_1 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/notifications-lifecycle.test.ts|src/__tests__/uibuilder.test.ts|src/__tests__/notifications-analytics-compatibility-in-app-1.test.ts|src/__tests__/notifications-analytics-compatibility-sms-2.test.ts - CLI_REGION: ap-southeast-1 + TEST_SUITE: src/__tests__/auth_2f.test.ts|src/__tests__/notifications-lifecycle.test.ts|src/__tests__/notifications-analytics-compatibility-in-app-1.test.ts depend-on: - upb - - identifier: l_analytics_2_global_sandbox_c_hooks_b_notifications_analytics_compatibility_sms_1 + - identifier: l_notifications_analytics_compatibility_sms_2_analytics_2_global_sandbox_c buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/analytics-2.test.ts|src/__tests__/global_sandbox-c.test.ts|src/__tests__/hooks-b.test.ts|src/__tests__/notifications-analytics-compatibility-sms-1.test.ts - CLI_REGION: us-east-2 + TEST_SUITE: src/__tests__/notifications-analytics-compatibility-sms-2.test.ts|src/__tests__/analytics-2.test.ts|src/__tests__/global_sandbox-c.test.ts depend-on: - upb - - identifier: l_plugin_studio_modelgen_custom_transformers_notifications_in_app_messaging_env_1 + - identifier: l_hooks_b_notifications_analytics_compatibility_sms_1_plugin buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/plugin.test.ts|src/__tests__/studio-modelgen.test.ts|src/__tests__/graphql-v2/custom-transformers.test.ts|src/__tests__/notifications-in-app-messaging-env-1.test.ts - CLI_REGION: us-east-2 + TEST_SUITE: src/__tests__/hooks-b.test.ts|src/__tests__/notifications-analytics-compatibility-sms-1.test.ts|src/__tests__/plugin.test.ts depend-on: - upb - - identifier: l_notifications_sms_pull_pull_auth_10_container_hosting + - identifier: l_studio_modelgen_custom_transformers_notifications_in_app_messaging_env_1 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/notifications-sms-pull.test.ts|src/__tests__/pull.test.ts|src/__tests__/auth_10.test.ts|src/__tests__/container-hosting.test.ts - CLI_REGION: us-east-2 + TEST_SUITE: src/__tests__/studio-modelgen.test.ts|src/__tests__/graphql-v2/custom-transformers.test.ts|src/__tests__/notifications-in-app-messaging-env-1.test.ts depend-on: - upb - - identifier: l_init_b_notifications_apns_notifications_fcm_notifications_in_app_messaging_env_2 + - identifier: l_notifications_sms_pull_pull_auth_10 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/init_b.test.ts|src/__tests__/notifications-apns.test.ts|src/__tests__/notifications-fcm.test.ts|src/__tests__/notifications-in-app-messaging-env-2.test.ts - CLI_REGION: us-east-2 + TEST_SUITE: src/__tests__/notifications-sms-pull.test.ts|src/__tests__/pull.test.ts|src/__tests__/auth_10.test.ts depend-on: - upb - - identifier: l_with_babel_config_amplify_configure_env_2_init_d + - identifier: l_container_hosting_init_b_notifications_apns buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/with-babel-config.test.ts|src/__tests__/amplify-configure.test.ts|src/__tests__/env-2.test.ts|src/__tests__/init_d.test.ts - CLI_REGION: eu-central-1 + TEST_SUITE: src/__tests__/container-hosting.test.ts|src/__tests__/init_b.test.ts|src/__tests__/notifications-apns.test.ts depend-on: - upb - - identifier: l_init_f_auth_5d_configure_project_git_clone_attach + - identifier: l_notifications_fcm_notifications_in_app_messaging_env_2_with_babel_config buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/init_f.test.ts|src/__tests__/auth_5d.test.ts|src/__tests__/configure-project.test.ts|src/__tests__/git-clone-attach.test.ts - CLI_REGION: us-east-2 + TEST_SUITE: src/__tests__/notifications-fcm.test.ts|src/__tests__/notifications-in-app-messaging-env-2.test.ts|src/__tests__/with-babel-config.test.ts depend-on: - upb - - identifier: l_init_c_layer_4_function_2c_function_3b + - identifier: l_amplify_configure_env_2_init_d buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/init_c.test.ts|src/__tests__/layer-4.test.ts|src/__tests__/function_2c.test.ts|src/__tests__/function_3b.test.ts - CLI_REGION: eu-west-2 + TEST_SUITE: src/__tests__/amplify-configure.test.ts|src/__tests__/env-2.test.ts|src/__tests__/init_d.test.ts depend-on: - upb - - identifier: l_function_4_interactions_schema_model_a_tags + - identifier: l_init_f_auth_5d_configure_project buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/function_4.test.ts|src/__tests__/interactions.test.ts|src/__tests__/schema-model-a.test.ts|src/__tests__/tags.test.ts - CLI_REGION: us-west-2 + TEST_SUITE: src/__tests__/init_f.test.ts|src/__tests__/auth_5d.test.ts|src/__tests__/configure-project.test.ts depend-on: - upb - - identifier: l_auth_1a_auth_trigger_custom_policies_function_function_6 + - identifier: l_git_clone_attach_init_c_layer_4 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/auth_1a.test.ts|src/__tests__/auth-trigger.test.ts|src/__tests__/custom_policies_function.test.ts|src/__tests__/function_6.test.ts - CLI_REGION: ap-southeast-1 + TEST_SUITE: src/__tests__/git-clone-attach.test.ts|src/__tests__/init_c.test.ts|src/__tests__/layer-4.test.ts depend-on: - upb - - identifier: l_storage_2_export_iam_permissions_boundary_node_function + - identifier: l_function_2c_function_3b_function_4 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/storage-2.test.ts|src/__tests__/export.test.ts|src/__tests__/iam-permissions-boundary.test.ts|src/__tests__/migration/node.function.test.ts + TEST_SUITE: src/__tests__/function_2c.test.ts|src/__tests__/function_3b.test.ts|src/__tests__/function_4.test.ts + depend-on: + - upb + - identifier: l_interactions_schema_model_a_tags + buildspec: codebuild_specs/run_e2e_tests_linux.yml + env: + variables: + TEST_SUITE: src/__tests__/interactions.test.ts|src/__tests__/schema-model-a.test.ts|src/__tests__/tags.test.ts CLI_REGION: us-west-2 depend-on: - upb - - identifier: l_notifications_sms_schema_auth_4b_schema_model_e_schema_versioned + - identifier: l_auth_1a_auth_trigger_custom_policies_function buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/notifications-sms.test.ts|src/__tests__/schema-auth-4b.test.ts|src/__tests__/schema-model-e.test.ts|src/__tests__/schema-versioned.test.ts - CLI_REGION: us-east-1 + TEST_SUITE: src/__tests__/auth_1a.test.ts|src/__tests__/auth-trigger.test.ts|src/__tests__/custom_policies_function.test.ts depend-on: - upb - - identifier: l_auth_1c_auth_5e_auth_8b_geo_add_b + - identifier: l_function_6_storage_2_export buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/auth_1c.test.ts|src/__tests__/auth_5e.test.ts|src/__tests__/auth_8b.test.ts|src/__tests__/geo-add-b.test.ts - CLI_REGION: ap-northeast-1 + TEST_SUITE: src/__tests__/function_6.test.ts|src/__tests__/storage-2.test.ts|src/__tests__/export.test.ts depend-on: - upb - - identifier: l_s3_sse_schema_auth_4a_schema_model_b_schema_model_d + - identifier: l_iam_permissions_boundary_node_function_notifications_sms buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/s3-sse.test.ts|src/__tests__/schema-auth-4a.test.ts|src/__tests__/schema-model-b.test.ts|src/__tests__/schema-model-d.test.ts - CLI_REGION: us-east-1 + TEST_SUITE: src/__tests__/iam-permissions-boundary.test.ts|src/__tests__/migration/node.function.test.ts|src/__tests__/notifications-sms.test.ts depend-on: - upb - - identifier: l_auth_5f_env_4_frontend_config_drift_schema_auth_4d + - identifier: l_schema_auth_4b_schema_model_e_schema_versioned buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/auth_5f.test.ts|src/__tests__/env-4.test.ts|src/__tests__/frontend_config_drift.test.ts|src/__tests__/schema-auth-4d.test.ts - CLI_REGION: ap-southeast-1 + TEST_SUITE: src/__tests__/schema-auth-4b.test.ts|src/__tests__/schema-model-e.test.ts|src/__tests__/schema-versioned.test.ts depend-on: - upb - - identifier: l_schema_auth_6a_schema_data_access_patterns_schema_model_c_schema_predictions + - identifier: l_auth_1c_auth_5e_auth_8b buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/schema-auth-6a.test.ts|src/__tests__/schema-data-access-patterns.test.ts|src/__tests__/schema-model-c.test.ts|src/__tests__/schema-predictions.test.ts - CLI_REGION: ap-northeast-1 + TEST_SUITE: src/__tests__/auth_1c.test.ts|src/__tests__/auth_5e.test.ts|src/__tests__/auth_8b.test.ts depend-on: - upb - - identifier: l_model_migration_auth_3c_auth_4c_auth_5a + - identifier: l_geo_add_b_s3_sse_schema_auth_4a buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/transformer-migrations/model-migration.test.ts|src/__tests__/auth_3c.test.ts|src/__tests__/auth_4c.test.ts|src/__tests__/auth_5a.test.ts - CLI_REGION: ap-northeast-1 + TEST_SUITE: src/__tests__/geo-add-b.test.ts|src/__tests__/s3-sse.test.ts|src/__tests__/schema-auth-4a.test.ts depend-on: - upb - - identifier: l_auth_5c_env_1_geo_add_a_init_a + - identifier: l_schema_model_b_schema_model_d_auth_5f buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/auth_5c.test.ts|src/__tests__/env-1.test.ts|src/__tests__/geo-add-a.test.ts|src/__tests__/init_a.test.ts - CLI_REGION: eu-central-1 + TEST_SUITE: src/__tests__/schema-model-b.test.ts|src/__tests__/schema-model-d.test.ts|src/__tests__/auth_5f.test.ts depend-on: - upb - - identifier: l_schema_auth_4c_schema_auth_5c_auth_5b_auth_9 + - identifier: l_env_4_frontend_config_drift_schema_auth_4d buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/schema-auth-4c.test.ts|src/__tests__/schema-auth-5c.test.ts|src/__tests__/auth_5b.test.ts|src/__tests__/auth_9.test.ts - CLI_REGION: us-east-1 + TEST_SUITE: src/__tests__/env-4.test.ts|src/__tests__/frontend_config_drift.test.ts|src/__tests__/schema-auth-4d.test.ts depend-on: - upb - - identifier: l_custom_resources_env_5_function_10_function_9c + - identifier: l_schema_auth_6a_schema_data_access_patterns_schema_model_c buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/custom_resources.test.ts|src/__tests__/env-5.test.ts|src/__tests__/function_10.test.ts|src/__tests__/function_9c.test.ts - CLI_REGION: eu-central-1 + TEST_SUITE: src/__tests__/schema-auth-6a.test.ts|src/__tests__/schema-data-access-patterns.test.ts|src/__tests__/schema-model-c.test.ts depend-on: - upb - - identifier: l_function_permissions_geo_import_1a_geo_import_2_global_sandbox_b + - identifier: l_schema_predictions_model_migration_auth_3c buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/function-permissions.test.ts|src/__tests__/geo-import-1a.test.ts|src/__tests__/geo-import-2.test.ts|src/__tests__/global_sandbox-b.test.ts - CLI_REGION: ap-northeast-1 + TEST_SUITE: src/__tests__/schema-predictions.test.ts|src/__tests__/transformer-migrations/model-migration.test.ts|src/__tests__/auth_3c.test.ts depend-on: - upb - - identifier: l_schema_auth_5d_schema_auth_6b_schema_auth_8c_auth_3a + - identifier: l_auth_4c_auth_5a_auth_5c buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/schema-auth-5d.test.ts|src/__tests__/schema-auth-6b.test.ts|src/__tests__/schema-auth-8c.test.ts|src/__tests__/auth_3a.test.ts - CLI_REGION: us-east-2 + TEST_SUITE: src/__tests__/auth_4c.test.ts|src/__tests__/auth_5a.test.ts|src/__tests__/auth_5c.test.ts depend-on: - upb - - identifier: l_auth_3b_auth_4a_auth_7a_auth_8c + - identifier: l_env_1_geo_add_a_init_a buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/auth_3b.test.ts|src/__tests__/auth_4a.test.ts|src/__tests__/auth_7a.test.ts|src/__tests__/auth_8c.test.ts - CLI_REGION: eu-central-1 + TEST_SUITE: src/__tests__/env-1.test.ts|src/__tests__/geo-add-a.test.ts|src/__tests__/init_a.test.ts depend-on: - upb - - identifier: l_feature_flags_geo_import_1b_global_sandbox_a_init_e + - identifier: l_schema_auth_4c_schema_auth_5c_auth_5b buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/feature-flags.test.ts|src/__tests__/geo-import-1b.test.ts|src/__tests__/global_sandbox-a.test.ts|src/__tests__/init_e.test.ts - CLI_REGION: eu-central-1 + TEST_SUITE: src/__tests__/schema-auth-4c.test.ts|src/__tests__/schema-auth-5c.test.ts|src/__tests__/auth_5b.test.ts depend-on: - upb - - identifier: l_notifications_analytics_compatibility_in_app_2_schema_auth_11_c_schema_auth_2b_schema_auth_6c + - identifier: l_auth_9_custom_resources_env_5 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/notifications-analytics-compatibility-in-app-2.test.ts|src/__tests__/schema-auth-11-c.test.ts|src/__tests__/schema-auth-2b.test.ts|src/__tests__/schema-auth-6c.test.ts - CLI_REGION: us-east-2 + TEST_SUITE: src/__tests__/auth_9.test.ts|src/__tests__/custom_resources.test.ts|src/__tests__/env-5.test.ts depend-on: - upb - - identifier: l_schema_auth_6d_schema_auth_7c_schema_auth_8a_function_migration + - identifier: l_function_10_function_9c_function_permissions buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/schema-auth-6d.test.ts|src/__tests__/schema-auth-7c.test.ts|src/__tests__/schema-auth-8a.test.ts|src/__tests__/transformer-migrations/function-migration.test.ts - CLI_REGION: us-east-1 + TEST_SUITE: src/__tests__/function_10.test.ts|src/__tests__/function_9c.test.ts|src/__tests__/function-permissions.test.ts depend-on: - upb - - identifier: l_api_10_api_7_export_pull_a_function_9a + - identifier: l_geo_import_1a_geo_import_2_global_sandbox_b buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/api_10.test.ts|src/__tests__/api_7.test.ts|src/__tests__/export-pull-a.test.ts|src/__tests__/function_9a.test.ts - CLI_REGION: us-west-2 + TEST_SUITE: src/__tests__/geo-import-1a.test.ts|src/__tests__/geo-import-2.test.ts|src/__tests__/global_sandbox-b.test.ts depend-on: - upb - - identifier: l_geo_headless_api_key_migration5_schema_auth_1a_schema_auth_5b + - identifier: l_schema_auth_5d_schema_auth_6b_schema_auth_8c buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/geo-headless.test.ts|src/__tests__/migration/api.key.migration5.test.ts|src/__tests__/schema-auth-1a.test.ts|src/__tests__/schema-auth-5b.test.ts - CLI_REGION: us-east-1 + TEST_SUITE: src/__tests__/schema-auth-5d.test.ts|src/__tests__/schema-auth-6b.test.ts|src/__tests__/schema-auth-8c.test.ts depend-on: - upb - - identifier: l_schema_auth_8b_schema_auth_9_a_schema_auth_9_c_storage_3 + - identifier: l_auth_3a_auth_3b_auth_4a buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/schema-auth-8b.test.ts|src/__tests__/schema-auth-9-a.test.ts|src/__tests__/schema-auth-9-c.test.ts|src/__tests__/storage-3.test.ts - CLI_REGION: ap-northeast-1 + TEST_SUITE: src/__tests__/auth_3a.test.ts|src/__tests__/auth_3b.test.ts|src/__tests__/auth_4a.test.ts depend-on: - upb - - identifier: l_auth_11_auth_1b_delete_geo_add_c + - identifier: l_auth_7a_auth_8c_feature_flags buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/auth_11.test.ts|src/__tests__/auth_1b.test.ts|src/__tests__/delete.test.ts|src/__tests__/geo-add-c.test.ts - CLI_REGION: us-east-2 + TEST_SUITE: src/__tests__/auth_7a.test.ts|src/__tests__/auth_8c.test.ts|src/__tests__/feature-flags.test.ts depend-on: - upb - - identifier: l_geo_add_d_geo_import_3_hosting_layer_3 + - identifier: l_geo_import_1b_global_sandbox_a_init_e buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/geo-add-d.test.ts|src/__tests__/geo-import-3.test.ts|src/__tests__/hosting.test.ts|src/__tests__/layer-3.test.ts - CLI_REGION: us-west-2 + TEST_SUITE: src/__tests__/geo-import-1b.test.ts|src/__tests__/global_sandbox-a.test.ts|src/__tests__/init_e.test.ts depend-on: - upb - - identifier: l_api_connection_migration_api_key_migration3_predictions_schema_auth_11_b + - identifier: l_notifications_analytics_compatibility_in_app_2_schema_auth_11_c_schema_auth_2b buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/migration/api.connection.migration.test.ts|src/__tests__/migration/api.key.migration3.test.ts|src/__tests__/predictions.test.ts|src/__tests__/schema-auth-11-b.test.ts - CLI_REGION: eu-west-2 + TEST_SUITE: src/__tests__/notifications-analytics-compatibility-in-app-2.test.ts|src/__tests__/schema-auth-11-c.test.ts|src/__tests__/schema-auth-2b.test.ts depend-on: - upb - - identifier: l_schema_auth_1b_schema_auth_2a_schema_auth_7a_schema_auth_7b + - identifier: l_schema_auth_6c_schema_auth_6d_schema_auth_7c buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/schema-auth-1b.test.ts|src/__tests__/schema-auth-2a.test.ts|src/__tests__/schema-auth-7a.test.ts|src/__tests__/schema-auth-7b.test.ts - CLI_REGION: eu-central-1 + TEST_SUITE: src/__tests__/schema-auth-6c.test.ts|src/__tests__/schema-auth-6d.test.ts|src/__tests__/schema-auth-7c.test.ts depend-on: - upb - - identifier: l_schema_auth_9_b_schema_iterative_rollback_1_predictions_migration_api_6a + - identifier: l_schema_auth_8a_function_migration_api_10 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/schema-auth-9-b.test.ts|src/__tests__/schema-iterative-rollback-1.test.ts|src/__tests__/transformer-migrations/predictions-migration.test.ts|src/__tests__/api_6a.test.ts - CLI_REGION: ap-southeast-2 + TEST_SUITE: src/__tests__/schema-auth-8a.test.ts|src/__tests__/transformer-migrations/function-migration.test.ts|src/__tests__/api_10.test.ts depend-on: - upb - - identifier: l_auth_7b_export_pull_b_function_3a_init_special_case + - identifier: l_api_7_export_pull_a_function_9a buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/auth_7b.test.ts|src/__tests__/export-pull-b.test.ts|src/__tests__/function_3a.test.ts|src/__tests__/init-special-case.test.ts - CLI_REGION: eu-central-1 + TEST_SUITE: src/__tests__/api_7.test.ts|src/__tests__/export-pull-a.test.ts|src/__tests__/function_9a.test.ts depend-on: - upb - - identifier: l_http_migration_schema_auth_12_schema_auth_3_schema_function_2 + - identifier: l_geo_headless_api_key_migration5_schema_auth_1a buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/transformer-migrations/http-migration.test.ts|src/__tests__/schema-auth-12.test.ts|src/__tests__/schema-auth-3.test.ts|src/__tests__/schema-function-2.test.ts - CLI_REGION: us-east-1 + TEST_SUITE: src/__tests__/geo-headless.test.ts|src/__tests__/migration/api.key.migration5.test.ts|src/__tests__/schema-auth-1a.test.ts depend-on: - upb - - identifier: l_auth_4b_auth_8a_export_pull_d_schema_auth_5a + - identifier: l_schema_auth_5b_schema_auth_8b_schema_auth_9_a buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/auth_4b.test.ts|src/__tests__/auth_8a.test.ts|src/__tests__/export-pull-d.test.ts|src/__tests__/schema-auth-5a.test.ts - CLI_REGION: us-east-1 + TEST_SUITE: src/__tests__/schema-auth-5b.test.ts|src/__tests__/schema-auth-8b.test.ts|src/__tests__/schema-auth-9-a.test.ts depend-on: - upb - - identifier: l_schema_iterative_rollback_2_schema_iterative_update_3_auth_migration_api_2a + - identifier: l_schema_auth_9_c_storage_3_auth_11 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/schema-iterative-rollback-2.test.ts|src/__tests__/schema-iterative-update-3.test.ts|src/__tests__/transformer-migrations/auth-migration.test.ts|src/__tests__/api_2a.test.ts - CLI_REGION: us-west-2 + TEST_SUITE: src/__tests__/schema-auth-9-c.test.ts|src/__tests__/storage-3.test.ts|src/__tests__/auth_11.test.ts depend-on: - upb - - identifier: l_api_2b_api_6c_api_9a_auth_12 + - identifier: l_auth_1b_delete_geo_add_c buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/api_2b.test.ts|src/__tests__/api_6c.test.ts|src/__tests__/api_9a.test.ts|src/__tests__/auth_12.test.ts - CLI_REGION: eu-central-1 + TEST_SUITE: src/__tests__/auth_1b.test.ts|src/__tests__/delete.test.ts|src/__tests__/geo-add-c.test.ts depend-on: - upb - - identifier: l_auth_2g_build_function_custom_resource_with_storage_dynamodb_simulator + - identifier: l_geo_add_d_geo_import_3_hosting buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/auth_2g.test.ts|src/__tests__/build-function.test.ts|src/__tests__/custom-resource-with-storage.test.ts|src/__tests__/dynamodb-simulator/dynamodb-simulator.test.ts - CLI_REGION: us-west-2 + TEST_SUITE: src/__tests__/geo-add-d.test.ts|src/__tests__/geo-import-3.test.ts|src/__tests__/hosting.test.ts depend-on: - upb - - identifier: l_export_pull_c_function_12_function_2d_general_config_headless_init + - identifier: l_layer_3_api_connection_migration_api_key_migration3 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/export-pull-c.test.ts|src/__tests__/function_12.test.ts|src/__tests__/function_2d.test.ts|src/__tests__/general-config/general-config-headless-init.test.ts - CLI_REGION: us-west-2 + TEST_SUITE: src/__tests__/layer-3.test.ts|src/__tests__/migration/api.connection.migration.test.ts|src/__tests__/migration/api.key.migration3.test.ts depend-on: - upb - - identifier: l_help_hooks_c_init_force_push_interactions_1 + - identifier: l_predictions_schema_auth_11_b_schema_auth_1b buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/help.test.ts|src/__tests__/hooks-c.test.ts|src/__tests__/init-force-push.test.ts|src/__tests__/interactions-1.test.ts - CLI_REGION: us-west-2 + TEST_SUITE: src/__tests__/predictions.test.ts|src/__tests__/schema-auth-11-b.test.ts|src/__tests__/schema-auth-1b.test.ts depend-on: - upb - - identifier: l_interactions_2_minify_cloudformation_notifications_multi_env_opensearch_simulator + - identifier: l_schema_auth_2a_schema_auth_7a_schema_auth_7b buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/interactions-2.test.ts|src/__tests__/minify-cloudformation.test.ts|src/__tests__/notifications-multi-env.test.ts|src/__tests__/opensearch-simulator/opensearch-simulator.test.ts - CLI_REGION: us-west-2 + TEST_SUITE: src/__tests__/schema-auth-2a.test.ts|src/__tests__/schema-auth-7a.test.ts|src/__tests__/schema-auth-7b.test.ts depend-on: - upb - - identifier: l_parameter_store_1_parameter_store_2_android_analytics_pinpoint_config_android_notifications_pinpoint_config + - identifier: l_schema_auth_9_b_schema_iterative_rollback_1_predictions_migration buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/parameter-store-1.test.ts|src/__tests__/parameter-store-2.test.ts|src/__tests__/pinpoint/android-analytics-pinpoint-config.test.ts|src/__tests__/pinpoint/android-notifications-pinpoint-config.test.ts - CLI_REGION: us-east-1 + TEST_SUITE: src/__tests__/schema-auth-9-b.test.ts|src/__tests__/schema-iterative-rollback-1.test.ts|src/__tests__/transformer-migrations/predictions-migration.test.ts depend-on: - upb - - identifier: l_flutter_analytics_pinpoint_config_flutter_notifications_pinpoint_config_ios_analytics_pinpoint_config_ios_notifications_pinpo + - identifier: l_api_6a_auth_7b_export_pull_b buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/pinpoint/flutter-analytics-pinpoint-config.test.ts|src/__tests__/pinpoint/flutter-notifications-pinpoint-config.test.ts|src/__tests__/pinpoint/ios-analytics-pinpoint-config.test.ts|src/__tests__/pinpoint/ios-notifications-pinpoint-config.test.ts - CLI_REGION: eu-central-1 + TEST_SUITE: src/__tests__/api_6a.test.ts|src/__tests__/auth_7b.test.ts|src/__tests__/export-pull-b.test.ts depend-on: - upb - - identifier: l_javascript_analytics_pinpoint_config_javascript_notifications_pinpoint_config_pull_2_push + - identifier: l_function_3a_dotnet_function_3a_go_function_3a_nodejs buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/pinpoint/javascript-analytics-pinpoint-config.test.ts|src/__tests__/pinpoint/javascript-notifications-pinpoint-config.test.ts|src/__tests__/pull-2.test.ts|src/__tests__/push.test.ts - CLI_REGION: us-west-2 + TEST_SUITE: src/__tests__/function_3a_dotnet.test.ts|src/__tests__/function_3a_go.test.ts|src/__tests__/function_3a_nodejs.test.ts + depend-on: + - upb + - identifier: l_function_3a_python_init_special_case_http_migration + buildspec: codebuild_specs/run_e2e_tests_linux.yml + env: + variables: + TEST_SUITE: src/__tests__/function_3a_python.test.ts|src/__tests__/init-special-case.test.ts|src/__tests__/transformer-migrations/http-migration.test.ts depend-on: - upb - - identifier: l_smoketest_S3server_api_8_function_8 + - identifier: l_schema_auth_12_schema_auth_3_schema_function_2 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/smoketest.test.ts|src/__tests__/storage-simulator/S3server.test.ts|src/__tests__/api_8.test.ts|src/__tests__/function_8.test.ts - CLI_REGION: ap-southeast-2 + TEST_SUITE: src/__tests__/schema-auth-12.test.ts|src/__tests__/schema-auth-3.test.ts|src/__tests__/schema-function-2.test.ts depend-on: - upb - - identifier: l_schema_iterative_update_locking_api_lambda_auth_2_layer_2_schema_auth_13 + - identifier: l_auth_4b_auth_8a_export_pull_d buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/schema-iterative-update-locking.test.ts|src/__tests__/graphql-v2/api_lambda_auth_2.test.ts|src/__tests__/layer-2.test.ts|src/__tests__/schema-auth-13.test.ts - CLI_REGION: us-east-2 + TEST_SUITE: src/__tests__/auth_4b.test.ts|src/__tests__/auth_8a.test.ts|src/__tests__/export-pull-d.test.ts depend-on: - upb - - identifier: l_function_5_schema_iterative_update_1_auth_6_function_2a + - identifier: l_schema_auth_5a_schema_iterative_rollback_2_schema_iterative_update_3 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/function_5.test.ts|src/__tests__/schema-iterative-update-1.test.ts|src/__tests__/auth_6.test.ts|src/__tests__/function_2a.test.ts - CLI_REGION: ap-southeast-2 + TEST_SUITE: src/__tests__/schema-auth-5a.test.ts|src/__tests__/schema-iterative-rollback-2.test.ts|src/__tests__/schema-iterative-update-3.test.ts depend-on: - upb - - identifier: l_schema_connection_2_schema_function_1_api_9b_custom_policies_container + - identifier: l_auth_migration_amplify_remove_api_2a buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/schema-connection-2.test.ts|src/__tests__/schema-function-1.test.ts|src/__tests__/api_9b.test.ts|src/__tests__/custom_policies_container.test.ts - CLI_REGION: ap-southeast-1 + TEST_SUITE: src/__tests__/transformer-migrations/auth-migration.test.ts|src/__tests__/amplify-remove.test.ts|src/__tests__/api_2a.test.ts depend-on: - upb - - identifier: l_function_9b_schema_iterative_update_2_storage_1a_storage_1b + - identifier: l_api_2b_api_6c_api_9a buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/function_9b.test.ts|src/__tests__/schema-iterative-update-2.test.ts|src/__tests__/storage-1a.test.ts|src/__tests__/storage-1b.test.ts - CLI_REGION: ap-northeast-1 + TEST_SUITE: src/__tests__/api_2b.test.ts|src/__tests__/api_6c.test.ts|src/__tests__/api_9a.test.ts depend-on: - upb - - identifier: l_function_11_function_2b_function_7_api_connection_migration2 + - identifier: l_auth_12_auth_2g_auth_2h buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/function_11.test.ts|src/__tests__/function_2b.test.ts|src/__tests__/function_7.test.ts|src/__tests__/migration/api.connection.migration2.test.ts - CLI_REGION: ap-northeast-1 + TEST_SUITE: src/__tests__/auth_12.test.ts|src/__tests__/auth_2g.test.ts|src/__tests__/auth_2h.test.ts depend-on: - upb - - identifier: l_api_4_containers_api_secrets_storage_4_schema_auth_10 + - identifier: l_auth_5g_admin_api_hosted_ui buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/api_4.test.ts|src/__tests__/containers-api-secrets.test.ts|src/__tests__/storage-4.test.ts|src/__tests__/schema-auth-10.test.ts - CLI_REGION: ap-southeast-1 + TEST_SUITE: src/__tests__/auth_5g.test.ts|src/__tests__/auth/admin-api.test.ts|src/__tests__/auth/hosted-ui.test.ts depend-on: - upb - - identifier: l_geo_multi_env_searchable_datastore_resolvers_schema_key + - identifier: l_user_groups_s3_access_user_groups_build_function_yarn_modern buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/geo-multi-env.test.ts|src/__tests__/graphql-v2/searchable-datastore.test.ts|src/__tests__/resolvers.test.ts|src/__tests__/schema-key.test.ts - CLI_REGION: us-east-2 + TEST_SUITE: src/__tests__/auth/user-groups-s3-access.test.ts|src/__tests__/auth/user-groups.test.ts|src/__tests__/build-function-yarn-modern.test.ts depend-on: - upb - - identifier: l_api_5_apigw_api_lambda_auth_1_api_key_migration2 + - identifier: l_build_function_custom_resource_with_storage_dynamodb_simulator buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/api_5.test.ts|src/__tests__/apigw.test.ts|src/__tests__/graphql-v2/api_lambda_auth_1.test.ts|src/__tests__/migration/api.key.migration2.test.ts + TEST_SUITE: src/__tests__/build-function.test.ts|src/__tests__/custom-resource-with-storage.test.ts|src/__tests__/dynamodb-simulator/dynamodb-simulator.test.ts CLI_REGION: us-west-2 depend-on: - upb - - identifier: l_schema_searchable_api_key_migration1_schema_auth_14_api_3 + - identifier: l_export_pull_c_function_12_function_13 + buildspec: codebuild_specs/run_e2e_tests_linux.yml + env: + variables: + TEST_SUITE: src/__tests__/export-pull-c.test.ts|src/__tests__/function_12.test.ts|src/__tests__/function_13.test.ts + depend-on: + - upb + - identifier: l_function_14_function_15_function_2d + buildspec: codebuild_specs/run_e2e_tests_linux.yml + env: + variables: + TEST_SUITE: src/__tests__/function_14.test.ts|src/__tests__/function_15.test.ts|src/__tests__/function_2d.test.ts + depend-on: + - upb + - identifier: l_general_config_headless_init_help_hooks_c buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/schema-searchable.test.ts|src/__tests__/migration/api.key.migration1.test.ts|src/__tests__/schema-auth-14.test.ts|src/__tests__/api_3.test.ts - CLI_REGION: us-east-2 + TEST_SUITE: src/__tests__/general-config/general-config-headless-init.test.ts|src/__tests__/help.test.ts|src/__tests__/hooks-c.test.ts depend-on: - upb - - identifier: l_api_6b_api_1_layer_1_api_key_migration4 + - identifier: l_init_force_push_interactions_1_interactions_2 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/api_6b.test.ts|src/__tests__/api_1.test.ts|src/__tests__/layer-1.test.ts|src/__tests__/migration/api.key.migration4.test.ts + TEST_SUITE: src/__tests__/init-force-push.test.ts|src/__tests__/interactions-1.test.ts|src/__tests__/interactions-2.test.ts CLI_REGION: us-west-2 depend-on: - upb - - identifier: l_schema_iterative_update_4_function_1_storage_5 + - identifier: l_minify_cloudformation_notifications_multi_env_notifications_sms_update + buildspec: codebuild_specs/run_e2e_tests_linux.yml + env: + variables: + TEST_SUITE: src/__tests__/minify-cloudformation.test.ts|src/__tests__/notifications-multi-env.test.ts|src/__tests__/notifications-sms-update.test.ts + depend-on: + - upb + - identifier: l_opensearch_simulator_parameter_store_1_parameter_store_2 + buildspec: codebuild_specs/run_e2e_tests_linux.yml + env: + variables: + TEST_SUITE: src/__tests__/opensearch-simulator/opensearch-simulator.test.ts|src/__tests__/parameter-store-1.test.ts|src/__tests__/parameter-store-2.test.ts + depend-on: + - upb + - identifier: l_android_analytics_pinpoint_config_android_notifications_pinpoint_config_flutter_analytics_pinpoint_config + buildspec: codebuild_specs/run_e2e_tests_linux.yml + env: + variables: + TEST_SUITE: src/__tests__/pinpoint/android-analytics-pinpoint-config.test.ts|src/__tests__/pinpoint/android-notifications-pinpoint-config.test.ts|src/__tests__/pinpoint/flutter-analytics-pinpoint-config.test.ts + depend-on: + - upb + - identifier: l_flutter_notifications_pinpoint_config_ios_analytics_pinpoint_config_ios_notifications_pinpoint_config + buildspec: codebuild_specs/run_e2e_tests_linux.yml + env: + variables: + TEST_SUITE: src/__tests__/pinpoint/flutter-notifications-pinpoint-config.test.ts|src/__tests__/pinpoint/ios-analytics-pinpoint-config.test.ts|src/__tests__/pinpoint/ios-notifications-pinpoint-config.test.ts + depend-on: + - upb + - identifier: l_javascript_analytics_pinpoint_config_javascript_notifications_pinpoint_config_pr_previews_multi_env_1 + buildspec: codebuild_specs/run_e2e_tests_linux.yml + env: + variables: + TEST_SUITE: src/__tests__/pinpoint/javascript-analytics-pinpoint-config.test.ts|src/__tests__/pinpoint/javascript-notifications-pinpoint-config.test.ts|src/__tests__/pr-previews-multi-env-1.test.ts + depend-on: + - upb + - identifier: l_pull_2_push_smoketest_ios + buildspec: codebuild_specs/run_e2e_tests_linux.yml + env: + variables: + TEST_SUITE: src/__tests__/pull-2.test.ts|src/__tests__/push.test.ts|src/__tests__/smoke-tests/smoketest-ios.test.ts + depend-on: + - upb + - identifier: l_smoketest_S3server_api_8 + buildspec: codebuild_specs/run_e2e_tests_linux.yml + env: + variables: + TEST_SUITE: src/__tests__/smoke-tests/smoketest.test.ts|src/__tests__/storage-simulator/S3server.test.ts|src/__tests__/api_8.test.ts + depend-on: + - upb + - identifier: l_function_8_schema_iterative_update_locking_api_lambda_auth_2 + buildspec: codebuild_specs/run_e2e_tests_linux.yml + env: + variables: + TEST_SUITE: src/__tests__/function_8.test.ts|src/__tests__/schema-iterative-update-locking.test.ts|src/__tests__/graphql-v2/api_lambda_auth_2.test.ts + depend-on: + - upb + - identifier: l_layer_2_schema_auth_13_function_5 + buildspec: codebuild_specs/run_e2e_tests_linux.yml + env: + variables: + TEST_SUITE: src/__tests__/layer-2.test.ts|src/__tests__/schema-auth-13.test.ts|src/__tests__/function_5.test.ts + depend-on: + - upb + - identifier: l_schema_iterative_update_1_auth_6_function_2a + buildspec: codebuild_specs/run_e2e_tests_linux.yml + env: + variables: + TEST_SUITE: src/__tests__/schema-iterative-update-1.test.ts|src/__tests__/auth_6.test.ts|src/__tests__/function_2a.test.ts + depend-on: + - upb + - identifier: l_schema_connection_2_schema_function_1_api_9b + buildspec: codebuild_specs/run_e2e_tests_linux.yml + env: + variables: + TEST_SUITE: src/__tests__/schema-connection-2.test.ts|src/__tests__/schema-function-1.test.ts|src/__tests__/api_9b.test.ts + depend-on: + - upb + - identifier: l_custom_policies_container_function_9b_schema_iterative_update_2 + buildspec: codebuild_specs/run_e2e_tests_linux.yml + env: + variables: + TEST_SUITE: src/__tests__/custom_policies_container.test.ts|src/__tests__/function_9b.test.ts|src/__tests__/schema-iterative-update-2.test.ts + depend-on: + - upb + - identifier: l_storage_1a_storage_1b_function_11 + buildspec: codebuild_specs/run_e2e_tests_linux.yml + env: + variables: + TEST_SUITE: src/__tests__/storage-1a.test.ts|src/__tests__/storage-1b.test.ts|src/__tests__/function_11.test.ts + depend-on: + - upb + - identifier: l_function_2b_function_7_api_connection_migration2 + buildspec: codebuild_specs/run_e2e_tests_linux.yml + env: + variables: + TEST_SUITE: src/__tests__/function_2b.test.ts|src/__tests__/function_7.test.ts|src/__tests__/migration/api.connection.migration2.test.ts + depend-on: + - upb + - identifier: l_api_4_containers_api_secrets_storage_4 + buildspec: codebuild_specs/run_e2e_tests_linux.yml + env: + variables: + TEST_SUITE: src/__tests__/api_4.test.ts|src/__tests__/containers-api-secrets.test.ts|src/__tests__/storage-4.test.ts + depend-on: + - upb + - identifier: l_schema_auth_10_geo_multi_env_searchable_datastore + buildspec: codebuild_specs/run_e2e_tests_linux.yml + env: + variables: + TEST_SUITE: src/__tests__/schema-auth-10.test.ts|src/__tests__/geo-multi-env.test.ts|src/__tests__/graphql-v2/searchable-datastore.test.ts + depend-on: + - upb + - identifier: l_resolvers_schema_key_api_5 + buildspec: codebuild_specs/run_e2e_tests_linux.yml + env: + variables: + TEST_SUITE: src/__tests__/resolvers.test.ts|src/__tests__/schema-key.test.ts|src/__tests__/api_5.test.ts + depend-on: + - upb + - identifier: l_apigw_api_lambda_auth_1_api_key_migration2 + buildspec: codebuild_specs/run_e2e_tests_linux.yml + env: + variables: + TEST_SUITE: src/__tests__/apigw.test.ts|src/__tests__/graphql-v2/api_lambda_auth_1.test.ts|src/__tests__/migration/api.key.migration2.test.ts + depend-on: + - upb + - identifier: l_schema_searchable_api_key_migration1_schema_auth_14 + buildspec: codebuild_specs/run_e2e_tests_linux.yml + env: + variables: + TEST_SUITE: src/__tests__/schema-searchable.test.ts|src/__tests__/migration/api.key.migration1.test.ts|src/__tests__/schema-auth-14.test.ts + depend-on: + - upb + - identifier: l_api_3_api_6b_api_1 + buildspec: codebuild_specs/run_e2e_tests_linux.yml + env: + variables: + TEST_SUITE: src/__tests__/api_3.test.ts|src/__tests__/api_6b.test.ts|src/__tests__/api_1.test.ts + depend-on: + - upb + - identifier: l_layer_1_api_key_migration4_schema_iterative_update_4 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/schema-iterative-update-4.test.ts|src/__tests__/function_1.test.ts|src/__tests__/storage-5.test.ts - CLI_REGION: us-east-2 + TEST_SUITE: src/__tests__/layer-1.test.ts|src/__tests__/migration/api.key.migration4.test.ts|src/__tests__/schema-iterative-update-4.test.ts + depend-on: + - upb + - identifier: l_function_1_storage_5 + buildspec: codebuild_specs/run_e2e_tests_linux.yml + env: + variables: + TEST_SUITE: src/__tests__/function_1.test.ts|src/__tests__/storage-5.test.ts + depend-on: + - upb + - identifier: l_datastore_modelgen + buildspec: codebuild_specs/run_e2e_tests_linux.yml + env: + variables: + compute-type: BUILD_GENERAL1_SMALL + TEST_SUITE: src/__tests__/datastore-modelgen.test.ts + DISABLE_COVERAGE: 1 + depend-on: + - upb + - identifier: l_amplify_app + buildspec: codebuild_specs/run_e2e_tests_linux.yml + env: + variables: + compute-type: BUILD_GENERAL1_SMALL + TEST_SUITE: src/__tests__/amplify-app.test.ts + DISABLE_COVERAGE: 1 depend-on: - upb - identifier: l_auth_2c buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/auth_2c.test.ts - CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_auth_2e buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/auth_2e.test.ts - CLI_REGION: eu-central-1 + depend-on: + - upb + - identifier: l_uibuilder + buildspec: codebuild_specs/run_e2e_tests_linux.yml + env: + variables: + compute-type: BUILD_GENERAL1_SMALL + TEST_SUITE: src/__tests__/uibuilder.test.ts depend-on: - upb - identifier: l_geo_remove_3 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/geo-remove-3.test.ts - CLI_REGION: us-east-1 depend-on: - upb - identifier: l_geo_add_f buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/geo-add-f.test.ts - CLI_REGION: us-east-2 depend-on: - upb - identifier: l_geo_add_e buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/geo-add-e.test.ts - CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_import_dynamodb_2c buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_dynamodb_2c.test.ts - CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_env_3 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/env-3.test.ts - CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_geo_remove_2 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/geo-remove-2.test.ts - CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_notifications_in_app_messaging buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/notifications-in-app-messaging.test.ts - CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_import_auth_2a buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_auth_2a.test.ts - CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_import_auth_1a buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_auth_1a.test.ts - CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_import_auth_2b buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_auth_2b.test.ts - CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_import_s3_2a buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_s3_2a.test.ts - CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_import_s3_2c buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_s3_2c.test.ts - CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_import_auth_1b buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_auth_1b.test.ts - CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_schema_auth_11_a buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/schema-auth-11-a.test.ts - CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_geo_update_1 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/geo-update-1.test.ts - CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_geo_update_2 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/geo-update-2.test.ts - CLI_REGION: us-east-1 depend-on: - upb - identifier: l_import_s3_3 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_s3_3.test.ts - CLI_REGION: us-west-2 + depend-on: + - upb + - identifier: l_js_frontend_config + buildspec: codebuild_specs/run_e2e_tests_linux.yml + env: + variables: + compute-type: BUILD_GENERAL1_SMALL + TEST_SUITE: src/__tests__/aws-exports/js-frontend-config.test.ts depend-on: - upb - identifier: l_import_dynamodb_2b buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_dynamodb_2b.test.ts - CLI_REGION: eu-central-1 + depend-on: + - upb + - identifier: l_smoketest_amplify_app + buildspec: codebuild_specs/run_e2e_tests_linux.yml + env: + variables: + compute-type: BUILD_GENERAL1_SMALL + TEST_SUITE: src/__tests__/smoke-tests/smoketest-amplify-app.test.ts + DISABLE_COVERAGE: 1 depend-on: - upb - identifier: l_hostingPROD buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/hostingPROD.test.ts - CLI_REGION: us-west-2 depend-on: - upb - identifier: l_import_s3_2b buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_s3_2b.test.ts - CLI_REGION: us-east-2 depend-on: - upb - identifier: l_containers_api_1 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/containers-api-1.test.ts - CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_schema_auth_15 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/schema-auth-15.test.ts - CLI_REGION: us-east-2 depend-on: - upb - identifier: l_schema_connection_1 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/schema-connection-1.test.ts - CLI_REGION: us-west-2 depend-on: - upb - identifier: l_import_auth_3 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_auth_3.test.ts - CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_import_dynamodb_2a buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_dynamodb_2a.test.ts - CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_containers_api_2 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/containers-api-2.test.ts - CLI_REGION: us-east-1 depend-on: - upb - identifier: l_import_s3_1 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_s3_1.test.ts - CLI_REGION: ap-southeast-2 USE_PARENT_ACCOUNT: 1 depend-on: - upb @@ -818,8 +1025,8 @@ batch: buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/transformer-migrations/searchable-migration.test.ts - CLI_REGION: us-east-2 USE_PARENT_ACCOUNT: 1 depend-on: - upb @@ -827,986 +1034,1283 @@ batch: buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/geo-remove-1.test.ts - CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_import_dynamodb_1 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: + compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_dynamodb_1.test.ts - CLI_REGION: ap-southeast-2 USE_PARENT_ACCOUNT: 1 depend-on: - upb - - identifier: w_analytics_kinesis_analytics_pinpoint_flutter_analytics_pinpoint_js_auth_2a + - identifier: w_analytics_kinesis_analytics_pinpoint_flutter buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/analytics-kinesis.test.ts|src/__tests__/analytics-pinpoint-flutter.test.ts|src/__tests__/analytics-pinpoint-js.test.ts|src/__tests__/auth_2a.test.ts - CLI_REGION: eu-central-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/analytics-kinesis.test.ts|src/__tests__/analytics-pinpoint-flutter.test.ts depend-on: - build_windows - upb - - identifier: w_auth_2b_auth_2d_auth_2f_notifications_lifecycle + - identifier: w_analytics_pinpoint_js_auth_2a buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/auth_2b.test.ts|src/__tests__/auth_2d.test.ts|src/__tests__/auth_2f.test.ts|src/__tests__/notifications-lifecycle.test.ts - CLI_REGION: us-east-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/analytics-pinpoint-js.test.ts|src/__tests__/auth_2a.test.ts depend-on: - build_windows - upb - - identifier: w_notifications_analytics_compatibility_in_app_1_notifications_analytics_compatibility_sms_2_analytics_2_global_sandbox_c + - identifier: w_auth_2b_auth_2d buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/notifications-analytics-compatibility-in-app-1.test.ts|src/__tests__/notifications-analytics-compatibility-sms-2.test.ts|src/__tests__/analytics-2.test.ts|src/__tests__/global_sandbox-c.test.ts - CLI_REGION: ap-northeast-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/auth_2b.test.ts|src/__tests__/auth_2d.test.ts depend-on: - build_windows - upb - - identifier: w_hooks_b_notifications_analytics_compatibility_sms_1_plugin_studio_modelgen + - identifier: w_auth_2f_notifications_lifecycle buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/hooks-b.test.ts|src/__tests__/notifications-analytics-compatibility-sms-1.test.ts|src/__tests__/plugin.test.ts|src/__tests__/studio-modelgen.test.ts - CLI_REGION: ap-southeast-2 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/auth_2f.test.ts|src/__tests__/notifications-lifecycle.test.ts depend-on: - build_windows - upb - - identifier: w_custom_transformers_notifications_in_app_messaging_env_1_notifications_sms_pull_auth_10 + - identifier: w_notifications_analytics_compatibility_in_app_1_notifications_analytics_compatibility_sms_2 buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/graphql-v2/custom-transformers.test.ts|src/__tests__/notifications-in-app-messaging-env-1.test.ts|src/__tests__/notifications-sms-pull.test.ts|src/__tests__/auth_10.test.ts - CLI_REGION: ap-southeast-2 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/notifications-analytics-compatibility-in-app-1.test.ts|src/__tests__/notifications-analytics-compatibility-sms-2.test.ts depend-on: - build_windows - upb - - identifier: w_container_hosting_init_b_notifications_apns_notifications_fcm + - identifier: w_analytics_2_global_sandbox_c buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/container-hosting.test.ts|src/__tests__/init_b.test.ts|src/__tests__/notifications-apns.test.ts|src/__tests__/notifications-fcm.test.ts - CLI_REGION: ap-southeast-2 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/analytics-2.test.ts|src/__tests__/global_sandbox-c.test.ts depend-on: - build_windows - upb - - identifier: w_notifications_in_app_messaging_env_2_with_babel_config_amplify_configure_init_d + - identifier: w_hooks_b_notifications_analytics_compatibility_sms_1 buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/notifications-in-app-messaging-env-2.test.ts|src/__tests__/with-babel-config.test.ts|src/__tests__/amplify-configure.test.ts|src/__tests__/init_d.test.ts - CLI_REGION: us-east-2 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/hooks-b.test.ts|src/__tests__/notifications-analytics-compatibility-sms-1.test.ts depend-on: - build_windows - upb - - identifier: w_init_f_auth_5d_configure_project_init_c + - identifier: w_plugin_studio_modelgen buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/init_f.test.ts|src/__tests__/auth_5d.test.ts|src/__tests__/configure-project.test.ts|src/__tests__/init_c.test.ts - CLI_REGION: us-east-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/plugin.test.ts|src/__tests__/studio-modelgen.test.ts depend-on: - build_windows - upb - - identifier: w_layer_4_function_2c_interactions_schema_model_a + - identifier: w_custom_transformers_notifications_in_app_messaging_env_1 buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/layer-4.test.ts|src/__tests__/function_2c.test.ts|src/__tests__/interactions.test.ts|src/__tests__/schema-model-a.test.ts - CLI_REGION: us-west-2 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/graphql-v2/custom-transformers.test.ts|src/__tests__/notifications-in-app-messaging-env-1.test.ts depend-on: - build_windows - upb - - identifier: w_tags_auth_1a_auth_trigger_custom_policies_function + - identifier: w_notifications_sms_pull_auth_10 buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/tags.test.ts|src/__tests__/auth_1a.test.ts|src/__tests__/auth-trigger.test.ts|src/__tests__/custom_policies_function.test.ts - CLI_REGION: eu-west-2 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/notifications-sms-pull.test.ts|src/__tests__/auth_10.test.ts depend-on: - build_windows - upb - - identifier: w_storage_2_iam_permissions_boundary_node_function_notifications_sms + - identifier: w_container_hosting_init_b buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/storage-2.test.ts|src/__tests__/iam-permissions-boundary.test.ts|src/__tests__/migration/node.function.test.ts|src/__tests__/notifications-sms.test.ts - CLI_REGION: ap-southeast-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/container-hosting.test.ts|src/__tests__/init_b.test.ts depend-on: - build_windows - upb - - identifier: w_schema_auth_4b_schema_model_e_schema_versioned_auth_1c + - identifier: w_notifications_apns_notifications_fcm buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/schema-auth-4b.test.ts|src/__tests__/schema-model-e.test.ts|src/__tests__/schema-versioned.test.ts|src/__tests__/auth_1c.test.ts - CLI_REGION: ap-southeast-2 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/notifications-apns.test.ts|src/__tests__/notifications-fcm.test.ts depend-on: - build_windows - upb - - identifier: w_auth_5e_auth_8b_geo_add_b_s3_sse + - identifier: w_notifications_in_app_messaging_env_2_with_babel_config buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/auth_5e.test.ts|src/__tests__/auth_8b.test.ts|src/__tests__/geo-add-b.test.ts|src/__tests__/s3-sse.test.ts - CLI_REGION: ap-northeast-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/notifications-in-app-messaging-env-2.test.ts|src/__tests__/with-babel-config.test.ts depend-on: - build_windows - upb - - identifier: w_schema_auth_4a_schema_model_b_schema_model_d_auth_5f + - identifier: w_amplify_configure_init_d buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/schema-auth-4a.test.ts|src/__tests__/schema-model-b.test.ts|src/__tests__/schema-model-d.test.ts|src/__tests__/auth_5f.test.ts - CLI_REGION: ap-northeast-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/amplify-configure.test.ts|src/__tests__/init_d.test.ts depend-on: - build_windows - upb - - identifier: w_env_4_frontend_config_drift_schema_auth_4d_schema_auth_6a + - identifier: w_init_f_auth_5d buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/env-4.test.ts|src/__tests__/frontend_config_drift.test.ts|src/__tests__/schema-auth-4d.test.ts|src/__tests__/schema-auth-6a.test.ts - CLI_REGION: eu-central-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/init_f.test.ts|src/__tests__/auth_5d.test.ts depend-on: - build_windows - upb - - identifier: w_schema_data_access_patterns_schema_model_c_schema_predictions_model_migration + - identifier: w_configure_project_init_c buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/schema-data-access-patterns.test.ts|src/__tests__/schema-model-c.test.ts|src/__tests__/schema-predictions.test.ts|src/__tests__/transformer-migrations/model-migration.test.ts - CLI_REGION: us-east-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/configure-project.test.ts|src/__tests__/init_c.test.ts depend-on: - build_windows - upb - - identifier: w_auth_3c_auth_4c_auth_5a_auth_5c + - identifier: w_layer_4_function_2c buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/auth_3c.test.ts|src/__tests__/auth_4c.test.ts|src/__tests__/auth_5a.test.ts|src/__tests__/auth_5c.test.ts - CLI_REGION: ap-southeast-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/layer-4.test.ts|src/__tests__/function_2c.test.ts depend-on: - build_windows - upb - - identifier: w_env_1_geo_add_a_init_a_schema_auth_4c + - identifier: w_interactions_schema_model_a buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/env-1.test.ts|src/__tests__/geo-add-a.test.ts|src/__tests__/init_a.test.ts|src/__tests__/schema-auth-4c.test.ts - CLI_REGION: us-east-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/interactions.test.ts|src/__tests__/schema-model-a.test.ts + CLI_REGION: us-west-2 depend-on: - build_windows - upb - - identifier: w_schema_auth_5c_auth_5b_auth_9_custom_resources + - identifier: w_tags_auth_1a buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/schema-auth-5c.test.ts|src/__tests__/auth_5b.test.ts|src/__tests__/auth_9.test.ts|src/__tests__/custom_resources.test.ts - CLI_REGION: us-east-2 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/tags.test.ts|src/__tests__/auth_1a.test.ts depend-on: - build_windows - upb - - identifier: w_env_5_function_10_function_9c_function_permissions + - identifier: w_auth_trigger_custom_policies_function buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/env-5.test.ts|src/__tests__/function_10.test.ts|src/__tests__/function_9c.test.ts|src/__tests__/function-permissions.test.ts - CLI_REGION: us-east-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/auth-trigger.test.ts|src/__tests__/custom_policies_function.test.ts depend-on: - build_windows - upb - - identifier: w_geo_import_1a_geo_import_2_global_sandbox_b_schema_auth_5d + - identifier: w_storage_2_iam_permissions_boundary buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/geo-import-1a.test.ts|src/__tests__/geo-import-2.test.ts|src/__tests__/global_sandbox-b.test.ts|src/__tests__/schema-auth-5d.test.ts - CLI_REGION: ap-northeast-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/storage-2.test.ts|src/__tests__/iam-permissions-boundary.test.ts depend-on: - build_windows - upb - - identifier: w_schema_auth_6b_schema_auth_8c_auth_3a_auth_3b + - identifier: w_node_function_notifications_sms buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/schema-auth-6b.test.ts|src/__tests__/schema-auth-8c.test.ts|src/__tests__/auth_3a.test.ts|src/__tests__/auth_3b.test.ts - CLI_REGION: us-west-2 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/migration/node.function.test.ts|src/__tests__/notifications-sms.test.ts depend-on: - build_windows - upb - - identifier: w_auth_4a_auth_7a_auth_8c_feature_flags + - identifier: w_schema_auth_4b_schema_model_e buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/auth_4a.test.ts|src/__tests__/auth_7a.test.ts|src/__tests__/auth_8c.test.ts|src/__tests__/feature-flags.test.ts - CLI_REGION: us-west-2 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/schema-auth-4b.test.ts|src/__tests__/schema-model-e.test.ts depend-on: - build_windows - upb - - identifier: w_geo_import_1b_global_sandbox_a_init_e_notifications_analytics_compatibility_in_app_2 + - identifier: w_schema_versioned_auth_1c buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/geo-import-1b.test.ts|src/__tests__/global_sandbox-a.test.ts|src/__tests__/init_e.test.ts|src/__tests__/notifications-analytics-compatibility-in-app-2.test.ts - CLI_REGION: eu-west-2 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/schema-versioned.test.ts|src/__tests__/auth_1c.test.ts depend-on: - build_windows - upb - - identifier: w_schema_auth_11_c_schema_auth_2b_schema_auth_6c_schema_auth_6d + - identifier: w_auth_5e_auth_8b buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/schema-auth-11-c.test.ts|src/__tests__/schema-auth-2b.test.ts|src/__tests__/schema-auth-6c.test.ts|src/__tests__/schema-auth-6d.test.ts - CLI_REGION: us-east-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/auth_5e.test.ts|src/__tests__/auth_8b.test.ts depend-on: - build_windows - upb - - identifier: w_schema_auth_7c_schema_auth_8a_function_migration_api_10 + - identifier: w_geo_add_b_s3_sse buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/schema-auth-7c.test.ts|src/__tests__/schema-auth-8a.test.ts|src/__tests__/transformer-migrations/function-migration.test.ts|src/__tests__/api_10.test.ts - CLI_REGION: eu-central-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/geo-add-b.test.ts|src/__tests__/s3-sse.test.ts depend-on: - build_windows - upb - - identifier: w_api_7_export_pull_a_function_9a_geo_headless + - identifier: w_schema_auth_4a_schema_model_b buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/api_7.test.ts|src/__tests__/export-pull-a.test.ts|src/__tests__/function_9a.test.ts|src/__tests__/geo-headless.test.ts - CLI_REGION: us-east-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/schema-auth-4a.test.ts|src/__tests__/schema-model-b.test.ts depend-on: - build_windows - upb - - identifier: w_api_key_migration5_schema_auth_1a_schema_auth_5b_schema_auth_8b + - identifier: w_schema_model_d_auth_5f buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/migration/api.key.migration5.test.ts|src/__tests__/schema-auth-1a.test.ts|src/__tests__/schema-auth-5b.test.ts|src/__tests__/schema-auth-8b.test.ts - CLI_REGION: eu-west-2 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/schema-model-d.test.ts|src/__tests__/auth_5f.test.ts depend-on: - build_windows - upb - - identifier: w_schema_auth_9_a_schema_auth_9_c_storage_3_auth_11 + - identifier: w_env_4_frontend_config_drift buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/schema-auth-9-a.test.ts|src/__tests__/schema-auth-9-c.test.ts|src/__tests__/storage-3.test.ts|src/__tests__/auth_11.test.ts - CLI_REGION: ap-southeast-2 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/env-4.test.ts|src/__tests__/frontend_config_drift.test.ts depend-on: - build_windows - upb - - identifier: w_auth_1b_delete_geo_add_c_geo_add_d + - identifier: w_schema_auth_4d_schema_auth_6a buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/auth_1b.test.ts|src/__tests__/delete.test.ts|src/__tests__/geo-add-c.test.ts|src/__tests__/geo-add-d.test.ts - CLI_REGION: us-east-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/schema-auth-4d.test.ts|src/__tests__/schema-auth-6a.test.ts depend-on: - build_windows - upb - - identifier: w_geo_import_3_hosting_layer_3_api_connection_migration + - identifier: w_schema_data_access_patterns_schema_model_c buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/geo-import-3.test.ts|src/__tests__/hosting.test.ts|src/__tests__/layer-3.test.ts|src/__tests__/migration/api.connection.migration.test.ts - CLI_REGION: eu-west-2 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/schema-data-access-patterns.test.ts|src/__tests__/schema-model-c.test.ts depend-on: - build_windows - upb - - identifier: w_api_key_migration3_predictions_schema_auth_11_b_schema_auth_1b + - identifier: w_schema_predictions_model_migration buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/migration/api.key.migration3.test.ts|src/__tests__/predictions.test.ts|src/__tests__/schema-auth-11-b.test.ts|src/__tests__/schema-auth-1b.test.ts - CLI_REGION: eu-central-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/schema-predictions.test.ts|src/__tests__/transformer-migrations/model-migration.test.ts depend-on: - build_windows - upb - - identifier: w_schema_auth_2a_schema_auth_7a_schema_auth_7b_schema_auth_9_b + - identifier: w_auth_3c_auth_4c buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/schema-auth-2a.test.ts|src/__tests__/schema-auth-7a.test.ts|src/__tests__/schema-auth-7b.test.ts|src/__tests__/schema-auth-9-b.test.ts - CLI_REGION: us-west-2 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/auth_3c.test.ts|src/__tests__/auth_4c.test.ts depend-on: - build_windows - upb - - identifier: w_predictions_migration_api_6a_auth_7b_export_pull_b + - identifier: w_auth_5a_auth_5c buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/transformer-migrations/predictions-migration.test.ts|src/__tests__/api_6a.test.ts|src/__tests__/auth_7b.test.ts|src/__tests__/export-pull-b.test.ts - CLI_REGION: us-east-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/auth_5a.test.ts|src/__tests__/auth_5c.test.ts depend-on: - build_windows - upb - - identifier: w_init_special_case_http_migration_schema_auth_12_schema_auth_3 + - identifier: w_env_1_geo_add_a buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/init-special-case.test.ts|src/__tests__/transformer-migrations/http-migration.test.ts|src/__tests__/schema-auth-12.test.ts|src/__tests__/schema-auth-3.test.ts - CLI_REGION: eu-central-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/env-1.test.ts|src/__tests__/geo-add-a.test.ts depend-on: - build_windows - upb - - identifier: w_schema_function_2_auth_4b_auth_8a_export_pull_d + - identifier: w_init_a_schema_auth_4c buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/schema-function-2.test.ts|src/__tests__/auth_4b.test.ts|src/__tests__/auth_8a.test.ts|src/__tests__/export-pull-d.test.ts - CLI_REGION: us-east-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/init_a.test.ts|src/__tests__/schema-auth-4c.test.ts depend-on: - build_windows - upb - - identifier: w_schema_auth_5a_schema_iterative_update_3_auth_migration_api_2a + - identifier: w_schema_auth_5c_auth_5b buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/schema-auth-5a.test.ts|src/__tests__/schema-iterative-update-3.test.ts|src/__tests__/transformer-migrations/auth-migration.test.ts|src/__tests__/api_2a.test.ts - CLI_REGION: us-east-2 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/schema-auth-5c.test.ts|src/__tests__/auth_5b.test.ts depend-on: - build_windows - upb - - identifier: w_api_2b_api_6c_api_9a_auth_2g + - identifier: w_auth_9_env_5 buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/api_2b.test.ts|src/__tests__/api_6c.test.ts|src/__tests__/api_9a.test.ts|src/__tests__/auth_2g.test.ts - CLI_REGION: eu-west-2 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/auth_9.test.ts|src/__tests__/env-5.test.ts depend-on: - build_windows - upb - - identifier: w_build_function_custom_resource_with_storage_dynamodb_simulator_export_pull_c + - identifier: w_function_10_function_9c buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/build-function.test.ts|src/__tests__/custom-resource-with-storage.test.ts|src/__tests__/dynamodb-simulator/dynamodb-simulator.test.ts|src/__tests__/export-pull-c.test.ts - CLI_REGION: us-west-2 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/function_10.test.ts|src/__tests__/function_9c.test.ts depend-on: - build_windows - upb - - identifier: w_function_12_function_2d_general_config_headless_init_help + - identifier: w_function_permissions_geo_import_1a buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/function_12.test.ts|src/__tests__/function_2d.test.ts|src/__tests__/general-config/general-config-headless-init.test.ts|src/__tests__/help.test.ts - CLI_REGION: ap-southeast-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/function-permissions.test.ts|src/__tests__/geo-import-1a.test.ts depend-on: - build_windows - upb - - identifier: w_hooks_c_init_force_push_interactions_1_interactions_2 + - identifier: w_geo_import_2_global_sandbox_b buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/hooks-c.test.ts|src/__tests__/init-force-push.test.ts|src/__tests__/interactions-1.test.ts|src/__tests__/interactions-2.test.ts - CLI_REGION: us-west-2 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/geo-import-2.test.ts|src/__tests__/global_sandbox-b.test.ts depend-on: - build_windows - upb - - identifier: w_minify_cloudformation_notifications_multi_env_parameter_store_1_parameter_store_2 + - identifier: w_schema_auth_5d_schema_auth_6b buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/minify-cloudformation.test.ts|src/__tests__/notifications-multi-env.test.ts|src/__tests__/parameter-store-1.test.ts|src/__tests__/parameter-store-2.test.ts - CLI_REGION: us-west-2 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/schema-auth-5d.test.ts|src/__tests__/schema-auth-6b.test.ts depend-on: - build_windows - upb - - identifier: w_pull_2_push_smoketest_api_8 + - identifier: w_schema_auth_8c_auth_3a buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/pull-2.test.ts|src/__tests__/push.test.ts|src/__tests__/smoketest.test.ts|src/__tests__/api_8.test.ts - CLI_REGION: eu-central-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/schema-auth-8c.test.ts|src/__tests__/auth_3a.test.ts depend-on: - build_windows - upb - - identifier: w_schema_iterative_update_locking_api_lambda_auth_2_schema_auth_13_function_5 + - identifier: w_auth_3b_auth_4a buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/schema-iterative-update-locking.test.ts|src/__tests__/graphql-v2/api_lambda_auth_2.test.ts|src/__tests__/schema-auth-13.test.ts|src/__tests__/function_5.test.ts - CLI_REGION: eu-central-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/auth_3b.test.ts|src/__tests__/auth_4a.test.ts depend-on: - build_windows - upb - - identifier: w_schema_iterative_update_1_auth_6_function_2a_schema_connection_2 + - identifier: w_auth_7a_auth_8c buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/schema-iterative-update-1.test.ts|src/__tests__/auth_6.test.ts|src/__tests__/function_2a.test.ts|src/__tests__/schema-connection-2.test.ts - CLI_REGION: ap-southeast-2 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/auth_7a.test.ts|src/__tests__/auth_8c.test.ts depend-on: - build_windows - upb - - identifier: w_schema_function_1_api_9b_custom_policies_container_function_9b + - identifier: w_feature_flags_geo_import_1b buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/schema-function-1.test.ts|src/__tests__/api_9b.test.ts|src/__tests__/custom_policies_container.test.ts|src/__tests__/function_9b.test.ts - CLI_REGION: us-east-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/feature-flags.test.ts|src/__tests__/geo-import-1b.test.ts depend-on: - build_windows - upb - - identifier: w_schema_iterative_update_2_storage_1a_storage_1b_function_11 + - identifier: w_global_sandbox_a_init_e buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/schema-iterative-update-2.test.ts|src/__tests__/storage-1a.test.ts|src/__tests__/storage-1b.test.ts|src/__tests__/function_11.test.ts - CLI_REGION: ap-southeast-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/global_sandbox-a.test.ts|src/__tests__/init_e.test.ts depend-on: - build_windows - upb - - identifier: w_function_2b_api_connection_migration2_api_4_containers_api_secrets + - identifier: w_notifications_analytics_compatibility_in_app_2_schema_auth_11_c buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/function_2b.test.ts|src/__tests__/migration/api.connection.migration2.test.ts|src/__tests__/api_4.test.ts|src/__tests__/containers-api-secrets.test.ts - CLI_REGION: eu-west-2 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/notifications-analytics-compatibility-in-app-2.test.ts|src/__tests__/schema-auth-11-c.test.ts depend-on: - build_windows - upb - - identifier: w_storage_4_schema_auth_10_geo_multi_env_searchable_datastore + - identifier: w_schema_auth_2b_schema_auth_6c buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/storage-4.test.ts|src/__tests__/schema-auth-10.test.ts|src/__tests__/geo-multi-env.test.ts|src/__tests__/graphql-v2/searchable-datastore.test.ts - CLI_REGION: ap-northeast-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/schema-auth-2b.test.ts|src/__tests__/schema-auth-6c.test.ts depend-on: - build_windows - upb - - identifier: w_resolvers_schema_key_api_5_apigw + - identifier: w_schema_auth_6d_schema_auth_7c buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/resolvers.test.ts|src/__tests__/schema-key.test.ts|src/__tests__/api_5.test.ts|src/__tests__/apigw.test.ts - CLI_REGION: ap-southeast-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/schema-auth-6d.test.ts|src/__tests__/schema-auth-7c.test.ts depend-on: - build_windows - upb - - identifier: w_api_lambda_auth_1_api_key_migration2_schema_searchable_api_key_migration1 + - identifier: w_schema_auth_8a_function_migration buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/graphql-v2/api_lambda_auth_1.test.ts|src/__tests__/migration/api.key.migration2.test.ts|src/__tests__/schema-searchable.test.ts|src/__tests__/migration/api.key.migration1.test.ts - CLI_REGION: ap-northeast-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/schema-auth-8a.test.ts|src/__tests__/transformer-migrations/function-migration.test.ts depend-on: - build_windows - upb - - identifier: w_schema_auth_14_api_3_api_6b_api_1 + - identifier: w_api_10_api_7 buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/schema-auth-14.test.ts|src/__tests__/api_3.test.ts|src/__tests__/api_6b.test.ts|src/__tests__/api_1.test.ts - CLI_REGION: ap-southeast-2 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/api_10.test.ts|src/__tests__/api_7.test.ts depend-on: - build_windows - upb - - identifier: w_layer_1_api_key_migration4_schema_iterative_update_4_function_1 + - identifier: w_export_pull_a_function_9a buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/layer-1.test.ts|src/__tests__/migration/api.key.migration4.test.ts|src/__tests__/schema-iterative-update-4.test.ts|src/__tests__/function_1.test.ts - CLI_REGION: ap-southeast-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/export-pull-a.test.ts|src/__tests__/function_9a.test.ts depend-on: - build_windows - upb - - identifier: w_auth_2c + - identifier: w_geo_headless_api_key_migration5 buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/auth_2c.test.ts - CLI_REGION: ap-southeast-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/geo-headless.test.ts|src/__tests__/migration/api.key.migration5.test.ts depend-on: - build_windows - upb - - identifier: w_auth_2e + - identifier: w_schema_auth_1a_schema_auth_5b buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/auth_2e.test.ts - CLI_REGION: us-east-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/schema-auth-1a.test.ts|src/__tests__/schema-auth-5b.test.ts depend-on: - build_windows - upb - - identifier: w_env_3 + - identifier: w_schema_auth_8b_schema_auth_9_a buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/env-3.test.ts - CLI_REGION: us-west-2 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/schema-auth-8b.test.ts|src/__tests__/schema-auth-9-a.test.ts depend-on: - build_windows - upb - - identifier: w_notifications_in_app_messaging + - identifier: w_schema_auth_9_c_storage_3 buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/notifications-in-app-messaging.test.ts - CLI_REGION: ap-southeast-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/schema-auth-9-c.test.ts|src/__tests__/storage-3.test.ts depend-on: - build_windows - upb - - identifier: w_schema_auth_11_a + - identifier: w_auth_11_auth_1b buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/schema-auth-11-a.test.ts - CLI_REGION: us-east-2 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/auth_11.test.ts|src/__tests__/auth_1b.test.ts depend-on: - build_windows - upb - - identifier: w_import_s3_3 + - identifier: w_delete_geo_add_c buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/import_s3_3.test.ts - CLI_REGION: ap-southeast-2 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/delete.test.ts|src/__tests__/geo-add-c.test.ts depend-on: - build_windows - upb - - identifier: w_hostingPROD + - identifier: w_geo_add_d_geo_import_3 buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/hostingPROD.test.ts - CLI_REGION: ap-southeast-2 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/geo-add-d.test.ts|src/__tests__/geo-import-3.test.ts depend-on: - build_windows - upb - - identifier: w_containers_api_1 + - identifier: w_hosting_layer_3 buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/containers-api-1.test.ts - CLI_REGION: us-west-2 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/hosting.test.ts|src/__tests__/layer-3.test.ts depend-on: - build_windows - upb - - identifier: w_schema_auth_15 + - identifier: w_api_connection_migration_api_key_migration3 buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/schema-auth-15.test.ts - CLI_REGION: eu-central-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/migration/api.connection.migration.test.ts|src/__tests__/migration/api.key.migration3.test.ts depend-on: - build_windows - upb - - identifier: w_schema_connection_1 + - identifier: w_predictions_schema_auth_11_b buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/schema-connection-1.test.ts - CLI_REGION: ap-northeast-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/predictions.test.ts|src/__tests__/schema-auth-11-b.test.ts depend-on: - build_windows - upb - - identifier: w_containers_api_2 + - identifier: w_schema_auth_1b_schema_auth_2a buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/containers-api-2.test.ts - CLI_REGION: us-west-2 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/schema-auth-1b.test.ts|src/__tests__/schema-auth-2a.test.ts depend-on: - build_windows - upb - - identifier: w_import_s3_1 + - identifier: w_schema_auth_7a_schema_auth_7b buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/import_s3_1.test.ts - CLI_REGION: eu-west-2 - USE_PARENT_ACCOUNT: true + TEST_SUITE: src/__tests__/schema-auth-7a.test.ts|src/__tests__/schema-auth-7b.test.ts depend-on: - build_windows - upb - - identifier: w_searchable_migration + - identifier: w_schema_auth_9_b_predictions_migration buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/transformer-migrations/searchable-migration.test.ts - CLI_REGION: eu-central-1 - USE_PARENT_ACCOUNT: true + TEST_SUITE: src/__tests__/schema-auth-9-b.test.ts|src/__tests__/transformer-migrations/predictions-migration.test.ts depend-on: - build_windows - upb - - identifier: w_geo_remove_1 + - identifier: w_api_6a_auth_7b buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/geo-remove-1.test.ts - CLI_REGION: ap-southeast-1 - USE_PARENT_ACCOUNT: false + TEST_SUITE: src/__tests__/api_6a.test.ts|src/__tests__/auth_7b.test.ts depend-on: - build_windows - upb - - identifier: w_import_dynamodb_1 + - identifier: w_export_pull_b_init_special_case buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/import_dynamodb_1.test.ts - CLI_REGION: us-east-2 - USE_PARENT_ACCOUNT: true + TEST_SUITE: src/__tests__/export-pull-b.test.ts|src/__tests__/init-special-case.test.ts depend-on: - build_windows - upb - - identifier: l_notifications_migration_4_v8 - buildspec: codebuild_specs/migration_tests_v8.yml + - identifier: w_http_migration_schema_auth_12 + buildspec: codebuild_specs/run_e2e_tests_windows.yml env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/migration_tests/notifications-migration/notifications-migration-4.test.ts - CLI_REGION: eu-west-2 + TEST_SUITE: src/__tests__/transformer-migrations/http-migration.test.ts|src/__tests__/schema-auth-12.test.ts depend-on: + - build_windows - upb - - identifier: l_api_key_migration_v8 - buildspec: codebuild_specs/migration_tests_v8.yml + - identifier: w_schema_auth_3_schema_function_2 + buildspec: codebuild_specs/run_e2e_tests_windows.yml env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/migration_tests/transformer_migration/api.key.migration.test.ts - CLI_REGION: ap-southeast-2 + TEST_SUITE: src/__tests__/schema-auth-3.test.ts|src/__tests__/schema-function-2.test.ts depend-on: + - build_windows - upb - - identifier: l_notifications_migration_v8 - buildspec: codebuild_specs/migration_tests_v8.yml + - identifier: w_auth_4b_auth_8a + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/auth_4b.test.ts|src/__tests__/auth_8a.test.ts + depend-on: + - build_windows + - upb + - identifier: w_export_pull_d_schema_auth_5a + buildspec: codebuild_specs/run_e2e_tests_windows.yml env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/migration_tests/notifications-migration/notifications-migration.test.ts - CLI_REGION: us-east-1 + TEST_SUITE: src/__tests__/export-pull-d.test.ts|src/__tests__/schema-auth-5a.test.ts depend-on: + - build_windows - upb - - identifier: l_api_key_migration_2_v8 - buildspec: codebuild_specs/migration_tests_v8.yml + - identifier: w_schema_iterative_update_3_auth_migration + buildspec: codebuild_specs/run_e2e_tests_windows.yml env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/migration_tests/transformer_migration/api.key.migration-2.test.ts - CLI_REGION: us-east-2 + TEST_SUITE: src/__tests__/schema-iterative-update-3.test.ts|src/__tests__/transformer-migrations/auth-migration.test.ts depend-on: + - build_windows - upb - - identifier: l_notifications_migration_2_v8 - buildspec: codebuild_specs/migration_tests_v8.yml + - identifier: w_amplify_remove_api_2a + buildspec: codebuild_specs/run_e2e_tests_windows.yml env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/migration_tests/notifications-migration/notifications-migration-2.test.ts - CLI_REGION: ap-southeast-2 + TEST_SUITE: src/__tests__/amplify-remove.test.ts|src/__tests__/api_2a.test.ts depend-on: + - build_windows - upb - - identifier: l_function_migration_update_v8 - buildspec: codebuild_specs/migration_tests_v8.yml + - identifier: w_api_2b_api_6c + buildspec: codebuild_specs/run_e2e_tests_windows.yml env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/update_tests/function_migration_update.test.ts - CLI_REGION: ap-southeast-2 + TEST_SUITE: src/__tests__/api_2b.test.ts|src/__tests__/api_6c.test.ts depend-on: + - build_windows - upb - - identifier: l_notifications_migration_3_v8 - buildspec: codebuild_specs/migration_tests_v8.yml + - identifier: w_api_9a_auth_2h + buildspec: codebuild_specs/run_e2e_tests_windows.yml env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/migration_tests/notifications-migration/notifications-migration-3.test.ts - CLI_REGION: eu-central-1 + TEST_SUITE: src/__tests__/api_9a.test.ts|src/__tests__/auth_2h.test.ts depend-on: + - build_windows - upb - - identifier: l_scaffold_v10 - buildspec: codebuild_specs/migration_tests_v10.yml + - identifier: w_auth_5g_admin_api + buildspec: codebuild_specs/run_e2e_tests_windows.yml env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/migration_tests_v10/scaffold.test.ts - CLI_REGION: us-west-2 + TEST_SUITE: src/__tests__/auth_5g.test.ts|src/__tests__/auth/admin-api.test.ts depend-on: + - build_windows - upb - - identifier: l_api_graphql_v2_migration_v10 - buildspec: codebuild_specs/migration_tests_v10.yml + - identifier: w_hosted_ui_user_groups_s3_access + buildspec: codebuild_specs/run_e2e_tests_windows.yml env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/migration_tests_v10/api-graphql-v2.migration.test.ts - CLI_REGION: ap-southeast-1 + TEST_SUITE: src/__tests__/auth/hosted-ui.test.ts|src/__tests__/auth/user-groups-s3-access.test.ts depend-on: + - build_windows - upb - - identifier: l_api_rest_basic_migration_v10 - buildspec: codebuild_specs/migration_tests_v10.yml + - identifier: w_user_groups_build_function_yarn_modern + buildspec: codebuild_specs/run_e2e_tests_windows.yml env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/migration_tests_v10/api-rest-basic.migration.test.ts - CLI_REGION: eu-west-2 + TEST_SUITE: src/__tests__/auth/user-groups.test.ts|src/__tests__/build-function-yarn-modern.test.ts depend-on: + - build_windows - upb - - identifier: l_api_rest_lambda_migration_v10 - buildspec: codebuild_specs/migration_tests_v10.yml + - identifier: w_build_function_dynamodb_simulator + buildspec: codebuild_specs/run_e2e_tests_windows.yml env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/migration_tests_v10/api-rest-lambda.migration.test.ts - CLI_REGION: us-east-2 + TEST_SUITE: src/__tests__/build-function.test.ts|src/__tests__/dynamodb-simulator/dynamodb-simulator.test.ts depend-on: + - build_windows - upb - - identifier: l_api_rest_serverless_migration_v10 - buildspec: codebuild_specs/migration_tests_v10.yml + - identifier: w_export_pull_c_function_12 + buildspec: codebuild_specs/run_e2e_tests_windows.yml env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/migration_tests_v10/api-rest-serverless.migration.test.ts - CLI_REGION: us-east-1 + TEST_SUITE: src/__tests__/export-pull-c.test.ts|src/__tests__/function_12.test.ts depend-on: + - build_windows - upb - - identifier: l_auth_add_all_migration_v10 - buildspec: codebuild_specs/migration_tests_v10.yml + - identifier: w_function_13_function_14 + buildspec: codebuild_specs/run_e2e_tests_windows.yml env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/migration_tests_v10/auth-add-all.migration.test.ts - CLI_REGION: ap-southeast-1 + TEST_SUITE: src/__tests__/function_13.test.ts|src/__tests__/function_14.test.ts depend-on: + - build_windows - upb - - identifier: l_auth_override_migration_v10 - buildspec: codebuild_specs/migration_tests_v10.yml + - identifier: w_function_2d_general_config_headless_init + buildspec: codebuild_specs/run_e2e_tests_windows.yml env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/migration_tests_v10/auth-override.migration.test.ts - CLI_REGION: us-east-1 + TEST_SUITE: src/__tests__/function_2d.test.ts|src/__tests__/general-config/general-config-headless-init.test.ts depend-on: + - build_windows - upb - - identifier: l_custom_stack_migration_v10 - buildspec: codebuild_specs/migration_tests_v10.yml + - identifier: w_help_init_force_push + buildspec: codebuild_specs/run_e2e_tests_windows.yml env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/migration_tests_v10/custom-stack.migration.test.ts - CLI_REGION: us-east-1 + TEST_SUITE: src/__tests__/help.test.ts|src/__tests__/init-force-push.test.ts depend-on: + - build_windows - upb - - identifier: l_geo_migration_v10 - buildspec: codebuild_specs/migration_tests_v10.yml + - identifier: w_interactions_1_interactions_2 + buildspec: codebuild_specs/run_e2e_tests_windows.yml env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/migration_tests_v10/geo.migration.test.ts + TEST_SUITE: src/__tests__/interactions-1.test.ts|src/__tests__/interactions-2.test.ts CLI_REGION: us-west-2 depend-on: + - build_windows + - upb + - identifier: w_minify_cloudformation_notifications_multi_env + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/minify-cloudformation.test.ts|src/__tests__/notifications-multi-env.test.ts + depend-on: + - build_windows + - upb + - identifier: w_notifications_sms_update_parameter_store_1 + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/notifications-sms-update.test.ts|src/__tests__/parameter-store-1.test.ts + depend-on: + - build_windows + - upb + - identifier: w_parameter_store_2_push + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/parameter-store-2.test.ts|src/__tests__/push.test.ts + depend-on: + - build_windows + - upb + - identifier: w_smoketest_ios_smoketest + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/smoke-tests/smoketest-ios.test.ts|src/__tests__/smoke-tests/smoketest.test.ts + depend-on: + - build_windows + - upb + - identifier: w_api_8_schema_iterative_update_locking + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/api_8.test.ts|src/__tests__/schema-iterative-update-locking.test.ts + depend-on: + - build_windows + - upb + - identifier: w_api_lambda_auth_2_schema_auth_13 + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/graphql-v2/api_lambda_auth_2.test.ts|src/__tests__/schema-auth-13.test.ts + depend-on: + - build_windows + - upb + - identifier: w_function_5_schema_iterative_update_1 + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/function_5.test.ts|src/__tests__/schema-iterative-update-1.test.ts + depend-on: + - build_windows + - upb + - identifier: w_auth_6_function_2a + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/auth_6.test.ts|src/__tests__/function_2a.test.ts + depend-on: + - build_windows + - upb + - identifier: w_schema_connection_2_schema_function_1 + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/schema-connection-2.test.ts|src/__tests__/schema-function-1.test.ts + depend-on: + - build_windows + - upb + - identifier: w_api_9b_custom_policies_container + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/api_9b.test.ts|src/__tests__/custom_policies_container.test.ts + depend-on: + - build_windows + - upb + - identifier: w_function_9b_schema_iterative_update_2 + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/function_9b.test.ts|src/__tests__/schema-iterative-update-2.test.ts + depend-on: + - build_windows + - upb + - identifier: w_storage_1a_storage_1b + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/storage-1a.test.ts|src/__tests__/storage-1b.test.ts + depend-on: + - build_windows + - upb + - identifier: w_function_11_function_2b + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/function_11.test.ts|src/__tests__/function_2b.test.ts + depend-on: + - build_windows + - upb + - identifier: w_api_connection_migration2_api_4 + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/migration/api.connection.migration2.test.ts|src/__tests__/api_4.test.ts + depend-on: + - build_windows + - upb + - identifier: w_containers_api_secrets_storage_4 + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/containers-api-secrets.test.ts|src/__tests__/storage-4.test.ts + depend-on: + - build_windows + - upb + - identifier: w_schema_auth_10_geo_multi_env + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/schema-auth-10.test.ts|src/__tests__/geo-multi-env.test.ts + depend-on: + - build_windows + - upb + - identifier: w_searchable_datastore_resolvers + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/graphql-v2/searchable-datastore.test.ts|src/__tests__/resolvers.test.ts + depend-on: + - build_windows + - upb + - identifier: w_schema_key_api_5 + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/schema-key.test.ts|src/__tests__/api_5.test.ts + depend-on: + - build_windows + - upb + - identifier: w_apigw_api_lambda_auth_1 + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/apigw.test.ts|src/__tests__/graphql-v2/api_lambda_auth_1.test.ts + depend-on: + - build_windows + - upb + - identifier: w_api_key_migration2_schema_searchable + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/migration/api.key.migration2.test.ts|src/__tests__/schema-searchable.test.ts + depend-on: + - build_windows + - upb + - identifier: w_api_key_migration1_schema_auth_14 + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/migration/api.key.migration1.test.ts|src/__tests__/schema-auth-14.test.ts + depend-on: + - build_windows + - upb + - identifier: w_api_3_api_6b + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/api_3.test.ts|src/__tests__/api_6b.test.ts + depend-on: + - build_windows + - upb + - identifier: w_api_1_layer_1 + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/api_1.test.ts|src/__tests__/layer-1.test.ts + depend-on: + - build_windows + - upb + - identifier: w_api_key_migration4_schema_iterative_update_4 + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/migration/api.key.migration4.test.ts|src/__tests__/schema-iterative-update-4.test.ts + depend-on: + - build_windows + - upb + - identifier: w_function_1 + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/function_1.test.ts + depend-on: + - build_windows + - upb + - identifier: w_auth_2c + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/auth_2c.test.ts + depend-on: + - build_windows + - upb + - identifier: w_auth_2e + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/auth_2e.test.ts + depend-on: + - build_windows + - upb + - identifier: w_env_3 + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/env-3.test.ts + depend-on: + - build_windows + - upb + - identifier: w_notifications_in_app_messaging + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/notifications-in-app-messaging.test.ts + depend-on: + - build_windows + - upb + - identifier: w_schema_auth_11_a + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/schema-auth-11-a.test.ts + depend-on: + - build_windows + - upb + - identifier: w_import_s3_3 + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/import_s3_3.test.ts + depend-on: + - build_windows + - upb + - identifier: w_js_frontend_config + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/aws-exports/js-frontend-config.test.ts + depend-on: + - build_windows + - upb + - identifier: w_hostingPROD + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/hostingPROD.test.ts + depend-on: + - build_windows + - upb + - identifier: w_containers_api_1 + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/containers-api-1.test.ts + depend-on: + - build_windows + - upb + - identifier: w_schema_auth_15 + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/schema-auth-15.test.ts + depend-on: + - build_windows + - upb + - identifier: w_schema_connection_1 + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/schema-connection-1.test.ts + depend-on: + - build_windows + - upb + - identifier: w_containers_api_2 + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/containers-api-2.test.ts + depend-on: + - build_windows + - upb + - identifier: w_import_s3_1 + buildspec: codebuild_specs/run_e2e_tests_windows.yml + env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 + variables: + TEST_SUITE: src/__tests__/import_s3_1.test.ts + USE_PARENT_ACCOUNT: 1 + depend-on: + - build_windows - upb - - identifier: l_git_clone_migration_tests_v10 - buildspec: codebuild_specs/migration_tests_v10.yml + - identifier: w_searchable_migration + buildspec: codebuild_specs/run_e2e_tests_windows.yml env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/migration_tests_v10/git-clone-migration-tests.test.ts - CLI_REGION: ap-southeast-1 + TEST_SUITE: src/__tests__/transformer-migrations/searchable-migration.test.ts + USE_PARENT_ACCOUNT: 1 depend-on: + - build_windows - upb - - identifier: l_pinpoint_region_migration_v10 - buildspec: codebuild_specs/migration_tests_v10.yml + - identifier: w_geo_remove_1 + buildspec: codebuild_specs/run_e2e_tests_windows.yml env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/migration_tests_v10/pinpoint-region.migration.test.ts - CLI_REGION: us-east-2 + TEST_SUITE: src/__tests__/geo-remove-1.test.ts depend-on: + - build_windows - upb - - identifier: l_storage_migration_v10 - buildspec: codebuild_specs/migration_tests_v10.yml + - identifier: w_import_dynamodb_1 + buildspec: codebuild_specs/run_e2e_tests_windows.yml env: + type: WINDOWS_SERVER_2019_CONTAINER + image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/migration_tests_v10/storage.migration.test.ts - CLI_REGION: eu-west-2 + TEST_SUITE: src/__tests__/import_dynamodb_1.test.ts + USE_PARENT_ACCOUNT: 1 depend-on: + - build_windows - upb - identifier: aggregate_e2e_reports env: diff --git a/codebuild_specs/install_and_cache_dependencies.yml b/codebuild_specs/install_and_cache_dependencies.yml new file mode 100644 index 00000000000..f47303d6fbc --- /dev/null +++ b/codebuild_specs/install_and_cache_dependencies.yml @@ -0,0 +1,11 @@ +version: 0.2 +env: + shell: bash +phases: + build: + commands: + - source ./shared-scripts.sh && _installAndCacheDependencies + +artifacts: + files: + - 'shared-scripts.sh' diff --git a/codebuild_specs/integration_test.yml b/codebuild_specs/integration_test.yml index a10bf68e498..9cb01d8924f 100644 --- a/codebuild_specs/integration_test.yml +++ b/codebuild_specs/integration_test.yml @@ -1,10 +1,13 @@ version: 0.2 env: shell: bash + variables: + CI: true + CIRCLECI: true + IS_AMPLIFY_CI: true phases: build: commands: - - echo "integration testing" - source ./shared-scripts.sh && _integrationTest artifacts: files: diff --git a/codebuild_specs/lint.yml b/codebuild_specs/lint.yml index 7363c6c10d0..4dd41678530 100644 --- a/codebuild_specs/lint.yml +++ b/codebuild_specs/lint.yml @@ -5,3 +5,6 @@ phases: build: commands: - source ./shared-scripts.sh && _lint +artifacts: + files: + - 'shared-scripts.sh' diff --git a/codebuild_specs/migration_tests_v8.yml b/codebuild_specs/migration_tests_v8.yml deleted file mode 100644 index 6993dd93ae4..00000000000 --- a/codebuild_specs/migration_tests_v8.yml +++ /dev/null @@ -1,46 +0,0 @@ -version: 0.2 -env: - shell: bash - compute-type: BUILD_GENERAL1_SMALL - variables: - CI: true - CIRCLECI: true - # mock values to test artifact scanning - ENV_VAR_WITH_SECRETS: 'MOCK_ENV_VAR_FOR_SCANNING_SECRETS' - MOCK_ENV_VAR_FOR_SCANNING_SECRETS: 'abc123xyz' - - # mock values for credentials below - FACEBOOK_APP_ID: 'fbAppId' - FACEBOOK_APP_SECRET: 'fbAppSecret' - GOOGLE_APP_ID: 'gglAppID' - GOOGLE_APP_SECRET: 'gglAppSecret' - AMAZON_APP_ID: 'amaznAppID' - AMAZON_APP_SECRET: 'amaznAppID' - APPLE_APP_ID: 'com.fake.app' - APPLE_TEAM_ID: '2QLEWNDK6K' - APPLE_KEY_ID: '2QLZXKYJ8J' - # mock value, Cognito validates the private key, this is an invalidated key. - APPLE_PRIVATE_KEY_2: '----BEGIN PRIVATE KEY-----MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgIltgNsTgTfSzUadYiCS0VYtDDMFln/J8i1yJsSIw5g+gCgYIKoZIzj0DAQehRANCAASI8E0L/DhR/mIfTT07v3VwQu6q8I76lgn7kFhT0HvWoLuHKGQFcFkXXCgztgBrprzd419mUChAnKE6y89bWcNw----END PRIVATE KEY----' -phases: - build: - commands: - # you can provide a codebuild source version to use old cache and skip all other jobs :) - - export NODE_OPTIONS=--max-old-space-size=8096 - - export AMPLIFY_DIR=$CODEBUILD_SRC_DIR/out - - export AMPLIFY_PATH=$HOME/.npm-global/bin/amplify - - echo $AMPLIFY_DIR - - echo $AMPLIFY_PATH - - source ./shared-scripts.sh && _runMigrationV8Test - post_build: - commands: - - source ./shared-scripts.sh && _scanArtifacts - - source ./shared-scripts.sh && _uploadReportsToS3 $CODEBUILD_SOURCE_VERSION $CODEBUILD_BATCH_BUILD_IDENTIFIER amplify-migration-tests -reports: - e2e-reports: - files: - - '*.xml' - file-format: 'JUNITXML' - base-directory: '$CODEBUILD_SRC_DIR/packages/amplify-migration-tests/reports/junit' -artifacts: - files: - - $CODEBUILD_SRC_DIR/packages/amplify-migration-tests/amplify-migration-reports/* diff --git a/codebuild_specs/mock_e2e_tests.yml b/codebuild_specs/mock_e2e_tests.yml index 371ec92cd74..8a27fa68370 100644 --- a/codebuild_specs/mock_e2e_tests.yml +++ b/codebuild_specs/mock_e2e_tests.yml @@ -8,3 +8,6 @@ phases: build: commands: - source ./shared-scripts.sh && _mockE2ETests +artifacts: + files: + - 'shared-scripts.sh' diff --git a/codebuild_specs/pr_workflow.yml b/codebuild_specs/pr_workflow.yml index 421a8d92d5d..aec50c0a503 100644 --- a/codebuild_specs/pr_workflow.yml +++ b/codebuild_specs/pr_workflow.yml @@ -14,67 +14,90 @@ env: batch: fast-fail: false build-graph: + - identifier: build_tests_standalone + buildspec: codebuild_specs/build_tests_standalone.yml + env: + compute-type: BUILD_GENERAL1_LARGE - identifier: build_linux buildspec: codebuild_specs/build_linux.yml env: compute-type: BUILD_GENERAL1_LARGE - identifier: test buildspec: codebuild_specs/test.yml + depend-on: + - build_linux env: compute-type: BUILD_GENERAL1_LARGE + - identifier: lint + buildspec: codebuild_specs/lint.yml depend-on: - build_linux - - identifier: mock_e2e_tests - buildspec: codebuild_specs/mock_e2e_tests.yml env: compute-type: BUILD_GENERAL1_LARGE + - identifier: mock_e2e_tests + buildspec: codebuild_specs/mock_e2e_tests.yml depend-on: - build_linux + env: + compute-type: BUILD_GENERAL1_LARGE - identifier: validate_cdk_version buildspec: codebuild_specs/validate_cdk_version.yml depend-on: - build_linux - identifier: verify_api_extract buildspec: codebuild_specs/verify_api_extract.yml - env: - compute-type: BUILD_GENERAL1_LARGE depend-on: - build_linux + env: + compute-type: BUILD_GENERAL1_LARGE - identifier: verify_yarn_lock buildspec: codebuild_specs/verify_yarn_lock.yml depend-on: - build_linux - identifier: publish_to_local_registry buildspec: codebuild_specs/publish_to_local_registry.yml - env: - compute-type: BUILD_GENERAL1_LARGE depend-on: - build_linux - - identifier: build_pkg_binaries_arm - buildspec: codebuild_specs/build_pkg_binaries_arm.yml env: compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_arm + buildspec: codebuild_specs/build_pkg_binaries_arm.yml depend-on: - publish_to_local_registry - - identifier: build_pkg_binaries_linux - buildspec: codebuild_specs/build_pkg_binaries_linux.yml env: compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_linux + buildspec: codebuild_specs/build_pkg_binaries_linux.yml depend-on: - publish_to_local_registry - - identifier: build_pkg_binaries_macos - buildspec: codebuild_specs/build_pkg_binaries_macos.yml env: compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_macos + buildspec: codebuild_specs/build_pkg_binaries_macos.yml depend-on: - publish_to_local_registry + env: + compute-type: BUILD_GENERAL1_LARGE - identifier: build_pkg_binaries_win buildspec: codebuild_specs/build_pkg_binaries_win.yml + depend-on: + - publish_to_local_registry env: compute-type: BUILD_GENERAL1_LARGE + - identifier: verify_pkg_cli + buildspec: codebuild_specs/verify_pkg_cli.yml depend-on: - - publish_to_local_registry + - build_pkg_binaries_arm + - build_pkg_binaries_linux + - build_pkg_binaries_macos + - build_pkg_binaries_win + env: + compute-type: BUILD_GENERAL1_LARGE - identifier: verify_versions_match buildspec: codebuild_specs/verify_versions_match.yml depend-on: - publish_to_local_registry + - identifier: verify_e2e_workflow_generated + buildspec: codebuild_specs/verify_e2e_workflow_generated.yml + depend-on: + - build_linux diff --git a/codebuild_specs/publish_to_npm.yml b/codebuild_specs/publish_to_npm.yml new file mode 100644 index 00000000000..d2afae54a99 --- /dev/null +++ b/codebuild_specs/publish_to_npm.yml @@ -0,0 +1,11 @@ +version: 0.2 +env: + shell: bash + git-credential-helper: yes +phases: + build: + commands: + - source ./shared-scripts.sh && _publishToNpm +artifacts: + files: + - 'shared-scripts.sh' diff --git a/codebuild_specs/release_workflows/github_prerelease.yml b/codebuild_specs/release_workflows/github_prerelease.yml new file mode 100644 index 00000000000..a8f14403ccc --- /dev/null +++ b/codebuild_specs/release_workflows/github_prerelease.yml @@ -0,0 +1,11 @@ +version: 0.2 +env: + shell: bash +phases: + build: + commands: + - source ./shared-scripts.sh && _githubPrerelease + +artifacts: + files: + - 'shared-scripts.sh' diff --git a/codebuild_specs/release_workflows/github_prerelease_install_sanity_check.yml b/codebuild_specs/release_workflows/github_prerelease_install_sanity_check.yml new file mode 100644 index 00000000000..eff54e84f33 --- /dev/null +++ b/codebuild_specs/release_workflows/github_prerelease_install_sanity_check.yml @@ -0,0 +1,11 @@ +version: 0.2 +env: + shell: bash +phases: + build: + commands: + - source ./shared-scripts.sh && _githubPrereleaseInstallSanityCheck + +artifacts: + files: + - 'shared-scripts.sh' diff --git a/codebuild_specs/release_workflows/github_release.yml b/codebuild_specs/release_workflows/github_release.yml new file mode 100644 index 00000000000..2fe2313d8c1 --- /dev/null +++ b/codebuild_specs/release_workflows/github_release.yml @@ -0,0 +1,11 @@ +version: 0.2 +env: + shell: bash +phases: + build: + commands: + - source ./shared-scripts.sh && _githubRelease + +artifacts: + files: + - 'shared-scripts.sh' diff --git a/codebuild_specs/release_workflows/github_rollback.yml b/codebuild_specs/release_workflows/github_rollback.yml new file mode 100644 index 00000000000..54264604f37 --- /dev/null +++ b/codebuild_specs/release_workflows/github_rollback.yml @@ -0,0 +1,11 @@ +version: 0.2 +env: + shell: bash +phases: + build: + commands: + - source ./shared-scripts.sh && _githubRollback + +artifacts: + files: + - 'shared-scripts.sh' diff --git a/codebuild_specs/release_workflows/hotfix_workflow.yml b/codebuild_specs/release_workflows/hotfix_workflow.yml new file mode 100644 index 00000000000..070f1a4eda0 --- /dev/null +++ b/codebuild_specs/release_workflows/hotfix_workflow.yml @@ -0,0 +1,92 @@ +version: 0.2 +env: + shell: bash + compute-type: BUILD_GENERAL1_MEDIUM + variables: + AWS_DEFAULT_REGION: us-east-1 + AWS_REGION: us-east-1 + CDK_DEFAULT_REGION: us-east-1 + CLI_REGION: us-east-1 + AMPLIFY_DIR: '$CODEBUILD_SRC_DIR/out' + AMPLIFY_PATH: '$CODEBUILD_SRC_DIR/out/amplify-pkg-linux-x64' + +batch: + fast-fail: false + build-graph: + - identifier: build_tests_standalone + buildspec: codebuild_specs/build_tests_standalone.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_linux + buildspec: codebuild_specs/build_linux.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: test + buildspec: codebuild_specs/test.yml + depend-on: + - build_linux + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: mock_e2e_tests + buildspec: codebuild_specs/mock_e2e_tests.yml + depend-on: + - build_linux + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: validate_cdk_version + buildspec: codebuild_specs/validate_cdk_version.yml + depend-on: + - build_linux + - identifier: verify_api_extract + buildspec: codebuild_specs/verify_api_extract.yml + depend-on: + - build_linux + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: verify_yarn_lock + buildspec: codebuild_specs/verify_yarn_lock.yml + depend-on: + - build_linux + - identifier: publish_to_local_registry + buildspec: codebuild_specs/publish_to_local_registry.yml + depend-on: + - build_linux + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_arm + buildspec: codebuild_specs/build_pkg_binaries_arm.yml + depend-on: + - publish_to_local_registry + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_linux + buildspec: codebuild_specs/build_pkg_binaries_linux.yml + depend-on: + - publish_to_local_registry + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_macos + buildspec: codebuild_specs/build_pkg_binaries_macos.yml + depend-on: + - publish_to_local_registry + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_win + buildspec: codebuild_specs/build_pkg_binaries_win.yml + depend-on: + - publish_to_local_registry + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: verify_versions_match + buildspec: codebuild_specs/verify_versions_match.yml + depend-on: + - publish_to_local_registry + - identifier: verify_pkg_cli + buildspec: codebuild_specs/verify_pkg_cli.yml + depend-on: + - build_pkg_binaries_arm + - build_pkg_binaries_linux + - build_pkg_binaries_macos + - build_pkg_binaries_win + env: + compute-type: BUILD_GENERAL1_LARGE diff --git a/codebuild_specs/release_workflows/post_publish_push_to_git.yml b/codebuild_specs/release_workflows/post_publish_push_to_git.yml new file mode 100644 index 00000000000..80b7da60f18 --- /dev/null +++ b/codebuild_specs/release_workflows/post_publish_push_to_git.yml @@ -0,0 +1,11 @@ +version: 0.2 +env: + shell: bash + git-credential-helper: yes +phases: + build: + commands: + - source ./shared-scripts.sh && _postPublishPushToGit +artifacts: + files: + - 'shared-scripts.sh' diff --git a/codebuild_specs/release_workflows/release_rc_workflow.yml b/codebuild_specs/release_workflows/release_rc_workflow.yml new file mode 100644 index 00000000000..04e50f4eb9e --- /dev/null +++ b/codebuild_specs/release_workflows/release_rc_workflow.yml @@ -0,0 +1,109 @@ +version: 0.2 +env: + shell: bash + compute-type: BUILD_GENERAL1_MEDIUM + git-credential-helper: yes + variables: + AWS_DEFAULT_REGION: us-east-1 + AWS_REGION: us-east-1 + CDK_DEFAULT_REGION: us-east-1 + CLI_REGION: us-east-1 + AMPLIFY_DIR: '$CODEBUILD_SRC_DIR/out' + AMPLIFY_PATH: '$CODEBUILD_SRC_DIR/out/amplify-pkg-linux-x64' + +batch: + fast-fail: false + build-graph: + - identifier: build_linux + buildspec: codebuild_specs/build_linux.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: validate_cdk_version + buildspec: codebuild_specs/validate_cdk_version.yml + depend-on: + - build_linux + - identifier: verify_yarn_lock + buildspec: codebuild_specs/verify_yarn_lock.yml + depend-on: + - build_linux + - identifier: publish_to_local_registry + buildspec: codebuild_specs/publish_to_local_registry.yml + depend-on: + - build_linux + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_arm + buildspec: codebuild_specs/build_pkg_binaries_arm.yml + depend-on: + - publish_to_local_registry + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_linux + buildspec: codebuild_specs/build_pkg_binaries_linux.yml + depend-on: + - publish_to_local_registry + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_macos + buildspec: codebuild_specs/build_pkg_binaries_macos.yml + depend-on: + - publish_to_local_registry + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_win + buildspec: codebuild_specs/build_pkg_binaries_win.yml + depend-on: + - publish_to_local_registry + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: upb + buildspec: codebuild_specs/upload_pkg_binaries.yml + depend-on: + - build_pkg_binaries_arm + - build_pkg_binaries_linux + - build_pkg_binaries_macos + - build_pkg_binaries_win + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: verify_pkg_cli + buildspec: codebuild_specs/verify_pkg_cli.yml + depend-on: + - build_pkg_binaries_arm + - build_pkg_binaries_linux + - build_pkg_binaries_macos + - build_pkg_binaries_win + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: verify_versions_match + buildspec: codebuild_specs/verify_versions_match.yml + depend-on: + - publish_to_local_registry + - identifier: publish_to_npm + buildspec: codebuild_specs/publish_to_npm.yml + env: + compute-type: BUILD_GENERAL1_LARGE + git-credential-helper: yes + debug-session: true + depend-on: + - upb + - publish_to_local_registry + - verify_versions_match + - validate_cdk_version + - verify_yarn_lock + - verify_pkg_cli + - identifier: deployment_verification_rc_or_tagged + buildspec: codebuild_specs/deployment_verification_rc_or_tagged.yml + env: + compute-type: BUILD_GENERAL1_LARGE + git-credential-helper: yes + debug-session: true + depend-on: + - publish_to_npm + - identifier: post_publish_push_to_git + buildspec: codebuild_specs/release_workflows/post_publish_push_to_git.yml + env: + compute-type: BUILD_GENERAL1_LARGE + git-credential-helper: yes + debug-session: true + depend-on: + - publish_to_npm diff --git a/codebuild_specs/release_workflows/release_workflow.yml b/codebuild_specs/release_workflows/release_workflow.yml new file mode 100644 index 00000000000..ee5f7a4ff3b --- /dev/null +++ b/codebuild_specs/release_workflows/release_workflow.yml @@ -0,0 +1,126 @@ +version: 0.2 +env: + shell: bash + compute-type: BUILD_GENERAL1_MEDIUM + git-credential-helper: yes + variables: + AWS_DEFAULT_REGION: us-east-1 + AWS_REGION: us-east-1 + CDK_DEFAULT_REGION: us-east-1 + CLI_REGION: us-east-1 + AMPLIFY_DIR: '$CODEBUILD_SRC_DIR/out' + AMPLIFY_PATH: '$CODEBUILD_SRC_DIR/out/amplify-pkg-linux-x64' + +batch: + fast-fail: false + build-graph: + - identifier: build_linux + buildspec: codebuild_specs/build_linux.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: validate_cdk_version + buildspec: codebuild_specs/validate_cdk_version.yml + depend-on: + - build_linux + - identifier: verify_yarn_lock + buildspec: codebuild_specs/verify_yarn_lock.yml + depend-on: + - build_linux + - identifier: publish_to_local_registry + buildspec: codebuild_specs/publish_to_local_registry.yml + depend-on: + - build_linux + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_arm + buildspec: codebuild_specs/build_pkg_binaries_arm.yml + depend-on: + - publish_to_local_registry + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_linux + buildspec: codebuild_specs/build_pkg_binaries_linux.yml + depend-on: + - publish_to_local_registry + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_macos + buildspec: codebuild_specs/build_pkg_binaries_macos.yml + depend-on: + - publish_to_local_registry + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_win + buildspec: codebuild_specs/build_pkg_binaries_win.yml + depend-on: + - publish_to_local_registry + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: upb + buildspec: codebuild_specs/upload_pkg_binaries.yml + depend-on: + - build_pkg_binaries_arm + - build_pkg_binaries_linux + - build_pkg_binaries_macos + - build_pkg_binaries_win + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: verify_pkg_cli + buildspec: codebuild_specs/verify_pkg_cli.yml + depend-on: + - build_pkg_binaries_arm + - build_pkg_binaries_linux + - build_pkg_binaries_macos + - build_pkg_binaries_win + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: verify_versions_match + buildspec: codebuild_specs/verify_versions_match.yml + depend-on: + - publish_to_local_registry + - identifier: github_prerelease + buildspec: codebuild_specs/release_workflows/github_prerelease.yml + env: + compute-type: BUILD_GENERAL1_LARGE + debug-session: true + depend-on: + - upb + - identifier: github_prerelease_install_sanity_check + buildspec: codebuild_specs/release_workflows/github_prerelease_install_sanity_check.yml + env: + compute-type: BUILD_GENERAL1_LARGE + debug-session: true + depend-on: + - github_prerelease + - identifier: publish_to_npm + buildspec: codebuild_specs/publish_to_npm.yml + env: + compute-type: BUILD_GENERAL1_LARGE + debug-session: true + depend-on: + - upb + - verify_versions_match + - github_prerelease_install_sanity_check + - publish_to_local_registry + - validate_cdk_version + - verify_yarn_lock + - verify_pkg_cli + - identifier: post_publish_push_to_git + buildspec: codebuild_specs/release_workflows/post_publish_push_to_git.yml + depend-on: + - publish_to_npm + - identifier: github_release + buildspec: codebuild_specs/release_workflows/github_release.yml + env: + compute-type: BUILD_GENERAL1_LARGE + debug-session: true + depend-on: + - post_publish_push_to_git + - identifier: deployment_verification_post_release + buildspec: codebuild_specs/deployment_verification_post_release.yml + env: + compute-type: BUILD_GENERAL1_LARGE + git-credential-helper: yes + debug-session: true + depend-on: + - github_release diff --git a/codebuild_specs/release_workflows/rollback_workflow.yml b/codebuild_specs/release_workflows/rollback_workflow.yml new file mode 100644 index 00000000000..4337a76e3f0 --- /dev/null +++ b/codebuild_specs/release_workflows/rollback_workflow.yml @@ -0,0 +1,34 @@ +version: 0.2 +env: + shell: bash + compute-type: BUILD_GENERAL1_MEDIUM + git-credential-helper: yes + variables: + AWS_DEFAULT_REGION: us-east-1 + AWS_REGION: us-east-1 + CDK_DEFAULT_REGION: us-east-1 + CLI_REGION: us-east-1 + +batch: + fast-fail: false + build-graph: + - identifier: install_dependencies + buildspec: codebuild_specs/install_and_cache_dependencies.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: validate_rollback_target_version + buildspec: codebuild_specs/validate_rollback_target_version.yml + depend-on: + - install_dependencies + - identifier: github_rollback + buildspec: codebuild_specs/release_workflows/github_rollback.yml + env: + compute-type: BUILD_GENERAL1_LARGE + depend-on: + - validate_rollback_target_version + - identifier: rollback_npm + buildspec: codebuild_specs/rollback_npm.yml + env: + compute-type: BUILD_GENERAL1_LARGE + depend-on: + - validate_rollback_target_version diff --git a/codebuild_specs/release_workflows/tagged_release_without_e2e_workflow.yml b/codebuild_specs/release_workflows/tagged_release_without_e2e_workflow.yml new file mode 100644 index 00000000000..18b27f14dc3 --- /dev/null +++ b/codebuild_specs/release_workflows/tagged_release_without_e2e_workflow.yml @@ -0,0 +1,107 @@ +version: 0.2 +env: + shell: bash + compute-type: BUILD_GENERAL1_MEDIUM + variables: + AWS_DEFAULT_REGION: us-east-1 + AWS_REGION: us-east-1 + CDK_DEFAULT_REGION: us-east-1 + CLI_REGION: us-east-1 + AMPLIFY_DIR: '$CODEBUILD_SRC_DIR/out' + AMPLIFY_PATH: '$CODEBUILD_SRC_DIR/out/amplify-pkg-linux-x64' + +batch: + fast-fail: false + build-graph: + - identifier: build_linux + buildspec: codebuild_specs/build_linux.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: validate_cdk_version + buildspec: codebuild_specs/validate_cdk_version.yml + depend-on: + - build_linux + - identifier: verify_yarn_lock + buildspec: codebuild_specs/verify_yarn_lock.yml + depend-on: + - build_linux + - identifier: publish_to_local_registry + buildspec: codebuild_specs/publish_to_local_registry.yml + depend-on: + - build_linux + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_arm + buildspec: codebuild_specs/build_pkg_binaries_arm.yml + depend-on: + - publish_to_local_registry + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_linux + buildspec: codebuild_specs/build_pkg_binaries_linux.yml + depend-on: + - publish_to_local_registry + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_macos + buildspec: codebuild_specs/build_pkg_binaries_macos.yml + depend-on: + - publish_to_local_registry + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_win + buildspec: codebuild_specs/build_pkg_binaries_win.yml + depend-on: + - publish_to_local_registry + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: upb + buildspec: codebuild_specs/upload_pkg_binaries.yml + depend-on: + - build_pkg_binaries_arm + - build_pkg_binaries_linux + - build_pkg_binaries_macos + - build_pkg_binaries_win + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: verify_pkg_cli + buildspec: codebuild_specs/verify_pkg_cli.yml + depend-on: + - build_pkg_binaries_arm + - build_pkg_binaries_linux + - build_pkg_binaries_macos + - build_pkg_binaries_win + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: verify_versions_match + buildspec: codebuild_specs/verify_versions_match.yml + depend-on: + - publish_to_local_registry + - identifier: publish_to_npm + buildspec: codebuild_specs/publish_to_npm.yml + env: + compute-type: BUILD_GENERAL1_LARGE + debug-session: true + depend-on: + - upb + - verify_versions_match + - publish_to_local_registry + - validate_cdk_version + - verify_yarn_lock + - verify_pkg_cli + - identifier: deployment_verification_rc_or_tagged + buildspec: codebuild_specs/deployment_verification_rc_or_tagged.yml + env: + compute-type: BUILD_GENERAL1_LARGE + git-credential-helper: yes + debug-session: true + depend-on: + - publish_to_npm + - identifier: post_publish_push_to_git + buildspec: codebuild_specs/release_workflows/post_publish_push_to_git.yml + env: + compute-type: BUILD_GENERAL1_LARGE + git-credential-helper: yes + debug-session: true + depend-on: + - publish_to_npm diff --git a/codebuild_specs/rollback_npm.yml b/codebuild_specs/rollback_npm.yml new file mode 100644 index 00000000000..fbc574b9275 --- /dev/null +++ b/codebuild_specs/rollback_npm.yml @@ -0,0 +1,11 @@ +version: 0.2 +env: + shell: bash + git-credential-helper: yes +phases: + build: + commands: + - source ./shared-scripts.sh && _rollbackNpm +artifacts: + files: + - 'shared-scripts.sh' diff --git a/codebuild_specs/run_e2e_tests_linux.yml b/codebuild_specs/run_e2e_tests_linux.yml index ae1d54fac5a..c20e7d02980 100644 --- a/codebuild_specs/run_e2e_tests_linux.yml +++ b/codebuild_specs/run_e2e_tests_linux.yml @@ -5,6 +5,7 @@ env: E2E_TEST_COVERAGE_DIR: node_v8_coverage CI: true CIRCLECI: true + IS_AMPLIFY_CI: true # mock values to test artifact scanning ENV_VAR_WITH_SECRETS: 'MOCK_ENV_VAR_FOR_SCANNING_SECRETS' MOCK_ENV_VAR_FOR_SCANNING_SECRETS: 'abc123xyz' @@ -25,7 +26,7 @@ phases: build: commands: # you can provide a codebuild source version to use old cache and skip all other jobs :) - - export NODE_OPTIONS=--max-old-space-size=8096 + - export NODE_OPTIONS=--max-old-space-size=4096 - export AMPLIFY_DIR=$CODEBUILD_SRC_DIR/out - export AMPLIFY_PATH=$CODEBUILD_SRC_DIR/out/amplify-pkg-linux-x64 - echo $AMPLIFY_DIR diff --git a/codebuild_specs/run_e2e_tests_windows.yml b/codebuild_specs/run_e2e_tests_windows.yml index 9a00c8594cb..b7fc92e94e8 100644 --- a/codebuild_specs/run_e2e_tests_windows.yml +++ b/codebuild_specs/run_e2e_tests_windows.yml @@ -2,10 +2,10 @@ version: 0.2 env: shell: powershell.exe variables: - CLI_REGION: us-east-1 TEST_SUITE: src/__tests__/auth_2a.test.ts|src/__tests__/auth_2b.test.ts|src/__tests__/auth_2d.test.ts|src/__tests__/auth_2f.test.ts CI: true CIRCLECI: true + IS_AMPLIFY_CI: true # mock values to test artifact scanning ENV_VAR_WITH_SECRETS: 'MOCK_ENV_VAR_FOR_SCANNING_SECRETS' MOCK_ENV_VAR_FOR_SCANNING_SECRETS: 'abc123xyz' @@ -25,10 +25,19 @@ env: phases: build: commands: - - choco install -fy jq + - git config --global core.longpaths true - bash ./codebuild_specs/scripts-windows/load-e2e-cache.sh - bash ./codebuild_specs/scripts-windows/rename-packaged-cli.sh - bash ./codebuild_specs/scripts-windows/run-e2e-windows.sh + post_build: + commands: + - bash ./codebuild_specs/upload-reports-windows.sh +reports: + e2e-reports: + files: + - '*.xml' + file-format: 'JUNITXML' + base-directory: 'packages/amplify-e2e-tests/reports/junit' artifacts: files: - '$E2E_TEST_COVERAGE_DIR/*' diff --git a/codebuild_specs/scripts-windows/load-e2e-cache.sh b/codebuild_specs/scripts-windows/load-e2e-cache.sh index 593619b7691..6d5b2f5c62d 100644 --- a/codebuild_specs/scripts-windows/load-e2e-cache.sh +++ b/codebuild_specs/scripts-windows/load-e2e-cache.sh @@ -4,7 +4,6 @@ source ./codebuild_specs/scripts-windows/shared-scripts-windows.sh # export CODEBUILD_SOURCE_VERSION=e1dce3fd6083503048f8d6eec3c09cf1b5d8a007 loadCache repo-windows $CODEBUILD_SRC_DIR -loadCache .cache-windows $HOME/AppData/Local/Yarn/Cache/v6 loadCache verdaccio-cache $CODEBUILD_SRC_DIR/../verdaccio-cache loadCache all-binaries $CODEBUILD_SRC_DIR/out diff --git a/codebuild_specs/scripts-windows/run-e2e-windows.sh b/codebuild_specs/scripts-windows/run-e2e-windows.sh index eab1d5b9c00..b04d0b89741 100644 --- a/codebuild_specs/scripts-windows/run-e2e-windows.sh +++ b/codebuild_specs/scripts-windows/run-e2e-windows.sh @@ -8,10 +8,14 @@ export MSYS2_ARG_CONV_EXCL="*" export AMPLIFY_DIR=$CODEBUILD_SRC_DIR\\out export AMPLIFY_PATH=$CODEBUILD_SRC_DIR\\out\\amplify.exe +export NODE_OPTIONS=--max-old-space-size=5120 -source .circleci/local_publish_helpers.sh +source .circleci/local_publish_helpers_codebuild.sh source ./codebuild_specs/scripts-windows/shared-scripts-windows.sh +export CLI_REGION=$(yarn ts-node ./scripts/select-region-for-e2e-test.ts) +echo "Test will run in $CLI_REGION" + # source $BASH_ENV amplify version diff --git a/codebuild_specs/scripts-windows/shared-scripts-windows.sh b/codebuild_specs/scripts-windows/shared-scripts-windows.sh index ae0100663bd..664d4efc1cb 100644 --- a/codebuild_specs/scripts-windows/shared-scripts-windows.sh +++ b/codebuild_specs/scripts-windows/shared-scripts-windows.sh @@ -98,9 +98,6 @@ function _loadTestAccountCredentials { function _lsOut { ls .. ls ~ - ls $HOME - ls $HOME/.. - ls $HOME/../.. } function _build { echo Windows Build @@ -110,7 +107,6 @@ function _build { function _saveBuild { _lsOut storeCache $CODEBUILD_SRC_DIR repo-windows - storeCache $HOME/AppData/Local/Yarn/Cache/v6 .cache-windows } function _install_packaged_cli_win { echo Install Amplify Packaged CLI to PATH @@ -121,8 +117,8 @@ function _install_packaged_cli_win { echo Move to CLI Binary to already existing PATH # This is a Hack to make sure the Amplify CLI is in the PATH - cp $CODEBUILD_SRC_DIR/out/amplify.exe $HOME/AppData/Local/Microsoft/WindowsApps - ls $HOME/AppData/Local/Microsoft/WindowsApps + cp $CODEBUILD_SRC_DIR/out/amplify.exe C:/Users/ContainerAdministrator/AppData/Local/Microsoft/WindowsApps + ls C:/Users/ContainerAdministrator/AppData/Local/Microsoft/WindowsApps # reset working directory cd $CODEBUILD_SRC_DIR diff --git a/codebuild_specs/scripts-windows/wait-windows.sh b/codebuild_specs/scripts-windows/wait-windows.sh new file mode 100644 index 00000000000..e11087209fa --- /dev/null +++ b/codebuild_specs/scripts-windows/wait-windows.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# set exit on error to true +set -e + +export MSYS_NO_PATHCONV=1 +export MSYS2_ARG_CONV_EXCL="*" + +export NODE_OPTIONS=--max-old-space-size=4096 + +source shared-scripts.sh +_waitForJobs $CODEBUILD_SRC_DIR/codebuild_specs/wait_windows.json requirePrevJobsToSucceed diff --git a/codebuild_specs/sh-files/aws-configure-credentials.py b/codebuild_specs/sh-files/aws-configure-credentials.py deleted file mode 100644 index 578d3a5f771..00000000000 --- a/codebuild_specs/sh-files/aws-configure-credentials.py +++ /dev/null @@ -1,23 +0,0 @@ -import os - -AWS_ACCESS_KEY_ID = os.environ['AWS_ACCESS_KEY_ID'] -AWS_SECRET_ACCESS_KEY = os.environ['AWS_SECRET_ACCESS_KEY'] -AWS_SESSION_TOKEN = os.environ['AWS_SESSION_TOKEN'] - -credentials_file_contents = f'''[default] -aws_access_key_id={AWS_ACCESS_KEY_ID} -aws_secret_access_key={AWS_SECRET_ACCESS_KEY} -aws_session_token={AWS_SESSION_TOKEN} - -''' - -config_file_contents = '''[default] -region=us-west-2 - -''' - -with open('/root/.aws/credentials', 'w') as f: - f.write(credentials_file_contents) - -with open('/root/.aws/config', 'w') as f: - f.write(config_file_contents) diff --git a/codebuild_specs/test.yml b/codebuild_specs/test.yml index c38b781d65e..080b4b9a39e 100644 --- a/codebuild_specs/test.yml +++ b/codebuild_specs/test.yml @@ -7,3 +7,6 @@ phases: build: commands: - source ./shared-scripts.sh && _testLinux +artifacts: + files: + - 'shared-scripts.sh' diff --git a/codebuild_specs/upload-reports-windows.sh b/codebuild_specs/upload-reports-windows.sh new file mode 100644 index 00000000000..79d71ecf800 --- /dev/null +++ b/codebuild_specs/upload-reports-windows.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -e +export MSYS_NO_PATHCONV=1 +export MSYS2_ARG_CONV_EXCL="*" +source ./shared-scripts.sh +_uploadReportsToS3 $CODEBUILD_SOURCE_VERSION $CODEBUILD_BATCH_BUILD_IDENTIFIER amplify-e2e-tests diff --git a/codebuild_specs/validate_cdk_version.yml b/codebuild_specs/validate_cdk_version.yml index f1bf130dbc6..383ce7c3ab4 100644 --- a/codebuild_specs/validate_cdk_version.yml +++ b/codebuild_specs/validate_cdk_version.yml @@ -5,3 +5,6 @@ phases: build: commands: - source ./shared-scripts.sh && _validateCDKVersion +artifacts: + files: + - 'shared-scripts.sh' diff --git a/codebuild_specs/validate_rollback_target_version.yml b/codebuild_specs/validate_rollback_target_version.yml new file mode 100644 index 00000000000..47f0ecdc45d --- /dev/null +++ b/codebuild_specs/validate_rollback_target_version.yml @@ -0,0 +1,11 @@ +version: 0.2 +env: + shell: bash +phases: + build: + commands: + - source ./shared-scripts.sh && _validateRollbackTargetVersion + +artifacts: + files: + - 'shared-scripts.sh' diff --git a/codebuild_specs/verify_api_extract.yml b/codebuild_specs/verify_api_extract.yml index ac360de6cfd..a850e12103a 100644 --- a/codebuild_specs/verify_api_extract.yml +++ b/codebuild_specs/verify_api_extract.yml @@ -5,3 +5,6 @@ phases: build: commands: - source ./shared-scripts.sh && _verifyAPIExtract +artifacts: + files: + - 'shared-scripts.sh' diff --git a/codebuild_specs/verify_e2e_workflow_generated.yml b/codebuild_specs/verify_e2e_workflow_generated.yml new file mode 100644 index 00000000000..04059eae6e3 --- /dev/null +++ b/codebuild_specs/verify_e2e_workflow_generated.yml @@ -0,0 +1,10 @@ +version: 0.2 +env: + shell: bash +phases: + build: + commands: + - source ./shared-scripts.sh && _verifyGeneratedE2EWorkflow +artifacts: + files: + - 'shared-scripts.sh' diff --git a/codebuild_specs/verify_pkg_cli.yml b/codebuild_specs/verify_pkg_cli.yml new file mode 100644 index 00000000000..43dcd188d81 --- /dev/null +++ b/codebuild_specs/verify_pkg_cli.yml @@ -0,0 +1,10 @@ +version: 0.2 +env: + shell: bash +phases: + build: + commands: + - source ./shared-scripts.sh && _verifyPkgCLI +artifacts: + files: + - 'shared-scripts.sh' diff --git a/codebuild_specs/verify_versions_match.yml b/codebuild_specs/verify_versions_match.yml index 7a3474e4d52..209140983c6 100644 --- a/codebuild_specs/verify_versions_match.yml +++ b/codebuild_specs/verify_versions_match.yml @@ -5,3 +5,6 @@ phases: build: commands: - source ./shared-scripts.sh && _verifyVersionsMatch +artifacts: + files: + - 'shared-scripts.sh' diff --git a/codebuild_specs/verify_yarn_lock.yml b/codebuild_specs/verify_yarn_lock.yml index 9fba2102f79..106c538b451 100644 --- a/codebuild_specs/verify_yarn_lock.yml +++ b/codebuild_specs/verify_yarn_lock.yml @@ -5,3 +5,6 @@ phases: build: commands: - source ./shared-scripts.sh && _verifyYarnLock +artifacts: + files: + - 'shared-scripts.sh' diff --git a/codebuild_specs/wait_for_ids.json b/codebuild_specs/wait_for_ids.json index 19af2983a39..805a1d24d5d 100644 --- a/codebuild_specs/wait_for_ids.json +++ b/codebuild_specs/wait_for_ids.json @@ -1,61 +1,67 @@ [ - "l_analytics_2_global_sandbox_c_hooks_b_notifications_analytics_compatibility_sms_1", - "l_api_10_api_7_export_pull_a_function_9a", - "l_api_2b_api_6c_api_9a_auth_12", - "l_api_4_containers_api_secrets_storage_4_schema_auth_10", - "l_api_5_apigw_api_lambda_auth_1_api_key_migration2", - "l_api_6b_api_1_layer_1_api_key_migration4", - "l_api_connection_migration_api_key_migration3_predictions_schema_auth_11_b", - "l_api_graphql_v2_migration_v10", - "l_api_key_migration_2_v8", - "l_api_key_migration_v8", - "l_api_rest_basic_migration_v10", - "l_api_rest_lambda_migration_v10", - "l_api_rest_serverless_migration_v10", - "l_auth_11_auth_1b_delete_geo_add_c", - "l_auth_1a_auth_trigger_custom_policies_function_function_6", - "l_auth_1c_auth_5e_auth_8b_geo_add_b", - "l_auth_2a_auth_2b_auth_2d_auth_2f", + "l_amplify_app", + "l_amplify_configure_env_2_init_d", + "l_analytics_kinesis_analytics_pinpoint_flutter_analytics_pinpoint_js", + "l_android_analytics_pinpoint_config_android_notifications_pinpoint_config_flutter_analytics_pinpoint_config", + "l_api_2b_api_6c_api_9a", + "l_api_3_api_6b_api_1", + "l_api_4_containers_api_secrets_storage_4", + "l_api_6a_auth_7b_export_pull_b", + "l_api_7_export_pull_a_function_9a", + "l_apigw_api_lambda_auth_1_api_key_migration2", + "l_auth_12_auth_2g_auth_2h", + "l_auth_1a_auth_trigger_custom_policies_function", + "l_auth_1b_delete_geo_add_c", + "l_auth_1c_auth_5e_auth_8b", + "l_auth_2a_auth_2b_auth_2d", "l_auth_2c", "l_auth_2e", - "l_auth_2g_build_function_custom_resource_with_storage_dynamodb_simulator", - "l_auth_3b_auth_4a_auth_7a_auth_8c", - "l_auth_4b_auth_8a_export_pull_d_schema_auth_5a", - "l_auth_5c_env_1_geo_add_a_init_a", - "l_auth_5f_env_4_frontend_config_drift_schema_auth_4d", - "l_auth_7b_export_pull_b_function_3a_init_special_case", - "l_auth_add_all_migration_v10", - "l_auth_override_migration_v10", + "l_auth_2f_notifications_lifecycle_notifications_analytics_compatibility_in_app_1", + "l_auth_3a_auth_3b_auth_4a", + "l_auth_4b_auth_8a_export_pull_d", + "l_auth_4c_auth_5a_auth_5c", + "l_auth_5g_admin_api_hosted_ui", + "l_auth_7a_auth_8c_feature_flags", + "l_auth_9_custom_resources_env_5", + "l_auth_migration_amplify_remove_api_2a", + "l_build_function_custom_resource_with_storage_dynamodb_simulator", + "l_container_hosting_init_b_notifications_apns", "l_containers_api_1", "l_containers_api_2", - "l_custom_resources_env_5_function_10_function_9c", - "l_custom_stack_migration_v10", - "l_datastore_modelgen_amplify_app_diagnose_hooks_a", + "l_custom_policies_container_function_9b_schema_iterative_update_2", + "l_datastore_modelgen", + "l_diagnose_hooks_a_mock_api", + "l_env_1_geo_add_a_init_a", "l_env_3", - "l_export_pull_c_function_12_function_2d_general_config_headless_init", - "l_feature_flags_geo_import_1b_global_sandbox_a_init_e", - "l_flutter_analytics_pinpoint_config_flutter_notifications_pinpoint_config_ios_analytics_pinpoint_config_ios_notifications_pinpo", - "l_function_11_function_2b_function_7_api_connection_migration2", - "l_function_4_interactions_schema_model_a_tags", - "l_function_5_schema_iterative_update_1_auth_6_function_2a", - "l_function_9b_schema_iterative_update_2_storage_1a_storage_1b", - "l_function_migration_update_v8", - "l_function_permissions_geo_import_1a_geo_import_2_global_sandbox_b", - "l_geo_add_d_geo_import_3_hosting_layer_3", + "l_env_4_frontend_config_drift_schema_auth_4d", + "l_export_pull_c_function_12_function_13", + "l_flutter_notifications_pinpoint_config_ios_analytics_pinpoint_config_ios_notifications_pinpoint_config", + "l_function_10_function_9c_function_permissions", + "l_function_14_function_15_function_2d", + "l_function_1_storage_5", + "l_function_2b_function_7_api_connection_migration2", + "l_function_2c_function_3b_function_4", + "l_function_3a_dotnet_function_3a_go_function_3a_nodejs", + "l_function_3a_python_init_special_case_http_migration", + "l_function_6_storage_2_export", + "l_function_8_schema_iterative_update_locking_api_lambda_auth_2", + "l_general_config_headless_init_help_hooks_c", + "l_geo_add_b_s3_sse_schema_auth_4a", + "l_geo_add_d_geo_import_3_hosting", "l_geo_add_e", "l_geo_add_f", - "l_geo_headless_api_key_migration5_schema_auth_1a_schema_auth_5b", - "l_geo_migration_v10", - "l_geo_multi_env_searchable_datastore_resolvers_schema_key", + "l_geo_headless_api_key_migration5_schema_auth_1a", + "l_geo_import_1a_geo_import_2_global_sandbox_b", + "l_geo_import_1b_global_sandbox_a_init_e", "l_geo_remove_1", "l_geo_remove_2", "l_geo_remove_3", "l_geo_update_1", "l_geo_update_2", - "l_git_clone_migration_tests_v10", - "l_help_hooks_c_init_force_push_interactions_1", + "l_git_clone_attach_init_c_layer_4", + "l_hooks_b_notifications_analytics_compatibility_sms_1_plugin", "l_hostingPROD", - "l_http_migration_schema_auth_12_schema_auth_3_schema_function_2", + "l_iam_permissions_boundary_node_function_notifications_sms", "l_import_auth_1a", "l_import_auth_1b", "l_import_auth_2a", @@ -70,113 +76,176 @@ "l_import_s3_2b", "l_import_s3_2c", "l_import_s3_3", - "l_init_b_notifications_apns_notifications_fcm_notifications_in_app_messaging_env_2", - "l_init_c_layer_4_function_2c_function_3b", - "l_init_f_auth_5d_configure_project_git_clone_attach", - "l_interactions_2_minify_cloudformation_notifications_multi_env_opensearch_simulator", - "l_javascript_analytics_pinpoint_config_javascript_notifications_pinpoint_config_pull_2_push", - "l_mock_api_analytics_kinesis_analytics_pinpoint_flutter_analytics_pinpoint_js", - "l_model_migration_auth_3c_auth_4c_auth_5a", - "l_notifications_analytics_compatibility_in_app_2_schema_auth_11_c_schema_auth_2b_schema_auth_6c", + "l_init_f_auth_5d_configure_project", + "l_init_force_push_interactions_1_interactions_2", + "l_interactions_schema_model_a_tags", + "l_javascript_analytics_pinpoint_config_javascript_notifications_pinpoint_config_pr_previews_multi_env_1", + "l_js_frontend_config", + "l_layer_1_api_key_migration4_schema_iterative_update_4", + "l_layer_2_schema_auth_13_function_5", + "l_layer_3_api_connection_migration_api_key_migration3", + "l_minify_cloudformation_notifications_multi_env_notifications_sms_update", + "l_notifications_analytics_compatibility_in_app_2_schema_auth_11_c_schema_auth_2b", + "l_notifications_analytics_compatibility_sms_2_analytics_2_global_sandbox_c", + "l_notifications_fcm_notifications_in_app_messaging_env_2_with_babel_config", "l_notifications_in_app_messaging", - "l_notifications_lifecycle_uibuilder_notifications_analytics_compatibility_in_app_1_notifications_analytics_compatibility_sms_2", - "l_notifications_migration_2_v8", - "l_notifications_migration_3_v8", - "l_notifications_migration_4_v8", - "l_notifications_migration_v8", - "l_notifications_sms_pull_pull_auth_10_container_hosting", - "l_notifications_sms_schema_auth_4b_schema_model_e_schema_versioned", - "l_parameter_store_1_parameter_store_2_android_analytics_pinpoint_config_android_notifications_pinpoint_config", - "l_pinpoint_region_migration_v10", - "l_plugin_studio_modelgen_custom_transformers_notifications_in_app_messaging_env_1", - "l_s3_sse_schema_auth_4a_schema_model_b_schema_model_d", - "l_scaffold_v10", + "l_notifications_sms_pull_pull_auth_10", + "l_opensearch_simulator_parameter_store_1_parameter_store_2", + "l_predictions_schema_auth_11_b_schema_auth_1b", + "l_pull_2_push_smoketest_ios", + "l_resolvers_schema_key_api_5", + "l_schema_auth_10_geo_multi_env_searchable_datastore", "l_schema_auth_11_a", + "l_schema_auth_12_schema_auth_3_schema_function_2", "l_schema_auth_15", - "l_schema_auth_1b_schema_auth_2a_schema_auth_7a_schema_auth_7b", - "l_schema_auth_4c_schema_auth_5c_auth_5b_auth_9", - "l_schema_auth_5d_schema_auth_6b_schema_auth_8c_auth_3a", - "l_schema_auth_6a_schema_data_access_patterns_schema_model_c_schema_predictions", - "l_schema_auth_6d_schema_auth_7c_schema_auth_8a_function_migration", - "l_schema_auth_8b_schema_auth_9_a_schema_auth_9_c_storage_3", - "l_schema_auth_9_b_schema_iterative_rollback_1_predictions_migration_api_6a", + "l_schema_auth_2a_schema_auth_7a_schema_auth_7b", + "l_schema_auth_4b_schema_model_e_schema_versioned", + "l_schema_auth_4c_schema_auth_5c_auth_5b", + "l_schema_auth_5a_schema_iterative_rollback_2_schema_iterative_update_3", + "l_schema_auth_5b_schema_auth_8b_schema_auth_9_a", + "l_schema_auth_5d_schema_auth_6b_schema_auth_8c", + "l_schema_auth_6a_schema_data_access_patterns_schema_model_c", + "l_schema_auth_6c_schema_auth_6d_schema_auth_7c", + "l_schema_auth_8a_function_migration_api_10", + "l_schema_auth_9_b_schema_iterative_rollback_1_predictions_migration", + "l_schema_auth_9_c_storage_3_auth_11", "l_schema_connection_1", - "l_schema_connection_2_schema_function_1_api_9b_custom_policies_container", - "l_schema_iterative_rollback_2_schema_iterative_update_3_auth_migration_api_2a", - "l_schema_iterative_update_4_function_1_storage_5", - "l_schema_iterative_update_locking_api_lambda_auth_2_layer_2_schema_auth_13", - "l_schema_searchable_api_key_migration1_schema_auth_14_api_3", + "l_schema_connection_2_schema_function_1_api_9b", + "l_schema_iterative_update_1_auth_6_function_2a", + "l_schema_model_b_schema_model_d_auth_5f", + "l_schema_predictions_model_migration_auth_3c", + "l_schema_searchable_api_key_migration1_schema_auth_14", "l_searchable_migration", - "l_smoketest_S3server_api_8_function_8", - "l_storage_2_export_iam_permissions_boundary_node_function", - "l_storage_migration_v10", - "l_with_babel_config_amplify_configure_env_2_init_d", - "w_analytics_kinesis_analytics_pinpoint_flutter_analytics_pinpoint_js_auth_2a", - "w_api_2b_api_6c_api_9a_auth_2g", - "w_api_7_export_pull_a_function_9a_geo_headless", - "w_api_key_migration3_predictions_schema_auth_11_b_schema_auth_1b", - "w_api_key_migration5_schema_auth_1a_schema_auth_5b_schema_auth_8b", - "w_api_lambda_auth_1_api_key_migration2_schema_searchable_api_key_migration1", - "w_auth_1b_delete_geo_add_c_geo_add_d", - "w_auth_2b_auth_2d_auth_2f_notifications_lifecycle", + "l_smoketest_S3server_api_8", + "l_smoketest_amplify_app", + "l_storage_1a_storage_1b_function_11", + "l_studio_modelgen_custom_transformers_notifications_in_app_messaging_env_1", + "l_uibuilder", + "l_user_groups_s3_access_user_groups_build_function_yarn_modern", + "w_amplify_configure_init_d", + "w_amplify_remove_api_2a", + "w_analytics_2_global_sandbox_c", + "w_analytics_kinesis_analytics_pinpoint_flutter", + "w_analytics_pinpoint_js_auth_2a", + "w_api_10_api_7", + "w_api_1_layer_1", + "w_api_2b_api_6c", + "w_api_3_api_6b", + "w_api_6a_auth_7b", + "w_api_8_schema_iterative_update_locking", + "w_api_9a_auth_2h", + "w_api_9b_custom_policies_container", + "w_api_connection_migration2_api_4", + "w_api_connection_migration_api_key_migration3", + "w_api_key_migration1_schema_auth_14", + "w_api_key_migration2_schema_searchable", + "w_api_key_migration4_schema_iterative_update_4", + "w_api_lambda_auth_2_schema_auth_13", + "w_apigw_api_lambda_auth_1", + "w_auth_11_auth_1b", + "w_auth_2b_auth_2d", "w_auth_2c", "w_auth_2e", - "w_auth_3c_auth_4c_auth_5a_auth_5c", - "w_auth_4a_auth_7a_auth_8c_feature_flags", - "w_auth_5e_auth_8b_geo_add_b_s3_sse", - "w_build_function_custom_resource_with_storage_dynamodb_simulator_export_pull_c", - "w_container_hosting_init_b_notifications_apns_notifications_fcm", + "w_auth_2f_notifications_lifecycle", + "w_auth_3b_auth_4a", + "w_auth_3c_auth_4c", + "w_auth_4b_auth_8a", + "w_auth_5a_auth_5c", + "w_auth_5e_auth_8b", + "w_auth_5g_admin_api", + "w_auth_6_function_2a", + "w_auth_7a_auth_8c", + "w_auth_9_env_5", + "w_auth_trigger_custom_policies_function", + "w_build_function_dynamodb_simulator", + "w_configure_project_init_c", + "w_container_hosting_init_b", "w_containers_api_1", "w_containers_api_2", - "w_custom_transformers_notifications_in_app_messaging_env_1_notifications_sms_pull_auth_10", - "w_env_1_geo_add_a_init_a_schema_auth_4c", + "w_containers_api_secrets_storage_4", + "w_custom_transformers_notifications_in_app_messaging_env_1", + "w_delete_geo_add_c", + "w_env_1_geo_add_a", "w_env_3", - "w_env_4_frontend_config_drift_schema_auth_4d_schema_auth_6a", - "w_env_5_function_10_function_9c_function_permissions", - "w_function_12_function_2d_general_config_headless_init_help", - "w_function_2b_api_connection_migration2_api_4_containers_api_secrets", - "w_geo_import_1a_geo_import_2_global_sandbox_b_schema_auth_5d", - "w_geo_import_1b_global_sandbox_a_init_e_notifications_analytics_compatibility_in_app_2", - "w_geo_import_3_hosting_layer_3_api_connection_migration", + "w_env_4_frontend_config_drift", + "w_export_pull_a_function_9a", + "w_export_pull_b_init_special_case", + "w_export_pull_c_function_12", + "w_export_pull_d_schema_auth_5a", + "w_feature_flags_geo_import_1b", + "w_function_1", + "w_function_10_function_9c", + "w_function_11_function_2b", + "w_function_13_function_14", + "w_function_2d_general_config_headless_init", + "w_function_5_schema_iterative_update_1", + "w_function_9b_schema_iterative_update_2", + "w_function_permissions_geo_import_1a", + "w_geo_add_b_s3_sse", + "w_geo_add_d_geo_import_3", + "w_geo_headless_api_key_migration5", + "w_geo_import_2_global_sandbox_b", "w_geo_remove_1", - "w_hooks_b_notifications_analytics_compatibility_sms_1_plugin_studio_modelgen", - "w_hooks_c_init_force_push_interactions_1_interactions_2", + "w_global_sandbox_a_init_e", + "w_help_init_force_push", + "w_hooks_b_notifications_analytics_compatibility_sms_1", + "w_hosted_ui_user_groups_s3_access", "w_hostingPROD", + "w_hosting_layer_3", + "w_http_migration_schema_auth_12", "w_import_dynamodb_1", "w_import_s3_1", "w_import_s3_3", - "w_init_f_auth_5d_configure_project_init_c", - "w_init_special_case_http_migration_schema_auth_12_schema_auth_3", - "w_layer_1_api_key_migration4_schema_iterative_update_4_function_1", - "w_layer_4_function_2c_interactions_schema_model_a", - "w_minify_cloudformation_notifications_multi_env_parameter_store_1_parameter_store_2", - "w_notifications_analytics_compatibility_in_app_1_notifications_analytics_compatibility_sms_2_analytics_2_global_sandbox_c", + "w_init_a_schema_auth_4c", + "w_init_f_auth_5d", + "w_interactions_1_interactions_2", + "w_interactions_schema_model_a", + "w_js_frontend_config", + "w_layer_4_function_2c", + "w_minify_cloudformation_notifications_multi_env", + "w_node_function_notifications_sms", + "w_notifications_analytics_compatibility_in_app_1_notifications_analytics_compatibility_sms_2", + "w_notifications_analytics_compatibility_in_app_2_schema_auth_11_c", + "w_notifications_apns_notifications_fcm", "w_notifications_in_app_messaging", - "w_notifications_in_app_messaging_env_2_with_babel_config_amplify_configure_init_d", - "w_predictions_migration_api_6a_auth_7b_export_pull_b", - "w_pull_2_push_smoketest_api_8", - "w_resolvers_schema_key_api_5_apigw", + "w_notifications_in_app_messaging_env_2_with_babel_config", + "w_notifications_sms_pull_auth_10", + "w_notifications_sms_update_parameter_store_1", + "w_parameter_store_2_push", + "w_plugin_studio_modelgen", + "w_predictions_schema_auth_11_b", + "w_schema_auth_10_geo_multi_env", "w_schema_auth_11_a", - "w_schema_auth_11_c_schema_auth_2b_schema_auth_6c_schema_auth_6d", - "w_schema_auth_14_api_3_api_6b_api_1", "w_schema_auth_15", - "w_schema_auth_2a_schema_auth_7a_schema_auth_7b_schema_auth_9_b", - "w_schema_auth_4a_schema_model_b_schema_model_d_auth_5f", - "w_schema_auth_4b_schema_model_e_schema_versioned_auth_1c", - "w_schema_auth_5a_schema_iterative_update_3_auth_migration_api_2a", - "w_schema_auth_5c_auth_5b_auth_9_custom_resources", - "w_schema_auth_6b_schema_auth_8c_auth_3a_auth_3b", - "w_schema_auth_7c_schema_auth_8a_function_migration_api_10", - "w_schema_auth_9_a_schema_auth_9_c_storage_3_auth_11", + "w_schema_auth_1a_schema_auth_5b", + "w_schema_auth_1b_schema_auth_2a", + "w_schema_auth_2b_schema_auth_6c", + "w_schema_auth_3_schema_function_2", + "w_schema_auth_4a_schema_model_b", + "w_schema_auth_4b_schema_model_e", + "w_schema_auth_4d_schema_auth_6a", + "w_schema_auth_5c_auth_5b", + "w_schema_auth_5d_schema_auth_6b", + "w_schema_auth_6d_schema_auth_7c", + "w_schema_auth_7a_schema_auth_7b", + "w_schema_auth_8a_function_migration", + "w_schema_auth_8b_schema_auth_9_a", + "w_schema_auth_8c_auth_3a", + "w_schema_auth_9_b_predictions_migration", + "w_schema_auth_9_c_storage_3", "w_schema_connection_1", - "w_schema_data_access_patterns_schema_model_c_schema_predictions_model_migration", - "w_schema_function_1_api_9b_custom_policies_container_function_9b", - "w_schema_function_2_auth_4b_auth_8a_export_pull_d", - "w_schema_iterative_update_1_auth_6_function_2a_schema_connection_2", - "w_schema_iterative_update_2_storage_1a_storage_1b_function_11", - "w_schema_iterative_update_locking_api_lambda_auth_2_schema_auth_13_function_5", + "w_schema_connection_2_schema_function_1", + "w_schema_data_access_patterns_schema_model_c", + "w_schema_iterative_update_3_auth_migration", + "w_schema_key_api_5", + "w_schema_model_d_auth_5f", + "w_schema_predictions_model_migration", + "w_schema_versioned_auth_1c", + "w_searchable_datastore_resolvers", "w_searchable_migration", - "w_storage_2_iam_permissions_boundary_node_function_notifications_sms", - "w_storage_4_schema_auth_10_geo_multi_env_searchable_datastore", - "w_tags_auth_1a_auth_trigger_custom_policies_function" + "w_smoketest_ios_smoketest", + "w_storage_1a_storage_1b", + "w_storage_2_iam_permissions_boundary", + "w_tags_auth_1a", + "w_user_groups_build_function_yarn_modern" ] diff --git a/codebuild_specs/wait_windows.json b/codebuild_specs/wait_windows.json new file mode 100644 index 00000000000..22d0b0d31ad --- /dev/null +++ b/codebuild_specs/wait_windows.json @@ -0,0 +1 @@ +["upb", "build_windows"] diff --git a/package.json b/package.json index 6478fb95478..752c9de3dfd 100644 --- a/package.json +++ b/package.json @@ -4,19 +4,17 @@ "description": "amplify-cli", "scripts": { "addwords": "node ./scripts/add-to-dict.js", - "all-cloud-e2e": "CURR_BRANCH=$(git branch | awk '/\\*/{printf \"%s\", $2}') && UPSTREAM_BRANCH=run-e2e/$USER/run-all-tests && git push $(git remote -v | grep aws-amplify/amplify-cli | head -n1 | awk '{print $1;}') $CURR_BRANCH:$UPSTREAM_BRANCH --no-verify --force && echo \"\n\n 🏃 E2E test are running at:\nhttps://app.circleci.com/pipelines/github/aws-amplify/amplify-cli?branch=$UPSTREAM_BRANCH\"", - "build-and-verify": "yarn clean && yarn build && yarn prettier-check && yarn lint-check && yarn verify-api-extract", + "build-and-verify": "yarn clean && yarn && yarn build && yarn prettier-check && yarn lint-check && yarn verify-api-extract", "build-tests-changed": "lerna run build-tests --since dev", "build-tests": "lerna run build-tests", "build": "lerna run build", "check-version-conflicts:beta": "yarn ts-node ./scripts/check-version.ts beta", "check-version-conflicts:release": "yarn ts-node ./scripts/check-version.ts", - "cloud-e2e-cb": "bash -c 'source ./scripts/cloud-e2e.sh && cloudE2E'", - "cloud-e2e-cb-beta": "bash -c 'source ./scripts/cloud-e2e.sh && cloudE2EBeta'", - "cloud-e2e-cb-local": "bash -c 'source ./scripts/cloud-e2e.sh && cloudE2ELocal'", "clean": "lerna run clean && yarn rimraf tsconfig.tsbuildinfo && lerna clean --yes && yarn rimraf node_modules", - "cloud-e2e-with-rc": "CURR_BRANCH=$(git branch | awk '/\\*/{printf \"%s\", $2}') && UPSTREAM_BRANCH=run-e2e-with-rc/$USER/$CURR_BRANCH && git push $(git remote -v | grep aws-amplify/amplify-cli | head -n1 | awk '{print $1;}') $CURR_BRANCH:$UPSTREAM_BRANCH --no-verify --force-with-lease && echo \"\n\n 🏃 E2E test are running at:\nhttps://app.circleci.com/pipelines/github/aws-amplify/amplify-cli?branch=$UPSTREAM_BRANCH\"", - "cloud-e2e": "CURR_BRANCH=$(git branch | awk '/\\*/{printf \"%s\", $2}') && UPSTREAM_BRANCH=run-e2e/$USER/$CURR_BRANCH && git push $(git remote -v | grep aws-amplify/amplify-cli | head -n1 | awk '{print $1;}') $CURR_BRANCH:$UPSTREAM_BRANCH --no-verify --force-with-lease && echo \"\n\n 🏃 E2E test are running at:\nhttps://app.circleci.com/pipelines/github/aws-amplify/amplify-cli?branch=$UPSTREAM_BRANCH\"", + "cloud-e2e-beta": "bash -c 'source ./scripts/cloud-e2e.sh && cloudE2EBeta'", + "cloud-e2e-local": "bash -c 'source ./scripts/cloud-e2e.sh && cloudE2ELocal'", + "cloud-e2e": "bash -c 'source ./scripts/cloud-e2e.sh && cloudE2E'", + "cloud-pr": "./scripts/cloud-pr.sh", "commit": "git-cz", "coverage:collect": "ts-node ./scripts/collect-test-coverage.ts", "coverage": "codecov || exit 0", @@ -29,40 +27,47 @@ "link-aa-win": "node ./scripts/link-bin.js packages/amplify-app/bin/amplify-app amplify-app-dev", "link-dev": "mkdir -p .bin/ && cd packages/amplify-cli && ln -s \"$(pwd)/bin/amplify\" ../../.bin/amplify-dev && cd ../../", "link-win": "node ./scripts/link-bin.js packages/amplify-cli/bin/amplify amplify-dev", - "lint-check": "yarn eslint . --ext .js,.jsx,.ts,.tsx --max-warnings=835", - "lint-fix": "git diff --name-only --cached --diff-filter d | grep -E '\\.(js|jsx|ts|tsx)$' | xargs eslint --fix --quiet", - "lint-fix-package-json": "yarn lint-check-package-json --fix", "lint-check-package-json": "yarn eslint --no-eslintrc --config .eslint.package.json.js '**/package.json'", + "lint-check": "yarn eslint . --ext .js,.jsx,.ts,.tsx --max-warnings=750", + "lint-fix-package-json": "yarn lint-check-package-json --fix", + "lint-fix": "git diff --name-only --cached --diff-filter d | grep -E '\\.(js|jsx|ts|tsx)$' | xargs eslint --fix --quiet", "mergewords": "yarn ts-node ./scripts/handle-dict-conflicts.ts", "pkg-all-local": "yarn verdaccio-clean && yarn verdaccio-start && yarn verdaccio-connect && yarn publish-to-verdaccio && yarn pkg-all && yarn verdaccio-disconnect", - "pkg-all": "bash -c 'source .circleci/local_publish_helpers.sh && generatePkgCli'", + "pkg-all": "bash -c 'source .circleci/local_publish_helpers_codebuild.sh && generatePkgCli'", "pkg-clean": "rimraf build out pkg/node_modules pkg/yarn.lock", - "prettier-check": "yarn prettier --check .", + "postinstall": "husky install", "prettier-changes": "git diff --name-only --diff-filter MRA dev | xargs yarn prettier --write", + "prettier-check": "yarn prettier --check .", "prettier-write": "yarn prettier --write .", "production-build": "lerna run build --concurrency 3 --stream", - "promote-rc": "./scripts/promote-rc.sh", + "promote-rc-local": "bash -c 'source ./scripts/cloud-release.sh && ReleaseLocal'", + "promote-rc-beta": "bash -c 'source ./scripts/cloud-release.sh && ReleaseBeta'", + "promote-rc": "bash -c 'source ./scripts/cloud-release.sh && ReleaseProd'", "publish-to-verdaccio": "lerna publish --yes --no-commit-hooks --no-push --exact --dist-tag=latest --conventional-commits --no-git-tag-version --no-verify-access", - "release-rc": "./scripts/release-rc.sh", + "release-rc-local": "bash -c 'source ./scripts/cloud-release.sh && RCLocal'", + "release-rc-beta": "bash -c 'source ./scripts/cloud-release.sh && RCBeta'", + "release-rc": "bash -c 'source ./scripts/cloud-release.sh && RCProd'", + "rollback": "./scripts/cloud-rollback.sh", + "tagged-release-without-e2e-local": "bash -c 'source ./scripts/cloud-release.sh && TaggedRCLocal'", + "tagged-release-without-e2e-beta": "bash -c 'source ./scripts/cloud-release.sh && TaggedRCBeta'", + "tagged-release-without-e2e-prod": "bash -c 'source ./scripts/cloud-release.sh && TaggedRCProd'", "rm-aa-dev-link": "rimraf -f \".bin/amplify-app-dev\"", "rm-dev-link": "rimraf -f \".bin/amplify-dev\"", "setup-dev-win": "yarn build && yarn link-win && yarn link-aa-win", "setup-dev": "yarn build && yarn rm-dev-link && yarn link-dev && yarn rm-aa-dev-link && yarn link-aa-dev", - "smoketest": "lerna run smoketest --output-style=stream-without-prefixes", - "smoketest@latest": "CLI_VERSION=latest lerna run smoketest --output-style=stream-without-prefixes", - "smoketest@rc": "CLI_VERSION=rc lerna run smoketest --output-style=stream-without-prefixes", - "split-e2e-tests": "yarn ts-node ./scripts/split-e2e-tests.ts && git add .circleci/config.yml", + "smoketest": "lerna run smoketest", + "split-e2e-tests-codebuild-single": "yarn ts-node ./scripts/generate_single_test_buildspec_codebuild.ts", "split-e2e-tests-codebuild": "yarn ts-node ./scripts/split-e2e-tests-codebuild.ts", "test-changed": "lerna run test --since dev", "test-ci": "lerna run test --concurrency 4 -- --ci -i", "test": "lerna run test --concurrency 1", - "update-data-packages": "./scripts/update-data-dependencies.sh && yarn", + "update-data-packages": "./scripts/update-data-dependencies.sh && yarn && yarn dedupe", "update-test-timing-data": "ts-node ./scripts/cci-get-job-metrics.ts && ts-node ./scripts/cci-extract-test-timings-from-job-metrics.ts", - "update-versions": "lerna version --yes --no-commit-hooks --no-push --exact --conventional-commits --no-git-tag-version", + "update-versions": "lerna version --yes --no-commit-hooks --no-push --exact --conventional-commits --no-git-tag-version --force-publish", "verdaccio-clean": "rimraf ../verdaccio-cache", - "verdaccio-connect": "bash -c 'source .circleci/local_publish_helpers.sh && setNpmRegistryUrlToLocal'", - "verdaccio-disconnect": "bash -c 'source .circleci/local_publish_helpers.sh && unsetNpmRegistryUrl'", - "verdaccio-start": "bash -c 'source .circleci/local_publish_helpers.sh && startLocalRegistry \"$(pwd)/.circleci/verdaccio.yaml\"'", + "verdaccio-connect": "bash -c 'source .circleci/local_publish_helpers_codebuild.sh && setNpmRegistryUrlToLocal'", + "verdaccio-disconnect": "bash -c 'source .circleci/local_publish_helpers_codebuild.sh && unsetNpmRegistryUrl'", + "verdaccio-start": "bash -c 'source .circleci/local_publish_helpers_codebuild.sh && startLocalRegistry \"$(pwd)/.circleci/verdaccio.yaml\"'", "verdaccio-stop": "kill -9 $(lsof -n -t -iTCP:4873 -sTCP:LISTEN) || true", "verify-api-extract:clean": "yarn clean && yarn build && yarn verify-api-extract", "verify-api-extract": "yarn extract-api && ./scripts/verify-extract-api.sh", @@ -80,19 +85,13 @@ "type": "git", "url": "https://github.com/aws-amplify/amplify-cli.git" }, - "husky": { - "hooks": { - "commit-msg": "commitlint -E HUSKY_GIT_PARAMS", - "pre-push": "yarn build-tests-changed && yarn split-e2e-tests", - "pre-commit": "./scripts/package-json-check.sh && yarn verify-commit" - } - }, "author": "Amazon Web Services", "license": "Apache-2.0", "dependencies": { "lerna": "^6.6.1", "node-gyp": "^9.3.1", - "strip-ansi": "^6.0.0" + "strip-ansi": "^6.0.0", + "yargs": "^17.7.2" }, "workspaces": { "packages": [ @@ -101,7 +100,7 @@ }, "devDependencies": { "@babel/cli": "^7.10.5", - "@babel/core": "^7.10.5", + "@babel/core": "^7.23.2", "@babel/plugin-proposal-numeric-separator": "^7.10.4", "@babel/plugin-transform-modules-commonjs": "7.10.4", "@babel/plugin-transform-typescript": "7.10.5", @@ -115,6 +114,7 @@ "@types/jest": "^29.0.0", "@types/js-yaml": "^4.0.0", "@types/node": "^18.16.1", + "@types/yargs": "^17", "@typescript-eslint/eslint-plugin": "^5.34.0", "@typescript-eslint/parser": "^5.34.0", "@zkochan/cmd-shim": "^5.1.0", @@ -136,7 +136,7 @@ "eslint-plugin-spellcheck": "^0.0.17", "execa": "^5.1.1", "glob": "^7.2.0", - "husky": "^3.1.0", + "husky": "^8.0.3", "istanbul-lib-coverage": "^3.2.0", "istanbul-lib-report": "^3.0.0", "istanbul-reports": "^3.1.5", @@ -161,15 +161,24 @@ }, "packageManager": "yarn@3.5.0", "resolutions": { - "aws-sdk": "^2.1354.0", + "aws-sdk": "^2.1464.0", "cross-fetch": "^2.2.6", + "fast-xml-parser": "^4.4.1", "glob-parent": "^6.0.2", "got": "^11.8.5", "istanbul/async": "^2.6.4", "jake/async": "^2.6.4", "json5": "^2.2.3", + "mysql2": "^3.9.8", "nth-check": "^2.0.1", - "undici": "^5.8.0", - "pkg-fetch": "https://github.com/aws-amplify/pkg-fetch#ad4a21feb533d338bf951e7ba28cea7256aedeff" + "pkg-fetch": "^3.5.2", + "undici": "^5.28.3", + "tough-cookie": "^4.1.3", + "semver": "^7.5.4", + "send": "^0.19.0", + "word-wrap": "^1.2.4", + "follow-redirects": "^1.15.6", + "tar": "^6.2.1", + "ejs": "^3.1.10" } } diff --git a/packages/amplify-app/CHANGELOG.md b/packages/amplify-app/CHANGELOG.md index 9332d24e74f..927ff884ddd 100644 --- a/packages/amplify-app/CHANGELOG.md +++ b/packages/amplify-app/CHANGELOG.md @@ -3,6 +3,255 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.0.38](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.37...@aws-amplify/amplify-app@5.0.38) (2025-01-30) + +**Note:** Version bump only for package @aws-amplify/amplify-app + + + + + +## [5.0.37](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.36...@aws-amplify/amplify-app@5.0.37) (2025-01-02) + +**Note:** Version bump only for package @aws-amplify/amplify-app + + + + + +## [5.0.36](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.35...@aws-amplify/amplify-app@5.0.36) (2024-08-02) + +**Note:** Version bump only for package @aws-amplify/amplify-app + + + + + +## [5.0.35](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.34...@aws-amplify/amplify-app@5.0.35) (2024-06-27) + +**Note:** Version bump only for package @aws-amplify/amplify-app + + + + + +## [5.0.34](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.33...@aws-amplify/amplify-app@5.0.34) (2024-06-20) + +**Note:** Version bump only for package @aws-amplify/amplify-app + + + + + +## [5.0.33](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.32...@aws-amplify/amplify-app@5.0.33) (2024-06-06) + +**Note:** Version bump only for package @aws-amplify/amplify-app + + + + + +## [5.0.32](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.31...@aws-amplify/amplify-app@5.0.32) (2024-05-24) + +**Note:** Version bump only for package @aws-amplify/amplify-app + + + + + +## [5.0.31](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.30...@aws-amplify/amplify-app@5.0.31) (2024-05-07) + +**Note:** Version bump only for package @aws-amplify/amplify-app + + + + + +## [5.0.30](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.29...@aws-amplify/amplify-app@5.0.30) (2024-04-18) + +**Note:** Version bump only for package @aws-amplify/amplify-app + + + + + +## [5.0.29](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.28...@aws-amplify/amplify-app@5.0.29) (2024-04-15) + +**Note:** Version bump only for package @aws-amplify/amplify-app + + + + + +## [5.0.28](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.27...@aws-amplify/amplify-app@5.0.28) (2024-03-29) + +**Note:** Version bump only for package @aws-amplify/amplify-app + + + + + +## [5.0.27](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.26...@aws-amplify/amplify-app@5.0.27) (2024-03-06) + +**Note:** Version bump only for package @aws-amplify/amplify-app + + + + + +## [5.0.26](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.25...@aws-amplify/amplify-app@5.0.26) (2023-12-11) + +**Note:** Version bump only for package @aws-amplify/amplify-app + + + + + +## [5.0.25](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.23...@aws-amplify/amplify-app@5.0.25) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [5.0.24](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.23...@aws-amplify/amplify-app@5.0.24) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-app + + + + + +## [5.0.23](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.22...@aws-amplify/amplify-app@5.0.23) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-app + + + + + +## [5.0.22](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.21...@aws-amplify/amplify-app@5.0.22) (2023-10-21) + +**Note:** Version bump only for package @aws-amplify/amplify-app + + + + + +## [5.0.21](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.20...@aws-amplify/amplify-app@5.0.21) (2023-10-12) + +**Note:** Version bump only for package @aws-amplify/amplify-app + + + + + +## [5.0.20](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.19...@aws-amplify/amplify-app@5.0.20) (2023-10-05) + +**Note:** Version bump only for package @aws-amplify/amplify-app + + + + + +## [5.0.19](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.18...@aws-amplify/amplify-app@5.0.19) (2023-10-03) + +**Note:** Version bump only for package @aws-amplify/amplify-app + + + + + +## [5.0.18](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.17...@aws-amplify/amplify-app@5.0.18) (2023-09-22) + +**Note:** Version bump only for package @aws-amplify/amplify-app + + + + + +## [5.0.17](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.16...@aws-amplify/amplify-app@5.0.17) (2023-08-31) + +**Note:** Version bump only for package @aws-amplify/amplify-app + + + + + +## [5.0.16](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.15...@aws-amplify/amplify-app@5.0.16) (2023-08-17) + + +### Bug Fixes + +* amplify app version regex ([#13050](https://github.com/aws-amplify/amplify-cli/issues/13050)) ([f185a72](https://github.com/aws-amplify/amplify-cli/commit/f185a726bf5c19b16d2e39e377bbf234b517e082)) + + + + + +## [5.0.15](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.14...@aws-amplify/amplify-app@5.0.15) (2023-08-14) + +**Note:** Version bump only for package @aws-amplify/amplify-app + + + + + +## [5.0.14](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.13...@aws-amplify/amplify-app@5.0.14) (2023-08-09) + + +### Bug Fixes + +* Dependabot alerts for semver, tough-cookie ([#12962](https://github.com/aws-amplify/amplify-cli/issues/12962)) ([175a86b](https://github.com/aws-amplify/amplify-cli/commit/175a86b89a54c65bb6e68c0609be503d61e39d63)) + + + + + +## [5.0.13](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.12...@aws-amplify/amplify-app@5.0.13) (2023-07-28) + +**Note:** Version bump only for package @aws-amplify/amplify-app + + + + + +## [5.0.12](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.11...@aws-amplify/amplify-app@5.0.12) (2023-07-27) + +**Note:** Version bump only for package @aws-amplify/amplify-app + + + + + +## [5.0.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.10...@aws-amplify/amplify-app@5.0.11) (2023-07-24) + +**Note:** Version bump only for package @aws-amplify/amplify-app + + + + + +## [5.0.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.9...@aws-amplify/amplify-app@5.0.10) (2023-07-20) + +**Note:** Version bump only for package @aws-amplify/amplify-app + + + + + +## [5.0.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.8...@aws-amplify/amplify-app@5.0.9) (2023-06-13) + +**Note:** Version bump only for package @aws-amplify/amplify-app + + + + + ## [5.0.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-app@5.0.6...@aws-amplify/amplify-app@5.0.8) (2023-05-25) diff --git a/packages/amplify-app/package.json b/packages/amplify-app/package.json index 3c32107b94d..0aca8d08625 100644 --- a/packages/amplify-app/package.json +++ b/packages/amplify-app/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-app", - "version": "5.0.8", + "version": "5.0.38", "description": "Amplify CLI", "repository": { "type": "git", @@ -26,10 +26,10 @@ "@aws-amplify/cli": ">=5.0.0" }, "dependencies": { - "@aws-amplify/amplify-frontend-android": "3.5.4", - "@aws-amplify/amplify-frontend-flutter": "1.4.2", - "@aws-amplify/amplify-frontend-ios": "3.6.10", - "@aws-amplify/amplify-frontend-javascript": "3.9.8", + "@aws-amplify/amplify-frontend-android": "3.5.8", + "@aws-amplify/amplify-frontend-flutter": "1.4.7", + "@aws-amplify/amplify-frontend-ios": "3.7.9", + "@aws-amplify/amplify-frontend-javascript": "3.10.19", "chalk": "^4.1.1", "execa": "^5.1.1", "fs-extra": "^8.1.0", @@ -38,7 +38,7 @@ "node-emoji": "^1.10.0", "ora": "^4.0.3", "rimraf": "^3.0.0", - "semver": "^7.3.5", + "semver": "^7.5.4", "xcode": "^2.1.0", "yargs": "^15.1.0" }, diff --git a/packages/amplify-app/src/index.js b/packages/amplify-app/src/index.js index ab57afbdd4d..8db7ff296f7 100644 --- a/packages/amplify-app/src/index.js +++ b/packages/amplify-app/src/index.js @@ -112,7 +112,7 @@ async function installAmplifyCLI() { async function amplifyCLIVersionCheck() { try { const amplifyCLIVersionRaw = await callAmplify(['-v'], { inheritIO: false }); - const amplifyCLIVersionMatch = amplifyCLIVersionRaw.match(/\d+\.\d+\.\d+(-[a-z]+\.[0-9]+)?/g); + const amplifyCLIVersionMatch = amplifyCLIVersionRaw.match(/^\d+\.\d+\.\d+/g); const amplifyCLIVersion = Array.isArray(amplifyCLIVersionMatch) && amplifyCLIVersionMatch.length > 0 ? amplifyCLIVersionMatch[0] : undefined; const minCLIVersion = engines['@aws-amplify/cli']; diff --git a/packages/amplify-appsync-simulator/API.md b/packages/amplify-appsync-simulator/API.md index 81674abbb25..5cd560e81e9 100644 --- a/packages/amplify-appsync-simulator/API.md +++ b/packages/amplify-appsync-simulator/API.md @@ -89,6 +89,10 @@ export class AmplifyAppSyncSimulator { // (undocumented) init(config: AmplifyAppSyncSimulatorConfig): void; // (undocumented) + get isHttps(): boolean; + // (undocumented) + get localhostUrl(): string; + // (undocumented) get pubsub(): PubSub; // (undocumented) reload(config: AmplifyAppSyncSimulatorConfig): void; @@ -266,6 +270,10 @@ export type AppSyncSimulatorSchemaConfig = AppSyncMockFile; export type AppSyncSimulatorServerConfig = { port?: number; wsPort?: number; + httpsConfig?: { + sslKeyPath: string; + sslCertPath: string; + }; }; // @public (undocumented) diff --git a/packages/amplify-appsync-simulator/CHANGELOG.md b/packages/amplify-appsync-simulator/CHANGELOG.md index 79abfa5f497..5e36bb0da8c 100644 --- a/packages/amplify-appsync-simulator/CHANGELOG.md +++ b/packages/amplify-appsync-simulator/CHANGELOG.md @@ -3,6 +3,275 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.16.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.16.8...@aws-amplify/amplify-appsync-simulator@2.16.9) (2025-01-30) + +**Note:** Version bump only for package @aws-amplify/amplify-appsync-simulator + + + + + +## [2.16.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.16.7...@aws-amplify/amplify-appsync-simulator@2.16.8) (2025-01-02) + +**Note:** Version bump only for package @aws-amplify/amplify-appsync-simulator + + + + + +## [2.16.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.16.6...@aws-amplify/amplify-appsync-simulator@2.16.7) (2024-11-18) + +**Note:** Version bump only for package @aws-amplify/amplify-appsync-simulator + + + + + +## [2.16.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.16.5...@aws-amplify/amplify-appsync-simulator@2.16.6) (2024-10-05) + + +### Bug Fixes + +* remove node-ip dependency ([#13877](https://github.com/aws-amplify/amplify-cli/issues/13877)) ([5e9cd5e](https://github.com/aws-amplify/amplify-cli/commit/5e9cd5ee0ee851f10ecbaef80817a19a7b3e04a1)) + + + + + +## [2.16.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.16.4...@aws-amplify/amplify-appsync-simulator@2.16.5) (2024-08-02) + +**Note:** Version bump only for package @aws-amplify/amplify-appsync-simulator + + + + + +## [2.16.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.16.3...@aws-amplify/amplify-appsync-simulator@2.16.4) (2024-06-27) + +**Note:** Version bump only for package @aws-amplify/amplify-appsync-simulator + + + + + +## [2.16.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.16.2...@aws-amplify/amplify-appsync-simulator@2.16.3) (2024-06-20) + +**Note:** Version bump only for package @aws-amplify/amplify-appsync-simulator + + + + + +## [2.16.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.16.1...@aws-amplify/amplify-appsync-simulator@2.16.2) (2024-06-06) + +**Note:** Version bump only for package @aws-amplify/amplify-appsync-simulator + + + + + +## [2.16.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.16.0...@aws-amplify/amplify-appsync-simulator@2.16.1) (2024-05-24) + +**Note:** Version bump only for package @aws-amplify/amplify-appsync-simulator + + + + + +# [2.16.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.15.10...@aws-amplify/amplify-appsync-simulator@2.16.0) (2024-05-07) + + +### Features + +* support https for mock util plugin ([#13700](https://github.com/aws-amplify/amplify-cli/issues/13700)) ([cf418f1](https://github.com/aws-amplify/amplify-cli/commit/cf418f1d9ebc46fff8e12abe7a61d9a5e4ccdfe7)) + + + + + +## [2.15.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.15.9...@aws-amplify/amplify-appsync-simulator@2.15.10) (2024-04-18) + +**Note:** Version bump only for package @aws-amplify/amplify-appsync-simulator + + + + + +## [2.15.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.15.8...@aws-amplify/amplify-appsync-simulator@2.15.9) (2024-04-15) + + +### Bug Fixes + +* resolve issues with graphiql explorer ([#13691](https://github.com/aws-amplify/amplify-cli/issues/13691)) ([4d0677d](https://github.com/aws-amplify/amplify-cli/commit/4d0677def73fb0d1c2fb77e30ed8b7c0e34cfebd)) + + + + + +## [2.15.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.15.7...@aws-amplify/amplify-appsync-simulator@2.15.8) (2024-03-29) + +**Note:** Version bump only for package @aws-amplify/amplify-appsync-simulator + + + + + +## [2.15.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.15.6...@aws-amplify/amplify-appsync-simulator@2.15.7) (2024-03-06) + +**Note:** Version bump only for package @aws-amplify/amplify-appsync-simulator + + + + + +## [2.15.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.15.5...@aws-amplify/amplify-appsync-simulator@2.15.6) (2023-12-11) + +**Note:** Version bump only for package @aws-amplify/amplify-appsync-simulator + + + + + +## [2.15.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.15.3...@aws-amplify/amplify-appsync-simulator@2.15.5) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [2.15.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.15.3...@aws-amplify/amplify-appsync-simulator@2.15.4) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-appsync-simulator + + + + + +## [2.15.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.15.2...@aws-amplify/amplify-appsync-simulator@2.15.3) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-appsync-simulator + + + + + +## [2.15.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.15.1...@aws-amplify/amplify-appsync-simulator@2.15.2) (2023-10-21) + +**Note:** Version bump only for package @aws-amplify/amplify-appsync-simulator + + + + + +## [2.15.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.15.0...@aws-amplify/amplify-appsync-simulator@2.15.1) (2023-10-12) + +**Note:** Version bump only for package @aws-amplify/amplify-appsync-simulator + + + + + +# [2.15.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.14.3...@aws-amplify/amplify-appsync-simulator@2.15.0) (2023-10-05) + + +### Features + +* **amplify-util-uibuilder:** amplify js backwards compatibility ([#13288](https://github.com/aws-amplify/amplify-cli/issues/13288)) ([2db3e18](https://github.com/aws-amplify/amplify-cli/commit/2db3e181cf06954085eb8fade0b26162672327db)) + + + + + +## [2.14.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.14.2...@aws-amplify/amplify-appsync-simulator@2.14.3) (2023-10-03) + +**Note:** Version bump only for package @aws-amplify/amplify-appsync-simulator + + + + + +## [2.14.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.14.1...@aws-amplify/amplify-appsync-simulator@2.14.2) (2023-09-22) + +**Note:** Version bump only for package @aws-amplify/amplify-appsync-simulator + + + + + +## [2.14.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.14.0...@aws-amplify/amplify-appsync-simulator@2.14.1) (2023-08-31) + +**Note:** Version bump only for package @aws-amplify/amplify-appsync-simulator + + + + + +# [2.14.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.13.4...@aws-amplify/amplify-appsync-simulator@2.14.0) (2023-08-17) + + +### Features + +* generate components using graphql ([1568581](https://github.com/aws-amplify/amplify-cli/commit/15685810460881aa71e88724398b9be05ba53781)) + + + + + +## [2.13.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.13.3...@aws-amplify/amplify-appsync-simulator@2.13.4) (2023-08-09) + +**Note:** Version bump only for package @aws-amplify/amplify-appsync-simulator + + + + + +## [2.13.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.13.2...@aws-amplify/amplify-appsync-simulator@2.13.3) (2023-07-28) + +**Note:** Version bump only for package @aws-amplify/amplify-appsync-simulator + + + + + +## [2.13.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.13.1...@aws-amplify/amplify-appsync-simulator@2.13.2) (2023-07-27) + +**Note:** Version bump only for package @aws-amplify/amplify-appsync-simulator + + + + + +## [2.13.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.13.0...@aws-amplify/amplify-appsync-simulator@2.13.1) (2023-07-24) + +**Note:** Version bump only for package @aws-amplify/amplify-appsync-simulator + + + + + +# [2.13.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.12.4...@aws-amplify/amplify-appsync-simulator@2.13.0) (2023-07-20) + + +### Features + +* uibuilder codegen service ([#12896](https://github.com/aws-amplify/amplify-cli/issues/12896)) ([3fe2f98](https://github.com/aws-amplify/amplify-cli/commit/3fe2f98a99a9daf22efccb23a031882ea2be899b)) + + + + + +## [2.12.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.12.3...@aws-amplify/amplify-appsync-simulator@2.12.4) (2023-06-13) + +**Note:** Version bump only for package @aws-amplify/amplify-appsync-simulator + + + + + ## [2.12.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-appsync-simulator@2.12.1...@aws-amplify/amplify-appsync-simulator@2.12.3) (2023-05-25) diff --git a/packages/amplify-appsync-simulator/package.json b/packages/amplify-appsync-simulator/package.json index 8c8582e2a5a..a59433b1a21 100644 --- a/packages/amplify-appsync-simulator/package.json +++ b/packages/amplify-appsync-simulator/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-appsync-simulator", - "version": "2.12.3", + "version": "2.16.9", "description": "An AppSync Simulator to test AppSync API.", "repository": { "type": "git", @@ -30,21 +30,20 @@ "extract-api": "ts-node ../../scripts/extract-api.ts" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.0.8", - "@aws-amplify/amplify-prompts": "2.7.0", + "@aws-amplify/amplify-cli-core": "4.3.11", + "@aws-amplify/amplify-prompts": "2.8.6", "@graphql-tools/schema": "^8.3.1", "@graphql-tools/utils": "^8.5.1", - "amplify-velocity-template": "1.4.11", - "aws-sdk": "^2.1354.0", + "amplify-velocity-template": "1.4.15", + "aws-sdk": "^2.1464.0", "chalk": "^4.1.1", "cors": "^2.8.5", "dataloader": "^2.0.0", - "express": "^4.17.3", + "express": "^4.21.2", "get-port": "^5.1.1", "graphql": "^15.5.0", "graphql-iso-date": "^3.6.1", "graphql-subscriptions": "^1.1.0", - "ip": "^1.1.5", "js-string-escape": "^1.0.1", "jwt-decode": "^2.2.0", "libphonenumber-js": "1.9.47", @@ -59,12 +58,12 @@ "ws": "^8.5.0" }, "devDependencies": { - "@aws-amplify/amplify-graphiql-explorer": "2.5.7", + "@aws-amplify/amplify-graphiql-explorer": "2.6.0", "@types/cors": "^2.8.6", "@types/express": "^4.17.3", "@types/node": "^12.12.6", "@types/ws": "^8.2.2", - "jsonwebtoken": "^9.0.0" + "jose": "^5.2.0" }, "packageExtensions": { "graphql-iso-date": { diff --git a/packages/amplify-appsync-simulator/src/__tests__/__helpers__/appsync-client.ts b/packages/amplify-appsync-simulator/src/__tests__/__helpers__/appsync-client.ts index 8e63d96718a..a4f592629b1 100644 --- a/packages/amplify-appsync-simulator/src/__tests__/__helpers__/appsync-client.ts +++ b/packages/amplify-appsync-simulator/src/__tests__/__helpers__/appsync-client.ts @@ -5,7 +5,7 @@ import * as http from 'http'; import type { GraphQLError } from 'graphql'; import { AmplifyAppSyncSimulator, AmplifyAppSyncSimulatorAuthenticationType } from '../../'; -import jwt from 'jsonwebtoken'; +import { SignJWT } from 'jose'; /** * Minimal gql tag just for syntax highlighting and Prettier while writing client GraphQL queries @@ -54,14 +54,14 @@ export async function appSyncClient reject(err)); }, diff --git a/packages/amplify-appsync-simulator/src/__tests__/index.test.ts b/packages/amplify-appsync-simulator/src/__tests__/index.test.ts index 5f496ee57e2..b1bb99db2ff 100644 --- a/packages/amplify-appsync-simulator/src/__tests__/index.test.ts +++ b/packages/amplify-appsync-simulator/src/__tests__/index.test.ts @@ -4,10 +4,8 @@ import { VelocityTemplate } from '../velocity'; import { AmplifyAppSyncSimulatorAuthenticationType, - AppSyncSimulatorDataSourceNoneConfig, AmplifyAppSyncSimulatorConfig, AppSyncMockFile, - AppSyncSimulatorBaseResolverConfig, RESOLVER_KIND, AppSyncSimulatorUnitResolverConfig, } from '../type-definition'; diff --git a/packages/amplify-appsync-simulator/src/__tests__/resolvers/pipeline-resolver.test.ts b/packages/amplify-appsync-simulator/src/__tests__/resolvers/pipeline-resolver.test.ts index 1eada37d4e2..2a9baf6fc83 100644 --- a/packages/amplify-appsync-simulator/src/__tests__/resolvers/pipeline-resolver.test.ts +++ b/packages/amplify-appsync-simulator/src/__tests__/resolvers/pipeline-resolver.test.ts @@ -63,14 +63,14 @@ describe('Pipeline Resolvers', () => { beforeEach(() => { fnImpl = { fn1: { - resolve: jest.fn().mockImplementation((source, args, stash, prevResult, context, info) => ({ + resolve: jest.fn().mockImplementation((source, args, stash) => ({ result: 'FN1-RESULT', args, stash: { ...stash, exeSeq: [...(stash.exeSeq || []), 'fn1'] }, })), }, fn2: { - resolve: jest.fn().mockImplementation((source, args, stash, prevResult, context, info) => ({ + resolve: jest.fn().mockImplementation((source, args, stash) => ({ args, result: 'FN2-RESULT', stash: { ...stash, exeSeq: [...(stash.exeSeq || []), 'fn2'] }, @@ -171,12 +171,12 @@ describe('Pipeline Resolvers', () => { appsyncErrors: [], }; const info = {}; - fnImpl.fn1.resolve.mockImplementation((source, args, stash, prevResult, context, info) => ({ + fnImpl.fn1.resolve.mockImplementation((source, args, stash) => ({ result: 'FN1-RESULT', args: { ...args, fn1Arg: 'FN1-ARG1' }, stash: { ...stash, exeSeq: [...(stash.exeSeq || []), 'fn1'] }, })); - fnImpl.fn2.resolve.mockImplementation((source, args, stash, prevResult, context, info) => ({ + fnImpl.fn2.resolve.mockImplementation((source, args, stash) => ({ result: 'FN2-RESULT', args: { ...args, fn2Arg: 'FN2-ARG1' }, stash: { ...stash, exeSeq: [...(stash.exeSeq || []), 'fn2'] }, @@ -245,7 +245,7 @@ describe('Pipeline Resolvers', () => { it('bails out early on terminal error', async () => { resolver = new AppSyncPipelineResolver(baseConfig, simulatorContext); fnImpl.fn1 = { - resolve: jest.fn().mockImplementation((source, args, stash, prevResult, context, info) => { + resolve: jest.fn().mockImplementation((source, args, stash, prevResult, context) => { const err = new Error('fn1-ERROR'); context.appsyncErrors = [...context.appsyncErrors, err]; return { diff --git a/packages/amplify-appsync-simulator/src/__tests__/scalars/AWSIPAddress.test.ts b/packages/amplify-appsync-simulator/src/__tests__/scalars/AWSIPAddress.test.ts index 93d70013134..fb77ab4c37b 100644 --- a/packages/amplify-appsync-simulator/src/__tests__/scalars/AWSIPAddress.test.ts +++ b/packages/amplify-appsync-simulator/src/__tests__/scalars/AWSIPAddress.test.ts @@ -1,4 +1,3 @@ -import { URL } from 'url'; import { scalars } from '../../schema/appsync-scalars'; describe('AWSIPAddress parse', () => { it('should parse valid ip address', () => { diff --git a/packages/amplify-appsync-simulator/src/__tests__/server/subscription/websocket-server/server.test.ts b/packages/amplify-appsync-simulator/src/__tests__/server/subscription/websocket-server/server.test.ts index 652153c70a3..a6e4d96467f 100644 --- a/packages/amplify-appsync-simulator/src/__tests__/server/subscription/websocket-server/server.test.ts +++ b/packages/amplify-appsync-simulator/src/__tests__/server/subscription/websocket-server/server.test.ts @@ -78,8 +78,8 @@ describe('WebsocketSubscriptionServer', () => { server.start(); }); - afterEach(() => { - server?.stop(); + afterEach(async () => { + await server?.stop(); httpServer?.close(); }); @@ -103,7 +103,7 @@ describe('WebsocketSubscriptionServer', () => { it('should accept connection when the protocol is graphql-ws', async () => { const client = new WS(`ws://localhost:${serverPort}${REALTIME_SUBSCRIPTION_PATH}`, 'graphql-ws'); - const messagePromise = new Promise((resolve, _) => { + const messagePromise = new Promise((resolve) => { client.addEventListener('close', (event) => { expect(event.wasClean).toBeTruthy(); resolve(undefined); @@ -133,7 +133,7 @@ describe('WebsocketSubscriptionServer', () => { it('should fail connection when onConnectionHandler throw and error', async () => { onConnectHandler.mockRejectedValue('error'); const client = new WS(`ws://localhost:${serverPort}${REALTIME_SUBSCRIPTION_PATH}`, 'graphql-ws'); - const messagePromise = new Promise((resolve, _) => { + const messagePromise = new Promise((resolve) => { client.addEventListener('close', (event) => { expect(event.code).toEqual(1002); resolve(undefined); @@ -164,7 +164,7 @@ describe('WebsocketSubscriptionServer', () => { type: MESSAGE_TYPES.GQL_CONNECTION_INIT, payload: {}, }; - const messagePromise = new Promise((resolve, _) => { + const messagePromise = new Promise((resolve) => { client.onmessage = (message: WS.MessageEvent) => { const data = JSON.parse(message.data as string); expect(data.type).toEqual(MESSAGE_TYPES.GQL_CONNECTION_ACK); @@ -183,7 +183,7 @@ describe('WebsocketSubscriptionServer', () => { type: 'invalid', payload: {}, }; - const messagePromise = new Promise((resolve, _) => { + const messagePromise = new Promise((resolve) => { client.onmessage = (message: WS.MessageEvent) => { const data = JSON.parse(message.data as string); expect(data.type).toEqual(MESSAGE_TYPES.GQL_ERROR); @@ -390,7 +390,7 @@ describe('WebsocketSubscriptionServer', () => { const data = { onMessage: 'hello from iterator', }; - pubsub.publish('onMessage', data); + void pubsub.publish('onMessage', data); const msg = await waitForMessage(client, MESSAGE_TYPES.GQL_DATA); expect(msg).toEqual({ type: MESSAGE_TYPES.GQL_DATA, diff --git a/packages/amplify-appsync-simulator/src/__tests__/server/websocket-subscription.test.ts b/packages/amplify-appsync-simulator/src/__tests__/server/websocket-subscription.test.ts index b1d31f3c652..4106858cc50 100644 --- a/packages/amplify-appsync-simulator/src/__tests__/server/websocket-subscription.test.ts +++ b/packages/amplify-appsync-simulator/src/__tests__/server/websocket-subscription.test.ts @@ -73,10 +73,10 @@ describe('websocket subscription', () => { expect(startSpy).toHaveBeenCalled(); }); - it('should call websocket servers stop method when stop is called', () => { + it('should call websocket servers stop method when stop is called', async () => { const stopSpy = jest.spyOn(WebsocketSubscriptionServer.prototype, 'stop'); const subs = new AppSyncSimulatorSubscriptionServer(simulatorContext, server, subscriptionPath); - subs.stop(); + await subs.stop(); expect(stopSpy).toHaveBeenCalled(); }); @@ -119,7 +119,7 @@ describe('websocket subscription', () => { describe('onSubscribe', () => { let subsServer: AppSyncSimulatorSubscriptionServer; - let asyncIterator = new PubSub().asyncIterator('onMessage'); + const asyncIterator = new PubSub().asyncIterator('onMessage'); const tokenString = 'token-here'; const jwt = { iss: 'some issuer' }; const doc = parse(/* GraphQL */ ` diff --git a/packages/amplify-appsync-simulator/src/__tests__/utils/graphql-runner/query-and-mutation.test.ts b/packages/amplify-appsync-simulator/src/__tests__/utils/graphql-runner/query-and-mutation.test.ts index a17051fd4ca..a1b1b173c75 100644 --- a/packages/amplify-appsync-simulator/src/__tests__/utils/graphql-runner/query-and-mutation.test.ts +++ b/packages/amplify-appsync-simulator/src/__tests__/utils/graphql-runner/query-and-mutation.test.ts @@ -156,7 +156,6 @@ describe('runQueryAndMutation', () => { }); it('should have error object populated when error occurs in the resolver (e.g. Lambda DataSource)', async () => { - const name = 'John Doe'; const doc = parse(/* GraphQL */ ` query getName { getName diff --git a/packages/amplify-appsync-simulator/src/__tests__/utils/graphql-runner/subscription.test.ts b/packages/amplify-appsync-simulator/src/__tests__/utils/graphql-runner/subscription.test.ts index d362e754909..539d2877e6a 100644 --- a/packages/amplify-appsync-simulator/src/__tests__/utils/graphql-runner/subscription.test.ts +++ b/packages/amplify-appsync-simulator/src/__tests__/utils/graphql-runner/subscription.test.ts @@ -18,8 +18,8 @@ describe('runSubscription', () => { `); let schema: GraphQLSchema; - let subscriptionResolver = jest.fn(); - let subscriptionSubscribe = jest.fn(); + const subscriptionResolver = jest.fn(); + const subscriptionSubscribe = jest.fn(); const executionContext: AppSyncGraphQLExecutionContext = { headers: { 'x-api-key': 'da-fake-key' }, diff --git a/packages/amplify-appsync-simulator/src/__tests__/velocity/util/list-utils.test.ts b/packages/amplify-appsync-simulator/src/__tests__/velocity/util/list-utils.test.ts index e1d7731b2ee..97bcf45228c 100644 --- a/packages/amplify-appsync-simulator/src/__tests__/velocity/util/list-utils.test.ts +++ b/packages/amplify-appsync-simulator/src/__tests__/velocity/util/list-utils.test.ts @@ -7,7 +7,7 @@ import { AmplifyAppSyncSimulatorAuthenticationType } from '../../../type-definit const stubInfo = {} as unknown; export const mockInfo = stubInfo as GraphQLResolveInfo; -var util; +let util; beforeEach(() => { const executionContext: AppSyncGraphQLExecutionContext = { diff --git a/packages/amplify-appsync-simulator/src/__tests__/velocity/util/math.test.ts b/packages/amplify-appsync-simulator/src/__tests__/velocity/util/math.test.ts index 00fe68423ea..e2ce2e85ba4 100644 --- a/packages/amplify-appsync-simulator/src/__tests__/velocity/util/math.test.ts +++ b/packages/amplify-appsync-simulator/src/__tests__/velocity/util/math.test.ts @@ -5,7 +5,7 @@ import { AmplifyAppSyncSimulatorAuthenticationType } from '../../../type-definit const stubInfo = {} as unknown; export const mockInfo = stubInfo as GraphQLResolveInfo; -var util; +let util; beforeEach(() => { const executionContext: AppSyncGraphQLExecutionContext = { diff --git a/packages/amplify-appsync-simulator/src/__tests__/velocity/util/str.test.ts b/packages/amplify-appsync-simulator/src/__tests__/velocity/util/str.test.ts index 622d75c1a3c..e18fc3d4d57 100644 --- a/packages/amplify-appsync-simulator/src/__tests__/velocity/util/str.test.ts +++ b/packages/amplify-appsync-simulator/src/__tests__/velocity/util/str.test.ts @@ -5,7 +5,7 @@ import { AppSyncGraphQLExecutionContext } from '../../../utils/graphql-runner'; const stubInfo = {} as unknown; export const mockInfo = stubInfo as GraphQLResolveInfo; -var util; +let util; beforeEach(() => { const executionContext: AppSyncGraphQLExecutionContext = { diff --git a/packages/amplify-appsync-simulator/src/index.ts b/packages/amplify-appsync-simulator/src/index.ts index 77df9b8061d..4f5ad7aaa1e 100644 --- a/packages/amplify-appsync-simulator/src/index.ts +++ b/packages/amplify-appsync-simulator/src/index.ts @@ -181,6 +181,12 @@ export class AmplifyAppSyncSimulator { get url(): string { return this._server.url.graphql; } + get localhostUrl(): string { + return this._server.localhostUrl.graphql; + } + get isHttps(): boolean { + return this._server.isHttps; + } get config(): AmplifyAppSyncSimulatorConfig { return this._config; } diff --git a/packages/amplify-appsync-simulator/src/server/index.ts b/packages/amplify-appsync-simulator/src/server/index.ts index ee473a45906..24e493f5898 100644 --- a/packages/amplify-appsync-simulator/src/server/index.ts +++ b/packages/amplify-appsync-simulator/src/server/index.ts @@ -2,24 +2,58 @@ import { OperationServer } from './operations'; import { AmplifyAppSyncSimulator } from '..'; import { AppSyncSimulatorServerConfig } from '../type-definition'; import { Server, createServer } from 'http'; +import { createServer as createHttpsServer } from 'https'; +import { readFileSync } from 'fs'; import { fromEvent } from 'promise-toolbox'; -import { address as getLocalIpAddress } from 'ip'; import { AppSyncSimulatorSubscriptionServer } from './websocket-subscription'; import getPort from 'get-port'; import { REALTIME_SUBSCRIPTION_PATH } from './subscription/websocket-server/server'; +import os from 'os'; const BASE_PORT = 8900; const MAX_PORT = 9999; +function getLocalIpAddress(): string { + const interfaces = os.networkInterfaces(); + const internalAddresses = Object.keys(interfaces) + .map((nic) => { + const addresses = interfaces[nic].filter((details) => details.internal); + return addresses.length ? addresses[0].address : undefined; + }) + .filter(Boolean); + return internalAddresses.length ? internalAddresses[0] : '127.0.0.1'; +} + export class AppSyncSimulatorServer { private _operationServer: OperationServer; private _httpServer: Server; private _realTimeSubscriptionServer: AppSyncSimulatorSubscriptionServer; private _url: string; + private _localhostUrl: string; + private _isHttps = false; constructor(private config: AppSyncSimulatorServerConfig, private simulatorContext: AmplifyAppSyncSimulator) { this._operationServer = new OperationServer(config, simulatorContext); - this._httpServer = createServer(this._operationServer.app); + + // Check if the https configuration is not provided + if (!config.httpsConfig) { + this._httpServer = createServer(this._operationServer.app); + } else { + try { + // Read the ssl cert and key + const sslOptions = { + key: readFileSync(config.httpsConfig.sslKeyPath), + cert: readFileSync(config.httpsConfig.sslCertPath), + }; + // Set the isHttps flag to true + this._isHttps = true; + // Create the https server + this._httpServer = createHttpsServer(sslOptions, this._operationServer.app); + } catch (e) { + throw new Error(`SSL key and certificate path provided are invalid. ${e.message}`); + } + } + this._realTimeSubscriptionServer = new AppSyncSimulatorSubscriptionServer( simulatorContext, this._httpServer, @@ -48,7 +82,9 @@ export class AppSyncSimulatorServer { this._httpServer.listen(port); await fromEvent(this._httpServer, 'listening').then(() => { - this._url = `http://${getLocalIpAddress()}:${port}`; + const protocol = this._isHttps ? 'https' : 'http'; + this._url = `${protocol}://${getLocalIpAddress()}:${port}`; + this._localhostUrl = `${protocol}://localhost:${port}`; }); } @@ -61,4 +97,12 @@ export class AppSyncSimulatorServer { graphql: this._url, }; } + get localhostUrl() { + return { + graphql: this._localhostUrl, + }; + } + get isHttps() { + return this._isHttps; + } } diff --git a/packages/amplify-appsync-simulator/src/server/subscription/websocket-server/server.ts b/packages/amplify-appsync-simulator/src/server/subscription/websocket-server/server.ts index 7ba06d3cb89..90b91ed1f75 100644 --- a/packages/amplify-appsync-simulator/src/server/subscription/websocket-server/server.ts +++ b/packages/amplify-appsync-simulator/src/server/subscription/websocket-server/server.ts @@ -5,7 +5,6 @@ import * as WebSocket from 'ws'; import { Server as WebSocketServer, ServerOptions } from 'ws'; import { GQLMessageConnectionAck, - GQLMessageConnectionInit, GQLMessageSubscriptionStart, GQLMessageSubscriptionStop, isSubscriptionConnectionInitMessage, diff --git a/packages/amplify-appsync-simulator/src/type-definition.ts b/packages/amplify-appsync-simulator/src/type-definition.ts index a98b5f87038..063b633aa47 100644 --- a/packages/amplify-appsync-simulator/src/type-definition.ts +++ b/packages/amplify-appsync-simulator/src/type-definition.ts @@ -152,6 +152,10 @@ export type AmplifyAppSyncSimulatorConfig = { export type AppSyncSimulatorServerConfig = { port?: number; wsPort?: number; + httpsConfig?: { + sslKeyPath: string; + sslCertPath: string; + }; }; export type AmplifyAppSyncSimulatorRequestContext = { diff --git a/packages/amplify-category-analytics/CHANGELOG.md b/packages/amplify-category-analytics/CHANGELOG.md index 34e967cfe88..ea4c42156cf 100644 --- a/packages/amplify-category-analytics/CHANGELOG.md +++ b/packages/amplify-category-analytics/CHANGELOG.md @@ -3,6 +3,225 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.0.37](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-analytics@5.0.36...@aws-amplify/amplify-category-analytics@5.0.37) (2025-01-30) + +**Note:** Version bump only for package @aws-amplify/amplify-category-analytics + + + + + +## [5.0.36](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-analytics@5.0.35...@aws-amplify/amplify-category-analytics@5.0.36) (2024-08-02) + +**Note:** Version bump only for package @aws-amplify/amplify-category-analytics + + + + + +## [5.0.35](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-analytics@5.0.34...@aws-amplify/amplify-category-analytics@5.0.35) (2024-06-27) + +**Note:** Version bump only for package @aws-amplify/amplify-category-analytics + + + + + +## [5.0.34](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-analytics@5.0.33...@aws-amplify/amplify-category-analytics@5.0.34) (2024-06-20) + +**Note:** Version bump only for package @aws-amplify/amplify-category-analytics + + + + + +## [5.0.33](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-analytics@5.0.32...@aws-amplify/amplify-category-analytics@5.0.33) (2024-06-06) + +**Note:** Version bump only for package @aws-amplify/amplify-category-analytics + + + + + +## [5.0.32](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-analytics@5.0.31...@aws-amplify/amplify-category-analytics@5.0.32) (2024-05-24) + +**Note:** Version bump only for package @aws-amplify/amplify-category-analytics + + + + + +## [5.0.31](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-analytics@5.0.30...@aws-amplify/amplify-category-analytics@5.0.31) (2024-05-07) + +**Note:** Version bump only for package @aws-amplify/amplify-category-analytics + + + + + +## [5.0.30](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-analytics@5.0.29...@aws-amplify/amplify-category-analytics@5.0.30) (2024-04-18) + +**Note:** Version bump only for package @aws-amplify/amplify-category-analytics + + + + + +## [5.0.29](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-analytics@5.0.28...@aws-amplify/amplify-category-analytics@5.0.29) (2024-04-15) + +**Note:** Version bump only for package @aws-amplify/amplify-category-analytics + + + + + +## [5.0.28](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-analytics@5.0.27...@aws-amplify/amplify-category-analytics@5.0.28) (2024-03-29) + +**Note:** Version bump only for package @aws-amplify/amplify-category-analytics + + + + + +## [5.0.27](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-analytics@5.0.26...@aws-amplify/amplify-category-analytics@5.0.27) (2024-03-06) + +**Note:** Version bump only for package @aws-amplify/amplify-category-analytics + + + + + +## [5.0.26](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-analytics@5.0.25...@aws-amplify/amplify-category-analytics@5.0.26) (2023-12-11) + +**Note:** Version bump only for package @aws-amplify/amplify-category-analytics + + + + + +## [5.0.25](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-analytics@5.0.23...@aws-amplify/amplify-category-analytics@5.0.25) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [5.0.24](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-analytics@5.0.23...@aws-amplify/amplify-category-analytics@5.0.24) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-category-analytics + + + + + +## [5.0.23](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-analytics@5.0.22...@aws-amplify/amplify-category-analytics@5.0.23) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-category-analytics + + + + + +## [5.0.22](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-analytics@5.0.21...@aws-amplify/amplify-category-analytics@5.0.22) (2023-10-12) + +**Note:** Version bump only for package @aws-amplify/amplify-category-analytics + + + + + +## [5.0.21](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-analytics@5.0.20...@aws-amplify/amplify-category-analytics@5.0.21) (2023-10-05) + +**Note:** Version bump only for package @aws-amplify/amplify-category-analytics + + + + + +## [5.0.20](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-analytics@5.0.19...@aws-amplify/amplify-category-analytics@5.0.20) (2023-10-03) + +**Note:** Version bump only for package @aws-amplify/amplify-category-analytics + + + + + +## [5.0.19](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-analytics@5.0.18...@aws-amplify/amplify-category-analytics@5.0.19) (2023-09-22) + +**Note:** Version bump only for package @aws-amplify/amplify-category-analytics + + + + + +## [5.0.18](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-analytics@5.0.17...@aws-amplify/amplify-category-analytics@5.0.18) (2023-08-31) + +**Note:** Version bump only for package @aws-amplify/amplify-category-analytics + + + + + +## [5.0.17](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-analytics@5.0.16...@aws-amplify/amplify-category-analytics@5.0.17) (2023-08-17) + +**Note:** Version bump only for package @aws-amplify/amplify-category-analytics + + + + + +## [5.0.16](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-analytics@5.0.15...@aws-amplify/amplify-category-analytics@5.0.16) (2023-08-09) + +**Note:** Version bump only for package @aws-amplify/amplify-category-analytics + + + + + +## [5.0.15](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-analytics@5.0.14...@aws-amplify/amplify-category-analytics@5.0.15) (2023-07-28) + +**Note:** Version bump only for package @aws-amplify/amplify-category-analytics + + + + + +## [5.0.14](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-analytics@5.0.13...@aws-amplify/amplify-category-analytics@5.0.14) (2023-07-27) + +**Note:** Version bump only for package @aws-amplify/amplify-category-analytics + + + + + +## [5.0.13](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-analytics@5.0.12...@aws-amplify/amplify-category-analytics@5.0.13) (2023-07-24) + +**Note:** Version bump only for package @aws-amplify/amplify-category-analytics + + + + + +## [5.0.12](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-analytics@5.0.11...@aws-amplify/amplify-category-analytics@5.0.12) (2023-07-20) + +**Note:** Version bump only for package @aws-amplify/amplify-category-analytics + + + + + +## [5.0.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-analytics@5.0.10...@aws-amplify/amplify-category-analytics@5.0.11) (2023-06-13) + +**Note:** Version bump only for package @aws-amplify/amplify-category-analytics + + + + + ## [5.0.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-analytics@5.0.8...@aws-amplify/amplify-category-analytics@5.0.10) (2023-05-25) diff --git a/packages/amplify-category-analytics/package.json b/packages/amplify-category-analytics/package.json index 8da4777a773..cd6d18d3f42 100644 --- a/packages/amplify-category-analytics/package.json +++ b/packages/amplify-category-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-category-analytics", - "version": "5.0.10", + "version": "5.0.37", "description": "amplify-cli analytics plugin", "repository": { "type": "git", @@ -25,9 +25,9 @@ "extract-api": "ts-node ../../scripts/extract-api.ts" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.0.8", - "@aws-amplify/amplify-environment-parameters": "1.6.3", - "@aws-amplify/amplify-prompts": "2.7.0", + "@aws-amplify/amplify-cli-core": "4.3.11", + "@aws-amplify/amplify-environment-parameters": "1.9.16", + "@aws-amplify/amplify-prompts": "2.8.6", "fs-extra": "^8.1.0", "uuid": "^8.3.2" }, diff --git a/packages/amplify-category-auth/API.md b/packages/amplify-category-auth/API.md index 6c6ba139774..9f832059f3f 100644 --- a/packages/amplify-category-auth/API.md +++ b/packages/amplify-category-auth/API.md @@ -126,6 +126,9 @@ export function prePushAuthHook(context: any): Promise; // @public (undocumented) export function transformCategoryStack(context: any, resource: any): Promise; +// @public (undocumented) +export const updateAppClientWithGeneratedSecret: (context: $TSContext) => Promise; + // @public (undocumented) export const uploadFiles: (context: $TSContext) => Promise; diff --git a/packages/amplify-category-auth/CHANGELOG.md b/packages/amplify-category-auth/CHANGELOG.md index e753f51ffe5..64afc477d9b 100644 --- a/packages/amplify-category-auth/CHANGELOG.md +++ b/packages/amplify-category-auth/CHANGELOG.md @@ -3,6 +3,270 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [3.7.17](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-auth@3.7.16...@aws-amplify/amplify-category-auth@3.7.17) (2025-01-30) + +**Note:** Version bump only for package @aws-amplify/amplify-category-auth + + + + + +## [3.7.16](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-auth@3.7.15...@aws-amplify/amplify-category-auth@3.7.16) (2024-11-18) + +**Note:** Version bump only for package @aws-amplify/amplify-category-auth + + + + + +## [3.7.15](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-auth@3.7.14...@aws-amplify/amplify-category-auth@3.7.15) (2024-08-02) + +**Note:** Version bump only for package @aws-amplify/amplify-category-auth + + + + + +## [3.7.14](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-auth@3.7.13...@aws-amplify/amplify-category-auth@3.7.14) (2024-06-27) + +**Note:** Version bump only for package @aws-amplify/amplify-category-auth + + + + + +## [3.7.13](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-auth@3.7.12...@aws-amplify/amplify-category-auth@3.7.13) (2024-06-20) + +**Note:** Version bump only for package @aws-amplify/amplify-category-auth + + + + + +## [3.7.12](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-auth@3.7.11...@aws-amplify/amplify-category-auth@3.7.12) (2024-06-06) + +**Note:** Version bump only for package @aws-amplify/amplify-category-auth + + + + + +## [3.7.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-auth@3.7.10...@aws-amplify/amplify-category-auth@3.7.11) (2024-05-24) + +**Note:** Version bump only for package @aws-amplify/amplify-category-auth + + + + + +## [3.7.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-auth@3.7.9...@aws-amplify/amplify-category-auth@3.7.10) (2024-05-07) + + +### Bug Fixes + +* **amplify-category-auth:** added pagination for listGroups api action ([#13723](https://github.com/aws-amplify/amplify-cli/issues/13723)) ([0d52c47](https://github.com/aws-amplify/amplify-cli/commit/0d52c478475e25f53d7693f79902b21dc4741942)) + + + + + +## [3.7.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-auth@3.7.8...@aws-amplify/amplify-category-auth@3.7.9) (2024-04-18) + +**Note:** Version bump only for package @aws-amplify/amplify-category-auth + + + + + +## [3.7.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-auth@3.7.7...@aws-amplify/amplify-category-auth@3.7.8) (2024-04-15) + + +### Bug Fixes + +* upgrade Go runtime and fix e2e ([#13671](https://github.com/aws-amplify/amplify-cli/issues/13671)) ([395f717](https://github.com/aws-amplify/amplify-cli/commit/395f717cf52e7beef76f00ee08d37877138b0c30)) + + + + + +## [3.7.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-auth@3.7.6...@aws-amplify/amplify-category-auth@3.7.7) (2024-03-29) + +**Note:** Version bump only for package @aws-amplify/amplify-category-auth + + + + + +## [3.7.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-auth@3.7.5...@aws-amplify/amplify-category-auth@3.7.6) (2024-03-06) + + +### Bug Fixes + +* limit query parameter parsing in auth admin api ([#13512](https://github.com/aws-amplify/amplify-cli/issues/13512)) ([2480681](https://github.com/aws-amplify/amplify-cli/commit/24806814ce2275fe7d70e5484c3c485023b8041a)) + + + + + +## [3.7.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-auth@3.7.4...@aws-amplify/amplify-category-auth@3.7.5) (2023-12-11) + +**Note:** Version bump only for package @aws-amplify/amplify-category-auth + + + + + +## [3.7.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-auth@3.7.2...@aws-amplify/amplify-category-auth@3.7.4) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [3.7.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-auth@3.7.2...@aws-amplify/amplify-category-auth@3.7.3) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-category-auth + + + + + +## [3.7.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-auth@3.7.1...@aws-amplify/amplify-category-auth@3.7.2) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-category-auth + + + + + +## [3.7.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-auth@3.7.0...@aws-amplify/amplify-category-auth@3.7.1) (2023-10-12) + +**Note:** Version bump only for package @aws-amplify/amplify-category-auth + + + + + +# [3.7.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-auth@3.6.3...@aws-amplify/amplify-category-auth@3.7.0) (2023-10-05) + + +### Features + +* **amplify-util-uibuilder:** amplify js backwards compatibility ([#13288](https://github.com/aws-amplify/amplify-cli/issues/13288)) ([2db3e18](https://github.com/aws-amplify/amplify-cli/commit/2db3e181cf06954085eb8fade0b26162672327db)) + + + + + +## [3.6.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-auth@3.6.2...@aws-amplify/amplify-category-auth@3.6.3) (2023-10-03) + +**Note:** Version bump only for package @aws-amplify/amplify-category-auth + + + + + +## [3.6.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-auth@3.6.1...@aws-amplify/amplify-category-auth@3.6.2) (2023-09-22) + +**Note:** Version bump only for package @aws-amplify/amplify-category-auth + + + + + +## [3.6.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-auth@3.6.0...@aws-amplify/amplify-category-auth@3.6.1) (2023-08-31) + +**Note:** Version bump only for package @aws-amplify/amplify-category-auth + + + + + +# [3.6.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-auth@3.5.0...@aws-amplify/amplify-category-auth@3.6.0) (2023-08-17) + + +### Bug Fixes + +* remove error incorrectly swallowed (fixes [#13030](https://github.com/aws-amplify/amplify-cli/issues/13030)) ([#13041](https://github.com/aws-amplify/amplify-cli/issues/13041)) ([2941584](https://github.com/aws-amplify/amplify-cli/commit/294158417ab176db4ece2acf043cc16355e9c737)) + + +### Features + +* generate components using graphql ([1568581](https://github.com/aws-amplify/amplify-cli/commit/15685810460881aa71e88724398b9be05ba53781)) + + + + + +# [3.5.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-auth@3.4.3...@aws-amplify/amplify-category-auth@3.5.0) (2023-08-09) + + +### Bug Fixes + +* add permissions boundary for IAM Role created for auth trigger ([#12914](https://github.com/aws-amplify/amplify-cli/issues/12914)) ([47990a9](https://github.com/aws-amplify/amplify-cli/commit/47990a9e8f3703fff84ec17fa3c7e33865f676f4)) +* remove vm2 ([#12989](https://github.com/aws-amplify/amplify-cli/issues/12989)) ([7bc0b56](https://github.com/aws-amplify/amplify-cli/commit/7bc0b5654a585104a537c1a3f9615bd672435b58)) + + +### Features + +* replace oauth and userpoolclient lambdas with cfn and sdk calls ([#12935](https://github.com/aws-amplify/amplify-cli/issues/12935)) ([b3ab512](https://github.com/aws-amplify/amplify-cli/commit/b3ab5125f2ec405afd1af9d2f77b8683d5914010)) +* replace role mapping lambda in auth category ([#13003](https://github.com/aws-amplify/amplify-cli/issues/13003)) ([4ce0329](https://github.com/aws-amplify/amplify-cli/commit/4ce032932702305b9f9564a77418855ceb0f0fca)) +* run auth lambdas on node 18 ([#13011](https://github.com/aws-amplify/amplify-cli/issues/13011)) ([a9e12ff](https://github.com/aws-amplify/amplify-cli/commit/a9e12ff9552ba024887312a81bf411fb5c7926d0)) + + + + + +## [3.4.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-auth@3.4.2...@aws-amplify/amplify-category-auth@3.4.3) (2023-07-28) + +**Note:** Version bump only for package @aws-amplify/amplify-category-auth + + + + + +## [3.4.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-auth@3.4.1...@aws-amplify/amplify-category-auth@3.4.2) (2023-07-27) + +**Note:** Version bump only for package @aws-amplify/amplify-category-auth + + + + + +## [3.4.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-auth@3.4.0...@aws-amplify/amplify-category-auth@3.4.1) (2023-07-24) + +**Note:** Version bump only for package @aws-amplify/amplify-category-auth + + + + + +# [3.4.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-auth@3.3.0...@aws-amplify/amplify-category-auth@3.4.0) (2023-07-20) + + +### Features + +* uibuilder codegen service ([#12896](https://github.com/aws-amplify/amplify-cli/issues/12896)) ([3fe2f98](https://github.com/aws-amplify/amplify-cli/commit/3fe2f98a99a9daf22efccb23a031882ea2be899b)) + + + + + +# [3.3.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-auth@3.2.3...@aws-amplify/amplify-category-auth@3.3.0) (2023-06-13) + + +### Features + +* update console auth command url to v2 dashboard ([#12612](https://github.com/aws-amplify/amplify-cli/issues/12612)) ([a9f21e5](https://github.com/aws-amplify/amplify-cli/commit/a9f21e5d684ad29b30b0d341b6601d8bb76c2364)) + + + + + ## [3.2.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-auth@3.2.1...@aws-amplify/amplify-category-auth@3.2.3) (2023-05-25) diff --git a/packages/amplify-category-auth/package.json b/packages/amplify-category-auth/package.json index e0259d270e6..5c2b4edf125 100644 --- a/packages/amplify-category-auth/package.json +++ b/packages/amplify-category-auth/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-category-auth", - "version": "3.2.3", + "version": "3.7.17", "description": "amplify-cli authentication plugin", "repository": { "type": "git", @@ -28,17 +28,17 @@ "extract-api": "ts-node ../../scripts/extract-api.ts" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.0.8", - "@aws-amplify/amplify-environment-parameters": "1.6.3", - "@aws-amplify/amplify-function-plugin-interface": "1.10.2", - "@aws-amplify/amplify-prompts": "2.7.0", - "@aws-amplify/amplify-util-import": "2.6.0", - "@aws-amplify/cli-extensibility-helper": "3.0.8", - "amplify-headless-interface": "1.17.3", - "amplify-util-headless-input": "1.9.12", - "aws-cdk-lib": "~2.68.0", - "aws-sdk": "^2.1354.0", - "axios": "^0.26.0", + "@aws-amplify/amplify-cli-core": "4.3.11", + "@aws-amplify/amplify-environment-parameters": "1.9.16", + "@aws-amplify/amplify-function-plugin-interface": "1.12.1", + "@aws-amplify/amplify-prompts": "2.8.6", + "@aws-amplify/amplify-util-import": "2.8.3", + "@aws-amplify/cli-extensibility-helper": "3.0.35", + "amplify-headless-interface": "1.17.7", + "amplify-util-headless-input": "1.9.18", + "aws-cdk-lib": "~2.177.0", + "aws-sdk": "^2.1464.0", + "axios": "^1.6.7", "chalk": "^4.1.1", "change-case": "^4.1.1", "constructs": "^10.0.5", @@ -49,11 +49,11 @@ "mime-types": "^2.1.26", "ora": "^4.0.3", "promise-sequential": "^1.1.1", - "uuid": "^8.3.2", - "vm2": "^3.9.19" + "uuid": "^8.3.2" }, "devDependencies": { - "@aws-sdk/client-cognito-identity-provider": "^3.303.0", + "@aws-sdk/client-cognito-identity-provider": "3.624.0", + "@aws-sdk/client-iam": "3.624.0", "@types/mime-types": "^2.1.1", "cloudform-types": "^4.2.0", "jest": "^29.5.0", diff --git a/packages/amplify-category-auth/resources/adminAuth/admin-auth-app.js b/packages/amplify-category-auth/resources/adminAuth/admin-auth-app.js index 9c3d1ad14d3..d6749854ea7 100644 --- a/packages/amplify-category-auth/resources/adminAuth/admin-auth-app.js +++ b/packages/amplify-category-auth/resources/adminAuth/admin-auth-app.js @@ -162,14 +162,8 @@ app.get('/getUser', async (req, res, next) => { app.get('/listUsers', async (req, res, next) => { try { - let response; - if (req.query.token) { - response = await listUsers(req.query.limit || 25, req.query.token); - } else if (req.query.limit) { - response = await listUsers((Limit = req.query.limit)); - } else { - response = await listUsers(); - } + const limit = req.query.limit ? parseInt(req.query.limit) : 25; + const response = await listUsers(limit, req.query.token); res.status(200).json(response); } catch (err) { next(err); @@ -178,14 +172,8 @@ app.get('/listUsers', async (req, res, next) => { app.get('/listGroups', async (req, res, next) => { try { - let response; - if (req.query.token) { - response = await listGroups(req.query.limit || 25, req.query.token); - } else if (req.query.limit) { - response = await listGroups((Limit = req.query.limit)); - } else { - response = await listGroups(); - } + const limit = req.query.limit ? parseInt(req.query.limit) : 25; + const response = await listGroups(limit, req.query.token); res.status(200).json(response); } catch (err) { next(err); @@ -200,14 +188,8 @@ app.get('/listGroupsForUser', async (req, res, next) => { } try { - let response; - if (req.query.token) { - response = await listGroupsForUser(req.query.username, req.query.limit || 25, req.query.token); - } else if (req.query.limit) { - response = await listGroupsForUser(req.query.username, (Limit = req.query.limit)); - } else { - response = await listGroupsForUser(req.query.username); - } + const limit = req.query.limit ? parseInt(req.query.limit) : 25; + const response = await listGroupsForUser(req.query.username, limit, req.query.token); res.status(200).json(response); } catch (err) { next(err); @@ -222,14 +204,8 @@ app.get('/listUsersInGroup', async (req, res, next) => { } try { - let response; - if (req.query.token) { - response = await listUsersInGroup(req.query.groupname, req.query.limit || 25, req.query.token); - } else if (req.query.limit) { - response = await listUsersInGroup(req.query.groupname, (Limit = req.query.limit)); - } else { - response = await listUsersInGroup(req.query.groupname); - } + const limit = req.query.limit ? parseInt(req.query.limit) : 25; + const response = await listUsersInGroup(req.query.groupname, limit, req.query.token); res.status(200).json(response); } catch (err) { next(err); diff --git a/packages/amplify-category-auth/resources/adminAuth/admin-auth-cognitoActions.js b/packages/amplify-category-auth/resources/adminAuth/admin-auth-cognitoActions.js index 3f9d60902f6..1c900aa32cb 100644 --- a/packages/amplify-category-auth/resources/adminAuth/admin-auth-cognitoActions.js +++ b/packages/amplify-category-auth/resources/adminAuth/admin-auth-cognitoActions.js @@ -167,11 +167,11 @@ async function listUsers(Limit, PaginationToken) { } } -async function listGroups(Limit, PaginationToken) { +async function listGroups(Limit, NextToken) { const params = { UserPoolId: userPoolId, ...(Limit && { Limit }), - ...(PaginationToken && { PaginationToken }), + ...(NextToken && { NextToken }), }; console.log('Attempting to list groups'); @@ -179,10 +179,6 @@ async function listGroups(Limit, PaginationToken) { try { const result = await cognitoIdentityProviderClient.send(new ListGroupsCommand(params)); - // Rename to NextToken for consistency with other Cognito APIs - result.NextToken = result.PaginationToken; - delete result.PaginationToken; - return result; } catch (err) { console.log(err); diff --git a/packages/amplify-category-auth/resources/adminAuth/admin-auth-package.json b/packages/amplify-category-auth/resources/adminAuth/admin-auth-package.json index a9fa5648d98..8be3bcb669e 100644 --- a/packages/amplify-category-auth/resources/adminAuth/admin-auth-package.json +++ b/packages/amplify-category-auth/resources/adminAuth/admin-auth-package.json @@ -10,6 +10,6 @@ "express": "^4.17.1" }, "devDependencies": { - "@aws-sdk/client-cognito-identity-provider": "^3.303.0" + "@aws-sdk/client-cognito-identity-provider": "3.624.0" } } diff --git a/packages/amplify-category-auth/resources/auth-custom-resource/hostedUILambda.js b/packages/amplify-category-auth/resources/auth-custom-resource/hostedUILambda.js index b2e4b1c7ccf..640662f9f5e 100644 --- a/packages/amplify-category-auth/resources/auth-custom-resource/hostedUILambda.js +++ b/packages/amplify-category-auth/resources/auth-custom-resource/hostedUILambda.js @@ -1,81 +1,80 @@ const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { +const { + CognitoIdentityProviderClient, + CreateUserPoolDomainCommand, + DeleteUserPoolDomainCommand, + DescribeUserPoolCommand, + DescribeUserPoolDomainCommand, +} = require('@aws-sdk/client-cognito-identity-provider'); +const identity = new CognitoIdentityProviderClient({}); + +exports.handler = (event, context) => { + // Don't return promise, response.send() marks context as done internally + void tryHandleEvent(event, context); +}; + +async function tryHandleEvent(event, context) { + try { + await handleEvent(event); + response.send(event, context, response.SUCCESS, {}); + } catch (err) { + console.log(err); + response.send(event, context, response.FAILED, { err }); + } +} + +async function handleEvent(event) { const userPoolId = event.ResourceProperties.userPoolId; const inputDomainName = event.ResourceProperties.hostedUIDomainName; - let deleteUserPoolDomain = (domainName) => { - let params = { Domain: domainName, UserPoolId: userPoolId }; - return identity.deleteUserPoolDomain(params).promise(); + if (event.RequestType === 'Delete') { + await deleteUserPoolDomain(inputDomainName, userPoolId); + } else if (event.RequestType === 'Update' || event.RequestType === 'Create') { + await createOrUpdateDomain(inputDomainName, userPoolId); + } +} + +async function checkDomainAvailability(domainName) { + const params = { Domain: domainName }; + try { + const res = await identity.send(new DescribeUserPoolDomainCommand(params)); + return !(res.DomainDescription && res.DomainDescription.UserPoolId); + } catch (err) { + return false; + } +} + +async function deleteUserPoolDomain(domainName, userPoolId) { + const params = { Domain: domainName, UserPoolId: userPoolId }; + await identity.send(new DeleteUserPoolDomainCommand(params)); +} + +async function createUserPoolDomain(domainName, userPoolId) { + const params = { + Domain: domainName, + UserPoolId: userPoolId, }; - if (event.RequestType == 'Delete') { - deleteUserPoolDomain(inputDomainName) - .then(() => { - response.send(event, context, response.SUCCESS, {}); - }) - .catch((err) => { - console.log(err); - response.send(event, context, response.FAILED, { err }); - }); + await identity.send(new CreateUserPoolDomainCommand(params)); +} + +async function createOrUpdateDomain(inputDomainName, userPoolId) { + const result = await identity.send(new DescribeUserPoolCommand({ UserPoolId: userPoolId })); + if (result.UserPool.Domain === inputDomainName) { + // if existing domain is same as input domain do nothing. + return; } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - let checkDomainAvailability = (domainName) => { - let params = { Domain: domainName }; - return identity - .describeUserPoolDomain(params) - .promise() - .then((res) => { - if (res.DomainDescription && res.DomainDescription.UserPool) { - return false; - } - return true; - }) - .catch((err) => { - return false; - }); - }; - let createUserPoolDomain = (domainName) => { - let params = { Domain: domainName, UserPoolId: userPoolId }; - return identity.createUserPoolDomain(params).promise(); - }; - identity - .describeUserPool({ UserPoolId: userPoolId }) - .promise() - .then((result) => { - if (inputDomainName) { - if (result.UserPool.Domain === inputDomainName) { - return; - } else { - if (!result.UserPool.Domain) { - return checkDomainAvailability(inputDomainName).then((isDomainAvailable) => { - if (isDomainAvailable) { - return createUserPoolDomain(inputDomainName); - } else { - throw new Error('Domain not available'); - } - }); - } else { - return checkDomainAvailability(inputDomainName).then((isDomainAvailable) => { - if (isDomainAvailable) { - return deleteUserPoolDomain(result.UserPool.Domain).then(() => createUserPoolDomain(inputDomainName)); - } else { - throw new Error('Domain not available'); - } - }); - } - } - } else { - if (result.UserPool.Domain) { - return deleteUserPoolDomain(result.UserPool.Domain); - } - } - }) - .then(() => { - response.send(event, context, response.SUCCESS, {}); - }) - .catch((err) => { - console.log(err); - response.send(event, context, response.FAILED, { err }); - }); + if (inputDomainName) { + // create new or replace existing domain. + const isDomainAvailable = await checkDomainAvailability(inputDomainName); + if (isDomainAvailable) { + if (result.UserPool.Domain) { + await deleteUserPoolDomain(result.UserPool.Domain, userPoolId); + } + await createUserPoolDomain(inputDomainName, userPoolId); + } else { + throw new Error('Domain not available'); + } + } else if (result.UserPool.Domain) { + // if input domain is undefined delete existing domain if exists. + await deleteUserPoolDomain(result.UserPool.Domain, userPoolId); } -}; +} diff --git a/packages/amplify-category-auth/resources/auth-custom-resource/hostedUIProviderLambda.js b/packages/amplify-category-auth/resources/auth-custom-resource/hostedUIProviderLambda.js index 05a82d86c03..4474998dbe6 100644 --- a/packages/amplify-category-auth/resources/auth-custom-resource/hostedUIProviderLambda.js +++ b/packages/amplify-category-auth/resources/auth-custom-resource/hostedUIProviderLambda.js @@ -1,104 +1,110 @@ const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { +const { + CognitoIdentityProviderClient, + CreateIdentityProviderCommand, + DeleteIdentityProviderCommand, + ListIdentityProvidersCommand, + UpdateIdentityProviderCommand, +} = require('@aws-sdk/client-cognito-identity-provider'); +const identity = new CognitoIdentityProviderClient({}); + +exports.handler = (event, context) => { + // Don't return promise, response.send() marks context as done internally + void tryHandleEvent(event, context); +}; + +async function tryHandleEvent(event, context) { try { - const userPoolId = event.ResourceProperties.userPoolId; - let hostedUIProviderMeta = JSON.parse(event.ResourceProperties.hostedUIProviderMeta); - let hostedUIProviderCreds = JSON.parse(event.ResourceProperties.hostedUIProviderCreds); - if (hostedUIProviderCreds.length === 0) { - response.send(event, context, response.SUCCESS, {}); + await handleEvent(event); + response.send(event, context, response.SUCCESS, {}); + } catch (err) { + console.log(err.stack); + response.send(event, context, response.FAILED, { err }); + } +} + +async function handleEvent(event) { + const userPoolId = event.ResourceProperties.userPoolId; + const hostedUIProviderMeta = JSON.parse(event.ResourceProperties.hostedUIProviderMeta); + const hostedUIProviderCreds = JSON.parse(event.ResourceProperties.hostedUIProviderCreds); + const hasHostedUIProviderCreds = hostedUIProviderCreds.length && hostedUIProviderCreds.length > 0; + if (hasHostedUIProviderCreds && (event.RequestType === 'Update' || event.RequestType === 'Create')) { + const listIdentityProvidersResponse = await identity.send( + new ListIdentityProvidersCommand({ + UserPoolId: userPoolId, + MaxResults: 60, + }), + ); + console.log(listIdentityProvidersResponse); + const providerList = listIdentityProvidersResponse.Providers.map((provider) => provider.ProviderName); + const providerListInParameters = hostedUIProviderMeta.map((provider) => provider.ProviderName); + for (const providerMetadata of hostedUIProviderMeta) { + if (providerList.indexOf(providerMetadata.ProviderName) > -1) { + await updateIdentityProvider(providerMetadata.ProviderName, hostedUIProviderMeta, hostedUIProviderCreds, userPoolId); + } else { + await createIdentityProvider(providerMetadata.ProviderName, hostedUIProviderMeta, hostedUIProviderCreds, userPoolId); + } } - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); + for (const provider of providerList) { + if (providerListInParameters.indexOf(provider) < 0) { + await deleteIdentityProvider(provider, userPoolId); + } } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - let getRequestParams = (providerName) => { - let providerMetaIndex = hostedUIProviderMeta.findIndex((provider) => provider.ProviderName === providerName); - let providerMeta = hostedUIProviderMeta[providerMetaIndex]; - let providerCredsIndex = hostedUIProviderCreds.findIndex((provider) => provider.ProviderName === providerName); - let providerCreds = hostedUIProviderCreds[providerCredsIndex]; - let requestParams = { - ProviderName: providerMeta.ProviderName, - UserPoolId: userPoolId, - AttributeMapping: providerMeta.AttributeMapping, - }; - if (providerMeta.ProviderName === 'SignInWithApple') { - if (providerCreds.client_id && providerCreds.team_id && providerCreds.key_id && providerCreds.private_key) { - requestParams.ProviderDetails = { - client_id: providerCreds.client_id, - team_id: providerCreds.team_id, - key_id: providerCreds.key_id, - private_key: providerCreds.private_key, - authorize_scopes: providerMeta.authorize_scopes, - }; - } else { - requestParams = null; - } - } else { - if (providerCreds.client_id && providerCreds.client_secret) { - requestParams.ProviderDetails = { - client_id: providerCreds.client_id, - client_secret: providerCreds.client_secret, - authorize_scopes: providerMeta.authorize_scopes, - }; - } else { - requestParams = null; - } - } - return requestParams; - }; - let createIdentityProvider = (providerName) => { - let requestParams = getRequestParams(providerName); - if (!requestParams) { - return Promise.resolve(); - } - requestParams.ProviderType = requestParams.ProviderName; - return identity.createIdentityProvider(requestParams).promise(); - }; - let updateIdentityProvider = (providerName) => { - let requestParams = getRequestParams(providerName); - if (!requestParams) { - return Promise.resolve(); - } - return identity.updateIdentityProvider(requestParams).promise(); + } +} + +function getRequestParams(providerName, hostedUIProviderMeta, hostedUIProviderCreds, userPoolId) { + const providerMeta = hostedUIProviderMeta.find((provider) => provider.ProviderName === providerName); + const providerCreds = hostedUIProviderCreds.find((provider) => provider.ProviderName === providerName); + let requestParams = { + ProviderName: providerMeta.ProviderName, + UserPoolId: userPoolId, + AttributeMapping: providerMeta.AttributeMapping, + }; + if (providerMeta.ProviderName === 'SignInWithApple') { + if (providerCreds.client_id && providerCreds.team_id && providerCreds.key_id && providerCreds.private_key) { + requestParams.ProviderDetails = { + client_id: providerCreds.client_id, + team_id: providerCreds.team_id, + key_id: providerCreds.key_id, + private_key: providerCreds.private_key, + authorize_scopes: providerMeta.authorize_scopes, }; - let deleteIdentityProvider = (providerName) => { - let params = { ProviderName: providerName, UserPoolId: userPoolId }; - return identity.deleteIdentityProvider(params).promise(); + } else { + requestParams = null; + } + } else { + if (providerCreds.client_id && providerCreds.client_secret) { + requestParams.ProviderDetails = { + client_id: providerCreds.client_id, + client_secret: providerCreds.client_secret, + authorize_scopes: providerMeta.authorize_scopes, }; - let providerPromises = []; - identity - .listIdentityProviders({ UserPoolId: userPoolId, MaxResults: 60 }) - .promise() - .then((result) => { - console.log(result); - let providerList = result.Providers.map((provider) => provider.ProviderName); - let providerListInParameters = hostedUIProviderMeta.map((provider) => provider.ProviderName); - hostedUIProviderMeta.forEach((providerMetadata) => { - if (providerList.indexOf(providerMetadata.ProviderName) > -1) { - providerPromises.push(updateIdentityProvider(providerMetadata.ProviderName)); - } else { - providerPromises.push(createIdentityProvider(providerMetadata.ProviderName)); - } - }); - providerList.forEach((provider) => { - if (providerListInParameters.indexOf(provider) < 0) { - providerPromises.push(deleteIdentityProvider(provider)); - } - }); - return Promise.all(providerPromises); - }) - .then(() => { - response.send(event, context, response.SUCCESS, {}); - }) - .catch((err) => { - console.log(err.stack); - response.send(event, context, response.FAILED, { err }); - }); + } else { + requestParams = null; } - } catch (err) { - console.log(err.stack); - response.send(event, context, response.FAILED, { err }); } -}; + return requestParams; +} + +async function createIdentityProvider(providerName, hostedUIProviderMeta, hostedUIProviderCreds, userPoolId) { + const requestParams = getRequestParams(providerName, hostedUIProviderMeta, hostedUIProviderCreds, userPoolId); + if (!requestParams) { + return; + } + requestParams.ProviderType = requestParams.ProviderName; + await identity.send(new CreateIdentityProviderCommand(requestParams)); +} + +async function updateIdentityProvider(providerName, hostedUIProviderMeta, hostedUIProviderCreds, userPoolId) { + const requestParams = getRequestParams(providerName, hostedUIProviderMeta, hostedUIProviderCreds, userPoolId); + if (!requestParams) { + return; + } + await identity.send(new UpdateIdentityProviderCommand(requestParams)); +} + +async function deleteIdentityProvider(providerName, userPoolId) { + const params = { ProviderName: providerName, UserPoolId: userPoolId }; + await identity.send(new DeleteIdentityProviderCommand(params)); +} diff --git a/packages/amplify-category-auth/resources/auth-custom-resource/mfaLambda.js b/packages/amplify-category-auth/resources/auth-custom-resource/mfaLambda.js index 33efb4472ed..f896a07c639 100644 --- a/packages/amplify-category-auth/resources/auth-custom-resource/mfaLambda.js +++ b/packages/amplify-category-auth/resources/auth-custom-resource/mfaLambda.js @@ -1,37 +1,37 @@ const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - if (event.RequestType == 'Delete') { +const { CognitoIdentityProviderClient, SetUserPoolMfaConfigCommand } = require('@aws-sdk/client-cognito-identity-provider'); +const identity = new CognitoIdentityProviderClient({}); + +exports.handler = (event, context) => { + // Don't return promise, response.send() marks context as done internally + void tryHandleEvent(event, context); +}; + +async function tryHandleEvent(event, context) { + try { + await handleEvent(event); response.send(event, context, response.SUCCESS, {}); + } catch (e) { + response.send(event, context, response.FAILED, { e }); } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - let totpParams = {}; - try { - totpParams = { - UserPoolId: event.ResourceProperties.userPoolId, - MfaConfiguration: event.ResourceProperties.mfaConfiguration, - SmsMfaConfiguration: { - SmsAuthenticationMessage: event.ResourceProperties.smsAuthenticationMessage, - SmsConfiguration: { - SnsCallerArn: event.ResourceProperties.smsConfigCaller, - ExternalId: event.ResourceProperties.smsConfigExternalId, - }, +} + +async function handleEvent(event) { + if (event.RequestType === 'Update' || event.RequestType === 'Create') { + const totpParams = { + UserPoolId: event.ResourceProperties.userPoolId, + MfaConfiguration: event.ResourceProperties.mfaConfiguration, + SmsMfaConfiguration: { + SmsAuthenticationMessage: event.ResourceProperties.smsAuthenticationMessage, + SmsConfiguration: { + SnsCallerArn: event.ResourceProperties.smsConfigCaller, + ExternalId: event.ResourceProperties.smsConfigExternalId, }, - SoftwareTokenMfaConfiguration: { Enabled: event.ResourceProperties.totpEnabled.toLowerCase() === true ? true : false }, - }; - console.log(totpParams); - } catch (e) { - response.send(event, context, response.FAILED, { e }); - } - identity - .setUserPoolMfaConfig(totpParams) - .promise() - .then((res) => { - response.send(event, context, response.SUCCESS, { res }); - }) - .catch((err) => { - response.send(event, context, response.FAILED, { err }); - }); + }, + SoftwareTokenMfaConfiguration: { Enabled: event.ResourceProperties.totpEnabled.toLowerCase() === 'true' }, + }; + console.log(totpParams); + + await identity.send(new SetUserPoolMfaConfigCommand(totpParams)); } -}; +} diff --git a/packages/amplify-category-auth/resources/auth-custom-resource/oauthLambda.js b/packages/amplify-category-auth/resources/auth-custom-resource/oauthLambda.js deleted file mode 100644 index 8d6d48f951d..00000000000 --- a/packages/amplify-category-auth/resources/auth-custom-resource/oauthLambda.js +++ /dev/null @@ -1,45 +0,0 @@ -const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - try { - const userPoolId = event.ResourceProperties.userPoolId; - let webClientId = event.ResourceProperties.webClientId; - let nativeClientId = event.ResourceProperties.nativeClientId; - let hostedUIProviderMeta = JSON.parse(event.ResourceProperties.hostedUIProviderMeta); - let oAuthMetadata = JSON.parse(event.ResourceProperties.oAuthMetadata); - let providerList = hostedUIProviderMeta.map((provider) => provider.ProviderName); - providerList.push('COGNITO'); - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - let params = { - UserPoolId: userPoolId, - AllowedOAuthFlows: oAuthMetadata.AllowedOAuthFlows, - AllowedOAuthFlowsUserPoolClient: true, - AllowedOAuthScopes: oAuthMetadata.AllowedOAuthScopes, - CallbackURLs: oAuthMetadata.CallbackURLs, - LogoutURLs: oAuthMetadata.LogoutURLs, - SupportedIdentityProviders: providerList, - }; - console.log(params); - let updateUserPoolClientPromises = []; - params.ClientId = webClientId; - updateUserPoolClientPromises.push(identity.updateUserPoolClient(params).promise()); - params.ClientId = nativeClientId; - updateUserPoolClientPromises.push(identity.updateUserPoolClient(params).promise()); - Promise.all(updateUserPoolClientPromises) - .then(() => { - response.send(event, context, response.SUCCESS, {}); - }) - .catch((err) => { - console.log(err.stack); - response.send(event, context, response.FAILED, { err }); - }); - } - } catch (err) { - console.log(err.stack); - response.send(event, context, response.FAILED, { err }); - } -}; diff --git a/packages/amplify-category-auth/resources/auth-custom-resource/openIdLambda.js b/packages/amplify-category-auth/resources/auth-custom-resource/openIdLambda.js index acf8eb2e985..0050dd12169 100644 --- a/packages/amplify-category-auth/resources/auth-custom-resource/openIdLambda.js +++ b/packages/amplify-category-auth/resources/auth-custom-resource/openIdLambda.js @@ -1,77 +1,69 @@ const response = require('cfn-response'); -const aws = require('aws-sdk'); -const iam = new aws.IAM(); +const { + IAMClient, + AddClientIDToOpenIDConnectProviderCommand, + CreateOpenIDConnectProviderCommand, + GetOpenIDConnectProviderCommand, + ListOpenIDConnectProvidersCommand, +} = require('@aws-sdk/client-iam'); +const iam = new IAMClient({}); + exports.handler = (event, context) => { - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); + // Don't return promise, response.send() marks context as done internally + void tryHandleEvent(event, context); +}; + +async function tryHandleEvent(event, context) { + try { + const res = await handleEvent(event); + response.send(event, context, response.SUCCESS, res); + } catch (e) { + response.send(event, context, response.FAILED, { e }); } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { +} + +async function handleEvent(event) { + if (event.RequestType === 'Update' || event.RequestType === 'Create') { const params = { ClientIDList: event.ResourceProperties.clientIdList.split(','), ThumbprintList: ['0000000000000000000000000000000000000000'], Url: event.ResourceProperties.url, }; - let exists = false; let existingValue; - iam - .listOpenIDConnectProviders({}) - .promise() - .then((data) => { - if (data.OpenIDConnectProviderList && data.OpenIDConnectProviderList.length > 0) { - const vals = data.OpenIDConnectProviderList.map((x) => x.Arn); - existingValue = vals.find((i) => i.split('/')[1] === params.Url.split('//')[1]); - if (!existingValue) { - exists = true; - } - } - if (!existingValue) { - iam - .createOpenIDConnectProvider(params) - .promise() - .then((data) => { - response.send(event, context, response.SUCCESS, { - providerArn: data.OpenIDConnectProviderArn, - providerIds: params.ClientIDList, - }); - }) - .catch((err) => { - response.send(event, context, response.FAILED, { err }); - }); - } else { - const findParams = { + const listOpenIDConnectProvidersResponse = await iam.send(new ListOpenIDConnectProvidersCommand({})); + if ( + listOpenIDConnectProvidersResponse.OpenIDConnectProviderList && + listOpenIDConnectProvidersResponse.OpenIDConnectProviderList.length > 0 + ) { + const vals = listOpenIDConnectProvidersResponse.OpenIDConnectProviderList.map((x) => x.Arn); + existingValue = vals.find((i) => i.split('/')[1] === params.Url.split('//')[1]); + } + if (!existingValue) { + const createOpenIDConnectProviderResponse = await iam.send(new CreateOpenIDConnectProviderCommand(params)); + return { + providerArn: createOpenIDConnectProviderResponse.OpenIDConnectProviderArn, + providerIds: params.ClientIDList, + }; + } else { + const findParams = { + OpenIDConnectProviderArn: existingValue, + }; + const getOpenIDConnectProviderResponse = await iam.send(new GetOpenIDConnectProviderCommand(findParams)); + const audiences = getOpenIDConnectProviderResponse.ClientIDList; + for (const clientID of params.ClientIDList) { + if (!audiences.includes(clientID)) { + const updateParams = { + ClientID: clientID, OpenIDConnectProviderArn: existingValue, }; - iam - .getOpenIDConnectProvider(findParams) - .promise() - .then((data) => { - const audiences = data.ClientIDList; - const updateCalls = []; - params.ClientIDList.forEach((a) => { - if (!audiences.includes(a)) { - const updateParams = { - ClientID: a, - OpenIDConnectProviderArn: existingValue, - }; - const prom = iam.addClientIDToOpenIDConnectProvider(updateParams).promise(); - updateCalls.push(prom); - } - }); - Promise.all(updateCalls) - .then(function (values) { - response.send(event, context, response.SUCCESS, { providerArn: existingValue, providerIds: params.ClientIDList }); - }) - .catch((err3) => { - response.send(event, context, response.FAILED, { err3 }); - }); - }) - .catch((err2) => { - response.send(event, context, response.FAILED, { err2 }); - }); + await iam.send(new AddClientIDToOpenIDConnectProviderCommand(updateParams)); } - }) - .catch((err1) => { - response.send(event, context, response.FAILED, { err1 }); - }); + } + return { + providerArn: existingValue, + providerIds: params.ClientIDList, + }; + } } -}; + return {}; +} diff --git a/packages/amplify-category-auth/resources/auth-custom-resource/role-map-lambda-function.js b/packages/amplify-category-auth/resources/auth-custom-resource/role-map-lambda-function.js deleted file mode 100644 index 8c714633780..00000000000 --- a/packages/amplify-category-auth/resources/auth-custom-resource/role-map-lambda-function.js +++ /dev/null @@ -1,37 +0,0 @@ -const response = require('cfn-response'); -const AWS = require('aws-sdk'); -exports.handler = (event, context) => { - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, { message: 'Request type delete' }); - } - if (event.RequestType == 'Create' || event.RequestType == 'Update') { - let { identityPoolId, appClientID, appClientIDWeb, userPoolId, region } = event.ResourceProperties; - try { - const cognitoidentity = new AWS.CognitoIdentity(); - let params = { - IdentityPoolId: identityPoolId, - Roles: { - authenticated: event.ResourceProperties.AuthRoleArn, - unauthenticated: event.ResourceProperties.UnauthRoleArn, - }, - RoleMappings: {}, - }; - if (appClientIDWeb) { - params.RoleMappings[`cognito-idp.${region}.amazonaws.com/${userPoolId}:${appClientIDWeb}`] = { - Type: 'Token', - AmbiguousRoleResolution: 'AuthenticatedRole', - }; - } - if (appClientID) { - params.RoleMappings[`cognito-idp.${region}.amazonaws.com/${userPoolId}:${appClientID}`] = { - Type: 'Token', - AmbiguousRoleResolution: 'AuthenticatedRole', - }; - } - cognitoidentity.setIdentityPoolRoles(params).promise(); - response.send(event, context, response.SUCCESS, { message: 'Successfully updated identity pool.' }); - } catch (err) { - response.send(event, context, response.FAILED, { message: 'Error updating identity pool' }); - } - } -}; diff --git a/packages/amplify-category-auth/resources/auth-custom-resource/userpoolclientLambda.js b/packages/amplify-category-auth/resources/auth-custom-resource/userpoolclientLambda.js deleted file mode 100644 index f3505d2c319..00000000000 --- a/packages/amplify-category-auth/resources/auth-custom-resource/userpoolclientLambda.js +++ /dev/null @@ -1,23 +0,0 @@ -const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - const params = { - ClientId: event.ResourceProperties.clientId, - UserPoolId: event.ResourceProperties.userpoolId, - }; - identity - .describeUserPoolClient(params) - .promise() - .then((res) => { - response.send(event, context, response.SUCCESS, { appSecret: res.UserPoolClient.ClientSecret }); - }) - .catch((err) => { - response.send(event, context, response.FAILED, { err }); - }); - } -}; diff --git a/packages/amplify-category-auth/resources/cloudformation-templates/auth-template.yml.ejs b/packages/amplify-category-auth/resources/cloudformation-templates/auth-template.yml.ejs deleted file mode 100644 index d0802317b2d..00000000000 --- a/packages/amplify-category-auth/resources/cloudformation-templates/auth-template.yml.ejs +++ /dev/null @@ -1,1244 +0,0 @@ -<% var autoVerifiedAttributes = props.autoVerifiedAttributes ? props.autoVerifiedAttributes.concat(props.aliasAttributes ? props.aliasAttributes : []).filter((attr, i, aliasAttributeArray) => ['email', 'phone_number'].includes(attr) && aliasAttributeArray.indexOf(attr) === i) : [] %> -<% var configureSMS = ((props.autoVerifiedAttributes && props.autoVerifiedAttributes.includes('phone_number')) || (props.mfaConfiguration != 'OFF' && props.mfaTypes && props.mfaTypes.includes('SMS Text Message')) || (props.requiredAttributes && props.requiredAttributes.includes('phone_number'))) %> -AWSTemplateFormatVersion: 2010-09-09 - -Parameters: - env: - Type: String - authRoleArn: - Type: String - unauthRoleArn: - Type: String - - <% if (props.dependsOn && props.dependsOn.length > 0) { %> - <% for(var i=0; i < props.dependsOn.length; i++) { %> - <% for(var j=0; j < props.dependsOn[i].attributes.length; j++) { %> - <%= props.dependsOn[i].category %><%= props.dependsOn[i].resourceName %><%= props.dependsOn[i].attributes[j] %>: - Type: String - Default: <%= props.dependsOn[i].category %><%= props.dependsOn[i].resourceName %><%= props.dependsOn[i].attributes[j] %> - <% } %> - <% } %> - <% } %> - - <% for(var i=0; i < Object.keys(props).length; i++) { -%> - <% if (typeof Object.values(props)[i] === 'string' || (Object.values(props)[i] && Object.values(props)[i].value)) { %> - <%=Object.keys(props)[i]%>: - Type: String - <% } -%> - - <% if (typeof Object.values(props)[i] === 'boolean') { %> - <%=Object.keys(props)[i]%>: - Type: String - <% } -%> - <% if (typeof Object.values(props)[i] === 'number') { %> - <%=Object.keys(props)[i]%>: - Type: Number - <% } -%> - <% if (Object.keys(props)[i] === 'parentStack') { %> - <%=Object.keys(props)[i]%>: - Type: String - <% } -%> - <% if (Array.isArray(Object.values(props)[i])) { %> - <%=Object.keys(props)[i]%>: - Type: CommaDelimitedList - <% } -%> - <% } -%> - <% if(Object.keys(props).includes('hostedUIProviderMeta') && !Object.keys(props).includes('hostedUIProviderCreds')) { %> - hostedUIProviderCreds: - Type: String - Default: '[]' - <% } -%> - -Conditions: - ShouldNotCreateEnvResources: !Equals [ !Ref env, NONE ] - <%if (props.authSelections !=='identityPoolOnly' ) { %> - ShouldOutputAppClientSecrets: !Equals [!Ref userpoolClientGenerateSecret, true ] - <% } %> - -Resources: - <%if (props.verificationBucketName) { %> - CustomMessageConfirmationBucket: - Type: AWS::S3::Bucket - DeletionPolicy: "Retain" - Properties: - BucketName: !If [ShouldNotCreateEnvResources, !Ref verificationBucketName, !Join ['',[!Ref verificationBucketName, '-', !Ref env]]] - AccessControl: "Private" - WebsiteConfiguration: - IndexDocument: "index.html" - ErrorDocument: "index.html" - CorsConfiguration: - CorsRules: - - - AllowedHeaders: - - "Authorization" - - "Content-Length" - AllowedMethods: - - "GET" - AllowedOrigins: - - "*" - MaxAge: 3000 - <% } %> - <%if (props.authSelections !== 'identityPoolOnly') { %> - <% if(!props.useEnabledMfas || configureSMS) { %> - # BEGIN SNS ROLE RESOURCE - SNSRole: - # Created to allow the UserPool SMS Config to publish via the Simple Notification Service during MFA Process - Type: AWS::IAM::Role - Properties: - RoleName: !If [ShouldNotCreateEnvResources, '<%=`${props.resourceNameTruncated}_sns-role`%>', !Join ['',[ 'sns', '<%=`${props.sharedId}`%>', !Select [3, !Split ['-', !Ref 'AWS::StackName']], '-', !Ref env]]] - AssumeRolePolicyDocument: - Version: "2012-10-17" - Statement: - - Sid: "" - Effect: "Allow" - Principal: - Service: "cognito-idp.amazonaws.com" - Action: - - "sts:AssumeRole" - Condition: - StringEquals: - sts:ExternalId: <%=`${props.resourceNameTruncated}_role_external_id`%> - Policies: - - - PolicyName: <%=`${props.resourceNameTruncated}-sns-policy`%> - PolicyDocument: - Version: "2012-10-17" - Statement: - - - Effect: "Allow" - Action: - - "sns:Publish" - Resource: "*" - <% } %> - # BEGIN USER POOL RESOURCES - UserPool: - # Created upon user selection - # Depends on SNS Role for Arn if MFA is enabled - Type: AWS::Cognito::UserPool - UpdateReplacePolicy: Retain - Properties: - UserPoolName: !If [ShouldNotCreateEnvResources, !Ref userPoolName, !Join ['',[!Ref userPoolName, '-', !Ref env]]] - <%if (props.requiredAttributes && props.requiredAttributes.length > 0) { %> - <%if (props.usernameCaseSensitive !== undefined) { %> - UsernameConfiguration: - CaseSensitive: <%= props.usernameCaseSensitive %> - <% } %> - Schema: - <% for(var i=0; i < props.requiredAttributes.length; i++) { %> - - - Name: <%= props.requiredAttributes[i] %> - Required: true - Mutable: true - <% } %> - <% } %> - <%if (!props.breakCircularDependency && props.triggers && props.triggers !== '{}' && props.dependsOn) { %> - LambdaConfig: - <%if (props.dependsOn.find(i => i.resourceName.includes('CreateAuthChallenge'))) { %> - CreateAuthChallenge: !Ref function<%=props.resourceName%>CreateAuthChallengeArn - <% } %> - <%if (props.dependsOn.find(i => i.resourceName.includes('CustomMessage'))) { %> - CustomMessage: !Ref function<%=props.resourceName%>CustomMessageArn - <% } %> - <%if (props.dependsOn.find(i => i.resourceName.includes('DefineAuthChallenge'))) { %> - DefineAuthChallenge: !Ref function<%=props.resourceName%>DefineAuthChallengeArn - <% } %> - <%if (props.dependsOn.find(i => i.resourceName.includes('PostAuthentication'))) { %> - PostAuthentication: !Ref function<%=props.resourceName%>PostAuthenticationArn - <% } %> - <%if (props.dependsOn.find(i => i.resourceName.includes('PostConfirmation'))) { %> - PostConfirmation: !Ref function<%=props.resourceName%>PostConfirmationArn - <% } %> - <%if (props.dependsOn.find(i => i.resourceName.includes('PreAuthentication'))) { %> - PreAuthentication: !Ref function<%=props.resourceName%>PreAuthenticationArn - <% } %> - <%if (props.dependsOn.find(i => i.resourceName.includes('PreSignup'))) { %> - PreSignUp: !Ref function<%=props.resourceName%>PreSignupArn - <% } %> - <%if (props.dependsOn.find(i => i.resourceName.includes('PreTokenGeneration'))) { %> - PreTokenGeneration: !Ref function<%=props.resourceName%>PreTokenGenerationArn - <% } %> - <%if (props.dependsOn.find(i => i.resourceName.includes('VerifyAuthChallengeResponse'))) { %> - VerifyAuthChallengeResponse: !Ref function<%=props.resourceName%>VerifyAuthChallengeResponseArn - <% } %> - <% } %> - <%if (autoVerifiedAttributes && autoVerifiedAttributes.length > 0) { %> - AutoVerifiedAttributes: - <% for(let x = 0; x < autoVerifiedAttributes.length; x++) { %> - - <%= autoVerifiedAttributes[x] %> - <% } %> - <% } %> - <%if (autoVerifiedAttributes && autoVerifiedAttributes.includes('email')) { %> - EmailVerificationMessage: !Ref emailVerificationMessage - EmailVerificationSubject: !Ref emailVerificationSubject - <% } %> - Policies: - PasswordPolicy: - MinimumLength: !Ref passwordPolicyMinLength - RequireLowercase: <%= props.passwordPolicyCharacters.includes('Requires Lowercase') %> - RequireNumbers: <%= props.passwordPolicyCharacters.includes('Requires Numbers') %> - RequireSymbols: <%= props.passwordPolicyCharacters.includes('Requires Symbols') %> - RequireUppercase: <%= props.passwordPolicyCharacters.includes('Requires Uppercase') %> - <% if (props.usernameAttributes && props.usernameAttributes !== 'username') { %> - UsernameAttributes: !Ref usernameAttributes - <% } %> - <% if (props.aliasAttributes && props.aliasAttributes.length > 0) { %> - AliasAttributes: !Ref aliasAttributes - <% } %> - MfaConfiguration: !Ref mfaConfiguration - <% if(props.useEnabledMfas && props.mfaConfiguration != 'OFF') {%> - EnabledMfas: - <% if(configureSMS) {%> - - SMS_MFA - <% } %> - <% if(props.mfaTypes.includes('TOTP')) {%> - - SOFTWARE_TOKEN_MFA - <% } %> - <% } %> - <% if(!props.useEnabledMfas || configureSMS) {%> - SmsVerificationMessage: !Ref smsVerificationMessage - SmsAuthenticationMessage: !Ref smsAuthenticationMessage - SmsConfiguration: - SnsCallerArn: !GetAtt SNSRole.Arn - ExternalId: <%=`${props.resourceNameTruncated}_role_external_id`%> - <% } %> - <%if (configureSMS) { %> - DependsOn: SNSRole - <% } %> - <%if (!props.breakCircularDependency && props.triggers && props.dependsOn) { %> - <%if (props.dependsOn.find(i => i.resourceName.includes('CreateAuthChallenge'))) { %> - UserPoolCreateAuthChallengeLambdaInvokePermission: - Type: "AWS::Lambda::Permission" - DependsOn: UserPool - Properties: - Action: "lambda:invokeFunction" - Principal: "cognito-idp.amazonaws.com" - FunctionName: !Ref function<%=props.resourceName%>CreateAuthChallengeName - SourceArn: !GetAtt UserPool.Arn - <% } %> - <%if (props.dependsOn.find(i => i.resourceName.includes('CustomMessage'))) { %> - UserPoolCustomMessageLambdaInvokePermission: - Type: "AWS::Lambda::Permission" - DependsOn: UserPool - Properties: - Action: "lambda:invokeFunction" - Principal: "cognito-idp.amazonaws.com" - FunctionName: !Ref function<%=props.resourceName%>CustomMessageName - SourceArn: !GetAtt UserPool.Arn - <% } %> - <%if (props.dependsOn.find(i => i.resourceName.includes('DefineAuthChallenge'))) { %> - UserPoolDefineAuthChallengeLambdaInvokePermission: - Type: "AWS::Lambda::Permission" - DependsOn: UserPool - Properties: - Action: "lambda:invokeFunction" - Principal: "cognito-idp.amazonaws.com" - FunctionName: !Ref function<%=props.resourceName%>DefineAuthChallengeName - SourceArn: !GetAtt UserPool.Arn - <% } %> - <%if (props.dependsOn.find(i => i.resourceName.includes('PostAuthentication'))) { %> - UserPoolPostAuthenticationLambdaInvokePermission: - Type: "AWS::Lambda::Permission" - DependsOn: UserPool - Properties: - Action: "lambda:invokeFunction" - Principal: "cognito-idp.amazonaws.com" - FunctionName: !Ref function<%=props.resourceName%>PostAuthenticationName - SourceArn: !GetAtt UserPool.Arn - <% } %> - <%if (props.dependsOn.find(i => i.resourceName.includes('PostConfirmation'))) { %> - UserPoolPostConfirmationLambdaInvokePermission: - Type: "AWS::Lambda::Permission" - DependsOn: UserPool - Properties: - Action: "lambda:invokeFunction" - Principal: "cognito-idp.amazonaws.com" - FunctionName: !Ref function<%=props.resourceName%>PostConfirmationName - SourceArn: !GetAtt UserPool.Arn - <% } %> - <%if (props.dependsOn.find(i => i.resourceName.includes('PreAuthentication'))) { %> - UserPoolPreAuthenticationLambdaInvokePermission: - Type: "AWS::Lambda::Permission" - DependsOn: UserPool - Properties: - Action: "lambda:invokeFunction" - Principal: "cognito-idp.amazonaws.com" - FunctionName: !Ref function<%=props.resourceName%>PreAuthenticationName - SourceArn: !GetAtt UserPool.Arn - <% } %> - <%if (props.dependsOn.find(i => i.resourceName.includes('PreSignup'))) { %> - UserPoolPreSignupLambdaInvokePermission: - Type: "AWS::Lambda::Permission" - DependsOn: UserPool - Properties: - Action: "lambda:invokeFunction" - Principal: "cognito-idp.amazonaws.com" - FunctionName: !Ref function<%=props.resourceName%>PreSignupName - SourceArn: !GetAtt UserPool.Arn - <% } %> - <%if (props.dependsOn.find(i => i.resourceName.includes('PreTokenGeneration'))) { %> - UserPoolPreTokenGenerationLambdaInvokePermission: - Type: "AWS::Lambda::Permission" - DependsOn: UserPool - Properties: - Action: "lambda:invokeFunction" - Principal: "cognito-idp.amazonaws.com" - FunctionName: !Ref function<%=props.resourceName%>PreTokenGenerationName - SourceArn: !GetAtt UserPool.Arn - <% } %> - <%if (props.dependsOn.find(i => i.resourceName.includes('VerifyAuthChallengeResponse'))) { %> - UserPoolVerifyAuthChallengeResponseLambdaInvokePermission: - Type: "AWS::Lambda::Permission" - DependsOn: UserPool - Properties: - Action: "lambda:invokeFunction" - Principal: "cognito-idp.amazonaws.com" - FunctionName: !Ref function<%=props.resourceName%>VerifyAuthChallengeResponseName - SourceArn: !GetAtt UserPool.Arn - <% } %> - # Updating lambda role with permissions to Cognito - <% if (props.permissions && props.permissions.length > 0) { %> - <% for(var i=0; i < props.permissions.length; i++) { %> - <%=`${props.resourceName}${JSON.parse(props.permissions[i]).trigger}${JSON.parse(props.permissions[i]).policyName}:`%> - Type: AWS::IAM::Policy - Properties: - PolicyName: <%=`${props.resourceName}${JSON.parse(props.permissions[i]).trigger}${JSON.parse(props.permissions[i]).policyName}`%> - PolicyDocument: - Version: '2012-10-17' - Statement: - - Effect: <%= JSON.parse(props.permissions[i]).effect %> - Action: - <% for(let x = 0; x < JSON.parse(props.permissions[i]).actions.length; x++) { %> - - <%=JSON.parse(props.permissions[i]).actions[x]%> - <% } %> - <% if(JSON.parse(props.permissions[i]).resource.paramType === 'string') { %> - Resource: "<%=JSON.parse(props.permissions[i]).resource.keys %>" - <% } %> - <% if(JSON.parse(props.permissions[i]).resource.paramType === '!GetAtt') { %> - Resource: !GetAtt - <% for(let z = 0; z < JSON.parse(props.permissions[i]).resource.keys.length; z++) { %> - - <%= JSON.parse(props.permissions[i]).resource.keys[z] %> - <% } %> - <% } %> - <% if(JSON.parse(props.permissions[i]).resource.paramType === '!Ref') { %> - Resource: !Ref <%=JSON.parse(props.permissions[i]).resource.keys %> - <% } %> - - Roles: - - !Join ['',["<%=`${props.resourceName}${JSON.parse(props.permissions[i]).trigger}`%>", '-', !Ref env]] - <% } %> - <% } %> - <% } %> - UserPoolClientWeb: - # Created provide application access to user pool - # Depends on UserPool for ID reference - Type: "AWS::Cognito::UserPoolClient" - Properties: - ClientName: <%= props.resourceNameTruncated %>_app_clientWeb - <%if (props.userpoolClientSetAttributes) { %> - ReadAttributes: !Ref userpoolClientReadAttributes - WriteAttributes: !Ref userpoolClientWriteAttributes - <% } %> - RefreshTokenValidity: !Ref userpoolClientRefreshTokenValidity - UserPoolId: !Ref UserPool - DependsOn: UserPool - UserPoolClient: - # Created provide application access to user pool - # Depends on UserPool for ID reference - Type: "AWS::Cognito::UserPoolClient" - Properties: - ClientName: <%= props.resourceNameTruncated %>_app_client - <%if (props.userpoolClientSetAttributes) { %> - ReadAttributes: !Ref userpoolClientReadAttributes - WriteAttributes: !Ref userpoolClientWriteAttributes - <% } %> - GenerateSecret: !Ref userpoolClientGenerateSecret - RefreshTokenValidity: !Ref userpoolClientRefreshTokenValidity - UserPoolId: !Ref UserPool - DependsOn: UserPool - # BEGIN USER POOL LAMBDA RESOURCES - UserPoolClientRole: - # Created to execute Lambda which gets userpool app client config values - Type: 'AWS::IAM::Role' - Properties: - RoleName: !If [ShouldNotCreateEnvResources, !Ref userpoolClientLambdaRole, !Join ['',['upClientLambdaRole', '<%=`${props.sharedId}`%>', !Select [3, !Split ['-', !Ref 'AWS::StackName']], '-', !Ref env]]] - AssumeRolePolicyDocument: - Version: '2012-10-17' - Statement: - - Effect: Allow - Principal: - Service: - - lambda.amazonaws.com - Action: - - 'sts:AssumeRole' - DependsOn: UserPoolClient - UserPoolClientLambda: - # Lambda which gets userpool app client config values - # Depends on UserPool for id - # Depends on UserPoolClientRole for role ARN - Type: 'AWS::Lambda::Function' - Properties: - Code: - ZipFile: !Join - - |+ - - - 'const response = require(''cfn-response'');' - - 'const aws = require(''aws-sdk'');' - - 'const identity = new aws.CognitoIdentityServiceProvider();' - - 'exports.handler = (event, context, callback) => {' - - ' if (event.RequestType == ''Delete'') { ' - - ' response.send(event, context, response.SUCCESS, {})' - - ' }' - - ' if (event.RequestType == ''Update'' || event.RequestType == ''Create'') {' - - ' const params = {' - - ' ClientId: event.ResourceProperties.clientId,' - - ' UserPoolId: event.ResourceProperties.userpoolId' - - ' };' - - ' identity.describeUserPoolClient(params).promise()' - - ' .then((res) => {' - - ' response.send(event, context, response.SUCCESS, {''appSecret'': res.UserPoolClient.ClientSecret});' - - ' })' - - ' .catch((err) => {' - - ' response.send(event, context, response.FAILED, {err});' - - ' });' - - ' }' - - '};' - Handler: index.handler - Runtime: nodejs16.x - Timeout: 300 - Role: !GetAtt - - UserPoolClientRole - - Arn - DependsOn: UserPoolClientRole - UserPoolClientLambdaPolicy: - # Sets userpool policy for the role that executes the Userpool Client Lambda - # Depends on UserPool for Arn - # Marked as depending on UserPoolClientRole for easier to understand CFN sequencing - Type: 'AWS::IAM::Policy' - Properties: - PolicyName: <%=`${props.resourceNameTruncated}_userpoolclient_lambda_iam_policy`%> - Roles: - - !Ref UserPoolClientRole - PolicyDocument: - Version: '2012-10-17' - Statement: - - Effect: Allow - Action: - - 'cognito-idp:DescribeUserPoolClient' - Resource: !GetAtt UserPool.Arn - DependsOn: UserPoolClientLambda - UserPoolClientLogPolicy: - # Sets log policy for the role that executes the Userpool Client Lambda - # Depends on UserPool for Arn - # Marked as depending on UserPoolClientLambdaPolicy for easier to understand CFN sequencing - Type: 'AWS::IAM::Policy' - Properties: - PolicyName: <%=`${props.resourceNameTruncated}_userpoolclient_lambda_log_policy`%> - Roles: - - !Ref UserPoolClientRole - PolicyDocument: - Version: 2012-10-17 - Statement: - - Effect: Allow - Action: - - 'logs:CreateLogGroup' - - 'logs:CreateLogStream' - - 'logs:PutLogEvents' - Resource: !Sub - - arn:aws:logs:${region}:${account}:log-group:/aws/lambda/${lambda}:log-stream:* - - { region: !Ref "AWS::Region", account: !Ref "AWS::AccountId", lambda: !Ref UserPoolClientLambda} - DependsOn: UserPoolClientLambdaPolicy - UserPoolClientInputs: - # Values passed to Userpool client Lambda - # Depends on UserPool for Id - # Depends on UserPoolClient for Id - # Marked as depending on UserPoolClientLambdaPolicy for easier to understand CFN sequencing - Type: 'Custom::LambdaCallout' - Properties: - ServiceToken: !GetAtt UserPoolClientLambda.Arn - clientId: !Ref UserPoolClient - userpoolId: !Ref UserPool - DependsOn: UserPoolClientLogPolicy - <%if (props.hostedUIDomainName) { %> - HostedUICustomResource: - Type: 'AWS::Lambda::Function' - Properties: - Code: - ZipFile: !Join - - |+ - - - 'const response = require(''cfn-response'');' - - 'const aws = require(''aws-sdk'');' - - 'const identity = new aws.CognitoIdentityServiceProvider();' - - 'exports.handler = (event, context, callback) => {' - - ' const userPoolId = event.ResourceProperties.userPoolId;' - - ' const inputDomainName = event.ResourceProperties.hostedUIDomainName;' - - ' let deleteUserPoolDomain = (domainName) => {' - - ' let params = { Domain: domainName, UserPoolId: userPoolId };' - - ' return identity.deleteUserPoolDomain(params).promise();' - - ' };' - - ' if (event.RequestType == ''Delete'') {' - - ' deleteUserPoolDomain(inputDomainName)' - - ' .then(() => {response.send(event, context, response.SUCCESS, {})})' - - ' .catch((err) => { console.log(err); response.send(event, context, response.FAILED, {err}) });' - - ' }' - - ' if (event.RequestType == ''Update'' || event.RequestType == ''Create'') {' - - ' let checkDomainAvailability = (domainName) => {' - - ' let params = { Domain: domainName };' - - ' return identity.describeUserPoolDomain(params).promise().then((res) => {' - - ' if (res.DomainDescription && res.DomainDescription.UserPool) {' - - ' return false;' - - ' }' - - ' return true;' - - ' }).catch((err) => { return false; });' - - ' };' - - ' let createUserPoolDomain = (domainName) => {' - - ' let params = { Domain: domainName, UserPoolId: userPoolId };' - - ' return identity.createUserPoolDomain(params).promise();' - - ' };' - - ' identity.describeUserPool({UserPoolId: userPoolId }).promise().then((result) => {' - - ' if (inputDomainName) {' - - ' if (result.UserPool.Domain === inputDomainName) {' - - ' return;' - - ' } else {' - - ' if (!result.UserPool.Domain) {' - - ' return checkDomainAvailability(inputDomainName).then((isDomainAvailable) => {' - - ' if (isDomainAvailable) {' - - ' return createUserPoolDomain(inputDomainName);' - - ' } else {' - - ' throw new Error(''Domain not available'');' - - ' }' - - ' });' - - ' } else {' - - ' return checkDomainAvailability(inputDomainName).then((isDomainAvailable) => {' - - ' if (isDomainAvailable) {' - - ' return deleteUserPoolDomain(result.UserPool.Domain).then(() => createUserPoolDomain(inputDomainName));' - - ' } else {' - - ' throw new Error(''Domain not available'');' - - ' }' - - ' });' - - ' }' - - ' }' - - ' } else {' - - ' if (result.UserPool.Domain) {' - - ' return deleteUserPoolDomain(result.UserPool.Domain);' - - ' }' - - ' }' - - ' }).then(() => {response.send(event, context, response.SUCCESS, {})}).catch((err) => {' - - ' console.log(err); response.send(event, context, response.FAILED, {err});' - - ' });' - - '}}' - - - Handler: index.handler - Runtime: nodejs16.x - Timeout: 300 - Role: !GetAtt - - UserPoolClientRole - - Arn - DependsOn: UserPoolClientRole - - HostedUICustomResourcePolicy: - Type: 'AWS::IAM::Policy' - Properties: - PolicyName: !Join ['-',[!Ref UserPool, 'hostedUI']] - Roles: - - !Ref UserPoolClientRole - PolicyDocument: - Version: '2012-10-17' - Statement: - - Effect: Allow - Action: - - 'cognito-idp:CreateUserPoolDomain' - - 'cognito-idp:DescribeUserPool' - - 'cognito-idp:DeleteUserPoolDomain' - Resource: !GetAtt UserPool.Arn - - Effect: Allow - Action: - - 'cognito-idp:DescribeUserPoolDomain' - Resource: '*' - DependsOn: HostedUICustomResource - HostedUICustomResourceLogPolicy: - Type: 'AWS::IAM::Policy' - Properties: - PolicyName: !Join ['-',[!Ref UserPool, 'hostedUILogPolicy']] - Roles: - - !Ref UserPoolClientRole - PolicyDocument: - Version: 2012-10-17 - Statement: - - Effect: Allow - Action: - - 'logs:CreateLogGroup' - - 'logs:CreateLogStream' - - 'logs:PutLogEvents' - Resource: !Sub - - arn:aws:logs:${region}:${account}:log-group:/aws/lambda/${lambda}:log-stream:* - - { region: !Ref "AWS::Region", account: !Ref "AWS::AccountId", lambda: !Ref HostedUICustomResource} - DependsOn: HostedUICustomResourcePolicy - HostedUICustomResourceInputs: - Type: 'Custom::LambdaCallout' - Properties: - ServiceToken: !GetAtt HostedUICustomResource.Arn - userPoolId: !Ref UserPool - hostedUIDomainName: !If [ShouldNotCreateEnvResources, !Ref hostedUIDomainName, !Join ['-',[!Ref hostedUIDomainName, !Ref env]]] - DependsOn: HostedUICustomResourceLogPolicy - <% } %> - - <%if (props.hostedUIProviderMeta) { %> - HostedUIProvidersCustomResource: - Type: 'AWS::Lambda::Function' - Properties: - Code: - ZipFile: !Join - - |+ - - - 'const response = require(''cfn-response'');' - - 'const aws = require(''aws-sdk'');' - - 'const identity = new aws.CognitoIdentityServiceProvider();' - - 'exports.handler = (event, context, callback) => {' - - 'try{' - - ' const userPoolId = event.ResourceProperties.userPoolId;' - - ' let hostedUIProviderMeta = JSON.parse(event.ResourceProperties.hostedUIProviderMeta);' - - ' let hostedUIProviderCreds = JSON.parse(event.ResourceProperties.hostedUIProviderCreds);' - - ' if(hostedUIProviderCreds.length === 0) {' - - ' response.send(event, context, response.SUCCESS, {});' - - ' }' - - ' if (event.RequestType == ''Delete'') {' - - ' response.send(event, context, response.SUCCESS, {});' - - ' }' - - ' if (event.RequestType == ''Update'' || event.RequestType == ''Create'') {' - - ' let getRequestParams = (providerName) => {' - - ' let providerMetaIndex = hostedUIProviderMeta.findIndex((provider) => provider.ProviderName === providerName);' - - ' let providerMeta = hostedUIProviderMeta[providerMetaIndex];' - - ' let providerCredsIndex = hostedUIProviderCreds.findIndex((provider) => provider.ProviderName === providerName);' - - ' let providerCreds = hostedUIProviderCreds[providerCredsIndex];' - - ' let requestParams = {' - - ' ProviderName: providerMeta.ProviderName,' - - ' UserPoolId: userPoolId,' - - ' AttributeMapping: providerMeta.AttributeMapping,' - - ' };' - - ' if (providerMeta.ProviderName === ''SignInWithApple'') {' - - ' requestParams.ProviderDetails = {' - - ' ''client_id'': providerCreds.client_id,' - - ' ''team_id'': providerCreds.team_id,' - - ' ''key_id'': providerCreds.key_id,' - - ' ''private_key'': providerCreds.private_key ? providerCreds.private_key : null,' - - ' ''authorize_scopes'': providerMeta.authorize_scopes,' - - ' };' - - ' } else {' - - ' requestParams.ProviderDetails = {' - - ' ''client_id'': providerCreds.client_id,' - - ' ''client_secret'': providerCreds.client_secret,' - - ' ''authorize_scopes'': providerMeta.authorize_scopes,' - - ' };' - - ' }' - - ' return requestParams;' - - ' };' - - ' let createIdentityProvider = (providerName) => {' - - ' let requestParams = getRequestParams(providerName);' - - ' requestParams.ProviderType = requestParams.ProviderName;' - - ' return identity.createIdentityProvider(requestParams).promise();' - - ' };' - - ' let updateIdentityProvider = (providerName) => {' - - ' let requestParams = getRequestParams(providerName);' - - ' return identity.updateIdentityProvider(requestParams).promise();' - - ' };' - - ' let deleteIdentityProvider = (providerName) => {' - - ' let params = {ProviderName: providerName, UserPoolId: userPoolId};' - - ' return identity.deleteIdentityProvider(params).promise();' - - ' };' - - ' let providerPromises = [];' - - ' identity.listIdentityProviders({UserPoolId: userPoolId, MaxResults: 60}).promise()' - - ' .then((result) => {' - - ' let providerList = result.Providers.map(provider => provider.ProviderName);' - - ' let providerListInParameters = hostedUIProviderMeta.map(provider => provider.ProviderName);' - - ' hostedUIProviderMeta.forEach((providerMetadata) => {' - - ' if(providerList.indexOf(providerMetadata.ProviderName) > -1) {' - - ' providerPromises.push(updateIdentityProvider(providerMetadata.ProviderName));' - - ' } else {' - - ' providerPromises.push(createIdentityProvider(providerMetadata.ProviderName));' - - ' }' - - ' });' - - ' providerList.forEach((provider) => {' - - ' if(providerListInParameters.indexOf(provider) < 0) {' - - ' providerPromises.push(deleteIdentityProvider(provider));' - - ' }' - - ' });' - - ' return Promise.all(providerPromises);' - - ' }).then(() => {response.send(event, context, response.SUCCESS, {})}).catch((err) => {' - - ' console.log(err.stack); response.send(event, context, response.FAILED, {err})' - - ' });' - - ' } ' - - ' } catch(err) { console.log(err.stack); response.send(event, context, response.FAILED, {err});};' - - '} ' - - Handler: index.handler - Runtime: nodejs16.x - Timeout: 300 - Role: !GetAtt - - UserPoolClientRole - - Arn - DependsOn: UserPoolClientRole - - HostedUIProvidersCustomResourcePolicy: - Type: 'AWS::IAM::Policy' - Properties: - PolicyName: !Join ['-',[!Ref UserPool, 'hostedUIProvider']] - Roles: - - !Ref UserPoolClientRole - PolicyDocument: - Version: '2012-10-17' - Statement: - - Effect: Allow - Action: - - 'cognito-idp:CreateIdentityProvider' - - 'cognito-idp:UpdateIdentityProvider' - - 'cognito-idp:ListIdentityProviders' - - 'cognito-idp:DeleteIdentityProvider' - Resource: !GetAtt UserPool.Arn - DependsOn: HostedUIProvidersCustomResource - - HostedUIProvidersCustomResourceLogPolicy: - Type: 'AWS::IAM::Policy' - Properties: - PolicyName: !Join ['-',[!Ref UserPool, 'hostedUIProviderLogPolicy']] - Roles: - - !Ref UserPoolClientRole - PolicyDocument: - Version: 2012-10-17 - Statement: - - Effect: Allow - Action: - - 'logs:CreateLogGroup' - - 'logs:CreateLogStream' - - 'logs:PutLogEvents' - Resource: !Sub - - arn:aws:logs:${region}:${account}:log-group:/aws/lambda/${lambda}:log-stream:* - - { region: !Ref "AWS::Region", account: !Ref "AWS::AccountId", lambda: !Ref HostedUIProvidersCustomResource} - DependsOn: HostedUIProvidersCustomResourcePolicy - - HostedUIProvidersCustomResourceInputs: - Type: 'Custom::LambdaCallout' - Properties: - ServiceToken: !GetAtt HostedUIProvidersCustomResource.Arn - userPoolId: !Ref UserPool - hostedUIProviderMeta: !Ref hostedUIProviderMeta - hostedUIProviderCreds: !Ref hostedUIProviderCreds - DependsOn: HostedUIProvidersCustomResourceLogPolicy - <% } %> - <%if (props.oAuthMetadata) { %> - OAuthCustomResource: - Type: 'AWS::Lambda::Function' - Properties: - Code: - ZipFile: !Join - - |+ - - - 'const response = require(''cfn-response'');' - - 'const aws = require(''aws-sdk'');' - - 'const identity = new aws.CognitoIdentityServiceProvider();' - - 'exports.handler = (event, context, callback) => {' - - 'try{' - - ' const userPoolId = event.ResourceProperties.userPoolId;' - - ' let webClientId = event.ResourceProperties.webClientId;' - - ' let nativeClientId = event.ResourceProperties.nativeClientId;' - - ' let hostedUIProviderMeta = JSON.parse(event.ResourceProperties.hostedUIProviderMeta);' - - ' let oAuthMetadata = JSON.parse(event.ResourceProperties.oAuthMetadata);' - - ' let providerList = hostedUIProviderMeta.map(provider => provider.ProviderName);' - - ' providerList.push(''COGNITO'');' - - ' if (event.RequestType == ''Delete'') {' - - ' response.send(event, context, response.SUCCESS, {});' - - ' }' - - ' if (event.RequestType == ''Update'' || event.RequestType == ''Create'') {' - - ' let params = {' - - ' UserPoolId: userPoolId,' - - ' AllowedOAuthFlows: oAuthMetadata.AllowedOAuthFlows,' - - ' AllowedOAuthFlowsUserPoolClient: true,' - - ' AllowedOAuthScopes: oAuthMetadata.AllowedOAuthScopes,' - - ' CallbackURLs: oAuthMetadata.CallbackURLs,' - - ' LogoutURLs: oAuthMetadata.LogoutURLs,' - - ' SupportedIdentityProviders: providerList' - - ' };' - - ' let updateUserPoolClientPromises = [];' - - ' params.ClientId = webClientId;' - - ' updateUserPoolClientPromises.push(identity.updateUserPoolClient(params).promise());' - - ' params.ClientId = nativeClientId;' - - ' updateUserPoolClientPromises.push(identity.updateUserPoolClient(params).promise());' - - ' Promise.all(updateUserPoolClientPromises)' - - ' .then(() => {response.send(event, context, response.SUCCESS, {})}).catch((err) => {' - - ' console.log(err.stack); response.send(event, context, response.FAILED, {err});' - - ' });' - - ' }' - - '} catch(err) { console.log(err.stack); response.send(event, context, response.FAILED, {err});};' - - '}' - - Handler: index.handler - Runtime: nodejs16.x - Timeout: 300 - Role: !GetAtt - - UserPoolClientRole - - Arn - DependsOn: HostedUIProvidersCustomResourceInputs - - OAuthCustomResourcePolicy: - Type: 'AWS::IAM::Policy' - Properties: - PolicyName: !Join ['-',[!Ref UserPool, 'OAuth']] - Roles: - - !Ref UserPoolClientRole - PolicyDocument: - Version: '2012-10-17' - Statement: - - Effect: Allow - Action: - - 'cognito-idp:UpdateUserPoolClient' - Resource: !GetAtt UserPool.Arn - DependsOn: OAuthCustomResource - - OAuthCustomResourceLogPolicy: - Type: 'AWS::IAM::Policy' - Properties: - PolicyName: !Join ['-',[!Ref UserPool, 'OAuthLogPolicy']] - Roles: - - !Ref UserPoolClientRole - PolicyDocument: - Version: 2012-10-17 - Statement: - - Effect: Allow - Action: - - 'logs:CreateLogGroup' - - 'logs:CreateLogStream' - - 'logs:PutLogEvents' - Resource: !Sub - - arn:aws:logs:${region}:${account}:log-group:/aws/lambda/${lambda}:log-stream:* - - { region: !Ref "AWS::Region", account: !Ref "AWS::AccountId", lambda: !Ref OAuthCustomResource} - DependsOn: OAuthCustomResourcePolicy - - OAuthCustomResourceInputs: - Type: 'Custom::LambdaCallout' - Properties: - ServiceToken: !GetAtt OAuthCustomResource.Arn - userPoolId: !Ref UserPool - hostedUIProviderMeta: !Ref hostedUIProviderMeta - oAuthMetadata: !Ref oAuthMetadata - webClientId: !Ref 'UserPoolClientWeb' - nativeClientId: !Ref 'UserPoolClient' - DependsOn: OAuthCustomResourceLogPolicy - <% } %> - - <%if (!props.useEnabledMfas && props.mfaConfiguration != 'OFF') { %> - # BEGIN MFA LAMBDA RESOURCES - MFALambdaRole: - # Created to execute Lambda which sets MFA config values - Type: 'AWS::IAM::Role' - Properties: - RoleName: !If [ShouldNotCreateEnvResources, '<%=`${props.resourceNameTruncated}_totp_lambda_role`%>', !Join ['',['<%=`${props.resourceNameTruncated}_totp_lambda_role`%>', '-', !Ref env]]] - AssumeRolePolicyDocument: - Version: '2012-10-17' - Statement: - - Effect: Allow - Principal: - Service: - - lambda.amazonaws.com - Action: - - 'sts:AssumeRole' - Policies: - - PolicyName: <%=`${props.resourceNameTruncated}_totp_pass_role_policy`%> - PolicyDocument: - Version: 2012-10-17 - Statement: - - Effect: Allow - Action: - - 'iam:PassRole' - Resource: !If [ShouldNotCreateEnvResources, '<%= `arn:aws:iam:::role/${props.resourceNameTruncated}_totp_lambda_role`%>', !Join ['',['<%= `arn:aws:iam:::role/${props.resourceNameTruncated}_totp_lambda_role` %>', '-', !Ref env]]] - - PolicyName: <%=`${props.resourceNameTruncated}_sns_pass_role_policy`%> - PolicyDocument: - Version: 2012-10-17 - Statement: - - Effect: Allow - Action: - - 'iam:PassRole' - Resource: !GetAtt SNSRole.Arn - DependsOn: SNSRole - MFALambda: - # Lambda which sets MFA config values - # Depends on MFALambdaRole for role ARN - Type: 'AWS::Lambda::Function' - Properties: - Code: - ZipFile: !Join - - |+ - - - 'const response = require(''cfn-response'');' - - 'const aws = require(''aws-sdk'');' - - 'const identity = new aws.CognitoIdentityServiceProvider();' - - 'exports.handler = (event, context, callback) => {' - - ' if (event.RequestType == ''Delete'') { ' - - ' response.send(event, context, response.SUCCESS, {})' - - ' }' - - ' if (event.RequestType == ''Update'' || event.RequestType == ''Create'') {' - - ' let totpParams = {};' - - ' try {' - - ' totpParams = {' - - ' UserPoolId: event.ResourceProperties.userPoolId,' - - ' MfaConfiguration: event.ResourceProperties.mfaConfiguration,' - - ' SmsMfaConfiguration: {' - - ' SmsAuthenticationMessage: event.ResourceProperties.smsAuthenticationMessage,' - - ' SmsConfiguration: {' - - ' SnsCallerArn: event.ResourceProperties.smsConfigCaller,' - - ' ExternalId: event.ResourceProperties.smsConfigExternalId' - - ' }' - - ' },' - - ' SoftwareTokenMfaConfiguration: {Enabled: event.ResourceProperties.totpEnabled.toLowerCase() === ''true'' ? true : false}' - - ' };' - - ' } catch(e) {' - - ' response.send(event, context, response.FAILED, {e});' - - ' };' - - ' identity.setUserPoolMfaConfig(totpParams).promise()' - - ' .then((res) => {' - - ' response.send(event, context, response.SUCCESS, {res});' - - ' })' - - ' .catch((err) => {' - - ' response.send(event, context, response.FAILED, {err});' - - ' });' - - ' }' - - '};' - Handler: index.handler - Runtime: nodejs16.x - Timeout: 300 - Role: !GetAtt - - MFALambdaRole - - Arn - DependsOn: MFALambdaRole - MFALambdaPolicy: - # Sets policy for the role that executes the MFA Lambda - # Depends on Userpool for Arn - # Marked as depending on MFALambda for easier to understand CFN sequencing - Type: 'AWS::IAM::Policy' - Properties: - PolicyName: <%=`${props.resourceNameTruncated}_totp_lambda_iam_policy`%> - Roles: - - !If [ShouldNotCreateEnvResources, '<%=`${props.resourceNameTruncated}_totp_lambda_role`%>', !Join ['',['<%=`${props.resourceNameTruncated}_totp_lambda_role`%>', '-', !Ref env]]] - PolicyDocument: - Version: '2012-10-17' - Statement: - - Effect: Allow - Action: - - 'cognito-idp:SetUserPoolMfaConfig' - Resource: !GetAtt UserPool.Arn - DependsOn: MFALambda - MFALogPolicy: - # Sets log policy for the role that executes the MFA Lambda - # Marked as depending on MFALambdaPolicy for easier to understand CFN sequencing - Type: 'AWS::IAM::Policy' - Properties: - PolicyName: <%=`${props.resourceNameTruncated}_totp_lambda_log_policy`%> - Roles: - - !If [ShouldNotCreateEnvResources, '<%=`${props.resourceNameTruncated}_totp_lambda_role`%>', !Join ['',['<%=`${props.resourceNameTruncated}_totp_lambda_role`%>', '-', !Ref env]]] - PolicyDocument: - Version: 2012-10-17 - Statement: - - Effect: Allow - Action: - - 'logs:CreateLogGroup' - - 'logs:CreateLogStream' - - 'logs:PutLogEvents' - Resource: !Sub - - arn:aws:logs:${region}:${account}:log-group:/aws/lambda/${lambda}:log-stream:* - - { region: !Ref "AWS::Region", account: !Ref "AWS::AccountId", lambda: !Ref MFALambda} - DependsOn: MFALambdaPolicy - MFALambdaInputs: - # Values passed to MFA Lambda - # Depends on UserPool for Arn - # Depends on MFALambda for Arn - # Marked as depending on MFALambdaPolicy for easier to understand CFN sequencing - Type: 'Custom::LambdaCallout' - Properties: - ServiceToken: !GetAtt MFALambda.Arn - userPoolId: !Ref UserPool - mfaConfiguration: !Ref mfaConfiguration - totpEnabled: <%= props.mfaTypes.includes('TOTP') %> - smsConfigCaller: !GetAtt SNSRole.Arn - smsAuthenticationMessage: !Ref smsAuthenticationMessage - smsConfigExternalId: <%=`${props.resourceNameTruncated}_role_external_id`%> - DependsOn: MFALogPolicy - <% } %> - <% } -%> - <%if (props.authSelections === 'identityPoolAndUserPool' || props.authSelections === 'identityPoolOnly') { %> - # BEGIN IDENTITY POOL RESOURCES - <%if (props.audiences && props.audiences.length > 0) { %> - OpenIdLambdaRole: - # Created to execute Lambda which sets MFA config values - # Depends on UserPoolClientInputs to prevent further identity pool resources from being created before userpool is ready - Type: 'AWS::IAM::Role' - Properties: - RoleName: !If [ShouldNotCreateEnvResources, '<%=`${props.resourceNameTruncated}_openid_lambda_role`%>', !Join ['',['<%=`${props.resourceNameTruncated}_openid_lambda_role`%>', '-', !Ref env]]] - AssumeRolePolicyDocument: - Version: '2012-10-17' - Statement: - - Effect: Allow - Principal: - Service: - - lambda.amazonaws.com - Action: - - 'sts:AssumeRole' - Policies: - - PolicyName: <%=`${props.resourceNameTruncated}_openid_pass_role_policy`%> - PolicyDocument: - Version: 2012-10-17 - Statement: - - Effect: Allow - Action: - - 'iam:PassRole' - Resource: !If [ShouldNotCreateEnvResources, '<%= `arn:aws:iam:::role/${props.resourceNameTruncated}_openid_lambda_role` %>', !Join ['',['<%= `arn:aws:iam:::role/${props.resourceNameTruncated}_openid_lambda_role` %>', '-', !Ref env]]] - DependsOn: UserPoolClientInputs - OpenIdLambda: - # Lambda which sets OpenId Values - Type: 'AWS::Lambda::Function' - Properties: - Code: - ZipFile: !Join - - |+ - - - 'const response = require(''cfn-response'');' - - 'const aws = require(''aws-sdk'');' - - 'const iam = new aws.IAM();' - - 'exports.handler = (event, context) => {' - - ' if (event.RequestType == ''Delete'') { ' - - ' response.send(event, context, response.SUCCESS, {});' - - ' }' - - ' if (event.RequestType == ''Update'' || event.RequestType == ''Create'') {' - - ' const params = {' - - ' ClientIDList: event.ResourceProperties.clientIdList.split('',''),' - - ' ThumbprintList: ["0000000000000000000000000000000000000000"],' - - ' Url: event.ResourceProperties.url' - - ' };' - - ' let exists = false;' - - ' let existingValue;' - - ' iam.listOpenIDConnectProviders({}).promise().then((data) => {' - - ' if (data.OpenIDConnectProviderList && data.OpenIDConnectProviderList.length > 0) {' - - ' const vals = data.OpenIDConnectProviderList.map(x => x.Arn);' - - ' existingValue = vals.find(i => i.split(''/'')[1] === params.Url.split(''//'')[1]);' - - ' if (!existingValue) {' - - ' exists = true;' - - ' }' - - ' }' - - ' if (!existingValue) {' - - ' iam.createOpenIDConnectProvider(params).promise().then((data) => {' - - ' response.send(event, context, response.SUCCESS, {providerArn: data.OpenIDConnectProviderArn, providerIds: params.ClientIDList});' - - ' })' - - ' .catch((err) => {' - - ' response.send(event, context, response.FAILED, {err});' - - ' });' - - ' } else {' - - ' const findParams = {' - - ' OpenIDConnectProviderArn: existingValue' - - ' };' - - ' iam.getOpenIDConnectProvider(findParams).promise().then((data) => {' - - ' const audiences = data.ClientIDList;' - - ' const updateCalls = [];' - - ' params.ClientIDList.forEach((a) => {' - - ' if (!audiences.includes(a)) {' - - ' const updateParams = {' - - ' ClientID: a,' - - ' OpenIDConnectProviderArn: existingValue' - - ' };' - - ' const prom = iam.addClientIDToOpenIDConnectProvider(updateParams).promise();' - - ' updateCalls.push(prom);' - - ' }' - - ' });' - - ' Promise.all(updateCalls).then(function(values) {' - - ' response.send(event, context, response.SUCCESS, {providerArn: existingValue, providerIds: params.ClientIDList});' - - ' })' - - ' .catch((err3) => {' - - ' response.send(event, context, response.FAILED, {err3});' - - ' });' - - ' })' - - ' .catch((err2) => {' - - ' response.send(event, context, response.FAILED, {err2});' - - ' });' - - ' }' - - ' })' - - ' .catch((err1) => {' - - ' response.send(event, context, response.FAILED, {err1});' - - ' });' - - ' }' - - '};' - Handler: index.handler - Runtime: nodejs16.x - Timeout: 300 - Role: !GetAtt - - OpenIdLambdaRole - - Arn - DependsOn: OpenIdLambdaRole - OpenIdLambdaIAMPolicy: - # Sets policy for the role that executes the OpenId Lambda - # Depends on OpenIdLambda for Arn - # Marked as depending on MFALambda for easier to understand CFN sequencing - Type: 'AWS::IAM::Policy' - Properties: - PolicyName: <%=`${props.resourceNameTruncated}_openid_lambda_iam_policy`%> - Roles: - - !If [ShouldNotCreateEnvResources, '<%=`${props.resourceNameTruncated}_openid_lambda_role`%>', !Join ['',['<%=`${props.resourceNameTruncated}_openid_lambda_role`%>', '-', !Ref env]]] - PolicyDocument: - Version: '2012-10-17' - Statement: - - Effect: Allow - Action: - - 'iam:CreateOpenIDConnectProvider' - - 'iam:GetOpenIDConnectProvider' - - 'iam:AddClientIDToOpenIDConnectProvider' - Resource: !Sub - - arn:aws:iam::${account}:oidc-provider/accounts.google.com - - { account: !Ref "AWS::AccountId"} - - Effect: Allow - Action: - - 'iam:ListOpenIDConnectProviders' - Resource: !Sub - - arn:aws:iam::${account}:oidc-provider/${selector} - - { account: !Ref "AWS::AccountId", selector: '*'} - DependsOn: OpenIdLambda - OpenIdLogPolicy: - # Sets log policy for the role that executes the OpenId Lambda - # Depends on OpenIdLambda for Arn - # Marked as depending on UserPoolClientLambdaPolicy for easier to understand CFN sequencing - Type: 'AWS::IAM::Policy' - Properties: - PolicyName: <%=`${props.resourceNameTruncated}_openid_lambda_log_policy`%> - Roles: - - !If [ShouldNotCreateEnvResources, '<%=`${props.resourceNameTruncated}_openid_lambda_role`%>', !Join ['',['<%=`${props.resourceNameTruncated}_openid_lambda_role`%>', '-', !Ref env]]] - PolicyDocument: - Version: 2012-10-17 - Statement: - - Effect: Allow - Action: - - 'logs:CreateLogGroup' - - 'logs:CreateLogStream' - - 'logs:PutLogEvents' - Resource: !Sub - - arn:aws:logs:${region}:${account}:log-group:/aws/lambda/${lambda}:log-stream:* - - { region: !Ref "AWS::Region", account: !Ref "AWS::AccountId", lambda: !Ref OpenIdLambda} - DependsOn: OpenIdLambdaIAMPolicy - OpenIdLambdaInputs: - # Values passed to OpenId Lambda - # Depends on OpenId for Arn - # Marked as depending on OpenIdLogPolicy for easier to understand CFN sequencing - Type: 'Custom::LambdaCallout' - Properties: - ServiceToken: !GetAtt OpenIdLambda.Arn - clientIdList: <%= props.audiences.join() %> - url: 'https://accounts.google.com' - DependsOn: OpenIdLogPolicy - <% } %> - - IdentityPool: - # Always created - Type: AWS::Cognito::IdentityPool - Properties: - IdentityPoolName: !If [ShouldNotCreateEnvResources, '<%= props.identityPoolName %>', !Join ['',['<%= props.identityPoolName %>', '__', !Ref env]]] - <%if (props.authSelections !== 'identityPoolOnly') { %> - CognitoIdentityProviders: - - ClientId: !Ref UserPoolClient - ProviderName: !Sub - - cognito-idp.${region}.amazonaws.com/${client} - - { region: !Ref "AWS::Region", client: !Ref UserPool} - - ClientId: !Ref UserPoolClientWeb - ProviderName: !Sub - - cognito-idp.${region}.amazonaws.com/${client} - - { region: !Ref "AWS::Region", client: !Ref UserPool} - <% } -%> - <%if (props.authProviders && Object.keys(props.authProviders).length > 0 && props.authProviders !== '{}' && !(Object.keys(props.authProviders).length === 1 && props.authProviders[0] === 'accounts.google.com' && props.audiences)) { %> - SupportedLoginProviders: - <%if (props.authProviders.indexOf('graph.facebook.com') !== -1) { %> - graph.facebook.com: !Ref facebookAppId - <% } %> - <%if (props.authProviders.indexOf('accounts.google.com') !== -1 && !props.audiences) { %> - accounts.google.com: !Ref googleClientId - <% } %> - <%if (props.authProviders.indexOf('www.amazon.com') !== -1) { %> - www.amazon.com: !Ref amazonAppId - <% } %> - <%if (props.authProviders.indexOf('appleid.apple.com') !== -1) { %> - appleid.apple.com: !Ref appleAppId - <% } %> - <% } %> - AllowUnauthenticatedIdentities: !Ref allowUnauthenticatedIdentities - <%if (props.audiences && props.audiences.length > 0) { %> - OpenIdConnectProviderARNs: - - !GetAtt OpenIdLambdaInputs.providerArn - DependsOn: OpenIdLambdaInputs - <% } %> - <%if ((!props.audiences || props.audiences.length === 0) && props.authSelections !== 'identityPoolOnly') { %> - DependsOn: UserPoolClientInputs - <% } %> - - IdentityPoolRoleMap: - # Created to map Auth and Unauth roles to the identity pool - # Depends on Identity Pool for ID ref - Type: AWS::Cognito::IdentityPoolRoleAttachment - Properties: - IdentityPoolId: !Ref IdentityPool - Roles: - unauthenticated: !Ref unauthRoleArn - authenticated: !Ref authRoleArn - DependsOn: IdentityPool - <% } %> - -Outputs : - <%if (props.authSelections === 'identityPoolAndUserPool' || props.authSelections == 'identityPoolOnly') { %> - IdentityPoolId: - Value: !Ref 'IdentityPool' - Description: Id for the identity pool - IdentityPoolName: - Value: !GetAtt IdentityPool.Name - <% } %> - <%if (props.hostedUIDomainName) { %> - HostedUIDomain: - Value: !If [ShouldNotCreateEnvResources, !Ref hostedUIDomainName, !Join ['-',[!Ref hostedUIDomainName, !Ref env]]] - <% } %> - <%if (props.oAuthMetadata) { %> - OAuthMetadata: - Value: !Ref oAuthMetadata - <% } %> - <%if (props.authSelections !== 'identityPoolOnly') { %> - UserPoolId: - Value: !Ref 'UserPool' - Description: Id for the user pool - UserPoolArn: - Value: !GetAtt UserPool.Arn - Description: Arn for the user pool - UserPoolName: - Value: !Ref userPoolName - AppClientIDWeb: - Value: !Ref 'UserPoolClientWeb' - Description: The user pool app client id for web - AppClientID: - Value: !Ref 'UserPoolClient' - Description: The user pool app client id - AppClientSecret: - Value: !GetAtt UserPoolClientInputs.appSecret - Condition: ShouldOutputAppClientSecrets - <%if (!props.useEnabledMfas || configureSMS) { %> - CreatedSNSRole: - Value: !GetAtt SNSRole.Arn - Description: role arn - <% } %> - <%if (props.googleClientId) { %> - GoogleWebClient: - Value: !Ref googleClientId - <% } %> - <%if (props.googleIos) { %> - GoogleIOSClient: - Value: !Ref googleIos - <% } %> - <%if (props.googleAndroid) { %> - GoogleAndroidClient: - Value: !Ref googleAndroid - <% } %> - <%if (props.facebookAppId) { %> - FacebookWebClient: - Value: !Ref facebookAppId - <% } %> - <%if (props.amazonAppId) { %> - AmazonWebClient: - Value: !Ref amazonAppId - <% } %> - <%if (props.appleAppId) { %> - AppleWebClient: - Value: !Ref appleAppId - <% } %> - <% } %> diff --git a/packages/amplify-category-auth/resources/cloudformation-templates/user-pool-group-template.json.ejs b/packages/amplify-category-auth/resources/cloudformation-templates/user-pool-group-template.json.ejs deleted file mode 100644 index f41916731eb..00000000000 --- a/packages/amplify-category-auth/resources/cloudformation-templates/user-pool-group-template.json.ejs +++ /dev/null @@ -1,336 +0,0 @@ -{ - "AWSTemplateFormatVersion": "2010-09-09", - "Parameters": { - "auth<%= props.cognitoResourceName %>UserPoolId": { - "Type": "String", - "Default": "auth<%= props.cognitoResourceName %>UserPoolId" - }, - <% if (props.identityPoolName) { %> - "auth<%= props.cognitoResourceName %>IdentityPoolId": { - "Type": "String", - "Default": "auth<%= props.cognitoResourceName %>IdentityPoolId" - }, - <% } %> - "auth<%= props.cognitoResourceName %>AppClientID": { - "Type": "String", - "Default": "auth<%= props.cognitoResourceName %>AppClientID" - }, - "auth<%= props.cognitoResourceName %>AppClientIDWeb": { - "Type": "String", - "Default": "auth<%= props.cognitoResourceName %>AppClientIDWeb" - }, - "AuthRoleArn": { - "Type": "String" - }, - "UnauthRoleArn": { - "Type": "String" - }, - "env": { - "Type": "String" - } - }, - "Conditions": { - "ShouldNotCreateEnvResources": { - "Fn::Equals": [ - { - "Ref": "env" - }, - "NONE" - ] - } - }, - "Resources": { - <% for(var i=0; i < props.groups.length; i++) { %> - "<%= props.groups[i].groupName%>Group": { - "Type" : "AWS::Cognito::UserPoolGroup", - "Properties" : { - "GroupName" : "<%= props.groups[i].groupName %>", - "Precedence" : <%= props.groups[i].precedence %>, - <% if (props.identityPoolName) { %> - "RoleArn" : { - "Fn::GetAtt": [ - "<%= props.groups[i].groupName %>GroupRole", - "Arn" - ] - }, - <% } %> - "UserPoolId" : { - "Ref": "auth<%= props.cognitoResourceName %>UserPoolId" - } - } - }, - <% if (props.identityPoolName) { %> - "<%= props.groups[i].groupName %>GroupRole": { - "Type": "AWS::IAM::Role", - "Properties": { - "RoleName":{ - "Fn::Join": [ - "", - [ - { - "Ref": "auth<%= props.cognitoResourceName %>UserPoolId" - }, - "-<%= props.groups[i].groupName %>GroupRole" - ] - ] - }, - "AssumeRolePolicyDocument": { - "Version": "2012-10-17", - "Statement": [ - { - "Sid": "", - "Effect": "Allow", - "Principal": { - "Federated": "cognito-identity.amazonaws.com" - }, - "Action": "sts:AssumeRoleWithWebIdentity", - "Condition": { - "StringEquals": {"cognito-identity.amazonaws.com:aud": {"Ref":"auth<%= props.cognitoResourceName %>IdentityPoolId"}}, - "ForAnyValue:StringLike": {"cognito-identity.amazonaws.com:amr": "authenticated"} - } - } - ] - }<% if(props.groups[i].customPolicies && props.groups[i].customPolicies.length > 0) { %>, - "Policies": <%- JSON.stringify(props.groups[i].customPolicies, null, 4) %> - <% } %> - } - }, - <% } %> - <% } %> - <% if (props.identityPoolName) { %> - "LambdaCloudWatchPolicy": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyName": { - "Ref": "UserGroupLogPolicy" - }, - "Roles": [ - { - "Ref": "LambdaExecutionRole" - } - ], - "PolicyDocument": { - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Resource": { - "Fn::Sub": [ - "arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/${lambdaName}:log-stream:*", - { - "lambdaName": { - "Ref": "RoleMapFunction" - } - } - ] - } - } - ] - } - } - }, - "LambdaExecutionRole": { - "Type": "AWS::IAM::Role", - "Properties": { - "RoleName": { - "Fn::If": [ - "ShouldNotCreateEnvResources", - { - <%= props.resourceName %> - }, - { - - "Fn::Join": [ - "", - [ - - "<%= props.cognitoResourceName %>", - "-ExecutionRole-", - { - "Ref": "env" - } - ] - ] - } - ] - }, - "AssumeRolePolicyDocument": { - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Principal": { - "Service": [ - "lambda.amazonaws.com" - ] - }, - "Action": [ - "sts:AssumeRole" - ] - } - ] - }, - "Policies": [ - { - "PolicyName": "UserGroupExecutionPolicy", - "PolicyDocument": { - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Action": [ - "cognito-identity:SetIdentityPoolRoles", - "cognito-identity:ListIdentityPools", - "cognito-identity:describeIdentityPool" - - ], - "Resource": "*" - } - ] - } - }, - { - "PolicyName": "UserGroupPassRolePolicy", - "PolicyDocument": { - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Action": [ - "iam:PassRole" - ], - "Resource": [ - { "Ref": "AuthRoleArn" }, - { "Ref": "UnauthRoleArn" } - ] - } - ] - } - } - ] - } - }, - "RoleMapFunction": { - "Type": "AWS::Lambda::Function", - "DependsOn": ["LambdaExecutionRole"], - "Properties": { - "Code": { - "ZipFile": { - "Fn::Join": [ - "\n", - [ - "const response = require('cfn-response');", - "const AWS = require('aws-sdk');", - "exports.handler = (event, context) => {", - "if (event.RequestType == 'Delete') {", - " response.send(event, context, response.SUCCESS, {message: 'Request type delete'})", - "};", - "if (event.RequestType == 'Create' || event.RequestType == 'Update') {", - " let { identityPoolId, appClientID, appClientIDWeb, userPoolId, region } = event.ResourceProperties;", - " try {", - " const cognitoidentity = new AWS.CognitoIdentity();", - " let params = {", - " IdentityPoolId: identityPoolId,", - " Roles: {", - " 'authenticated': event.ResourceProperties.AuthRoleArn,", - " 'unauthenticated': event.ResourceProperties.UnauthRoleArn,", - " },", - " RoleMappings: {}", - " };", - " if (appClientIDWeb) {", - " params.RoleMappings[`cognito-idp.${region}.amazonaws.com/${userPoolId}:${appClientIDWeb}`] = {", - " Type: 'Token',", - " AmbiguousRoleResolution: 'AuthenticatedRole',", - " }", - " }", - " if (appClientID) {", - " params.RoleMappings[`cognito-idp.${region}.amazonaws.com/${userPoolId}:${appClientID}`] = {", - " Type: 'Token',", - " AmbiguousRoleResolution: 'AuthenticatedRole',", - " }", - " }", - " cognitoidentity.setIdentityPoolRoles(params).promise();", - " response.send(event, context, response.SUCCESS, {message: 'Successfully updated identity pool.'})", - " } catch(err) {", - " response.send(event, context, response.FAILED, {message: 'Error updating identity pool'});", - " }", - " };", - "};" - - ] - ] - } - }, - "Handler": "index.handler", - "Runtime": "nodejs16.x", - "Timeout": 300, - "Role": { - "Fn::GetAtt": [ - "LambdaExecutionRole", - "Arn" - ] - } - } - }, - "RoleMapFunctionInput": { - "Type": "Custom::LambdaCallout", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "RoleMapFunction", - "Arn" - ] - }, - "AuthRoleArn": { - "Ref": "AuthRoleArn" - }, - "UnauthRoleArn": { - "Ref": "UnauthRoleArn" - }, - "identityPoolId": { - "Ref": "auth<%= props.cognitoResourceName %>IdentityPoolId" - }, - "userPoolId": { - "Ref": "auth<%= props.cognitoResourceName %>UserPoolId" - }, - "appClientIDWeb": { - "Ref": "auth<%= props.cognitoResourceName %>AppClientIDWeb" - }, - "appClientID": { - "Ref": "auth<%= props.cognitoResourceName %>AppClientID" - }, - "region": { - "Ref": "AWS::Region" - }, - "env": { - "Ref": "env" - } - }, - "DependsOn": ["RoleMapFunction"] - } - <% } %> - }, - <% if (props.identityPoolName) { %> - "Outputs": { - <% for(var i=0; i < props.groups.length; i++) { %> - "<%= props.groups[i].groupName %>GroupRole": { - "Value": { - "Fn::GetAtt": [ - "<%= props.groups[i].groupName %>GroupRole", - "Arn" - ] - } - <% if(i !== (props.groups.length -1)) { %> - }, - <%} else { %> - } - <% } %> - <% } %> - } - <% } %> -} diff --git a/packages/amplify-category-auth/resources/lambda-function.js b/packages/amplify-category-auth/resources/lambda-function.js index 2dbc6f56023..de3524b383c 100644 --- a/packages/amplify-category-auth/resources/lambda-function.js +++ b/packages/amplify-category-auth/resources/lambda-function.js @@ -1,73 +1,73 @@ const response = require('cfn-response'); -const aws = require('aws-sdk'); +const { + CognitoIdentityProviderClient, + DescribeUserPoolCommand, + UpdateUserPoolCommand, +} = require('@aws-sdk/client-cognito-identity-provider'); -exports.handler = async function (event, context) { +exports.handler = (event, context) => { + // Don't return promise, response.send() marks context as done internally + void tryHandleEvent(event, context); +}; + +async function tryHandleEvent(event, context) { const physicalResourceId = event.RequestType === 'Update' ? event.PhysicalResourceId : `${event.LogicalResourceId}-${event.ResourceProperties.userpoolId}`; - try { - const userPoolId = event.ResourceProperties.userpoolId; - const { lambdaConfig } = event.ResourceProperties; - const config = {}; - const cognitoClient = new aws.CognitoIdentityServiceProvider(); - const userPoolConfig = await cognitoClient.describeUserPool({ UserPoolId: userPoolId }).promise(); - const userPoolParams = userPoolConfig.UserPool; - // update userPool params + await handleEvent(event); + response.send(event, context, response.SUCCESS, {}, physicalResourceId); + } catch (err) { + console.log(err.stack); + response.send(event, context, response.FAILED, { err }, physicalResourceId); + } +} - const updateUserPoolConfig = { - UserPoolId: userPoolParams.Id, - Policies: userPoolParams.Policies, - SmsVerificationMessage: userPoolParams.SmsVerificationMessage, - AccountRecoverySetting: userPoolParams.AccountRecoverySetting, - AdminCreateUserConfig: userPoolParams.AdminCreateUserConfig, - AutoVerifiedAttributes: userPoolParams.AutoVerifiedAttributes, - EmailConfiguration: userPoolParams.EmailConfiguration, - EmailVerificationMessage: userPoolParams.EmailVerificationMessage, - EmailVerificationSubject: userPoolParams.EmailVerificationSubject, - VerificationMessageTemplate: userPoolParams.VerificationMessageTemplate, - SmsAuthenticationMessage: userPoolParams.SmsAuthenticationMessage, - MfaConfiguration: userPoolParams.MfaConfiguration, - DeviceConfiguration: userPoolParams.DeviceConfiguration, - SmsConfiguration: userPoolParams.SmsConfiguration, - UserPoolTags: userPoolParams.UserPoolTags, - UserPoolAddOns: userPoolParams.UserPoolAddOns, - }; +async function handleEvent(event) { + const userPoolId = event.ResourceProperties.userpoolId; + const { lambdaConfig } = event.ResourceProperties; + const config = {}; + const cognitoClient = new CognitoIdentityProviderClient({}); + const userPoolConfig = await cognitoClient.send(new DescribeUserPoolCommand({ UserPoolId: userPoolId })); + const userPoolParams = userPoolConfig.UserPool; + // update userPool params - // removing undefined keys - Object.keys(updateUserPoolConfig).forEach((key) => updateUserPoolConfig[key] === undefined && delete updateUserPoolConfig[key]); + const updateUserPoolConfig = { + UserPoolId: userPoolParams.Id, + Policies: userPoolParams.Policies, + SmsVerificationMessage: userPoolParams.SmsVerificationMessage, + AccountRecoverySetting: userPoolParams.AccountRecoverySetting, + AdminCreateUserConfig: userPoolParams.AdminCreateUserConfig, + AutoVerifiedAttributes: userPoolParams.AutoVerifiedAttributes, + EmailConfiguration: userPoolParams.EmailConfiguration, + EmailVerificationMessage: userPoolParams.EmailVerificationMessage, + EmailVerificationSubject: userPoolParams.EmailVerificationSubject, + VerificationMessageTemplate: userPoolParams.VerificationMessageTemplate, + SmsAuthenticationMessage: userPoolParams.SmsAuthenticationMessage, + MfaConfiguration: userPoolParams.MfaConfiguration, + DeviceConfiguration: userPoolParams.DeviceConfiguration, + SmsConfiguration: userPoolParams.SmsConfiguration, + UserPoolTags: userPoolParams.UserPoolTags, + UserPoolAddOns: userPoolParams.UserPoolAddOns, + }; - /* removing UnusedAccountValidityDays as deprecated + // removing undefined keys + Object.keys(updateUserPoolConfig).forEach((key) => updateUserPoolConfig[key] === undefined && delete updateUserPoolConfig[key]); + + /* removing UnusedAccountValidityDays as deprecated InvalidParameterException: Please use TemporaryPasswordValidityDays in PasswordPolicy instead of UnusedAccountValidityDays */ - if (updateUserPoolConfig.AdminCreateUserConfig && updateUserPoolConfig.AdminCreateUserConfig.UnusedAccountValidityDays) { - delete updateUserPoolConfig.AdminCreateUserConfig.UnusedAccountValidityDays; - } - lambdaConfig.forEach((lambda) => (config[`${lambda.triggerType}`] = lambda.lambdaFunctionArn)); - if (event.RequestType === 'Delete') { - try { - updateUserPoolConfig.LambdaConfig = {}; - console.log(`${event.RequestType}:`, JSON.stringify(updateUserPoolConfig)); - const result = await cognitoClient.updateUserPool(updateUserPoolConfig).promise(); - console.log(`delete response data ${JSON.stringify(result)}`); - await response.send(event, context, response.SUCCESS, {}, physicalResourceId); - } catch (err) { - console.log(err.stack); - await response.send(event, context, response.FAILED, { err }, physicalResourceId); - } - } - if (event.RequestType === 'Update' || event.RequestType === 'Create') { - updateUserPoolConfig.LambdaConfig = config; - try { - const result = await cognitoClient.updateUserPool(updateUserPoolConfig).promise(); - console.log(`createOrUpdate response data ${JSON.stringify(result)}`); - await response.send(event, context, response.SUCCESS, {}, physicalResourceId); - } catch (err) { - console.log(err.stack); - await response.send(event, context, response.FAILED, { err }, physicalResourceId); - } - } - } catch (err) { - console.log(err.stack); - await response.send(event, context, response.FAILED, { err }, physicalResourceId); + if (updateUserPoolConfig.AdminCreateUserConfig && updateUserPoolConfig.AdminCreateUserConfig.UnusedAccountValidityDays) { + delete updateUserPoolConfig.AdminCreateUserConfig.UnusedAccountValidityDays; } -}; + lambdaConfig.forEach((lambda) => (config[`${lambda.triggerType}`] = lambda.lambdaFunctionArn)); + if (event.RequestType === 'Delete') { + updateUserPoolConfig.LambdaConfig = {}; + console.log(`${event.RequestType}:`, JSON.stringify(updateUserPoolConfig)); + const result = await cognitoClient.send(new UpdateUserPoolCommand(updateUserPoolConfig)); + console.log(`delete response data ${JSON.stringify(result)}`); + } else if (event.RequestType === 'Update' || event.RequestType === 'Create') { + updateUserPoolConfig.LambdaConfig = config; + const result = await cognitoClient.send(new UpdateUserPoolCommand(updateUserPoolConfig)); + console.log(`createOrUpdate response data ${JSON.stringify(result)}`); + } +} diff --git a/packages/amplify-category-auth/src/__tests__/commands/override.test.ts b/packages/amplify-category-auth/src/__tests__/commands/override.test.ts index d5eb3ee478a..fc2d0f93204 100644 --- a/packages/amplify-category-auth/src/__tests__/commands/override.test.ts +++ b/packages/amplify-category-auth/src/__tests__/commands/override.test.ts @@ -1,6 +1,5 @@ import { run } from '../../commands/auth/override'; import { $TSContext, generateOverrideSkeleton } from '@aws-amplify/amplify-cli-core'; -import { AuthInputState } from '../../provider-utils/awscloudformation/auth-inputs-manager/auth-input-state'; import { checkAuthResourceMigration } from '../../provider-utils/awscloudformation/utils/check-for-auth-migration'; jest.mock('../../provider-utils/awscloudformation/auth-inputs-manager/auth-input-state'); diff --git a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-inputs-manager/auth-input-state.test.ts b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-inputs-manager/auth-input-state.test.ts index 8c7f03eb216..0c238a6ef48 100644 --- a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-inputs-manager/auth-input-state.test.ts +++ b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-inputs-manager/auth-input-state.test.ts @@ -120,5 +120,5 @@ test('Auth Input State -> validate cli payload manual payload', async () => { test('Auth Input State -> validate cli payload manual payload to throw error', async () => { const resourceName = 'mockResource'; const authState = new AuthInputState(mockContext, resourceName); - expect(authState.isCLIInputsValid()).rejects.toThrowError(); + await expect(authState.isCLIInputsValid()).rejects.toThrowError(); }); diff --git a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-stack-builder/__snapshots__/auth-stack-transform.test.ts.snap b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-stack-builder/__snapshots__/auth-stack-transform.test.ts.snap index af1c3869689..75d5b2751b0 100644 --- a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-stack-builder/__snapshots__/auth-stack-transform.test.ts.snap +++ b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-stack-builder/__snapshots__/auth-stack-transform.test.ts.snap @@ -12,14 +12,6 @@ exports[`Check Auth Template Generated authstack template in default flow 1`] = "NONE", ], }, - "ShouldOutputAppClientSecrets": { - "Fn::Equals": [ - { - "Ref": "userpoolClientGenerateSecret", - }, - true, - ], - }, }, "Description": "Amplify Cognito Stack for AWS Amplify CLI", "Outputs": { @@ -35,15 +27,6 @@ exports[`Check Auth Template Generated authstack template in default flow 1`] = "Ref": "UserPoolClientWeb", }, }, - "AppClientSecret": { - "Condition": "ShouldOutputAppClientSecrets", - "Value": { - "Fn::GetAtt": [ - "UserPoolClientInputs", - "appSecret", - ], - }, - }, "IdentityPoolId": { "Description": "Id for the identity pool", "Value": { @@ -188,9 +171,6 @@ exports[`Check Auth Template Generated authstack template in default flow 1`] = }, "Resources": { "IdentityPool": { - "DependsOn": [ - "UserPoolClientInputs", - ], "Properties": { "AllowUnauthenticatedIdentities": { "Ref": "allowUnauthenticatedIdentities", @@ -361,149 +341,7 @@ exports[`Check Auth Template Generated authstack template in default flow 1`] = }, "Type": "AWS::Cognito::UserPoolClient", }, - "UserPoolClientInputs": { - "DeletionPolicy": "Delete", - "DependsOn": [ - "UserPoolClientLogPolicy", - ], - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "UserPoolClientLambda", - "Arn", - ], - }, - "clientId": { - "Ref": "UserPoolClient", - }, - "userpoolId": { - "Ref": "UserPool", - }, - }, - "Type": "Custom::LambdaCallout", - "UpdateReplacePolicy": "Delete", - }, - "UserPoolClientLambda": { - "DependsOn": [ - "UserPoolClientRole", - ], - "Properties": { - "Code": { - "ZipFile": "const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - const params = { - ClientId: event.ResourceProperties.clientId, - UserPoolId: event.ResourceProperties.userpoolId, - }; - identity - .describeUserPoolClient(params) - .promise() - .then((res) => { - response.send(event, context, response.SUCCESS, { appSecret: res.UserPoolClient.ClientSecret }); - }) - .catch((err) => { - response.send(event, context, response.FAILED, { err }); - }); - } -}; -", - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "UserPoolClientRole", - "Arn", - ], - }, - "Runtime": "nodejs16.x", - "Timeout": 300, - }, - "Type": "AWS::Lambda::Function", - }, - "UserPoolClientLambdaPolicy": { - "DependsOn": [ - "UserPoolClientLambda", - ], - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "cognito-idp:DescribeUserPoolClient", - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "UserPool", - "Arn", - ], - }, - }, - ], - "Version": "2012-10-17", - }, - "PolicyName": "authde2c33facd_userpoolclient_lambda_iam_policy", - "Roles": [ - { - "Ref": "UserPoolClientRole", - }, - ], - }, - "Type": "AWS::IAM::Policy", - }, - "UserPoolClientLogPolicy": { - "DependsOn": [ - "UserPoolClientLambdaPolicy", - ], - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents", - ], - "Effect": "Allow", - "Resource": { - "Fn::Sub": [ - "arn:aws:logs:\${region}:\${account}:log-group:/aws/lambda/\${lambda}:log-stream:*", - { - "account": { - "Ref": "AWS::AccountId", - }, - "lambda": { - "Ref": "UserPoolClientLambda", - }, - "region": { - "Ref": "AWS::Region", - }, - }, - ], - }, - }, - ], - "Version": "2012-10-17", - }, - "PolicyName": "authde2c33facd_userpoolclient_lambda_log_policy", - "Roles": [ - { - "Ref": "UserPoolClientRole", - }, - ], - }, - "Type": "AWS::IAM::Policy", - }, "UserPoolClientRole": { - "DependsOn": [ - "UserPoolClient", - ], "Properties": { "AssumeRolePolicyDocument": { "Statement": [ @@ -587,14 +425,6 @@ exports[`Check Auth Template Generated authstack template in manual flow 1`] = ` "NONE", ], }, - "ShouldOutputAppClientSecrets": { - "Fn::Equals": [ - { - "Ref": "userpoolClientGenerateSecret", - }, - true, - ], - }, }, "Description": "Amplify Cognito Stack for AWS Amplify CLI", "Outputs": { @@ -615,15 +445,6 @@ exports[`Check Auth Template Generated authstack template in manual flow 1`] = ` "Ref": "UserPoolClientWeb", }, }, - "AppClientSecret": { - "Condition": "ShouldOutputAppClientSecrets", - "Value": { - "Fn::GetAtt": [ - "UserPoolClientInputs", - "appSecret", - ], - }, - }, "AppleWebClient": { "Value": { "Ref": "appleAppId", @@ -963,86 +784,85 @@ exports[`Check Auth Template Generated authstack template in manual flow 1`] = ` "Properties": { "Code": { "ZipFile": "const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { +const { + CognitoIdentityProviderClient, + CreateUserPoolDomainCommand, + DeleteUserPoolDomainCommand, + DescribeUserPoolCommand, + DescribeUserPoolDomainCommand, +} = require('@aws-sdk/client-cognito-identity-provider'); +const identity = new CognitoIdentityProviderClient({}); + +exports.handler = (event, context) => { + // Don't return promise, response.send() marks context as done internally + void tryHandleEvent(event, context); +}; + +async function tryHandleEvent(event, context) { + try { + await handleEvent(event); + response.send(event, context, response.SUCCESS, {}); + } catch (err) { + console.log(err); + response.send(event, context, response.FAILED, { err }); + } +} + +async function handleEvent(event) { const userPoolId = event.ResourceProperties.userPoolId; const inputDomainName = event.ResourceProperties.hostedUIDomainName; - let deleteUserPoolDomain = (domainName) => { - let params = { Domain: domainName, UserPoolId: userPoolId }; - return identity.deleteUserPoolDomain(params).promise(); + if (event.RequestType === 'Delete') { + await deleteUserPoolDomain(inputDomainName, userPoolId); + } else if (event.RequestType === 'Update' || event.RequestType === 'Create') { + await createOrUpdateDomain(inputDomainName, userPoolId); + } +} + +async function checkDomainAvailability(domainName) { + const params = { Domain: domainName }; + try { + const res = await identity.send(new DescribeUserPoolDomainCommand(params)); + return !(res.DomainDescription && res.DomainDescription.UserPoolId); + } catch (err) { + return false; + } +} + +async function deleteUserPoolDomain(domainName, userPoolId) { + const params = { Domain: domainName, UserPoolId: userPoolId }; + await identity.send(new DeleteUserPoolDomainCommand(params)); +} + +async function createUserPoolDomain(domainName, userPoolId) { + const params = { + Domain: domainName, + UserPoolId: userPoolId, }; - if (event.RequestType == 'Delete') { - deleteUserPoolDomain(inputDomainName) - .then(() => { - response.send(event, context, response.SUCCESS, {}); - }) - .catch((err) => { - console.log(err); - response.send(event, context, response.FAILED, { err }); - }); + await identity.send(new CreateUserPoolDomainCommand(params)); +} + +async function createOrUpdateDomain(inputDomainName, userPoolId) { + const result = await identity.send(new DescribeUserPoolCommand({ UserPoolId: userPoolId })); + if (result.UserPool.Domain === inputDomainName) { + // if existing domain is same as input domain do nothing. + return; } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - let checkDomainAvailability = (domainName) => { - let params = { Domain: domainName }; - return identity - .describeUserPoolDomain(params) - .promise() - .then((res) => { - if (res.DomainDescription && res.DomainDescription.UserPool) { - return false; - } - return true; - }) - .catch((err) => { - return false; - }); - }; - let createUserPoolDomain = (domainName) => { - let params = { Domain: domainName, UserPoolId: userPoolId }; - return identity.createUserPoolDomain(params).promise(); - }; - identity - .describeUserPool({ UserPoolId: userPoolId }) - .promise() - .then((result) => { - if (inputDomainName) { - if (result.UserPool.Domain === inputDomainName) { - return; - } else { - if (!result.UserPool.Domain) { - return checkDomainAvailability(inputDomainName).then((isDomainAvailable) => { - if (isDomainAvailable) { - return createUserPoolDomain(inputDomainName); - } else { - throw new Error('Domain not available'); - } - }); - } else { - return checkDomainAvailability(inputDomainName).then((isDomainAvailable) => { - if (isDomainAvailable) { - return deleteUserPoolDomain(result.UserPool.Domain).then(() => createUserPoolDomain(inputDomainName)); - } else { - throw new Error('Domain not available'); - } - }); - } - } - } else { - if (result.UserPool.Domain) { - return deleteUserPoolDomain(result.UserPool.Domain); - } - } - }) - .then(() => { - response.send(event, context, response.SUCCESS, {}); - }) - .catch((err) => { - console.log(err); - response.send(event, context, response.FAILED, { err }); - }); + if (inputDomainName) { + // create new or replace existing domain. + const isDomainAvailable = await checkDomainAvailability(inputDomainName); + if (isDomainAvailable) { + if (result.UserPool.Domain) { + await deleteUserPoolDomain(result.UserPool.Domain, userPoolId); + } + await createUserPoolDomain(inputDomainName, userPoolId); + } else { + throw new Error('Domain not available'); + } + } else if (result.UserPool.Domain) { + // if input domain is undefined delete existing domain if exists. + await deleteUserPoolDomain(result.UserPool.Domain, userPoolId); } -}; +} ", }, "Handler": "index.handler", @@ -1052,7 +872,7 @@ exports.handler = (event, context, callback) => { "Arn", ], }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs18.x", "Timeout": 300, }, "Type": "AWS::Lambda::Function", @@ -1209,109 +1029,115 @@ exports.handler = (event, context, callback) => { "Properties": { "Code": { "ZipFile": "const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { +const { + CognitoIdentityProviderClient, + CreateIdentityProviderCommand, + DeleteIdentityProviderCommand, + ListIdentityProvidersCommand, + UpdateIdentityProviderCommand, +} = require('@aws-sdk/client-cognito-identity-provider'); +const identity = new CognitoIdentityProviderClient({}); + +exports.handler = (event, context) => { + // Don't return promise, response.send() marks context as done internally + void tryHandleEvent(event, context); +}; + +async function tryHandleEvent(event, context) { try { - const userPoolId = event.ResourceProperties.userPoolId; - let hostedUIProviderMeta = JSON.parse(event.ResourceProperties.hostedUIProviderMeta); - let hostedUIProviderCreds = JSON.parse(event.ResourceProperties.hostedUIProviderCreds); - if (hostedUIProviderCreds.length === 0) { - response.send(event, context, response.SUCCESS, {}); + await handleEvent(event); + response.send(event, context, response.SUCCESS, {}); + } catch (err) { + console.log(err.stack); + response.send(event, context, response.FAILED, { err }); + } +} + +async function handleEvent(event) { + const userPoolId = event.ResourceProperties.userPoolId; + const hostedUIProviderMeta = JSON.parse(event.ResourceProperties.hostedUIProviderMeta); + const hostedUIProviderCreds = JSON.parse(event.ResourceProperties.hostedUIProviderCreds); + const hasHostedUIProviderCreds = hostedUIProviderCreds.length && hostedUIProviderCreds.length > 0; + if (hasHostedUIProviderCreds && (event.RequestType === 'Update' || event.RequestType === 'Create')) { + const listIdentityProvidersResponse = await identity.send( + new ListIdentityProvidersCommand({ + UserPoolId: userPoolId, + MaxResults: 60, + }), + ); + console.log(listIdentityProvidersResponse); + const providerList = listIdentityProvidersResponse.Providers.map((provider) => provider.ProviderName); + const providerListInParameters = hostedUIProviderMeta.map((provider) => provider.ProviderName); + for (const providerMetadata of hostedUIProviderMeta) { + if (providerList.indexOf(providerMetadata.ProviderName) > -1) { + await updateIdentityProvider(providerMetadata.ProviderName, hostedUIProviderMeta, hostedUIProviderCreds, userPoolId); + } else { + await createIdentityProvider(providerMetadata.ProviderName, hostedUIProviderMeta, hostedUIProviderCreds, userPoolId); + } } - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); + for (const provider of providerList) { + if (providerListInParameters.indexOf(provider) < 0) { + await deleteIdentityProvider(provider, userPoolId); + } } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - let getRequestParams = (providerName) => { - let providerMetaIndex = hostedUIProviderMeta.findIndex((provider) => provider.ProviderName === providerName); - let providerMeta = hostedUIProviderMeta[providerMetaIndex]; - let providerCredsIndex = hostedUIProviderCreds.findIndex((provider) => provider.ProviderName === providerName); - let providerCreds = hostedUIProviderCreds[providerCredsIndex]; - let requestParams = { - ProviderName: providerMeta.ProviderName, - UserPoolId: userPoolId, - AttributeMapping: providerMeta.AttributeMapping, - }; - if (providerMeta.ProviderName === 'SignInWithApple') { - if (providerCreds.client_id && providerCreds.team_id && providerCreds.key_id && providerCreds.private_key) { - requestParams.ProviderDetails = { - client_id: providerCreds.client_id, - team_id: providerCreds.team_id, - key_id: providerCreds.key_id, - private_key: providerCreds.private_key, - authorize_scopes: providerMeta.authorize_scopes, - }; - } else { - requestParams = null; - } - } else { - if (providerCreds.client_id && providerCreds.client_secret) { - requestParams.ProviderDetails = { - client_id: providerCreds.client_id, - client_secret: providerCreds.client_secret, - authorize_scopes: providerMeta.authorize_scopes, - }; - } else { - requestParams = null; - } - } - return requestParams; - }; - let createIdentityProvider = (providerName) => { - let requestParams = getRequestParams(providerName); - if (!requestParams) { - return Promise.resolve(); - } - requestParams.ProviderType = requestParams.ProviderName; - return identity.createIdentityProvider(requestParams).promise(); - }; - let updateIdentityProvider = (providerName) => { - let requestParams = getRequestParams(providerName); - if (!requestParams) { - return Promise.resolve(); - } - return identity.updateIdentityProvider(requestParams).promise(); + } +} + +function getRequestParams(providerName, hostedUIProviderMeta, hostedUIProviderCreds, userPoolId) { + const providerMeta = hostedUIProviderMeta.find((provider) => provider.ProviderName === providerName); + const providerCreds = hostedUIProviderCreds.find((provider) => provider.ProviderName === providerName); + let requestParams = { + ProviderName: providerMeta.ProviderName, + UserPoolId: userPoolId, + AttributeMapping: providerMeta.AttributeMapping, + }; + if (providerMeta.ProviderName === 'SignInWithApple') { + if (providerCreds.client_id && providerCreds.team_id && providerCreds.key_id && providerCreds.private_key) { + requestParams.ProviderDetails = { + client_id: providerCreds.client_id, + team_id: providerCreds.team_id, + key_id: providerCreds.key_id, + private_key: providerCreds.private_key, + authorize_scopes: providerMeta.authorize_scopes, }; - let deleteIdentityProvider = (providerName) => { - let params = { ProviderName: providerName, UserPoolId: userPoolId }; - return identity.deleteIdentityProvider(params).promise(); + } else { + requestParams = null; + } + } else { + if (providerCreds.client_id && providerCreds.client_secret) { + requestParams.ProviderDetails = { + client_id: providerCreds.client_id, + client_secret: providerCreds.client_secret, + authorize_scopes: providerMeta.authorize_scopes, }; - let providerPromises = []; - identity - .listIdentityProviders({ UserPoolId: userPoolId, MaxResults: 60 }) - .promise() - .then((result) => { - console.log(result); - let providerList = result.Providers.map((provider) => provider.ProviderName); - let providerListInParameters = hostedUIProviderMeta.map((provider) => provider.ProviderName); - hostedUIProviderMeta.forEach((providerMetadata) => { - if (providerList.indexOf(providerMetadata.ProviderName) > -1) { - providerPromises.push(updateIdentityProvider(providerMetadata.ProviderName)); - } else { - providerPromises.push(createIdentityProvider(providerMetadata.ProviderName)); - } - }); - providerList.forEach((provider) => { - if (providerListInParameters.indexOf(provider) < 0) { - providerPromises.push(deleteIdentityProvider(provider)); - } - }); - return Promise.all(providerPromises); - }) - .then(() => { - response.send(event, context, response.SUCCESS, {}); - }) - .catch((err) => { - console.log(err.stack); - response.send(event, context, response.FAILED, { err }); - }); + } else { + requestParams = null; } - } catch (err) { - console.log(err.stack); - response.send(event, context, response.FAILED, { err }); } -}; + return requestParams; +} + +async function createIdentityProvider(providerName, hostedUIProviderMeta, hostedUIProviderCreds, userPoolId) { + const requestParams = getRequestParams(providerName, hostedUIProviderMeta, hostedUIProviderCreds, userPoolId); + if (!requestParams) { + return; + } + requestParams.ProviderType = requestParams.ProviderName; + await identity.send(new CreateIdentityProviderCommand(requestParams)); +} + +async function updateIdentityProvider(providerName, hostedUIProviderMeta, hostedUIProviderCreds, userPoolId) { + const requestParams = getRequestParams(providerName, hostedUIProviderMeta, hostedUIProviderCreds, userPoolId); + if (!requestParams) { + return; + } + await identity.send(new UpdateIdentityProviderCommand(requestParams)); +} + +async function deleteIdentityProvider(providerName, userPoolId) { + const params = { ProviderName: providerName, UserPoolId: userPoolId }; + await identity.send(new DeleteIdentityProviderCommand(params)); +} ", }, "Handler": "index.handler", @@ -1321,7 +1147,7 @@ exports.handler = (event, context, callback) => { "Arn", ], }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs18.x", "Timeout": 300, }, "Type": "AWS::Lambda::Function", @@ -1456,9 +1282,6 @@ exports.handler = (event, context, callback) => { "Type": "AWS::IAM::Policy", }, "IdentityPool": { - "DependsOn": [ - "UserPoolClientInputs", - ], "Properties": { "AllowUnauthenticatedIdentities": { "Ref": "allowUnauthenticatedIdentities", @@ -1538,11 +1361,55 @@ exports.handler = (event, context, callback) => { "IdentityPoolRoleMap": { "DependsOn": [ "IdentityPool", + "UserPoolClient", + "UserPoolClientWeb", ], "Properties": { "IdentityPoolId": { "Ref": "IdentityPool", }, + "RoleMappings": { + "UserPoolClientRoleMapping": { + "AmbiguousRoleResolution": "AuthenticatedRole", + "IdentityProvider": { + "Fn::Sub": [ + "cognito-idp.\${region}.amazonaws.com/\${userPool}:\${client}", + { + "client": { + "Ref": "UserPoolClient", + }, + "region": { + "Ref": "AWS::Region", + }, + "userPool": { + "Ref": "UserPool", + }, + }, + ], + }, + "Type": "Token", + }, + "UserPoolWebClientRoleMapping": { + "AmbiguousRoleResolution": "AuthenticatedRole", + "IdentityProvider": { + "Fn::Sub": [ + "cognito-idp.\${region}.amazonaws.com/\${userPool}:\${webClient}", + { + "region": { + "Ref": "AWS::Region", + }, + "userPool": { + "Ref": "UserPool", + }, + "webClient": { + "Ref": "UserPoolClientWeb", + }, + }, + ], + }, + "Type": "Token", + }, + }, "Roles": { "authenticated": { "Ref": "authRoleArn", @@ -1554,197 +1421,6 @@ exports.handler = (event, context, callback) => { }, "Type": "AWS::Cognito::IdentityPoolRoleAttachment", }, - "OAuthCustomResource": { - "DependsOn": [ - "HostedUICustomResourceInputs", - "HostedUIProvidersCustomResourceInputs", - ], - "Properties": { - "Code": { - "ZipFile": "const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - try { - const userPoolId = event.ResourceProperties.userPoolId; - let webClientId = event.ResourceProperties.webClientId; - let nativeClientId = event.ResourceProperties.nativeClientId; - let hostedUIProviderMeta = JSON.parse(event.ResourceProperties.hostedUIProviderMeta); - let oAuthMetadata = JSON.parse(event.ResourceProperties.oAuthMetadata); - let providerList = hostedUIProviderMeta.map((provider) => provider.ProviderName); - providerList.push('COGNITO'); - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - let params = { - UserPoolId: userPoolId, - AllowedOAuthFlows: oAuthMetadata.AllowedOAuthFlows, - AllowedOAuthFlowsUserPoolClient: true, - AllowedOAuthScopes: oAuthMetadata.AllowedOAuthScopes, - CallbackURLs: oAuthMetadata.CallbackURLs, - LogoutURLs: oAuthMetadata.LogoutURLs, - SupportedIdentityProviders: providerList, - }; - console.log(params); - let updateUserPoolClientPromises = []; - params.ClientId = webClientId; - updateUserPoolClientPromises.push(identity.updateUserPoolClient(params).promise()); - params.ClientId = nativeClientId; - updateUserPoolClientPromises.push(identity.updateUserPoolClient(params).promise()); - Promise.all(updateUserPoolClientPromises) - .then(() => { - response.send(event, context, response.SUCCESS, {}); - }) - .catch((err) => { - console.log(err.stack); - response.send(event, context, response.FAILED, { err }); - }); - } - } catch (err) { - console.log(err.stack); - response.send(event, context, response.FAILED, { err }); - } -}; -", - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "UserPoolClientRole", - "Arn", - ], - }, - "Runtime": "nodejs16.x", - "Timeout": 300, - }, - "Type": "AWS::Lambda::Function", - }, - "OAuthCustomResourceInputs": { - "DeletionPolicy": "Delete", - "DependsOn": [ - "OAuthCustomResourceLogPolicy", - ], - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "OAuthCustomResource", - "Arn", - ], - }, - "hostedUIProviderMeta": { - "Ref": "hostedUIProviderMeta", - }, - "nativeClientId": { - "Ref": "UserPoolClient", - }, - "oAuthMetadata": { - "Ref": "oAuthMetadata", - }, - "userPoolId": { - "Ref": "UserPool", - }, - "webClientId": { - "Ref": "UserPoolClientWeb", - }, - }, - "Type": "Custom::LambdaCallout", - "UpdateReplacePolicy": "Delete", - }, - "OAuthCustomResourceLogPolicy": { - "DependsOn": [ - "OAuthCustomResourcePolicy", - ], - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents", - ], - "Effect": "Allow", - "Resource": { - "Fn::Sub": [ - "arn:aws:logs:\${region}:\${account}:log-group:/aws/lambda/\${lambda}:log-stream:*", - { - "account": { - "Ref": "AWS::AccountId", - }, - "lambda": { - "Ref": "OAuthCustomResource", - }, - "region": { - "Ref": "AWS::Region", - }, - }, - ], - }, - }, - ], - "Version": "2012-10-17", - }, - "PolicyName": { - "Fn::Join": [ - "-", - [ - { - "Ref": "UserPool", - }, - "OAuthLogPolicy", - ], - ], - }, - "Roles": [ - { - "Ref": "UserPoolClientRole", - }, - ], - }, - "Type": "AWS::IAM::Policy", - }, - "OAuthCustomResourcePolicy": { - "DependsOn": [ - "OAuthCustomResource", - ], - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "cognito-idp:UpdateUserPoolClient", - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "UserPool", - "Arn", - ], - }, - }, - ], - "Version": "2012-10-17", - }, - "PolicyName": { - "Fn::Join": [ - "-", - [ - { - "Ref": "UserPool", - }, - "OAuth", - ], - ], - }, - "Roles": [ - { - "Ref": "UserPoolClientRole", - }, - ], - }, - "Type": "AWS::IAM::Policy", - }, "SNSRole": { "Properties": { "AssumeRolePolicyDocument": { @@ -1987,19 +1663,44 @@ exports.handler = (event, context, callback) => { }, "UserPoolClient": { "DependsOn": [ + "HostedUIProvidersCustomResourceInputs", "UserPool", ], "Properties": { + "AllowedOAuthFlows": [ + "code", + ], + "AllowedOAuthFlowsUserPoolClient": true, + "AllowedOAuthScopes": [ + "phone", + "email", + "openid", + "profile", + "aws.cognito.signin.user.admin", + ], + "CallbackURLs": [ + "https://localhost:3000/", + ], "ClientName": "extaut87063394_app_client", "GenerateSecret": { "Ref": "userpoolClientGenerateSecret", }, + "LogoutURLs": [ + "https://localhost:3000/", + ], "ReadAttributes": { "Ref": "userpoolClientReadAttributes", }, "RefreshTokenValidity": { "Ref": "userpoolClientRefreshTokenValidity", }, + "SupportedIdentityProviders": [ + "Facebook", + "Google", + "LoginWithAmazon", + "SignInWithApple", + "COGNITO", + ], "TokenValidityUnits": { "RefreshToken": "days", }, @@ -2012,149 +1713,7 @@ exports.handler = (event, context, callback) => { }, "Type": "AWS::Cognito::UserPoolClient", }, - "UserPoolClientInputs": { - "DeletionPolicy": "Delete", - "DependsOn": [ - "UserPoolClientLogPolicy", - ], - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "UserPoolClientLambda", - "Arn", - ], - }, - "clientId": { - "Ref": "UserPoolClient", - }, - "userpoolId": { - "Ref": "UserPool", - }, - }, - "Type": "Custom::LambdaCallout", - "UpdateReplacePolicy": "Delete", - }, - "UserPoolClientLambda": { - "DependsOn": [ - "UserPoolClientRole", - ], - "Properties": { - "Code": { - "ZipFile": "const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - const params = { - ClientId: event.ResourceProperties.clientId, - UserPoolId: event.ResourceProperties.userpoolId, - }; - identity - .describeUserPoolClient(params) - .promise() - .then((res) => { - response.send(event, context, response.SUCCESS, { appSecret: res.UserPoolClient.ClientSecret }); - }) - .catch((err) => { - response.send(event, context, response.FAILED, { err }); - }); - } -}; -", - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "UserPoolClientRole", - "Arn", - ], - }, - "Runtime": "nodejs16.x", - "Timeout": 300, - }, - "Type": "AWS::Lambda::Function", - }, - "UserPoolClientLambdaPolicy": { - "DependsOn": [ - "UserPoolClientLambda", - ], - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "cognito-idp:DescribeUserPoolClient", - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "UserPool", - "Arn", - ], - }, - }, - ], - "Version": "2012-10-17", - }, - "PolicyName": "extaut87063394_userpoolclient_lambda_iam_policy", - "Roles": [ - { - "Ref": "UserPoolClientRole", - }, - ], - }, - "Type": "AWS::IAM::Policy", - }, - "UserPoolClientLogPolicy": { - "DependsOn": [ - "UserPoolClientLambdaPolicy", - ], - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents", - ], - "Effect": "Allow", - "Resource": { - "Fn::Sub": [ - "arn:aws:logs:\${region}:\${account}:log-group:/aws/lambda/\${lambda}:log-stream:*", - { - "account": { - "Ref": "AWS::AccountId", - }, - "lambda": { - "Ref": "UserPoolClientLambda", - }, - "region": { - "Ref": "AWS::Region", - }, - }, - ], - }, - }, - ], - "Version": "2012-10-17", - }, - "PolicyName": "extaut87063394_userpoolclient_lambda_log_policy", - "Roles": [ - { - "Ref": "UserPoolClientRole", - }, - ], - }, - "Type": "AWS::IAM::Policy", - }, "UserPoolClientRole": { - "DependsOn": [ - "UserPoolClient", - ], "Properties": { "AssumeRolePolicyDocument": { "Statement": [ @@ -2206,16 +1765,41 @@ exports.handler = (event, context, callback) => { }, "UserPoolClientWeb": { "DependsOn": [ + "HostedUIProvidersCustomResourceInputs", "UserPool", ], "Properties": { + "AllowedOAuthFlows": [ + "code", + ], + "AllowedOAuthFlowsUserPoolClient": true, + "AllowedOAuthScopes": [ + "phone", + "email", + "openid", + "profile", + "aws.cognito.signin.user.admin", + ], + "CallbackURLs": [ + "https://localhost:3000/", + ], "ClientName": "extaut87063394_app_clientWeb", + "LogoutURLs": [ + "https://localhost:3000/", + ], "ReadAttributes": { "Ref": "userpoolClientReadAttributes", }, "RefreshTokenValidity": { "Ref": "userpoolClientRefreshTokenValidity", }, + "SupportedIdentityProviders": [ + "Facebook", + "Google", + "LoginWithAmazon", + "SignInWithApple", + "COGNITO", + ], "TokenValidityUnits": { "RefreshToken": "days", }, diff --git a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-stack-builder/__snapshots__/user-pool-group-stack-transform.test.ts.snap b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-stack-builder/__snapshots__/user-pool-group-stack-transform.test.ts.snap index f5c4e38ee7d..ad73361a47a 100644 --- a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-stack-builder/__snapshots__/user-pool-group-stack-transform.test.ts.snap +++ b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-stack-builder/__snapshots__/user-pool-group-stack-transform.test.ts.snap @@ -52,213 +52,6 @@ exports[`Check UserPool Group Template Generated userpool group stack template d }, }, "Resources": { - "LambdaCloudWatchPolicy": { - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents", - ], - "Effect": "Allow", - "Resource": { - "Fn::Sub": [ - "arn:aws:logs:\${AWS::Region}:\${AWS::AccountId}:log-group:/aws/lambda/\${lambdaName}:log-stream:*", - { - "lambdaName": { - "Ref": "RoleMapFunction", - }, - }, - ], - }, - }, - ], - "Version": "2012-10-17", - }, - "PolicyName": "UserGroupLogPolicy", - "Roles": [ - { - "Ref": "LambdaExecutionRole", - }, - ], - }, - "Type": "AWS::IAM::Policy", - }, - "LambdaExecutionRole": { - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": [ - "sts:AssumeRole", - ], - "Effect": "Allow", - "Principal": { - "Service": [ - "lambda.amazonaws.com", - ], - }, - }, - ], - "Version": "2012-10-17", - }, - "Policies": [ - { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "cognito-identity:SetIdentityPoolRoles", - "cognito-identity:ListIdentityPools", - "cognito-identity:describeIdentityPool", - ], - "Effect": "Allow", - "Resource": "*", - }, - ], - "Version": "2012-10-17", - }, - "PolicyName": "UserGroupExecutionPolicy", - }, - { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "iam:PassRole", - ], - "Effect": "Allow", - "Resource": [ - { - "Ref": "AuthRoleArn", - }, - { - "Ref": "UnauthRoleArn", - }, - ], - }, - ], - "Version": "2012-10-17", - }, - "PolicyName": "UserGroupPassRolePolicy", - }, - ], - "RoleName": { - "Fn::If": [ - "ShouldNotCreateEnvResources", - "mockResource", - { - "Fn::Join": [ - "", - [ - "mockResource-ExecutionRole-", - { - "Ref": "env", - }, - ], - ], - }, - ], - }, - }, - "Type": "AWS::IAM::Role", - }, - "RoleMapFunction": { - "Properties": { - "Code": { - "ZipFile": "const response = require('cfn-response'); -const AWS = require('aws-sdk'); -exports.handler = (event, context) => { - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, { message: 'Request type delete' }); - } - if (event.RequestType == 'Create' || event.RequestType == 'Update') { - let { identityPoolId, appClientID, appClientIDWeb, userPoolId, region } = event.ResourceProperties; - try { - const cognitoidentity = new AWS.CognitoIdentity(); - let params = { - IdentityPoolId: identityPoolId, - Roles: { - authenticated: event.ResourceProperties.AuthRoleArn, - unauthenticated: event.ResourceProperties.UnauthRoleArn, - }, - RoleMappings: {}, - }; - if (appClientIDWeb) { - params.RoleMappings[\`cognito-idp.\${region}.amazonaws.com/\${userPoolId}:\${appClientIDWeb}\`] = { - Type: 'Token', - AmbiguousRoleResolution: 'AuthenticatedRole', - }; - } - if (appClientID) { - params.RoleMappings[\`cognito-idp.\${region}.amazonaws.com/\${userPoolId}:\${appClientID}\`] = { - Type: 'Token', - AmbiguousRoleResolution: 'AuthenticatedRole', - }; - } - cognitoidentity.setIdentityPoolRoles(params).promise(); - response.send(event, context, response.SUCCESS, { message: 'Successfully updated identity pool.' }); - } catch (err) { - response.send(event, context, response.FAILED, { message: 'Error updating identity pool' }); - } - } -}; -", - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "LambdaExecutionRole", - "Arn", - ], - }, - "Runtime": "nodejs16.x", - "Timeout": 300, - }, - "Type": "AWS::Lambda::Function", - }, - "RoleMapFunctionInput": { - "DeletionPolicy": "Delete", - "DependsOn": [ - "RoleMapFunction", - ], - "Properties": { - "AuthRoleArn": { - "Ref": "AuthRoleArn", - }, - "ServiceToken": { - "Fn::GetAtt": [ - "RoleMapFunction", - "Arn", - ], - }, - "UnauthRoleArn": { - "Ref": "UnauthRoleArn", - }, - "appClientID": { - "Ref": "authmockResourceAppClientID", - }, - "appClientIDWeb": { - "Ref": "authmockResourceAppClientIDWeb", - }, - "env": { - "Ref": "env", - }, - "identityPoolId": { - "Ref": "authmockResourceIdentityPoolId", - }, - "region": { - "Ref": "AWS::Region", - }, - "userPoolId": { - "Ref": "authmockResourceUserPoolId", - }, - }, - "Type": "Custom::LambdaCallout", - "UpdateReplacePolicy": "Delete", - }, "adminGroup": { "Properties": { "Description": "override success", @@ -371,213 +164,6 @@ exports[`Check UserPool Group Template Generated userpool group stack template d }, }, "Resources": { - "LambdaCloudWatchPolicy": { - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents", - ], - "Effect": "Allow", - "Resource": { - "Fn::Sub": [ - "arn:aws:logs:\${AWS::Region}:\${AWS::AccountId}:log-group:/aws/lambda/\${lambdaName}:log-stream:*", - { - "lambdaName": { - "Ref": "RoleMapFunction", - }, - }, - ], - }, - }, - ], - "Version": "2012-10-17", - }, - "PolicyName": "UserGroupLogPolicy", - "Roles": [ - { - "Ref": "LambdaExecutionRole", - }, - ], - }, - "Type": "AWS::IAM::Policy", - }, - "LambdaExecutionRole": { - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": [ - "sts:AssumeRole", - ], - "Effect": "Allow", - "Principal": { - "Service": [ - "lambda.amazonaws.com", - ], - }, - }, - ], - "Version": "2012-10-17", - }, - "Policies": [ - { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "cognito-identity:SetIdentityPoolRoles", - "cognito-identity:ListIdentityPools", - "cognito-identity:describeIdentityPool", - ], - "Effect": "Allow", - "Resource": "*", - }, - ], - "Version": "2012-10-17", - }, - "PolicyName": "UserGroupExecutionPolicy", - }, - { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "iam:PassRole", - ], - "Effect": "Allow", - "Resource": [ - { - "Ref": "AuthRoleArn", - }, - { - "Ref": "UnauthRoleArn", - }, - ], - }, - ], - "Version": "2012-10-17", - }, - "PolicyName": "UserGroupPassRolePolicy", - }, - ], - "RoleName": { - "Fn::If": [ - "ShouldNotCreateEnvResources", - "mockResource", - { - "Fn::Join": [ - "", - [ - "mockResource-ExecutionRole-", - { - "Ref": "env", - }, - ], - ], - }, - ], - }, - }, - "Type": "AWS::IAM::Role", - }, - "RoleMapFunction": { - "Properties": { - "Code": { - "ZipFile": "const response = require('cfn-response'); -const AWS = require('aws-sdk'); -exports.handler = (event, context) => { - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, { message: 'Request type delete' }); - } - if (event.RequestType == 'Create' || event.RequestType == 'Update') { - let { identityPoolId, appClientID, appClientIDWeb, userPoolId, region } = event.ResourceProperties; - try { - const cognitoidentity = new AWS.CognitoIdentity(); - let params = { - IdentityPoolId: identityPoolId, - Roles: { - authenticated: event.ResourceProperties.AuthRoleArn, - unauthenticated: event.ResourceProperties.UnauthRoleArn, - }, - RoleMappings: {}, - }; - if (appClientIDWeb) { - params.RoleMappings[\`cognito-idp.\${region}.amazonaws.com/\${userPoolId}:\${appClientIDWeb}\`] = { - Type: 'Token', - AmbiguousRoleResolution: 'AuthenticatedRole', - }; - } - if (appClientID) { - params.RoleMappings[\`cognito-idp.\${region}.amazonaws.com/\${userPoolId}:\${appClientID}\`] = { - Type: 'Token', - AmbiguousRoleResolution: 'AuthenticatedRole', - }; - } - cognitoidentity.setIdentityPoolRoles(params).promise(); - response.send(event, context, response.SUCCESS, { message: 'Successfully updated identity pool.' }); - } catch (err) { - response.send(event, context, response.FAILED, { message: 'Error updating identity pool' }); - } - } -}; -", - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "LambdaExecutionRole", - "Arn", - ], - }, - "Runtime": "nodejs16.x", - "Timeout": 300, - }, - "Type": "AWS::Lambda::Function", - }, - "RoleMapFunctionInput": { - "DeletionPolicy": "Delete", - "DependsOn": [ - "RoleMapFunction", - ], - "Properties": { - "AuthRoleArn": { - "Ref": "AuthRoleArn", - }, - "ServiceToken": { - "Fn::GetAtt": [ - "RoleMapFunction", - "Arn", - ], - }, - "UnauthRoleArn": { - "Ref": "UnauthRoleArn", - }, - "appClientID": { - "Ref": "authmockResourceAppClientID", - }, - "appClientIDWeb": { - "Ref": "authmockResourceAppClientIDWeb", - }, - "env": { - "Ref": "env", - }, - "identityPoolId": { - "Ref": "authmockResourceIdentityPoolId", - }, - "region": { - "Ref": "AWS::Region", - }, - "userPoolId": { - "Ref": "authmockResourceUserPoolId", - }, - }, - "Type": "Custom::LambdaCallout", - "UpdateReplacePolicy": "Delete", - }, "adminMockGroup": { "Properties": { "Description": "override success", diff --git a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-stack-builder/auth-cognito-stack-builder.test.ts b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-stack-builder/auth-cognito-stack-builder.test.ts index 87d042f8fd8..16d335d64f8 100644 --- a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-stack-builder/auth-cognito-stack-builder.test.ts +++ b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-stack-builder/auth-cognito-stack-builder.test.ts @@ -1,5 +1,4 @@ import * as cdk from 'aws-cdk-lib'; -import * as iam from 'aws-cdk-lib/aws-iam'; import { AmplifyAuthCognitoStack } from '../../../../provider-utils/awscloudformation/auth-stack-builder/auth-cognito-stack-builder'; import { AuthStackSynthesizer } from '../../../../provider-utils/awscloudformation/auth-stack-builder/stack-synthesizer'; import { @@ -71,46 +70,24 @@ describe('generateCognitoStackResources', () => { authProviders: [], }; - it('adds correct custom oauth lambda dependencies', () => { - const testApp = new cdk.App(); - const cognitoStack = new AmplifyAuthCognitoStack(testApp, 'testCognitoStack', { synthesizer: new AuthStackSynthesizer() }); - cognitoStack.userPoolClientRole = new iam.CfnRole(cognitoStack, 'testRole', { - assumeRolePolicyDocument: 'test policy document', - }); - cognitoStack.createHostedUICustomResource(); - cognitoStack.createHostedUIProviderCustomResource(); - cognitoStack.createOAuthCustomResource(); - expect(cognitoStack.oAuthCustomResource).toBeDefined(); - expect( - cognitoStack - .oAuthCustomResource!.node!.dependencies!.map((dep: any) => dep.logicalId) - .map((logicalIdToken) => /testCognitoStack\.([^.]+)\.Default/.exec(logicalIdToken)![1]), - ).toMatchInlineSnapshot(` -[ - "HostedUICustomResourceInputs", - "HostedUIProvidersCustomResourceInputs", -] -`); - }); - - it('adds correct preSignUp lambda config and permissions', () => { + it('adds correct preSignUp lambda config and permissions', async () => { const testApp = new cdk.App(); const cognitoStack = new AmplifyAuthCognitoStack(testApp, 'CognitoPreSignUpTriggerTest', { synthesizer: new AuthStackSynthesizer() }); - cognitoStack.generateCognitoStackResources(props); + await cognitoStack.generateCognitoStackResources(props); expect(cognitoStack.userPool?.lambdaConfig).toHaveProperty('preSignUp'); expect(cognitoStack.lambdaConfigPermissions).toHaveProperty('UserPoolPreSignupLambdaInvokePermission'); }); - it('disables updateAttributeSetting when autoVerified attributes not present', () => { + it('disables updateAttributeSetting when autoVerified attributes not present', async () => { const testApp = new cdk.App(); const cognitoStack = new AmplifyAuthCognitoStack(testApp, 'CognitoPreSignUpTriggerTest', { synthesizer: new AuthStackSynthesizer() }); const updatedProps = { ...props }; delete updatedProps.autoVerifiedAttributes; - cognitoStack.generateCognitoStackResources(updatedProps); + await cognitoStack.generateCognitoStackResources(updatedProps); expect(cognitoStack.userPool?.userAttributeUpdateSettings).toBeUndefined(); }); - it('correctly adds updateAttributeSetting when autoVerifiedAttributes attributes is TOTP', () => { + it('correctly adds updateAttributeSetting when autoVerifiedAttributes attributes is TOTP', async () => { const testApp = new cdk.App(); // eslint-disable-next-line spellcheck/spell-checker const cognitoStack = new AmplifyAuthCognitoStack(testApp, 'CognitoUpdateAttributesettingTest', { @@ -120,7 +97,7 @@ describe('generateCognitoStackResources', () => { ...props, userAutoVerifiedAttributeUpdateSettings: [AttributeType.PHONE_NUMBER], }; - cognitoStack.generateCognitoStackResources(updatedProps); + await cognitoStack.generateCognitoStackResources(updatedProps); expect(cognitoStack.userPool?.userAttributeUpdateSettings).toMatchInlineSnapshot(` { "attributesRequireVerificationBeforeUpdate": [ @@ -130,7 +107,7 @@ describe('generateCognitoStackResources', () => { `); }); - it('correctly adds updateAttributeSetting when autoVerifiedAttributes attributes is email', () => { + it('correctly adds updateAttributeSetting when autoVerifiedAttributes attributes is email', async () => { const testApp = new cdk.App(); // eslint-disable-next-line spellcheck/spell-checker const cognitoStack = new AmplifyAuthCognitoStack(testApp, 'CognitoUpdateAttributesettingTesting1', { @@ -140,7 +117,7 @@ describe('generateCognitoStackResources', () => { ...props, userAutoVerifiedAttributeUpdateSettings: [AttributeType.EMAIL], }; - cognitoStack.generateCognitoStackResources(updatedProps); + await cognitoStack.generateCognitoStackResources(updatedProps); expect(cognitoStack.userPool?.userAttributeUpdateSettings).toMatchInlineSnapshot(` { "attributesRequireVerificationBeforeUpdate": [ @@ -153,4 +130,27 @@ describe('generateCognitoStackResources', () => { expect(cognitoStack.userPoolClient!.tokenValidityUnits).toHaveProperty('refreshToken'); expect(cognitoStack.lambdaConfigPermissions).toHaveProperty('UserPoolPreSignupLambdaInvokePermission'); }); + + it('correctly adds oauth properties on userpool client when oauthMetaData is defined', async () => { + const testApp = new cdk.App(); + // eslint-disable-next-line spellcheck/spell-checker + const cognitoStack = new AmplifyAuthCognitoStack(testApp, 'CognitoUpdateAttributesettingTesting1', { + synthesizer: new AuthStackSynthesizer(), + }); + const updatedProps: CognitoStackOptions = { + ...props, + oAuthMetadata: + '{"AllowedOAuthFlows":["code"],"AllowedOAuthScopes":["phone","email","openid","profile","aws.cognito.signin.user.admin"],"CallbackURLs":["https://localhost:3000/"]}', + }; + await cognitoStack.generateCognitoStackResources(updatedProps); + expect(cognitoStack.userPoolClientWeb).toHaveProperty('allowedOAuthFlows'); + expect(cognitoStack.userPoolClientWeb).toHaveProperty('allowedOAuthScopes'); + expect(cognitoStack.userPoolClientWeb).toHaveProperty('callbackUrLs'); + expect(cognitoStack.userPoolClientWeb).toHaveProperty('logoutUrLs'); + + expect(cognitoStack.userPoolClient).toHaveProperty('allowedOAuthFlows'); + expect(cognitoStack.userPoolClient).toHaveProperty('allowedOAuthScopes'); + expect(cognitoStack.userPoolClient).toHaveProperty('callbackUrLs'); + expect(cognitoStack.userPoolClient).toHaveProperty('logoutUrLs'); + }); }); diff --git a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-stack-builder/auth-stack-transform.test.ts b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-stack-builder/auth-stack-transform.test.ts index 3024fca9a95..f9f409e2b83 100644 --- a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-stack-builder/auth-stack-transform.test.ts +++ b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/auth-stack-builder/auth-stack-transform.test.ts @@ -273,4 +273,60 @@ describe('Check Auth Template', () => { ); expect(process.exit).toBeCalledTimes(1); }); + + it('should include oauth settings in cfn when enabled oauth', async () => { + getCLIInputPayload_mock.mockReset(); + getCLIInputPayload_mock.mockReturnValue({ + cognitoConfig: { + ...inputPayload1.cognitoConfig, + oAuthMetadata: + '{"AllowedOAuthFlows":["code"],"AllowedOAuthScopes":["phone","email","openid","profile","aws.cognito.signin.user.admin"],"CallbackURLs":["https://localhost:3000/"]}', + }, + }); + + const resourceName = 'mockResource'; + const authTransform = new AmplifyAuthTransform(resourceName); + const mock_template = await authTransform.transform(context_stub_typed); + expect(mock_template.Resources?.UserPoolClient.Properties.AllowedOAuthFlows).toMatchInlineSnapshot(` + [ + "code", + ] + `); + expect(mock_template.Resources?.UserPoolClient.Properties.AllowedOAuthScopes).toMatchInlineSnapshot(` + [ + "phone", + "email", + "openid", + "profile", + "aws.cognito.signin.user.admin", + ] + `); + expect(mock_template.Resources?.UserPoolClient.Properties.CallbackURLs).toMatchInlineSnapshot(` + [ + "https://localhost:3000/", + ] + `); + expect(mock_template.Resources?.UserPoolClient.Properties.LogoutURLs).toMatchInlineSnapshot(`undefined`); + + expect(mock_template.Resources?.UserPoolClientWeb.Properties.AllowedOAuthFlows).toMatchInlineSnapshot(` + [ + "code", + ] + `); + expect(mock_template.Resources?.UserPoolClientWeb.Properties.AllowedOAuthScopes).toMatchInlineSnapshot(` + [ + "phone", + "email", + "openid", + "profile", + "aws.cognito.signin.user.admin", + ] + `); + expect(mock_template.Resources?.UserPoolClientWeb.Properties.CallbackURLs).toMatchInlineSnapshot(` + [ + "https://localhost:3000/", + ] + `); + expect(mock_template.Resources?.UserPoolClientWeb.Properties.LogoutURLs).toMatchInlineSnapshot(`undefined`); + }); }); diff --git a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/index.test.ts b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/index.test.ts index 8138ad126ab..9913becafa5 100644 --- a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/index.test.ts +++ b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/index.test.ts @@ -29,7 +29,7 @@ const pluginInstance = { const getOAuthObjectFromCognitoMock = getOAuthObjectFromCognito as jest.MockedFunction; // mock context -let mockContext = { +const mockContext = { amplify: { getProjectConfig: jest.fn().mockReturnValue({ projectName: 'authHeadless', @@ -67,7 +67,7 @@ let mockContext = { describe('import checks', () => { test('throws amplify error when auth headless params are missing during pull', async () => { - expect(() => updateConfigOnEnvInit(mockContext, 'auth', 'Cognito')).rejects.toThrowErrorMatchingInlineSnapshot( + await expect(() => updateConfigOnEnvInit(mockContext, 'auth', 'Cognito')).rejects.toThrowErrorMatchingInlineSnapshot( `"auth headless is missing the following inputParameters facebookAppIdUserPool, facebookAppSecretUserPool, loginwithamazonAppIdUserPool, loginwithamazonAppSecretUserPool, googleAppIdUserPool, googleAppSecretUserPool"`, ); }); @@ -77,7 +77,7 @@ describe('update config when amplify pull headless command', () => { test('throws amplify error when auth headless params are missing during pull', async () => { mockContext.input.command = 'pull'; getOAuthObjectFromCognitoMock.mockResolvedValue(undefined); - expect(() => updateConfigOnEnvInit(mockContext, 'auth', 'Cognito')).rejects.toThrowErrorMatchingInlineSnapshot( + await expect(() => updateConfigOnEnvInit(mockContext, 'auth', 'Cognito')).rejects.toThrowErrorMatchingInlineSnapshot( `"auth headless is missing the following inputParameters facebookAppIdUserPool, facebookAppSecretUserPool, loginwithamazonAppIdUserPool, loginwithamazonAppSecretUserPool, googleAppIdUserPool, googleAppSecretUserPool"`, ); }); diff --git a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/__snapshots__/generate-auth-trigger-template.test.ts.snap b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/__snapshots__/generate-auth-trigger-template.test.ts.snap index f6af9816029..9927083f0ae 100644 --- a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/__snapshots__/generate-auth-trigger-template.test.ts.snap +++ b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/__snapshots__/generate-auth-trigger-template.test.ts.snap @@ -115,78 +115,78 @@ exports[`generateNestedAuthTriggerTemplate adds "authTriggerFn" as a dependency "Properties": { "Code": { "ZipFile": "const response = require('cfn-response'); -const aws = require('aws-sdk'); +const { + CognitoIdentityProviderClient, + DescribeUserPoolCommand, + UpdateUserPoolCommand, +} = require('@aws-sdk/client-cognito-identity-provider'); -exports.handler = async function (event, context) { +exports.handler = (event, context) => { + // Don't return promise, response.send() marks context as done internally + void tryHandleEvent(event, context); +}; + +async function tryHandleEvent(event, context) { const physicalResourceId = event.RequestType === 'Update' ? event.PhysicalResourceId : \`\${event.LogicalResourceId}-\${event.ResourceProperties.userpoolId}\`; - try { - const userPoolId = event.ResourceProperties.userpoolId; - const { lambdaConfig } = event.ResourceProperties; - const config = {}; - const cognitoClient = new aws.CognitoIdentityServiceProvider(); - const userPoolConfig = await cognitoClient.describeUserPool({ UserPoolId: userPoolId }).promise(); - const userPoolParams = userPoolConfig.UserPool; - // update userPool params + await handleEvent(event); + response.send(event, context, response.SUCCESS, {}, physicalResourceId); + } catch (err) { + console.log(err.stack); + response.send(event, context, response.FAILED, { err }, physicalResourceId); + } +} - const updateUserPoolConfig = { - UserPoolId: userPoolParams.Id, - Policies: userPoolParams.Policies, - SmsVerificationMessage: userPoolParams.SmsVerificationMessage, - AccountRecoverySetting: userPoolParams.AccountRecoverySetting, - AdminCreateUserConfig: userPoolParams.AdminCreateUserConfig, - AutoVerifiedAttributes: userPoolParams.AutoVerifiedAttributes, - EmailConfiguration: userPoolParams.EmailConfiguration, - EmailVerificationMessage: userPoolParams.EmailVerificationMessage, - EmailVerificationSubject: userPoolParams.EmailVerificationSubject, - VerificationMessageTemplate: userPoolParams.VerificationMessageTemplate, - SmsAuthenticationMessage: userPoolParams.SmsAuthenticationMessage, - MfaConfiguration: userPoolParams.MfaConfiguration, - DeviceConfiguration: userPoolParams.DeviceConfiguration, - SmsConfiguration: userPoolParams.SmsConfiguration, - UserPoolTags: userPoolParams.UserPoolTags, - UserPoolAddOns: userPoolParams.UserPoolAddOns, - }; +async function handleEvent(event) { + const userPoolId = event.ResourceProperties.userpoolId; + const { lambdaConfig } = event.ResourceProperties; + const config = {}; + const cognitoClient = new CognitoIdentityProviderClient({}); + const userPoolConfig = await cognitoClient.send(new DescribeUserPoolCommand({ UserPoolId: userPoolId })); + const userPoolParams = userPoolConfig.UserPool; + // update userPool params - // removing undefined keys - Object.keys(updateUserPoolConfig).forEach((key) => updateUserPoolConfig[key] === undefined && delete updateUserPoolConfig[key]); + const updateUserPoolConfig = { + UserPoolId: userPoolParams.Id, + Policies: userPoolParams.Policies, + SmsVerificationMessage: userPoolParams.SmsVerificationMessage, + AccountRecoverySetting: userPoolParams.AccountRecoverySetting, + AdminCreateUserConfig: userPoolParams.AdminCreateUserConfig, + AutoVerifiedAttributes: userPoolParams.AutoVerifiedAttributes, + EmailConfiguration: userPoolParams.EmailConfiguration, + EmailVerificationMessage: userPoolParams.EmailVerificationMessage, + EmailVerificationSubject: userPoolParams.EmailVerificationSubject, + VerificationMessageTemplate: userPoolParams.VerificationMessageTemplate, + SmsAuthenticationMessage: userPoolParams.SmsAuthenticationMessage, + MfaConfiguration: userPoolParams.MfaConfiguration, + DeviceConfiguration: userPoolParams.DeviceConfiguration, + SmsConfiguration: userPoolParams.SmsConfiguration, + UserPoolTags: userPoolParams.UserPoolTags, + UserPoolAddOns: userPoolParams.UserPoolAddOns, + }; - /* removing UnusedAccountValidityDays as deprecated + // removing undefined keys + Object.keys(updateUserPoolConfig).forEach((key) => updateUserPoolConfig[key] === undefined && delete updateUserPoolConfig[key]); + + /* removing UnusedAccountValidityDays as deprecated InvalidParameterException: Please use TemporaryPasswordValidityDays in PasswordPolicy instead of UnusedAccountValidityDays */ - if (updateUserPoolConfig.AdminCreateUserConfig && updateUserPoolConfig.AdminCreateUserConfig.UnusedAccountValidityDays) { - delete updateUserPoolConfig.AdminCreateUserConfig.UnusedAccountValidityDays; - } - lambdaConfig.forEach((lambda) => (config[\`\${lambda.triggerType}\`] = lambda.lambdaFunctionArn)); - if (event.RequestType === 'Delete') { - try { - updateUserPoolConfig.LambdaConfig = {}; - console.log(\`\${event.RequestType}:\`, JSON.stringify(updateUserPoolConfig)); - const result = await cognitoClient.updateUserPool(updateUserPoolConfig).promise(); - console.log(\`delete response data \${JSON.stringify(result)}\`); - await response.send(event, context, response.SUCCESS, {}, physicalResourceId); - } catch (err) { - console.log(err.stack); - await response.send(event, context, response.FAILED, { err }, physicalResourceId); - } - } - if (event.RequestType === 'Update' || event.RequestType === 'Create') { - updateUserPoolConfig.LambdaConfig = config; - try { - const result = await cognitoClient.updateUserPool(updateUserPoolConfig).promise(); - console.log(\`createOrUpdate response data \${JSON.stringify(result)}\`); - await response.send(event, context, response.SUCCESS, {}, physicalResourceId); - } catch (err) { - console.log(err.stack); - await response.send(event, context, response.FAILED, { err }, physicalResourceId); - } - } - } catch (err) { - console.log(err.stack); - await response.send(event, context, response.FAILED, { err }, physicalResourceId); + if (updateUserPoolConfig.AdminCreateUserConfig && updateUserPoolConfig.AdminCreateUserConfig.UnusedAccountValidityDays) { + delete updateUserPoolConfig.AdminCreateUserConfig.UnusedAccountValidityDays; } -}; + lambdaConfig.forEach((lambda) => (config[\`\${lambda.triggerType}\`] = lambda.lambdaFunctionArn)); + if (event.RequestType === 'Delete') { + updateUserPoolConfig.LambdaConfig = {}; + console.log(\`\${event.RequestType}:\`, JSON.stringify(updateUserPoolConfig)); + const result = await cognitoClient.send(new UpdateUserPoolCommand(updateUserPoolConfig)); + console.log(\`delete response data \${JSON.stringify(result)}\`); + } else if (event.RequestType === 'Update' || event.RequestType === 'Create') { + updateUserPoolConfig.LambdaConfig = config; + const result = await cognitoClient.send(new UpdateUserPoolCommand(updateUserPoolConfig)); + console.log(\`createOrUpdate response data \${JSON.stringify(result)}\`); + } +} ", }, "Handler": "index.handler", @@ -196,7 +196,7 @@ exports.handler = async function (event, context) { "Arn", ], }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs18.x", }, "Type": "AWS::Lambda::Function", }, diff --git a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/auth-defaults-appliers.test.ts b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/auth-defaults-appliers.test.ts index 23f79608c13..9cdb37f50d7 100644 --- a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/auth-defaults-appliers.test.ts +++ b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/auth-defaults-appliers.test.ts @@ -23,10 +23,8 @@ jest.mock('@aws-amplify/amplify-cli-core', () => { return { ...(jest.requireActual('@aws-amplify/amplify-cli-core') as {}), FeatureFlags: { - getBoolean: jest.fn().mockImplementation((name, defaultValue) => { - if (name === 'auth.enableCaseInsensitivity') { - return true; - } + getBoolean: jest.fn().mockImplementation((name) => { + return name === 'auth.enableCaseInsensitivity'; }), getNumber: jest.fn(), getObject: jest.fn(), diff --git a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/check-for-auth-migration.test.ts b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/check-for-auth-migration.test.ts index 71a9d7426ce..9735a47fb25 100644 --- a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/check-for-auth-migration.test.ts +++ b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/check-for-auth-migration.test.ts @@ -1,6 +1,6 @@ import { migrateResourceToSupportOverride } from '../../../../provider-utils/awscloudformation/utils/migrate-override-resource'; import { generateAuthStackTemplate } from '../../../../provider-utils/awscloudformation/utils/generate-auth-stack-template'; -import { $TSContext, generateOverrideSkeleton } from '@aws-amplify/amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; import { AuthInputState } from '../../../../provider-utils/awscloudformation/auth-inputs-manager/auth-input-state'; import { checkAuthResourceMigration } from '../../../../provider-utils/awscloudformation/utils/check-for-auth-migration'; diff --git a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/generate-auth-trigger-template.test.ts b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/generate-auth-trigger-template.test.ts index 1f7b4cf98c0..850164cd7b1 100644 --- a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/generate-auth-trigger-template.test.ts +++ b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/generate-auth-trigger-template.test.ts @@ -1,10 +1,11 @@ +import { getPermissionsBoundaryArn } from '@aws-amplify/amplify-cli-core'; import { AuthTriggerConnection, AuthTriggerPermissions, TriggerType, } from '../../../../provider-utils/awscloudformation/service-walkthrough-types/cognito-user-input-types'; import { createCustomResourceForAuthTrigger } from '../../../../provider-utils/awscloudformation/utils/generate-auth-trigger-template'; - +jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('uuid'); describe('generate Auth Trigger Template', () => { it('successfully generate IAM policies when permissions are defined', async () => { @@ -78,6 +79,44 @@ describe('generate Auth Trigger Template', () => { "Type": "AWS::IAM::Policy", } `); + // No permissions boundary set if not available + expect(cfn.Resources.authTriggerFnServiceRole08093B67.Properties.PermissionsBoundary).toBeUndefined(); + }); + + it('adds permissions boundary to new role if available', async () => { + // Setup for a successfully generating custom resource. + const mockAuthTriggerConnections: AuthTriggerConnection[] = [ + { + lambdaFunctionName: 'randomFn', + triggerType: TriggerType.PostConfirmation, + lambdaFunctionArn: 'randomArn', + }, + ]; + const mockAuthTriggerPermissions: AuthTriggerPermissions[] = [ + { + policyName: 'AddToGroupCognito', + trigger: 'PostConfirmation', + effect: 'Allow', + actions: ['cognito-idp:AdminAddUserToGroup', 'cognito-idp:GetGroup', 'cognito-idp:CreateGroup'], + resource: { + paramType: '!GetAtt', + keys: ['UserPool', 'Arn'], + }, + }, + ]; + + // ensure permissions boundary is set + const getPermissionsBoundaryArn_mock = getPermissionsBoundaryArn as jest.MockedFunction; + getPermissionsBoundaryArn_mock.mockReturnValue('testPermissionsBoundaryArn'); + + // execute the test + const cfn = await createCustomResourceForAuthTrigger(mockAuthTriggerConnections, false, mockAuthTriggerPermissions); + + //validate + expect(cfn.Resources.authTriggerFnServiceRole08093B67.Properties.PermissionsBoundary).toStrictEqual('testPermissionsBoundaryArn'); + + // Restore for other folks + getPermissionsBoundaryArn_mock.mockRestore(); }); it('does not generate iam policies for Auth trigger when permissions are empty', async () => { diff --git a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/generate-cognito-app-client-secret.test.ts b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/generate-cognito-app-client-secret.test.ts new file mode 100644 index 00000000000..04e26beac5c --- /dev/null +++ b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/generate-cognito-app-client-secret.test.ts @@ -0,0 +1,108 @@ +import { $TSContext, stateManager, pathManager } from '@aws-amplify/amplify-cli-core'; +import { updateAppClientWithGeneratedSecret } from '../../../../provider-utils/awscloudformation/utils/generate-cognito-app-client-secret'; +import { projectHasAuth } from '../../../../provider-utils/awscloudformation/utils/project-has-auth'; +import { getAuthResourceName } from '../../../../utils/getAuthResourceName'; +import { getAppClientSecret } from '../../../../provider-utils/awscloudformation/utils/get-app-client-secret-sdk'; + +jest.mock('@aws-amplify/amplify-cli-core'); +jest.mock('../../../../provider-utils/awscloudformation/utils/project-has-auth'); +jest.mock('../../../../utils/getAuthResourceName'); +jest.mock('../../../../provider-utils/awscloudformation/utils/get-app-client-secret-sdk'); + +const stateManagerMock = stateManager as jest.Mocked; +const pathManagerMock = pathManager as jest.Mocked; +const projectHasAuthMock = projectHasAuth as jest.MockedFunction; +const getAuthResourceNameMock = getAuthResourceName as jest.MockedFunction; +const getAppClientSecretMock = getAppClientSecret as jest.MockedFunction; + +pathManagerMock.getBackendDirPath.mockReturnValue('mockBackendPath'); +projectHasAuthMock.mockReturnValue(true); +getAuthResourceNameMock.mockResolvedValue('mockResource'); +const contextStub = { + amplify: { + getImportedAuthProperties: jest.fn().mockResolvedValue({ imported: false }), + updateamplifyMetaAfterResourceUpdate: jest.fn(), + }, +}; +describe('test auth trigger stack Parameters', () => { + it('test case 1 - appClientSecret doesnt get updated when sdk returns undefined ', async () => { + jest.clearAllMocks(); + stateManagerMock.getMeta.mockReturnValue({ + auth: { + mockResource: { + output: { + AppClientID: 'mockClientId', + UserPoolId: 'mockUserpoolId', + }, + }, + }, + }); + getAppClientSecretMock.mockResolvedValue(undefined); + await updateAppClientWithGeneratedSecret(contextStub as unknown as $TSContext); + expect(contextStub.amplify.updateamplifyMetaAfterResourceUpdate.mock.calls).toMatchInlineSnapshot(`[]`); + }); + + it('test case 2 - appClientSecret updates successfully ', async () => { + jest.clearAllMocks(); + stateManagerMock.getMeta.mockReturnValue({ + auth: { + mockResource: { + output: { + AppClientID: 'mockClientId', + UserPoolId: 'mockUserpoolId', + AmazonWebClient: 'mockAmazonWebClient', + FacebookWebClient: 'mockFacebookWebClient', + GoogleWebClient: 'mockGoogleWebClient', + AppleWebClient: 'mockAppleWebClient', + HostedUIDomain: 'mockHostedUIDomain', + OAuthMetadata: 'mockOAuthMetadata', + }, + }, + }, + }); + getAppClientSecretMock.mockResolvedValue('mockAppClientSecret'); + await updateAppClientWithGeneratedSecret(contextStub as unknown as $TSContext); + expect(contextStub.amplify.updateamplifyMetaAfterResourceUpdate.mock.calls).toMatchInlineSnapshot(` + [ + [ + "auth", + "mockResource", + "output", + { + "AmazonWebClient": "mockAmazonWebClient", + "AppClientID": "mockClientId", + "AppClientSecret": "mockAppClientSecret", + "AppleWebClient": "mockAppleWebClient", + "FacebookWebClient": "mockFacebookWebClient", + "GoogleWebClient": "mockGoogleWebClient", + "HostedUIDomain": "mockHostedUIDomain", + "OAuthMetadata": "mockOAuthMetadata", + "UserPoolId": "mockUserpoolId", + }, + ], + ] + `); + }); + + it('test case 3 - throws error when getAppClientSecret call fails ', async () => { + jest.clearAllMocks(); + stateManagerMock.getMeta.mockReturnValue({ + auth: { + mockResource: { + output: { + AppClientID: 'mockClientId', + UserPoolId: 'mockUserpoolId', + }, + }, + }, + }); + getAppClientSecretMock.mockRejectedValue('error fetching app client secret'); + try { + await updateAppClientWithGeneratedSecret(contextStub as unknown as $TSContext); + } catch (err) { + console.log(err); + expect(err).toMatchInlineSnapshot(`"error fetching app client secret"`); + expect(contextStub.amplify.updateamplifyMetaAfterResourceUpdate.mock.calls).toMatchInlineSnapshot(`[]`); + } + }); +}); diff --git a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/migrate-override-resource.test.ts b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/migrate-override-resource.test.ts index 21edda163db..f883f14bc0a 100644 --- a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/migrate-override-resource.test.ts +++ b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/migrate-override-resource.test.ts @@ -83,7 +83,7 @@ jest.mock('@aws-amplify/amplify-cli-core', () => ({ })); test('migrate resource', async () => { const resourceName = 'mockResource'; - migrateResourceToSupportOverride(resourceName); + await migrateResourceToSupportOverride(resourceName); const expectedPath = path.join('mockProjectPath', 'cli-inputs.json'); const expectedPayload = { version: '1', diff --git a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/synthesize-resources.test.ts b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/synthesize-resources.test.ts index 89a70486b6c..e58ef9f44fc 100644 --- a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/synthesize-resources.test.ts +++ b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/synthesize-resources.test.ts @@ -2,7 +2,6 @@ import { $TSAny, $TSContext, AmplifyCategories, JSONUtilities, pathManager } fro import { UserPoolGroupMetadata } from '../../../../provider-utils/awscloudformation/auth-stack-builder'; import { updateUserPoolGroups } from '../../../../provider-utils/awscloudformation/utils/synthesize-resources'; import { createAdminAuthFunction } from '../../../../provider-utils/awscloudformation/utils/synthesize-resources'; -import * as path from 'path'; jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('fs-extra'); diff --git a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/trigger-flow-auth-helper.test.js b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/trigger-flow-auth-helper.test.js index 677a2a80c0d..451af93b026 100644 --- a/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/trigger-flow-auth-helper.test.js +++ b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/trigger-flow-auth-helper.test.js @@ -1,9 +1,7 @@ jest.mock('@aws-amplify/amplify-cli-core', () => { return { FeatureFlags: { - getBoolean: jest.fn().mockImplementation((name, defaultValue) => { - return true; - }), + getBoolean: jest.fn().mockReturnValue(true), }, }; }); diff --git a/packages/amplify-category-auth/src/commands/auth/remove.ts b/packages/amplify-category-auth/src/commands/auth/remove.ts index 1eb1db48ff3..a438cafacab 100644 --- a/packages/amplify-category-auth/src/commands/auth/remove.ts +++ b/packages/amplify-category-auth/src/commands/auth/remove.ts @@ -27,20 +27,13 @@ export const run = async (context: $TSContext): Promise => { (resourceKey) => meta.auth[resourceKey].service === AmplifySupportedService.COGNITO, ); - try { - const resource = await amplify.removeResource(context, category, resourceName); - if (resource?.service === AmplifySupportedService.COGNITOUSERPOOLGROUPS) { - // update cli input here - const cliState = new AuthInputState(context, authResourceName[0]); - const cliInputPayload = cliState.getCLIInputPayload(); - cliInputPayload.cognitoConfig.userPoolGroupList = []; - await cliState.saveCLIInputPayload(cliInputPayload); - } - } catch (err) { - printer.info(err.stack); - printer.error('There was an error removing the auth resource'); - void context.usageData.emitError(err); - process.exitCode = 1; + const resource = await amplify.removeResource(context, category, resourceName); + if (resource?.service === AmplifySupportedService.COGNITOUSERPOOLGROUPS) { + // update cli input here + const cliState = new AuthInputState(context, authResourceName[0]); + const cliInputPayload = cliState.getCLIInputPayload(); + cliInputPayload.cognitoConfig.userPoolGroupList = []; + await cliState.saveCLIInputPayload(cliInputPayload); } }; diff --git a/packages/amplify-category-auth/src/index.js b/packages/amplify-category-auth/src/index.js index 0fbe5952d12..16b9e96920d 100644 --- a/packages/amplify-category-auth/src/index.js +++ b/packages/amplify-category-auth/src/index.js @@ -40,6 +40,7 @@ const { privateKeys } = require('./provider-utils/awscloudformation/constants'); const { checkAuthResourceMigration } = require('./provider-utils/awscloudformation/utils/check-for-auth-migration'); const { run: authRunPush } = require('./commands/auth/push'); const { getAuthTriggerStackCfnParameters } = require('./provider-utils/awscloudformation/utils/get-auth-trigger-stack-cfn-parameters'); +const { updateAppClientWithGeneratedSecret } = require('./provider-utils/awscloudformation/utils/generate-cognito-app-client-secret'); const { prePushHandler } = require('./events/prePushHandler'); // this function is being kept for temporary compatability. @@ -575,6 +576,7 @@ module.exports = { transformCategoryStack, authPluginAPIPush: authPushYes, getAuthTriggerStackCfnParameters, + updateAppClientWithGeneratedSecret, }; // force major version bump for cdk v2 diff --git a/packages/amplify-category-auth/src/provider-utils/awscloudformation/auth-stack-builder/auth-cognito-stack-builder.ts b/packages/amplify-category-auth/src/provider-utils/awscloudformation/auth-stack-builder/auth-cognito-stack-builder.ts index 1d2b800d717..a0a8d4ed8fe 100644 --- a/packages/amplify-category-auth/src/provider-utils/awscloudformation/auth-stack-builder/auth-cognito-stack-builder.ts +++ b/packages/amplify-category-auth/src/provider-utils/awscloudformation/auth-stack-builder/auth-cognito-stack-builder.ts @@ -8,16 +8,10 @@ import { $TSAny, JSONUtilities } from '@aws-amplify/amplify-cli-core'; import * as fs from 'fs-extra'; import _ from 'lodash'; import { Construct } from 'constructs'; -import { - hostedUILambdaFilePath, - hostedUIProviderLambdaFilePath, - mfaLambdaFilePath, - oauthLambdaFilePath, - openIdLambdaFilePath, - userPoolClientLambdaFilePath, -} from '../constants'; +import { hostedUILambdaFilePath, hostedUIProviderLambdaFilePath, mfaLambdaFilePath, openIdLambdaFilePath } from '../constants'; import { CognitoStackOptions } from '../service-walkthrough-types/cognito-user-input-types'; import { configureSmsOption } from '../utils/configure-sms'; +import { OAuthMetaData } from './types'; const CFN_TEMPLATE_FORMAT_VERSION = '2010-09-09'; const ROOT_CFN_DESCRIPTION = 'Amplify Cognito Stack for AWS Amplify CLI'; @@ -68,12 +62,8 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog identityPoolRoleMap: cognito.CfnIdentityPoolRoleAttachment | undefined; lambdaConfigPermissions?: Record; lambdaTriggerPermissions?: Record; - // custom resources userPoolClient - userPoolClientLambda?: lambda.CfnFunction; + // provides base role for deleting custom resource lambdas that are no longer needed after the migration userPoolClientRole?: iam.CfnRole; - userPoolClientLambdaPolicy?: iam.CfnPolicy; - userPoolClientLogPolicy?: iam.CfnPolicy; - userPoolClientInputs?: cdk.CustomResource; // custom resources HostedUI hostedUICustomResource?: lambda.CfnFunction; hostedUICustomResourcePolicy?: iam.CfnPolicy; @@ -84,11 +74,6 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog hostedUIProvidersCustomResourcePolicy?: iam.CfnPolicy; hostedUIProvidersCustomResourceLogPolicy?: iam.CfnPolicy; hostedUIProvidersCustomResourceInputs?: cdk.CustomResource; - // custom resource OAUTH Provider - oAuthCustomResource?: lambda.CfnFunction; - oAuthCustomResourcePolicy?: iam.CfnPolicy; - oAuthCustomResourceLogPolicy?: iam.CfnPolicy; - oAuthCustomResourceInputs?: cdk.CustomResource; // custom resource MFA mfaLambda?: lambda.CfnFunction; mfaLogPolicy?: iam.CfnPolicy; @@ -323,7 +308,7 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog } if (!props.breakCircularDependency && props.triggers && props.dependsOn) { - props.dependsOn!.forEach((trigger) => { + props.dependsOn?.forEach((trigger) => { if (trigger.resourceName.includes('CreateAuthChallenge')) { this.userPool!.lambdaConfig = { createAuthChallenge: cdk.Fn.ref(`function${props.resourceName}${'CreateAuthChallenge'}Arn`), @@ -409,7 +394,7 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog if (configureSMS) { this.userPool.enabledMfas = ['SMS_MFA']; } - if (!_.isEmpty(props.mfaTypes) && props.mfaTypes!.includes('TOTP')) { + if (!_.isEmpty(props.mfaTypes) && props.mfaTypes?.includes('TOTP')) { this.userPool.enabledMfas = [...(this.userPool.enabledMfas || []), 'SOFTWARE_TOKEN_MFA']; } } @@ -481,16 +466,19 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog this.userPoolClient.generateSecret = cdk.Fn.ref('userpoolClientGenerateSecret') as unknown as boolean; this.userPoolClient.addDependency(this.userPool); - this.createUserPoolClientCustomResource(props); + this.createBaseLambdaRole(props); + + if (props.oAuthMetadata) { + this.updateUserPoolClientWithOAuthSettings(props); + } + if (props.hostedUIDomainName) { this.createHostedUICustomResource(); } if (props.hostedUIProviderMeta) { this.createHostedUIProviderCustomResource(); } - if (props.oAuthMetadata) { - this.createOAuthCustomResource(); - } + if (!props.useEnabledMfas && props.mfaConfiguration !== 'OFF') { this.createMFACustomResource(props); } @@ -549,22 +537,64 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog this.identityPool.openIdConnectProviderArns = [cdk.Fn.getAtt('OpenIdLambdaInputs', 'providerArn').toString()]; this.identityPool.node.addDependency(this.openIdLambdaInputs!.node!.defaultChild!); } - - if ((!props.audiences || props.audiences.length === 0) && props.authSelections !== 'identityPoolOnly') { - this.identityPool.node.addDependency(this.userPoolClientInputs!.node!.defaultChild!); - } /** * # Created to map Auth and Unauth roles to the identity pool # Depends on Identity Pool for ID ref */ - this.identityPoolRoleMap = new cognito.CfnIdentityPoolRoleAttachment(this, 'IdentityPoolRoleMap', { + + let identityPoolRoleMapParams = { identityPoolId: cdk.Fn.ref('IdentityPool'), roles: { unauthenticated: cdk.Fn.ref('unauthRoleArn'), authenticated: cdk.Fn.ref('authRoleArn'), }, - }); + }; + + const addRoleMappingAttachments = props.userPoolGroups || (props.userPoolGroupList || []).length > 0; + + if (addRoleMappingAttachments) { + const roleMappings = { + roleMappings: { + UserPoolClientRoleMapping: { + identityProvider: cdk.Fn.sub('cognito-idp.${region}.amazonaws.com/${userPool}:${client}', { + region: cdk.Fn.ref('AWS::Region'), + userPool: cdk.Fn.ref('UserPool'), + client: cdk.Fn.ref('UserPoolClient'), + }), + ambiguousRoleResolution: 'AuthenticatedRole', + type: 'Token', + }, + UserPoolWebClientRoleMapping: { + identityProvider: cdk.Fn.sub('cognito-idp.${region}.amazonaws.com/${userPool}:${webClient}', { + region: cdk.Fn.ref('AWS::Region'), + userPool: cdk.Fn.ref('UserPool'), + webClient: cdk.Fn.ref('UserPoolClientWeb'), + }), + ambiguousRoleResolution: 'AuthenticatedRole', + type: 'Token', + }, + }, + }; + + identityPoolRoleMapParams = { + ...identityPoolRoleMapParams, + ...roleMappings, + }; + } + + this.identityPoolRoleMap = new cognito.CfnIdentityPoolRoleAttachment(this, 'IdentityPoolRoleMap', identityPoolRoleMapParams); + this.identityPoolRoleMap.addDependency(this.identityPool); + + if (addRoleMappingAttachments) { + if (this.userPoolClient) { + this.identityPoolRoleMap.addDependency(this.userPoolClient); + } + + if (this.userPoolClientWeb) { + this.identityPoolRoleMap.addDependency(this.userPoolClientWeb); + } + } } }; @@ -574,9 +604,9 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog public renderCloudFormationTemplate = (): string => JSONUtilities.stringify(this._toCloudFormation())!; /** - * creates userpool client custom resource + * creates base policy for lambdas */ - createUserPoolClientCustomResource(props: CognitoStackOptions): void { + createBaseLambdaRole(props: CognitoStackOptions): void { // iam role this.userPoolClientRole = new iam.CfnRole(this, 'UserPoolClientRole', { roleName: cdk.Fn.conditionIf( @@ -603,78 +633,38 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog ], }, }); - this.userPoolClientRole.addDependency(this.userPoolClient!); - - // lambda function - this.userPoolClientLambda = new lambda.CfnFunction(this, 'UserPoolClientLambda', { - code: { - zipFile: fs.readFileSync(userPoolClientLambdaFilePath, 'utf-8'), - }, - handler: 'index.handler', - role: cdk.Fn.getAtt('UserPoolClientRole', 'Arn').toString(), - runtime: 'nodejs16.x', - timeout: 300, - }); - this.userPoolClientLambda.addDependency(this.userPoolClientRole); - - // userPool client lambda policy - /** - * # Sets userpool policy for the role that executes the Userpool Client Lambda - # Depends on UserPool for Arn - # Marked as depending on UserPoolClientRole for easier to understand CFN sequencing - */ - this.userPoolClientLambdaPolicy = new iam.CfnPolicy(this, 'UserPoolClientLambdaPolicy', { - // eslint-disable-next-line spellcheck/spell-checker - policyName: `${props.resourceNameTruncated}_userpoolclient_lambda_iam_policy`, - policyDocument: { - Version: '2012-10-17', - Statement: [ - { - Effect: 'Allow', - Action: ['cognito-idp:DescribeUserPoolClient'], - Resource: cdk.Fn.getAtt('UserPool', 'Arn'), - }, - ], - }, - roles: [cdk.Fn.ref('UserPoolClientRole')], - }); - this.userPoolClientLambdaPolicy.addDependency(this.userPoolClientLambda); - - // userPool Client Log policy - - this.userPoolClientLogPolicy = new iam.CfnPolicy(this, 'UserPoolClientLogPolicy', { - // eslint-disable-next-line spellcheck/spell-checker - policyName: `${props.resourceNameTruncated}_userpoolclient_lambda_log_policy`, - policyDocument: { - Version: '2012-10-17', - Statement: [ - { - Effect: 'Allow', - Action: ['logs:CreateLogGroup', 'logs:CreateLogStream', 'logs:PutLogEvents'], - Resource: cdk.Fn.sub('arn:aws:logs:${region}:${account}:log-group:/aws/lambda/${lambda}:log-stream:*', { - region: cdk.Fn.ref('AWS::Region'), - account: cdk.Fn.ref('AWS::AccountId'), - lambda: cdk.Fn.ref('UserPoolClientLambda'), - }), - }, - ], - }, - roles: [cdk.Fn.ref('UserPoolClientRole')], - }); - this.userPoolClientLogPolicy.addDependency(this.userPoolClientLambdaPolicy); - - // userPoolClient Custom Resource - this.userPoolClientInputs = new cdk.CustomResource(this, 'UserPoolClientInputs', { - serviceToken: this.userPoolClientLambda.attrArn, - resourceType: 'Custom::LambdaCallout', - properties: { - clientId: cdk.Fn.ref('UserPoolClient'), - userpoolId: cdk.Fn.ref('UserPool'), - }, - }); - this.userPoolClientInputs.node.addDependency(this.userPoolClientLogPolicy); } + /** + * updates cognito userpool client with OAuth settings + */ + updateUserPoolClientWithOAuthSettings = (props: CognitoStackOptions): void => { + const oAuthMetaData = JSONUtilities.parse(props.oAuthMetadata); + let hostedUIProviderMeta; + let supportedIdentityProviders: string[] = []; + if (!_.isEmpty(props.hostedUIProviderMeta)) { + hostedUIProviderMeta = JSONUtilities.parse>(props.hostedUIProviderMeta); + supportedIdentityProviders = hostedUIProviderMeta.map((provider: { ProviderName: string }) => provider.ProviderName); + } + supportedIdentityProviders.push('COGNITO'); + if (this.userPoolClient) { + this.userPoolClient.allowedOAuthFlowsUserPoolClient = true; + this.userPoolClient.allowedOAuthScopes = oAuthMetaData?.AllowedOAuthScopes; + this.userPoolClient.allowedOAuthFlows = oAuthMetaData?.AllowedOAuthFlows; + this.userPoolClient.callbackUrLs = oAuthMetaData?.CallbackURLs; + this.userPoolClient.logoutUrLs = oAuthMetaData?.LogoutURLs; + this.userPoolClient.supportedIdentityProviders = supportedIdentityProviders; + } + if (this.userPoolClientWeb) { + this.userPoolClientWeb.allowedOAuthFlowsUserPoolClient = true; + this.userPoolClientWeb.allowedOAuthScopes = oAuthMetaData?.AllowedOAuthScopes; + this.userPoolClientWeb.allowedOAuthFlows = oAuthMetaData?.AllowedOAuthFlows; + this.userPoolClientWeb.callbackUrLs = oAuthMetaData?.CallbackURLs; + this.userPoolClientWeb.logoutUrLs = oAuthMetaData?.LogoutURLs; + this.userPoolClientWeb.supportedIdentityProviders = supportedIdentityProviders; + } + }; + /** * Creates custom lambda to update userPool client on Cognito */ @@ -686,10 +676,13 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog }, handler: 'index.handler', role: cdk.Fn.getAtt('UserPoolClientRole', 'Arn').toString(), - runtime: 'nodejs16.x', + runtime: 'nodejs18.x', timeout: 300, }); - this.hostedUICustomResource.addDependency(this.userPoolClientRole!); + + if (this.userPoolClientRole) { + this.hostedUICustomResource.addDependency(this.userPoolClientRole); + } // userPool client lambda policy /** @@ -767,10 +760,13 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog }, handler: 'index.handler', role: cdk.Fn.getAtt('UserPoolClientRole', 'Arn').toString(), - runtime: 'nodejs16.x', + runtime: 'nodejs18.x', timeout: 300, }); - this.hostedUIProvidersCustomResource.addDependency(this.userPoolClientRole!); + + if (this.userPoolClientRole) { + this.hostedUIProvidersCustomResource.addDependency(this.userPoolClientRole); + } // userPool client lambda policy /** @@ -837,83 +833,9 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog }, }); this.hostedUIProvidersCustomResourceInputs.node.addDependency(this.hostedUIProvidersCustomResourceLogPolicy); - } - - /** - * creates OAuth customResource for Cognito - */ - createOAuthCustomResource(): void { - // lambda function - this.oAuthCustomResource = new lambda.CfnFunction(this, 'OAuthCustomResource', { - code: { - zipFile: fs.readFileSync(oauthLambdaFilePath, 'utf-8'), - }, - handler: 'index.handler', - role: cdk.Fn.getAtt('UserPoolClientRole', 'Arn').toString(), - runtime: 'nodejs16.x', - timeout: 300, - }); - - this.oAuthCustomResource.node.addDependency(this.hostedUICustomResourceInputs!.node!.defaultChild!); - this.oAuthCustomResource.node.addDependency(this.hostedUIProvidersCustomResourceInputs!.node!.defaultChild!); - - // userPool client lambda policy - /** - * # Sets userpool policy for the role that executes the Userpool Client Lambda - # Depends on UserPool for Arn - # Marked as depending on UserPoolClientRole for easier to understand CFN sequencing - */ - this.oAuthCustomResourcePolicy = new iam.CfnPolicy(this, 'OAuthCustomResourcePolicy', { - policyName: cdk.Fn.join('-', [cdk.Fn.ref('UserPool'), 'OAuth']), - policyDocument: { - Version: '2012-10-17', - Statement: [ - { - Effect: 'Allow', - Action: ['cognito-idp:UpdateUserPoolClient'], - Resource: cdk.Fn.getAtt('UserPool', 'Arn'), - }, - ], - }, - roles: [cdk.Fn.ref('UserPoolClientRole')], - }); - this.oAuthCustomResourcePolicy.addDependency(this.oAuthCustomResource); - - // Oauth Log policy - - this.oAuthCustomResourceLogPolicy = new iam.CfnPolicy(this, 'OAuthCustomResourceLogPolicy', { - policyName: cdk.Fn.join('-', [cdk.Fn.ref('UserPool'), 'OAuthLogPolicy']), - policyDocument: { - Version: '2012-10-17', - Statement: [ - { - Effect: 'Allow', - Action: ['logs:CreateLogGroup', 'logs:CreateLogStream', 'logs:PutLogEvents'], - Resource: cdk.Fn.sub('arn:aws:logs:${region}:${account}:log-group:/aws/lambda/${lambda}:log-stream:*', { - region: cdk.Fn.ref('AWS::Region'), - account: cdk.Fn.ref('AWS::AccountId'), - lambda: cdk.Fn.ref('OAuthCustomResource'), - }), - }, - ], - }, - roles: [cdk.Fn.ref('UserPoolClientRole')], - }); - this.oAuthCustomResourceLogPolicy.addDependency(this.oAuthCustomResourcePolicy); - - // oAuth Custom Resource - this.oAuthCustomResourceInputs = new cdk.CustomResource(this, 'OAuthCustomResourceInputs', { - serviceToken: this.oAuthCustomResource.attrArn, - resourceType: 'Custom::LambdaCallout', - properties: { - hostedUIProviderMeta: cdk.Fn.ref('hostedUIProviderMeta'), - oAuthMetadata: cdk.Fn.ref('oAuthMetadata'), - webClientId: cdk.Fn.ref('UserPoolClientWeb'), - nativeClientId: cdk.Fn.ref('UserPoolClient'), - userPoolId: cdk.Fn.ref('UserPool'), - }, - }); - this.oAuthCustomResourceInputs.node.addDependency(this.oAuthCustomResourceLogPolicy); + // this can be removed when hostedUI Custom resource is removed + this.userPoolClient?.node.addDependency(this.hostedUIProvidersCustomResourceInputs); + this.userPoolClientWeb?.node.addDependency(this.hostedUIProvidersCustomResourceInputs); } /** @@ -984,7 +906,7 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog }, handler: 'index.handler', role: cdk.Fn.getAtt('MFALambdaRole', 'Arn').toString(), - runtime: 'nodejs16.x', + runtime: 'nodejs18.x', timeout: 300, }); this.mfaLambda.addDependency(this.mfaLambdaRole); @@ -1114,8 +1036,6 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog }, ], }); - // TODO - this.openIdLambdaRole!.node.addDependency(this.userPoolClientInputs!.node!.defaultChild!); // lambda function /** * Lambda which sets MFA config values @@ -1127,7 +1047,7 @@ export class AmplifyAuthCognitoStack extends cdk.Stack implements AmplifyAuthCog }, handler: 'index.handler', role: cdk.Fn.getAtt('OpenIdLambdaRole', 'Arn').toString(), - runtime: 'nodejs16.x', + runtime: 'nodejs18.x', timeout: 300, }); this.openIdLambda.addDependency(this.openIdLambdaRole); diff --git a/packages/amplify-category-auth/src/provider-utils/awscloudformation/auth-stack-builder/auth-stack-transform.ts b/packages/amplify-category-auth/src/provider-utils/awscloudformation/auth-stack-builder/auth-stack-transform.ts index 05de42e931c..99c3a45ffd7 100644 --- a/packages/amplify-category-auth/src/provider-utils/awscloudformation/auth-stack-builder/auth-stack-transform.ts +++ b/packages/amplify-category-auth/src/provider-utils/awscloudformation/auth-stack-builder/auth-stack-transform.ts @@ -4,23 +4,21 @@ import { AmplifyCategories, AmplifyCategoryTransform, AmplifyError, - AmplifyStackTemplate, AmplifySupportedService, buildOverrideDir, CFNTemplateFormat, FeatureFlags, JSONUtilities, pathManager, + runOverride, stateManager, Template, writeCFNTemplate, } from '@aws-amplify/amplify-cli-core'; -import { formatter } from '@aws-amplify/amplify-prompts'; import * as cdk from 'aws-cdk-lib'; import * as fs from 'fs-extra'; import _ from 'lodash'; import * as path from 'path'; -import * as vm from 'vm2'; import { AuthInputState } from '../auth-inputs-manager/auth-input-state'; import { CognitoCLIInputs } from '../service-walkthrough-types/awsCognito-user-input-types'; import { AuthTriggerConnection, AuthTriggerPermissions, CognitoStackOptions } from '../service-walkthrough-types/cognito-user-input-types'; @@ -95,7 +93,7 @@ export class AmplifyAuthTransform extends AmplifyCategoryTransform { this.addCfnParameters(props); // add CFN condition - this.addCfnConditions(props); + this.addCfnConditions(); // generate Resources await this._authTemplateObj.generateCognitoStackResources(props); @@ -109,26 +107,9 @@ export class AmplifyAuthTransform extends AmplifyCategoryTransform { const overrideDir = path.join(backendDir, this._category, this.resourceName); const isBuild = await buildOverrideDir(backendDir, overrideDir); if (isBuild) { - const overrideCode: string = await fs.readFile(path.join(overrideDir, 'build', 'override.js'), 'utf-8').catch(() => { - formatter.list(['No override File Found', `To override ${this.resourceName} run amplify override auth`]); - return ''; - }); - - const sandboxNode = new vm.NodeVM({ - console: 'inherit', - timeout: 5000, - sandbox: {}, - require: { - context: 'sandbox', - builtin: ['path'], - external: true, - }, - }); const projectInfo = getProjectInfo(); try { - await sandboxNode - .run(overrideCode, path.join(overrideDir, 'build', 'override.js')) - .override(this._authTemplateObj as AmplifyAuthCognitoStack & AmplifyStackTemplate, projectInfo); + await runOverride(overrideDir, this._authTemplateObj, projectInfo); } catch (err) { throw new AmplifyError( 'InvalidOverrideError', @@ -399,14 +380,6 @@ export class AmplifyAuthTransform extends AmplifyCategoryTransform { 'AppClientID', ); - this._authTemplateObj.addCfnOutput( - { - value: cdk.Fn.getAtt('UserPoolClientInputs', 'appSecret').toString(), - condition: this._authTemplateObj.getCfnCondition('ShouldOutputAppClientSecrets'), - }, - 'AppClientSecret', - ); - if (!props.useEnabledMfas || configureSMS) { this._authTemplateObj.addCfnOutput( { @@ -569,21 +542,12 @@ export class AmplifyAuthTransform extends AmplifyCategoryTransform { /** * adds cfn conditions */ - private addCfnConditions = (props: CognitoStackOptions): void => { + private addCfnConditions = (): void => { this._authTemplateObj.addCfnCondition( { expression: cdk.Fn.conditionEquals(cdk.Fn.ref('env'), 'NONE'), }, 'ShouldNotCreateEnvResources', ); - - if (props.authSelections !== 'identityPoolOnly') { - this._authTemplateObj.addCfnCondition( - { - expression: cdk.Fn.conditionEquals(cdk.Fn.ref('userpoolClientGenerateSecret'), true), - }, - 'ShouldOutputAppClientSecrets', - ); - } }; } diff --git a/packages/amplify-category-auth/src/provider-utils/awscloudformation/auth-stack-builder/auth-user-pool-group-stack-builder.ts b/packages/amplify-category-auth/src/provider-utils/awscloudformation/auth-stack-builder/auth-user-pool-group-stack-builder.ts index bcffc8c5778..c160d01791e 100644 --- a/packages/amplify-category-auth/src/provider-utils/awscloudformation/auth-stack-builder/auth-user-pool-group-stack-builder.ts +++ b/packages/amplify-category-auth/src/provider-utils/awscloudformation/auth-stack-builder/auth-user-pool-group-stack-builder.ts @@ -1,15 +1,11 @@ /* eslint-disable max-classes-per-file */ import * as cdk from 'aws-cdk-lib'; import * as iam from 'aws-cdk-lib/aws-iam'; -import * as lambda from 'aws-cdk-lib/aws-lambda'; import { CfnUserPoolGroup } from 'aws-cdk-lib/aws-cognito'; import { AmplifyUserPoolGroupStackTemplate } from '@aws-amplify/cli-extensibility-helper'; import { JSONUtilities } from '@aws-amplify/amplify-cli-core'; -import * as fs from 'fs-extra'; import { Construct } from 'constructs'; // eslint-disable-next-line import/no-cycle -import { roleMapLambdaFilePath } from '../constants'; -// eslint-disable-next-line import/no-cycle import { AmplifyUserPoolGroupStackOptions } from './user-pool-group-stack-transform'; const CFN_TEMPLATE_FORMAT_VERSION = '2010-09-09'; @@ -31,9 +27,6 @@ export class AmplifyUserPoolGroupStack extends cdk.Stack implements AmplifyUserP private _cfnConditionMap: Map = new Map(); userPoolGroup: Record; userPoolGroupRole: Record; - roleMapCustomResource?: cdk.CustomResource; - roleMapLambdaFunction?: lambda.CfnFunction; - lambdaExecutionRole?: iam.CfnRole; constructor(scope: Construct, id: string, props: AmplifyAuthCognitoStackProps) { super(scope, id, props); @@ -192,117 +185,6 @@ export class AmplifyUserPoolGroupStack extends cdk.Stack implements AmplifyUserP } } }); - - if (props.identityPoolName) { - this.lambdaExecutionRole = new iam.CfnRole(this, 'LambdaExecutionRole', { - roleName: cdk.Fn.conditionIf( - 'ShouldNotCreateEnvResources', - props.cognitoResourceName, - cdk.Fn.join('', [`${props.cognitoResourceName}-ExecutionRole-`, cdk.Fn.ref('env')]).toString(), - ).toString(), - assumeRolePolicyDocument: { - Version: '2012-10-17', - Statement: [ - { - Effect: 'Allow', - Principal: { - Service: ['lambda.amazonaws.com'], - }, - Action: ['sts:AssumeRole'], - }, - ], - }, - policies: [ - { - policyName: 'UserGroupExecutionPolicy', - policyDocument: { - Version: '2012-10-17', - Statement: [ - { - Effect: 'Allow', - Action: [ - 'cognito-identity:SetIdentityPoolRoles', - 'cognito-identity:ListIdentityPools', - 'cognito-identity:describeIdentityPool', - ], - Resource: '*', - }, - ], - }, - }, - { - policyName: 'UserGroupPassRolePolicy', - policyDocument: { - Version: '2012-10-17', - Statement: [ - { - Effect: 'Allow', - Action: ['iam:PassRole'], - Resource: [ - { - Ref: 'AuthRoleArn', - }, - { - Ref: 'UnauthRoleArn', - }, - ], - }, - ], - }, - }, - ], - }); - // lambda function for RoleMap Custom Resource - this.roleMapLambdaFunction = new lambda.CfnFunction(this, 'RoleMapFunction', { - code: { - zipFile: fs.readFileSync(roleMapLambdaFilePath, 'utf-8'), - }, - handler: 'index.handler', - runtime: 'nodejs16.x', - timeout: 300, - role: cdk.Fn.getAtt('LambdaExecutionRole', 'Arn').toString(), - }); - - // eslint-disable-next-line no-new - new iam.CfnPolicy(this, 'LambdaCloudWatchPolicy', { - policyName: 'UserGroupLogPolicy', - roles: [this.lambdaExecutionRole.ref], - policyDocument: { - Version: '2012-10-17', - Statement: [ - { - Effect: 'Allow', - Action: ['logs:CreateLogGroup', 'logs:CreateLogStream', 'logs:PutLogEvents'], - Resource: { - 'Fn::Sub': [ - 'arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/${lambdaName}:log-stream:*', - { - lambdaName: this.roleMapLambdaFunction.ref, - }, - ], - }, - }, - ], - }, - }); - - // adding custom trigger roleMap function - this.roleMapCustomResource = new cdk.CustomResource(this, 'RoleMapFunctionInput', { - serviceToken: this.roleMapLambdaFunction.attrArn, - resourceType: 'Custom::LambdaCallout', - properties: { - AuthRoleArn: cdk.Fn.ref('AuthRoleArn'), - UnauthRoleArn: cdk.Fn.ref('UnauthRoleArn'), - identityPoolId: cdk.Fn.ref(getCfnParamsLogicalId(props.cognitoResourceName, 'IdentityPoolId')), - userPoolId: cdk.Fn.ref(getCfnParamsLogicalId(props.cognitoResourceName, 'UserPoolId')), - appClientIDWeb: cdk.Fn.ref(getCfnParamsLogicalId(props.cognitoResourceName, 'AppClientIDWeb')), - appClientID: cdk.Fn.ref(getCfnParamsLogicalId(props.cognitoResourceName, 'AppClientID')), - region: cdk.Fn.ref('AWS::Region'), - env: cdk.Fn.ref('env'), - }, - }); - this.roleMapCustomResource.node.addDependency(this.roleMapLambdaFunction); - } }; } diff --git a/packages/amplify-category-auth/src/provider-utils/awscloudformation/auth-stack-builder/types.ts b/packages/amplify-category-auth/src/provider-utils/awscloudformation/auth-stack-builder/types.ts new file mode 100644 index 00000000000..fb9bc3e3936 --- /dev/null +++ b/packages/amplify-category-auth/src/provider-utils/awscloudformation/auth-stack-builder/types.ts @@ -0,0 +1,8 @@ +export type OAuthMetaData = { + AllowedOAuthFlows?: Array; + AllowedOAuthFlowsUserPoolClient?: boolean; + AllowedOAuthScopes?: Array; + CallbackURLs?: Array; + LogoutURLs?: Array; + SupportedIdentityProviders?: Array; +}; diff --git a/packages/amplify-category-auth/src/provider-utils/awscloudformation/auth-stack-builder/user-pool-group-stack-transform.ts b/packages/amplify-category-auth/src/provider-utils/awscloudformation/auth-stack-builder/user-pool-group-stack-transform.ts index 4f6e900d92b..21b93a91fc6 100644 --- a/packages/amplify-category-auth/src/provider-utils/awscloudformation/auth-stack-builder/user-pool-group-stack-transform.ts +++ b/packages/amplify-category-auth/src/provider-utils/awscloudformation/auth-stack-builder/user-pool-group-stack-transform.ts @@ -4,20 +4,17 @@ import { AmplifyCategories, AmplifyCategoryTransform, AmplifyError, - AmplifyStackTemplate, AmplifySupportedService, buildOverrideDir, CFNTemplateFormat, JSONUtilities, pathManager, + runOverride, Template, writeCFNTemplate, } from '@aws-amplify/amplify-cli-core'; -import { formatter } from '@aws-amplify/amplify-prompts'; import * as cdk from 'aws-cdk-lib'; -import * as fs from 'fs-extra'; import * as path from 'path'; -import * as vm from 'vm2'; import { AuthInputState } from '../auth-inputs-manager/auth-input-state'; import { CognitoCLIInputs } from '../service-walkthrough-types/awsCognito-user-input-types'; import { AmplifyUserPoolGroupStack, AmplifyUserPoolGroupStackOutputs } from './index'; @@ -186,20 +183,9 @@ export class AmplifyUserPoolGroupTransform extends AmplifyCategoryTransform { const overrideDir = path.join(backendDir, this._category, this._resourceName); const isBuild = await buildOverrideDir(backendDir, overrideDir); if (isBuild) { - const overrideCode: string = await fs.readFile(path.join(overrideDir, 'build', 'override.js'), 'utf-8').catch(() => { - formatter.list(['No override File Found', `To override ${this._resourceName} run amplify override auth`]); - return ''; - }); - const sandboxNode = new vm.NodeVM({ - console: 'inherit', - timeout: 5000, - sandbox: {}, - }); const projectInfo = getProjectInfo(); try { - await sandboxNode - .run(overrideCode) - .override(this._userPoolGroupTemplateObj as AmplifyUserPoolGroupStack & AmplifyStackTemplate, projectInfo); + await runOverride(overrideDir, this._userPoolGroupTemplateObj, projectInfo); } catch (err: $TSAny) { throw new AmplifyError( 'InvalidOverrideError', diff --git a/packages/amplify-category-auth/src/provider-utils/awscloudformation/constants.ts b/packages/amplify-category-auth/src/provider-utils/awscloudformation/constants.ts index 1ac201843fc..d52f95baf39 100644 --- a/packages/amplify-category-auth/src/provider-utils/awscloudformation/constants.ts +++ b/packages/amplify-category-auth/src/provider-utils/awscloudformation/constants.ts @@ -10,13 +10,10 @@ export const adminAuthAssetRoot = path.join(resourcesRoot, 'adminAuth'); export const authTriggerAssetFilePath = path.join(resourcesRoot, 'lambda-function.js'); export const cfnTemplateRoot = path.join(resourcesRoot, 'cloudformation-templates'); export const triggerRoot = path.normalize(path.join(__dirname, '../../../provider-utils/awscloudformation/triggers')); -export const userPoolClientLambdaFilePath = path.join(resourcesRoot, 'auth-custom-resource', 'userpoolclientLambda.js'); export const hostedUILambdaFilePath = path.join(resourcesRoot, 'auth-custom-resource', 'hostedUILambda.js'); export const hostedUIProviderLambdaFilePath = path.join(resourcesRoot, 'auth-custom-resource', 'hostedUIProviderLambda.js'); -export const oauthLambdaFilePath = path.join(resourcesRoot, 'auth-custom-resource', 'oauthLambda.js'); export const mfaLambdaFilePath = path.join(resourcesRoot, 'auth-custom-resource', 'mfaLambda.js'); export const openIdLambdaFilePath = path.join(resourcesRoot, 'auth-custom-resource', 'openIdLambda.js'); -export const roleMapLambdaFilePath = path.join(resourcesRoot, 'auth-custom-resource', 'role-map-lambda-function.js'); export const ENV_SPECIFIC_PARAMS = [ 'facebookAppId', 'facebookAppIdUserPool', diff --git a/packages/amplify-category-auth/src/provider-utils/awscloudformation/handlers/resource-handlers.ts b/packages/amplify-category-auth/src/provider-utils/awscloudformation/handlers/resource-handlers.ts index 6a23adf42a4..557ad8bb200 100644 --- a/packages/amplify-category-auth/src/provider-utils/awscloudformation/handlers/resource-handlers.ts +++ b/packages/amplify-category-auth/src/provider-utils/awscloudformation/handlers/resource-handlers.ts @@ -99,9 +99,9 @@ export const getUpdateAuthHandler = (context: AuthContext) => async (request: Se )(request); const resources = stateManager.getMeta(); if (resources.auth.userPoolGroups) { - await updateUserPoolGroups(context, requestWithDefaults.resourceName!, requestWithDefaults.userPoolGroupList); + await updateUserPoolGroups(context, requestWithDefaults.resourceName, requestWithDefaults.userPoolGroupList); } else { - await createUserPoolGroups(context, requestWithDefaults.resourceName!, requestWithDefaults.userPoolGroupList); + await createUserPoolGroups(context, requestWithDefaults.resourceName, requestWithDefaults.userPoolGroupList); } if ( (!requestWithDefaults.updateFlow && !requestWithDefaults.thirdPartyAuth) || @@ -165,7 +165,7 @@ export const getUpdateAuthHandler = (context: AuthContext) => async (request: Se // saving cli-inputs except secrets await cliState.saveCLIInputPayload(cognitoCLIInputs); // remove this when api and functions transform are done - if (request.updateFlow !== 'updateUserPoolGroups' && request.updateFlow !== 'updateAdminQueries') { + if (request.updateFlow !== 'updateAdminQueries') { await generateAuthStackTemplate(context, cognitoCLIInputs.cognitoConfig.resourceName); } diff --git a/packages/amplify-category-auth/src/provider-utils/awscloudformation/import/index.ts b/packages/amplify-category-auth/src/provider-utils/awscloudformation/import/index.ts index 25d272f7e57..e5808e479dc 100644 --- a/packages/amplify-category-auth/src/provider-utils/awscloudformation/import/index.ts +++ b/packages/amplify-category-auth/src/provider-utils/awscloudformation/import/index.ts @@ -1130,7 +1130,7 @@ export const importedAuthEnvInit = async ( answers.appClientWeb = questionParameters.webClients!.find((c) => c.ClientId! === currentEnvSpecificParameters.webClientId); if (!answers.appClientWeb) { - printer.error(importMessages.AppClientNotFound('Web', currentEnvSpecificParameters.webClientId)); + printer.error(importMessages.AppClientNotFound('Web')); return { succeeded: false, @@ -1140,7 +1140,7 @@ export const importedAuthEnvInit = async ( answers.appClientNative = questionParameters.nativeClients!.find((c) => c.ClientId! === currentEnvSpecificParameters.nativeClientId); if (!answers.appClientNative) { - printer.error(importMessages.AppClientNotFound('Native', currentEnvSpecificParameters.nativeClientId)); + printer.error(importMessages.AppClientNotFound('Native')); return { succeeded: false, @@ -1292,7 +1292,7 @@ export const headlessImport = async ( if (!answers.appClientWeb) { throw new AmplifyError('AuthImportError', { - message: importMessages.AppClientNotFound('Web', resolvedEnvParams.webClientId), + message: importMessages.AppClientNotFound('Web'), }); } @@ -1300,7 +1300,7 @@ export const headlessImport = async ( if (!answers.appClientNative) { throw new AmplifyError('AuthImportError', { - message: importMessages.AppClientNotFound('Native', resolvedEnvParams.nativeClientId), + message: importMessages.AppClientNotFound('Native'), }); } diff --git a/packages/amplify-category-auth/src/provider-utils/awscloudformation/import/messages.ts b/packages/amplify-category-auth/src/provider-utils/awscloudformation/import/messages.ts index b4baf0cec6c..d400e6a9166 100644 --- a/packages/amplify-category-auth/src/provider-utils/awscloudformation/import/messages.ts +++ b/packages/amplify-category-auth/src/provider-utils/awscloudformation/import/messages.ts @@ -20,7 +20,7 @@ export const importMessages = { `The previously configured Cognito User Pool: '${userPoolName}' (${userPoolId}) cannot be found.`, IdentityPoolNotFound: (identityPoolName: string, identityPoolId: string) => `The previously configured Identity Pool: '${identityPoolName}' (${identityPoolId}) cannot be found.`, - AppClientNotFound: (type: 'Web' | 'Native', clientId: string) => `The previously configured ${type} app client cannot be found.`, + AppClientNotFound: (type: 'Web' | 'Native') => `The previously configured ${type} app client cannot be found.`, NoAtLeastOneAppClient: (type: 'Web' | 'Native') => `The selected Cognito User Pool does not have at least 1 ${type} app client configured. ${type} app clients are app clients ${ type === 'Web' ? 'without' : 'with' diff --git a/packages/amplify-category-auth/src/provider-utils/awscloudformation/import/types.ts b/packages/amplify-category-auth/src/provider-utils/awscloudformation/import/types.ts index 0507d348709..e1acaaa2baa 100644 --- a/packages/amplify-category-auth/src/provider-utils/awscloudformation/import/types.ts +++ b/packages/amplify-category-auth/src/provider-utils/awscloudformation/import/types.ts @@ -155,7 +155,7 @@ export interface ProviderUtils { privateParams: $TSObject, envSpecificParams: string[], ): void; - loadResourceParameters(context: $TSContext, category: string, resourceName: string): Record; + loadResourceParameters(context: $TSContext, category: string, resourceName: string): Record; } export type ImportAuthHeadlessParameters = { diff --git a/packages/amplify-category-auth/src/provider-utils/awscloudformation/service-walkthrough-types/awsCognito-user-input-types.ts b/packages/amplify-category-auth/src/provider-utils/awscloudformation/service-walkthrough-types/awsCognito-user-input-types.ts index 3db5cfe5314..d0f0273f740 100644 --- a/packages/amplify-category-auth/src/provider-utils/awscloudformation/service-walkthrough-types/awsCognito-user-input-types.ts +++ b/packages/amplify-category-auth/src/provider-utils/awscloudformation/service-walkthrough-types/awsCognito-user-input-types.ts @@ -1,3 +1,5 @@ +import { $TSAny } from '@aws-amplify/amplify-cli-core'; + export interface CognitoCLIInputs { version?: string; cognitoConfig: CognitoConfiguration; @@ -41,13 +43,13 @@ export interface ServiceQuestionsBaseResult { export interface OAuthResult { hostedUI?: boolean; hostedUIDomainName?: string; - hostedUIProviderMeta?: any; - hostedUIProviderCreds?: any; + hostedUIProviderMeta?: $TSAny; + hostedUIProviderCreds?: $TSAny; AllowedOAuthFlows?: 'code' | 'implicit'; AllowedOAuthScopes?: string[]; newCallbackURLs?: string[]; newLogoutURLs?: string[]; - oAuthMetadata?: any; + oAuthMetadata?: $TSAny; } export interface SocialProviderResult { diff --git a/packages/amplify-category-auth/src/provider-utils/awscloudformation/service-walkthrough-types/cognito-user-input-types.ts b/packages/amplify-category-auth/src/provider-utils/awscloudformation/service-walkthrough-types/cognito-user-input-types.ts index 8ef95b454a8..5bb0ef080cf 100644 --- a/packages/amplify-category-auth/src/provider-utils/awscloudformation/service-walkthrough-types/cognito-user-input-types.ts +++ b/packages/amplify-category-auth/src/provider-utils/awscloudformation/service-walkthrough-types/cognito-user-input-types.ts @@ -1,6 +1,6 @@ // Some convenience types for the existing service walkthrough logic -import { $TSObject } from '@aws-amplify/amplify-cli-core'; +import { $TSObject, $TSAny } from '@aws-amplify/amplify-cli-core'; import { FunctionDependency } from '@aws-amplify/amplify-function-plugin-interface'; import { CognitoConfiguration } from './awsCognito-user-input-types'; @@ -67,13 +67,13 @@ export interface ServiceQuestionsBaseResult { export interface OAuthResult { hostedUI?: boolean; hostedUIDomainName?: string; - hostedUIProviderMeta?: any; - hostedUIProviderCreds?: any; + hostedUIProviderMeta?: $TSAny; + hostedUIProviderCreds?: $TSAny; AllowedOAuthFlows?: 'code' | 'implicit'; AllowedOAuthScopes?: string[]; newCallbackURLs?: string[]; newLogoutURLs?: string[]; - oAuthMetadata?: any; + oAuthMetadata?: $TSAny; } export interface SocialProviderResult { @@ -141,7 +141,7 @@ export type UsernameAttributes = AttributeType.EMAIL | AttributeType.PHONE_NUMBE export type AliasAttributes = AttributeType.EMAIL | AttributeType.PHONE_NUMBER | AttributeType.PREFERRED_USERNAME; export interface Triggers { - triggers?: any; // TODO create a type for this + triggers?: $TSAny; // TODO create a type for this } export enum TriggerType { diff --git a/packages/amplify-category-auth/src/provider-utils/awscloudformation/utils/generate-auth-trigger-template.ts b/packages/amplify-category-auth/src/provider-utils/awscloudformation/utils/generate-auth-trigger-template.ts index 36326257999..24c5f856909 100644 --- a/packages/amplify-category-auth/src/provider-utils/awscloudformation/utils/generate-auth-trigger-template.ts +++ b/packages/amplify-category-auth/src/provider-utils/awscloudformation/utils/generate-auth-trigger-template.ts @@ -1,6 +1,6 @@ import * as path from 'path'; import * as fs from 'fs-extra'; -import { $TSAny, AmplifyFault, JSONUtilities, pathManager } from '@aws-amplify/amplify-cli-core'; +import { $TSAny, AmplifyFault, JSONUtilities, pathManager, getPermissionsBoundaryArn } from '@aws-amplify/amplify-cli-core'; import * as iam from 'aws-cdk-lib/aws-iam'; import * as lambda from 'aws-cdk-lib/aws-lambda'; import * as cdk from 'aws-cdk-lib'; @@ -152,7 +152,7 @@ const createCustomResource = ( ): void => { const triggerCode = fs.readFileSync(authTriggerAssetFilePath, 'utf-8'); const authTriggerFn = new lambda.Function(stack, 'authTriggerFn', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: lambda.Runtime.NODEJS_18_X, code: lambda.Code.fromInline(triggerCode), handler: 'index.handler', }); @@ -166,6 +166,11 @@ const createCustomResource = ( }), ); + const policyArn = getPermissionsBoundaryArn(); + if (policyArn) { + iam.PermissionsBoundary.of(authTriggerFn).apply(iam.ManagedPolicy.fromManagedPolicyArn(stack, 'PermissionsBoundary', policyArn)); + } + // reason to add iam::PassRole // AccessDeniedException: User: is not authorized to perform: iam:PassRole // on resource: if (authTriggerFn.role) { diff --git a/packages/amplify-category-auth/src/provider-utils/awscloudformation/utils/generate-cognito-app-client-secret.ts b/packages/amplify-category-auth/src/provider-utils/awscloudformation/utils/generate-cognito-app-client-secret.ts new file mode 100644 index 00000000000..946816f9dc3 --- /dev/null +++ b/packages/amplify-category-auth/src/provider-utils/awscloudformation/utils/generate-cognito-app-client-secret.ts @@ -0,0 +1,30 @@ +import { $TSContext, AmplifyCategories, stateManager } from '@aws-amplify/amplify-cli-core'; +import { getAuthResourceName } from '../../../utils/getAuthResourceName'; +import { MetaOutput } from '../import/types'; +import { getAppClientSecret } from './get-app-client-secret-sdk'; +import { projectHasAuth } from './project-has-auth'; + +/** + * + * updates app client secret if user pool exists and userpoolClientGenerateSecret is set to true + */ +export const updateAppClientWithGeneratedSecret = async (context: $TSContext): Promise => { + if (projectHasAuth()) { + // check if its imported auth + const { imported } = context.amplify.getImportedAuthProperties(context); + if (!imported) { + const authResourceName = await getAuthResourceName(context); + const authMetaOutput: MetaOutput = stateManager.getMeta()?.auth[authResourceName]?.output; + const clientId = authMetaOutput.AppClientID; + const userpoolId = authMetaOutput.UserPoolId; + // no else case required as userpool client is default created with userPool when created through amplify + if (clientId && userpoolId) { + const appClientSecret = await getAppClientSecret(context, userpoolId, clientId); + if (appClientSecret) { + authMetaOutput.AppClientSecret = appClientSecret; + await context.amplify.updateamplifyMetaAfterResourceUpdate(AmplifyCategories.AUTH, authResourceName, 'output', authMetaOutput); + } + } + } + } +}; diff --git a/packages/amplify-category-auth/src/provider-utils/awscloudformation/utils/get-app-client-secret-sdk.ts b/packages/amplify-category-auth/src/provider-utils/awscloudformation/utils/get-app-client-secret-sdk.ts new file mode 100644 index 00000000000..cbaedcbd002 --- /dev/null +++ b/packages/amplify-category-auth/src/provider-utils/awscloudformation/utils/get-app-client-secret-sdk.ts @@ -0,0 +1,33 @@ +import { $TSContext, AmplifyFault } from '@aws-amplify/amplify-cli-core'; +import { CognitoIdentityServiceProvider } from 'aws-sdk'; + +export const getAppClientSecret = async (context: $TSContext, userpoolId: string, clientId: string): Promise => { + try { + const identity = await getCognitoIdentityProviderClient(context); + const params = { + ClientId: clientId, + UserPoolId: userpoolId, + }; + const result = await identity.describeUserPoolClient(params).promise(); + return result.UserPoolClient?.ClientSecret; + } catch (error) { + throw new AmplifyFault( + 'ServiceCallFault', + { + message: error.message, + }, + error, + ); + } +}; + +const getCognitoIdentityProviderClient = async (context: $TSContext): Promise => { + const { client } = await context.amplify.invokePluginMethod<{ client: CognitoIdentityServiceProvider }>( + context, + 'awscloudformation', + undefined, + 'getConfiguredCognitoIdentityProviderClient', + [context], + ); + return client; +}; diff --git a/packages/amplify-category-auth/src/provider-utils/awscloudformation/utils/print-auth-exists-warning.ts b/packages/amplify-category-auth/src/provider-utils/awscloudformation/utils/print-auth-exists-warning.ts index 12a8280573d..5946ef6c2a6 100644 --- a/packages/amplify-category-auth/src/provider-utils/awscloudformation/utils/print-auth-exists-warning.ts +++ b/packages/amplify-category-auth/src/provider-utils/awscloudformation/utils/print-auth-exists-warning.ts @@ -18,5 +18,5 @@ export const printAuthExistsWarning = (context: $TSContext): void => { }; const checkAuthIsImported = (authResources: [string, $TSObject][]): boolean => { - return authResources.filter(([_, resource]) => resource?.serviceType === 'imported').length > 0; + return authResources.filter(([, resource]) => resource?.serviceType === 'imported').length > 0; }; diff --git a/packages/amplify-category-custom/CHANGELOG.md b/packages/amplify-category-custom/CHANGELOG.md index e86722d95cd..202abd203c7 100644 --- a/packages/amplify-category-custom/CHANGELOG.md +++ b/packages/amplify-category-custom/CHANGELOG.md @@ -3,6 +3,231 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [3.1.25](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-custom@3.1.24...@aws-amplify/amplify-category-custom@3.1.25) (2025-01-30) + +**Note:** Version bump only for package @aws-amplify/amplify-category-custom + + + + + +## [3.1.24](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-custom@3.1.23...@aws-amplify/amplify-category-custom@3.1.24) (2024-08-02) + +**Note:** Version bump only for package @aws-amplify/amplify-category-custom + + + + + +## [3.1.23](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-custom@3.1.22...@aws-amplify/amplify-category-custom@3.1.23) (2024-06-27) + +**Note:** Version bump only for package @aws-amplify/amplify-category-custom + + + + + +## [3.1.22](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-custom@3.1.21...@aws-amplify/amplify-category-custom@3.1.22) (2024-06-20) + +**Note:** Version bump only for package @aws-amplify/amplify-category-custom + + + + + +## [3.1.21](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-custom@3.1.20...@aws-amplify/amplify-category-custom@3.1.21) (2024-06-06) + +**Note:** Version bump only for package @aws-amplify/amplify-category-custom + + + + + +## [3.1.20](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-custom@3.1.19...@aws-amplify/amplify-category-custom@3.1.20) (2024-05-24) + +**Note:** Version bump only for package @aws-amplify/amplify-category-custom + + + + + +## [3.1.19](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-custom@3.1.18...@aws-amplify/amplify-category-custom@3.1.19) (2024-05-07) + +**Note:** Version bump only for package @aws-amplify/amplify-category-custom + + + + + +## [3.1.18](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-custom@3.1.17...@aws-amplify/amplify-category-custom@3.1.18) (2024-04-18) + +**Note:** Version bump only for package @aws-amplify/amplify-category-custom + + + + + +## [3.1.17](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-custom@3.1.16...@aws-amplify/amplify-category-custom@3.1.17) (2024-04-15) + +**Note:** Version bump only for package @aws-amplify/amplify-category-custom + + + + + +## [3.1.16](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-custom@3.1.15...@aws-amplify/amplify-category-custom@3.1.16) (2024-03-29) + +**Note:** Version bump only for package @aws-amplify/amplify-category-custom + + + + + +## [3.1.15](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-custom@3.1.14...@aws-amplify/amplify-category-custom@3.1.15) (2024-03-06) + +**Note:** Version bump only for package @aws-amplify/amplify-category-custom + + + + + +## [3.1.14](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-custom@3.1.13...@aws-amplify/amplify-category-custom@3.1.14) (2023-12-11) + +**Note:** Version bump only for package @aws-amplify/amplify-category-custom + + + + + +## [3.1.13](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-custom@3.1.11...@aws-amplify/amplify-category-custom@3.1.13) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [3.1.12](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-custom@3.1.11...@aws-amplify/amplify-category-custom@3.1.12) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-category-custom + + + + + +## [3.1.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-custom@3.1.10...@aws-amplify/amplify-category-custom@3.1.11) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-category-custom + + + + + +## [3.1.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-custom@3.1.9...@aws-amplify/amplify-category-custom@3.1.10) (2023-10-12) + +**Note:** Version bump only for package @aws-amplify/amplify-category-custom + + + + + +## [3.1.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-custom@3.1.8...@aws-amplify/amplify-category-custom@3.1.9) (2023-10-05) + +**Note:** Version bump only for package @aws-amplify/amplify-category-custom + + + + + +## [3.1.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-custom@3.1.7...@aws-amplify/amplify-category-custom@3.1.8) (2023-10-03) + +**Note:** Version bump only for package @aws-amplify/amplify-category-custom + + + + + +## [3.1.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-custom@3.1.6...@aws-amplify/amplify-category-custom@3.1.7) (2023-09-22) + +**Note:** Version bump only for package @aws-amplify/amplify-category-custom + + + + + +## [3.1.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-custom@3.1.5...@aws-amplify/amplify-category-custom@3.1.6) (2023-08-31) + +**Note:** Version bump only for package @aws-amplify/amplify-category-custom + + + + + +## [3.1.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-custom@3.1.4...@aws-amplify/amplify-category-custom@3.1.5) (2023-08-17) + +**Note:** Version bump only for package @aws-amplify/amplify-category-custom + + + + + +## [3.1.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-custom@3.1.3...@aws-amplify/amplify-category-custom@3.1.4) (2023-08-09) + +**Note:** Version bump only for package @aws-amplify/amplify-category-custom + + + + + +## [3.1.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-custom@3.1.2...@aws-amplify/amplify-category-custom@3.1.3) (2023-07-28) + +**Note:** Version bump only for package @aws-amplify/amplify-category-custom + + + + + +## [3.1.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-custom@3.1.1...@aws-amplify/amplify-category-custom@3.1.2) (2023-07-27) + +**Note:** Version bump only for package @aws-amplify/amplify-category-custom + + + + + +## [3.1.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-custom@3.1.0...@aws-amplify/amplify-category-custom@3.1.1) (2023-07-24) + + +### Bug Fixes + +* skip hooks if flag detected ([a58e13c](https://github.com/aws-amplify/amplify-cli/commit/a58e13c55fb7dfd9e4f4a945e96d429cbecd2f9a)) + + + + + +# [3.1.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-custom@3.0.9...@aws-amplify/amplify-category-custom@3.1.0) (2023-07-20) + + +### Features + +* lambda support for yarn2/3 and pnpm package managers ([#12750](https://github.com/aws-amplify/amplify-cli/issues/12750)) ([fd18195](https://github.com/aws-amplify/amplify-cli/commit/fd181952672efb0479ca6955c0c7a45fe248d1b1)) + + + + + +## [3.0.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-custom@3.0.8...@aws-amplify/amplify-category-custom@3.0.9) (2023-06-13) + +**Note:** Version bump only for package @aws-amplify/amplify-category-custom + + + + + ## [3.0.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-custom@3.0.6...@aws-amplify/amplify-category-custom@3.0.8) (2023-05-25) diff --git a/packages/amplify-category-custom/package.json b/packages/amplify-category-custom/package.json index d75c62c40f9..61b85a7a8e7 100644 --- a/packages/amplify-category-custom/package.json +++ b/packages/amplify-category-custom/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-category-custom", - "version": "3.0.8", + "version": "3.1.25", "description": "amplify-cli custom resources plugin", "repository": { "type": "git", @@ -26,9 +26,9 @@ "access": "public" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.0.8", - "@aws-amplify/amplify-prompts": "2.7.0", - "aws-cdk-lib": "~2.68.0", + "@aws-amplify/amplify-cli-core": "4.3.11", + "@aws-amplify/amplify-prompts": "2.8.6", + "aws-cdk-lib": "~2.177.0", "execa": "^5.1.1", "fs-extra": "^8.1.0", "glob": "^7.2.0", @@ -37,6 +37,7 @@ }, "devDependencies": { "@types/lodash": "^4.14.149", + "jest": "^29.5.0", "rimraf": "^3.0.2" }, "jest": { diff --git a/packages/amplify-category-custom/resources/package.json b/packages/amplify-category-custom/resources/package.json index 541adcfde46..2d578af0eb6 100644 --- a/packages/amplify-category-custom/resources/package.json +++ b/packages/amplify-category-custom/resources/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "@aws-amplify/cli-extensibility-helper": "^3.0.0", - "aws-cdk-lib": "~2.68.0", + "aws-cdk-lib": "~2.177.0", "constructs": "^10.0.5" }, "devDependencies": { diff --git a/packages/amplify-category-custom/resources/sample.npmrc b/packages/amplify-category-custom/resources/sample.npmrc new file mode 100644 index 00000000000..9b233e42bf4 --- /dev/null +++ b/packages/amplify-category-custom/resources/sample.npmrc @@ -0,0 +1 @@ +resolution-mode=highest diff --git a/packages/amplify-category-custom/src/__tests__/commands/update.test.ts b/packages/amplify-category-custom/src/__tests__/commands/update.test.ts index 23c2eb96c30..b32d61b8e83 100644 --- a/packages/amplify-category-custom/src/__tests__/commands/update.test.ts +++ b/packages/amplify-category-custom/src/__tests__/commands/update.test.ts @@ -8,7 +8,7 @@ jest.mock('../../walkthroughs/cloudformation-walkthrough'); jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('@aws-amplify/amplify-prompts'); -let mockAmplifyMeta = { +const mockAmplifyMeta = { custom: { mockcdkresourcename: { service: CDK_SERVICE_NAME, diff --git a/packages/amplify-category-custom/src/__tests__/utils/build-custom-resources.test.ts b/packages/amplify-category-custom/src/__tests__/utils/build-custom-resources.test.ts index 7396dfa476a..0eb9e5d2cfe 100644 --- a/packages/amplify-category-custom/src/__tests__/utils/build-custom-resources.test.ts +++ b/packages/amplify-category-custom/src/__tests__/utils/build-custom-resources.test.ts @@ -43,6 +43,7 @@ jest.mock('@aws-amplify/amplify-cli-core', () => ({ readJson: jest.fn(), stringify: jest.fn(), }, + skipHooks: jest.fn().mockReturnValue(false), })); describe('build custom resources scenarios', () => { diff --git a/packages/amplify-category-custom/src/__tests__/utils/dependency-management-utils.test.ts b/packages/amplify-category-custom/src/__tests__/utils/dependency-management-utils.test.ts index 6a5e0a3ed60..fd15322b234 100644 --- a/packages/amplify-category-custom/src/__tests__/utils/dependency-management-utils.test.ts +++ b/packages/amplify-category-custom/src/__tests__/utils/dependency-management-utils.test.ts @@ -26,29 +26,8 @@ pathManager.getBackendDirPath = jest.fn().mockReturnValue('mockTargetDir'); pathManager.getResourceDirectoryPath = jest.fn().mockReturnValue('mockResourceDir'); describe('getResourceCfnOutputAttributes() scenarios', () => { - let mockContext: $TSContext; - beforeEach(() => { jest.clearAllMocks(); - mockContext = { - amplify: { - openEditor: jest.fn(), - updateamplifyMetaAfterResourceAdd: jest.fn(), - copyBatch: jest.fn(), - getResourceStatus: jest.fn().mockResolvedValue({ - allResources: [ - { - resourceName: 'mockresource1', - service: 'customCDK', - }, - { - resourceName: 'mockresource2', - service: 'customCDK', - }, - ], - }), - }, - } as unknown as $TSContext; }); it('get resource attr for resources with build folder with one cfn file', async () => { @@ -109,29 +88,8 @@ describe('getResourceCfnOutputAttributes() scenarios', () => { }); describe('getAllResources() scenarios', () => { - let mockContext: $TSContext; - beforeEach(() => { jest.clearAllMocks(); - mockContext = { - amplify: { - openEditor: jest.fn(), - updateamplifyMetaAfterResourceAdd: jest.fn(), - copyBatch: jest.fn(), - getResourceStatus: jest.fn().mockResolvedValue({ - allResources: [ - { - resourceName: 'mockresource1', - service: 'customCDK', - }, - { - resourceName: 'mockresource2', - service: 'customCDK', - }, - ], - }), - }, - } as unknown as $TSContext; }); it('get all resource types', async () => { @@ -161,29 +119,8 @@ describe('getAllResources() scenarios', () => { }); describe('addCDKResourceDependency() scenarios', () => { - let mockContext: $TSContext; - beforeEach(() => { jest.clearAllMocks(); - mockContext = { - amplify: { - openEditor: jest.fn(), - updateamplifyMetaAfterResourceAdd: jest.fn(), - copyBatch: jest.fn(), - getResourceStatus: jest.fn().mockResolvedValue({ - allResources: [ - { - resourceName: 'mockresource1', - service: 'customCDK', - }, - { - resourceName: 'mockresource2', - service: 'customCDK', - }, - ], - }), - }, - } as unknown as $TSContext; }); it('get depenencies for a custom CDK stack', async () => { diff --git a/packages/amplify-category-custom/src/__tests__/walkthroughts/cdk-walkthrough.test.ts b/packages/amplify-category-custom/src/__tests__/walkthroughts/cdk-walkthrough.test.ts index 5eb071b95bb..f07fdcf82b5 100644 --- a/packages/amplify-category-custom/src/__tests__/walkthroughts/cdk-walkthrough.test.ts +++ b/packages/amplify-category-custom/src/__tests__/walkthroughts/cdk-walkthrough.test.ts @@ -22,7 +22,7 @@ pathManager.getBackendDirPath = jest.fn().mockReturnValue('mockTargetDir'); (JSONUtilities.writeJson = jest.fn()), (JSONUtilities.readJson = jest.fn()); const buildCustomResources_mock = buildCustomResources as jest.MockedFunction; -let customResourceNameQuestion_mock = customResourceNameQuestion as jest.MockedFunction; +const customResourceNameQuestion_mock = customResourceNameQuestion as jest.MockedFunction; customResourceNameQuestion_mock.mockResolvedValue('customresoourcename'); describe('addCDKWalkthrough scenarios', () => { @@ -46,6 +46,6 @@ describe('addCDKWalkthrough scenarios', () => { expect(buildCustomResources_mock).toHaveBeenCalledWith(mockContext, 'customresoourcename'); expect(mockContext.amplify.openEditor).toHaveBeenCalledTimes(1); expect(mockContext.amplify.updateamplifyMetaAfterResourceAdd).toHaveBeenCalledTimes(1); - expect(fs.writeFileSync).toHaveBeenCalledTimes(1); + expect(fs.writeFileSync).toHaveBeenCalledTimes(2); }); }); diff --git a/packages/amplify-category-custom/src/__tests__/walkthroughts/cloudformation-walkthrough.test.ts b/packages/amplify-category-custom/src/__tests__/walkthroughts/cloudformation-walkthrough.test.ts index 97d9fe9f098..db47d62f655 100644 --- a/packages/amplify-category-custom/src/__tests__/walkthroughts/cloudformation-walkthrough.test.ts +++ b/packages/amplify-category-custom/src/__tests__/walkthroughts/cloudformation-walkthrough.test.ts @@ -19,7 +19,7 @@ jest.mock('fs-extra', () => ({ pathManager.getBackendDirPath = jest.fn().mockReturnValue('mockTargetDir'); -let customResourceNameQuestion_mock = customResourceNameQuestion as jest.MockedFunction; +const customResourceNameQuestion_mock = customResourceNameQuestion as jest.MockedFunction; customResourceNameQuestion_mock.mockResolvedValue('customresoourcename'); describe('addCFNWalkthrough scenarios', () => { diff --git a/packages/amplify-category-custom/src/utils/build-custom-resources.ts b/packages/amplify-category-custom/src/utils/build-custom-resources.ts index edea003d43a..007ced69b6d 100644 --- a/packages/amplify-category-custom/src/utils/build-custom-resources.ts +++ b/packages/amplify-category-custom/src/utils/build-custom-resources.ts @@ -15,6 +15,7 @@ import * as path from 'path'; import { categoryName, TYPES_DIR_NAME, AMPLIFY_RESOURCES_TYPE_DEF_FILENAME } from './constants'; import { getAllResources } from './dependency-management-utils'; import { generateCloudFormationFromCDK } from './generate-cfn-from-cdk'; +import { skipHooks } from '@aws-amplify/amplify-cli-core'; type ResourceMeta = ResourceTuple & { service: string; @@ -69,14 +70,18 @@ export const generateDependentResourcesType = async (): Promise => { const buildResource = async (resource: ResourceMeta): Promise => { const targetDir = path.resolve(path.join(pathManager.getBackendDirPath(), categoryName, resource.resourceName)); - + if (skipHooks()) { + throw new AmplifyError('DeploymentError', { + message: 'A flag to disable custom resources has been detected, please deploy from a different environment.', + }); // should rollback + } // generate dynamic types for Amplify resources await generateDependentResourcesType(); const packageManager = await getPackageManager(targetDir); if (packageManager === null) { - throw new Error('No package manager found. Please install npm or yarn to compile overrides for this project.'); + throw new Error('No package manager found. Please install npm, yarn, or pnpm to compile overrides for this project.'); } try { diff --git a/packages/amplify-category-custom/src/walkthroughs/cdk-walkthrough.ts b/packages/amplify-category-custom/src/walkthroughs/cdk-walkthrough.ts index 2481718e6f0..fa3fef1f3de 100644 --- a/packages/amplify-category-custom/src/walkthroughs/cdk-walkthrough.ts +++ b/packages/amplify-category-custom/src/walkthroughs/cdk-walkthrough.ts @@ -57,4 +57,7 @@ async function generateSkeletonDir(resourceName: string) { const cdkFilepath = path.join(targetDir, 'cdk-stack.ts'); fs.writeFileSync(cdkFilepath, fs.readFileSync(path.join(srcResourceDirPath, 'cdk-stack.ts.sample'))); + + const npmRcPath = path.join(targetDir, '.npmrc'); + fs.writeFileSync(npmRcPath, fs.readFileSync(path.join(srcResourceDirPath, 'sample.npmrc'))); } diff --git a/packages/amplify-category-function/CHANGELOG.md b/packages/amplify-category-function/CHANGELOG.md index fb43e4376ae..fc3b395238e 100644 --- a/packages/amplify-category-function/CHANGELOG.md +++ b/packages/amplify-category-function/CHANGELOG.md @@ -3,6 +3,251 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.7.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-function@5.7.10...@aws-amplify/amplify-category-function@5.7.11) (2025-01-30) + +**Note:** Version bump only for package @aws-amplify/amplify-category-function + + + + + +## [5.7.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-function@5.7.9...@aws-amplify/amplify-category-function@5.7.10) (2024-08-02) + +**Note:** Version bump only for package @aws-amplify/amplify-category-function + + + + + +## [5.7.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-function@5.7.8...@aws-amplify/amplify-category-function@5.7.9) (2024-06-27) + +**Note:** Version bump only for package @aws-amplify/amplify-category-function + + + + + +## [5.7.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-function@5.7.7...@aws-amplify/amplify-category-function@5.7.8) (2024-06-20) + +**Note:** Version bump only for package @aws-amplify/amplify-category-function + + + + + +## [5.7.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-function@5.7.6...@aws-amplify/amplify-category-function@5.7.7) (2024-06-06) + +**Note:** Version bump only for package @aws-amplify/amplify-category-function + + + + + +## [5.7.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-function@5.7.5...@aws-amplify/amplify-category-function@5.7.6) (2024-05-24) + +**Note:** Version bump only for package @aws-amplify/amplify-category-function + + + + + +## [5.7.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-function@5.7.4...@aws-amplify/amplify-category-function@5.7.5) (2024-05-07) + +**Note:** Version bump only for package @aws-amplify/amplify-category-function + + + + + +## [5.7.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-function@5.7.3...@aws-amplify/amplify-category-function@5.7.4) (2024-04-18) + +**Note:** Version bump only for package @aws-amplify/amplify-category-function + + + + + +## [5.7.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-function@5.7.2...@aws-amplify/amplify-category-function@5.7.3) (2024-04-15) + + +### Bug Fixes + +* upgrade Go runtime and fix e2e ([#13671](https://github.com/aws-amplify/amplify-cli/issues/13671)) ([395f717](https://github.com/aws-amplify/amplify-cli/commit/395f717cf52e7beef76f00ee08d37877138b0c30)) + + + + + +## [5.7.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-function@5.7.1...@aws-amplify/amplify-category-function@5.7.2) (2024-03-29) + +**Note:** Version bump only for package @aws-amplify/amplify-category-function + + + + + +## [5.7.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-function@5.7.0...@aws-amplify/amplify-category-function@5.7.1) (2024-03-06) + + +### Reverts + +* Revert "chore: bump data package versions (#13486)" (#13487) ([3280d40](https://github.com/aws-amplify/amplify-cli/commit/3280d40a5ab50c675b0e2b8050ad35a69c83cdc2)), closes [#13486](https://github.com/aws-amplify/amplify-cli/issues/13486) [#13487](https://github.com/aws-amplify/amplify-cli/issues/13487) + + + + + +# [5.7.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-function@5.6.4...@aws-amplify/amplify-category-function@5.7.0) (2023-12-11) + + +### Features + +* bump data dependencies to launch RDS feature ([#13409](https://github.com/aws-amplify/amplify-cli/issues/13409)) ([7fbf29f](https://github.com/aws-amplify/amplify-cli/commit/7fbf29f56eb7335d20de0b5526fbed7795a2af09)) + + + + + +## [5.6.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-function@5.6.2...@aws-amplify/amplify-category-function@5.6.4) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [5.6.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-function@5.6.2...@aws-amplify/amplify-category-function@5.6.3) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-category-function + + + + + +## [5.6.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-function@5.6.1...@aws-amplify/amplify-category-function@5.6.2) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-category-function + + + + + +## [5.6.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-function@5.6.0...@aws-amplify/amplify-category-function@5.6.1) (2023-10-12) + + +### Bug Fixes + +* add retained secrets to syncSecretDeltas ([#13300](https://github.com/aws-amplify/amplify-cli/issues/13300)) ([f3c9c05](https://github.com/aws-amplify/amplify-cli/commit/f3c9c05617b55560ac78f824cf71d4001cb5c58b)) + + + + + +# [5.6.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-function@5.5.3...@aws-amplify/amplify-category-function@5.6.0) (2023-10-05) + + +### Features + +* **amplify-util-uibuilder:** amplify js backwards compatibility ([#13288](https://github.com/aws-amplify/amplify-cli/issues/13288)) ([2db3e18](https://github.com/aws-amplify/amplify-cli/commit/2db3e181cf06954085eb8fade0b26162672327db)) + + + + + +## [5.5.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-function@5.5.2...@aws-amplify/amplify-category-function@5.5.3) (2023-10-03) + +**Note:** Version bump only for package @aws-amplify/amplify-category-function + + + + + +## [5.5.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-function@5.5.1...@aws-amplify/amplify-category-function@5.5.2) (2023-09-22) + +**Note:** Version bump only for package @aws-amplify/amplify-category-function + + + + + +## [5.5.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-function@5.5.0...@aws-amplify/amplify-category-function@5.5.1) (2023-08-31) + +**Note:** Version bump only for package @aws-amplify/amplify-category-function + + + + + +# [5.5.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-function@5.4.4...@aws-amplify/amplify-category-function@5.5.0) (2023-08-17) + + +### Features + +* generate components using graphql ([1568581](https://github.com/aws-amplify/amplify-cli/commit/15685810460881aa71e88724398b9be05ba53781)) + + + + + +## [5.4.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-function@5.4.3...@aws-amplify/amplify-category-function@5.4.4) (2023-08-09) + +**Note:** Version bump only for package @aws-amplify/amplify-category-function + + + + + +## [5.4.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-function@5.4.2...@aws-amplify/amplify-category-function@5.4.3) (2023-07-28) + +**Note:** Version bump only for package @aws-amplify/amplify-category-function + + + + + +## [5.4.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-function@5.4.1...@aws-amplify/amplify-category-function@5.4.2) (2023-07-27) + +**Note:** Version bump only for package @aws-amplify/amplify-category-function + + + + + +## [5.4.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-function@5.4.0...@aws-amplify/amplify-category-function@5.4.1) (2023-07-24) + +**Note:** Version bump only for package @aws-amplify/amplify-category-function + + + + + +# [5.4.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-function@5.3.4...@aws-amplify/amplify-category-function@5.4.0) (2023-07-20) + + +### Features + +* lambda support for yarn2/3 and pnpm package managers ([#12750](https://github.com/aws-amplify/amplify-cli/issues/12750)) ([fd18195](https://github.com/aws-amplify/amplify-cli/commit/fd181952672efb0479ca6955c0c7a45fe248d1b1)) +* uibuilder codegen service ([#12896](https://github.com/aws-amplify/amplify-cli/issues/12896)) ([3fe2f98](https://github.com/aws-amplify/amplify-cli/commit/3fe2f98a99a9daf22efccb23a031882ea2be899b)) + + + + + +## [5.3.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-function@5.3.3...@aws-amplify/amplify-category-function@5.3.4) (2023-06-13) + + +### Bug Fixes + +* functions e2e tests on windows ([#12745](https://github.com/aws-amplify/amplify-cli/issues/12745)) ([0de4529](https://github.com/aws-amplify/amplify-cli/commit/0de45299fbaafb090893f96c1884cdcff321f511)) +* throw message when adding lambda function with same name ([#12623](https://github.com/aws-amplify/amplify-cli/issues/12623)) ([0819db4](https://github.com/aws-amplify/amplify-cli/commit/0819db49c0f3b1057c0e5ca94d674f2dc1cc3d77)) + + + + + ## [5.3.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-function@5.3.1...@aws-amplify/amplify-category-function@5.3.3) (2023-05-25) diff --git a/packages/amplify-category-function/package.json b/packages/amplify-category-function/package.json index 9f93f4487f5..3214c4a7f79 100644 --- a/packages/amplify-category-function/package.json +++ b/packages/amplify-category-function/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-category-function", - "version": "5.3.3", + "version": "5.7.11", "description": "amplify-cli function plugin", "repository": { "type": "git", @@ -26,19 +26,19 @@ "access": "public" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.0.8", - "@aws-amplify/amplify-environment-parameters": "1.6.3", - "@aws-amplify/amplify-function-plugin-interface": "1.10.2", - "@aws-amplify/amplify-prompts": "2.7.0", + "@aws-amplify/amplify-cli-core": "4.3.11", + "@aws-amplify/amplify-environment-parameters": "1.9.16", + "@aws-amplify/amplify-function-plugin-interface": "1.12.1", + "@aws-amplify/amplify-prompts": "2.8.6", "archiver": "^5.3.0", - "aws-sdk": "^2.1354.0", + "aws-sdk": "^2.1464.0", "chalk": "^4.1.1", "cloudform-types": "^4.2.0", "enquirer": "^2.3.6", "folder-hash": "^4.0.2", "fs-extra": "^8.1.0", "globby": "^11.0.3", - "graphql-transformer-core": "^8.1.2", + "graphql-transformer-core": "^8.2.13", "inquirer": "^7.3.3", "inquirer-datepicker": "^2.0.0", "jstreemap": "^1.28.2", @@ -47,7 +47,8 @@ "uuid": "^8.3.2" }, "devDependencies": { - "@types/folder-hash": "^4.0.1" + "@types/folder-hash": "^4.0.1", + "jest": "^29.5.0" }, "jest": { "collectCoverage": true, diff --git a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/index.test.ts b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/index.test.ts index 2a410148006..79bac54b66d 100644 --- a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/index.test.ts +++ b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/index.test.ts @@ -33,7 +33,7 @@ const buildFunction_mock = buildFunction as jest.MockedFunction { beforeEach(() => jest.clearAllMocks()); - it('opens the correct service console', () => { + it('opens the correct service console', async () => { const contextStub = { amplify: { getProjectMeta: () => ({ @@ -45,14 +45,14 @@ describe('awscloudformation function provider', () => { }), }, } as $TSContext; - openConsole(contextStub, ServiceName.LambdaFunction); + await openConsole(contextStub, ServiceName.LambdaFunction); const openMock = open as any; expect(openMock.mock.calls.length).toBe(1); expect(openMock.mock.calls[0][0]).toMatchSnapshot(); openMock.mockClear(); - openConsole(contextStub, ServiceName.LambdaLayer); + await openConsole(contextStub, ServiceName.LambdaLayer); expect(openMock.mock.calls.length).toBe(1); expect(openMock.mock.calls[0][0]).toMatchSnapshot(); }); diff --git a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/addLayerToFunctionWalkthrough.test.ts b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/addLayerToFunctionWalkthrough.test.ts index c22e5279f9e..5f175aa1fde 100644 --- a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/addLayerToFunctionWalkthrough.test.ts +++ b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/addLayerToFunctionWalkthrough.test.ts @@ -172,7 +172,7 @@ describe('add layer to function walkthrough', () => { }); it('asks to reorder the selected layers', async () => { - const result = await addLayersToFunctionWalkthrough(getContextStubWith(confirmPromptTrue_mock), runtimeStub); + await addLayersToFunctionWalkthrough(getContextStubWith(confirmPromptTrue_mock), runtimeStub); expect(askLayerOrderQuestion_mock.mock.calls.length).toBe(1); }); diff --git a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/lambda-layer-cloud-formation-template.test.ts b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/lambda-layer-cloud-formation-template.test.ts index 9bb18950d94..9b3e8c573b7 100644 --- a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/lambda-layer-cloud-formation-template.test.ts +++ b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/utils/lambda-layer-cloud-formation-template.test.ts @@ -114,7 +114,7 @@ describe('test layer CFN generation functions', () => { }); it('should generate the expected CFN for an existing LL version and new version with complex permissions', () => { - let permissions: LayerPermission[] = [ + const permissions: LayerPermission[] = [ { type: PermissionEnum.Private }, { type: PermissionEnum.AwsAccounts, accounts: ['123456789012', '098765432112'] }, { type: PermissionEnum.AwsOrg, orgs: ['o-123456789012', 'o-098765432112'] }, @@ -129,7 +129,7 @@ describe('test layer CFN generation functions', () => { it('should generate the expected CFN for an existing LL version and new version with public permission', () => { // Public should override other permissions - let permissions: LayerPermission[] = [ + const permissions: LayerPermission[] = [ { type: PermissionEnum.Private }, { type: PermissionEnum.AwsAccounts, accounts: ['123456789012', '098765432112'] }, { type: PermissionEnum.AwsOrg, orgs: ['o-123456789012', 'o-098765432112'] }, diff --git a/packages/amplify-category-function/src/commands/function/build.ts b/packages/amplify-category-function/src/commands/function/build.ts index f516408904a..9abb6a1b617 100644 --- a/packages/amplify-category-function/src/commands/function/build.ts +++ b/packages/amplify-category-function/src/commands/function/build.ts @@ -28,15 +28,11 @@ export const run = async (context: $TSContext) => { await packageResource(context, resource); } } catch (err) { - context.print.info(err.stack); - context.print.error('There was an error building the function resources'); - const amplifyError = new AmplifyError( + throw new AmplifyError( 'PackagingLambdaFunctionError', { message: `There was an error building the function resources ${err.message}` }, err, ); - void context.usageData.emitError(amplifyError); - process.exitCode = 1; } }; diff --git a/packages/amplify-category-function/src/provider-utils/awscloudformation/index.ts b/packages/amplify-category-function/src/provider-utils/awscloudformation/index.ts index dc8649ce7d9..eee2565855c 100644 --- a/packages/amplify-category-function/src/provider-utils/awscloudformation/index.ts +++ b/packages/amplify-category-function/src/provider-utils/awscloudformation/index.ts @@ -16,6 +16,7 @@ import { FunctionTriggerParameters, LambdaLayer, } from '@aws-amplify/amplify-function-plugin-interface'; +import { printer } from '@aws-amplify/amplify-prompts'; import * as fs from 'fs-extra'; import _ from 'lodash'; import * as path from 'path'; @@ -127,19 +128,18 @@ export async function addFunctionResource( if (completeParams.skipNextSteps) { return completeParams.resourceName; } - const { print } = context; const customPoliciesPath = pathManager.getCustomPoliciesPath(category, completeParams.resourceName); - print.success(`Successfully added resource ${completeParams.resourceName} locally.`); - print.info(''); - print.success('Next steps:'); - print.info(`Check out sample function code generated in /amplify/backend/function/${completeParams.resourceName}/src`); - print.info('"amplify function build" builds all of your functions currently in the project'); - print.info('"amplify mock function " runs your function locally'); - print.info(`To access AWS resources outside of this Amplify app, edit the ${customPoliciesPath}`); - print.info('"amplify push" builds all of your local backend resources and provisions them in the cloud'); - print.info( + printer.success(`Successfully added resource ${completeParams.resourceName} locally.`); + printer.info(''); + printer.success('Next steps:'); + printer.info(`Check out sample function code generated in /amplify/backend/function/${completeParams.resourceName}/src`); + printer.info('"amplify function build" builds all of your functions currently in the project'); + printer.info('"amplify mock function " runs your function locally'); + printer.info(`To access AWS resources outside of this Amplify app, edit the ${customPoliciesPath}`); + printer.info('"amplify push" builds all of your local backend resources and provisions them in the cloud'); + printer.info( '"amplify publish" builds all of your local backend and front-end resources (if you added hosting category) and provisions them in the cloud', ); diff --git a/packages/amplify-category-function/src/provider-utils/awscloudformation/secrets/functionSecretsStateManager.ts b/packages/amplify-category-function/src/provider-utils/awscloudformation/secrets/functionSecretsStateManager.ts index eedab135367..6f3f2db2860 100644 --- a/packages/amplify-category-function/src/provider-utils/awscloudformation/secrets/functionSecretsStateManager.ts +++ b/packages/amplify-category-function/src/provider-utils/awscloudformation/secrets/functionSecretsStateManager.ts @@ -100,7 +100,11 @@ export class FunctionSecretsStateManager { return; } const cloudSecretNames = await this.getCloudFunctionSecretNames(functionName); - const addedSecrets = localSecretNames.filter((name) => !cloudSecretNames.includes(name)); + const retainedSecrets: string[] = []; + const addedSecrets: string[] = []; + + localSecretNames.forEach((name) => (cloudSecretNames.includes(name) ? retainedSecrets.push(name) : addedSecrets.push(name))); + if (!addedSecrets.length) { return; } @@ -118,8 +122,12 @@ export class FunctionSecretsStateManager { link: 'https://docs.amplify.aws/cli/reference/ssm-parameter-store/#manually-creating-parameters', }); } + + const current = secretNamesToSecretDeltas(retainedSecrets); const delta = await prePushMissingSecretsWalkthrough(functionName, addedSecrets); - await this.syncSecretDeltas(delta, functionName); + const secretDeltas = { ...current, ...delta }; + + await this.syncSecretDeltas(secretDeltas, functionName); }; /** diff --git a/packages/amplify-category-function/src/provider-utils/awscloudformation/secrets/secretDeltaUtilities.ts b/packages/amplify-category-function/src/provider-utils/awscloudformation/secrets/secretDeltaUtilities.ts index 1334c538a95..54479ad37c5 100644 --- a/packages/amplify-category-function/src/provider-utils/awscloudformation/secrets/secretDeltaUtilities.ts +++ b/packages/amplify-category-function/src/provider-utils/awscloudformation/secrets/secretDeltaUtilities.ts @@ -15,7 +15,7 @@ export const hasExistingSecrets = (secretDeltas: SecretDeltas) => */ export const getExistingSecrets = (secretDeltas: SecretDeltas) => Object.entries(secretDeltas) - .filter(([_, delta]) => existingSecretDeltaPredicate(delta)) + .filter(([, delta]) => existingSecretDeltaPredicate(delta)) .reduce((acc, [secretName, secretDelta]) => ({ ...acc, [secretName]: secretDelta }), {} as SecretDeltas); /** diff --git a/packages/amplify-category-function/src/provider-utils/awscloudformation/service-walkthroughs/lambda-walkthrough.ts b/packages/amplify-category-function/src/provider-utils/awscloudformation/service-walkthroughs/lambda-walkthrough.ts index 680ea13accc..3e589dfb8b6 100644 --- a/packages/amplify-category-function/src/provider-utils/awscloudformation/service-walkthroughs/lambda-walkthrough.ts +++ b/packages/amplify-category-function/src/provider-utils/awscloudformation/service-walkthroughs/lambda-walkthrough.ts @@ -38,6 +38,8 @@ import { autoGeneratedParameters } from './autogeneratedParameters'; import { askExecRolePermissionsQuestions } from './execPermissionsWalkthrough'; import { generalQuestionsWalkthrough, settingsUpdateSelection } from './generalQuestionsWalkthrough'; import { scheduleWalkthrough } from './scheduleWalkthrough'; +import { printer } from '@aws-amplify/amplify-prompts'; +import { packageManagerWalkthrough } from './packageManagerWalkthrough'; /** * Starting point for CLI walkthrough that generates a lambda function @@ -72,10 +74,10 @@ export const createWalkthrough = async ( } // list out the advanced settings before asking whether to configure them - context.print.info(''); - context.print.success('Available advanced settings:'); + printer.blankLine(); + printer.success('Available advanced settings:'); advancedSettingsList.forEach((setting) => context.print.info('- '.concat(setting))); - context.print.info(''); + printer.blankLine(); // ask whether to configure advanced settings if (await context.amplify.confirmPrompt('Do you want to configure advanced settings?', false)) { @@ -110,6 +112,9 @@ export const createWalkthrough = async ( Object.keys(getStoredEnvironmentVariables(templateParameters.functionName)), ), ); + + // ask scheduling Lambda questions and merge in results + templateParameters = merge(templateParameters, await packageManagerWalkthrough(templateParameters.runtime.value)); } return templateParameters; diff --git a/packages/amplify-category-function/src/provider-utils/awscloudformation/service-walkthroughs/packageManagerWalkthrough.ts b/packages/amplify-category-function/src/provider-utils/awscloudformation/service-walkthroughs/packageManagerWalkthrough.ts new file mode 100644 index 00000000000..148bf27a288 --- /dev/null +++ b/packages/amplify-category-function/src/provider-utils/awscloudformation/service-walkthroughs/packageManagerWalkthrough.ts @@ -0,0 +1,36 @@ +import { getPackageManagerByType, packageManagers, PackageManagerType } from '@aws-amplify/amplify-cli-core'; +import { BuildType, FunctionParameters } from '@aws-amplify/amplify-function-plugin-interface'; +import { minLength, prompter } from '@aws-amplify/amplify-prompts'; + +export const packageManagerWalkthrough = async (runtime: string): Promise> => { + if (runtime === 'nodejs') { + const packageManagerOptions = Object.values(packageManagers).map((pm) => ({ + name: pm.displayValue, + value: pm.packageManager as string, + })); + + const packageManager = (await prompter.pick( + 'Choose the package manager that you want to use:', + packageManagerOptions, + )) as PackageManagerType; + + return { + scripts: { + build: await getBuildCommand(packageManager), + }, + }; + } + + return {}; +}; + +const getBuildCommand = async (packageManager: PackageManagerType): Promise => { + if (packageManager === 'custom') { + return prompter.input('Enter command or script path to build your function:', { + validate: minLength(1), + }); + } else { + const packageManagerInstance = getPackageManagerByType(packageManager); + return [packageManagerInstance.executable].concat(packageManagerInstance.getInstallArgs(BuildType.PROD)).join(' '); + } +}; diff --git a/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/buildFunction.ts b/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/buildFunction.ts index 701ff6f6230..f7b091b3efd 100644 --- a/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/buildFunction.ts +++ b/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/buildFunction.ts @@ -1,5 +1,6 @@ import { $TSContext, pathManager, AmplifyError } from '@aws-amplify/amplify-cli-core'; import { BuildRequest, BuildType, FunctionRuntimeLifecycleManager } from '@aws-amplify/amplify-function-plugin-interface'; +import { printer } from '@aws-amplify/amplify-prompts'; import { categoryName } from '../../../constants'; export const buildFunction = async ( @@ -15,31 +16,26 @@ export const buildFunction = async ( const depCheck = await runtimePlugin.checkDependencies(breadcrumbs.functionRuntime); if (!depCheck.hasRequiredDependencies) { - context.print.error(depCheck.errorMessage || `You are missing dependencies required to package ${resourceName}`); + printer.error(depCheck.errorMessage || `You are missing dependencies required to package ${resourceName}`); throw new AmplifyError('PackagingLambdaFunctionError', { message: `Missing required dependencies to package ${resourceName}` }); } const prevBuildTime = lastBuildTimestamp ? new Date(lastBuildTimestamp) : undefined; // build the function - let rebuilt = false; - if (breadcrumbs.scripts && breadcrumbs.scripts.build) { - // TODO - throw new AmplifyError('NotImplementedError', { message: 'Executing custom build scripts is not yet implemented' }); - } else { - const buildRequest: BuildRequest = { - buildType, - srcRoot: pathManager.getResourceDirectoryPath(undefined, categoryName, resourceName), - runtime: breadcrumbs.functionRuntime, - legacyBuildHookParams: { - projectRoot: pathManager.findProjectRoot(), - resourceName, - }, - lastBuildTimeStamp: prevBuildTime, - lastBuildType, - }; - rebuilt = (await runtimePlugin.build(buildRequest)).rebuilt; - } + const buildRequest: BuildRequest = { + buildType, + srcRoot: pathManager.getResourceDirectoryPath(undefined, categoryName, resourceName), + runtime: breadcrumbs.functionRuntime, + legacyBuildHookParams: { + projectRoot: pathManager.findProjectRoot(), + resourceName, + }, + lastBuildTimeStamp: prevBuildTime, + lastBuildType, + scripts: breadcrumbs.scripts, + }; + const rebuilt = (await runtimePlugin.build(buildRequest)).rebuilt; if (rebuilt) { context.amplify.updateamplifyMetaAfterBuild({ category: categoryName, resourceName }, buildType.toString()); return new Date().toISOString(); diff --git a/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/functionPluginLoader.ts b/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/functionPluginLoader.ts index 835994b5f85..6aac0f6f5f1 100644 --- a/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/functionPluginLoader.ts +++ b/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/functionPluginLoader.ts @@ -1,19 +1,21 @@ -import inquirer from 'inquirer'; +import { $TSAny, $TSContext } from '@aws-amplify/amplify-cli-core'; import { FunctionParameters, - FunctionTemplateCondition, FunctionRuntimeCondition, + FunctionRuntimeLifecycleManager, FunctionRuntimeParameters, + FunctionTemplateCondition, FunctionTemplateParameters, - FunctionRuntimeLifecycleManager, RuntimeContributionRequest, TemplateContributionRequest, } from '@aws-amplify/amplify-function-plugin-interface'; -import { ServiceName } from './constants'; +import { printer } from '@aws-amplify/amplify-prompts'; +import inquirer from 'inquirer'; import _ from 'lodash'; -import { LayerParameters } from './layerParams'; -import { $TSAny, $TSContext } from '@aws-amplify/amplify-cli-core'; import { categoryName } from '../../../constants'; +import { ServiceName } from './constants'; +import { LayerParameters } from './layerParams'; + /* * This file contains the logic for loading, selecting and executing function plugins (currently runtime and template plugins) */ @@ -86,9 +88,7 @@ export async function runtimeWalkthrough( const plugin = await loadPluginFromFactory(selection.pluginPath, 'functionRuntimeContributorFactory', context); const depCheck = await (plugin as FunctionRuntimeLifecycleManager).checkDependencies(selection.value); if (!depCheck.hasRequiredDependencies) { - context.print.warning( - depCheck.errorMessage || 'Some dependencies required for building and packaging this runtime are not installed', - ); + printer.warn(depCheck.errorMessage || 'Some dependencies required for building and packaging this runtime are not installed'); } plugins.push(plugin); } @@ -113,6 +113,7 @@ async function _functionRuntimeWalkthroughHelper( runtimes.push({ ...contribution, runtimePluginId: selections[i].pluginId, + scripts: selections[i].scripts, }); } return runtimes; @@ -129,8 +130,8 @@ async function getSelectionsFromContributors( // get providers from context const templateProviders = context.pluginPlatform.plugins[selectionOptions.pluginType]; if (!templateProviders) { - context.print.error(selectionOptions.notFoundMessage); - context.print.error(notFoundSuffix); + printer.error(selectionOptions.notFoundMessage); + printer.error(notFoundSuffix); throw new Error('No plugins found for function configuration'); } @@ -154,8 +155,8 @@ async function getSelectionsFromContributors( // sanity checks let selection; if (selections.length === 0) { - context.print.error(selectionOptions.notFoundMessage); - context.print.error(notFoundSuffix); + printer.error(selectionOptions.notFoundMessage); + printer.error(notFoundSuffix); throw new Error('Plugins found but no selections supplied for function configuration'); } else if (selections.length === 1) { // quick hack to print custom messages for single selection options @@ -165,7 +166,7 @@ async function getSelectionsFromContributors( } else if (selectionOptions.listOptionsField === 'runtimes') { singleOptionMsg = `Only one runtime detected: ${selections[0].name}. Learn more about additional runtimes at https://docs.amplify.aws/cli/function`; } - context.print.info(singleOptionMsg); + printer.info(singleOptionMsg); selection = selections[0].value; } else if (isDefaultDefined(selectionOptions)) { selection = selectionOptions.defaultSelection; @@ -187,7 +188,7 @@ async function getSelectionsFromContributors( selection = [selection]; } - return selection.map((s) => { + return selection.map((s: string) => { return { value: s, pluginPath: selectionMap.get(s).path, @@ -244,6 +245,9 @@ interface PluginSelection { pluginPath: string; value: string; pluginId: string; + scripts?: { + build: string; + }; } interface ListOption { diff --git a/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/layerHelpers.ts b/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/layerHelpers.ts index f79b33602fa..5b1eab1d2f4 100644 --- a/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/layerHelpers.ts +++ b/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/layerHelpers.ts @@ -243,7 +243,7 @@ export function getLayerName(context: $TSContext, layerName: string): string { export function getLambdaFunctionsDependentOnLayerFromMeta(layerName: string, meta: $TSMeta) { return Object.entries(meta[categoryName]).filter( - ([_, lambdaFunction]: [string, $TSObject]) => + ([, lambdaFunction]: [string, $TSObject]) => lambdaFunction.service === ServiceName.LambdaFunction && lambdaFunction?.dependsOn?.filter((dependency) => dependency.resourceName === layerName).length > 0, ); diff --git a/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/storeResources.ts b/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/storeResources.ts index 05c3ddb069a..40ae6f01121 100644 --- a/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/storeResources.ts +++ b/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/storeResources.ts @@ -375,6 +375,7 @@ const createBreadcrumbs = (params: FunctionParameters | FunctionTriggerParameter functionRuntime: 'nodejs', useLegacyBuild: true, defaultEditorFile: 'src/index.js', + scripts: params.scripts, }; } return { @@ -382,6 +383,7 @@ const createBreadcrumbs = (params: FunctionParameters | FunctionTriggerParameter functionRuntime: params.runtime.value, useLegacyBuild: params.runtime.value === 'nodejs', // so we can update node builds in the future defaultEditorFile: params.functionTemplate.defaultEditorFile, + scripts: params.scripts, }; }; diff --git a/packages/amplify-category-geo/CHANGELOG.md b/packages/amplify-category-geo/CHANGELOG.md index 483f0f41c6f..e773c181b52 100644 --- a/packages/amplify-category-geo/CHANGELOG.md +++ b/packages/amplify-category-geo/CHANGELOG.md @@ -3,6 +3,242 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [3.5.17](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-geo@3.5.16...@aws-amplify/amplify-category-geo@3.5.17) (2025-01-30) + +**Note:** Version bump only for package @aws-amplify/amplify-category-geo + + + + + +## [3.5.16](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-geo@3.5.15...@aws-amplify/amplify-category-geo@3.5.16) (2024-11-18) + +**Note:** Version bump only for package @aws-amplify/amplify-category-geo + + + + + +## [3.5.15](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-geo@3.5.14...@aws-amplify/amplify-category-geo@3.5.15) (2024-08-02) + +**Note:** Version bump only for package @aws-amplify/amplify-category-geo + + + + + +## [3.5.14](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-geo@3.5.13...@aws-amplify/amplify-category-geo@3.5.14) (2024-06-27) + +**Note:** Version bump only for package @aws-amplify/amplify-category-geo + + + + + +## [3.5.13](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-geo@3.5.12...@aws-amplify/amplify-category-geo@3.5.13) (2024-06-20) + +**Note:** Version bump only for package @aws-amplify/amplify-category-geo + + + + + +## [3.5.12](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-geo@3.5.11...@aws-amplify/amplify-category-geo@3.5.12) (2024-06-06) + +**Note:** Version bump only for package @aws-amplify/amplify-category-geo + + + + + +## [3.5.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-geo@3.5.10...@aws-amplify/amplify-category-geo@3.5.11) (2024-05-24) + +**Note:** Version bump only for package @aws-amplify/amplify-category-geo + + + + + +## [3.5.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-geo@3.5.9...@aws-amplify/amplify-category-geo@3.5.10) (2024-05-07) + +**Note:** Version bump only for package @aws-amplify/amplify-category-geo + + + + + +## [3.5.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-geo@3.5.8...@aws-amplify/amplify-category-geo@3.5.9) (2024-04-18) + +**Note:** Version bump only for package @aws-amplify/amplify-category-geo + + + + + +## [3.5.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-geo@3.5.7...@aws-amplify/amplify-category-geo@3.5.8) (2024-04-15) + +**Note:** Version bump only for package @aws-amplify/amplify-category-geo + + + + + +## [3.5.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-geo@3.5.6...@aws-amplify/amplify-category-geo@3.5.7) (2024-03-29) + +**Note:** Version bump only for package @aws-amplify/amplify-category-geo + + + + + +## [3.5.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-geo@3.5.5...@aws-amplify/amplify-category-geo@3.5.6) (2024-03-06) + +**Note:** Version bump only for package @aws-amplify/amplify-category-geo + + + + + +## [3.5.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-geo@3.5.4...@aws-amplify/amplify-category-geo@3.5.5) (2023-12-11) + +**Note:** Version bump only for package @aws-amplify/amplify-category-geo + + + + + +## [3.5.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-geo@3.5.2...@aws-amplify/amplify-category-geo@3.5.4) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [3.5.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-geo@3.5.2...@aws-amplify/amplify-category-geo@3.5.3) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-category-geo + + + + + +## [3.5.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-geo@3.5.1...@aws-amplify/amplify-category-geo@3.5.2) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-category-geo + + + + + +## [3.5.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-geo@3.5.0...@aws-amplify/amplify-category-geo@3.5.1) (2023-10-12) + +**Note:** Version bump only for package @aws-amplify/amplify-category-geo + + + + + +# [3.5.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-geo@3.4.3...@aws-amplify/amplify-category-geo@3.5.0) (2023-10-05) + + +### Features + +* **amplify-util-uibuilder:** amplify js backwards compatibility ([#13288](https://github.com/aws-amplify/amplify-cli/issues/13288)) ([2db3e18](https://github.com/aws-amplify/amplify-cli/commit/2db3e181cf06954085eb8fade0b26162672327db)) + + + + + +## [3.4.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-geo@3.4.2...@aws-amplify/amplify-category-geo@3.4.3) (2023-10-03) + +**Note:** Version bump only for package @aws-amplify/amplify-category-geo + + + + + +## [3.4.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-geo@3.4.1...@aws-amplify/amplify-category-geo@3.4.2) (2023-09-22) + +**Note:** Version bump only for package @aws-amplify/amplify-category-geo + + + + + +## [3.4.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-geo@3.4.0...@aws-amplify/amplify-category-geo@3.4.1) (2023-08-31) + +**Note:** Version bump only for package @aws-amplify/amplify-category-geo + + + + + +# [3.4.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-geo@3.3.4...@aws-amplify/amplify-category-geo@3.4.0) (2023-08-17) + + +### Features + +* generate components using graphql ([1568581](https://github.com/aws-amplify/amplify-cli/commit/15685810460881aa71e88724398b9be05ba53781)) + + + + + +## [3.3.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-geo@3.3.3...@aws-amplify/amplify-category-geo@3.3.4) (2023-08-09) + +**Note:** Version bump only for package @aws-amplify/amplify-category-geo + + + + + +## [3.3.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-geo@3.3.2...@aws-amplify/amplify-category-geo@3.3.3) (2023-07-28) + +**Note:** Version bump only for package @aws-amplify/amplify-category-geo + + + + + +## [3.3.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-geo@3.3.1...@aws-amplify/amplify-category-geo@3.3.2) (2023-07-27) + +**Note:** Version bump only for package @aws-amplify/amplify-category-geo + + + + + +## [3.3.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-geo@3.3.0...@aws-amplify/amplify-category-geo@3.3.1) (2023-07-24) + +**Note:** Version bump only for package @aws-amplify/amplify-category-geo + + + + + +# [3.3.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-geo@3.2.4...@aws-amplify/amplify-category-geo@3.3.0) (2023-07-20) + + +### Features + +* uibuilder codegen service ([#12896](https://github.com/aws-amplify/amplify-cli/issues/12896)) ([3fe2f98](https://github.com/aws-amplify/amplify-cli/commit/3fe2f98a99a9daf22efccb23a031882ea2be899b)) + + + + + +## [3.2.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-geo@3.2.3...@aws-amplify/amplify-category-geo@3.2.4) (2023-06-13) + +**Note:** Version bump only for package @aws-amplify/amplify-category-geo + + + + + ## [3.2.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-geo@3.2.1...@aws-amplify/amplify-category-geo@3.2.3) (2023-05-25) diff --git a/packages/amplify-category-geo/package.json b/packages/amplify-category-geo/package.json index e207e8f23fb..b3790bab939 100644 --- a/packages/amplify-category-geo/package.json +++ b/packages/amplify-category-geo/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-category-geo", - "version": "3.2.3", + "version": "3.5.17", "description": "Amplify CLI plugin to manage the Geo resources for the project", "repository": { "type": "git", @@ -26,20 +26,20 @@ "access": "public" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.0.8", - "@aws-amplify/amplify-prompts": "2.7.0", + "@aws-amplify/amplify-cli-core": "4.3.11", + "@aws-amplify/amplify-prompts": "2.8.6", "ajv": "^6.12.6", - "amplify-headless-interface": "1.17.3", - "amplify-util-headless-input": "1.9.12", - "aws-cdk-lib": "~2.68.0", - "aws-sdk": "^2.1354.0", + "amplify-headless-interface": "1.17.7", + "amplify-util-headless-input": "1.9.18", + "aws-cdk-lib": "~2.177.0", + "aws-sdk": "^2.1464.0", "constructs": "^10.0.5", "fs-extra": "^8.1.0", "lodash": "^4.17.21", "uuid": "^8.3.2" }, "devDependencies": { - "@aws-sdk/client-location": "^3.303.0" + "@aws-sdk/client-location": "3.624.0" }, "jest": { "collectCoverage": true, diff --git a/packages/amplify-category-geo/src/__tests__/commands/geo/remove.test.ts b/packages/amplify-category-geo/src/__tests__/commands/geo/remove.test.ts index 48a9eea8fa3..4db72f226a6 100644 --- a/packages/amplify-category-geo/src/__tests__/commands/geo/remove.test.ts +++ b/packages/amplify-category-geo/src/__tests__/commands/geo/remove.test.ts @@ -5,7 +5,7 @@ import { run } from '../../../commands/geo/remove'; const mockRemoveResource = removeResource as jest.MockedFunction; const mockResource = 'resource12345'; -mockRemoveResource.mockImplementation((context: $TSContext, service: string): Promise => { +mockRemoveResource.mockImplementation((): Promise => { return new Promise((resolve) => { resolve(mockResource); }); diff --git a/packages/amplify-category-geo/src/__tests__/index.test.ts b/packages/amplify-category-geo/src/__tests__/index.test.ts index b4c984805b7..d597d9d9981 100644 --- a/packages/amplify-category-geo/src/__tests__/index.test.ts +++ b/packages/amplify-category-geo/src/__tests__/index.test.ts @@ -4,7 +4,6 @@ import { getPermissionPolicies } from '../index'; jest.mock('@aws-amplify/amplify-cli-core'); describe('only grant permission policies as requested', () => { - const provider = 'awscloudformation'; let mockContext: $TSContext; // construct mock amplify meta const mockAmplifyMeta: $TSObject = { diff --git a/packages/amplify-category-geo/src/__tests__/service-utils/resourceUtils.test.ts b/packages/amplify-category-geo/src/__tests__/service-utils/resourceUtils.test.ts index 0d3097e730a..47c77f94f54 100644 --- a/packages/amplify-category-geo/src/__tests__/service-utils/resourceUtils.test.ts +++ b/packages/amplify-category-geo/src/__tests__/service-utils/resourceUtils.test.ts @@ -185,17 +185,17 @@ describe('Test reading the resource meta information', () => { it('fails reading the meta information for non-existing resource', async () => { const nonExistingMap = 'map12345'; const errorMessage = (resourceName: string): string => `Error reading Meta Parameters for ${resourceName}`; - expect(async () => await readResourceMetaParameters(ServiceName.Map, nonExistingMap)).rejects.toThrowError( + await expect(async () => await readResourceMetaParameters(ServiceName.Map, nonExistingMap)).rejects.toThrowError( errorMessage(nonExistingMap), ); const nonExistingPlaceIndex = 'placeIndex12345'; - expect(async () => await readResourceMetaParameters(ServiceName.PlaceIndex, nonExistingPlaceIndex)).rejects.toThrowError( + await expect(async () => await readResourceMetaParameters(ServiceName.PlaceIndex, nonExistingPlaceIndex)).rejects.toThrowError( errorMessage(nonExistingPlaceIndex), ); const nonExistingGeofenceCollection = 'geofenceCollection12345'; - expect( + await expect( async () => await readResourceMetaParameters(ServiceName.GeofenceCollection, nonExistingGeofenceCollection), ).rejects.toThrowError(errorMessage(nonExistingGeofenceCollection)); }); diff --git a/packages/amplify-category-hosting/CHANGELOG.md b/packages/amplify-category-hosting/CHANGELOG.md index 81545422110..30d1a0bb8b1 100644 --- a/packages/amplify-category-hosting/CHANGELOG.md +++ b/packages/amplify-category-hosting/CHANGELOG.md @@ -3,6 +3,228 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [3.5.38](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-hosting@3.5.37...@aws-amplify/amplify-category-hosting@3.5.38) (2025-01-30) + +**Note:** Version bump only for package @aws-amplify/amplify-category-hosting + + + + + +## [3.5.37](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-hosting@3.5.36...@aws-amplify/amplify-category-hosting@3.5.37) (2024-08-02) + +**Note:** Version bump only for package @aws-amplify/amplify-category-hosting + + + + + +## [3.5.36](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-hosting@3.5.35...@aws-amplify/amplify-category-hosting@3.5.36) (2024-06-27) + +**Note:** Version bump only for package @aws-amplify/amplify-category-hosting + + + + + +## [3.5.35](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-hosting@3.5.34...@aws-amplify/amplify-category-hosting@3.5.35) (2024-06-20) + +**Note:** Version bump only for package @aws-amplify/amplify-category-hosting + + + + + +## [3.5.34](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-hosting@3.5.33...@aws-amplify/amplify-category-hosting@3.5.34) (2024-06-06) + +**Note:** Version bump only for package @aws-amplify/amplify-category-hosting + + + + + +## [3.5.33](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-hosting@3.5.32...@aws-amplify/amplify-category-hosting@3.5.33) (2024-05-24) + +**Note:** Version bump only for package @aws-amplify/amplify-category-hosting + + + + + +## [3.5.32](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-hosting@3.5.31...@aws-amplify/amplify-category-hosting@3.5.32) (2024-05-07) + +**Note:** Version bump only for package @aws-amplify/amplify-category-hosting + + + + + +## [3.5.31](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-hosting@3.5.30...@aws-amplify/amplify-category-hosting@3.5.31) (2024-04-18) + +**Note:** Version bump only for package @aws-amplify/amplify-category-hosting + + + + + +## [3.5.30](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-hosting@3.5.29...@aws-amplify/amplify-category-hosting@3.5.30) (2024-04-15) + +**Note:** Version bump only for package @aws-amplify/amplify-category-hosting + + + + + +## [3.5.29](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-hosting@3.5.28...@aws-amplify/amplify-category-hosting@3.5.29) (2024-03-29) + +**Note:** Version bump only for package @aws-amplify/amplify-category-hosting + + + + + +## [3.5.28](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-hosting@3.5.27...@aws-amplify/amplify-category-hosting@3.5.28) (2024-03-06) + +**Note:** Version bump only for package @aws-amplify/amplify-category-hosting + + + + + +## [3.5.27](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-hosting@3.5.26...@aws-amplify/amplify-category-hosting@3.5.27) (2023-12-11) + +**Note:** Version bump only for package @aws-amplify/amplify-category-hosting + + + + + +## [3.5.26](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-hosting@3.5.24...@aws-amplify/amplify-category-hosting@3.5.26) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [3.5.25](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-hosting@3.5.24...@aws-amplify/amplify-category-hosting@3.5.25) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-category-hosting + + + + + +## [3.5.24](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-hosting@3.5.23...@aws-amplify/amplify-category-hosting@3.5.24) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-category-hosting + + + + + +## [3.5.23](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-hosting@3.5.22...@aws-amplify/amplify-category-hosting@3.5.23) (2023-10-12) + +**Note:** Version bump only for package @aws-amplify/amplify-category-hosting + + + + + +## [3.5.22](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-hosting@3.5.21...@aws-amplify/amplify-category-hosting@3.5.22) (2023-10-05) + +**Note:** Version bump only for package @aws-amplify/amplify-category-hosting + + + + + +## [3.5.21](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-hosting@3.5.20...@aws-amplify/amplify-category-hosting@3.5.21) (2023-10-03) + +**Note:** Version bump only for package @aws-amplify/amplify-category-hosting + + + + + +## [3.5.20](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-hosting@3.5.19...@aws-amplify/amplify-category-hosting@3.5.20) (2023-09-22) + +**Note:** Version bump only for package @aws-amplify/amplify-category-hosting + + + + + +## [3.5.19](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-hosting@3.5.18...@aws-amplify/amplify-category-hosting@3.5.19) (2023-08-31) + +**Note:** Version bump only for package @aws-amplify/amplify-category-hosting + + + + + +## [3.5.18](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-hosting@3.5.17...@aws-amplify/amplify-category-hosting@3.5.18) (2023-08-17) + +**Note:** Version bump only for package @aws-amplify/amplify-category-hosting + + + + + +## [3.5.17](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-hosting@3.5.16...@aws-amplify/amplify-category-hosting@3.5.17) (2023-08-09) + +**Note:** Version bump only for package @aws-amplify/amplify-category-hosting + + + + + +## [3.5.16](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-hosting@3.5.15...@aws-amplify/amplify-category-hosting@3.5.16) (2023-07-28) + +**Note:** Version bump only for package @aws-amplify/amplify-category-hosting + + + + + +## [3.5.15](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-hosting@3.5.14...@aws-amplify/amplify-category-hosting@3.5.15) (2023-07-27) + +**Note:** Version bump only for package @aws-amplify/amplify-category-hosting + + + + + +## [3.5.14](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-hosting@3.5.13...@aws-amplify/amplify-category-hosting@3.5.14) (2023-07-24) + +**Note:** Version bump only for package @aws-amplify/amplify-category-hosting + + + + + +## [3.5.13](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-hosting@3.5.12...@aws-amplify/amplify-category-hosting@3.5.13) (2023-07-20) + + +### Bug Fixes + +* s3 upload index.html at last ([#12852](https://github.com/aws-amplify/amplify-cli/issues/12852)) ([99aff47](https://github.com/aws-amplify/amplify-cli/commit/99aff47cc1623f845c63914233148fa30e0ddfdf)) + + + + + +## [3.5.12](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-hosting@3.5.11...@aws-amplify/amplify-category-hosting@3.5.12) (2023-06-13) + +**Note:** Version bump only for package @aws-amplify/amplify-category-hosting + + + + + ## [3.5.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-hosting@3.5.9...@aws-amplify/amplify-category-hosting@3.5.11) (2023-05-25) diff --git a/packages/amplify-category-hosting/__tests__/index.test.js b/packages/amplify-category-hosting/__tests__/index.test.js index 681580cd339..5b174384cc5 100644 --- a/packages/amplify-category-hosting/__tests__/index.test.js +++ b/packages/amplify-category-hosting/__tests__/index.test.js @@ -32,8 +32,8 @@ describe('index', () => { const ANOTHERSERVICE = 'AnotherHostingService'; const mockAvailableServices = []; - let mockDisabledServices = []; - let mockEnabledServices = []; + const mockDisabledServices = []; + const mockEnabledServices = []; const mockAnswers = { selectedServices: [], diff --git a/packages/amplify-category-hosting/__tests__/lib/S3AndCloudFront/helpers/file-uploader.test.js b/packages/amplify-category-hosting/__tests__/lib/S3AndCloudFront/helpers/file-uploader.test.js index d60d89cbb4e..90bb849cecd 100644 --- a/packages/amplify-category-hosting/__tests__/lib/S3AndCloudFront/helpers/file-uploader.test.js +++ b/packages/amplify-category-hosting/__tests__/lib/S3AndCloudFront/helpers/file-uploader.test.js @@ -2,15 +2,19 @@ jest.mock('mime-types'); jest.mock('../../../../lib/S3AndCloudFront/helpers/file-scanner', () => { return { scan: jest.fn(() => { - return ['filePath1', 'filePath2']; + return ['assets/index-4e7fb3f6.js', 'index.html', 'assets/mapbox-gl-d152561b.js', 'assets/index-d41dc7ea.css', 'vite.svg']; }), }; }); +jest.mock('../../../../lib/S3AndCloudFront/helpers/upload-file', () => { + return { uploadFile: jest.fn() }; +}); const fs = require('fs-extra'); const mime = require('mime-types'); const fileScanner = require('../../../../lib/S3AndCloudFront/helpers/file-scanner'); +const { uploadFile } = require('../../../../lib/S3AndCloudFront/helpers/upload-file'); const mockTemplate = require('../../../../__mocks__/mockTemplate'); const mockParameters = require('../../../../__mocks__/mockParameters'); @@ -89,10 +93,21 @@ describe('cloudfront-manager', () => { }); }); - beforeEach(() => {}); + beforeEach(() => { + jest.clearAllMocks(); + }); - test('run', async () => { + test('file scanner should be called', async () => { await fileUploader.run(mockContext, 'mockDistributionFolder'); expect(fileScanner.scan).toBeCalled(); }); + + test('uploadFileCalls should have the index.html at the end', async () => { + await fileUploader.run(mockContext, 'mockDistributionFolder'); + expect(uploadFile).toHaveBeenCalled(); + const uploadFileCalls = uploadFile.mock.calls; + + expect(uploadFileCalls.length).toBe(5); + expect(uploadFileCalls[4][3]).toBe('index.html'); + }); }); diff --git a/packages/amplify-category-hosting/lib/S3AndCloudFront/helpers/configure-CloudFront.js b/packages/amplify-category-hosting/lib/S3AndCloudFront/helpers/configure-CloudFront.js index abd028d99ff..b56c42a678a 100644 --- a/packages/amplify-category-hosting/lib/S3AndCloudFront/helpers/configure-CloudFront.js +++ b/packages/amplify-category-hosting/lib/S3AndCloudFront/helpers/configure-CloudFront.js @@ -37,8 +37,7 @@ async function configure(context) { delete context.exeInfo.template.Resources.BucketPolicy; delete context.exeInfo.template.Resources.S3Bucket.Properties.AccessControl; } - } - + } if (context.exeInfo.template.Resources.CloudFrontDistribution) { const { DistributionConfig } = context.exeInfo.template.Resources.CloudFrontDistribution.Properties; diff --git a/packages/amplify-category-hosting/lib/S3AndCloudFront/helpers/file-uploader.js b/packages/amplify-category-hosting/lib/S3AndCloudFront/helpers/file-uploader.js index 5c00fd01f34..92c71c39cc3 100644 --- a/packages/amplify-category-hosting/lib/S3AndCloudFront/helpers/file-uploader.js +++ b/packages/amplify-category-hosting/lib/S3AndCloudFront/helpers/file-uploader.js @@ -1,10 +1,8 @@ -const fs = require('fs-extra'); -const path = require('path'); const Ora = require('ora'); -const mime = require('mime-types'); const sequential = require('promise-sequential'); const fileScanner = require('./file-scanner'); const constants = require('../../constants'); +const { uploadFile } = require('./upload-file'); const serviceName = 'S3AndCloudFront'; const providerName = 'awscloudformation'; @@ -13,15 +11,14 @@ async function run(context, distributionDirPath) { const { WebsiteConfiguration } = context.exeInfo.template.Resources.S3Bucket.Properties; const fileList = fileScanner.scan(context, distributionDirPath, WebsiteConfiguration); - const uploadFileTasks = []; const s3Client = await getS3Client(context, 'update'); const hostingBucketName = getHostingBucketName(context); const hasCloudFront = !!context?.exeInfo?.template?.Resources?.CloudFrontDistribution; - fileList.forEach(filePath => { - uploadFileTasks.push(() => uploadFile(s3Client, hostingBucketName, distributionDirPath, filePath, hasCloudFront)); - }); + const uploadFileTasks = sortUploadFiles(fileList).map( + (filePath) => () => uploadFile(s3Client, hostingBucketName, distributionDirPath, filePath, hasCloudFront), + ); const spinner = new Ora('Uploading files.'); try { @@ -34,6 +31,13 @@ async function run(context, distributionDirPath) { } } +function sortUploadFiles(fileList) { + const filesToUploadLast = 'index.html'; + const sortFiles = (fileA, fileB) => (fileA.includes(filesToUploadLast) ? 1 : fileB.includes(filesToUploadLast) ? -1 : 0); + + return fileList.sort(sortFiles); +} + async function getS3Client(context, action) { const providerPlugins = context.amplify.getProviderPlugins(context); const provider = require(providerPlugins[providerName]); @@ -46,29 +50,6 @@ function getHostingBucketName(context) { return amplifyMeta[constants.CategoryName][serviceName].output.HostingBucketName; } -async function uploadFile(s3Client, hostingBucketName, distributionDirPath, filePath, hasCloudFront) { - let relativeFilePath = path.relative(distributionDirPath, filePath); - // make Windows-style relative paths compatible to S3 - relativeFilePath = relativeFilePath.replace(/\\/g, '/'); - - const fileStream = fs.createReadStream(filePath); - const contentType = mime.lookup(relativeFilePath); - const uploadParams = { - Bucket: hostingBucketName, - Key: relativeFilePath, - Body: fileStream, - ContentType: contentType || 'text/plain', - }; - - if (!hasCloudFront) { - uploadParams.ACL = 'public-read'; - } - - const data = await s3Client.upload(uploadParams).promise(); - - return data; -} - module.exports = { run, }; diff --git a/packages/amplify-category-hosting/lib/S3AndCloudFront/helpers/upload-file.js b/packages/amplify-category-hosting/lib/S3AndCloudFront/helpers/upload-file.js new file mode 100644 index 00000000000..65054fbe768 --- /dev/null +++ b/packages/amplify-category-hosting/lib/S3AndCloudFront/helpers/upload-file.js @@ -0,0 +1,29 @@ +const fs = require('fs-extra'); +const path = require('path'); +const mime = require('mime-types'); + +async function uploadFile(s3Client, hostingBucketName, distributionDirPath, filePath, hasCloudFront) { + let relativeFilePath = path.relative(distributionDirPath, filePath); + // make Windows-style relative paths compatible to S3 + relativeFilePath = relativeFilePath.replace(/\\/g, '/'); + const fileStream = fs.createReadStream(filePath); + const contentType = mime.lookup(relativeFilePath); + const uploadParams = { + Bucket: hostingBucketName, + Key: relativeFilePath, + Body: fileStream, + ContentType: contentType || 'text/plain', + }; + + if (!hasCloudFront) { + uploadParams.ACL = 'public-read'; + } + + const data = await s3Client.upload(uploadParams).promise(); + + return data; +} + +module.exports = { + uploadFile, +}; diff --git a/packages/amplify-category-hosting/package.json b/packages/amplify-category-hosting/package.json index 879ecd96839..04d7cee2a60 100644 --- a/packages/amplify-category-hosting/package.json +++ b/packages/amplify-category-hosting/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-category-hosting", - "version": "3.5.11", + "version": "3.5.38", "description": "amplify-cli hosting plugin", "repository": { "type": "git", @@ -21,8 +21,8 @@ "test": "jest --logHeapUsage --coverage" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.0.8", - "@aws-amplify/amplify-prompts": "2.7.0", + "@aws-amplify/amplify-cli-core": "4.3.11", + "@aws-amplify/amplify-prompts": "2.8.6", "chalk": "^4.1.1", "fs-extra": "^8.1.0", "mime-types": "^2.1.26", diff --git a/packages/amplify-category-interactions/CHANGELOG.md b/packages/amplify-category-interactions/CHANGELOG.md index ea4c8a84431..b6eed3c23b0 100644 --- a/packages/amplify-category-interactions/CHANGELOG.md +++ b/packages/amplify-category-interactions/CHANGELOG.md @@ -3,6 +3,225 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.1.30](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-interactions@5.1.29...@aws-amplify/amplify-category-interactions@5.1.30) (2025-01-30) + +**Note:** Version bump only for package @aws-amplify/amplify-category-interactions + + + + + +## [5.1.29](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-interactions@5.1.28...@aws-amplify/amplify-category-interactions@5.1.29) (2024-08-02) + +**Note:** Version bump only for package @aws-amplify/amplify-category-interactions + + + + + +## [5.1.28](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-interactions@5.1.27...@aws-amplify/amplify-category-interactions@5.1.28) (2024-06-27) + +**Note:** Version bump only for package @aws-amplify/amplify-category-interactions + + + + + +## [5.1.27](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-interactions@5.1.26...@aws-amplify/amplify-category-interactions@5.1.27) (2024-06-20) + +**Note:** Version bump only for package @aws-amplify/amplify-category-interactions + + + + + +## [5.1.26](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-interactions@5.1.25...@aws-amplify/amplify-category-interactions@5.1.26) (2024-06-06) + +**Note:** Version bump only for package @aws-amplify/amplify-category-interactions + + + + + +## [5.1.25](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-interactions@5.1.24...@aws-amplify/amplify-category-interactions@5.1.25) (2024-05-24) + +**Note:** Version bump only for package @aws-amplify/amplify-category-interactions + + + + + +## [5.1.24](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-interactions@5.1.23...@aws-amplify/amplify-category-interactions@5.1.24) (2024-05-07) + +**Note:** Version bump only for package @aws-amplify/amplify-category-interactions + + + + + +## [5.1.23](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-interactions@5.1.22...@aws-amplify/amplify-category-interactions@5.1.23) (2024-04-18) + +**Note:** Version bump only for package @aws-amplify/amplify-category-interactions + + + + + +## [5.1.22](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-interactions@5.1.21...@aws-amplify/amplify-category-interactions@5.1.22) (2024-04-15) + +**Note:** Version bump only for package @aws-amplify/amplify-category-interactions + + + + + +## [5.1.21](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-interactions@5.1.20...@aws-amplify/amplify-category-interactions@5.1.21) (2024-03-29) + +**Note:** Version bump only for package @aws-amplify/amplify-category-interactions + + + + + +## [5.1.20](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-interactions@5.1.19...@aws-amplify/amplify-category-interactions@5.1.20) (2024-03-06) + +**Note:** Version bump only for package @aws-amplify/amplify-category-interactions + + + + + +## [5.1.19](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-interactions@5.1.18...@aws-amplify/amplify-category-interactions@5.1.19) (2023-12-11) + +**Note:** Version bump only for package @aws-amplify/amplify-category-interactions + + + + + +## [5.1.18](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-interactions@5.1.16...@aws-amplify/amplify-category-interactions@5.1.18) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [5.1.17](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-interactions@5.1.16...@aws-amplify/amplify-category-interactions@5.1.17) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-category-interactions + + + + + +## [5.1.16](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-interactions@5.1.15...@aws-amplify/amplify-category-interactions@5.1.16) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-category-interactions + + + + + +## [5.1.15](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-interactions@5.1.14...@aws-amplify/amplify-category-interactions@5.1.15) (2023-10-12) + +**Note:** Version bump only for package @aws-amplify/amplify-category-interactions + + + + + +## [5.1.14](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-interactions@5.1.13...@aws-amplify/amplify-category-interactions@5.1.14) (2023-10-05) + +**Note:** Version bump only for package @aws-amplify/amplify-category-interactions + + + + + +## [5.1.13](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-interactions@5.1.12...@aws-amplify/amplify-category-interactions@5.1.13) (2023-10-03) + +**Note:** Version bump only for package @aws-amplify/amplify-category-interactions + + + + + +## [5.1.12](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-interactions@5.1.11...@aws-amplify/amplify-category-interactions@5.1.12) (2023-09-22) + +**Note:** Version bump only for package @aws-amplify/amplify-category-interactions + + + + + +## [5.1.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-interactions@5.1.10...@aws-amplify/amplify-category-interactions@5.1.11) (2023-08-31) + +**Note:** Version bump only for package @aws-amplify/amplify-category-interactions + + + + + +## [5.1.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-interactions@5.1.9...@aws-amplify/amplify-category-interactions@5.1.10) (2023-08-17) + +**Note:** Version bump only for package @aws-amplify/amplify-category-interactions + + + + + +## [5.1.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-interactions@5.1.8...@aws-amplify/amplify-category-interactions@5.1.9) (2023-08-09) + +**Note:** Version bump only for package @aws-amplify/amplify-category-interactions + + + + + +## [5.1.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-interactions@5.1.7...@aws-amplify/amplify-category-interactions@5.1.8) (2023-07-28) + +**Note:** Version bump only for package @aws-amplify/amplify-category-interactions + + + + + +## [5.1.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-interactions@5.1.6...@aws-amplify/amplify-category-interactions@5.1.7) (2023-07-27) + +**Note:** Version bump only for package @aws-amplify/amplify-category-interactions + + + + + +## [5.1.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-interactions@5.1.5...@aws-amplify/amplify-category-interactions@5.1.6) (2023-07-24) + +**Note:** Version bump only for package @aws-amplify/amplify-category-interactions + + + + + +## [5.1.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-interactions@5.1.4...@aws-amplify/amplify-category-interactions@5.1.5) (2023-07-20) + +**Note:** Version bump only for package @aws-amplify/amplify-category-interactions + + + + + +## [5.1.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-interactions@5.1.3...@aws-amplify/amplify-category-interactions@5.1.4) (2023-06-13) + +**Note:** Version bump only for package @aws-amplify/amplify-category-interactions + + + + + ## [5.1.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-interactions@5.1.1...@aws-amplify/amplify-category-interactions@5.1.3) (2023-05-25) diff --git a/packages/amplify-category-interactions/package.json b/packages/amplify-category-interactions/package.json index a06411a6e03..f688de59062 100644 --- a/packages/amplify-category-interactions/package.json +++ b/packages/amplify-category-interactions/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-category-interactions", - "version": "5.1.3", + "version": "5.1.30", "description": "amplify-cli interactions plugin", "repository": { "type": "git", @@ -25,8 +25,8 @@ "extract-api": "ts-node ../../scripts/extract-api.ts" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.0.8", - "@aws-amplify/amplify-prompts": "2.7.0", + "@aws-amplify/amplify-cli-core": "4.3.11", + "@aws-amplify/amplify-prompts": "2.8.6", "fs-extra": "^8.1.0", "fuzzy": "^0.1.3", "uuid": "^8.3.2" diff --git a/packages/amplify-category-notifications/CHANGELOG.md b/packages/amplify-category-notifications/CHANGELOG.md index 74bd45f1bc9..8e486987a10 100644 --- a/packages/amplify-category-notifications/CHANGELOG.md +++ b/packages/amplify-category-notifications/CHANGELOG.md @@ -3,6 +3,306 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.26.27](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.26.26...@aws-amplify/amplify-category-notifications@2.26.27) (2025-01-30) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + +## [2.26.26](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.26.25...@aws-amplify/amplify-category-notifications@2.26.26) (2025-01-16) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + +## [2.26.25](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.26.24...@aws-amplify/amplify-category-notifications@2.26.25) (2024-11-18) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + +## [2.26.24](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.26.23...@aws-amplify/amplify-category-notifications@2.26.24) (2024-10-05) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + +## [2.26.23](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.26.22...@aws-amplify/amplify-category-notifications@2.26.23) (2024-08-06) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + +## [2.26.22](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.26.21...@aws-amplify/amplify-category-notifications@2.26.22) (2024-08-02) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + +## [2.26.21](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.26.20...@aws-amplify/amplify-category-notifications@2.26.21) (2024-06-27) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + +## [2.26.20](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.26.19...@aws-amplify/amplify-category-notifications@2.26.20) (2024-06-20) + + +### Bug Fixes + +* migrate FCM channel authentication from ApiKey to ServiceToken based ([#13826](https://github.com/aws-amplify/amplify-cli/issues/13826)) ([252093f](https://github.com/aws-amplify/amplify-cli/commit/252093fc781547db3543928d1c3667dad16160ea)) + + + + + +## [2.26.19](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.26.18...@aws-amplify/amplify-category-notifications@2.26.19) (2024-06-06) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + +## [2.26.18](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.26.17...@aws-amplify/amplify-category-notifications@2.26.18) (2024-05-24) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + +## [2.26.17](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.26.16...@aws-amplify/amplify-category-notifications@2.26.17) (2024-05-07) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + +## [2.26.16](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.26.15...@aws-amplify/amplify-category-notifications@2.26.16) (2024-04-18) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + +## [2.26.15](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.26.14...@aws-amplify/amplify-category-notifications@2.26.15) (2024-04-15) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + +## [2.26.14](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.26.13...@aws-amplify/amplify-category-notifications@2.26.14) (2024-03-29) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + +## [2.26.13](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.26.12...@aws-amplify/amplify-category-notifications@2.26.13) (2024-03-06) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + +## [2.26.12](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.26.11...@aws-amplify/amplify-category-notifications@2.26.12) (2024-01-10) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + +## [2.26.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.26.10...@aws-amplify/amplify-category-notifications@2.26.11) (2023-12-16) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + +## [2.26.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.26.9...@aws-amplify/amplify-category-notifications@2.26.10) (2023-12-11) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + +## [2.26.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.26.7...@aws-amplify/amplify-category-notifications@2.26.9) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [2.26.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.26.7...@aws-amplify/amplify-category-notifications@2.26.8) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + +## [2.26.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.26.6...@aws-amplify/amplify-category-notifications@2.26.7) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + +## [2.26.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.26.5...@aws-amplify/amplify-category-notifications@2.26.6) (2023-10-12) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + +## [2.26.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.26.4...@aws-amplify/amplify-category-notifications@2.26.5) (2023-10-05) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + +## [2.26.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.26.3...@aws-amplify/amplify-category-notifications@2.26.4) (2023-10-03) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + +## [2.26.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.26.2...@aws-amplify/amplify-category-notifications@2.26.3) (2023-09-27) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + +## [2.26.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.26.1...@aws-amplify/amplify-category-notifications@2.26.2) (2023-09-22) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + +## [2.26.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.26.0...@aws-amplify/amplify-category-notifications@2.26.1) (2023-08-31) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + +# [2.26.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.25.4...@aws-amplify/amplify-category-notifications@2.26.0) (2023-08-17) + + +### Features + +* generate components using graphql ([1568581](https://github.com/aws-amplify/amplify-cli/commit/15685810460881aa71e88724398b9be05ba53781)) + + + + + +## [2.25.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.25.3...@aws-amplify/amplify-category-notifications@2.25.4) (2023-08-09) + + +### Bug Fixes + +* upgrade proxy-agent to ^6.3.0 to remove vm2 deps ([#13012](https://github.com/aws-amplify/amplify-cli/issues/13012)) ([989ec35](https://github.com/aws-amplify/amplify-cli/commit/989ec35be4dfd2bea19ea82bbe317f212729950f)) + + + + + +## [2.25.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.25.2...@aws-amplify/amplify-category-notifications@2.25.3) (2023-07-28) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + +## [2.25.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.25.1...@aws-amplify/amplify-category-notifications@2.25.2) (2023-07-27) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + +## [2.25.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.25.0...@aws-amplify/amplify-category-notifications@2.25.1) (2023-07-24) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + +# [2.25.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.24.12...@aws-amplify/amplify-category-notifications@2.25.0) (2023-07-20) + + +### Bug Fixes + +* update notification channel name lookup ([#12763](https://github.com/aws-amplify/amplify-cli/issues/12763)) ([92ca721](https://github.com/aws-amplify/amplify-cli/commit/92ca721134d59b68e85d4f92f4814d6717a3be3a)) + + +### Features + +* uibuilder codegen service ([#12896](https://github.com/aws-amplify/amplify-cli/issues/12896)) ([3fe2f98](https://github.com/aws-amplify/amplify-cli/commit/3fe2f98a99a9daf22efccb23a031882ea2be899b)) + + + + + +## [2.24.12](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.24.11...@aws-amplify/amplify-category-notifications@2.24.12) (2023-06-16) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + +## [2.24.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.24.10...@aws-amplify/amplify-category-notifications@2.24.11) (2023-06-13) + +**Note:** Version bump only for package @aws-amplify/amplify-category-notifications + + + + + ## [2.24.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-notifications@2.24.8...@aws-amplify/amplify-category-notifications@2.24.10) (2023-05-25) diff --git a/packages/amplify-category-notifications/package.json b/packages/amplify-category-notifications/package.json index f52bf91c563..4e428b7691a 100644 --- a/packages/amplify-category-notifications/package.json +++ b/packages/amplify-category-notifications/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-category-notifications", - "version": "2.24.10", + "version": "2.26.27", "description": "amplify-cli notifications plugin", "repository": { "type": "git", @@ -26,17 +26,17 @@ "extract-api": "ts-node ../../scripts/extract-api.ts" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.0.8", - "@aws-amplify/amplify-environment-parameters": "1.6.3", - "@aws-amplify/amplify-prompts": "2.7.0", - "@aws-amplify/amplify-provider-awscloudformation": "8.2.3", - "aws-sdk": "^2.1354.0", + "@aws-amplify/amplify-cli-core": "4.3.11", + "@aws-amplify/amplify-environment-parameters": "1.9.16", + "@aws-amplify/amplify-prompts": "2.8.6", + "@aws-amplify/amplify-provider-awscloudformation": "8.11.3", + "aws-sdk": "^2.1464.0", "chalk": "^4.1.1", "fs-extra": "^8.1.0", "lodash": "^4.17.21", "ora": "^4.0.3", "promise-sequential": "^1.1.1", - "proxy-agent": "^5.0.0" + "proxy-agent": "^6.3.0" }, "jest": { "testEnvironmentOptions": { diff --git a/packages/amplify-category-notifications/src/__tests__/channel-apns.test.ts b/packages/amplify-category-notifications/src/__tests__/channel-apns.test.ts index 2a6409b6d01..c992e7d7ce0 100644 --- a/packages/amplify-category-notifications/src/__tests__/channel-apns.test.ts +++ b/packages/amplify-category-notifications/src/__tests__/channel-apns.test.ts @@ -153,7 +153,6 @@ describe('channel-APNS', () => { expect(enableData).toEqual(mockAPNSChannelResponseData(true, ChannelAction.ENABLE, mockPinpointResponseData.APNSChannelResponse)); }); - // eslint-disable-next-line jest/no-focused-tests test('enable unsuccessful', async () => { prompterMock.pick.mockResolvedValueOnce('Certificate'); diff --git a/packages/amplify-category-notifications/src/__tests__/channel-fcm.test.ts b/packages/amplify-category-notifications/src/__tests__/channel-fcm.test.ts index a43a7bec331..f5b0a457d7a 100644 --- a/packages/amplify-category-notifications/src/__tests__/channel-fcm.test.ts +++ b/packages/amplify-category-notifications/src/__tests__/channel-fcm.test.ts @@ -17,7 +17,12 @@ jest.mock('@aws-amplify/amplify-cli-core', () => { }; }); -const apiKey = 'ApiKey-abc123'; +const serviceJSONFilePath = '/my/service/account/jsonFile.json'; +const serviceAccountJson = '{ "valid": { "service": "accountJson"}}'; +jest.mock('fs-extra', () => ({ + readFile: () => Promise.resolve(serviceAccountJson), + existsSync: () => true, +})); jest.mock('@aws-amplify/amplify-prompts'); const prompterMock = prompter as jest.Mocked; @@ -97,7 +102,7 @@ describe('channel-FCM', () => { test('configure', async () => { mockChannelEnabledOutput.Enabled = true; prompterMock.yesOrNo.mockResolvedValueOnce(true); - prompterMock.input.mockResolvedValueOnce(apiKey); + prompterMock.input.mockResolvedValueOnce(serviceJSONFilePath); const mockContextObj = mockContext(mockChannelEnabledOutput, mockPinpointClient); await channelFCM.configure(mockContextObj).then(() => { @@ -118,20 +123,14 @@ describe('channel-FCM', () => { }); test('enable', async () => { - prompterMock.input.mockResolvedValueOnce(apiKey); + prompterMock.input.mockResolvedValueOnce(serviceJSONFilePath); const mockContextObj = mockContext(mockChannelEnabledOutput, mockPinpointClient); const data = await channelFCM.enable(mockContextObj, 'successMessage'); - expect(mockPinpointClient.updateGcmChannel).toBeCalled(); - expect(data).toEqual(mockPinpointResponseData(true, ChannelAction.ENABLE)); - }); - - test('enable with newline', async () => { - prompterMock.input.mockResolvedValueOnce(`${apiKey}\n`); - const data = await channelFCM.enable(mockContext(mockChannelEnabledOutput, mockPinpointClient), 'successMessage'); expect(mockPinpointClient.updateGcmChannel).toBeCalledWith({ ApplicationId: undefined, GCMChannelRequest: { - ApiKey: apiKey, + ServiceJson: serviceAccountJson, + DefaultAuthenticationMethod: 'TOKEN', Enabled: true, }, }); @@ -139,7 +138,7 @@ describe('channel-FCM', () => { }); test('enable unsuccessful', async () => { - prompterMock.input.mockResolvedValueOnce(apiKey); + prompterMock.input.mockResolvedValueOnce(serviceJSONFilePath); const context = mockContextReject(mockServiceOutput, mockPinpointClientReject); const errCert: AmplifyFault = await getError(async () => channelFCM.enable(context as unknown as $TSContext, 'successMessage')); diff --git a/packages/amplify-category-notifications/src/channel-fcm.ts b/packages/amplify-category-notifications/src/channel-fcm.ts index 46e5ec4718e..bffcec7bba5 100644 --- a/packages/amplify-category-notifications/src/channel-fcm.ts +++ b/packages/amplify-category-notifications/src/channel-fcm.ts @@ -3,6 +3,8 @@ import { printer, prompter } from '@aws-amplify/amplify-prompts'; import ora from 'ora'; import { ChannelAction, ChannelConfigDeploymentType, IChannelAPIResponse } from './channel-types'; import { buildPinpointChannelResponseSuccess } from './pinpoint-helper'; +import { validateFilePath } from './validate-filepath'; +import fs from 'fs-extra'; const channelName = 'FCM'; const spinner = ora(''); @@ -42,12 +44,11 @@ export const enable = async (context: $TSContext, successMessage: string | undef if (context.exeInfo.pinpointInputParams?.[channelName]) { answers = validateInputParams(context.exeInfo.pinpointInputParams[channelName]); } else { - let channelOutput: $TSAny = {}; - if (context.exeInfo.serviceMeta.output[channelName]) { - channelOutput = context.exeInfo.serviceMeta.output[channelName]; - } answers = { - ApiKey: await prompter.input('Server Key', { initial: channelOutput.ApiKey, transform: (input) => input.trim() }), + ServiceJson: await fs.readFile( + await prompter.input('The service account file path (.json): ', { validate: validateFilePath }), + 'utf8', + ), }; } @@ -55,6 +56,7 @@ export const enable = async (context: $TSContext, successMessage: string | undef ApplicationId: context.exeInfo.serviceMeta.output.Id, GCMChannelRequest: { ...answers, + DefaultAuthenticationMethod: 'TOKEN', Enabled: true, }, }; @@ -78,10 +80,10 @@ export const enable = async (context: $TSContext, successMessage: string | undef }; const validateInputParams = (channelInput: $TSAny): $TSAny => { - if (!channelInput.ApiKey) { + if (!channelInput.ServiceJson) { throw new AmplifyError('UserInputError', { - message: 'Server Key is missing for the FCM channel', - resolution: 'Server Key for the FCM channel', + message: 'ServiceJson is missing for the FCM channel', + resolution: 'Provide the JSON from your Firebase service account json file', }); } return channelInput; @@ -97,18 +99,18 @@ export const disable = async (context: $TSContext): Promise<$TSAny> => { if (context.exeInfo.pinpointInputParams?.[channelName]) { answers = validateInputParams(context.exeInfo.pinpointInputParams[channelName]); } else { - let channelOutput: $TSAny = {}; - if (context.exeInfo.serviceMeta.output[channelName]) { - channelOutput = context.exeInfo.serviceMeta.output[channelName]; - } answers = { - ApiKey: await prompter.input('Server Key', { initial: channelOutput.ApiKey, transform: (input) => input.trim() }), + ServiceJson: await fs.readFile( + await prompter.input('The service account file path (.json): ', { validate: validateFilePath }), + 'utf8', + ), }; } const params = { ApplicationId: context.exeInfo.serviceMeta.output.Id, GCMChannelRequest: { ...answers, + DefaultAuthenticationMethod: 'TOKEN', Enabled: false, }, }; diff --git a/packages/amplify-category-notifications/src/channel-in-app-msg.ts b/packages/amplify-category-notifications/src/channel-in-app-msg.ts index a56ce303fcc..ab1f57f676a 100644 --- a/packages/amplify-category-notifications/src/channel-in-app-msg.ts +++ b/packages/amplify-category-notifications/src/channel-in-app-msg.ts @@ -23,12 +23,7 @@ import { } from './plugin-client-api-analytics'; import { IChannelAPIResponse, ChannelAction, ChannelConfigDeploymentType } from './channel-types'; -import { - buildPinpointChannelResponseSuccess, - getPinpointAppStatusFromMeta, - IPinpointAppStatus, - IPinpointDeploymentStatus, -} from './pinpoint-helper'; +import { buildPinpointChannelResponseSuccess, getPinpointAppStatusFromMeta, IPinpointDeploymentStatus } from './pinpoint-helper'; import { ChannelType, getChannelViewName, isChannelEnabledNotificationsBackendConfig } from './notifications-backend-cfg-channel-api'; import { getNotificationsAppMeta } from './notifications-amplify-meta-api'; import { getNotificationsAppConfig } from './notifications-backend-cfg-api'; diff --git a/packages/amplify-category-notifications/src/commands/notifications/configure.ts b/packages/amplify-category-notifications/src/commands/notifications/configure.ts index 07bbc9faff2..a196ae41a5e 100644 --- a/packages/amplify-category-notifications/src/commands/notifications/configure.ts +++ b/packages/amplify-category-notifications/src/commands/notifications/configure.ts @@ -26,14 +26,14 @@ export const alias = 'update'; */ export const run = async (context: $TSContext): Promise<$TSContext> => { const availableChannelViewNames = getAvailableChannelViewNames(); - const channelName = context.parameters.first; - let channelViewName = channelName ? getChannelViewName(channelName) : undefined; + let channelViewName = context.parameters.first ? getChannelViewName(context.parameters.first) : undefined; if (!channelViewName || !availableChannelViewNames.includes(channelViewName)) { channelViewName = await prompter.pick('Choose the notification channel to configure', availableChannelViewNames); } - if (channelViewName && typeof channelName === 'string') { - const selectedChannel = getChannelNameFromView(channelViewName); + + if (channelViewName) { + const channelName = getChannelNameFromView(channelViewName); let pinpointAppStatus = await pinpointHelper.ensurePinpointApp(context, undefined); // In-line deployment now requires an amplify-push to create the Pinpoint resource if (pinpointHelper.isPinpointDeploymentRequired(channelName, pinpointAppStatus)) { @@ -55,8 +55,8 @@ export const run = async (context: $TSContext): Promise<$TSContext> => { ); } } - if (isPinpointAppDeployed(pinpointAppStatus.status) || isChannelDeploymentDeferred(selectedChannel)) { - const channelAPIResponse: IChannelAPIResponse | undefined = await notificationManager.configureChannel(context, selectedChannel); + if (isPinpointAppDeployed(pinpointAppStatus.status) || isChannelDeploymentDeferred(channelName)) { + const channelAPIResponse: IChannelAPIResponse | undefined = await notificationManager.configureChannel(context, channelName); await writeData(context, channelAPIResponse); } } else { diff --git a/packages/amplify-category-notifications/src/pinpoint-helper.ts b/packages/amplify-category-notifications/src/pinpoint-helper.ts index 22fed7eaee4..18f8d90c70d 100644 --- a/packages/amplify-category-notifications/src/pinpoint-helper.ts +++ b/packages/amplify-category-notifications/src/pinpoint-helper.ts @@ -33,7 +33,7 @@ import { resolveRegion, loadConfigurationForEnv, } from '@aws-amplify/amplify-provider-awscloudformation'; -import proxyAgent from 'proxy-agent'; +import { ProxyAgent } from 'proxy-agent'; const spinner = ora(''); const defaultPinpointRegion = 'us-east-1'; @@ -544,10 +544,11 @@ export const getPinpointClient = async ( customUserAgent: formUserAgentParam(context, userAgentAction), }; + // HTTP_PROXY & HTTPS_PROXY env vars are read automatically by ProxyAgent, but we check to see if they are set before using the proxy if (httpProxy) { aws.config.update({ httpOptions: { - agent: proxyAgent(httpProxy), + agent: new ProxyAgent(), }, }); } diff --git a/packages/amplify-category-predictions/CHANGELOG.md b/packages/amplify-category-predictions/CHANGELOG.md index 9562285705d..6b79678d8f0 100644 --- a/packages/amplify-category-predictions/CHANGELOG.md +++ b/packages/amplify-category-predictions/CHANGELOG.md @@ -3,6 +3,242 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.5.17](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-predictions@5.5.16...@aws-amplify/amplify-category-predictions@5.5.17) (2025-01-30) + +**Note:** Version bump only for package @aws-amplify/amplify-category-predictions + + + + + +## [5.5.16](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-predictions@5.5.15...@aws-amplify/amplify-category-predictions@5.5.16) (2024-11-18) + +**Note:** Version bump only for package @aws-amplify/amplify-category-predictions + + + + + +## [5.5.15](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-predictions@5.5.14...@aws-amplify/amplify-category-predictions@5.5.15) (2024-08-02) + +**Note:** Version bump only for package @aws-amplify/amplify-category-predictions + + + + + +## [5.5.14](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-predictions@5.5.13...@aws-amplify/amplify-category-predictions@5.5.14) (2024-06-27) + +**Note:** Version bump only for package @aws-amplify/amplify-category-predictions + + + + + +## [5.5.13](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-predictions@5.5.12...@aws-amplify/amplify-category-predictions@5.5.13) (2024-06-20) + +**Note:** Version bump only for package @aws-amplify/amplify-category-predictions + + + + + +## [5.5.12](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-predictions@5.5.11...@aws-amplify/amplify-category-predictions@5.5.12) (2024-06-06) + +**Note:** Version bump only for package @aws-amplify/amplify-category-predictions + + + + + +## [5.5.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-predictions@5.5.10...@aws-amplify/amplify-category-predictions@5.5.11) (2024-05-24) + +**Note:** Version bump only for package @aws-amplify/amplify-category-predictions + + + + + +## [5.5.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-predictions@5.5.9...@aws-amplify/amplify-category-predictions@5.5.10) (2024-05-07) + +**Note:** Version bump only for package @aws-amplify/amplify-category-predictions + + + + + +## [5.5.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-predictions@5.5.8...@aws-amplify/amplify-category-predictions@5.5.9) (2024-04-18) + +**Note:** Version bump only for package @aws-amplify/amplify-category-predictions + + + + + +## [5.5.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-predictions@5.5.7...@aws-amplify/amplify-category-predictions@5.5.8) (2024-04-15) + +**Note:** Version bump only for package @aws-amplify/amplify-category-predictions + + + + + +## [5.5.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-predictions@5.5.6...@aws-amplify/amplify-category-predictions@5.5.7) (2024-03-29) + +**Note:** Version bump only for package @aws-amplify/amplify-category-predictions + + + + + +## [5.5.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-predictions@5.5.5...@aws-amplify/amplify-category-predictions@5.5.6) (2024-03-06) + +**Note:** Version bump only for package @aws-amplify/amplify-category-predictions + + + + + +## [5.5.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-predictions@5.5.4...@aws-amplify/amplify-category-predictions@5.5.5) (2023-12-11) + +**Note:** Version bump only for package @aws-amplify/amplify-category-predictions + + + + + +## [5.5.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-predictions@5.5.2...@aws-amplify/amplify-category-predictions@5.5.4) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [5.5.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-predictions@5.5.2...@aws-amplify/amplify-category-predictions@5.5.3) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-category-predictions + + + + + +## [5.5.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-predictions@5.5.1...@aws-amplify/amplify-category-predictions@5.5.2) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-category-predictions + + + + + +## [5.5.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-predictions@5.5.0...@aws-amplify/amplify-category-predictions@5.5.1) (2023-10-12) + +**Note:** Version bump only for package @aws-amplify/amplify-category-predictions + + + + + +# [5.5.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-predictions@5.4.3...@aws-amplify/amplify-category-predictions@5.5.0) (2023-10-05) + + +### Features + +* **amplify-util-uibuilder:** amplify js backwards compatibility ([#13288](https://github.com/aws-amplify/amplify-cli/issues/13288)) ([2db3e18](https://github.com/aws-amplify/amplify-cli/commit/2db3e181cf06954085eb8fade0b26162672327db)) + + + + + +## [5.4.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-predictions@5.4.2...@aws-amplify/amplify-category-predictions@5.4.3) (2023-10-03) + +**Note:** Version bump only for package @aws-amplify/amplify-category-predictions + + + + + +## [5.4.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-predictions@5.4.1...@aws-amplify/amplify-category-predictions@5.4.2) (2023-09-22) + +**Note:** Version bump only for package @aws-amplify/amplify-category-predictions + + + + + +## [5.4.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-predictions@5.4.0...@aws-amplify/amplify-category-predictions@5.4.1) (2023-08-31) + +**Note:** Version bump only for package @aws-amplify/amplify-category-predictions + + + + + +# [5.4.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-predictions@5.3.4...@aws-amplify/amplify-category-predictions@5.4.0) (2023-08-17) + + +### Features + +* generate components using graphql ([1568581](https://github.com/aws-amplify/amplify-cli/commit/15685810460881aa71e88724398b9be05ba53781)) + + + + + +## [5.3.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-predictions@5.3.3...@aws-amplify/amplify-category-predictions@5.3.4) (2023-08-09) + +**Note:** Version bump only for package @aws-amplify/amplify-category-predictions + + + + + +## [5.3.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-predictions@5.3.2...@aws-amplify/amplify-category-predictions@5.3.3) (2023-07-28) + +**Note:** Version bump only for package @aws-amplify/amplify-category-predictions + + + + + +## [5.3.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-predictions@5.3.1...@aws-amplify/amplify-category-predictions@5.3.2) (2023-07-27) + +**Note:** Version bump only for package @aws-amplify/amplify-category-predictions + + + + + +## [5.3.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-predictions@5.3.0...@aws-amplify/amplify-category-predictions@5.3.1) (2023-07-24) + +**Note:** Version bump only for package @aws-amplify/amplify-category-predictions + + + + + +# [5.3.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-predictions@5.2.4...@aws-amplify/amplify-category-predictions@5.3.0) (2023-07-20) + + +### Features + +* uibuilder codegen service ([#12896](https://github.com/aws-amplify/amplify-cli/issues/12896)) ([3fe2f98](https://github.com/aws-amplify/amplify-cli/commit/3fe2f98a99a9daf22efccb23a031882ea2be899b)) + + + + + +## [5.2.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-predictions@5.2.3...@aws-amplify/amplify-category-predictions@5.2.4) (2023-06-13) + +**Note:** Version bump only for package @aws-amplify/amplify-category-predictions + + + + + ## [5.2.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-predictions@5.2.1...@aws-amplify/amplify-category-predictions@5.2.3) (2023-05-25) diff --git a/packages/amplify-category-predictions/package.json b/packages/amplify-category-predictions/package.json index 17da9a7571b..9b7c49d56b4 100644 --- a/packages/amplify-category-predictions/package.json +++ b/packages/amplify-category-predictions/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-category-predictions", - "version": "5.2.3", + "version": "5.5.17", "description": "amplify-cli predictions plugin", "repository": { "type": "git", @@ -25,15 +25,15 @@ "extract-api": "ts-node ../../scripts/extract-api.ts" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.0.8", - "@aws-amplify/amplify-prompts": "2.7.0", - "aws-sdk": "^2.1354.0", + "@aws-amplify/amplify-cli-core": "4.3.11", + "@aws-amplify/amplify-prompts": "2.8.6", + "aws-sdk": "^2.1464.0", "chalk": "^4.1.1", "fs-extra": "^8.1.0", "uuid": "^8.3.2" }, "devDependencies": { - "@aws-sdk/client-rekognition": "^3.303.0" + "@aws-sdk/client-rekognition": "3.624.0" }, "berry": { "plugins": [ diff --git a/packages/amplify-category-storage/CHANGELOG.md b/packages/amplify-category-storage/CHANGELOG.md index 73b75f0ba8d..47cf5f390ef 100644 --- a/packages/amplify-category-storage/CHANGELOG.md +++ b/packages/amplify-category-storage/CHANGELOG.md @@ -3,6 +3,241 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.5.16](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-storage@5.5.15...@aws-amplify/amplify-category-storage@5.5.16) (2025-01-30) + +**Note:** Version bump only for package @aws-amplify/amplify-category-storage + + + + + +## [5.5.15](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-storage@5.5.14...@aws-amplify/amplify-category-storage@5.5.15) (2024-08-02) + +**Note:** Version bump only for package @aws-amplify/amplify-category-storage + + + + + +## [5.5.14](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-storage@5.5.13...@aws-amplify/amplify-category-storage@5.5.14) (2024-06-27) + +**Note:** Version bump only for package @aws-amplify/amplify-category-storage + + + + + +## [5.5.13](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-storage@5.5.12...@aws-amplify/amplify-category-storage@5.5.13) (2024-06-20) + +**Note:** Version bump only for package @aws-amplify/amplify-category-storage + + + + + +## [5.5.12](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-storage@5.5.11...@aws-amplify/amplify-category-storage@5.5.12) (2024-06-06) + +**Note:** Version bump only for package @aws-amplify/amplify-category-storage + + + + + +## [5.5.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-storage@5.5.10...@aws-amplify/amplify-category-storage@5.5.11) (2024-05-24) + +**Note:** Version bump only for package @aws-amplify/amplify-category-storage + + + + + +## [5.5.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-storage@5.5.9...@aws-amplify/amplify-category-storage@5.5.10) (2024-05-07) + +**Note:** Version bump only for package @aws-amplify/amplify-category-storage + + + + + +## [5.5.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-storage@5.5.8...@aws-amplify/amplify-category-storage@5.5.9) (2024-04-18) + +**Note:** Version bump only for package @aws-amplify/amplify-category-storage + + + + + +## [5.5.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-storage@5.5.7...@aws-amplify/amplify-category-storage@5.5.8) (2024-04-15) + + +### Bug Fixes + +* upgrade Go runtime and fix e2e ([#13671](https://github.com/aws-amplify/amplify-cli/issues/13671)) ([395f717](https://github.com/aws-amplify/amplify-cli/commit/395f717cf52e7beef76f00ee08d37877138b0c30)) + + + + + +## [5.5.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-storage@5.5.6...@aws-amplify/amplify-category-storage@5.5.7) (2024-03-29) + +**Note:** Version bump only for package @aws-amplify/amplify-category-storage + + + + + +## [5.5.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-storage@5.5.5...@aws-amplify/amplify-category-storage@5.5.6) (2024-03-06) + +**Note:** Version bump only for package @aws-amplify/amplify-category-storage + + + + + +## [5.5.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-storage@5.5.4...@aws-amplify/amplify-category-storage@5.5.5) (2023-12-11) + +**Note:** Version bump only for package @aws-amplify/amplify-category-storage + + + + + +## [5.5.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-storage@5.5.2...@aws-amplify/amplify-category-storage@5.5.4) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [5.5.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-storage@5.5.2...@aws-amplify/amplify-category-storage@5.5.3) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-category-storage + + + + + +## [5.5.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-storage@5.5.1...@aws-amplify/amplify-category-storage@5.5.2) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-category-storage + + + + + +## [5.5.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-storage@5.5.0...@aws-amplify/amplify-category-storage@5.5.1) (2023-10-12) + +**Note:** Version bump only for package @aws-amplify/amplify-category-storage + + + + + +# [5.5.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-storage@5.4.3...@aws-amplify/amplify-category-storage@5.5.0) (2023-10-05) + + +### Features + +* **amplify-util-uibuilder:** amplify js backwards compatibility ([#13288](https://github.com/aws-amplify/amplify-cli/issues/13288)) ([2db3e18](https://github.com/aws-amplify/amplify-cli/commit/2db3e181cf06954085eb8fade0b26162672327db)) + + + + + +## [5.4.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-storage@5.4.2...@aws-amplify/amplify-category-storage@5.4.3) (2023-10-03) + +**Note:** Version bump only for package @aws-amplify/amplify-category-storage + + + + + +## [5.4.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-storage@5.4.1...@aws-amplify/amplify-category-storage@5.4.2) (2023-09-22) + +**Note:** Version bump only for package @aws-amplify/amplify-category-storage + + + + + +## [5.4.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-storage@5.4.0...@aws-amplify/amplify-category-storage@5.4.1) (2023-08-31) + +**Note:** Version bump only for package @aws-amplify/amplify-category-storage + + + + + +# [5.4.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-storage@5.3.4...@aws-amplify/amplify-category-storage@5.4.0) (2023-08-17) + + +### Features + +* generate components using graphql ([1568581](https://github.com/aws-amplify/amplify-cli/commit/15685810460881aa71e88724398b9be05ba53781)) + + + + + +## [5.3.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-storage@5.3.3...@aws-amplify/amplify-category-storage@5.3.4) (2023-08-09) + + +### Bug Fixes + +* remove vm2 ([#12989](https://github.com/aws-amplify/amplify-cli/issues/12989)) ([7bc0b56](https://github.com/aws-amplify/amplify-cli/commit/7bc0b5654a585104a537c1a3f9615bd672435b58)) + + + + + +## [5.3.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-storage@5.3.2...@aws-amplify/amplify-category-storage@5.3.3) (2023-07-28) + +**Note:** Version bump only for package @aws-amplify/amplify-category-storage + + + + + +## [5.3.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-storage@5.3.1...@aws-amplify/amplify-category-storage@5.3.2) (2023-07-27) + +**Note:** Version bump only for package @aws-amplify/amplify-category-storage + + + + + +## [5.3.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-storage@5.3.0...@aws-amplify/amplify-category-storage@5.3.1) (2023-07-24) + +**Note:** Version bump only for package @aws-amplify/amplify-category-storage + + + + + +# [5.3.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-storage@5.2.4...@aws-amplify/amplify-category-storage@5.3.0) (2023-07-20) + + +### Features + +* **amplify-category-storage:** add CRUD PartiQL permissions for DynamoDB ([#11002](https://github.com/aws-amplify/amplify-cli/issues/11002)) ([19ed508](https://github.com/aws-amplify/amplify-cli/commit/19ed5083fe24264070490c52ac9e182d98571bdb)) +* uibuilder codegen service ([#12896](https://github.com/aws-amplify/amplify-cli/issues/12896)) ([3fe2f98](https://github.com/aws-amplify/amplify-cli/commit/3fe2f98a99a9daf22efccb23a031882ea2be899b)) + + + + + +## [5.2.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-storage@5.2.3...@aws-amplify/amplify-category-storage@5.2.4) (2023-06-13) + +**Note:** Version bump only for package @aws-amplify/amplify-category-storage + + + + + ## [5.2.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-category-storage@5.2.1...@aws-amplify/amplify-category-storage@5.2.3) (2023-05-25) diff --git a/packages/amplify-category-storage/package.json b/packages/amplify-category-storage/package.json index 8296b2efeb1..84af387eba6 100644 --- a/packages/amplify-category-storage/package.json +++ b/packages/amplify-category-storage/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-category-storage", - "version": "5.2.3", + "version": "5.5.16", "description": "amplify-cli storage plugin", "repository": { "type": "git", @@ -27,23 +27,22 @@ "access": "public" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.0.8", - "@aws-amplify/amplify-environment-parameters": "1.6.3", - "@aws-amplify/amplify-prompts": "2.7.0", - "@aws-amplify/amplify-util-import": "2.6.0", - "@aws-amplify/cli-extensibility-helper": "3.0.8", - "amplify-headless-interface": "1.17.3", - "amplify-util-headless-input": "1.9.12", - "aws-cdk-lib": "~2.68.0", - "aws-sdk": "^2.1354.0", + "@aws-amplify/amplify-cli-core": "4.3.11", + "@aws-amplify/amplify-environment-parameters": "1.9.16", + "@aws-amplify/amplify-prompts": "2.8.6", + "@aws-amplify/amplify-util-import": "2.8.3", + "@aws-amplify/cli-extensibility-helper": "3.0.35", + "amplify-headless-interface": "1.17.7", + "amplify-util-headless-input": "1.9.18", + "aws-cdk-lib": "~2.177.0", + "aws-sdk": "^2.1464.0", "chalk": "^4.1.1", "constructs": "^10.0.5", "enquirer": "^2.3.6", "fs-extra": "^8.1.0", "lodash": "^4.17.21", "promise-sequential": "^1.1.1", - "uuid": "^8.3.2", - "vm2": "^3.9.19" + "uuid": "^8.3.2" }, "devDependencies": { "cloudform-types": "^4.2.0", diff --git a/packages/amplify-category-storage/resources/cloudformation-templates/dynamoDb-cloudformation-template.json.ejs b/packages/amplify-category-storage/resources/cloudformation-templates/dynamoDb-cloudformation-template.json.ejs deleted file mode 100644 index 4a91cd85e34..00000000000 --- a/packages/amplify-category-storage/resources/cloudformation-templates/dynamoDb-cloudformation-template.json.ejs +++ /dev/null @@ -1,163 +0,0 @@ -{ - "AWSTemplateFormatVersion": "2010-09-09", - "Description": "DynamoDB resource stack creation using Amplify CLI", - "Parameters": { - "partitionKeyName": { - "Type": "String" - }, - "partitionKeyType": { - "Type": "String" - }, - "env": { - "Type": "String" - }, - <%if (props.KeySchema.length > 1) { %> - "sortKeyName": { - "Type": "String" - }, - "sortKeyType": { - "Type": "String" - }, - <% } %> - "tableName": { - "Type": "String" - } - }, - "Conditions": { - "ShouldNotCreateEnvResources": { - "Fn::Equals": [ - { - "Ref": "env" - }, - "NONE" - ] - } - }, - "Resources": { - "DynamoDBTable": { - "Type": "AWS::DynamoDB::Table", - "Properties": { - "AttributeDefinitions": [ - <% for(var i=0; i < props.AttributeDefinitions.length; i++) { %> - { - "AttributeName": "<%= props.AttributeDefinitions[i].AttributeName %>", - "AttributeType": "<%= props.AttributeDefinitions[i].AttributeType %>" - } <%if (i != props.AttributeDefinitions.length - 1) { %> , <% } %> - <% } %> - ], - "KeySchema": [ - <% for(var i=0; i < props.KeySchema.length; i++) { %> - { - "AttributeName": "<%= props.KeySchema[i].AttributeName %>", - "KeyType": "<%= props.KeySchema[i].KeyType %>" - } <%if (i != props.KeySchema.length - 1) { %> , <% } %> - <% } %> - ], - "ProvisionedThroughput": { - "ReadCapacityUnits": "5", - "WriteCapacityUnits": "5" - }, - "StreamSpecification": { - "StreamViewType": "NEW_IMAGE" - }, - "TableName": { - "Fn::If": [ - "ShouldNotCreateEnvResources", - { - "Ref": "tableName" - }, - { - - "Fn::Join": [ - "", - [ - { - "Ref": "tableName" - }, - "-", - { - "Ref": "env" - } - ] - ] - } - ] - } - <%if (props.GlobalSecondaryIndexes) { %> - ,"GlobalSecondaryIndexes": [ - <% for(var i=0; i < props.GlobalSecondaryIndexes.length; i++) { %> - { - "IndexName": "<%= props.GlobalSecondaryIndexes[i].IndexName %>", - "KeySchema": [ - <% for(var j=0; j < props.GlobalSecondaryIndexes[i].KeySchema.length; j++) { %> - { - "AttributeName": "<%= props.GlobalSecondaryIndexes[i].KeySchema[j].AttributeName %>", - "KeyType": "<%= props.GlobalSecondaryIndexes[i].KeySchema[j].KeyType %>" - } <%if (j != props.GlobalSecondaryIndexes[i].KeySchema.length - 1) { %> , <% } %> - <% } %> - ], - "Projection": { - "ProjectionType": "ALL" - }, - "ProvisionedThroughput": { - "ReadCapacityUnits": "5", - "WriteCapacityUnits": "5" - } - } <%if (i != props.GlobalSecondaryIndexes.length - 1) { %> , <% } %> - <% } %> - ] - <% } %> - } - } - }, - "Outputs": { - "Name": { - "Value": { - "Ref": "DynamoDBTable" - } - }, - "Arn": { - "Value": { - "Fn::GetAtt": [ - "DynamoDBTable", - "Arn" - ] - } - }, - "StreamArn": { - "Value": { - "Fn::GetAtt": [ - "DynamoDBTable", - "StreamArn" - ] - } - }, - "PartitionKeyName": { - "Value": { - "Ref": "partitionKeyName" - } - }, - "PartitionKeyType": { - "Value": { - "Ref": "partitionKeyType" - } - }, - <%if (props.KeySchema.length > 1) { %> - "SortKeyName": { - "Value": { - "Ref": "sortKeyName" - } - }, - "SortKeyType": { - "Value": { - "Ref": "sortKeyType" - } - }, - <% } %> - "Region": { - "Value": { - "Ref": "AWS::Region" - } - } - } -} \ No newline at end of file diff --git a/packages/amplify-category-storage/resources/cloudformation-templates/s3-cloudformation-template.json.ejs b/packages/amplify-category-storage/resources/cloudformation-templates/s3-cloudformation-template.json.ejs deleted file mode 100644 index 5873d8893d2..00000000000 --- a/packages/amplify-category-storage/resources/cloudformation-templates/s3-cloudformation-template.json.ejs +++ /dev/null @@ -1,850 +0,0 @@ -{ - "AWSTemplateFormatVersion": "2010-09-09", - "Description": "S3 resource stack creation using Amplify CLI", - "Parameters": { - "bucketName": { - "Type": "String" - }, - "authPolicyName": { - "Type": "String" - }, - "unauthPolicyName": { - "Type": "String" - }, - "authRoleName": { - "Type": "String" - }, - "unauthRoleName": { - "Type": "String" - }, - "s3PublicPolicy": { - "Type": "String", - "Default" : "NONE" - }, - "s3PrivatePolicy": { - "Type": "String", - "Default" : "NONE" - }, - "s3ProtectedPolicy": { - "Type": "String", - "Default" : "NONE" - }, - "s3UploadsPolicy": { - "Type": "String", - "Default" : "NONE" - }, - "s3ReadPolicy": { - "Type": "String", - "Default" : "NONE" - }, - "s3PermissionsAuthenticatedPublic": { - "Type": "String", - "Default" : "DISALLOW" - }, - "s3PermissionsAuthenticatedProtected": { - "Type": "String", - "Default" : "DISALLOW" - }, - "s3PermissionsAuthenticatedPrivate": { - "Type": "String", - "Default" : "DISALLOW" - }, - "s3PermissionsAuthenticatedUploads": { - "Type": "String", - "Default" : "DISALLOW" - }, - "s3PermissionsGuestPublic": { - "Type": "String", - "Default" : "DISALLOW" - }, - "s3PermissionsGuestUploads": { - "Type": "String", - "Default" : "DISALLOW" }, - "AuthenticatedAllowList": { - "Type": "String", - "Default" : "DISALLOW" - }, - "GuestAllowList": { - "Type": "String", - "Default" : "DISALLOW" - }, - "selectedGuestPermissions": { - "Type": "CommaDelimitedList", - "Default" : "NONE" - }, - "selectedAuthenticatedPermissions": { - "Type": "CommaDelimitedList", - "Default" : "NONE" - }, - "env": { - "Type": "String" - }, - "triggerFunction": { - "Type": "String" - }<%if (props.dependsOn && props.dependsOn.length > 0) { %>,<% } %> - <% if (props.dependsOn) { %> - <% for(var i=0; i < props.dependsOn.length; i++) { %> - <% for(var j=0; j < props.dependsOn[i].attributes.length; j++) { %> - "<%= props.dependsOn[i].category %><%= props.dependsOn[i].resourceName %><%= props.dependsOn[i].attributes[j] %>": { - "Type": "String", - "Default": "<%= props.dependsOn[i].category %><%= props.dependsOn[i].resourceName %><%= props.dependsOn[i].attributes[j] %>" - }<%if (i !== props.dependsOn.length - 1 || j !== props.dependsOn[i].attributes.length - 1) { %>,<% } %> - <% } %> - <% } %> - <% } %> - - }, - "Conditions": { - "ShouldNotCreateEnvResources": { - "Fn::Equals": [ - { - "Ref": "env" - }, - "NONE" - ] - }, - "CreateAuthPublic": { - "Fn::Not" : [{ - "Fn::Equals" : [ - {"Ref" : "s3PermissionsAuthenticatedPublic"}, - "DISALLOW" - ] - }] - }, - "CreateAuthProtected": { - "Fn::Not" : [{ - "Fn::Equals" : [ - {"Ref" : "s3PermissionsAuthenticatedProtected"}, - "DISALLOW" - ] - }] - }, - "CreateAuthPrivate": { - "Fn::Not" : [{ - "Fn::Equals" : [ - {"Ref" : "s3PermissionsAuthenticatedPrivate"}, - "DISALLOW" - ] - }] - }, - "CreateAuthUploads": { - "Fn::Not" : [{ - "Fn::Equals" : [ - {"Ref" : "s3PermissionsAuthenticatedUploads"}, - "DISALLOW" - ] - }] - }, - "CreateGuestPublic": { - "Fn::Not" : [{ - "Fn::Equals" : [ - {"Ref" : "s3PermissionsGuestPublic"}, - "DISALLOW" - ] - }] - }, - "CreateGuestUploads": { - "Fn::Not" : [{ - "Fn::Equals" : [ - {"Ref" : "s3PermissionsGuestUploads"}, - "DISALLOW" - ] - }] - }, - "AuthReadAndList": { - "Fn::Not" : [{ - "Fn::Equals" : [ - {"Ref" : "AuthenticatedAllowList"}, - "DISALLOW" - ] - }] - }, - "GuestReadAndList": { - "Fn::Not" : [{ - "Fn::Equals" : [ - {"Ref" : "GuestAllowList"}, - "DISALLOW" - ] - }] - } - }, - "Resources": { - "S3Bucket": { - "Type": "AWS::S3::Bucket", - <% if (props.triggerFunction && props.triggerFunction != "NONE") { %> - "DependsOn": [ - "TriggerPermissions" - ], - <% } %> - "DeletionPolicy" : "Retain", - "Properties": { - "BucketName": { - "Fn::If": [ - "ShouldNotCreateEnvResources", - { - "Ref": "bucketName" - }, - { - "Fn::Join": [ - "", - [ - { - "Ref": "bucketName" - }, - { - "Fn::Select": [ - 3, - { - "Fn::Split": [ - "-", - { - "Ref": "AWS::StackName" - } - ] - } - ] - }, - "-", - { - "Ref": "env" - } - ] - ] - } - ] - }, - <% if (props.triggerFunction && props.triggerFunction != "NONE") { %> - "NotificationConfiguration": { - "LambdaConfigurations": [ - { - "Event": "s3:ObjectCreated:*", - "Function": { - "Ref": "function<%= props.triggerFunction %>Arn" - } - }, - { - "Event": "s3:ObjectRemoved:*", - "Function": { - "Ref": "function<%= props.triggerFunction %>Arn" - } - } - ] - }, - <% } %> - "CorsConfiguration": { - "CorsRules": [ - { - "AllowedHeaders": [ - "*" - ], - "AllowedMethods": [ - "GET", - "HEAD", - "PUT", - "POST", - "DELETE" - ], - "AllowedOrigins": [ - "*" - ], - "ExposedHeaders": [ - "x-amz-server-side-encryption", - "x-amz-request-id", - "x-amz-id-2", - "ETag" - ], - "Id": "S3CORSRuleId1", - "MaxAge": "3000" - } - ] - } - } - }, - <% if (props.groupList) { %> - <% for(var i=0; i < props.groupList.length; i++) { %> - "<%= props.groupList[i] %>GroupPolicy": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyName": "<%= props.groupList[i] %>-group-s3-policy", - "Roles": [ - { - "Fn::Join": [ - "", - [ - { - "Ref": "auth<%= props.authResourceName%>UserPoolId" - }, - "-<%= props.groupList[i] %>GroupRole" - ] - ] - } - ], - "PolicyDocument": { - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Action": <%- JSON.stringify(props.groupPolicyMap[props.groupList[i]]) %>, - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:aws:s3:::", - { - "Ref": "S3Bucket" - }, - "/*" - ] - ] - } - ] - } - <% if (props.groupPolicyMap[props.groupList[i]].includes('s3:ListBucket')) { %> - ,{ - "Effect": "Allow", - "Action": ["s3:ListBucket"], - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:aws:s3:::", - { - "Ref": "S3Bucket" - } - ] - ] - } - ] - } - <% } %> - ] - } - } - }, - <% } %> - <% } %> - <% if (props.triggerFunction && props.triggerFunction != "NONE") { %> - "TriggerPermissions": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Ref": "function<%= props.triggerFunction %>Name" - }, - "Principal": "s3.amazonaws.com", - "SourceAccount": { - "Ref": "AWS::AccountId" - }, - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:aws:s3:::", - { - "Fn::If": [ - "ShouldNotCreateEnvResources", - { - "Ref": "bucketName" - }, - { - "Fn::Join": [ - "", - [ - { - "Ref": "bucketName" - }, - { - "Fn::Select": [ - 3, - { - "Fn::Split": [ - "-", - { - "Ref": "AWS::StackName" - } - ] - } - ] - }, - "-", - { - "Ref": "env" - } - ] - ] - } - ] - } - ] - ] - } - } - }, - "S3TriggerBucketPolicy": { - "DependsOn": [ - "S3Bucket" - ], - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyName": "amplify-lambda-execution-policy-storage", - "Roles": [ - { - "Ref": "function<%= props.triggerFunction %>LambdaExecutionRole" - } - ], - "PolicyDocument": { - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Action": [ - "s3:PutObject", - "s3:GetObject", - "s3:ListBucket", - "s3:DeleteObject" - ], - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:aws:s3:::", - { - "Ref": "S3Bucket" - }, - "/*" - ] - ] - } - ] - } - ] - } - } - }, - <% } %> - "S3AuthPublicPolicy": { - "DependsOn": [ - "S3Bucket" - ], - "Condition": "CreateAuthPublic", - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyName": { - "Ref": "s3PublicPolicy" - }, - "Roles": [ - { - "Ref": "authRoleName" - } - ], - "PolicyDocument": { - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Action": { - "Fn::Split" : [ "," , { - "Ref": "s3PermissionsAuthenticatedPublic" - } ] - }, - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:aws:s3:::", - { - "Ref": "S3Bucket" - }, - "/public/*" - ] - ] - } - ] - } - ] - } - } - }, - "S3AuthProtectedPolicy": { - "DependsOn": [ - "S3Bucket" - ], - "Condition": "CreateAuthProtected", - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyName": { - "Ref": "s3ProtectedPolicy" - }, - "Roles": [ - { - "Ref": "authRoleName" - } - ], - "PolicyDocument": { - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Action": { - "Fn::Split" : [ "," , { - "Ref": "s3PermissionsAuthenticatedProtected" - } ] - }, - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:aws:s3:::", - { - "Ref": "S3Bucket" - }, - "/protected/${cognito-identity.amazonaws.com:sub}/*" - ] - ] - } - ] - } - ] - } - } - }, - "S3AuthPrivatePolicy": { - "DependsOn": [ - "S3Bucket" - ], - "Condition": "CreateAuthPrivate", - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyName": { - "Ref": "s3PrivatePolicy" - }, - "Roles": [ - { - "Ref": "authRoleName" - } - ], - "PolicyDocument": { - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Action": { - "Fn::Split" : [ "," , { - "Ref": "s3PermissionsAuthenticatedPrivate" - } ] - }, - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:aws:s3:::", - { - "Ref": "S3Bucket" - }, - "/private/${cognito-identity.amazonaws.com:sub}/*" - ] - ] - } - ] - } - ] - } - } - }, - "S3AuthUploadPolicy": { - "DependsOn": [ - "S3Bucket" - ], - "Condition": "CreateAuthUploads", - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyName": { - "Ref": "s3UploadsPolicy" - }, - "Roles": [ - { - "Ref": "authRoleName" - } - ], - "PolicyDocument": { - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Action": { - "Fn::Split" : [ "," , { - "Ref": "s3PermissionsAuthenticatedUploads" - } ] - }, - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:aws:s3:::", - { - "Ref": "S3Bucket" - }, - "/uploads/*" - ] - ] - } - ] - } - ] - } - } - }, - "S3AuthReadPolicy": { - "DependsOn": [ - "S3Bucket" - ], - "Condition": "AuthReadAndList", - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyName": { - "Ref": "s3ReadPolicy" - }, - "Roles": [ - { - "Ref": "authRoleName" - } - ], - "PolicyDocument": { - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Action": [ - "s3:GetObject" - ], - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:aws:s3:::", - { - "Ref": "S3Bucket" - }, - "/protected/*" - ] - ] - } - ] - }, - { - "Effect": "Allow", - "Action": [ - "s3:ListBucket" - ], - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:aws:s3:::", - { - "Ref": "S3Bucket" - } - ] - ] - } - ], - "Condition": { - "StringLike": { - "s3:prefix": [ - "public/", - "public/*", - "protected/", - "protected/*", - "private/${cognito-identity.amazonaws.com:sub}/", - "private/${cognito-identity.amazonaws.com:sub}/*" - ] - } - } - } - ] - } - } - }, - "S3GuestPublicPolicy": { - "DependsOn": [ - "S3Bucket" - ], - "Condition": "CreateGuestPublic", - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyName": { - "Ref": "s3PublicPolicy" - }, - "Roles": [ - { - "Ref": "unauthRoleName" - } - ], - "PolicyDocument": { - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Action": { - "Fn::Split" : [ "," , { - "Ref": "s3PermissionsGuestPublic" - } ] - }, - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:aws:s3:::", - { - "Ref": "S3Bucket" - }, - "/public/*" - ] - ] - } - ] - } - ] - } - } - }, - "S3GuestUploadPolicy": { - "DependsOn": [ - "S3Bucket" - ], - "Condition": "CreateGuestUploads", - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyName": { - "Ref": "s3UploadsPolicy" - }, - "Roles": [ - { - "Ref": "unauthRoleName" - } - ], - "PolicyDocument": { - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Action": { - "Fn::Split" : [ "," , { - "Ref": "s3PermissionsGuestUploads" - } ] - }, - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:aws:s3:::", - { - "Ref": "S3Bucket" - }, - "/uploads/*" - ] - ] - } - ] - } - ] - } - } - }, - "S3GuestReadPolicy": { - "DependsOn": [ - "S3Bucket" - ], - "Condition": "GuestReadAndList", - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyName": { - "Ref": "s3ReadPolicy" - }, - "Roles": [ - { - "Ref": "unauthRoleName" - } - ], - "PolicyDocument": { - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Action": [ - "s3:GetObject" - ], - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:aws:s3:::", - { - "Ref": "S3Bucket" - }, - "/protected/*" - ] - ] - } - ] - }, - { - "Effect": "Allow", - "Action": [ - "s3:ListBucket" - ], - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:aws:s3:::", - { - "Ref": "S3Bucket" - } - ] - ] - } - ], - "Condition": { - "StringLike": { - "s3:prefix": [ - "public/", - "public/*", - "protected/", - "protected/*" - ] - } - } - } - ] - } - } - } - }, - "Outputs": { - "BucketName": { - "Value": { - "Ref": "S3Bucket" - }, - "Description": "Bucket name for the S3 bucket" - }, - "Region": { - "Value": { - "Ref": "AWS::Region" - } - } - } -} diff --git a/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/cdk-stack-builder/s3-stack-builder.test.ts b/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/cdk-stack-builder/s3-stack-builder.test.ts index 01b39725384..8e0a10a0405 100644 --- a/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/cdk-stack-builder/s3-stack-builder.test.ts +++ b/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/cdk-stack-builder/s3-stack-builder.test.ts @@ -116,7 +116,6 @@ describe('Test S3 transform generates correct CFN template', () => { }); }); -// eslint-disable-next-line jest/no-export export class S3MockDataBuilder { static mockBucketName = 'mock-stack-builder-bucket-name-99'; // s3 bucket naming rules allows alphanumeric and hyphens static mockResourceName = 'mockResourceName'; @@ -166,7 +165,7 @@ export class S3MockDataBuilder { }; // eslint-disable-next-line @typescript-eslint/no-useless-constructor - constructor(__startCliInputState: S3UserInputs | undefined) { + constructor() { /* noop */ } diff --git a/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/dynamoDb-walkthrough.test.ts b/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/dynamoDb-walkthrough.test.ts index 86a0883e988..ef5524d116d 100644 --- a/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/dynamoDb-walkthrough.test.ts +++ b/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/dynamoDb-walkthrough.test.ts @@ -7,6 +7,7 @@ import { DynamoDBCLIInputs, FieldType, } from '../../../../provider-utils/awscloudformation/service-walkthrough-types/dynamoDB-user-input-types'; +import { getIAMPolicies } from '../../../../provider-utils/awscloudformation/service-walkthroughs/dynamoDb-walkthrough'; jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('@aws-amplify/amplify-prompts'); @@ -140,7 +141,7 @@ describe('update ddb walkthrough tests', () => { }); it('updateWalkthrough() test to add gsi', async () => { - let mockAmplifyMeta = { + const mockAmplifyMeta = { storage: { mockresourcename: { service: 'DynamoDB', @@ -243,3 +244,29 @@ describe('update ddb walkthrough tests', () => { expect(DynamoDBInputState.prototype.saveCliInputPayload).toHaveBeenCalledWith(expectedCLIInputsJSON); }); }); + +describe('PartiQL Policies', () => { + it('create', async () => { + const { policy } = getIAMPolicies('Dummy', ['create']); + const actions = policy.Action as string[]; + expect(actions.includes('dynamodb:PartiQLInsert')).toBe(true); + }); + + it('update', async () => { + const { policy } = getIAMPolicies('Dummy', ['update']); + const actions = policy.Action as string[]; + expect(actions.includes('dynamodb:PartiQLUpdate')).toBe(true); + }); + + it('read', async () => { + const { policy } = getIAMPolicies('Dummy', ['read']); + const actions = policy.Action as string[]; + expect(actions.includes('dynamodb:PartiQLSelect')).toBe(true); + }); + + it('delete', async () => { + const { policy } = getIAMPolicies('Dummy', ['delete']); + const actions = policy.Action as string[]; + expect(actions.includes('dynamodb:PartiQLDelete')).toBe(true); + }); +}); diff --git a/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/s3-walkthrough.test.ts b/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/s3-walkthrough.test.ts index d89c1e37c86..9e00ce04a80 100644 --- a/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/s3-walkthrough.test.ts +++ b/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/s3-walkthrough.test.ts @@ -51,8 +51,8 @@ describe('add s3 walkthrough tests', () => { getResourceStatus: async () => { return { allResources: S3MockDataBuilder.getMockGetAllResourcesNoExistingLambdas() }; }, - copyBatch: jest.fn().mockReturnValue(new Promise((resolve, reject) => resolve(true))), - updateamplifyMetaAfterResourceAdd: jest.fn().mockReturnValue(new Promise((resolve, reject) => resolve(true))), + copyBatch: jest.fn().mockReturnValue(new Promise((resolve) => resolve(true))), + updateamplifyMetaAfterResourceAdd: jest.fn().mockReturnValue(new Promise((resolve) => resolve(true))), pathManager: { getBackendDirPath: jest.fn().mockReturnValue('mockTargetDir'), }, @@ -70,7 +70,7 @@ describe('add s3 walkthrough tests', () => { }); jest.spyOn(AmplifyS3ResourceStackTransform.prototype, 'transform').mockImplementation(() => Promise.resolve()); jest.spyOn(s3AuthAPI, 'migrateAuthDependencyResource').mockReturnValue( - new Promise((resolve, _reject) => { + new Promise((resolve) => { process.nextTick(() => resolve(true)); }), ); @@ -94,7 +94,7 @@ describe('add s3 walkthrough tests', () => { stateManager.getMeta = jest.fn().mockReturnValue(S3MockDataBuilder.mockAmplifyMeta); - let options = {}; + const options = {}; const returnedResourcename = await addWalkthrough(mockContext, S3MockDataBuilder.mockFilePath, mockContext, options); expect(returnedResourcename).toEqual(S3MockDataBuilder.mockResourceName); @@ -126,7 +126,7 @@ describe('add s3 walkthrough tests', () => { stateManager.getMeta = jest.fn().mockReturnValue(S3MockDataBuilder.mockAmplifyMeta); - let options = {}; + const options = {}; const returnedResourcename = await addWalkthrough(mockContext, S3MockDataBuilder.mockFilePath, mockContext, options); expect(returnedResourcename).toEqual(S3MockDataBuilder.mockResourceName); @@ -160,7 +160,7 @@ describe('add s3 walkthrough tests', () => { stateManager.getMeta = jest.fn().mockReturnValue(S3MockDataBuilder.mockAmplifyMeta); - let options = {}; + const options = {}; const returnedResourcename = await addWalkthrough(mockContext, S3MockDataBuilder.mockFilePath, mockContext, options); expect(returnedResourcename).toEqual(S3MockDataBuilder.mockResourceName); @@ -202,7 +202,7 @@ describe('add s3 walkthrough tests', () => { stateManager.getMeta = jest.fn().mockReturnValue(S3MockDataBuilder.mockAmplifyMeta); - let options = {}; + const options = {}; const returnedResourcename = await addWalkthrough(mockContext, S3MockDataBuilder.mockFilePath, mockContext, options); expect(returnedResourcename).toEqual(S3MockDataBuilder.mockResourceName); @@ -241,8 +241,8 @@ describe('update s3 permission walkthrough tests', () => { getResourceStatus: () => { return { allResources: S3MockDataBuilder.getMockGetAllResourcesNoExistingLambdas() }; }, //eslint-disable-line - copyBatch: jest.fn().mockReturnValue(new Promise((resolve, reject) => resolve(true))), - updateamplifyMetaAfterResourceAdd: jest.fn().mockReturnValue(new Promise((resolve, reject) => resolve(true))), + copyBatch: jest.fn().mockReturnValue(new Promise((resolve) => resolve(true))), + updateamplifyMetaAfterResourceAdd: jest.fn().mockReturnValue(new Promise((resolve) => resolve(true))), pathManager: { getBackendDirPath: jest.fn().mockReturnValue('mockTargetDir'), }, @@ -445,8 +445,8 @@ describe('update s3 lambda-trigger walkthrough tests', () => { getResourceStatus: () => { return { allResources: S3MockDataBuilder.getMockGetAllResourcesNoExistingLambdas() }; }, //eslint-disable-line - copyBatch: jest.fn().mockReturnValue(new Promise((resolve, reject) => resolve(true))), - updateamplifyMetaAfterResourceAdd: jest.fn().mockReturnValue(new Promise((resolve, reject) => resolve(true))), + copyBatch: jest.fn().mockReturnValue(new Promise((resolve) => resolve(true))), + updateamplifyMetaAfterResourceAdd: jest.fn().mockReturnValue(new Promise((resolve) => resolve(true))), pathManager: { getBackendDirPath: jest.fn().mockReturnValue('mockTargetDir'), }, @@ -710,8 +710,8 @@ describe('migrate s3 and update s3 permission walkthrough tests', () => { getResourceStatus: async () => { return { allResources: S3MockDataBuilder.getMockGetAllResourcesNoExistingLambdas() }; }, - copyBatch: jest.fn().mockReturnValue(new Promise((resolve, reject) => resolve(true))), - updateamplifyMetaAfterResourceAdd: jest.fn().mockReturnValue(new Promise((resolve, reject) => resolve(true))), + copyBatch: jest.fn().mockReturnValue(new Promise((resolve) => resolve(true))), + updateamplifyMetaAfterResourceAdd: jest.fn().mockReturnValue(new Promise((resolve) => resolve(true))), pathManager: { getBackendDirPath: jest.fn().mockReturnValue('mockTargetDir'), }, diff --git a/packages/amplify-category-storage/src/provider-utils/awscloudformation/cdk-stack-builder/ddb-stack-transform.ts b/packages/amplify-category-storage/src/provider-utils/awscloudformation/cdk-stack-builder/ddb-stack-transform.ts index edf2fedb3c1..18b9e58f2c8 100644 --- a/packages/amplify-category-storage/src/provider-utils/awscloudformation/cdk-stack-builder/ddb-stack-transform.ts +++ b/packages/amplify-category-storage/src/provider-utils/awscloudformation/cdk-stack-builder/ddb-stack-transform.ts @@ -1,10 +1,8 @@ -import { AmplifyDDBResourceTemplate, getProjectInfo } from '@aws-amplify/cli-extensibility-helper'; -import { $TSContext, AmplifyError, buildOverrideDir, JSONUtilities, pathManager } from '@aws-amplify/amplify-cli-core'; -import { formatter } from '@aws-amplify/amplify-prompts'; +import { getProjectInfo } from '@aws-amplify/cli-extensibility-helper'; +import { $TSContext, AmplifyError, buildOverrideDir, JSONUtilities, pathManager, runOverride } from '@aws-amplify/amplify-cli-core'; import * as cdk from 'aws-cdk-lib'; import * as fs from 'fs-extra'; import * as path from 'path'; -import * as vm from 'vm2'; import { getDdbAttrType } from '../cfn-template-utils'; import { DynamoDBCLIInputs } from '../service-walkthrough-types/dynamoDB-user-input-types'; import { DynamoDBInputState } from '../service-walkthroughs/dynamoDB-input-state'; @@ -188,48 +186,22 @@ export class DDBStackTransform { async applyOverrides(): Promise { const backendDir = pathManager.getBackendDirPath(); const resourceDirPath = pathManager.getResourceDirectoryPath(undefined, 'storage', this._resourceName); - const overrideJSFilePath = path.resolve(path.join(resourceDirPath, 'build', 'override.js')); - const isBuild = await buildOverrideDir(backendDir, resourceDirPath); // skip if packageManager or override.ts not found if (isBuild) { - const { override } = await import(overrideJSFilePath).catch(() => { - formatter.list(['No override File Found', `To override ${this._resourceName} run amplify override auth ${this._resourceName} `]); - return undefined; - }); - - if (typeof override === 'function' && override) { - const overrideCode: string = await fs.readFile(overrideJSFilePath, 'utf-8').catch(() => { - formatter.list(['No override File Found', `To override ${this._resourceName} run amplify override auth`]); - return ''; - }); - - const sandboxNode = new vm.NodeVM({ - console: 'inherit', - timeout: 5000, - sandbox: {}, - require: { - context: 'sandbox', - builtin: ['path'], - external: true, + const projectInfo = getProjectInfo(); + try { + await runOverride(resourceDirPath, this._resourceTemplateObj, projectInfo); + } catch (err) { + throw new AmplifyError( + 'InvalidOverrideError', + { + message: `Executing overrides failed.`, + details: err.message, + resolution: 'There may be runtime errors in your overrides file. If so, fix the errors and try again.', }, - }); - const projectInfo = getProjectInfo(); - try { - await sandboxNode - .run(overrideCode, overrideJSFilePath) - .override(this._resourceTemplateObj as AmplifyDDBResourceTemplate, projectInfo); - } catch (err) { - throw new AmplifyError( - 'InvalidOverrideError', - { - message: `Executing overrides failed.`, - details: err.message, - resolution: 'There may be runtime errors in your overrides file. If so, fix the errors and try again.', - }, - err, - ); - } + err, + ); } } } diff --git a/packages/amplify-category-storage/src/provider-utils/awscloudformation/cdk-stack-builder/s3-stack-transform.ts b/packages/amplify-category-storage/src/provider-utils/awscloudformation/cdk-stack-builder/s3-stack-transform.ts index 1e073bf45e6..36d666baf35 100644 --- a/packages/amplify-category-storage/src/provider-utils/awscloudformation/cdk-stack-builder/s3-stack-transform.ts +++ b/packages/amplify-category-storage/src/provider-utils/awscloudformation/cdk-stack-builder/s3-stack-transform.ts @@ -1,5 +1,5 @@ import * as cdk from 'aws-cdk-lib'; -import { AmplifyS3ResourceTemplate, getProjectInfo } from '@aws-amplify/cli-extensibility-helper'; +import { getProjectInfo } from '@aws-amplify/cli-extensibility-helper'; import { $TSAny, $TSContext, @@ -10,11 +10,10 @@ import { IAmplifyResource, JSONUtilities, pathManager, + runOverride, } from '@aws-amplify/amplify-cli-core'; -import { formatter } from '@aws-amplify/amplify-prompts'; import * as fs from 'fs-extra'; import * as path from 'path'; -import * as vm from 'vm2'; import { S3PermissionType, S3UserInputs } from '../service-walkthrough-types/s3-user-input-types'; // eslint-disable-next-line import/no-cycle import { canResourceBeTransformed, S3CFNDependsOn, S3CFNPermissionType, S3InputState } from '../service-walkthroughs/s3-user-input-state'; @@ -195,49 +194,23 @@ export class AmplifyS3ResourceStackTransform { */ applyOverrides = async (): Promise => { const backendDir = pathManager.getBackendDirPath(); - const resourceDirPath = pathManager.getResourceDirectoryPath(undefined, AmplifyCategories.STORAGE, this.resourceName); - const overrideJSFilePath = path.resolve(path.join(resourceDirPath, 'build', 'override.js')); - - const isBuild = await buildOverrideDir(backendDir, resourceDirPath); + const overrideDir = pathManager.getResourceDirectoryPath(undefined, AmplifyCategories.STORAGE, this.resourceName); + const isBuild = await buildOverrideDir(backendDir, overrideDir); // Skip if packageManager or override.ts not found if (isBuild) { - const { override } = await import(overrideJSFilePath).catch(() => { - formatter.list(['No override File Found', `To override ${this.resourceName} run amplify override auth ${this.resourceName} `]); - return undefined; - }); - // Pass stack object - if (override && typeof override === 'function') { - const overrideCode: string = await fs.readFile(overrideJSFilePath, 'utf-8').catch(() => { - formatter.list(['No override File Found', `To override ${this.resourceName} run amplify override auth`]); - return ''; - }); - - const sandboxNode = new vm.NodeVM({ - console: 'inherit', - timeout: 5000, - sandbox: {}, - require: { - context: 'sandbox', - builtin: ['path'], - external: true, + const projectInfo = getProjectInfo(); + try { + await runOverride(overrideDir, this.resourceTemplateObj, projectInfo); + } catch (err: $TSAny) { + throw new AmplifyError( + 'InvalidOverrideError', + { + message: `Executing overrides failed.`, + details: err.message, + resolution: 'There may be runtime errors in your overrides file. If so, fix the errors and try again.', }, - }); - try { - const projectInfo = getProjectInfo(); - await sandboxNode - .run(overrideCode, overrideJSFilePath) - .override(this.resourceTemplateObj as AmplifyS3ResourceTemplate, projectInfo); - } catch (err: $TSAny) { - throw new AmplifyError( - 'InvalidOverrideError', - { - message: `Executing overrides failed.`, - details: err.message, - resolution: 'There may be runtime errors in your overrides file. If so, fix the errors and try again.', - }, - err, - ); - } + err, + ); } } }; diff --git a/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/dynamoDb-walkthrough.ts b/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/dynamoDb-walkthrough.ts index 7b7da64325f..ba1316d1fb9 100644 --- a/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/dynamoDb-walkthrough.ts +++ b/packages/amplify-category-storage/src/provider-utils/awscloudformation/service-walkthroughs/dynamoDb-walkthrough.ts @@ -731,22 +731,30 @@ export function migrate(context: $TSContext, projectPath: any, resourceName: any } export function getIAMPolicies(resourceName: string, crudOptions: $TSAny) { - let policy = {}; + let policy: $TSObject = {}; const actions: string[] = []; crudOptions.forEach((crudOption: $TSAny) => { switch (crudOption) { case 'create': - actions.push('dynamodb:Put*', 'dynamodb:Create*', 'dynamodb:BatchWriteItem'); + actions.push('dynamodb:Put*', 'dynamodb:Create*', 'dynamodb:BatchWriteItem', 'dynamodb:PartiQLInsert'); break; case 'update': - actions.push('dynamodb:Update*', 'dynamodb:RestoreTable*'); + actions.push('dynamodb:Update*', 'dynamodb:RestoreTable*', 'dynamodb:PartiQLUpdate'); break; case 'read': - actions.push('dynamodb:Get*', 'dynamodb:BatchGetItem', 'dynamodb:List*', 'dynamodb:Describe*', 'dynamodb:Scan', 'dynamodb:Query'); + actions.push( + 'dynamodb:Get*', + 'dynamodb:BatchGetItem', + 'dynamodb:List*', + 'dynamodb:Describe*', + 'dynamodb:Scan', + 'dynamodb:Query', + 'dynamodb:PartiQLSelect', + ); break; case 'delete': - actions.push('dynamodb:Delete*'); + actions.push('dynamodb:Delete*', 'dynamodb:PartiQLDelete'); break; default: console.log(`${crudOption} not supported`); diff --git a/packages/amplify-cli-core/API.md b/packages/amplify-cli-core/API.md index 9152a9a9096..c5f833aab56 100644 --- a/packages/amplify-cli-core/API.md +++ b/packages/amplify-cli-core/API.md @@ -8,9 +8,10 @@ import Ajv from 'ajv'; import { ApiKeyConfig } from '@aws-amplify/graphql-transformer-interfaces'; +import { ARN } from '@aws-sdk/util-arn-parser'; +import { BuildType } from '@aws-amplify/amplify-function-plugin-interface'; import * as cdk from 'aws-cdk-lib'; import { ChildProcess } from 'child_process'; -import { DeploymentResources } from '@aws-amplify/graphql-transformer-interfaces'; import * as execa from 'execa'; import opn from 'open'; import { Ora } from 'ora'; @@ -122,7 +123,7 @@ export class AmplifyError extends AmplifyException { } // @public (undocumented) -export type AmplifyErrorType = 'AmplifyStudioError' | 'AmplifyStudioLoginError' | 'AmplifyStudioNotEnabledError' | 'ApiCategorySchemaNotFoundError' | 'APIRateExceededError' | 'AuthImportError' | 'BackendConfigValidationError' | 'BucketAlreadyExistsError' | 'BucketNotFoundError' | 'CategoryNotEnabledError' | 'CloudFormationTemplateError' | 'CommandNotSupportedError' | 'ConfigurationError' | 'CustomPoliciesFormatError' | 'DebugConfigValueNotSetError' | 'DeploymentError' | 'DeploymentInProgressError' | 'DestructiveMigrationError' | 'DiagnoseReportUploadError' | 'DirectoryAlreadyExistsError' | 'DirectoryError' | 'DuplicateLogicalIdError' | 'EnvironmentConfigurationError' | 'EnvironmentNameError' | 'EnvironmentNotInitializedError' | 'ExportError' | 'FeatureFlagsValidationError' | 'FileSystemPermissionsError' | 'FrameworkNotSupportedError' | 'FunctionTooLargeError' | 'GraphQLError' | 'InputValidationError' | 'InvalidAmplifyAppIdError' | 'InvalidCustomResourceError' | 'InvalidDirectiveError' | 'InvalidGSIMigrationError' | 'InvalidMigrationError' | 'InvalidOverrideError' | 'InvalidStackError' | 'InvalidTransformerError' | 'IterativeRollbackError' | 'LambdaFunctionInvokeError' | 'LambdaLayerDeleteError' | 'MigrationError' | 'MissingAmplifyMetaFileError' | 'MissingExpectedParameterError' | 'MissingOverridesInstallationRequirementsError' | 'MockProcessError' | 'ModelgenError' | 'NestedProjectInitError' | 'NotImplementedError' | 'NoUpdateBackendError' | 'OpenSslCertificateError' | 'PackagingLambdaFunctionError' | 'ParameterNotFoundError' | 'PermissionsError' | 'PluginMethodNotFoundError' | 'PluginNotFoundError' | 'PluginPolicyAddError' | 'ProfileConfigurationError' | 'ProjectAppIdResolveError' | 'ProjectInitError' | 'ProjectNotFoundError' | 'ProjectNotInitializedError' | 'PushResourcesError' | 'RegionNotAvailableError' | 'RemoveNotificationAppError' | 'ResourceAlreadyExistsError' | 'ResourceCountLimitExceedError' | 'ResourceDoesNotExistError' | 'ResourceInUseError' | 'ResourceNotReadyError' | 'ResourceRemoveError' | 'SchemaNotFoundError' | 'SchemaValidationError' | 'SearchableMockProcessError' | 'SearchableMockUnavailablePortError' | 'SearchableMockUnsupportedPlatformError' | 'ShellCommandExecutionError' | 'StackNotFoundError' | 'StackStateError' | 'StorageImportError' | 'TransformerContractError' | 'UnknownDirectiveError' | 'UnsupportedLockFileTypeError' | 'UserInputError'; +export type AmplifyErrorType = 'AmplifyStudioError' | 'AmplifyStudioLoginError' | 'AmplifyStudioNotEnabledError' | 'ApiCategorySchemaNotFoundError' | 'APIRateExceededError' | 'AuthImportError' | 'BackendConfigValidationError' | 'BucketAlreadyExistsError' | 'BucketNotFoundError' | 'CategoryNotEnabledError' | 'CloudFormationTemplateError' | 'CommandNotSupportedError' | 'ConfigurationError' | 'CustomPoliciesFormatError' | 'DebugConfigValueNotSetError' | 'DeploymentError' | 'DeploymentInProgressError' | 'DestructiveMigrationError' | 'DiagnoseReportUploadError' | 'DirectoryAlreadyExistsError' | 'DirectoryError' | 'DuplicateLogicalIdError' | 'EnvironmentConfigurationError' | 'EnvironmentNameError' | 'EnvironmentNotInitializedError' | 'ExportError' | 'FeatureFlagsValidationError' | 'FileSystemPermissionsError' | 'FrameworkNotSupportedError' | 'FunctionTooLargeError' | 'GraphQLError' | 'InputValidationError' | 'InvalidAmplifyAppIdError' | 'InvalidCustomResourceError' | 'InvalidDirectiveError' | 'InvalidGSIMigrationError' | 'InvalidMigrationError' | 'InvalidOverrideError' | 'InvalidStackError' | 'InvalidTransformerError' | 'IterativeRollbackError' | 'LambdaFunctionInvokeError' | 'LambdaLayerDeleteError' | 'MigrationError' | 'MissingAmplifyMetaFileError' | 'MissingExpectedParameterError' | 'MissingOverridesInstallationRequirementsError' | 'MockProcessError' | 'ModelgenError' | 'NestedProjectInitError' | 'NotImplementedError' | 'NoUpdateBackendError' | 'OpenSslCertificateError' | 'PackagingLambdaFunctionError' | 'ParameterNotFoundError' | 'PermissionsError' | 'PluginMethodNotFoundError' | 'PluginNotFoundError' | 'PluginPolicyAddError' | 'ProfileConfigurationError' | 'ProjectAppIdResolveError' | 'ProjectInitError' | 'ProjectNotFoundError' | 'ProjectNotInitializedError' | 'PushResourcesError' | 'RegionNotAvailableError' | 'RemoveNotificationAppError' | 'ResourceAlreadyExistsError' | 'ResourceCountLimitExceedError' | 'ResourceDoesNotExistError' | 'ResourceInUseError' | 'ResourceNotReadyError' | 'ResourceRemoveError' | 'SchemaNotFoundError' | 'SchemaValidationError' | 'ScriptingFeaturesDisabledError' | 'SearchableMockProcessError' | 'SearchableMockUnavailablePortError' | 'SearchableMockUnsupportedPlatformError' | 'ShellCommandExecutionError' | 'StackNotFoundError' | 'StackStateError' | 'StorageImportError' | 'TransformerContractError' | 'UnknownDirectiveError' | 'UnsupportedLockFileTypeError' | 'UserInputError'; // @public (undocumented) export enum AmplifyEvent { @@ -329,7 +330,7 @@ export class ApiCategoryFacade { // (undocumented) static getTransformerVersion(context: $TSContext): Promise; // (undocumented) - static transformGraphQLSchema(context: $TSContext, options: $TSAny): Promise; + static transformGraphQLSchema(context: $TSContext, options: $TSAny): Promise<$TSAny | undefined>; } // @public (undocumented) @@ -819,6 +820,9 @@ export class ExportPathValidationError extends AmplifyError { constructor(errMessage?: string); } +// @public (undocumented) +export const extract: any; + // @public (undocumented) export function fancy(message?: string): void; @@ -942,6 +946,9 @@ export type GetPackageAssetPaths = () => Promise; // @public (undocumented) export const getPackageManager: (rootPath?: string) => Promise; +// @public (undocumented) +export const getPackageManagerByType: (packageManagerType: PackageManagerType) => PackageManager; + // @public (undocumented) export const getPermissionsBoundaryArn: (env?: string) => string | undefined; @@ -1478,15 +1485,31 @@ export { open_2 as open } export const overriddenCategories: string[]; // @public (undocumented) -export type PackageManager = { - packageManager: PackageManagerType; - lockFile: string; - executable: string; +export interface PackageManager { + // (undocumented) + readonly displayValue: string; + // (undocumented) + readonly executable: string; + // (undocumented) + getInstallArgs: (buildType: BuildType, resourceDir?: string) => string[]; + // (undocumented) + getRunScriptArgs: (scriptName: string) => string[]; + // (undocumented) + readonly lockFile: string; + // (undocumented) + readonly packageManager: PackageManagerType; + // (undocumented) version?: SemVer; -}; +} + +// @public (undocumented) +export const packageManagers: Record; // @public (undocumented) -export type PackageManagerType = 'yarn' | 'npm'; +export type PackageManagerType = 'yarn' | 'npm' | 'pnpm' | 'custom'; + +// @public (undocumented) +export const parseArn: (arn: string) => ARN; // @public (undocumented) export function parseHelpCommands(input: $TSAny, commandsInfo: Array): { @@ -1632,6 +1655,8 @@ export class PathManager { // (undocumented) getRootStackBuildDirPath: (projectPath: string) => string; // (undocumented) + getStackBuildCategoryResourceDirPath: (projectPath: string, category: string, resourceName: string) => string; + // (undocumented) getTagFilePath: (projectPath?: string) => string; // (undocumented) getTeamProviderInfoFilePath: (projectPath?: string) => string; @@ -1902,6 +1927,9 @@ export interface ResourceTuple { // @public (undocumented) export function runHelp(context: $TSContext, commandsInfo: Array): void; +// @public (undocumented) +export const runOverride: (overrideDir: string, templateObject: $TSAny, projectInfo: $TSAny) => Promise; + // @public (undocumented) export type Runtime = { plugins: Plugin_2[]; diff --git a/packages/amplify-cli-core/CHANGELOG.md b/packages/amplify-cli-core/CHANGELOG.md index 1226f7ca0ba..089592a3e28 100644 --- a/packages/amplify-cli-core/CHANGELOG.md +++ b/packages/amplify-cli-core/CHANGELOG.md @@ -3,6 +3,286 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [4.3.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-core@4.3.10...@aws-amplify/amplify-cli-core@4.3.11) (2025-01-30) + +**Note:** Version bump only for package @aws-amplify/amplify-cli-core + + + + + +## [4.3.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-core@4.3.9...@aws-amplify/amplify-cli-core@4.3.10) (2024-08-02) + +**Note:** Version bump only for package @aws-amplify/amplify-cli-core + + + + + +## [4.3.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-core@4.3.8...@aws-amplify/amplify-cli-core@4.3.9) (2024-06-27) + +**Note:** Version bump only for package @aws-amplify/amplify-cli-core + + + + + +## [4.3.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-core@4.3.7...@aws-amplify/amplify-cli-core@4.3.8) (2024-06-20) + + +### Bug Fixes + +* **cli:** add feature flag to control subscription field redaction behavior ([#13827](https://github.com/aws-amplify/amplify-cli/issues/13827)) ([4f9aadb](https://github.com/aws-amplify/amplify-cli/commit/4f9aadbd33a9adfa6c93f39d55ccbe0b13285965)) + + + + + +## [4.3.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-core@4.3.6...@aws-amplify/amplify-cli-core@4.3.7) (2024-06-06) + + +### Bug Fixes + +* skip types in current cloud backend ([#13803](https://github.com/aws-amplify/amplify-cli/issues/13803)) ([81ce57a](https://github.com/aws-amplify/amplify-cli/commit/81ce57afdfe73ce951143e6b20607bb3c77b43ae)) + + + + + +## [4.3.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-core@4.3.5...@aws-amplify/amplify-cli-core@4.3.6) (2024-05-24) + + +### Bug Fixes + +* do not create read stream for zip entries that are not being extracted ([883b23b](https://github.com/aws-amplify/amplify-cli/commit/883b23b6cd22a3c59296ca04f4d7f088ebb2d0a9)) +* don't create symlinks after extracting zip ([#13791](https://github.com/aws-amplify/amplify-cli/issues/13791)) ([08f358d](https://github.com/aws-amplify/amplify-cli/commit/08f358da33163fa70930ae6ef900e1d018672ef1)) + + + + + +## [4.3.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-core@4.3.4...@aws-amplify/amplify-cli-core@4.3.5) (2024-05-07) + +**Note:** Version bump only for package @aws-amplify/amplify-cli-core + + + + + +## [4.3.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-core@4.3.3...@aws-amplify/amplify-cli-core@4.3.4) (2024-04-18) + +**Note:** Version bump only for package @aws-amplify/amplify-cli-core + + + + + +## [4.3.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-core@4.3.2...@aws-amplify/amplify-cli-core@4.3.3) (2024-04-15) + + +### Bug Fixes + +* **amplify-cli-core:** gracefully handle execa race condition ([#13692](https://github.com/aws-amplify/amplify-cli/issues/13692)) ([dcafcb2](https://github.com/aws-amplify/amplify-cli/commit/dcafcb2d8bdaf7af37afa305afb10396a840825b)) +* yarn modern install workspace ([#13197](https://github.com/aws-amplify/amplify-cli/issues/13197)) ([3ca4aa9](https://github.com/aws-amplify/amplify-cli/commit/3ca4aa99457e54a89805f86e56b475aaef531d7e)) + + + + + +## [4.3.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-core@4.3.1...@aws-amplify/amplify-cli-core@4.3.2) (2024-03-29) + +**Note:** Version bump only for package @aws-amplify/amplify-cli-core + + + + + +## [4.3.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-core@4.3.0...@aws-amplify/amplify-cli-core@4.3.1) (2024-03-06) + + +### Bug Fixes + +* dependabot alert for lodash.set ([#13558](https://github.com/aws-amplify/amplify-cli/issues/13558)) ([c7f9bbe](https://github.com/aws-amplify/amplify-cli/commit/c7f9bbeb4943280bdda10304ce4e17622c5ec9c7)) + + +### Reverts + +* Revert "chore: bump data package versions (#13486)" (#13487) ([3280d40](https://github.com/aws-amplify/amplify-cli/commit/3280d40a5ab50c675b0e2b8050ad35a69c83cdc2)), closes [#13486](https://github.com/aws-amplify/amplify-cli/issues/13486) [#13487](https://github.com/aws-amplify/amplify-cli/issues/13487) + + + + + +# [4.3.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-core@4.2.13...@aws-amplify/amplify-cli-core@4.3.0) (2023-12-11) + + +### Features + +* bump data dependencies to launch RDS feature ([#13409](https://github.com/aws-amplify/amplify-cli/issues/13409)) ([7fbf29f](https://github.com/aws-amplify/amplify-cli/commit/7fbf29f56eb7335d20de0b5526fbed7795a2af09)) + + + + + +## [4.2.13](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-core@4.2.11...@aws-amplify/amplify-cli-core@4.2.13) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [4.2.12](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-core@4.2.11...@aws-amplify/amplify-cli-core@4.2.12) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-cli-core + + + + + +## [4.2.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-core@4.2.10...@aws-amplify/amplify-cli-core@4.2.11) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-cli-core + + + + + +## [4.2.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-core@4.2.9...@aws-amplify/amplify-cli-core@4.2.10) (2023-10-12) + + +### Bug Fixes + +* set awscloudformation flag to false in vscode settings after override ([#13310](https://github.com/aws-amplify/amplify-cli/issues/13310)) ([d60e505](https://github.com/aws-amplify/amplify-cli/commit/d60e505391b4f8fc58c2cc4d352698a6157f1b59)) + + + + + +## [4.2.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-core@4.2.8...@aws-amplify/amplify-cli-core@4.2.9) (2023-10-05) + + +### Bug Fixes + +* remove .cmd extension for pnpm and npm invocations ([#13133](https://github.com/aws-amplify/amplify-cli/issues/13133)) ([ea81e43](https://github.com/aws-amplify/amplify-cli/commit/ea81e43cb6cee4822d5fa6c3e1714decb7ed18b0)) + + + + + +## [4.2.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-core@4.2.7...@aws-amplify/amplify-cli-core@4.2.8) (2023-10-03) + + +### Bug Fixes + +* update api category and codegen to capture high-priority bug-fixes ([3836b90](https://github.com/aws-amplify/amplify-cli/commit/3836b90b3f9ccd654d9c1b61a4b83c9c4712290c)) + + + + + +## [4.2.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-core@4.2.6...@aws-amplify/amplify-cli-core@4.2.7) (2023-09-22) + + +### Bug Fixes + +* remove stale data ([#13128](https://github.com/aws-amplify/amplify-cli/issues/13128)) ([9703223](https://github.com/aws-amplify/amplify-cli/commit/970322372278762fff88f7046b44574b611ad210)) + + + + + +## [4.2.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-core@4.2.5...@aws-amplify/amplify-cli-core@4.2.6) (2023-08-31) + +**Note:** Version bump only for package @aws-amplify/amplify-cli-core + + + + + +## [4.2.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-core@4.2.4...@aws-amplify/amplify-cli-core@4.2.5) (2023-08-17) + + +### Bug Fixes + +* do not store windows specific package manager extension ([#13047](https://github.com/aws-amplify/amplify-cli/issues/13047)) ([d29a075](https://github.com/aws-amplify/amplify-cli/commit/d29a075d3d115db44bcaf68d58e260c7f234a4d3)) + + + + + +## [4.2.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-core@4.2.3...@aws-amplify/amplify-cli-core@4.2.4) (2023-08-09) + + +### Bug Fixes + +* Dependabot alerts for semver, tough-cookie ([#12962](https://github.com/aws-amplify/amplify-cli/issues/12962)) ([175a86b](https://github.com/aws-amplify/amplify-cli/commit/175a86b89a54c65bb6e68c0609be503d61e39d63)) +* remove vm2 ([#12989](https://github.com/aws-amplify/amplify-cli/issues/12989)) ([7bc0b56](https://github.com/aws-amplify/amplify-cli/commit/7bc0b5654a585104a537c1a3f9615bd672435b58)) +* surface override build error if scripting features are disabled ([#13013](https://github.com/aws-amplify/amplify-cli/issues/13013)) ([fa80249](https://github.com/aws-amplify/amplify-cli/commit/fa802491f8767f50dc3636e190fb70eb492fa969)) +* upgrade proxy-agent to ^6.3.0 to remove vm2 deps ([#13012](https://github.com/aws-amplify/amplify-cli/issues/13012)) ([989ec35](https://github.com/aws-amplify/amplify-cli/commit/989ec35be4dfd2bea19ea82bbe317f212729950f)) + + + + + +## [4.2.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-core@4.2.2...@aws-amplify/amplify-cli-core@4.2.3) (2023-07-28) + + +### Bug Fixes + +* surface override build error if scripting features are disabled ([#13013](https://github.com/aws-amplify/amplify-cli/issues/13013)) ([#13023](https://github.com/aws-amplify/amplify-cli/issues/13023)) ([9e99800](https://github.com/aws-amplify/amplify-cli/commit/9e998008c6aef13ee50e6ce88cc78d8e9367b66a)) + + + + + +## [4.2.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-core@4.2.1...@aws-amplify/amplify-cli-core@4.2.2) (2023-07-27) + + +### Bug Fixes + +* parsing arn with multiple slashes when importing auth ([#13009](https://github.com/aws-amplify/amplify-cli/issues/13009)) ([455c514](https://github.com/aws-amplify/amplify-cli/commit/455c514fd9d29fcec37bc9a4de9c96fef80883b5)) + + + + + +## [4.2.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-core@4.2.0...@aws-amplify/amplify-cli-core@4.2.1) (2023-07-24) + + +### Bug Fixes + +* skip hooks if flag detected ([a58e13c](https://github.com/aws-amplify/amplify-cli/commit/a58e13c55fb7dfd9e4f4a945e96d429cbecd2f9a)) + + + + + +# [4.2.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-core@4.1.0...@aws-amplify/amplify-cli-core@4.2.0) (2023-07-20) + + +### Features + +* lambda support for yarn2/3 and pnpm package managers ([#12750](https://github.com/aws-amplify/amplify-cli/issues/12750)) ([fd18195](https://github.com/aws-amplify/amplify-cli/commit/fd181952672efb0479ca6955c0c7a45fe248d1b1)) + + + + + +# [4.1.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-core@4.0.8...@aws-amplify/amplify-cli-core@4.1.0) (2023-06-13) + + +### Features + +* add status acm subcommand ([#12190](https://github.com/aws-amplify/amplify-cli/issues/12190)) ([a25ec17](https://github.com/aws-amplify/amplify-cli/commit/a25ec17bf1c5917d99b7eb8ec6e5a45b7def8a01)) + + + + + ## [4.0.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-core@4.0.6...@aws-amplify/amplify-cli-core@4.0.8) (2023-05-25) diff --git a/packages/amplify-cli-core/package.json b/packages/amplify-cli-core/package.json index 67a49b074e5..0e8ce95e362 100644 --- a/packages/amplify-cli-core/package.json +++ b/packages/amplify-cli-core/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-cli-core", - "version": "4.0.8", + "version": "4.3.11", "description": "Amplify CLI Core", "repository": { "type": "git", @@ -28,14 +28,16 @@ "extract-api": "ts-node ../../scripts/extract-api.ts" }, "dependencies": { - "@aws-amplify/amplify-cli-logger": "1.3.2", - "@aws-amplify/amplify-prompts": "2.7.0", - "@aws-amplify/graphql-transformer-interfaces": "^2.2.1", + "@aws-amplify/amplify-cli-logger": "1.3.8", + "@aws-amplify/amplify-function-plugin-interface": "1.12.1", + "@aws-amplify/amplify-prompts": "2.8.6", + "@aws-amplify/graphql-transformer-interfaces": "^3.10.2", + "@aws-sdk/util-arn-parser": "^3.310.0", "@yarnpkg/lockfile": "^1.1.0", "ajv": "^6.12.6", - "aws-cdk-lib": "~2.68.0", + "aws-cdk-lib": "~2.177.0", "chalk": "^4.1.1", - "ci-info": "^2.0.0", + "ci-info": "^3.8.0", "cli-table3": "^0.6.0", "cloudform-types": "^4.2.0", "colors": "1.4.0", @@ -51,14 +53,16 @@ "node-fetch": "^2.6.7", "open": "^8.4.0", "ora": "^4.0.3", - "proxy-agent": "^5.0.0", - "semver": "^7.3.5", + "proxy-agent": "^6.3.0", + "semver": "^7.5.4", "typescript-json-schema": "~0.52.0", "which": "^2.0.2", - "yaml": "^2.2.2" + "yaml": "^2.2.2", + "yauzl": "^3.1.3" }, "devDependencies": { - "@aws-amplify/amplify-function-plugin-interface": "1.10.2", + "@aws-amplify/amplify-function-plugin-interface": "1.10.3", + "@types/archiver": "^5.3.1", "@types/ejs": "^3.1.1", "@types/fs-extra": "^8.0.1", "@types/hjson": "^2.4.2", @@ -69,7 +73,7 @@ "@types/uuid": "^8.0.0", "@types/yarnpkg__lockfile": "^1.1.5", "jest": "^29.5.0", - "nock": "^13.0.11", + "nock": "^13.5.0", "rimraf": "^3.0.0", "strip-ansi": "^6.0.0", "uuid": "^8.3.2" diff --git a/packages/amplify-cli-core/src/__tests__/amplify-lockfile-dependency-detector/amplify-nodejs-detector.test.ts b/packages/amplify-cli-core/src/__tests__/amplify-lockfile-dependency-detector/amplify-nodejs-detector.test.ts index ba1517ca35c..267500d2e93 100644 --- a/packages/amplify-cli-core/src/__tests__/amplify-lockfile-dependency-detector/amplify-nodejs-detector.test.ts +++ b/packages/amplify-cli-core/src/__tests__/amplify-lockfile-dependency-detector/amplify-nodejs-detector.test.ts @@ -1,15 +1,19 @@ import * as path from 'path'; import { AmplifyNodePkgDetectorProps, AmplifyNodePkgDetector } from '../../amplify-node-pkg-detector'; -import { getPackageManager } from '../../utils/packageManager'; +import { getPackageManager, getPackageManagerByType } from '../../utils/packageManager'; import { coerce } from 'semver'; +import { $TSAny } from '@aws-amplify/amplify-cli-core'; -jest.mock('../../utils/packageManager'); +jest.mock('../../utils/packageManager', () => ({ + ...(jest.requireActual('../../utils/packageManager') as {}), + getPackageManager: jest.fn(), +})); describe('no package Manager cases', () => { it('error thrown when no package manager found', async () => { (getPackageManager as jest.MockedFunction).mockReturnValue(new Promise((resolve) => resolve(null))); const projectRoot = path.join(__dirname, 'resources'); - expect( + await expect( async () => await AmplifyNodePkgDetector.getInstance({ projectRoot, @@ -18,20 +22,16 @@ describe('no package Manager cases', () => { }); }); +const yarnPackageManager = getPackageManagerByType('yarn'); +const npmPackageManager = getPackageManagerByType('npm'); + describe('parsing yarn lock files', () => { it('throws error when lock file not found', async () => { - (getPackageManager as jest.MockedFunction).mockReturnValue( - new Promise((resolve) => - resolve({ - executable: 'yarn', - lockFile: 'yarn-test-not-found.lock', - packageManager: 'yarn', - version: coerce('1.22.0') ?? undefined, - }), - ), - ); + (yarnPackageManager as $TSAny).lockFile = 'yarn-test-not-found.lock'; + + (getPackageManager as jest.MockedFunction).mockResolvedValue(yarnPackageManager); const projectRoot = path.join(__dirname, 'resources'); - expect( + await expect( async () => await AmplifyNodePkgDetector.getInstance({ projectRoot, @@ -40,36 +40,20 @@ describe('parsing yarn lock files', () => { }); it('throw error on corrupted lock file', async () => { - (getPackageManager as jest.MockedFunction).mockReturnValue( - new Promise((resolve) => - resolve({ - executable: 'yarn', - lockFile: 'yarn-test-error.lock', - packageManager: 'yarn', - version: coerce('1.22.0') ?? undefined, - }), - ), - ); + (yarnPackageManager as $TSAny).lockFile = 'yarn-test-error.lock'; + (getPackageManager as jest.MockedFunction).mockResolvedValue(yarnPackageManager); const projectRoot = path.join(__dirname, 'resources'); const amplifyDetectorProps: AmplifyNodePkgDetectorProps = { projectRoot, }; - expect(async () => + await expect(async () => (await AmplifyNodePkgDetector.getInstance(amplifyDetectorProps)).detectAffectedDirectDependencies('@aws-cdk/core'), ).rejects.toThrowErrorMatchingInlineSnapshot(`"yarn.lock parsing failed with an error: Invalid value type 1:16 in lockfile"`); }); it('correctly detect dependencies for @aws-cdk/core', async () => { - (getPackageManager as jest.MockedFunction).mockReturnValue( - new Promise((resolve) => - resolve({ - executable: 'yarn', - lockFile: 'yarn-test.lock', - packageManager: 'yarn', - version: coerce('1.22.0') ?? undefined, - }), - ), - ); + (yarnPackageManager as $TSAny).lockFile = 'yarn-test.lock'; + (getPackageManager as jest.MockedFunction).mockResolvedValue(yarnPackageManager); const projectRoot = path.join(__dirname, 'resources'); const dec = await AmplifyNodePkgDetector.getInstance({ projectRoot, @@ -108,16 +92,8 @@ describe('parsing yarn lock files', () => { `); }); it('correctly detect dependencies for amplify-cli-core', async () => { - (getPackageManager as jest.MockedFunction).mockReturnValue( - new Promise((resolve) => - resolve({ - executable: 'yarn', - lockFile: 'yarn-test.lock', - packageManager: 'yarn', - version: coerce('1.22.0') ?? undefined, - }), - ), - ); + (yarnPackageManager as $TSAny).lockFile = 'yarn-test.lock'; + (getPackageManager as jest.MockedFunction).mockResolvedValue(yarnPackageManager); const projectRoot = path.join(__dirname, 'resources'); const dec = await AmplifyNodePkgDetector.getInstance({ projectRoot, @@ -150,16 +126,8 @@ describe('parsing yarn lock files', () => { }); it('correctly detect dependencies for fs-extra', async () => { - (getPackageManager as jest.MockedFunction).mockReturnValue( - new Promise((resolve) => - resolve({ - executable: 'yarn', - lockFile: 'yarn-test.lock', - packageManager: 'yarn', - version: coerce('1.22.0') ?? undefined, - }), - ), - ); + (yarnPackageManager as $TSAny).lockFile = 'yarn-test.lock'; + (getPackageManager as jest.MockedFunction).mockResolvedValue(yarnPackageManager); const projectRoot = path.join(__dirname, 'resources'); const dec = await AmplifyNodePkgDetector.getInstance({ projectRoot, @@ -206,16 +174,8 @@ describe('parsing yarn lock files', () => { }); it('correctly detect dependencies for aws-cdk-lib', async () => { - (getPackageManager as jest.MockedFunction).mockReturnValue( - new Promise((resolve) => - resolve({ - executable: 'yarn', - lockFile: 'yarn-test.lock', - packageManager: 'yarn', - version: coerce('1.22.0') ?? undefined, - }), - ), - ); + (yarnPackageManager as $TSAny).lockFile = 'yarn-test.lock'; + (getPackageManager as jest.MockedFunction).mockResolvedValue(yarnPackageManager); const projectRoot = path.join(__dirname, 'resources'); const dec = await AmplifyNodePkgDetector.getInstance({ projectRoot, @@ -225,16 +185,8 @@ describe('parsing yarn lock files', () => { it('should handle cycle in graph with yarn 1', async () => { // this test will error with stack overflow if dfs is following cycle - (getPackageManager as jest.MockedFunction).mockReturnValue( - new Promise((resolve) => - resolve({ - executable: 'yarn', - lockFile: 'yarn-test-with-cycle.lock', - packageManager: 'yarn', - version: coerce('1.22.0') ?? undefined, - }), - ), - ); + (yarnPackageManager as $TSAny).lockFile = 'yarn-test-with-cycle.lock'; + (getPackageManager as jest.MockedFunction).mockResolvedValue(yarnPackageManager); const projectRoot = path.join(__dirname, 'resources'); const dec = await AmplifyNodePkgDetector.getInstance({ projectRoot, @@ -246,17 +198,10 @@ describe('parsing yarn lock files', () => { describe('parsing package lock files', () => { it('throws error when package lock file is missing', async () => { - (getPackageManager as jest.MockedFunction).mockReturnValue( - new Promise((resolve) => - resolve({ - executable: 'npm', - lockFile: 'package-lock-not-found.json', - packageManager: 'npm', - }), - ), - ); + (npmPackageManager as $TSAny).lockFile = 'package-lock-not-found.json'; + (getPackageManager as jest.MockedFunction).mockResolvedValue(npmPackageManager); const projectRoot = path.join(__dirname, 'resources'); - expect( + await expect( async () => await AmplifyNodePkgDetector.getInstance({ projectRoot, @@ -265,20 +210,13 @@ describe('parsing package lock files', () => { }); it('throw error on corrupted package lock file', async () => { - (getPackageManager as jest.MockedFunction).mockReturnValue( - new Promise((resolve) => - resolve({ - executable: 'npm', - lockFile: 'package-lock-test-error.json', - packageManager: 'npm', - }), - ), - ); + (npmPackageManager as $TSAny).lockFile = 'package-lock-test-error.json'; + (getPackageManager as jest.MockedFunction).mockResolvedValue(npmPackageManager); const projectRoot = path.join(__dirname, 'resources'); const amplifyDetectorProps: AmplifyNodePkgDetectorProps = { projectRoot, }; - expect(async () => + await expect(async () => (await AmplifyNodePkgDetector.getInstance(amplifyDetectorProps)).detectAffectedDirectDependencies('@aws-cdk/core'), ).rejects.toThrowErrorMatchingInlineSnapshot( `"package-lock.json parsing failed with an error: 'jsonString' argument missing or empty"`, @@ -286,15 +224,8 @@ describe('parsing package lock files', () => { }); it('correctly detect dependencies', async () => { - (getPackageManager as jest.MockedFunction).mockReturnValue( - new Promise((resolve) => - resolve({ - executable: 'npm', - lockFile: 'package-lock-test.json', - packageManager: 'npm', - }), - ), - ); + (npmPackageManager as $TSAny).lockFile = 'package-lock-test.json'; + (getPackageManager as jest.MockedFunction).mockResolvedValue(npmPackageManager); const projectRoot = path.join(__dirname, 'resources'); const dec = await AmplifyNodePkgDetector.getInstance({ projectRoot, @@ -334,15 +265,8 @@ describe('parsing package lock files', () => { }); it('correctly detect dependencies for @aws-cdk/core when present in peer dependencies', async () => { - (getPackageManager as jest.MockedFunction).mockReturnValue( - new Promise((resolve) => - resolve({ - executable: 'npm', - lockFile: 'package-lock-test-peer-dependencies.json', - packageManager: 'npm', - }), - ), - ); + (npmPackageManager as $TSAny).lockFile = 'package-lock-test-peer-dependencies.json'; + (getPackageManager as jest.MockedFunction).mockResolvedValue(npmPackageManager); const projectRoot = path.join(__dirname, 'resources'); const dec = await AmplifyNodePkgDetector.getInstance({ projectRoot, @@ -360,15 +284,8 @@ describe('parsing package lock files', () => { `); }); it('correctly detect dependencies for amplify-cli-core', async () => { - (getPackageManager as jest.MockedFunction).mockReturnValue( - new Promise((resolve) => - resolve({ - executable: 'npm', - lockFile: 'package-lock-test.json', - packageManager: 'npm', - }), - ), - ); + (npmPackageManager as $TSAny).lockFile = 'package-lock-test.json'; + (getPackageManager as jest.MockedFunction).mockResolvedValue(npmPackageManager); const projectRoot = path.join(__dirname, 'resources'); const dec = await AmplifyNodePkgDetector.getInstance({ projectRoot, @@ -401,15 +318,8 @@ describe('parsing package lock files', () => { }); it('correctly detect dependencies for fs-extra', async () => { - (getPackageManager as jest.MockedFunction).mockReturnValue( - new Promise((resolve) => - resolve({ - executable: 'npm', - lockFile: 'package-lock-test.json', - packageManager: 'npm', - }), - ), - ); + (npmPackageManager as $TSAny).lockFile = 'package-lock-test.json'; + (getPackageManager as jest.MockedFunction).mockResolvedValue(npmPackageManager); const projectRoot = path.join(__dirname, 'resources'); const dec = await AmplifyNodePkgDetector.getInstance({ projectRoot, @@ -456,15 +366,8 @@ describe('parsing package lock files', () => { }); it('correctly detect dependencies for aws-cdk-lib', async () => { - (getPackageManager as jest.MockedFunction).mockReturnValue( - new Promise((resolve) => - resolve({ - executable: 'npm', - lockFile: 'package-lock-test.json', - packageManager: 'npm', - }), - ), - ); + (npmPackageManager as $TSAny).lockFile = 'package-lock-test.json'; + (getPackageManager as jest.MockedFunction).mockResolvedValue(npmPackageManager); const projectRoot = path.join(__dirname, 'resources'); const dec = await AmplifyNodePkgDetector.getInstance({ projectRoot, @@ -473,15 +376,8 @@ describe('parsing package lock files', () => { }); it('should handle cycle in graph with npm', async () => { - (getPackageManager as jest.MockedFunction).mockReturnValue( - new Promise((resolve) => - resolve({ - executable: 'npm', - lockFile: 'package-lock-test-with-cycle.json', - packageManager: 'npm', - }), - ), - ); + (npmPackageManager as $TSAny).lockFile = 'package-lock-test-with-cycle.json'; + (getPackageManager as jest.MockedFunction).mockResolvedValue(npmPackageManager); const projectRoot = path.join(__dirname, 'resources'); const dec = await AmplifyNodePkgDetector.getInstance({ projectRoot, @@ -492,21 +388,14 @@ describe('parsing package lock files', () => { describe('parsing yarn2 lock files', () => { it('throw error on corrupted lock file', async () => { - (getPackageManager as jest.MockedFunction).mockReturnValue( - new Promise((resolve) => - resolve({ - executable: 'yarn', - lockFile: 'yarn-2-test.lock', - packageManager: 'yarn', - version: coerce('1.22.0') ?? undefined, - }), - ), - ); + (yarnPackageManager as $TSAny).lockFile = 'yarn-2-test.lock'; + yarnPackageManager.version = coerce('1.22.0') ?? undefined; + (getPackageManager as jest.MockedFunction).mockResolvedValue(yarnPackageManager); const projectRoot = path.join(__dirname, 'resources'); const amplifyDetectorProps: AmplifyNodePkgDetectorProps = { projectRoot, }; - expect(async () => + await expect(async () => (await AmplifyNodePkgDetector.getInstance(amplifyDetectorProps)).detectAffectedDirectDependencies('@aws-cdk/core'), ).rejects.toThrowErrorMatchingInlineSnapshot( `"yarn.lock parsing failed with an error: Unknown token: { line: 3, col: 2, type: 'INVALID', value: undefined } 3:2 in lockfile"`, @@ -514,16 +403,9 @@ describe('parsing yarn2 lock files', () => { }); it('correctly detect dependencies for @aws-cdk/core', async () => { - (getPackageManager as jest.MockedFunction).mockReturnValue( - new Promise((resolve) => - resolve({ - executable: 'yarn', - lockFile: 'yarn-2-test.lock', - packageManager: 'yarn', - version: coerce('2.0.0') ?? undefined, - }), - ), - ); + (yarnPackageManager as $TSAny).lockFile = 'yarn-2-test.lock'; + yarnPackageManager.version = coerce('2.0.0') ?? undefined; + (getPackageManager as jest.MockedFunction).mockResolvedValue(yarnPackageManager); const projectRoot = path.join(__dirname, 'resources'); const dec = await AmplifyNodePkgDetector.getInstance({ projectRoot, @@ -563,16 +445,9 @@ describe('parsing yarn2 lock files', () => { }); it('correctly detect dependencies for amplify-cli-core', async () => { - (getPackageManager as jest.MockedFunction).mockReturnValue( - new Promise((resolve) => - resolve({ - executable: 'yarn', - lockFile: 'yarn-2-test.lock', - packageManager: 'yarn', - version: coerce('2.0.0') ?? undefined, - }), - ), - ); + (yarnPackageManager as $TSAny).lockFile = 'yarn-2-test.lock'; + yarnPackageManager.version = coerce('2.0.0') ?? undefined; + (getPackageManager as jest.MockedFunction).mockResolvedValue(yarnPackageManager); const projectRoot = path.join(__dirname, 'resources'); const dec = await AmplifyNodePkgDetector.getInstance({ projectRoot, @@ -605,16 +480,9 @@ describe('parsing yarn2 lock files', () => { }); it('correctly detect dependencies for fs-extra', async () => { - (getPackageManager as jest.MockedFunction).mockReturnValue( - new Promise((resolve) => - resolve({ - executable: 'yarn', - lockFile: 'yarn-2-test.lock', - packageManager: 'yarn', - version: coerce('2.0.0') ?? undefined, - }), - ), - ); + (yarnPackageManager as $TSAny).lockFile = 'yarn-2-test.lock'; + yarnPackageManager.version = coerce('2.0.0') ?? undefined; + (getPackageManager as jest.MockedFunction).mockResolvedValue(yarnPackageManager); const projectRoot = path.join(__dirname, 'resources'); const dec = await AmplifyNodePkgDetector.getInstance({ projectRoot, @@ -661,16 +529,9 @@ describe('parsing yarn2 lock files', () => { }); it('correctly detect dependencies for aws-cdk-lib', async () => { - (getPackageManager as jest.MockedFunction).mockReturnValue( - new Promise((resolve) => - resolve({ - executable: 'yarn', - lockFile: 'yarn-2-test.lock', - packageManager: 'yarn', - version: coerce('2.0.0') ?? undefined, - }), - ), - ); + (yarnPackageManager as $TSAny).lockFile = 'yarn-2-test.lock'; + yarnPackageManager.version = coerce('2.0.0') ?? undefined; + (getPackageManager as jest.MockedFunction).mockResolvedValue(yarnPackageManager); const projectRoot = path.join(__dirname, 'resources'); const dec = await AmplifyNodePkgDetector.getInstance({ projectRoot, diff --git a/packages/amplify-cli-core/src/__tests__/cliContextEnvironmentProvider.test.ts b/packages/amplify-cli-core/src/__tests__/cliContextEnvironmentProvider.test.ts index eb836ecd7b2..c42e520d37e 100644 --- a/packages/amplify-cli-core/src/__tests__/cliContextEnvironmentProvider.test.ts +++ b/packages/amplify-cli-core/src/__tests__/cliContextEnvironmentProvider.test.ts @@ -3,7 +3,7 @@ import { CLIEnvironmentProvider, CLIContextEnvironmentProvider } from '..'; describe('ContextCLIEnvironmentProvider tests', () => { test('returns env name from initialized context', () => { const context: any = { - getEnvInfo: (_: boolean): any => { + getEnvInfo: (): any => { return { envName: 'testenv', }; @@ -17,7 +17,7 @@ describe('ContextCLIEnvironmentProvider tests', () => { test('returns empty env name from when envInfo is undefined in context', () => { const context: any = { - getEnvInfo: (_: boolean): any => { + getEnvInfo: (): any => { return undefined; }, }; @@ -29,7 +29,7 @@ describe('ContextCLIEnvironmentProvider tests', () => { test('returns empty env name from when envInfo.envName is undefined in context', () => { const context: any = { - getEnvInfo: (_: boolean): any => { + getEnvInfo: (): any => { return { envName: undefined, }; @@ -43,7 +43,7 @@ describe('ContextCLIEnvironmentProvider tests', () => { test('returns empty env name from when getEnvInfo throws', () => { const context: any = { - getEnvInfo: (_: boolean): any => { + getEnvInfo: (): any => { throw new Error(); }, }; @@ -55,7 +55,7 @@ describe('ContextCLIEnvironmentProvider tests', () => { test('throws when undefined context passed in', () => { expect(() => { - const _: CLIEnvironmentProvider = new CLIContextEnvironmentProvider(undefined as any); + new CLIContextEnvironmentProvider(undefined as any); }).toThrowError('CLIContextEnvironmentProvider expects a context instance'); }); }); diff --git a/packages/amplify-cli-core/src/__tests__/extractZip.test.ts b/packages/amplify-cli-core/src/__tests__/extractZip.test.ts new file mode 100644 index 00000000000..67ff84567e2 --- /dev/null +++ b/packages/amplify-cli-core/src/__tests__/extractZip.test.ts @@ -0,0 +1,112 @@ +import * as fs from 'fs-extra'; +import * as path from 'path'; +import * as archiver from 'archiver'; +import { extract } from '@aws-amplify/amplify-cli-core'; +import * as os from 'os'; + +describe('extract zip', () => { + let tempDir: string; + let inputDir: string; + let outputDir: string; + let zipFilePath: string; + const file1RelativePath = 'file1.txt'; + const file1Content = Math.random().toString(); + const file2RelativePath = 'file2.txt'; + const file2Content = Math.random().toString(); + const dir1RelativePath = 'dir1'; + const file3RelativePath = path.join(dir1RelativePath, 'file3.txt'); + const file3Content: string = Math.random().toString(); + const dir2RelativePath = 'dir2'; + const file4RelativePath = path.join(dir2RelativePath, 'file4.txt'); + const file4Content: string = Math.random().toString(); + + beforeAll(async () => { + tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'extractZipTest')); + inputDir = path.join(tempDir, 'inputDir'); + outputDir = path.join(tempDir, 'outputDir'); + fs.mkdirSync(inputDir); + fs.mkdirSync(path.join(inputDir, 'dir1')); + fs.mkdirSync(path.join(inputDir, 'dir2')); + fs.writeFileSync(path.join(inputDir, file1RelativePath), file1Content); + fs.writeFileSync(path.join(inputDir, file2RelativePath), file2Content); + fs.writeFileSync(path.join(inputDir, file3RelativePath), file3Content); + fs.writeFileSync(path.join(inputDir, file4RelativePath), file4Content); + + zipFilePath = path.join(tempDir, 'archive.zip'); + const output = fs.createWriteStream(zipFilePath); + const archive = archiver.create('zip', {}); + archive.pipe(output); + archive.directory(inputDir, false); + await archive.finalize(); + }); + + beforeEach(() => { + fs.removeSync(outputDir); + }); + + afterAll(() => { + fs.removeSync(tempDir); + }); + + it('should extract full zip', async () => { + await extract(zipFilePath, { dir: outputDir }); + expect(fs.existsSync(path.join(outputDir, dir1RelativePath))).toStrictEqual(true); + expect(fs.existsSync(path.join(outputDir, dir2RelativePath))).toStrictEqual(true); + expect(fs.readFileSync(path.join(outputDir, file1RelativePath), 'utf-8')).toStrictEqual(file1Content); + expect(fs.readFileSync(path.join(outputDir, file2RelativePath), 'utf-8')).toStrictEqual(file2Content); + expect(fs.readFileSync(path.join(outputDir, file3RelativePath), 'utf-8')).toStrictEqual(file3Content); + expect(fs.readFileSync(path.join(outputDir, file4RelativePath), 'utf-8')).toStrictEqual(file4Content); + }); + + it('should skip directory', async () => { + await extract(zipFilePath, { + dir: outputDir, + skipEntryPrefixes: [dir1RelativePath], + }); + expect(fs.existsSync(path.join(outputDir, dir1RelativePath))).toStrictEqual(false); + expect(fs.existsSync(path.join(outputDir, dir2RelativePath))).toStrictEqual(true); + expect(fs.readFileSync(path.join(outputDir, file1RelativePath), 'utf-8')).toStrictEqual(file1Content); + expect(fs.readFileSync(path.join(outputDir, file2RelativePath), 'utf-8')).toStrictEqual(file2Content); + expect(fs.existsSync(path.join(outputDir, file3RelativePath))).toStrictEqual(false); + expect(fs.readFileSync(path.join(outputDir, file4RelativePath), 'utf-8')).toStrictEqual(file4Content); + }); + + it('should skip top level file', async () => { + await extract(zipFilePath, { + dir: outputDir, + skipEntryPrefixes: [file1RelativePath], + }); + expect(fs.existsSync(path.join(outputDir, dir1RelativePath))).toStrictEqual(true); + expect(fs.existsSync(path.join(outputDir, dir2RelativePath))).toStrictEqual(true); + expect(fs.existsSync(path.join(outputDir, file1RelativePath))).toStrictEqual(false); + expect(fs.readFileSync(path.join(outputDir, file2RelativePath), 'utf-8')).toStrictEqual(file2Content); + expect(fs.readFileSync(path.join(outputDir, file3RelativePath), 'utf-8')).toStrictEqual(file3Content); + expect(fs.readFileSync(path.join(outputDir, file4RelativePath), 'utf-8')).toStrictEqual(file4Content); + }); + + it('should skip nested file', async () => { + await extract(zipFilePath, { + dir: outputDir, + skipEntryPrefixes: [file4RelativePath], + }); + expect(fs.existsSync(path.join(outputDir, dir1RelativePath))).toStrictEqual(true); + expect(fs.existsSync(path.join(outputDir, dir2RelativePath))).toStrictEqual(true); + expect(fs.readFileSync(path.join(outputDir, file1RelativePath), 'utf-8')).toStrictEqual(file1Content); + expect(fs.readFileSync(path.join(outputDir, file2RelativePath), 'utf-8')).toStrictEqual(file2Content); + expect(fs.readFileSync(path.join(outputDir, file3RelativePath), 'utf-8')).toStrictEqual(file3Content); + expect(fs.existsSync(path.join(outputDir, file4RelativePath))).toStrictEqual(false); + }); + + it('should skip multiple entries', async () => { + await extract(zipFilePath, { + dir: outputDir, + skipEntryPrefixes: [file1RelativePath, dir2RelativePath], + }); + expect(fs.existsSync(path.join(outputDir, dir1RelativePath))).toStrictEqual(true); + expect(fs.existsSync(path.join(outputDir, dir2RelativePath))).toStrictEqual(false); + expect(fs.existsSync(path.join(outputDir, file1RelativePath))).toStrictEqual(false); + expect(fs.readFileSync(path.join(outputDir, file2RelativePath), 'utf-8')).toStrictEqual(file2Content); + expect(fs.readFileSync(path.join(outputDir, file3RelativePath), 'utf-8')).toStrictEqual(file3Content); + expect(fs.existsSync(path.join(outputDir, file4RelativePath))).toStrictEqual(false); + }); +}); diff --git a/packages/amplify-cli-core/src/__tests__/featureFlags.test.ts b/packages/amplify-cli-core/src/__tests__/featureFlags.test.ts index 4407c59d8af..2181262f133 100644 --- a/packages/amplify-cli-core/src/__tests__/featureFlags.test.ts +++ b/packages/amplify-cli-core/src/__tests__/featureFlags.test.ts @@ -148,7 +148,7 @@ describe('feature flags', () => { test('initialize feature flag provider successfully', async () => { const context: any = { - getEnvInfo: (__: boolean): any => ({ + getEnvInfo: (): any => ({ envName: 'dev', }), }; @@ -191,7 +191,7 @@ describe('feature flags', () => { test('initialize feature flag provider fail with json error', async () => { const context: any = { - getEnvInfo: (__: boolean): any => ({ + getEnvInfo: (): any => ({ envName: 'dev', }), }; @@ -211,7 +211,7 @@ describe('feature flags', () => { test('initialize feature flag provider successfully - overrides 1', async () => { const context: any = { - getEnvInfo: (__: boolean): any => ({ + getEnvInfo: (): any => ({ envName: 'dev', }), }; @@ -237,7 +237,7 @@ describe('feature flags', () => { test('initialize feature flag provider successfully - overrides 2', async () => { const context: any = { - getEnvInfo: (__: boolean): any => ({ + getEnvInfo: (): any => ({ envName: 'dev', }), }; @@ -263,7 +263,7 @@ describe('feature flags', () => { test('initialize feature flag provider successfully - overrides 3', async () => { const context: any = { - getEnvInfo: (__: boolean): any => ({ + getEnvInfo: (): any => ({ envName: 'dev', }), }; @@ -289,7 +289,7 @@ describe('feature flags', () => { test('initialize feature flag provider successfully - overrides 4', async () => { const context: any = { - getEnvInfo: (__: boolean): any => ({ + getEnvInfo: (): any => ({ envName: 'dev', }), }; @@ -315,7 +315,7 @@ describe('feature flags', () => { test('initialize feature flag provider fail with env error - section', async () => { const context: any = { - getEnvInfo: (__: boolean): any => ({ + getEnvInfo: (): any => ({ envName: 'dev', }), }; @@ -333,7 +333,7 @@ describe('feature flags', () => { test('initialize feature flag provider fail with env error - value', async () => { const context: any = { - getEnvInfo: (__: boolean): any => ({ + getEnvInfo: (): any => ({ envName: 'dev', }), }; @@ -351,7 +351,7 @@ describe('feature flags', () => { test('initialize feature flag provider fail with env error - bool', async () => { const context: any = { - getEnvInfo: (__: boolean): any => ({ + getEnvInfo: (): any => ({ envName: 'dev', }), }; @@ -369,7 +369,7 @@ describe('feature flags', () => { test('initialize feature flag provider fail with env error - number', async () => { const context: any = { - getEnvInfo: (__: boolean): any => ({ + getEnvInfo: (): any => ({ envName: 'dev', }), }; @@ -387,7 +387,7 @@ describe('feature flags', () => { test('initialize feature flag provider fail unknown flags unless false', async () => { const context: any = { - getEnvInfo: (__: boolean): any => ({ + getEnvInfo: (): any => ({ envName: 'dev', }), }; @@ -415,7 +415,7 @@ The following feature flags have validation errors: test('initialize feature flag provider with unknown false flag', async () => { const context: any = { - getEnvInfo: (__: boolean): any => ({ + getEnvInfo: (): any => ({ envName: 'dev', }), }; @@ -464,12 +464,12 @@ The following feature flags have validation errors: process.env = { ...realProcessEnv }; }); - test('initialization does not fail when process.env is not available', () => { + test('initialization does not fail when process.env is not available', async () => { process.env = {}; expect(process.env).toEqual({}); - provider.load(); + await provider.load(); }); test('successfully parse every form of variables', async () => { @@ -555,7 +555,7 @@ The following feature flags have validation errors: describe('file provider tests', () => { test('missing projectPath argument', async () => { const context: any = { - getEnvInfo: (__: boolean): any => ({ + getEnvInfo: (): any => ({ envName: 'dev', }), }; @@ -573,7 +573,7 @@ The following feature flags have validation errors: test('reads features when both files exists', async () => { const context: any = { - getEnvInfo: (__: boolean): any => ({ + getEnvInfo: (): any => ({ envName: 'dev', }), }; @@ -603,7 +603,7 @@ The following feature flags have validation errors: test('reads features when no environment file exist', async () => { const context: any = { - getEnvInfo: (__: boolean): any => ({ + getEnvInfo: (): any => ({ envName: 'dev', }), }; @@ -627,7 +627,7 @@ The following feature flags have validation errors: test('reads features when no files exist', async () => { const context: any = { - getEnvInfo: (__: boolean): any => ({ + getEnvInfo: (): any => ({ envName: 'dev', }), }; @@ -647,7 +647,7 @@ The following feature flags have validation errors: test('reads features when only environment file exists', async () => { const context: any = { - getEnvInfo: (__: boolean): any => ({ + getEnvInfo: (): any => ({ envName: 'dev', }), }; @@ -673,7 +673,7 @@ The following feature flags have validation errors: test('reads features when no files exists and env is unavailable', async () => { const context: any = { - getEnvInfo: (__: boolean): any => undefined, + getEnvInfo: (): any => undefined, }; const envProvider: CLIEnvironmentProvider = new CLIContextEnvironmentProvider(context); diff --git a/packages/amplify-cli-core/src/__tests__/help.test.ts b/packages/amplify-cli-core/src/__tests__/help.test.ts index e401d6c4680..4a32c748c5b 100644 --- a/packages/amplify-cli-core/src/__tests__/help.test.ts +++ b/packages/amplify-cli-core/src/__tests__/help.test.ts @@ -148,42 +148,42 @@ describe('amplify help functions: ', () => { ]; it('lookup valid command (init) and expect not null', () => { - let initCommandInfo = lookUpCommand(mockCommandsInfo, 'init'); + const initCommandInfo = lookUpCommand(mockCommandsInfo, 'init'); expect(initCommandInfo).not.toBeUndefined(); }); it('lookup invalid command and expect null', () => { - let invalidCommandInfo = lookUpCommand(mockCommandsInfo, 'invalidcommand'); + const invalidCommandInfo = lookUpCommand(mockCommandsInfo, 'invalidcommand'); expect(invalidCommandInfo).toBeUndefined(); }); it('lookup valid command (init) and expect correct command name', () => { - let initCommandInfo = lookUpCommand(mockCommandsInfo, 'init'); + const initCommandInfo = lookUpCommand(mockCommandsInfo, 'init'); expect(initCommandInfo!.command).toBe('init'); }); it('lookup valid command (configure) and expect correct command name', () => { - let initCommandInfo = lookUpCommand(mockCommandsInfo, 'configure'); + const initCommandInfo = lookUpCommand(mockCommandsInfo, 'configure'); expect(initCommandInfo!.command).toBe('configure'); }); it('lookup valid subcommand (configure project) and expect not null', () => { - let configureProjectSubCommandInfo = lookUpSubcommand(mockCommandsInfo, 'configure', 'project'); + const configureProjectSubCommandInfo = lookUpSubcommand(mockCommandsInfo, 'configure', 'project'); expect(configureProjectSubCommandInfo).not.toBeUndefined(); }); it('lookup invalid subcommand and expect null', () => { - let invalidSubCommandInfo = lookUpSubcommand(mockCommandsInfo, 'invalidcommand', 'invalidsubcommand'); + const invalidSubCommandInfo = lookUpSubcommand(mockCommandsInfo, 'invalidcommand', 'invalidsubcommand'); expect(invalidSubCommandInfo).toBeUndefined(); }); it('lookup valid subcommand (configure project) and expect correct subcommand name', () => { - let configureProjectSubCommandInfo = lookUpSubcommand(mockCommandsInfo, 'configure', 'project'); + const configureProjectSubCommandInfo = lookUpSubcommand(mockCommandsInfo, 'configure', 'project'); expect(configureProjectSubCommandInfo!.subCommand).toBe('project'); }); it('lookup valid subcommand (configure hosting) correct subcommand name', () => { - let configureHostingSubCommandInfo = lookUpSubcommand(mockCommandsInfo, 'configure', 'hosting'); + const configureHostingSubCommandInfo = lookUpSubcommand(mockCommandsInfo, 'configure', 'hosting'); expect(configureHostingSubCommandInfo!.subCommand).toBe('hosting'); }); @@ -195,7 +195,7 @@ describe('amplify help functions: ', () => { plugin: 'core', subCommands: ['configure'], }; - let specifiedCommands = parseHelpCommands(configureInput, mockCommandsInfo); + const specifiedCommands = parseHelpCommands(configureInput, mockCommandsInfo); expect(specifiedCommands.command).toBe('configure'); expect(specifiedCommands.subCommand).toBe(''); }); @@ -208,14 +208,13 @@ describe('amplify help functions: ', () => { options: { help: true, yes: false }, subCommands: ['mock', 'function'], }; - let specifiedCommands = parseHelpCommands(mockFunctionInput, mockCommandsInfo); + const specifiedCommands = parseHelpCommands(mockFunctionInput, mockCommandsInfo); expect(specifiedCommands.command).toBe('mock'); expect(specifiedCommands.subCommand).toBe('function'); }); it('run help invalid command', () => { - let mockContext: $TSContext; - mockContext = { + const mockContext = { input: { argv: ['node', 'amplify', 'invalid', 'command', '-h'], command: 'help', @@ -230,9 +229,7 @@ describe('amplify help functions: ', () => { }); it('run help command (mock)', () => { - let mockContext: $TSContext; - - mockContext = { + const mockContext = { print: { info: jest.fn(), }, @@ -249,9 +246,7 @@ describe('amplify help functions: ', () => { }); it('run help subcommand (mock function)', () => { - let mockContext: $TSContext; - - mockContext = { + const mockContext = { print: { info: jest.fn(), }, diff --git a/packages/amplify-cli-core/src/__tests__/hooks/hooksExecutor.test.ts b/packages/amplify-cli-core/src/__tests__/hooks/hooksExecutor.test.ts index 5fd048d7f08..e307c606ccf 100644 --- a/packages/amplify-cli-core/src/__tests__/hooks/hooksExecutor.test.ts +++ b/packages/amplify-cli-core/src/__tests__/hooks/hooksExecutor.test.ts @@ -1,7 +1,6 @@ import * as path from 'path'; import * as execa from 'execa'; -import * as fs from 'fs-extra'; -import { executeHooks, HooksMeta, skipHooksFilePath } from '../../hooks'; +import { executeHooks, HooksMeta } from '../../hooks'; import * as skipHooksModule from '../../hooks/skipHooks'; import { pathManager, stateManager } from '../../state-manager'; import { CommandLineInput } from '../../types'; @@ -43,6 +42,7 @@ jest.mock('which', () => ({ if (runtimeName === 'python3') return pathToPython3Runtime; if (runtimeName === 'python') return pathToPythonRuntime; if (runtimeName === 'node') return pathToNodeRuntime; + throw new Error('unknown runtime'); }), })); jest.mock('fs-extra', () => { @@ -81,26 +81,22 @@ describe('hooksExecutioner tests', () => { }); afterEach(() => { HooksMeta.releaseInstance(); + delete process.env.AMPLIFY_CLI_DISABLE_SCRIPTING_FEATURES; }); test('skip Hooks test', async () => { mockSkipHooks.mockRestore(); - const orgSkipHooksExist = fs.existsSync(skipHooksFilePath); - - fs.ensureFileSync(skipHooksFilePath); - // skip hooks file exists so no execa calls should be made + process.env.AMPLIFY_CLI_DISABLE_SCRIPTING_FEATURES = 'true'; + // skip hooks flag exists so no execa calls should be made await executeHooks(HooksMeta.getInstance({ command: 'push', plugin: 'core' } as CommandLineInput, 'pre')); expect(execa).toHaveBeenCalledTimes(0); - fs.removeSync(skipHooksFilePath); - // skip hooks file does not exists so execa calls should be made + delete process.env.AMPLIFY_CLI_DISABLE_SCRIPTING_FEATURES; + // skip hooks flag does not exist so execa calls should be made await executeHooks(HooksMeta.getInstance({ command: 'push', plugin: 'core' } as CommandLineInput, 'pre')); expect(execa).not.toHaveBeenCalledTimes(0); - // restoring the original state of skip hooks file - if (!orgSkipHooksExist) fs.removeSync(skipHooksFilePath); - else fs.ensureFileSync(skipHooksFilePath); mockSkipHooks = jest.spyOn(skipHooksModule, 'skipHooks'); }); @@ -182,4 +178,40 @@ describe('hooksExecutioner tests', () => { duplicateErrorThrown, ); }); + + test('should not exit process if execa fails with exitCode being 0', async () => { + const execaMock = execa as jest.Mocked; + (execaMock as any).mockReturnValue({ + exitCode: 0, + errNo: -32, + code: 'EPIPE', + syscall: 'write', + originalMessage: 'write EPIPE', + shortMessage: 'Command failed with EPIPE', + escapedCommand: 'testCommand', + stderr: '', + failed: true, + timedOut: false, + isCanceled: false, + killed: false, + }); + const processExitMock = jest.spyOn(process, 'exit').mockImplementation(() => undefined as never); + await executeHooks(HooksMeta.getInstance({ command: 'add', plugin: 'auth' } as CommandLineInput, 'pre')); + expect(processExitMock).toBeCalledTimes(0); + }); + + test('should exit process with exit code 76 if execa fails with exitCode other than 0', async () => { + const execaMock = execa as jest.Mocked; + (execaMock as any).mockReturnValue({ + exitCode: 1, + stderr: '', + failed: true, + timedOut: false, + isCanceled: false, + killed: false, + }); + const processExitMock = jest.spyOn(process, 'exit').mockImplementation(() => undefined as never); + await executeHooks(HooksMeta.getInstance({ command: 'add', plugin: 'auth' } as CommandLineInput, 'pre')); + expect(processExitMock).toBeCalledWith(76); + }); }); diff --git a/packages/amplify-cli-core/src/__tests__/jsonUtilities.test.ts b/packages/amplify-cli-core/src/__tests__/jsonUtilities.test.ts index 929ff4141ad..ef0cd6be7c0 100644 --- a/packages/amplify-cli-core/src/__tests__/jsonUtilities.test.ts +++ b/packages/amplify-cli-core/src/__tests__/jsonUtilities.test.ts @@ -160,7 +160,7 @@ describe('JSONUtilities tests', () => { test('JSON parse throws error when jsonString is undefined', () => { expect(() => { - const _ = JSONUtilities.parse(undefined as unknown as string); + JSONUtilities.parse(undefined as unknown as string); }).toThrowError(`'jsonString' argument missing or empty`); }); diff --git a/packages/amplify-cli-core/src/__tests__/packageManager.test.ts b/packages/amplify-cli-core/src/__tests__/packageManager.test.ts index c9208bb064b..5958b3de32c 100644 --- a/packages/amplify-cli-core/src/__tests__/packageManager.test.ts +++ b/packages/amplify-cli-core/src/__tests__/packageManager.test.ts @@ -71,7 +71,7 @@ describe('packageManager tests', () => { const packageManager = await getPackageManager(testDirectory); - expect(which_mock.sync).toBeCalledTimes(1); + expect(which_mock.sync).toBeCalledTimes(2); expect(packageManager).toBeDefined(); expect(packageManager!.packageManager).toEqual('npm'); }); diff --git a/packages/amplify-cli-core/src/__tests__/pathManager.test.ts b/packages/amplify-cli-core/src/__tests__/pathManager.test.ts index f32b47e1663..3b8e8b233b0 100644 --- a/packages/amplify-cli-core/src/__tests__/pathManager.test.ts +++ b/packages/amplify-cli-core/src/__tests__/pathManager.test.ts @@ -45,3 +45,13 @@ describe('test getAmplifyPackageLibDirPath', () => { } }); }); + +describe('test getStackBuildCategoryResourceDirPath', () => { + const category = 'storage'; + const resourceName = 'testResource'; + const expectedPath = path.join(pathManager.getRootStackBuildDirPath('projectPath'), category, resourceName); + + it('should return correct path', () => { + expect(pathManager.getStackBuildCategoryResourceDirPath('projectPath', category, resourceName)).toEqual(expectedPath); + }); +}); diff --git a/packages/amplify-cli-core/src/__tests__/utils/isResourceNameUnique.test.ts b/packages/amplify-cli-core/src/__tests__/utils/isResourceNameUnique.test.ts index 91446026a58..9e918148f5f 100644 --- a/packages/amplify-cli-core/src/__tests__/utils/isResourceNameUnique.test.ts +++ b/packages/amplify-cli-core/src/__tests__/utils/isResourceNameUnique.test.ts @@ -11,13 +11,23 @@ stateManager_mock.getMeta.mockReturnValue({ }, }); -test('conflict exists if names differ by case only', () => { +test('conflict exists if names differ by case only - throw error', () => { expect(() => isResourceNameUnique('api', 'testblog')).toThrowErrorMatchingInlineSnapshot( `"A resource named 'testBlog' already exists. Amplify resource names must be unique and are case-insensitive."`, ); }); +test('conflict exists - exit without throwing error', () => { + const result = isResourceNameUnique('api', 'testBlog', false); + expect(result).toBe(false); +}); + test('conflict does not exist if names differ by characters', () => { const result = isResourceNameUnique('api', 'newname'); expect(result).toBe(true); }); + +test('conflict does not exist if category not found', () => { + const result = isResourceNameUnique('nosuchcategory', 'newname'); + expect(result).toBe(true); +}); diff --git a/packages/amplify-cli-core/src/__tests__/utils/recursiveOmit.test.ts b/packages/amplify-cli-core/src/__tests__/utils/recursiveOmit.test.ts new file mode 100644 index 00000000000..93e8dee21a3 --- /dev/null +++ b/packages/amplify-cli-core/src/__tests__/utils/recursiveOmit.test.ts @@ -0,0 +1,104 @@ +import { recursiveOmit } from '../../utils'; +import { $TSObject } from '../..'; + +describe('recursiveOmit', () => { + let testObject: $TSObject; + + beforeEach(() => { + testObject = { + prop1: { + prop2: { + prop3: 'val3', + prop4: 'val4', + }, + prop5: { + prop6: 'val6', + }, + }, + }; + }); + + test('empty path does not mutate object', () => { + const result = { + prop1: { + prop2: { + prop3: 'val3', + prop4: 'val4', + }, + prop5: { + prop6: 'val6', + }, + }, + }; + + recursiveOmit(testObject, []); + expect(testObject).toEqual(result); + }); + + test('wrong path does not mutate object', () => { + const result = { + prop1: { + prop2: { + prop3: 'val3', + prop4: 'val4', + }, + prop5: { + prop6: 'val6', + }, + }, + }; + + recursiveOmit(testObject, ['prop1', 'prop7']); + expect(testObject).toEqual(result); + }); + + test('deleting a key with subkeys removes them all', () => { + const result = {}; + + recursiveOmit(testObject, ['prop1']); + expect(testObject).toEqual(result); + }); + + test('deleting a key with subkeys does not mutate sibling keys and subkeys', () => { + const result = { + prop1: { + prop5: { + prop6: 'val6', + }, + }, + }; + + recursiveOmit(testObject, ['prop1', 'prop2']); + expect(testObject).toEqual(result); + }); + + test('deleting a key in a specific path does not affect sibling keys if there are any', () => { + const result = { + prop1: { + prop2: { + prop4: 'val4', + }, + prop5: { + prop6: 'val6', + }, + }, + }; + + recursiveOmit(testObject, ['prop1', 'prop2', 'prop3']); + expect(testObject).toEqual(result); + }); + + test('deleting a key in a specific path results in deleting keys that no longer have child keys', () => { + const result = { + prop1: { + prop2: { + prop3: 'val3', + prop4: 'val4', + }, + }, + }; + + recursiveOmit(testObject, ['prop1', 'prop5', 'prop6']); + expect(testObject).toEqual(result); + }); +}); diff --git a/packages/amplify-cli-core/src/banner-message/index.ts b/packages/amplify-cli-core/src/banner-message/index.ts index 42a24c40776..b2dc8776725 100644 --- a/packages/amplify-cli-core/src/banner-message/index.ts +++ b/packages/amplify-cli-core/src/banner-message/index.ts @@ -1,6 +1,6 @@ import fetch from 'node-fetch'; import semver from 'semver'; -import ProxyAgent from 'proxy-agent'; +import { ProxyAgent } from 'proxy-agent'; import { getLogger } from '../logger'; export type Message = { @@ -43,7 +43,8 @@ export class BannerMessage { try { logger.info(`fetch banner messages from ${url}`); const proxy = process.env.HTTP_PROXY || process.env.HTTPS_PROXY; - const fetchOptions = proxy ? { agent: new ProxyAgent(proxy) } : {}; + // HTTP_PROXY & HTTPS_PROXY env vars are read automatically by ProxyAgent, but we check to see if they are set before using the proxy + const fetchOptions = proxy ? { agent: new ProxyAgent() } : {}; const result = await fetch(url, fetchOptions); const body = await result.json(); if (!semver.satisfies(body.version, MAX_SUPPORTED_MESSAGE_CONFIG_VERSION)) { diff --git a/packages/amplify-cli-core/src/errors/amplify-exception.ts b/packages/amplify-cli-core/src/errors/amplify-exception.ts index 1685f388b3c..52034d32578 100644 --- a/packages/amplify-cli-core/src/errors/amplify-exception.ts +++ b/packages/amplify-cli-core/src/errors/amplify-exception.ts @@ -169,6 +169,7 @@ export type AmplifyErrorType = | 'ResourceRemoveError' | 'SchemaNotFoundError' | 'SchemaValidationError' + | 'ScriptingFeaturesDisabledError' | 'SearchableMockProcessError' | 'SearchableMockUnavailablePortError' | 'SearchableMockUnsupportedPlatformError' diff --git a/packages/amplify-cli-core/src/extractZip.js b/packages/amplify-cli-core/src/extractZip.js new file mode 100644 index 00000000000..13907dbb103 --- /dev/null +++ b/packages/amplify-cli-core/src/extractZip.js @@ -0,0 +1,169 @@ +/* eslint-disable no-bitwise */ +/* eslint-disable spellcheck/spell-checker */ +/** + * This file is copied from https://github.com/max-mapper/extract-zip + * and turned off creating symlinks on the machine where archive is extracted + */ +const { createWriteStream, promises: fs } = require('fs'); +const path = require('path'); +const { promisify } = require('util'); +const stream = require('stream'); +const yauzl = require('yauzl'); +const { getAmplifyLogger } = require('@aws-amplify/amplify-cli-logger'); + +const openZip = promisify(yauzl.open); +const pipeline = promisify(stream.pipeline); + +class Extractor { + constructor(zipPath, opts) { + this.zipPath = zipPath; + this.opts = opts; + } + + async extract() { + this.zipfile = await openZip(this.zipPath, { lazyEntries: true }); + this.canceled = false; + + return new Promise((resolve, reject) => { + this.zipfile.on('error', (err) => { + this.canceled = true; + reject(err); + }); + this.zipfile.readEntry(); + + this.zipfile.on('close', () => { + if (!this.canceled) { + resolve(); + } + }); + + // eslint-disable-next-line @typescript-eslint/no-misused-promises + this.zipfile.on('entry', async (entry) => { + if (this.canceled) { + return; + } + + if (entry.fileName.startsWith('__MACOSX/')) { + this.zipfile.readEntry(); + return; + } + + if (this.opts.skipEntryPrefixes && Array.isArray(this.opts.skipEntryPrefixes) && this.opts.skipEntryPrefixes.length > 0) { + for (const skipEntriesPrefix of this.opts.skipEntryPrefixes) { + if (entry.fileName.startsWith(skipEntriesPrefix)) { + this.zipfile.readEntry(); + return; + } + } + } + + const destDir = path.dirname(path.join(this.opts.dir, entry.fileName)); + + try { + await fs.mkdir(destDir, { recursive: true }); + + const canonicalDestDir = await fs.realpath(destDir); + const relativeDestDir = path.relative(this.opts.dir, canonicalDestDir); + + if (relativeDestDir.split(path.sep).includes('..')) { + throw new Error(`Out of bound path "${canonicalDestDir}" found while processing file ${entry.fileName}`); + } + + await this.extractEntry(entry); + this.zipfile.readEntry(); + } catch (err) { + this.canceled = true; + this.zipfile.close(); + reject(err); + } + }); + }); + } + + async extractEntry(entry) { + /* istanbul ignore if */ + if (this.canceled) { + return; + } + + if (this.opts.onEntry) { + this.opts.onEntry(entry, this.zipfile); + } + + const dest = path.join(this.opts.dir, entry.fileName); + + // convert external file attr int into a fs stat mode int + const mode = (entry.externalFileAttributes >> 16) & 0xffff; + // check if it's a symlink or dir (using stat mode constants) + const IFMT = 61440; + const IFDIR = 16384; + const IFLNK = 40960; + const symlink = (mode & IFMT) === IFLNK; + let isDir = (mode & IFMT) === IFDIR; + + // Failsafe, borrowed from jsZip + if (!isDir && entry.fileName.endsWith('/')) { + isDir = true; + } + + // check for windows weird way of specifying a directory + // https://github.com/maxogden/extract-zip/issues/13#issuecomment-154494566 + const madeBy = entry.versionMadeBy >> 8; + if (!isDir) isDir = madeBy === 0 && entry.externalFileAttributes === 16; + + const procMode = this.getExtractedMode(mode, isDir) & 0o777; + + // always ensure folders are created + const destDir = isDir ? dest : path.dirname(dest); + + const mkdirOptions = { recursive: true }; + if (isDir) { + mkdirOptions.mode = procMode; + } + await fs.mkdir(destDir, mkdirOptions); + if (isDir) return; + + if (symlink) { + getAmplifyLogger().logError({ message: 'Found symlinks in the zipped directory. These symlinks will not be extracted' }); + return; + } + const readStream = await promisify(this.zipfile.openReadStream.bind(this.zipfile))(entry); + await pipeline(readStream, createWriteStream(dest, { mode: procMode })); + } + + getExtractedMode(entryMode, isDir) { + let mode = entryMode; + // Set defaults, if necessary + if (mode === 0) { + if (isDir) { + if (this.opts.defaultDirMode) { + mode = parseInt(this.opts.defaultDirMode, 10); + } + + if (!mode) { + mode = 0o755; + } + } else { + if (this.opts.defaultFileMode) { + mode = parseInt(this.opts.defaultFileMode, 10); + } + + if (!mode) { + mode = 0o644; + } + } + } + + return mode; + } +} + +module.exports = async function (zipPath, opts) { + if (!path.isAbsolute(opts.dir)) { + throw new Error('Target directory is expected to be absolute'); + } + + await fs.mkdir(opts.dir, { recursive: true }); + opts.dir = await fs.realpath(opts.dir); + return new Extractor(zipPath, opts).extract(); +}; diff --git a/packages/amplify-cli-core/src/feature-flags/featureFlags.ts b/packages/amplify-cli-core/src/feature-flags/featureFlags.ts index 54133b0310b..e105906b37e 100644 --- a/packages/amplify-cli-core/src/feature-flags/featureFlags.ts +++ b/packages/amplify-cli-core/src/feature-flags/featureFlags.ts @@ -671,6 +671,12 @@ export class FeatureFlags { defaultValueForExistingProjects: false, defaultValueForNewProjects: true, }, + { + name: 'subscriptionsInheritPrimaryAuth', + type: 'boolean', + defaultValueForExistingProjects: false, + defaultValueForNewProjects: false, + }, ]); this.registerFlag('frontend-ios', [ diff --git a/packages/amplify-cli-core/src/help/commands-info.ts b/packages/amplify-cli-core/src/help/commands-info.ts index ec4a68fdfdd..a582300d775 100644 --- a/packages/amplify-cli-core/src/help/commands-info.ts +++ b/packages/amplify-cli-core/src/help/commands-info.ts @@ -59,7 +59,16 @@ export const commandsInfo: Array = [ command: 'configure', commandDescription: 'Configure the CLI to work with your AWS profile', commandUsage: 'amplify configure [subcommand]', - commandFlags: [], + commandFlags: [ + { short: '', long: 'usage-data-on', flagDescription: 'Turn on usage data sharing.' }, + { short: '', long: 'usage-data-off', flagDescription: 'Turn off usage data sharing.' }, + { short: '', long: 'share-project-config-on', flagDescription: 'Turn on non-sensitive project configurations sharing on failures.' }, + { + short: '', + long: 'share-project-config-off', + flagDescription: 'Turn off non-sensitive project configurations sharing on failures.', + }, + ], subCommands: [ { subCommand: 'project', @@ -697,7 +706,7 @@ export const commandsInfo: Array = [ { short: '', long: 'send-report', - flagDescription: 'Share non-sensitive configurations of your Amplify backend with the Amplify team', + flagDescription: 'Share non-sensitive project configurations of your Amplify backend with the Amplify team', }, { short: '', diff --git a/packages/amplify-cli-core/src/hooks/hooksExecutor.ts b/packages/amplify-cli-core/src/hooks/hooksExecutor.ts index 758652bf5db..b0c430719c6 100644 --- a/packages/amplify-cli-core/src/hooks/hooksExecutor.ts +++ b/packages/amplify-cli-core/src/hooks/hooksExecutor.ts @@ -86,9 +86,17 @@ const execHelper = async ( error: errorParameter, }), stripFinalNewline: false, + stdout: 'inherit', + // added to do further checks before throwing due to EPIPE error + reject: false, }); - childProcess?.stdout?.pipe(process.stdout); const childProcessResult = await childProcess; + + // throw if child process ended with anything other than exitCode 0 + if (childProcessResult && childProcess.exitCode !== 0) { + throw childProcessResult; + } + if (!childProcessResult?.stdout?.endsWith(EOL)) { printer.blankLine(); } diff --git a/packages/amplify-cli-core/src/hooks/skipHooks.ts b/packages/amplify-cli-core/src/hooks/skipHooks.ts index 10ae6e74bb6..7676e7074d2 100644 --- a/packages/amplify-cli-core/src/hooks/skipHooks.ts +++ b/packages/amplify-cli-core/src/hooks/skipHooks.ts @@ -1,11 +1,8 @@ -import * as fs from 'fs-extra'; -import { skipHooksFilePath } from './hooksConstants'; - export function skipHooks(): boolean { // DO NOT CHANGE: used to skip hooks on Admin UI - try { - return fs.existsSync(skipHooksFilePath); - } catch (err) { + if (process.env.AMPLIFY_CLI_DISABLE_SCRIPTING_FEATURES) { + return true; + } else { return false; } } diff --git a/packages/amplify-cli-core/src/index.ts b/packages/amplify-cli-core/src/index.ts index 19c1882230e..0fd92bdc425 100644 --- a/packages/amplify-cli-core/src/index.ts +++ b/packages/amplify-cli-core/src/index.ts @@ -1,6 +1,7 @@ /* eslint-disable import/no-cycle */ import * as ExeInfo from './exeInfo'; -export { ExeInfo }; +const extract = require('./extractZip'); +export { ExeInfo, extract }; export * from './banner-message'; export * from './category-interfaces'; export * from './cfnUtilities'; diff --git a/packages/amplify-cli-core/src/overrides-manager/index.ts b/packages/amplify-cli-core/src/overrides-manager/index.ts index a05e7cc0df0..e3b19f3d02c 100644 --- a/packages/amplify-cli-core/src/overrides-manager/index.ts +++ b/packages/amplify-cli-core/src/overrides-manager/index.ts @@ -1,2 +1,3 @@ export * from './migration-message'; export * from './override-skeleton-generator'; +export * from './override-runner'; diff --git a/packages/amplify-cli-core/src/overrides-manager/override-runner.ts b/packages/amplify-cli-core/src/overrides-manager/override-runner.ts new file mode 100644 index 00000000000..edd7bb990b3 --- /dev/null +++ b/packages/amplify-cli-core/src/overrides-manager/override-runner.ts @@ -0,0 +1,15 @@ +import { $TSAny } from '../index'; +import * as path from 'path'; + +export const runOverride = async (overrideDir: string, templateObject: $TSAny, projectInfo: $TSAny): Promise => { + const overrideJSFilePath = path.join(overrideDir, 'build', 'override.js'); + // before importing the override file, we should clear the require cache to avoid + // importing an outdated version of the override file + // see: https://github.com/nodejs/modules/issues/307 + // and https://stackoverflow.com/questions/9210542/node-js-require-cache-possible-to-invalidate + delete require.cache[require.resolve(overrideJSFilePath)]; + const overrideImport = require(overrideJSFilePath); + if (overrideImport && overrideImport?.override && typeof overrideImport?.override === 'function') { + await overrideImport.override(templateObject, projectInfo); + } +}; diff --git a/packages/amplify-cli-core/src/overrides-manager/override-skeleton-generator.ts b/packages/amplify-cli-core/src/overrides-manager/override-skeleton-generator.ts index d51ebf15a9a..2ef3baa4f0d 100644 --- a/packages/amplify-cli-core/src/overrides-manager/override-skeleton-generator.ts +++ b/packages/amplify-cli-core/src/overrides-manager/override-skeleton-generator.ts @@ -2,8 +2,9 @@ import { printer, prompter } from '@aws-amplify/amplify-prompts'; import execa from 'execa'; import * as fs from 'fs-extra'; import * as path from 'path'; -import { $TSContext, AmplifyError, getPackageManager, pathManager } from '../index'; +import { $TSContext, AmplifyError, getPackageManager, pathManager, skipHooks, stateManager } from '../index'; import { JSONUtilities } from '../jsonUtilities'; +import { merge } from 'lodash'; /** * This method generates the default/template overrides file @@ -47,6 +48,11 @@ export const buildOverrideDir = async (cwd: string, destDirPath: string): Promis // return when no override file found return false; } + if (skipHooks()) { + throw new AmplifyError('ScriptingFeaturesDisabledError', { + message: 'A flag to disable overrides has been detected, please deploy from a different environment.', + }); + } const overrideBackendPackageJson = path.join(pathManager.getBackendDirPath(), 'package.json'); if (!fs.existsSync(overrideBackendPackageJson)) { const overrideSamplePackageJsonPath = path.join(__dirname, '..', '..', 'resources', 'overrides-resource', 'package.json'); @@ -58,6 +64,10 @@ export const buildOverrideDir = async (cwd: string, destDirPath: string): Promis const overrideSampleTsconfigJsonPath = path.join(__dirname, '..', '..', 'resources', 'overrides-resource', 'tsconfig.json'); fs.writeFileSync(overrideBackendTsConfigJson, fs.readFileSync(overrideSampleTsconfigJsonPath)); } + + // ensure awscloudformation folder is not excluded in vscode + setSettingsJsonAwscloudformationFlagFalse(); + const packageManager = await getPackageManager(cwd); if (packageManager === null) { @@ -149,3 +159,27 @@ export const generateTsConfigforProject = (srcResourceDirPath: string, destDirPa fs.writeFileSync(overrideFileName, fs.readFileSync(path.join(srcResourceDirPath, 'override.ts.sample'))); fs.writeFileSync(resourceTsConfigFileName, fs.readFileSync(path.join(srcResourceDirPath, 'tsconfig.resource.json'))); }; + +/** + * this method sets the flag to false in vscode settings.json to show awscloudformation folder in vscode + */ +const setSettingsJsonAwscloudformationFlagFalse = (): void => { + if (stateManager.getLocalEnvInfo().defaultEditor !== 'vscode') { + return; + } + + const workspaceSettingsPath = '.vscode/settings.json'; + const exclusionRules = { + 'files.exclude': { + 'amplify/backend/awscloudformation': false, + }, + }; + + try { + // if settings file exists, safely add exclude settings to it + const settings = JSONUtilities.readJson(workspaceSettingsPath); + JSONUtilities.writeJson(workspaceSettingsPath, merge(settings, exclusionRules)); + } catch (error) { + // workspace settings file does not exist, noop + } +}; diff --git a/packages/amplify-cli-core/src/plugin-facade/api-category-facade.ts b/packages/amplify-cli-core/src/plugin-facade/api-category-facade.ts index 3496a363e87..8270ff8da23 100644 --- a/packages/amplify-cli-core/src/plugin-facade/api-category-facade.ts +++ b/packages/amplify-cli-core/src/plugin-facade/api-category-facade.ts @@ -1,5 +1,3 @@ -import { DeploymentResources } from '@aws-amplify/graphql-transformer-interfaces'; -// eslint-disable-next-line import/no-cycle import { $TSAny, $TSContext } from '..'; const API_CATEGORY_NAME = 'api'; @@ -26,7 +24,7 @@ export class ApiCategoryFacade { * Perform the actual transformation for a given project. This is predominantlyu a side-effecting call, but we * also return the deployment resources as well. */ - static async transformGraphQLSchema(context: $TSContext, options: $TSAny): Promise { + static async transformGraphQLSchema(context: $TSContext, options: $TSAny): Promise<$TSAny | undefined> { return context.amplify.invokePluginMethod(context, API_CATEGORY_NAME, undefined, 'transformGraphQLSchema', [context, options]); } } diff --git a/packages/amplify-cli-core/src/state-manager/pathManager.ts b/packages/amplify-cli-core/src/state-manager/pathManager.ts index 04d0d8277c6..d0777807a24 100644 --- a/packages/amplify-cli-core/src/state-manager/pathManager.ts +++ b/packages/amplify-cli-core/src/state-manager/pathManager.ts @@ -248,6 +248,16 @@ export class PathManager { PathConstants.BuildDirName, ]); + getStackBuildCategoryResourceDirPath = (projectPath: string, category: string, resourceName: string): string => + this.constructPath(projectPath, [ + PathConstants.AmplifyDirName, + PathConstants.BackendDirName, + PathConstants.ProviderName, + PathConstants.BuildDirName, + category, + resourceName, + ]); + getCurrentCloudRootStackDirPath = (projectPath: string): string => this.constructPath(projectPath, [ PathConstants.AmplifyDirName, diff --git a/packages/amplify-cli-core/src/utils/arn-parser.ts b/packages/amplify-cli-core/src/utils/arn-parser.ts new file mode 100644 index 00000000000..3328538fe4f --- /dev/null +++ b/packages/amplify-cli-core/src/utils/arn-parser.ts @@ -0,0 +1,5 @@ +import { ARN, parse } from '@aws-sdk/util-arn-parser'; + +export const parseArn = (arn: string): ARN => { + return parse(arn); +}; diff --git a/packages/amplify-cli-core/src/utils/doc-links.ts b/packages/amplify-cli-core/src/utils/doc-links.ts index e2b7168d881..e5d41f6ab58 100644 --- a/packages/amplify-cli-core/src/utils/doc-links.ts +++ b/packages/amplify-cli-core/src/utils/doc-links.ts @@ -9,6 +9,7 @@ export function getGraphQLTransformerFunctionDocLink(version: number): string { } } +// Currently not used in this project, but there are dependencies in other projects https://github.com/search?q=org%3Aaws-amplify+getGraphQLTransformerAuthDocLink&type=code export function getGraphQLTransformerAuthDocLink(version: number): string { switch (version) { case 1: @@ -20,6 +21,7 @@ export function getGraphQLTransformerAuthDocLink(version: number): string { } } +// Currently not used in this project, but there are dependencies in other projects https://github.com/search?q=org%3Aaws-amplify+getGraphQLTransformerAuthSubscriptionsDocLink&type=code export function getGraphQLTransformerAuthSubscriptionsDocLink(version: number): string { switch (version) { case 1: @@ -42,6 +44,7 @@ export function getGraphQLTransformerOpenSearchDocLink(version: number): string } } +// Currently not used in this project, but there are dependencies in other projects https://github.com/search?q=org%3Aaws-amplify+getGraphQLTransformerOpenSearchProductionDocLink&type=code export function getGraphQLTransformerOpenSearchProductionDocLink(version: number): string { switch (version) { case 1: diff --git a/packages/amplify-cli-core/src/utils/index.ts b/packages/amplify-cli-core/src/utils/index.ts index ab7dfaffbb2..83e0c37c5b6 100644 --- a/packages/amplify-cli-core/src/utils/index.ts +++ b/packages/amplify-cli-core/src/utils/index.ts @@ -1,3 +1,4 @@ +export * from './arn-parser'; export * from './doc-links'; export * from './fileSize'; /* eslint-disable import/no-cycle */ diff --git a/packages/amplify-cli-core/src/utils/isResourceNameUnique.ts b/packages/amplify-cli-core/src/utils/isResourceNameUnique.ts index 0dd72ba25b5..b496886ed03 100644 --- a/packages/amplify-cli-core/src/utils/isResourceNameUnique.ts +++ b/packages/amplify-cli-core/src/utils/isResourceNameUnique.ts @@ -1,5 +1,6 @@ import { stateManager } from '../state-manager'; +// Currently not used in this project, but there are dependencies in other projects https://github.com/search?q=org%3Aaws-amplify+isResourceNameUnique&type=code export const isResourceNameUnique = (category: string, resourceName: string, throwOnMatch = true) => { const meta = stateManager.getMeta(); const resourceNames = Object.keys(meta?.[category] || {}); diff --git a/packages/amplify-cli-core/src/utils/packageManager.ts b/packages/amplify-cli-core/src/utils/packageManager.ts index 8be588cfc25..d97a962dfd3 100644 --- a/packages/amplify-cli-core/src/utils/packageManager.ts +++ b/packages/amplify-cli-core/src/utils/packageManager.ts @@ -1,39 +1,109 @@ import * as fs from 'fs-extra'; import * as path from 'path'; -import * as which from 'which'; +import which from 'which'; import { coerce, SemVer } from 'semver'; import { execWithOutputAsString } from './shell-utils'; +import { AmplifyError } from '../errors/amplify-error'; +import { BuildType } from '@aws-amplify/amplify-function-plugin-interface'; /** * package managers type */ -export type PackageManagerType = 'yarn' | 'npm'; - +export type PackageManagerType = 'yarn' | 'npm' | 'pnpm' | 'custom'; const packageJson = 'package.json'; /** * package Manager type */ -export type PackageManager = { - packageManager: PackageManagerType; - lockFile: string; - executable: string; +export interface PackageManager { + readonly packageManager: PackageManagerType; + readonly lockFile: string; + readonly executable: string; + readonly displayValue: string; + version?: SemVer; + getRunScriptArgs: (scriptName: string) => string[]; + getInstallArgs: (buildType: BuildType, resourceDir?: string) => string[]; +} + +class NpmPackageManager implements PackageManager { + readonly packageManager = 'npm'; + readonly displayValue = 'NPM'; + readonly executable = 'npm'; + readonly lockFile = 'package-lock.json'; + + getRunScriptArgs = (scriptName: string) => ['run-script', scriptName]; + getInstallArgs = (buildType = BuildType.PROD) => ['install', '--no-bin-links'].concat(buildType === 'PROD' ? ['--production'] : []); +} + +class YarnPackageManager implements PackageManager { + readonly packageManager: PackageManagerType = 'yarn'; + readonly displayValue = 'Yarn'; + readonly executable = 'yarn'; + readonly lockFile = 'yarn.lock'; + version?: SemVer; + + getRunScriptArgs = (scriptName: string) => [scriptName]; + getInstallArgs = (buildType = BuildType.PROD, resourceDir = '') => { + const useYarnModern = this.version?.major && this.version?.major > 1; + /** + * Since Yarn 2, resourceDir needs to be treated as a separate project, + * otherwise it'll be hoisted to use the lock.file from the parent directory, + * so we need to create a lock file for it. + * ref: https://github.com/yarnpkg/yarn/issues/5716#issuecomment-817330338 + */ + if (useYarnModern) { + if (fs.existsSync(`${resourceDir}/${this.lockFile}`)) { + console.log(`${resourceDir}/${this.lockFile} already exists.`); + } else { + fs.writeFileSync(`${resourceDir}/${this.lockFile}`, ''); + } + } + return (useYarnModern ? ['workspaces', 'focus'] : ['--no-bin-links']).concat(buildType === 'PROD' ? ['--production'] : []); + }; +} + +class PnpmPackageManager implements PackageManager { + readonly packageManager: PackageManagerType = 'pnpm'; + readonly displayValue = 'PNPM'; + readonly executable = 'pnpm'; + readonly lockFile = 'pnpm-lock.yaml'; + + getRunScriptArgs = (scriptName: string) => [scriptName]; + getInstallArgs = () => ['install']; +} + +class CustomPackageManager implements PackageManager { + readonly packageManager: PackageManagerType = 'custom'; + readonly displayValue = 'Custom Build Command or Script Path'; + lockFile; + executable; version?: SemVer; + + constructor() { + this.lockFile = ''; + this.executable = ''; + } + getRunScriptArgs = () => { + throw new AmplifyError('PackagingLambdaFunctionError', { + message: `Packaging lambda function failed. Unsupported package manager`, + }); + }; + getInstallArgs = () => { + throw new AmplifyError('PackagingLambdaFunctionError', { + message: `Packaging lambda function failed. Unsupported package manager`, + }); + }; +} + +export const packageManagers: Record = { + npm: new NpmPackageManager(), + yarn: new YarnPackageManager(), + pnpm: new PnpmPackageManager(), + custom: new CustomPackageManager(), }; -const isWindows = process.platform === 'win32'; - -const packageManagers: Record = { - npm: { - packageManager: 'npm', - lockFile: 'package-lock.json', - executable: isWindows ? 'npm.cmd' : 'npm', - }, - yarn: { - packageManager: 'yarn', - lockFile: 'yarn.lock', - executable: isWindows ? 'yarn.cmd' : 'yarn', - }, +export const getPackageManagerByType = (packageManagerType: PackageManagerType): PackageManager => { + return packageManagers[packageManagerType]; }; /** @@ -44,9 +114,7 @@ const packageManagers: Record = { * 4. Check if package-lock.json is present * 5. Check if yarn present on the system * 6. Fallback to npm - @returns {PackageManager | null} instance for the package manager that was detected or null if not found. - */ export const getPackageManager = async (rootPath?: string): Promise => { const effectiveRootPath = rootPath ?? process.cwd(); @@ -58,10 +126,16 @@ export const getPackageManager = async (rootPath?: string): Promise => { - return { - ...packageManagers.yarn, - version: coerce(await execWithOutputAsString(`${packageManagers.yarn.executable} --version`, { cwd: rootPath })) ?? undefined, - }; + packageManagers.yarn.version = + coerce(await execWithOutputAsString(`${packageManagers.yarn.executable} --version`, { cwd: rootPath })) ?? undefined; + return packageManagers.yarn; }; diff --git a/packages/amplify-cli-core/tsconfig.json b/packages/amplify-cli-core/tsconfig.json index 43fb5103aee..a8a2f58a00c 100644 --- a/packages/amplify-cli-core/tsconfig.json +++ b/packages/amplify-cli-core/tsconfig.json @@ -3,6 +3,7 @@ "compilerOptions": { "outDir": "./lib", "rootDir": "./src", + "allowJs": true, "useUnknownInCatchVariables": false } } diff --git a/packages/amplify-cli-extensibility-helper/CHANGELOG.md b/packages/amplify-cli-extensibility-helper/CHANGELOG.md index d613bf9965f..668010dec31 100644 --- a/packages/amplify-cli-extensibility-helper/CHANGELOG.md +++ b/packages/amplify-cli-extensibility-helper/CHANGELOG.md @@ -3,6 +3,225 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [3.0.35](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-extensibility-helper@3.0.34...@aws-amplify/cli-extensibility-helper@3.0.35) (2025-01-30) + +**Note:** Version bump only for package @aws-amplify/cli-extensibility-helper + + + + + +## [3.0.34](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-extensibility-helper@3.0.33...@aws-amplify/cli-extensibility-helper@3.0.34) (2024-08-02) + +**Note:** Version bump only for package @aws-amplify/cli-extensibility-helper + + + + + +## [3.0.33](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-extensibility-helper@3.0.32...@aws-amplify/cli-extensibility-helper@3.0.33) (2024-06-27) + +**Note:** Version bump only for package @aws-amplify/cli-extensibility-helper + + + + + +## [3.0.32](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-extensibility-helper@3.0.31...@aws-amplify/cli-extensibility-helper@3.0.32) (2024-06-20) + +**Note:** Version bump only for package @aws-amplify/cli-extensibility-helper + + + + + +## [3.0.31](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-extensibility-helper@3.0.30...@aws-amplify/cli-extensibility-helper@3.0.31) (2024-06-06) + +**Note:** Version bump only for package @aws-amplify/cli-extensibility-helper + + + + + +## [3.0.30](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-extensibility-helper@3.0.29...@aws-amplify/cli-extensibility-helper@3.0.30) (2024-05-24) + +**Note:** Version bump only for package @aws-amplify/cli-extensibility-helper + + + + + +## [3.0.29](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-extensibility-helper@3.0.28...@aws-amplify/cli-extensibility-helper@3.0.29) (2024-05-07) + +**Note:** Version bump only for package @aws-amplify/cli-extensibility-helper + + + + + +## [3.0.28](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-extensibility-helper@3.0.27...@aws-amplify/cli-extensibility-helper@3.0.28) (2024-04-18) + +**Note:** Version bump only for package @aws-amplify/cli-extensibility-helper + + + + + +## [3.0.27](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-extensibility-helper@3.0.26...@aws-amplify/cli-extensibility-helper@3.0.27) (2024-04-15) + +**Note:** Version bump only for package @aws-amplify/cli-extensibility-helper + + + + + +## [3.0.26](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-extensibility-helper@3.0.25...@aws-amplify/cli-extensibility-helper@3.0.26) (2024-03-29) + +**Note:** Version bump only for package @aws-amplify/cli-extensibility-helper + + + + + +## [3.0.25](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-extensibility-helper@3.0.24...@aws-amplify/cli-extensibility-helper@3.0.25) (2024-03-06) + +**Note:** Version bump only for package @aws-amplify/cli-extensibility-helper + + + + + +## [3.0.24](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-extensibility-helper@3.0.23...@aws-amplify/cli-extensibility-helper@3.0.24) (2023-12-11) + +**Note:** Version bump only for package @aws-amplify/cli-extensibility-helper + + + + + +## [3.0.23](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-extensibility-helper@3.0.21...@aws-amplify/cli-extensibility-helper@3.0.23) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [3.0.22](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-extensibility-helper@3.0.21...@aws-amplify/cli-extensibility-helper@3.0.22) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/cli-extensibility-helper + + + + + +## [3.0.21](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-extensibility-helper@3.0.20...@aws-amplify/cli-extensibility-helper@3.0.21) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/cli-extensibility-helper + + + + + +## [3.0.20](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-extensibility-helper@3.0.19...@aws-amplify/cli-extensibility-helper@3.0.20) (2023-10-12) + +**Note:** Version bump only for package @aws-amplify/cli-extensibility-helper + + + + + +## [3.0.19](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-extensibility-helper@3.0.18...@aws-amplify/cli-extensibility-helper@3.0.19) (2023-10-05) + +**Note:** Version bump only for package @aws-amplify/cli-extensibility-helper + + + + + +## [3.0.18](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-extensibility-helper@3.0.17...@aws-amplify/cli-extensibility-helper@3.0.18) (2023-10-03) + +**Note:** Version bump only for package @aws-amplify/cli-extensibility-helper + + + + + +## [3.0.17](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-extensibility-helper@3.0.16...@aws-amplify/cli-extensibility-helper@3.0.17) (2023-09-22) + +**Note:** Version bump only for package @aws-amplify/cli-extensibility-helper + + + + + +## [3.0.16](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-extensibility-helper@3.0.15...@aws-amplify/cli-extensibility-helper@3.0.16) (2023-08-31) + +**Note:** Version bump only for package @aws-amplify/cli-extensibility-helper + + + + + +## [3.0.15](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-extensibility-helper@3.0.14...@aws-amplify/cli-extensibility-helper@3.0.15) (2023-08-17) + +**Note:** Version bump only for package @aws-amplify/cli-extensibility-helper + + + + + +## [3.0.14](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-extensibility-helper@3.0.13...@aws-amplify/cli-extensibility-helper@3.0.14) (2023-08-09) + +**Note:** Version bump only for package @aws-amplify/cli-extensibility-helper + + + + + +## [3.0.13](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-extensibility-helper@3.0.12...@aws-amplify/cli-extensibility-helper@3.0.13) (2023-07-28) + +**Note:** Version bump only for package @aws-amplify/cli-extensibility-helper + + + + + +## [3.0.12](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-extensibility-helper@3.0.11...@aws-amplify/cli-extensibility-helper@3.0.12) (2023-07-27) + +**Note:** Version bump only for package @aws-amplify/cli-extensibility-helper + + + + + +## [3.0.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-extensibility-helper@3.0.10...@aws-amplify/cli-extensibility-helper@3.0.11) (2023-07-24) + +**Note:** Version bump only for package @aws-amplify/cli-extensibility-helper + + + + + +## [3.0.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-extensibility-helper@3.0.9...@aws-amplify/cli-extensibility-helper@3.0.10) (2023-07-20) + +**Note:** Version bump only for package @aws-amplify/cli-extensibility-helper + + + + + +## [3.0.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-extensibility-helper@3.0.8...@aws-amplify/cli-extensibility-helper@3.0.9) (2023-06-13) + +**Note:** Version bump only for package @aws-amplify/cli-extensibility-helper + + + + + ## [3.0.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-extensibility-helper@3.0.6...@aws-amplify/cli-extensibility-helper@3.0.8) (2023-05-25) diff --git a/packages/amplify-cli-extensibility-helper/package.json b/packages/amplify-cli-extensibility-helper/package.json index 415dd87425c..5876c164955 100644 --- a/packages/amplify-cli-extensibility-helper/package.json +++ b/packages/amplify-cli-extensibility-helper/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/cli-extensibility-helper", - "version": "3.0.8", + "version": "3.0.35", "description": "Amplify CLI Extensibility Helper utility package", "repository": { "type": "git", @@ -28,9 +28,9 @@ "extract-api": "ts-node ../../scripts/extract-api.ts" }, "dependencies": { - "@aws-amplify/amplify-category-custom": "3.0.8", - "@aws-amplify/amplify-cli-core": "4.0.8", - "aws-cdk-lib": "~2.68.0" + "@aws-amplify/amplify-category-custom": "3.1.25", + "@aws-amplify/amplify-cli-core": "4.3.11", + "aws-cdk-lib": "~2.177.0" }, "jest": { "transform": { diff --git a/packages/amplify-cli-logger/.npmignore b/packages/amplify-cli-logger/.npmignore new file mode 100644 index 00000000000..2c166892c41 --- /dev/null +++ b/packages/amplify-cli-logger/.npmignore @@ -0,0 +1,4 @@ +**/__tests__/** +src +tsconfig.json +tsconfig.tsbuildinfo diff --git a/packages/amplify-cli-logger/CHANGELOG.md b/packages/amplify-cli-logger/CHANGELOG.md index dda8c9f5a03..bc3db942f6f 100644 --- a/packages/amplify-cli-logger/CHANGELOG.md +++ b/packages/amplify-cli-logger/CHANGELOG.md @@ -3,6 +3,60 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-logger@1.3.6...@aws-amplify/amplify-cli-logger@1.3.8) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [1.3.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-logger@1.3.6...@aws-amplify/amplify-cli-logger@1.3.7) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-cli-logger + + + + + +## [1.3.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-logger@1.3.5...@aws-amplify/amplify-cli-logger@1.3.6) (2023-09-22) + +**Note:** Version bump only for package @aws-amplify/amplify-cli-logger + + + + + +## [1.3.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-logger@1.3.4...@aws-amplify/amplify-cli-logger@1.3.5) (2023-08-31) + + +### Bug Fixes + +* exclude tests from publish ([#13153](https://github.com/aws-amplify/amplify-cli/issues/13153)) ([1b1fe09](https://github.com/aws-amplify/amplify-cli/commit/1b1fe09a1c08be0262a1013f71354abd7160722a)) + + + + + +## [1.3.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-logger@1.3.3...@aws-amplify/amplify-cli-logger@1.3.4) (2023-08-17) + +**Note:** Version bump only for package @aws-amplify/amplify-cli-logger + + + + + +## [1.3.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-logger@1.3.2...@aws-amplify/amplify-cli-logger@1.3.3) (2023-06-13) + +**Note:** Version bump only for package @aws-amplify/amplify-cli-logger + + + + + ## [1.3.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-logger@1.3.0...@aws-amplify/amplify-cli-logger@1.3.2) (2023-04-14) **Note:** Version bump only for package @aws-amplify/amplify-cli-logger diff --git a/packages/amplify-cli-logger/package.json b/packages/amplify-cli-logger/package.json index 2441fdfcbfd..3439a5129e6 100644 --- a/packages/amplify-cli-logger/package.json +++ b/packages/amplify-cli-logger/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-cli-logger", - "version": "1.3.2", + "version": "1.3.8", "description": "Amplify CLI Logger", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/packages/amplify-cli-logger/src/__tests__/TestBasePath.test.ts b/packages/amplify-cli-logger/src/__tests__/TestBasePath.test.ts deleted file mode 100644 index 7b5111b143a..00000000000 --- a/packages/amplify-cli-logger/src/__tests__/TestBasePath.test.ts +++ /dev/null @@ -1,34 +0,0 @@ -import os from 'os'; -import path from 'path'; -import { constants } from '../constants'; - -describe('test base path creation', () => { - const homedirectory = 'home'; - const localPath = 'myProj'; - - const homedir = jest.spyOn(os, 'homedir').mockReturnValue(homedirectory); - const join = jest.spyOn(path, 'join'); - - afterAll(() => { - jest.clearAllMocks(); - }); - - it('case: getLocalAuditLogFile', () => { - require('../baseLogFilePath').getLocalLogFileDirectory(localPath); - expect(join).toBeCalledWith(localPath, constants.LOG_DIRECTORY); - }); - - it('case: getLogAuditFilePath', () => { - process.argv = ['node', 'dev']; - require('../baseLogFilePath').getLogDirectory(); - expect(homedir).toBeCalled(); - expect(join).toBeCalledWith(homedirectory, constants.DOT_AMPLIFY, constants.LOG_DIRECTORY + '-dev'); - }); - - it('case: getLogFilePath', () => { - process.argv = ['node', '']; - require('../baseLogFilePath').getLogDirectory(); - expect(homedir).toBeCalled(); - expect(join).toBeCalledWith(homedirectory, constants.DOT_AMPLIFY, constants.LOG_DIRECTORY); - }); -}); diff --git a/packages/amplify-cli-logger/src/__tests__/TestFilePath.test.ts b/packages/amplify-cli-logger/src/__tests__/TestFilePath.test.ts deleted file mode 100644 index 25913e4ee1b..00000000000 --- a/packages/amplify-cli-logger/src/__tests__/TestFilePath.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import os from 'os'; -import path from 'path'; -import { constants } from '../constants'; - -describe('test path creation', () => { - const localPath = 'myProj'; - const join = jest.spyOn(path, 'join'); - const localLogDirectory = 'localLogDirectory'; - const logDirectory = 'logDirectory'; - jest.mock('../baseLogFilePath', () => ({ - getLocalLogFileDirectory: jest.fn().mockReturnValue(localLogDirectory), - getLogDirectory: jest.fn().mockReturnValue(logDirectory), - })); - afterAll(() => { - jest.clearAllMocks(); - }); - it('case: getLocalAuditLogFile', () => { - require('../getLogFilePath').getLocalAuditLogFile(localPath); - expect(join).toBeCalledWith(localLogDirectory, constants.LOG_AUDIT_FOLDER, constants.LOG_AUDIT_FILENAME); - }); - it('case: getLocalLogFilePath', () => { - require('../getLogFilePath').getLocalLogFilePath(localPath); - expect(join).toBeCalledWith(localLogDirectory, constants.LOG_FILENAME); - }); - - it('case: getLogAuditFilePath', () => { - require('../getLogFilePath').getLogAuditFilePath(); - expect(join).toBeCalledWith(logDirectory, constants.LOG_AUDIT_FOLDER, constants.LOG_AUDIT_FILENAME); - }); - - it('case: getLogFilePath', () => { - require('../getLogFilePath').getLogFilePath(); - expect(join).toBeCalledWith(logDirectory, constants.LOG_FILENAME); - }); -}); diff --git a/packages/amplify-cli-logger/src/__tests__/getLogFilePath.test.ts b/packages/amplify-cli-logger/src/__tests__/getLogFilePath.test.ts new file mode 100644 index 00000000000..c25c61e2861 --- /dev/null +++ b/packages/amplify-cli-logger/src/__tests__/getLogFilePath.test.ts @@ -0,0 +1,57 @@ +import path from 'path'; +import os from 'os'; +import { constants as c } from '../constants'; +import { getLogFilePath, getLocalLogFilePath, getLogAuditFilePath, getLocalAuditLogFile } from '../getLogFilePath'; + +describe('test log file path creation', () => { + const slash = path.sep; + const projectPath = 'myProj'; + const homeDir = 'home'; + + jest.spyOn(os, 'homedir').mockReturnValue(homeDir); + + afterAll(() => { + jest.restoreAllMocks(); + }); + + it('log audit file in a specified directory', () => { + const result = getLocalAuditLogFile(projectPath); + const expected = projectPath + slash + c.LOG_DIRECTORY + slash + c.LOG_AUDIT_FOLDER + slash + c.LOG_AUDIT_FILENAME; + expect(result).toBe(expected); + }); + + it('log file in a specified directory', () => { + const result = getLocalLogFilePath(projectPath); + const expected = projectPath + slash + c.LOG_DIRECTORY + slash + c.LOG_FILENAME; + expect(result).toBe(expected); + }); + + it('log audit file in home directory', () => { + jest.replaceProperty(process, 'argv', ['node', '']); + const result = getLogAuditFilePath(); + const expected = homeDir + slash + c.DOT_AMPLIFY + slash + c.LOG_DIRECTORY + slash + c.LOG_AUDIT_FOLDER + slash + c.LOG_AUDIT_FILENAME; + expect(result).toBe(expected); + }); + + it('log file in home directory', () => { + jest.replaceProperty(process, 'argv', ['node', '']); + const result = getLogFilePath(); + const expected = homeDir + slash + c.DOT_AMPLIFY + slash + c.LOG_DIRECTORY + slash + c.LOG_FILENAME; + expect(result).toBe(expected); + }); + + it('logs-dev folder in home directory for dev build audit file', () => { + jest.replaceProperty(process, 'argv', ['node', 'dev']); + const result = getLogAuditFilePath(); + const expected = + homeDir + slash + c.DOT_AMPLIFY + slash + c.LOG_DIRECTORY + '-dev' + slash + c.LOG_AUDIT_FOLDER + slash + c.LOG_AUDIT_FILENAME; + expect(result).toBe(expected); + }); + + it('logs-dev folder in home directory for dev build log file', () => { + jest.replaceProperty(process, 'argv', ['node', 'dev']); + const result = getLogFilePath(); + const expected = homeDir + slash + c.DOT_AMPLIFY + slash + c.LOG_DIRECTORY + '-dev' + slash + c.LOG_FILENAME; + expect(result).toBe(expected); + }); +}); diff --git a/packages/amplify-cli-logger/src/baseLogFilePath.ts b/packages/amplify-cli-logger/src/baseLogFilePath.ts deleted file mode 100644 index bb01314e8ce..00000000000 --- a/packages/amplify-cli-logger/src/baseLogFilePath.ts +++ /dev/null @@ -1,24 +0,0 @@ -import * as path from 'path'; -import { constants } from './constants'; -import * as os from 'os'; - -function getFolder() { - let folder = constants.LOG_DIRECTORY; - - if (process.argv.length > 1) { - const executable = process.argv[1]; - - if (executable && executable.includes('dev')) { - folder += '-dev'; - } - } - return folder; -} - -export function getLocalLogFileDirectory(projectPath: string): string { - return path.join(projectPath, constants.LOG_DIRECTORY); -} - -export function getLogDirectory(): string { - return path.join(os.homedir(), constants.DOT_AMPLIFY, getFolder()); -} diff --git a/packages/amplify-cli-logger/src/getLogFilePath.ts b/packages/amplify-cli-logger/src/getLogFilePath.ts index e98533d978c..1b032dfa42a 100644 --- a/packages/amplify-cli-logger/src/getLogFilePath.ts +++ b/packages/amplify-cli-logger/src/getLogFilePath.ts @@ -1,6 +1,27 @@ import path from 'path'; +import os from 'os'; import { constants } from './constants'; -import { getLogDirectory, getLocalLogFileDirectory } from './baseLogFilePath'; + +function getFolder() { + let folder = constants.LOG_DIRECTORY; + + if (process.argv.length > 1) { + const executable = process.argv[1]; + + if (executable && executable.includes('dev')) { + folder += '-dev'; + } + } + return folder; +} + +function getLocalLogFileDirectory(projectPath: string): string { + return path.join(projectPath, constants.LOG_DIRECTORY); +} + +function getLogDirectory(): string { + return path.join(os.homedir(), constants.DOT_AMPLIFY, getFolder()); +} export function getLogFilePath(): string { return path.join(getLogDirectory(), constants.LOG_FILENAME); diff --git a/packages/amplify-cli-npm/CHANGELOG.md b/packages/amplify-cli-npm/CHANGELOG.md index 9e70b503d68..077535a5ff8 100644 --- a/packages/amplify-cli-npm/CHANGELOG.md +++ b/packages/amplify-cli-npm/CHANGELOG.md @@ -3,6 +3,372 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [12.14.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.14.1...@aws-amplify/cli@12.14.2) (2025-01-30) + +**Note:** Version bump only for package @aws-amplify/cli + + + + + +## [12.14.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.14.0...@aws-amplify/cli@12.14.1) (2025-01-16) + +**Note:** Version bump only for package @aws-amplify/cli + + + + + +# [12.14.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.13.1...@aws-amplify/cli@12.14.0) (2025-01-02) + + +### Features + +* bump version ([7cb8f88](https://github.com/aws-amplify/amplify-cli/commit/7cb8f882b17f4a6f783a300f5e7894097d166407)) + + + + + +## [12.13.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.13.0...@aws-amplify/cli@12.13.1) (2024-11-18) + +**Note:** Version bump only for package @aws-amplify/cli + + + + + +# [12.13.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.12.6...@aws-amplify/cli@12.13.0) (2024-10-05) + + +### Features + +* add init prompts for Gen2 ([#13849](https://github.com/aws-amplify/amplify-cli/issues/13849)) ([7ab8fae](https://github.com/aws-amplify/amplify-cli/commit/7ab8faef1e2ce0c15db783d236aeee9d312ec135)) + + + + + +## [12.12.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.12.5...@aws-amplify/cli@12.12.6) (2024-08-06) + +**Note:** Version bump only for package @aws-amplify/cli + + + + + +## [12.12.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.12.4...@aws-amplify/cli@12.12.5) (2024-08-02) + +**Note:** Version bump only for package @aws-amplify/cli + + + + + +## [12.12.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.12.3...@aws-amplify/cli@12.12.4) (2024-06-27) + +**Note:** Version bump only for package @aws-amplify/cli + + + + + +## [12.12.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.12.2...@aws-amplify/cli@12.12.3) (2024-06-20) + +**Note:** Version bump only for package @aws-amplify/cli + + + + + +## [12.12.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.12.1...@aws-amplify/cli@12.12.2) (2024-06-06) + +**Note:** Version bump only for package @aws-amplify/cli + + + + + +## [12.12.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.12.0...@aws-amplify/cli@12.12.1) (2024-05-24) + +**Note:** Version bump only for package @aws-amplify/cli + + + + + +# [12.12.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.11.1...@aws-amplify/cli@12.12.0) (2024-05-07) + + +### Features + +* bump version ([#13759](https://github.com/aws-amplify/amplify-cli/issues/13759)) ([5f002de](https://github.com/aws-amplify/amplify-cli/commit/5f002defb602bb4604811793032ff4b6d99ff9c2)) + + + + + +## [12.11.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.11.0...@aws-amplify/cli@12.11.1) (2024-04-18) + +**Note:** Version bump only for package @aws-amplify/cli + + + + + +# [12.11.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.10.3...@aws-amplify/cli@12.11.0) (2024-04-15) + + +### Features + +* bump version ([#13697](https://github.com/aws-amplify/amplify-cli/issues/13697)) ([88f6e23](https://github.com/aws-amplify/amplify-cli/commit/88f6e23a20eaba9cc85ec045ec1cf5656e17ab8b)) + + + + + +## [12.10.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.10.2...@aws-amplify/cli@12.10.3) (2024-03-29) + +**Note:** Version bump only for package @aws-amplify/cli + + + + + +## [12.10.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.10.1...@aws-amplify/cli@12.10.2) (2024-03-06) + +**Note:** Version bump only for package @aws-amplify/cli + + + + + +## [12.10.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.10.0...@aws-amplify/cli@12.10.1) (2024-01-10) + +**Note:** Version bump only for package @aws-amplify/cli + + + + + +# [12.10.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.9.0...@aws-amplify/cli@12.10.0) (2023-12-16) + + +### Features + +* bump version 12.9.0 ([#13462](https://github.com/aws-amplify/amplify-cli/issues/13462)) ([02afaa4](https://github.com/aws-amplify/amplify-cli/commit/02afaa492bec6f5e73dd6bad234fc4646ebcc4c3)) + + + + + +# [12.9.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.8.2...@aws-amplify/cli@12.9.0) (2023-12-11) + + +### Features + +* bump data dependencies to launch RDS feature ([#13409](https://github.com/aws-amplify/amplify-cli/issues/13409)) ([7fbf29f](https://github.com/aws-amplify/amplify-cli/commit/7fbf29f56eb7335d20de0b5526fbed7795a2af09)) + + + + + +## [12.8.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.8.0...@aws-amplify/cli@12.8.2) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [12.8.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.8.0...@aws-amplify/cli@12.8.1) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/cli + + + + + +# [12.8.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.7.1...@aws-amplify/cli@12.8.0) (2023-11-08) + + +### Features + +* bump version ([6619b9b](https://github.com/aws-amplify/amplify-cli/commit/6619b9b49564b573d1296ab634e4a45ac4a00cb3)) + + + + + +## [12.7.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.7.0...@aws-amplify/cli@12.7.1) (2023-10-21) + +**Note:** Version bump only for package @aws-amplify/cli + + + + + +# [12.7.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.6.0...@aws-amplify/cli@12.7.0) (2023-10-12) + + +### Features + +* force version bump ([8edf74d](https://github.com/aws-amplify/amplify-cli/commit/8edf74d625301aa022e02c022d5b149c8fbb67c8)) + + + + + +# [12.6.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.5.2...@aws-amplify/cli@12.6.0) (2023-10-05) + + +### Features + +* **amplify-util-uibuilder:** amplify js backwards compatibility ([#13288](https://github.com/aws-amplify/amplify-cli/issues/13288)) ([2db3e18](https://github.com/aws-amplify/amplify-cli/commit/2db3e181cf06954085eb8fade0b26162672327db)) + + + + + +## [12.5.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.5.1...@aws-amplify/cli@12.5.2) (2023-10-03) + +**Note:** Version bump only for package @aws-amplify/cli + + + + + +## [12.5.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.5.0...@aws-amplify/cli@12.5.1) (2023-09-27) + +**Note:** Version bump only for package @aws-amplify/cli + + + + + +# [12.5.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.4.0...@aws-amplify/cli@12.5.0) (2023-09-22) + + +### Features + +* update main CLI version ([#13250](https://github.com/aws-amplify/amplify-cli/issues/13250)) ([f1f3118](https://github.com/aws-amplify/amplify-cli/commit/f1f3118f69f6f7702d5bb949d50e5cde44982024)) + + + + + +# [12.4.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.3.0...@aws-amplify/cli@12.4.0) (2023-08-31) + + +### Features + +* bump version to 12.4.0 ([#13154](https://github.com/aws-amplify/amplify-cli/issues/13154)) ([244e092](https://github.com/aws-amplify/amplify-cli/commit/244e092066968a24c5ec47c150354248490b3010)) + + + + + +# [12.3.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.2.5...@aws-amplify/cli@12.3.0) (2023-08-17) + + +### Features + +* bump version ([#13114](https://github.com/aws-amplify/amplify-cli/issues/13114)) ([ad713f7](https://github.com/aws-amplify/amplify-cli/commit/ad713f7f2213ec60268724f1e9dc896f289b3c0b)) +* generate components using graphql ([1568581](https://github.com/aws-amplify/amplify-cli/commit/15685810460881aa71e88724398b9be05ba53781)) + + +### Reverts + +* Revert "test: remove extra hash (#13071)" (#13084) ([5013f9a](https://github.com/aws-amplify/amplify-cli/commit/5013f9ac745215816c63f41d14104365e99c81cf)), closes [#13071](https://github.com/aws-amplify/amplify-cli/issues/13071) [#13084](https://github.com/aws-amplify/amplify-cli/issues/13084) + + + + + +## [12.2.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.2.4...@aws-amplify/cli@12.2.5) (2023-08-14) + +**Note:** Version bump only for package @aws-amplify/cli + + + + + +## [12.2.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.2.3...@aws-amplify/cli@12.2.4) (2023-08-09) + +**Note:** Version bump only for package @aws-amplify/cli + + + + + +## [12.2.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.2.2...@aws-amplify/cli@12.2.3) (2023-07-28) + +**Note:** Version bump only for package @aws-amplify/cli + + + + + +## [12.2.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.2.1...@aws-amplify/cli@12.2.2) (2023-07-27) + +**Note:** Version bump only for package @aws-amplify/cli + + + + + +## [12.2.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.2.0...@aws-amplify/cli@12.2.1) (2023-07-24) + +**Note:** Version bump only for package @aws-amplify/cli + + + + + +# [12.2.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.1.1...@aws-amplify/cli@12.2.0) (2023-07-20) + + +### Bug Fixes + +* add check for codebuild when updating url ([#12924](https://github.com/aws-amplify/amplify-cli/issues/12924)) ([d399855](https://github.com/aws-amplify/amplify-cli/commit/d399855bf8004c9ce88a6ba7c00dd42476ac748b)) + + +### Features + +* lambda support for yarn2/3 and pnpm package managers ([#12750](https://github.com/aws-amplify/amplify-cli/issues/12750)) ([fd18195](https://github.com/aws-amplify/amplify-cli/commit/fd181952672efb0479ca6955c0c7a45fe248d1b1)) +* uibuilder codegen service ([#12896](https://github.com/aws-amplify/amplify-cli/issues/12896)) ([3fe2f98](https://github.com/aws-amplify/amplify-cli/commit/3fe2f98a99a9daf22efccb23a031882ea2be899b)) + + + + + +## [12.1.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.1.0...@aws-amplify/cli@12.1.1) (2023-06-16) + +**Note:** Version bump only for package @aws-amplify/cli + + + + + +# [12.1.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.0.3...@aws-amplify/cli@12.1.0) (2023-06-13) + + +### Bug Fixes + +* don't buffer when extracting binary ([#12621](https://github.com/aws-amplify/amplify-cli/issues/12621)) ([0ee53e6](https://github.com/aws-amplify/amplify-cli/commit/0ee53e612981d5441fb00690f05d25a941e96dd0)) + + +### Features + +* bump version ([#12752](https://github.com/aws-amplify/amplify-cli/issues/12752)) ([2def814](https://github.com/aws-amplify/amplify-cli/commit/2def814808a18440a7be71baccda902f07fedc49)) + + + + + ## [12.0.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli@12.0.1...@aws-amplify/cli@12.0.3) (2023-05-25) diff --git a/packages/amplify-cli-npm/binary.ts b/packages/amplify-cli-npm/binary.ts index 8700cc3b333..282f2f6f65c 100644 --- a/packages/amplify-cli-npm/binary.ts +++ b/packages/amplify-cli-npm/binary.ts @@ -1,6 +1,6 @@ import fs from 'fs'; import path from 'path'; -import { spawnSync, execSync } from 'child_process'; +import { spawnSync } from 'child_process'; import util from 'util'; import tar from 'tar-stream'; import { createGunzip } from 'zlib'; @@ -72,26 +72,14 @@ const getCompressedBinaryUrl = (): string => { const compressedBinaryName = getPlatformCompressedBinaryName(); let url = `${BINARY_LOCATION}/${version}/${compressedBinaryName}`; - if (process.env.IS_AMPLIFY_CI) { - url = url.replace('.tgz', `-${getCommitHash()}.tgz`); + if (process.env.IS_AMPLIFY_CI && process.env.CODEBUILD_SRC_DIR) { + // use cloudfront distribution for e2e + url = `https://${process.env.PKG_CLI_CLOUDFRONT_URL}/${version}/${compressedBinaryName}`; } return url; }; -/** - * CI-only, used for testing hash-based binaries - * - * @returns string - */ -const getCommitHash = (): string => { - if (process.env.hash) { - return process.env.hash; - } - const hash = execSync('(git rev-parse HEAD | cut -c 1-12) || false').toString(); - return hash.substr(0, 12); -}; - /** * Wraps logic to download and run binary */ diff --git a/packages/amplify-cli-npm/index.ts b/packages/amplify-cli-npm/index.ts index b24c84ba74c..266bc77f889 100644 --- a/packages/amplify-cli-npm/index.ts +++ b/packages/amplify-cli-npm/index.ts @@ -16,4 +16,4 @@ export const install = async (): Promise => { return binary.install(); }; -// force version bump to 12.1.0 +// force version bump to 12.14.0 diff --git a/packages/amplify-cli-npm/package.json b/packages/amplify-cli-npm/package.json index c935adb8dea..c37a0a97f97 100644 --- a/packages/amplify-cli-npm/package.json +++ b/packages/amplify-cli-npm/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/cli", - "version": "12.0.3", + "version": "12.14.2", "description": "Amplify CLI", "repository": { "type": "git", @@ -31,12 +31,12 @@ "node": ">=12.0.0" }, "dependencies": { - "axios": "^0.26.0", + "axios": "^1.6.7", "rimraf": "^3.0.2", "tar-stream": "^2.2.0" }, "devDependencies": { - "@aws-amplify/cli-internal": "12.0.3", + "@aws-amplify/cli-internal": "12.14.2", "@types/tar": "^6.1.1", "rimraf": "^3.0.2" }, diff --git a/packages/amplify-cli-shared-interfaces/CHANGELOG.md b/packages/amplify-cli-shared-interfaces/CHANGELOG.md index ee2df52de03..fbb477732de 100644 --- a/packages/amplify-cli-shared-interfaces/CHANGELOG.md +++ b/packages/amplify-cli-shared-interfaces/CHANGELOG.md @@ -3,6 +3,33 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.2.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-shared-interfaces@1.2.3...@aws-amplify/amplify-cli-shared-interfaces@1.2.5) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [1.2.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-shared-interfaces@1.2.3...@aws-amplify/amplify-cli-shared-interfaces@1.2.4) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-cli-shared-interfaces + + + + + +## [1.2.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-shared-interfaces@1.2.2...@aws-amplify/amplify-cli-shared-interfaces@1.2.3) (2023-06-13) + +**Note:** Version bump only for package @aws-amplify/amplify-cli-shared-interfaces + + + + + ## [1.2.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-cli-shared-interfaces@1.2.0...@aws-amplify/amplify-cli-shared-interfaces@1.2.2) (2023-04-14) **Note:** Version bump only for package @aws-amplify/amplify-cli-shared-interfaces diff --git a/packages/amplify-cli-shared-interfaces/package.json b/packages/amplify-cli-shared-interfaces/package.json index 1492feca335..a0e2688b7eb 100644 --- a/packages/amplify-cli-shared-interfaces/package.json +++ b/packages/amplify-cli-shared-interfaces/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-cli-shared-interfaces", - "version": "1.2.2", + "version": "1.2.5", "description": "API interfaces to be shared across different amplfy-cli packages", "main": "lib/index.js", "scripts": { diff --git a/packages/amplify-cli/CHANGELOG.md b/packages/amplify-cli/CHANGELOG.md index 3e8bd3824fb..e3d3afa61a3 100644 --- a/packages/amplify-cli/CHANGELOG.md +++ b/packages/amplify-cli/CHANGELOG.md @@ -3,6 +3,421 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [12.14.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.14.1...@aws-amplify/cli-internal@12.14.2) (2025-01-30) + +**Note:** Version bump only for package @aws-amplify/cli-internal + + + + + +## [12.14.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.14.0...@aws-amplify/cli-internal@12.14.1) (2025-01-16) + +**Note:** Version bump only for package @aws-amplify/cli-internal + + + + + +# [12.14.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.13.1...@aws-amplify/cli-internal@12.14.0) (2025-01-02) + + +### Features + +* bump version ([7cb8f88](https://github.com/aws-amplify/amplify-cli/commit/7cb8f882b17f4a6f783a300f5e7894097d166407)) + + +### Reverts + +* Revert "chore: cateogry-api + codegen version bump (#14048)" (#14049) ([5a0cdbf](https://github.com/aws-amplify/amplify-cli/commit/5a0cdbfa46856da320323923a4336d6ba60d82b9)), closes [#14048](https://github.com/aws-amplify/amplify-cli/issues/14048) [#14049](https://github.com/aws-amplify/amplify-cli/issues/14049) + + + + + +## [12.13.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.13.0...@aws-amplify/cli-internal@12.13.1) (2024-11-18) + + +### Bug Fixes + +* add opt-out for appId mismatch check during init ([#14013](https://github.com/aws-amplify/amplify-cli/issues/14013)) ([87a6b4c](https://github.com/aws-amplify/amplify-cli/commit/87a6b4c66b064e73f520355cd7b563090f87b6cb)) + + + + + +# [12.13.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.12.6...@aws-amplify/cli-internal@12.13.0) (2024-10-05) + + +### Bug Fixes + +* avoid copying node_modules folder for increased performance ([24c8f85](https://github.com/aws-amplify/amplify-cli/commit/24c8f853cbadb96659efe7befaf07be0c15b7794)) +* prevent init if local files belong to other app ([#13954](https://github.com/aws-amplify/amplify-cli/issues/13954)) ([d79627c](https://github.com/aws-amplify/amplify-cli/commit/d79627c816e46ebddde16bb1f870f6955a2aec22)) + + +### Features + +* add init prompts for Gen2 ([#13849](https://github.com/aws-amplify/amplify-cli/issues/13849)) ([7ab8fae](https://github.com/aws-amplify/amplify-cli/commit/7ab8faef1e2ce0c15db783d236aeee9d312ec135)) + + + + + +## [12.12.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.12.5...@aws-amplify/cli-internal@12.12.6) (2024-08-06) + + +### Bug Fixes + +* update awaiter s3 key ([#13872](https://github.com/aws-amplify/amplify-cli/issues/13872)) ([dacfab7](https://github.com/aws-amplify/amplify-cli/commit/dacfab73fcc53586b873f99e149d44c390b2d76f)) + + + + + +## [12.12.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.12.4...@aws-amplify/cli-internal@12.12.5) (2024-08-02) + +**Note:** Version bump only for package @aws-amplify/cli-internal + + + + + +## [12.12.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.12.3...@aws-amplify/cli-internal@12.12.4) (2024-06-27) + +**Note:** Version bump only for package @aws-amplify/cli-internal + + + + + +## [12.12.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.12.2...@aws-amplify/cli-internal@12.12.3) (2024-06-20) + +**Note:** Version bump only for package @aws-amplify/cli-internal + + + + + +## [12.12.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.12.1...@aws-amplify/cli-internal@12.12.2) (2024-06-06) + +**Note:** Version bump only for package @aws-amplify/cli-internal + + + + + +## [12.12.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.12.0...@aws-amplify/cli-internal@12.12.1) (2024-05-24) + +**Note:** Version bump only for package @aws-amplify/cli-internal + + + + + +# [12.12.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.11.1...@aws-amplify/cli-internal@12.12.0) (2024-05-07) + + +### Features + +* bump version ([#13759](https://github.com/aws-amplify/amplify-cli/issues/13759)) ([5f002de](https://github.com/aws-amplify/amplify-cli/commit/5f002defb602bb4604811793032ff4b6d99ff9c2)) + + + + + +## [12.11.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.11.0...@aws-amplify/cli-internal@12.11.1) (2024-04-18) + +**Note:** Version bump only for package @aws-amplify/cli-internal + + + + + +# [12.11.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.10.3...@aws-amplify/cli-internal@12.11.0) (2024-04-15) + + +### Bug Fixes + +* upgrade Go runtime and fix e2e ([#13671](https://github.com/aws-amplify/amplify-cli/issues/13671)) ([395f717](https://github.com/aws-amplify/amplify-cli/commit/395f717cf52e7beef76f00ee08d37877138b0c30)) + + +### Features + +* bump version ([#13697](https://github.com/aws-amplify/amplify-cli/issues/13697)) ([88f6e23](https://github.com/aws-amplify/amplify-cli/commit/88f6e23a20eaba9cc85ec045ec1cf5656e17ab8b)) + + + + + +## [12.10.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.10.2...@aws-amplify/cli-internal@12.10.3) (2024-03-29) + +**Note:** Version bump only for package @aws-amplify/cli-internal + + + + + +## [12.10.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.10.1...@aws-amplify/cli-internal@12.10.2) (2024-03-06) + + +### Bug Fixes + +* dependabot alert for lodash.set ([#13558](https://github.com/aws-amplify/amplify-cli/issues/13558)) ([c7f9bbe](https://github.com/aws-amplify/amplify-cli/commit/c7f9bbeb4943280bdda10304ce4e17622c5ec9c7)) + + + + + +## [12.10.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.10.0...@aws-amplify/cli-internal@12.10.1) (2024-01-10) + +**Note:** Version bump only for package @aws-amplify/cli-internal + + + + + +# [12.10.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.9.0...@aws-amplify/cli-internal@12.10.0) (2023-12-16) + + +### Features + +* bump version 12.9.0 ([#13462](https://github.com/aws-amplify/amplify-cli/issues/13462)) ([02afaa4](https://github.com/aws-amplify/amplify-cli/commit/02afaa492bec6f5e73dd6bad234fc4646ebcc4c3)) + + + + + +# [12.9.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.8.2...@aws-amplify/cli-internal@12.9.0) (2023-12-11) + + +### Features + +* bump data dependencies to launch RDS feature ([#13409](https://github.com/aws-amplify/amplify-cli/issues/13409)) ([7fbf29f](https://github.com/aws-amplify/amplify-cli/commit/7fbf29f56eb7335d20de0b5526fbed7795a2af09)) + + + + + +## [12.8.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.8.0...@aws-amplify/cli-internal@12.8.2) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [12.8.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.8.0...@aws-amplify/cli-internal@12.8.1) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/cli-internal + + + + + +# [12.8.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.7.1...@aws-amplify/cli-internal@12.8.0) (2023-11-08) + + +### Features + +* bump npm version tot 12.7.0 ([31c8ae2](https://github.com/aws-amplify/amplify-cli/commit/31c8ae2ac0b2f8dcab4c1fe2e2d7e98253ba80ff)) + + + + + +## [12.7.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.7.0...@aws-amplify/cli-internal@12.7.1) (2023-10-21) + +**Note:** Version bump only for package @aws-amplify/cli-internal + + + + + +# [12.7.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.6.0...@aws-amplify/cli-internal@12.7.0) (2023-10-12) + + +### Features + +* codegen support for Amplify Android Lazy loading and custom selection set ([8f9d855](https://github.com/aws-amplify/amplify-cli/commit/8f9d855a6eb74a8d0452b2878a65ff5222ac61ee)) + + + + + +# [12.6.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.5.2...@aws-amplify/cli-internal@12.6.0) (2023-10-05) + + +### Bug Fixes + +* pulling with env append to local files ([#13227](https://github.com/aws-amplify/amplify-cli/issues/13227)) ([ef1c43f](https://github.com/aws-amplify/amplify-cli/commit/ef1c43fd955596366114e883b2db31fda55feaf8)) + + +### Features + +* **amplify-util-uibuilder:** amplify js backwards compatibility ([#13288](https://github.com/aws-amplify/amplify-cli/issues/13288)) ([2db3e18](https://github.com/aws-amplify/amplify-cli/commit/2db3e181cf06954085eb8fade0b26162672327db)) + + + + + +## [12.5.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.5.1...@aws-amplify/cli-internal@12.5.2) (2023-10-03) + + +### Bug Fixes + +* update api category and codegen to capture high-priority bug-fixes ([3836b90](https://github.com/aws-amplify/amplify-cli/commit/3836b90b3f9ccd654d9c1b61a4b83c9c4712290c)) + + + + + +## [12.5.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.5.0...@aws-amplify/cli-internal@12.5.1) (2023-09-27) + +**Note:** Version bump only for package @aws-amplify/cli-internal + + + + + +# [12.5.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.4.0...@aws-amplify/cli-internal@12.5.0) (2023-09-22) + + +### Bug Fixes + +* add better error messaging when initializing an already initialized project ([98257a4](https://github.com/aws-amplify/amplify-cli/commit/98257a49da36d48e08c22dec6a5bc56d06d90a68)) +* remove stale data ([#13128](https://github.com/aws-amplify/amplify-cli/issues/13128)) ([9703223](https://github.com/aws-amplify/amplify-cli/commit/970322372278762fff88f7046b44574b611ad210)) +* update condition again ([b57f9ed](https://github.com/aws-amplify/amplify-cli/commit/b57f9ed097a78880531dc8e8d85aa023e72fbe53)) +* update condition for already initialized error ([842bf00](https://github.com/aws-amplify/amplify-cli/commit/842bf004a12d8fb8fbafb4868b2760b67cd55b7e)) + + +### Features + +* ensure modelgen does not throw an error when running in an uninitialized directory ([#13221](https://github.com/aws-amplify/amplify-cli/issues/13221)) ([8b5d433](https://github.com/aws-amplify/amplify-cli/commit/8b5d433163af10de1f1464055d62f04676cb3daf)) +* support codegen and modelgen commands in non-amplify directories ([#13245](https://github.com/aws-amplify/amplify-cli/issues/13245)) ([85dd5cb](https://github.com/aws-amplify/amplify-cli/commit/85dd5cb6b33d8df41e35c2cbcf3b3b0e390b1af0)) +* update main CLI version ([#13250](https://github.com/aws-amplify/amplify-cli/issues/13250)) ([f1f3118](https://github.com/aws-amplify/amplify-cli/commit/f1f3118f69f6f7702d5bb949d50e5cde44982024)) + + + + + +# [12.4.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.3.0...@aws-amplify/cli-internal@12.4.0) (2023-08-31) + + +### Features + +* bump version to 12.4.0 ([#13154](https://github.com/aws-amplify/amplify-cli/issues/13154)) ([244e092](https://github.com/aws-amplify/amplify-cli/commit/244e092066968a24c5ec47c150354248490b3010)) + + + + + +# [12.3.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.2.5...@aws-amplify/cli-internal@12.3.0) (2023-08-17) + + +### Bug Fixes + +* remove error incorrectly swallowed (fixes [#13030](https://github.com/aws-amplify/amplify-cli/issues/13030)) ([#13041](https://github.com/aws-amplify/amplify-cli/issues/13041)) ([2941584](https://github.com/aws-amplify/amplify-cli/commit/294158417ab176db4ece2acf043cc16355e9c737)) + + +### Features + +* bump version ([#13114](https://github.com/aws-amplify/amplify-cli/issues/13114)) ([ad713f7](https://github.com/aws-amplify/amplify-cli/commit/ad713f7f2213ec60268724f1e9dc896f289b3c0b)) +* generate components using graphql ([1568581](https://github.com/aws-amplify/amplify-cli/commit/15685810460881aa71e88724398b9be05ba53781)) + + + + + +## [12.2.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.2.4...@aws-amplify/cli-internal@12.2.5) (2023-08-14) + +**Note:** Version bump only for package @aws-amplify/cli-internal + + + + + +## [12.2.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.2.3...@aws-amplify/cli-internal@12.2.4) (2023-08-09) + + +### Bug Fixes + +* Dependabot alerts for semver, tough-cookie ([#12962](https://github.com/aws-amplify/amplify-cli/issues/12962)) ([175a86b](https://github.com/aws-amplify/amplify-cli/commit/175a86b89a54c65bb6e68c0609be503d61e39d63)) + + + + + +## [12.2.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.2.2...@aws-amplify/cli-internal@12.2.3) (2023-07-28) + +**Note:** Version bump only for package @aws-amplify/cli-internal + + + + + +## [12.2.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.2.1...@aws-amplify/cli-internal@12.2.2) (2023-07-27) + +**Note:** Version bump only for package @aws-amplify/cli-internal + + + + + +## [12.2.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.2.0...@aws-amplify/cli-internal@12.2.1) (2023-07-24) + +**Note:** Version bump only for package @aws-amplify/cli-internal + + + + + +# [12.2.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.1.1...@aws-amplify/cli-internal@12.2.0) (2023-07-20) + + +### Bug Fixes + +* added Prepush after init and before deploy ([#12674](https://github.com/aws-amplify/amplify-cli/issues/12674)) ([a54f837](https://github.com/aws-amplify/amplify-cli/commit/a54f83743b5995317170c9b4f5a140e5a1aa57f3)) +* beta reporter endpoints urls ([#12806](https://github.com/aws-amplify/amplify-cli/issues/12806)) ([88b5f90](https://github.com/aws-amplify/amplify-cli/commit/88b5f907c5f599dbef988de4476a26daf80466d0)) +* usage data should not throw errors ([#12839](https://github.com/aws-amplify/amplify-cli/issues/12839)) ([fbea273](https://github.com/aws-amplify/amplify-cli/commit/fbea273f9b65cd21e8d02ddfe4a803a843c2afe4)) + + +### Features + +* lambda support for yarn2/3 and pnpm package managers ([#12750](https://github.com/aws-amplify/amplify-cli/issues/12750)) ([fd18195](https://github.com/aws-amplify/amplify-cli/commit/fd181952672efb0479ca6955c0c7a45fe248d1b1)) +* uibuilder codegen service ([#12896](https://github.com/aws-amplify/amplify-cli/issues/12896)) ([3fe2f98](https://github.com/aws-amplify/amplify-cli/commit/3fe2f98a99a9daf22efccb23a031882ea2be899b)) + + + + + +## [12.1.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.1.0...@aws-amplify/cli-internal@12.1.1) (2023-06-16) + +**Note:** Version bump only for package @aws-amplify/cli-internal + + + + + +# [12.1.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.0.3...@aws-amplify/cli-internal@12.1.0) (2023-06-13) + + +### Bug Fixes + +* deploy category resources when calling amplify push ([#12587](https://github.com/aws-amplify/amplify-cli/issues/12587)) ([260723c](https://github.com/aws-amplify/amplify-cli/commit/260723cb67432308dd35a4ddbedacfbbc69c6c81)) +* do not throw when localEnvInfo is missing on pull (fixes 12492) ([#12528](https://github.com/aws-amplify/amplify-cli/issues/12528)) ([0ae8689](https://github.com/aws-amplify/amplify-cli/commit/0ae8689efbb3907393f493c8707ab025573fb487)) + + +### Features + +* bump version ([#12752](https://github.com/aws-amplify/amplify-cli/issues/12752)) ([2def814](https://github.com/aws-amplify/amplify-cli/commit/2def814808a18440a7be71baccda902f07fedc49)) + + + + + ## [12.0.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/cli-internal@12.0.1...@aws-amplify/cli-internal@12.0.3) (2023-05-25) diff --git a/packages/amplify-cli/package.json b/packages/amplify-cli/package.json index e98fe403472..a5d4eb93922 100644 --- a/packages/amplify-cli/package.json +++ b/packages/amplify-cli/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/cli-internal", - "version": "12.0.3", + "version": "12.14.2", "description": "Amplify CLI", "repository": { "type": "git", @@ -34,49 +34,49 @@ "node": ">=12.0.0" }, "dependencies": { - "@aws-amplify/amplify-app": "5.0.8", - "@aws-amplify/amplify-category-analytics": "5.0.10", - "@aws-amplify/amplify-category-api": "^5.4.1", - "@aws-amplify/amplify-category-auth": "3.2.3", - "@aws-amplify/amplify-category-custom": "3.0.8", - "@aws-amplify/amplify-category-function": "5.3.3", - "@aws-amplify/amplify-category-geo": "3.2.3", - "@aws-amplify/amplify-category-hosting": "3.5.11", - "@aws-amplify/amplify-category-interactions": "5.1.3", - "@aws-amplify/amplify-category-notifications": "2.24.10", - "@aws-amplify/amplify-category-predictions": "5.2.3", - "@aws-amplify/amplify-category-storage": "5.2.3", - "@aws-amplify/amplify-cli-core": "4.0.8", - "@aws-amplify/amplify-cli-logger": "1.3.2", - "@aws-amplify/amplify-cli-shared-interfaces": "1.2.2", - "@aws-amplify/amplify-console-hosting": "2.5.8", - "@aws-amplify/amplify-container-hosting": "2.6.8", - "@aws-amplify/amplify-dotnet-function-template-provider": "2.5.8", - "@aws-amplify/amplify-environment-parameters": "1.6.3", - "@aws-amplify/amplify-frontend-android": "3.5.4", - "@aws-amplify/amplify-frontend-flutter": "1.4.2", - "@aws-amplify/amplify-frontend-ios": "3.6.10", - "@aws-amplify/amplify-frontend-javascript": "3.9.8", - "@aws-amplify/amplify-go-function-template-provider": "1.4.3", - "@aws-amplify/amplify-nodejs-function-template-provider": "2.8.3", - "@aws-amplify/amplify-prompts": "2.7.0", - "@aws-amplify/amplify-provider-awscloudformation": "8.2.3", - "@aws-amplify/amplify-python-function-template-provider": "1.4.3", - "@aws-amplify/amplify-util-import": "2.6.0", - "@aws-amplify/amplify-util-mock": "5.2.3", - "@aws-amplify/amplify-util-uibuilder": "1.8.3", + "@aws-amplify/amplify-app": "5.0.38", + "@aws-amplify/amplify-category-analytics": "5.0.37", + "@aws-amplify/amplify-category-api": "^5.12.10", + "@aws-amplify/amplify-category-auth": "3.7.17", + "@aws-amplify/amplify-category-custom": "3.1.25", + "@aws-amplify/amplify-category-function": "5.7.11", + "@aws-amplify/amplify-category-geo": "3.5.17", + "@aws-amplify/amplify-category-hosting": "3.5.38", + "@aws-amplify/amplify-category-interactions": "5.1.30", + "@aws-amplify/amplify-category-notifications": "2.26.27", + "@aws-amplify/amplify-category-predictions": "5.5.17", + "@aws-amplify/amplify-category-storage": "5.5.16", + "@aws-amplify/amplify-cli-core": "4.3.11", + "@aws-amplify/amplify-cli-logger": "1.3.8", + "@aws-amplify/amplify-cli-shared-interfaces": "1.2.5", + "@aws-amplify/amplify-console-hosting": "2.5.35", + "@aws-amplify/amplify-container-hosting": "2.8.15", + "@aws-amplify/amplify-dotnet-function-template-provider": "2.7.1", + "@aws-amplify/amplify-environment-parameters": "1.9.16", + "@aws-amplify/amplify-frontend-android": "3.5.8", + "@aws-amplify/amplify-frontend-flutter": "1.4.7", + "@aws-amplify/amplify-frontend-ios": "3.7.9", + "@aws-amplify/amplify-frontend-javascript": "3.10.19", + "@aws-amplify/amplify-go-function-template-provider": "1.4.8", + "@aws-amplify/amplify-nodejs-function-template-provider": "2.10.11", + "@aws-amplify/amplify-prompts": "2.8.6", + "@aws-amplify/amplify-provider-awscloudformation": "8.11.3", + "@aws-amplify/amplify-python-function-template-provider": "1.4.7", + "@aws-amplify/amplify-util-import": "2.8.3", + "@aws-amplify/amplify-util-mock": "5.10.11", + "@aws-amplify/amplify-util-uibuilder": "1.14.16", "@aws-cdk/cloudformation-diff": "~2.68.0", - "amplify-codegen": "^4.1.1", - "amplify-dotnet-function-runtime-provider": "2.0.3", - "amplify-go-function-runtime-provider": "2.3.21", - "amplify-java-function-runtime-provider": "2.3.21", - "amplify-java-function-template-provider": "1.5.20", - "amplify-nodejs-function-runtime-provider": "2.4.3", - "amplify-python-function-runtime-provider": "2.4.21", - "aws-cdk-lib": "~2.68.0", - "aws-sdk": "^2.1354.0", + "amplify-codegen": "^4.10.2", + "amplify-dotnet-function-runtime-provider": "2.1.1", + "amplify-go-function-runtime-provider": "2.3.48", + "amplify-java-function-runtime-provider": "2.3.48", + "amplify-java-function-template-provider": "1.5.24", + "amplify-nodejs-function-runtime-provider": "2.5.25", + "amplify-python-function-runtime-provider": "2.4.48", + "aws-cdk-lib": "~2.177.0", + "aws-sdk": "^2.1464.0", "chalk": "^4.1.1", - "ci-info": "^2.0.0", + "ci-info": "^3.8.0", "cli-table3": "^0.6.0", "cloudform-types": "^4.2.0", "colors": "1.4.0", @@ -87,7 +87,7 @@ "fs-extra": "^8.1.0", "glob": "^7.2.0", "graphql": "^15.5.0", - "graphql-transformer-core": "^8.1.2", + "graphql-transformer-core": "^8.2.13", "gunzip-maybe": "^1.4.2", "hidefile": "^3.0.0", "ini": "^1.3.5", @@ -97,7 +97,7 @@ "ora": "^4.0.3", "progress": "^2.0.3", "promise-sequential": "^1.1.1", - "semver": "^7.3.5", + "semver": "^7.5.4", "tar-fs": "^2.1.1", "treeify": "^1.1.0", "update-notifier": "^5.1.0", @@ -105,9 +105,8 @@ "which": "^2.0.2" }, "devDependencies": { - "@aws-amplify/amplify-function-plugin-interface": "1.10.2", + "@aws-amplify/amplify-function-plugin-interface": "1.12.1", "@types/archiver": "^5.3.1", - "@types/ci-info": "^2.0.0", "@types/columnify": "^1.5.1", "@types/folder-hash": "^4.0.1", "@types/fs-extra": "^8.0.1", @@ -120,8 +119,10 @@ "@types/tar-fs": "^2.0.0", "@types/treeify": "^1.0.0", "@types/update-notifier": "^5.1.0", + "amplify-headless-interface": "1.17.7", "cloudform-types": "^4.2.0", - "nock": "^12.0.3", + "jest": "^29.5.0", + "nock": "^13.5.0", "typescript": "^4.9.5" }, "jest": { diff --git a/packages/amplify-cli/src/__tests__/amplify-exception-handler.test.ts b/packages/amplify-cli/src/__tests__/amplify-exception-handler.test.ts index d78994db8cc..49d9efb2711 100644 --- a/packages/amplify-cli/src/__tests__/amplify-exception-handler.test.ts +++ b/packages/amplify-cli/src/__tests__/amplify-exception-handler.test.ts @@ -1,3 +1,4 @@ +import { EOL } from 'os'; import { AmplifyError } from '@aws-amplify/amplify-cli-core'; import { printer } from '@aws-amplify/amplify-prompts'; // eslint-disable-line import/no-extraneous-dependencies import { reportError } from '../commands/diagnose'; @@ -8,7 +9,7 @@ const printerMock = printer as any; const reportErrorMock = reportError as jest.MockedFunction; jest.mock('../commands/diagnose', () => ({ - reportError: jest.fn(async (__context: Context, __error: Error | undefined): Promise => { + reportError: jest.fn(async (): Promise => { /* no-op */ }), })); @@ -30,7 +31,7 @@ describe('test exception handler', () => { } as unknown as Context; beforeEach(() => { jest.resetAllMocks(); - processExit = jest.spyOn(process, 'exit').mockImplementation((__code?: number) => undefined as never); + processExit = jest.spyOn(process, 'exit').mockImplementation(() => undefined as never); init(contextMock); }); it('error handler should call usageData emitError', async () => { @@ -56,30 +57,34 @@ describe('test exception handler', () => { it('error handler should print error', async () => { const amplifyError = new AmplifyError('NotImplementedError', { - message: 'Test Not implemented', - details: 'Test Not implemented', - resolution: 'Test Not implemented', + message: 'Test Not implemented(message)', + details: 'Test Not implemented(details)', + resolution: 'Test Not implemented(resolution)', }); await handleException(amplifyError); - expect(printerMock.error).toHaveBeenCalledWith(amplifyError.message); - expect(printerMock.info).toHaveBeenCalledWith(amplifyError.details); + expect(printerMock.error).toHaveBeenCalledWith(`${amplifyError.message}${EOL}${amplifyError.details}`); + expect(printerMock.info).toHaveBeenCalledTimes(2); + expect(printerMock.info).toHaveBeenNthCalledWith(1, `Resolution: ${amplifyError.resolution}`); + expect(printerMock.info).toHaveBeenLastCalledWith('Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/'); expect(printerMock.debug).toHaveBeenCalledWith(amplifyError.stack); }); it('error handler should handle encountered errors gracefully', async () => { const amplifyError = new AmplifyError('NotImplementedError', { - message: 'Test Not implemented', - details: 'Test Not implemented', - resolution: 'Test Not implemented', + message: 'Test Not implemented(message)', + details: 'Test Not implemented(details)', + resolution: 'Test Not implemented(resolution)', }); reportErrorMock.mockRejectedValueOnce(new Error('MockTestError')); await handleException(amplifyError); - expect(printerMock.error).toHaveBeenCalledWith(amplifyError.message); - expect(printerMock.info).toHaveBeenCalledWith(amplifyError.details); + expect(printerMock.error).toHaveBeenCalledWith(`${amplifyError.message}${EOL}${amplifyError.details}`); + expect(printerMock.info).toHaveBeenCalledTimes(2); + expect(printerMock.info).toHaveBeenNthCalledWith(1, `Resolution: ${amplifyError.resolution}`); + expect(printerMock.info).toHaveBeenLastCalledWith('Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/'); expect(printerMock.debug).toHaveBeenCalledWith(amplifyError.stack); expect(printerMock.error).toHaveBeenCalledWith('Failed to report error: MockTestError'); }); diff --git a/packages/amplify-cli/src/__tests__/commands/init.test.ts b/packages/amplify-cli/src/__tests__/commands/init.test.ts index 16503e5d414..f4e29eec1b4 100644 --- a/packages/amplify-cli/src/__tests__/commands/init.test.ts +++ b/packages/amplify-cli/src/__tests__/commands/init.test.ts @@ -1,14 +1,32 @@ -import { $TSContext, getPackageManager, JSONUtilities, LocalEnvInfo, pathManager, stateManager } from '@aws-amplify/amplify-cli-core'; +import { + $TSContext, + getPackageManager, + JSONUtilities, + LocalEnvInfo, + pathManager, + stateManager, + getPackageManagerByType, + $TSAny, +} from '@aws-amplify/amplify-cli-core'; import { execSync } from 'child_process'; import { ensureDir, existsSync, readFileSync, readJSON, readdirSync } from 'fs-extra'; import { sync } from 'which'; -import { preInitSetup } from '../../init-steps/preInitSetup'; +import { getPreInitSetup } from '../../init-steps/preInitSetup'; import { analyzeProject } from '../../init-steps/s0-analyzeProject'; import { initFrontend } from '../../init-steps/s1-initFrontend'; import { scaffoldProjectHeadless } from '../../init-steps/s8-scaffoldHeadless'; import { coerce } from 'semver'; -jest.mock('@aws-amplify/amplify-cli-core'); +jest.mock('@aws-amplify/amplify-cli-core', () => ({ + ...(jest.requireActual('@aws-amplify/amplify-cli-core') as {}), + FeatureFlags: { + getBoolean: jest.fn(), + getNumber: jest.fn(), + isInitialized: jest.fn().mockReturnValue(true), + ensureDefaultFeatureFlags: jest.fn(), + }, + getPackageManager: jest.fn(), +})); jest.mock('child_process'); jest.mock('fs-extra'); jest.mock('which'); @@ -19,16 +37,11 @@ jest.mock('which'); (existsSync as jest.Mock).mockReturnValue(true); (readdirSync as jest.Mock).mockReturnValue([]); (sync as jest.MockedFunction).mockReturnValue('mock/path'); -(getPackageManager as jest.MockedFunction).mockReturnValue( - new Promise((resolve) => - resolve({ - executable: 'yarn', - lockFile: 'mock.lock', - packageManager: 'yarn', - version: coerce('1.22.0') ?? undefined, - }), - ), -); + +const packageManager = getPackageManagerByType('yarn'); +(packageManager as $TSAny).lockFile = 'mock.lock'; +(packageManager as $TSAny).version = coerce('1.22.0') ?? undefined; +(getPackageManager as jest.MockedFunction).mockResolvedValue(packageManager); describe('amplify init:', () => { const mockGetProjectConfigFilePath = jest.spyOn(pathManager, 'getProjectConfigFilePath'); @@ -124,7 +137,9 @@ describe('amplify init:', () => { }, }, }; - await preInitSetup(context as unknown as $TSContext); + const recommendGen2 = true; + const step = getPreInitSetup(!recommendGen2); + await step(context as unknown as $TSContext); expect(execSync).toBeCalledWith(`git ls-remote ${appUrl}`, { stdio: 'ignore' }); expect(execSync).toBeCalledWith(`git clone ${appUrl} .`, { stdio: 'inherit' }); expect(execSync).toBeCalledWith('yarn install', { stdio: 'inherit' }); diff --git a/packages/amplify-cli/src/__tests__/commands/status.test.ts b/packages/amplify-cli/src/__tests__/commands/status.test.ts index 01319d92c17..ba5878a9175 100644 --- a/packages/amplify-cli/src/__tests__/commands/status.test.ts +++ b/packages/amplify-cli/src/__tests__/commands/status.test.ts @@ -4,7 +4,7 @@ import { showApiAuthAcm } from '@aws-amplify/amplify-category-api'; jest.mock('@aws-amplify/amplify-category-hosting'); jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('@aws-amplify/amplify-category-api', () => ({ - showApiAuthAcm: jest.fn(async (_: any, __: string) => ''), + showApiAuthAcm: jest.fn(async () => ''), })); const pathManagerMock = pathManager as jest.Mocked; diff --git a/packages/amplify-cli/src/__tests__/commands/uninstall.pkg.test.ts b/packages/amplify-cli/src/__tests__/commands/uninstall.pkg.test.ts index 20f42c3ff42..f38ba57c8dc 100644 --- a/packages/amplify-cli/src/__tests__/commands/uninstall.pkg.test.ts +++ b/packages/amplify-cli/src/__tests__/commands/uninstall.pkg.test.ts @@ -5,7 +5,6 @@ import * as fs from 'fs-extra'; import { hideSync } from 'hidefile'; import { setRegPendingDelete } from '../../utils/win-utils'; import { windowsPathSerializer } from '../testUtils/snapshot-serializer'; -import * as path from 'path'; jest.mock('execa'); const execa_mock = execa as jest.Mocked; @@ -14,7 +13,7 @@ execa_mock.command.mockResolvedValue({} as any); jest.mock('fs-extra'); const fs_mock = fs as jest.Mocked; -let userConfirmation = true; +const userConfirmation = true; const context_stub = { amplify: { confirmPrompt: async () => userConfirmation, @@ -72,7 +71,7 @@ describe('uninstall packaged CLI on mac / linux', () => { }); it('throws if it cannot remove the .amplify dir', async () => { - fs_mock.remove.mockImplementationOnce(async () => { + fs_mock.remove.mockImplementationOnce(() => { throw new Error('fs remove did not work!'); }); diff --git a/packages/amplify-cli/src/__tests__/commands/upgrade.pkg.test.ts b/packages/amplify-cli/src/__tests__/commands/upgrade.pkg.test.ts index 1129462dcd7..5d71361a074 100644 --- a/packages/amplify-cli/src/__tests__/commands/upgrade.pkg.test.ts +++ b/packages/amplify-cli/src/__tests__/commands/upgrade.pkg.test.ts @@ -1,9 +1,7 @@ -/* eslint-disable jest/no-interpolation-in-snapshots */ import * as fs from 'fs-extra'; import fetch, { Response } from 'node-fetch'; import { $TSContext } from '@aws-amplify/amplify-cli-core'; import * as core from '@aws-amplify/amplify-cli-core'; -import * as path from 'path'; import execa from 'execa'; import { run } from '../../commands/upgrade'; import { windowsPathSerializer } from '../testUtils/snapshot-serializer'; @@ -156,10 +154,10 @@ describe('run upgrade using packaged CLI', () => { let movedBinToTemp = false; fsMock.move - .mockImplementationOnce(async () => { + .mockImplementationOnce(() => { movedBinToTemp = true; }) - .mockImplementationOnce(async () => { + .mockImplementationOnce(() => { if (!movedBinToTemp) throw new Error('fs.move was not called before copying extracted file to bin location'); }); diff --git a/packages/amplify-cli/src/__tests__/execution-manager.test.ts b/packages/amplify-cli/src/__tests__/execution-manager.test.ts index d338ca9c4b6..2322ce248a5 100644 --- a/packages/amplify-cli/src/__tests__/execution-manager.test.ts +++ b/packages/amplify-cli/src/__tests__/execution-manager.test.ts @@ -5,6 +5,9 @@ import { CLIInput as CommandLineInput } from '../domain/command-input'; import { Context } from '../domain/context'; import { PluginInfo } from '@aws-amplify/amplify-cli-core'; import { executeCommand } from '../execution-manager'; +import { printer } from '@aws-amplify/amplify-prompts'; + +jest.mock('@aws-amplify/amplify-prompts'); const handleAmplifyEventMock = jest.fn(); jest.mock('../../__mocks__/faked-plugin', () => ({ @@ -66,6 +69,7 @@ describe('execution manager', () => { beforeEach(() => { jest.clearAllMocks(); + mockContext.parameters = { options: {} }; }); it.each([ @@ -74,6 +78,7 @@ describe('execution manager', () => { ['pull', { event: AmplifyEvent.PrePull, data: {} }], ['models', { event: AmplifyEvent.PreCodegenModels, data: {} }], ])('executeCommand raise pre %s event', async (command, args) => { + mockFs.readdirSync.mockReturnValue([]); mockFs.existsSync.mockReturnValue(true); mockContext.input.command = command; await executeCommand(mockContext); @@ -86,9 +91,23 @@ describe('execution manager', () => { ['pull', { event: AmplifyEvent.PostPull, data: {} }], ['models', { event: AmplifyEvent.PostCodegenModels, data: {} }], ])('executeCommand raise post %s event', async (command, args) => { + mockFs.readdirSync.mockReturnValue([]); mockFs.existsSync.mockReturnValue(true); mockContext.input.command = command; await executeCommand(mockContext); expect(handleAmplifyEventMock).toBeCalledWith(mockContext, args); }); + + it.each([[AmplifyEvent.PreCodegenModels], [AmplifyEvent.PostCodegenModels]])( + 'executeCommand skips %s when target and model-schema parameters are provided', + async (event) => { + mockFs.readdirSync.mockReturnValue([]); + mockFs.existsSync.mockReturnValue(true); + mockContext.input.command = 'models'; + mockContext.parameters.options = { target: 'javascript', 'model-schema': 'schema.graphql' }; + await executeCommand(mockContext); + expect(printer.info).toBeCalledWith(expect.stringContaining(`Skipping ${event}`)); + expect(handleAmplifyEventMock).not.toBeCalledWith(mockContext, { event, data: {} }); + }, + ); }); diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/execute-provider-utils.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/execute-provider-utils.test.ts index c2db5c58a21..8b66c704be4 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/execute-provider-utils.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/execute-provider-utils.test.ts @@ -8,7 +8,7 @@ jest.mock('../../../extensions/amplify-helpers/get-provider-plugins.ts', () => ( jest.mock('../../../../__mocks__/faked-plugin', () => ({ providerUtils: { compileSchema: jest.fn().mockReturnValue(Promise.resolve({})), - zipFiles: jest.fn((context, [srcDir, dstZipFilePath]) => { + zipFiles: jest.fn(() => { return Promise.resolve({}); }), }, diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/remove-resource.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/remove-resource.test.ts index d94320d9fc0..1b4ccea3fa6 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/remove-resource.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/remove-resource.test.ts @@ -1,6 +1,5 @@ import { stateManager, exitOnNextTick, ResourceDoesNotExistError } from '@aws-amplify/amplify-cli-core'; import { printer, prompter } from '@aws-amplify/amplify-prompts'; -import * as inquirer from 'inquirer'; import * as path from 'path'; import { removeResourceParameters } from '../../../extensions/amplify-helpers/envResourceParams'; import { removeResource, forceRemoveResource } from '../../../extensions/amplify-helpers/remove-resource'; @@ -24,6 +23,9 @@ jest.mock('@aws-amplify/amplify-cli-core', () => ({ }, pathManager: { getResourceDirectoryPath: jest.fn((_, categoryName, resourceName) => path.join('backendDirPath', categoryName, resourceName)), + getStackBuildCategoryResourceDirPath: jest.fn((_, categoryName, resourceName) => + path.join('backendDirPath/awscloudformation/build/', categoryName, resourceName), + ), }, exitOnNextTick: jest.fn().mockImplementation(() => { throw 'process.exit mock'; @@ -31,7 +33,6 @@ jest.mock('@aws-amplify/amplify-cli-core', () => ({ })); const stateManagerMock = stateManager as jest.Mocked; -const inquirerMock = inquirer as jest.Mocked; jest.mock('@aws-amplify/amplify-prompts'); const prompterMock = prompter as jest.Mocked; @@ -149,14 +150,21 @@ describe('remove-resource', () => { it('print the deletion info when choose LambdaLayer', async () => { prompterMock.pick.mockResolvedValueOnce('lambdaLayer1'); - await expect( - removeResource(context as any, 'function', undefined, { + + let error; + try { + await removeResource(context as any, 'function', undefined, { serviceDeletionInfo: { LambdaLayer: 'lambdaLayer deletion info message', }, serviceSuffix: { Lambda: '(function)', LambdaLayer: '(layer)' }, - }), - ).rejects.toThrowError('An error occurred when removing the resources from the local directory'); + }); + } catch (e) { + error = e; + } + expect(error).toBeDefined(); + expect(error.message).toBe('Resource cannot be removed because it has a dependency on another resource'); + expect(error.details).toBe('Dependency: Lambda - lambda1. Remove the dependency first.'); expect(prompterMock.pick).toBeCalledWith('Choose the resource you would want to remove', [ { @@ -193,6 +201,8 @@ describe('remove-resource', () => { }, }); expect(context.filesystem.remove).toBeCalledWith(path.join('backendDirPath', 'function', 'lambda1')); + expect(context.filesystem.remove).toBeCalledWith(path.join('backendDirPath/awscloudformation/build', 'function', 'lambda1')); + expect(context.filesystem.remove).toBeCalledTimes(2); expect(removeResourceParameters).toBeCalledWith(context, 'function', 'lambda1'); expect(updateBackendConfigAfterResourceRemove).toBeCalledWith('function', 'lambda1'); expect(printer.success).toBeCalledWith('Successfully removed resource'); @@ -210,9 +220,15 @@ describe('remove-resource', () => { }); it('throw an error when the dependent resources has a specified resource', async () => { - await expect(removeResource(context as any, 'function', 'lambdaLayer1')).rejects.toThrowError( - 'An error occurred when removing the resources from the local directory', - ); + let error; + try { + await removeResource(context as any, 'function', 'lambdaLayer1'); + } catch (e) { + error = e; + } + expect(error).toBeDefined(); + expect(error.message).toBe('Resource cannot be removed because it has a dependency on another resource'); + expect(error.details).toBe('Dependency: Lambda - lambda1. Remove the dependency first.'); }); it('print message to unlink the imported resource on confirm prompt when the specified service is imported resource', async () => { @@ -257,6 +273,7 @@ describe('remove-resource', () => { }, }); expect(context.filesystem.remove).toBeCalledWith('backendDirPath/function/lambdaLayer1'); + expect(context.filesystem.remove).toBeCalledWith('backendDirPath/awscloudformation/build/function/lambdaLayer1'); expect(removeResourceParameters).toBeCalledWith(context, 'function', 'lambdaLayer1'); expect(updateBackendConfigAfterResourceRemove).toBeCalledWith('function', 'lambdaLayer1'); expect(printer.success).toBeCalledWith('Successfully removed resource'); diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/resource-status-diff.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/resource-status-diff.test.ts index 640bad9c82f..da2fb7e8990 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/resource-status-diff.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/resource-status-diff.test.ts @@ -4,7 +4,6 @@ import * as fs from 'fs-extra'; import { stateManager, pathManager } from '@aws-amplify/amplify-cli-core'; import { CLOUD_INITIALIZED } from '../../../extensions/amplify-helpers/get-cloud-init-status'; import { capitalize, globCFNFilePath, ResourceDiff, stackMutationType } from '../../../extensions/amplify-helpers/resource-status-diff'; -import { cronJobSetting } from '../../../../../amplify-category-function/lib/provider-utils/awscloudformation/utils/constants'; // Mock Glob to fetch test cloudformation jest.mock('glob'); diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/resource-status.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/resource-status.test.ts index 06dae0c4508..dd7c7e0f8a6 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/resource-status.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/resource-status.test.ts @@ -485,9 +485,11 @@ describe('resource-status', () => { const fsMock = fs as jest.Mocked; fsMock.existsSync.mockReturnValue(true); const hashElementMock = hashElement as jest.MockedFunction; + // eslint-disable-next-line @typescript-eslint/no-misused-promises hashElementMock.mockImplementation(async () => ({ hash: sampleHash1, })); + // eslint-disable-next-line @typescript-eslint/no-misused-promises hashElementMock.mockImplementationOnce(async () => ({ hash: sampleHash2, })); @@ -740,7 +742,6 @@ describe('resource-status', () => { it('throws an error when non amplify project', async () => { (getCloudInitStatus as jest.MockedFunction).mockReturnValue(NON_AMPLIFY_PROJECT); - // eslint-disable-next-line jest/valid-expect await expect(getResourceStatus()).rejects.toThrow('No Amplify backend project files detected within this folder.'); }); }); @@ -816,9 +817,11 @@ describe('resource-status', () => { const fsMock = fs as jest.Mocked; fsMock.existsSync.mockReturnValue(true); const hashElementMock = hashElement as jest.MockedFunction; + // eslint-disable-next-line @typescript-eslint/no-misused-promises hashElementMock.mockImplementation(async () => ({ hash: sampleHash1, })); + // eslint-disable-next-line @typescript-eslint/no-misused-promises hashElementMock.mockImplementationOnce(async () => ({ hash: sampleHash2, })); diff --git a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/service-select-prompt.test.ts b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/service-select-prompt.test.ts index 0dc9892731a..ccfb03b9d4f 100644 --- a/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/service-select-prompt.test.ts +++ b/packages/amplify-cli/src/__tests__/extensions/amplify-helpers/service-select-prompt.test.ts @@ -1,8 +1,10 @@ import { stateManager } from '@aws-amplify/amplify-cli-core'; +import { printer } from '@aws-amplify/amplify-prompts'; + +jest.mock('@aws-amplify/amplify-prompts'); +const printerMock = printer as jest.Mocked; let context = {}; -let errorMessages: string[] = []; -let infoMessages: string[] = []; describe('serviceSelectPrompt', () => { const mockExit = jest.fn(); @@ -37,9 +39,6 @@ describe('serviceSelectPrompt', () => { }; beforeEach(() => { - errorMessages = []; - infoMessages = []; - context = { runtime: { plugins: [ @@ -51,8 +50,6 @@ describe('serviceSelectPrompt', () => { }, print: { success: jest.fn(), - error: (message: string) => errorMessages.push(message), - info: (message: string) => infoMessages.push(message), }, usageData: { emitError: jest.fn(), @@ -122,11 +119,9 @@ describe('serviceSelectPrompt', () => { }; promptMock.mockImplementation(() => Promise.resolve(promptResponse)); - - await serviceSelectionPrompt(context, '', undefined); - - expect(errorMessages.length).toEqual(1); - expect(mockExit).toBeCalledWith(1); + await expect(serviceSelectionPrompt(context, '', undefined)).rejects.toThrowError( + 'No services defined by configured providers for category', + ); }); it('should gracefully handle null providers', async () => { @@ -138,11 +133,9 @@ describe('serviceSelectPrompt', () => { }; promptMock.mockImplementation(() => Promise.resolve(promptResponse)); - - await serviceSelectionPrompt(context, '', undefined); - - expect(errorMessages.length).toEqual(1); - expect(mockExit).toBeCalledWith(1); + await expect(serviceSelectionPrompt(context, '', undefined)).rejects.toThrowError( + 'No services defined by configured providers for category', + ); }); it('should return a service immediately if only one exists', async () => { @@ -161,7 +154,7 @@ describe('serviceSelectPrompt', () => { service: 'awscloudformation', }; expect(selectedProvider).toEqual(expectedResult); - expect(infoMessages.length).toEqual(1); + expect(printerMock.info).toHaveBeenCalledWith('Using service: awscloudformation, provided by: awscloudformation'); }); it('should prompt if more than one provider is available', async () => { diff --git a/packages/amplify-cli/src/__tests__/flow-report.test.ts b/packages/amplify-cli/src/__tests__/flow-report.test.ts index 972e822932c..d7a6c91ca7f 100644 --- a/packages/amplify-cli/src/__tests__/flow-report.test.ts +++ b/packages/amplify-cli/src/__tests__/flow-report.test.ts @@ -14,7 +14,6 @@ import { } from 'amplify-headless-interface'; import { v4 as uuid } from 'uuid'; import { Redactor } from '@aws-amplify/amplify-cli-logger'; -import crypto from 'crypto'; import { CLIFlowReport } from '../domain/amplify-usageData/FlowReport'; describe('Test FlowReport Logging', () => { @@ -216,8 +215,6 @@ const getGeoHeadlessTestInput = () => { return headlessPayload; }; -const getAPIHeadlessTestInput = () => {}; - const getGraphQLHeadlessTestInput = () => { const headlessPayload: AddApiRequest = { version: 1, diff --git a/packages/amplify-cli/src/__tests__/init-steps/preInitSetup.test.ts b/packages/amplify-cli/src/__tests__/init-steps/preInitSetup.test.ts new file mode 100644 index 00000000000..f2fd428f332 --- /dev/null +++ b/packages/amplify-cli/src/__tests__/init-steps/preInitSetup.test.ts @@ -0,0 +1,95 @@ +import { $TSContext } from '@aws-amplify/amplify-cli-core'; +import { printer, prompter } from '@aws-amplify/amplify-prompts'; +import { getPreInitSetup, preInitSetup, gen2Recommendation } from '../../init-steps/preInitSetup'; +import { isNewProject } from '../../init-steps/s0-analyzeProject'; + +// Mock dependencies +jest.mock('@aws-amplify/amplify-cli-core', () => ({ + ...(jest.requireActual('@aws-amplify/amplify-cli-core') as {}), + FeatureFlags: { + getBoolean: jest.fn(), + getNumber: jest.fn(), + isInitialized: jest.fn().mockReturnValue(true), + ensureDefaultFeatureFlags: jest.fn(), + }, + getPackageManager: jest.fn(), +})); + +jest.mock('@aws-amplify/amplify-prompts', () => ({ + printer: { + warn: jest.fn(), + }, + prompter: { + confirmContinue: jest.fn(), + pick: jest.fn(), + }, +})); + +jest.mock('../../init-steps/s0-analyzeProject', () => ({ + isNewProject: jest.fn(), +})); + +describe('preInitSetup', () => { + it('should return preInitSetupBasic when isHeadless is true', () => { + const result = getPreInitSetup(false); + expect(result).toBe(preInitSetup); + }); + + it('should return a function when isHeadless is false', () => { + const result = getPreInitSetup(false); + expect(typeof result).toBe('function'); + }); +}); + +describe('gen2Recommendation', () => { + let context; + + beforeEach(() => { + context = { exeInfo: {} } as $TSContext; + }); + + afterEach(() => { + jest.clearAllMocks(); + }); + + it('should recommend using Gen 2 for new projects', async () => { + const isNewProjectMock = jest.mocked(isNewProject); + isNewProjectMock.mockReturnValue(true); + + const confirmContinueMock = jest.mocked(prompter.confirmContinue); + confirmContinueMock.mockResolvedValue(true); + + const pickMock = jest.mocked(prompter.pick); + pickMock.mockResolvedValue('I am a current Gen 1 user'); + + await gen2Recommendation(context); + + expect(require('@aws-amplify/amplify-prompts').printer.warn).toHaveBeenCalledWith( + 'For new projects, we recommend starting with AWS Amplify Gen 2, our new code-first developer experience. Get started at https://docs.amplify.aws/react/start/quickstart/', + ); + expect(confirmContinueMock).toHaveBeenCalledWith('Do you want to continue with Amplify Gen 1?'); + expect(pickMock).toHaveBeenCalledWith( + 'Why would you like to use Amplify Gen 1?', + [ + 'I am a current Gen 1 user', + 'Gen 2 is missing features I need from Gen 1', + 'I find the Gen 1 CLI easier to use', + 'Prefer not to answer', + ], + { initial: 3 }, + ); + expect(context.exeInfo.projectConfig).toEqual({ whyContinueWithGen1: 'I am a current Gen 1 user' }); + }); + + it('should return the context for existing projects', async () => { + const isNewProjectMock = jest.mocked(isNewProject); + isNewProjectMock.mockReturnValue(false); + + const result = await gen2Recommendation(context); + + expect(result).toEqual(context); + expect(printer.warn).not.toHaveBeenCalled(); + expect(prompter.confirmContinue).not.toHaveBeenCalled(); + expect(prompter.pick).not.toHaveBeenCalled(); + }); +}); diff --git a/packages/amplify-cli/src/__tests__/init-steps/s0-analyzeProject.test.ts b/packages/amplify-cli/src/__tests__/init-steps/s0-analyzeProject.test.ts index 8077a908a1b..11e5c63ecf8 100644 --- a/packages/amplify-cli/src/__tests__/init-steps/s0-analyzeProject.test.ts +++ b/packages/amplify-cli/src/__tests__/init-steps/s0-analyzeProject.test.ts @@ -1,8 +1,9 @@ -import { $TSContext, stateManager } from '@aws-amplify/amplify-cli-core'; +import { $TSContext, AmplifyError, stateManager } from '@aws-amplify/amplify-cli-core'; import { analyzeProject } from '../../init-steps/s0-analyzeProject'; import { constructMockPluginPlatform } from '../extensions/amplify-helpers/mock-plugin-platform'; import { CLIInput as CommandLineInput } from '../../domain/command-input'; import { constructContext } from '../../context-manager'; +import * as fs from 'fs-extra'; jest.spyOn(stateManager, 'getLocalAWSInfo').mockReturnValue({ envA: 'test', envB: 'test' }); jest.spyOn(stateManager, 'getLocalEnvInfo').mockReturnValue({ defaultEditor: 'Visual Studio Code' }); @@ -75,4 +76,26 @@ describe('analyzeProject', () => { await analyzeProject(mockContext); expect(mockContext.exeInfo.isNewEnv).toBe(true); }); + + it('throws helpful error message when running subsequent init -y commands', async () => { + const appID = 'testAppID'; + const currentEnv = 'dev'; + + mockContext.parameters = { + options: { + yes: true, + }, + }; + + jest.spyOn(fs, 'existsSync').mockReturnValue(true); + jest.spyOn(stateManager, 'getAppID').mockReturnValue(appID); + jest.spyOn(stateManager, 'getCurrentEnvName').mockReturnValue(currentEnv); + + const amplifyError = new AmplifyError('ProjectInitError', { + message: `Amplify project ${appID} is already initialized for environment ${currentEnv}`, + resolution: `To create a new environment run \`amplify add env\``, + }); + + await expect(analyzeProject(mockContext)).rejects.toThrow(amplifyError); + }); }); diff --git a/packages/amplify-cli/src/__tests__/input-validation.test.ts b/packages/amplify-cli/src/__tests__/input-validation.test.ts index fdc047680f3..eb6f1116fbd 100644 --- a/packages/amplify-cli/src/__tests__/input-validation.test.ts +++ b/packages/amplify-cli/src/__tests__/input-validation.test.ts @@ -1,14 +1,67 @@ import { verifyInput } from '../input-manager'; -import { PluginPlatform } from '@aws-amplify/amplify-cli-core'; +import { PluginInfo, PluginManifest, PluginPlatform, getPackageManager, getPackageManagerByType } from '@aws-amplify/amplify-cli-core'; import { CLIInput as CommandLineInput } from '../domain/command-input'; +jest.mock('@aws-amplify/amplify-cli-core', () => ({ + ...(jest.requireActual('@aws-amplify/amplify-cli-core') as {}), + getPackageManager: jest.fn(), +})); + +const npmPackageManager = getPackageManagerByType('npm'); +const yarnPackageManager = getPackageManagerByType('yarn'); +const pnpmPackageManager = getPackageManagerByType('pnpm'); + describe('input validation tests', () => { - it('status -v option should be treated as verbose', () => { + beforeEach(() => jest.clearAllMocks()); + + it('status -v option should be treated as verbose', async () => { const input = new CommandLineInput(['status', '-v']); input.command = 'status'; input.options = { v: true }; - verifyInput(new PluginPlatform(), input); + await verifyInput(new PluginPlatform(), input); expect(input?.options?.verbose).toBe(true); }); + + it('display npx Amplify Gen 2 message with command not found message', async () => { + (getPackageManager as jest.MockedFunction).mockResolvedValue(npmPackageManager); + const input = new CommandLineInput(['sandbox']); + input.command = 'sandbox'; + + const version = 'latestVersion'; + const pluginPlatform = new PluginPlatform(); + pluginPlatform.plugins.core = [new PluginInfo('', version, '', new PluginManifest('', ''))]; + + const verifyInputResult = await verifyInput(pluginPlatform, input); + expect(verifyInputResult.message).toContain('can NOT find command'); + expect(verifyInputResult.message).toContain('npx @aws-amplify/backend-cli sandbox'); + }); + + it('display yarn dlx Amplify Gen 2 message with command not found message', async () => { + (getPackageManager as jest.MockedFunction).mockResolvedValue(yarnPackageManager); + const input = new CommandLineInput(['sandbox']); + input.command = 'sandbox'; + + const version = 'latestVersion'; + const pluginPlatform = new PluginPlatform(); + pluginPlatform.plugins.core = [new PluginInfo('', version, '', new PluginManifest('', ''))]; + + const verifyInputResult = await verifyInput(pluginPlatform, input); + expect(verifyInputResult.message).toContain('can NOT find command'); + expect(verifyInputResult.message).toContain('yarn dlx @aws-amplify/backend-cli sandbox'); + }); + + it('display pnpm dlx Amplify Gen 2 message with command not found message', async () => { + (getPackageManager as jest.MockedFunction).mockResolvedValue(pnpmPackageManager); + const input = new CommandLineInput(['sandbox']); + input.command = 'sandbox'; + + const version = 'latestVersion'; + const pluginPlatform = new PluginPlatform(); + pluginPlatform.plugins.core = [new PluginInfo('', version, '', new PluginManifest('', ''))]; + + const verifyInputResult = await verifyInput(pluginPlatform, input); + expect(verifyInputResult.message).toContain('can NOT find command'); + expect(verifyInputResult.message).toContain('pnpm dlx @aws-amplify/backend-cli sandbox'); + }); }); diff --git a/packages/amplify-cli/src/__tests__/plugin-helpers/verify-plugin.test.ts b/packages/amplify-cli/src/__tests__/plugin-helpers/verify-plugin.test.ts index 2ab1a5c8089..14eaea4f177 100644 --- a/packages/amplify-cli/src/__tests__/plugin-helpers/verify-plugin.test.ts +++ b/packages/amplify-cli/src/__tests__/plugin-helpers/verify-plugin.test.ts @@ -48,12 +48,14 @@ describe('verify-plugin', () => { }); it('returns PluginDirPathNotExist error when specify not exist path', async () => { + // eslint-disable-next-line @typescript-eslint/no-misused-promises fsMock.pathExists.mockImplementation(() => Promise.resolve(false)); const result = await verifyPlugin(path.join('path', 'to', 'plugin')); expect(result).toEqual(new PluginVerificationResult(false, PluginVerificationError.PluginDirPathNotExist)); }); it('returns PluginDirPathNotExist error when specify non directory path', async () => { + // eslint-disable-next-line @typescript-eslint/no-misused-promises fsMock.pathExists.mockImplementation(() => Promise.resolve(true)); const stat = { isDirectory: jest.fn().mockReturnValue(false), @@ -64,6 +66,7 @@ describe('verify-plugin', () => { }); it('returns InvalidNodePackage error when specify package.json not exists directory path', async () => { + // eslint-disable-next-line @typescript-eslint/no-misused-promises fsMock.pathExists.mockImplementation(() => Promise.resolve(true)); const stat = { isDirectory: jest.fn().mockReturnValue(true), @@ -83,6 +86,7 @@ describe('verify-plugin', () => { it('returns MissingManifest error when amplify-plugin.json is not exists.', async () => { // stat package.json + // eslint-disable-next-line @typescript-eslint/no-misused-promises fsMock.pathExists.mockImplementationOnce(() => Promise.resolve(true)); const stat = { isDirectory: jest.fn().mockReturnValue(true), @@ -95,6 +99,7 @@ describe('verify-plugin', () => { readJsonMock.mockReturnValueOnce(packageJson); // stat amplify-plugin.json + // eslint-disable-next-line @typescript-eslint/no-misused-promises fsMock.pathExists.mockImplementationOnce(() => Promise.resolve(false)); const result = await verifyPlugin(path.join('path', 'to', 'plugin')); @@ -104,6 +109,7 @@ describe('verify-plugin', () => { it('returns MissingManifest error when amplify-plugin.json is not file.', async () => { // stat package.json + // eslint-disable-next-line @typescript-eslint/no-misused-promises fsMock.pathExists.mockImplementationOnce(() => Promise.resolve(true)); const stat = { isDirectory: jest.fn().mockReturnValue(true), @@ -116,6 +122,7 @@ describe('verify-plugin', () => { readJsonMock.mockReturnValueOnce(packageJson); // stat amplify-plugin.json + // eslint-disable-next-line @typescript-eslint/no-misused-promises fsMock.pathExists.mockImplementationOnce(() => Promise.resolve(true)); const statManifest = { isFile: jest.fn().mockReturnValue(false), @@ -129,6 +136,7 @@ describe('verify-plugin', () => { it('returns InvalidManifest error when amplify-plugin.json is not json file.', async () => { // stat package.json + // eslint-disable-next-line @typescript-eslint/no-misused-promises fsMock.pathExists.mockImplementationOnce(() => Promise.resolve(true)); const stat = { isDirectory: jest.fn().mockReturnValue(true), @@ -141,6 +149,7 @@ describe('verify-plugin', () => { readJsonMock.mockReturnValueOnce(packageJson); // stat amplify-plugin.json + // eslint-disable-next-line @typescript-eslint/no-misused-promises fsMock.pathExists.mockImplementationOnce(() => Promise.resolve(true)); const statManifest = { isFile: jest.fn().mockReturnValue(true), @@ -160,6 +169,7 @@ describe('verify-plugin', () => { it('returns InvalidManifest error when plugin name is invalid', async () => { // stat package.json + // eslint-disable-next-line @typescript-eslint/no-misused-promises fsMock.pathExists.mockImplementationOnce(() => Promise.resolve(true)); const stat = { isDirectory: jest.fn().mockReturnValue(true), @@ -172,6 +182,7 @@ describe('verify-plugin', () => { readJsonMock.mockReturnValueOnce(packageJson); // stat amplify-plugin.json + // eslint-disable-next-line @typescript-eslint/no-misused-promises fsMock.pathExists.mockImplementationOnce(() => Promise.resolve(true)); const statManifest = { isFile: jest.fn().mockReturnValue(true), @@ -199,6 +210,7 @@ describe('verify-plugin', () => { it('returns MissingHandleAmplifyEventMethod error when plugin has invalid handle methods', async () => { // stat package.json + // eslint-disable-next-line @typescript-eslint/no-misused-promises fsMock.pathExists.mockImplementationOnce(() => Promise.resolve(true)); const stat = { isDirectory: jest.fn().mockReturnValue(true), @@ -211,6 +223,7 @@ describe('verify-plugin', () => { readJsonMock.mockReturnValueOnce(packageJson); // stat amplify-plugin.json + // eslint-disable-next-line @typescript-eslint/no-misused-promises fsMock.pathExists.mockImplementationOnce(() => Promise.resolve(true)); const statManifest = { isFile: jest.fn().mockReturnValue(true), @@ -242,6 +255,7 @@ describe('verify-plugin', () => { it('returns that verified is true when plugin pass all verifications', async () => { // stat package.json + // eslint-disable-next-line @typescript-eslint/no-misused-promises fsMock.pathExists.mockImplementationOnce(() => Promise.resolve(true)); const stat = { isDirectory: jest.fn().mockReturnValue(true), @@ -254,6 +268,7 @@ describe('verify-plugin', () => { readJsonMock.mockReturnValueOnce(packageJson); // stat amplify-plugin.json + // eslint-disable-next-line @typescript-eslint/no-misused-promises fsMock.pathExists.mockImplementationOnce(() => Promise.resolve(true)); const statManifest = { isFile: jest.fn().mockReturnValue(true), @@ -279,6 +294,7 @@ describe('verify-plugin', () => { it('returns that verified is true when plugin has no event handlers', async () => { // stat package.json + // eslint-disable-next-line @typescript-eslint/no-misused-promises fsMock.pathExists.mockImplementationOnce(() => Promise.resolve(true)); const stat = { isDirectory: jest.fn().mockReturnValue(true), @@ -291,6 +307,7 @@ describe('verify-plugin', () => { readJsonMock.mockReturnValueOnce(packageJson); // stat amplify-plugin.json + // eslint-disable-next-line @typescript-eslint/no-misused-promises fsMock.pathExists.mockImplementationOnce(() => Promise.resolve(true)); const statManifest = { isFile: jest.fn().mockReturnValue(true), diff --git a/packages/amplify-cli/src/__tests__/usage-data.test.ts b/packages/amplify-cli/src/__tests__/usage-data.test.ts index 885672e911a..c7e0a565ce3 100644 --- a/packages/amplify-cli/src/__tests__/usage-data.test.ts +++ b/packages/amplify-cli/src/__tests__/usage-data.test.ts @@ -1,21 +1,29 @@ -import url from 'url'; import nock from 'nock'; +import url from 'url'; import * as uuid from 'uuid'; +import { AmplifyError, ManuallyTimedCodePath } from '@aws-amplify/amplify-cli-core'; +import { ProjectSettings } from '@aws-amplify/amplify-cli-core/src/types'; +import { printer } from '@aws-amplify/amplify-prompts'; +import { SerializableError } from '../domain/amplify-usageData/SerializableError'; import { UsageData } from '../domain/amplify-usageData/UsageData'; +import { UsageDataPayload } from '../domain/amplify-usageData/UsageDataPayload'; import { getUrl } from '../domain/amplify-usageData/getUsageDataUrl'; -import { AmplifyError } from '@aws-amplify/amplify-cli-core'; import { CLIInput as CommandLineInput } from '../domain/command-input'; -import { ManuallyTimedCodePath } from '@aws-amplify/amplify-cli-core'; -import { UsageDataPayload } from '../domain/amplify-usageData/UsageDataPayload'; -import { SerializableError } from '../domain/amplify-usageData/SerializableError'; -import { ProjectSettings } from '@aws-amplify/amplify-cli-core/src/types'; const baseOriginalUrl = 'https://cli.amplify'; const pathToUrl = '/metrics'; const originalUrl = `${baseOriginalUrl}${pathToUrl}`; +jest.mock('@aws-amplify/amplify-prompts'); + describe('test usageData', () => { + const printerMock = printer as jest.Mocked; + + beforeEach(() => { + printerMock.debug = jest.fn(); + }); + beforeAll(() => { process.env = Object.assign(process.env, { AMPLIFY_CLI_BETA_USAGE_TRACKING_URL: originalUrl }); }); @@ -174,12 +182,11 @@ describe('test usageData', () => { expect((UsageData.Instance as unknown as any).pushNormalizationFactor).toEqual(3); }); - it('errors if starting a duplicate timer', () => { + it('should not error if starting a duplicate timer', () => { const usageData = UsageData.Instance; usageData.startCodePathTimer(ManuallyTimedCodePath.INIT_ENV_CATEGORIES); - expect(() => usageData.startCodePathTimer(ManuallyTimedCodePath.INIT_ENV_CATEGORIES)).toThrowErrorMatchingInlineSnapshot( - '"initEnvCategories already has a running timer"', - ); + expect(() => usageData.startCodePathTimer(ManuallyTimedCodePath.INIT_ENV_CATEGORIES)).not.toThrowError(); + expect(printerMock.debug).toBeCalledWith(`${ManuallyTimedCodePath.INIT_ENV_CATEGORIES} already has a running timer`); }); it('does nothing when stopping a timer that is not running', () => { diff --git a/packages/amplify-cli/src/amplify-exception-handler.ts b/packages/amplify-cli/src/amplify-exception-handler.ts index 7ff118dc00a..04b4c2f096c 100644 --- a/packages/amplify-cli/src/amplify-exception-handler.ts +++ b/packages/amplify-cli/src/amplify-exception-handler.ts @@ -1,3 +1,4 @@ +import { EOL } from 'os'; import { $TSAny, AmplifyException, @@ -123,10 +124,10 @@ const executeSafely = async (functionToExecute: () => Promise | void, erro const printAmplifyException = (amplifyException: AmplifyException): void => { const { message, details, resolution, link, stack } = amplifyException; - - printer.error(message); if (details) { - printer.info(details); + printer.error(message + EOL + details); + } else { + printer.error(message); } printer.blankLine(); if (resolution) { diff --git a/packages/amplify-cli/src/attach-backend.ts b/packages/amplify-cli/src/attach-backend.ts index 7b392358759..405ef20a1cc 100644 --- a/packages/amplify-cli/src/attach-backend.ts +++ b/packages/amplify-cli/src/attach-backend.ts @@ -125,7 +125,7 @@ const backupAmplifyFolder = (): void => { }); } try { - fs.moveSync(amplifyDirPath, backupAmplifyDirPath); + fs.copySync(amplifyDirPath, backupAmplifyDirPath); } catch (e) { if (e.code === 'EPERM') { throw new AmplifyError( diff --git a/packages/amplify-cli/src/commands/configure.ts b/packages/amplify-cli/src/commands/configure.ts index 0342170b8d9..44dcf2683e4 100644 --- a/packages/amplify-cli/src/commands/configure.ts +++ b/packages/amplify-cli/src/commands/configure.ts @@ -1,4 +1,5 @@ import { $TSContext } from '@aws-amplify/amplify-cli-core'; +import { printer } from '@aws-amplify/amplify-prompts'; import { analyzeProject } from '../config-steps/c0-analyzeProject'; import { configFrontendHandler } from '../config-steps/c1-configFrontend'; import { configProviders } from '../config-steps/c2-configProviders'; @@ -7,17 +8,31 @@ import { onFailure } from '../config-steps/c9-onFailure'; import { onSuccess } from '../config-steps/c9-onSuccess'; import { normalizeInputParams } from '../input-params-manager'; import { write } from '../app-config'; +import { DebugConfig } from '../app-config/debug-config'; import { Context } from '../domain/context'; export const run = async (context: Context) => { if (context.parameters.options['usage-data-off']) { write(context, { usageDataConfig: { isUsageTrackingEnabled: false } }); - context.print.success('Usage Data has been turned off'); + printer.success('Usage Data has been turned off'); return; } + if (context.parameters.options['usage-data-on']) { write(context, { usageDataConfig: { isUsageTrackingEnabled: true } }); - context.print.success('Usage Data has been turned on'); + printer.success('Usage Data has been turned on'); + return; + } + + if (context.parameters.options['share-project-config-off']) { + DebugConfig.Instance.setAndWriteShareProject(false); + printer.success('Share Project Config has been turned off'); + return; + } + + if (context.parameters.options['share-project-config-on']) { + DebugConfig.Instance.setAndWriteShareProject(true); + printer.success('Share Project Config has been turned on'); return; } @@ -27,7 +42,7 @@ export const run = async (context: Context) => { const providerPlugin = await import(context.amplify.getProviderPlugins(context).awscloudformation); await providerPlugin.adminLoginFlow(context, appId, envName); } catch (e) { - context.print.error(`Failed to authenticate: ${e.message || 'Unknown error occurred.'}`); + printer.error(`Failed to authenticate: ${e.message || 'Unknown error occurred.'}`); await context.usageData.emitError(e); process.exit(1); } diff --git a/packages/amplify-cli/src/commands/helpers/reporter-apis.ts b/packages/amplify-cli/src/commands/helpers/reporter-apis.ts index 17887cfa1f3..3801c411f83 100644 --- a/packages/amplify-cli/src/commands/helpers/reporter-apis.ts +++ b/packages/amplify-cli/src/commands/helpers/reporter-apis.ts @@ -8,7 +8,7 @@ import fetch from 'node-fetch'; export const getPublicKey = async (): Promise => { let url = 'https://aws-amplify.github.io/amplify-cli/report-public-key.pub'; if (process.env.AMPLIFY_CLI_BETA_PUBLIC_KEY_URL && typeof process.env.AMPLIFY_CLI_BETA_PUBLIC_KEY_URL === 'string') { - url = process.env.AMPLIFY_CLI_BETA_USAGE_TRACKING_URL || url; + url = process.env.AMPLIFY_CLI_BETA_PUBLIC_KEY_URL || url; } const res = await fetch(url); if (!res.ok) { @@ -25,7 +25,7 @@ export const getPublicKey = async (): Promise => { export const reporterEndpoint = (): string => { const prodUrl = 'https://api.cli.amplify.aws/diagnose/report'; if (process.env.AMPLIFY_CLI_BETA_REPORT_URL && typeof process.env.AMPLIFY_CLI_BETA_REPORT_URL === 'string') { - return process.env.AMPLIFY_CLI_BETA_USAGE_TRACKING_URL || prodUrl; + return process.env.AMPLIFY_CLI_BETA_REPORT_URL || prodUrl; } return prodUrl; }; diff --git a/packages/amplify-cli/src/commands/init.ts b/packages/amplify-cli/src/commands/init.ts index 2d2545a1d4d..87db5254692 100644 --- a/packages/amplify-cli/src/commands/init.ts +++ b/packages/amplify-cli/src/commands/init.ts @@ -1,15 +1,16 @@ -import { $TSContext, LocalEnvInfo } from '@aws-amplify/amplify-cli-core'; +import { $TSContext, AmplifyError, LocalEnvInfo, stateManager } from '@aws-amplify/amplify-cli-core'; import { constructInputParams } from '../amplify-service-helper'; import { Context } from '../domain/context'; import { raisePostEnvAddEvent } from '../execution-manager'; import { postInitSetup } from '../init-steps/postInitSetup'; -import { preInitSetup } from '../init-steps/preInitSetup'; +import { getPreInitSetup } from '../init-steps/preInitSetup'; import { analyzeProject, analyzeProjectHeadless } from '../init-steps/s0-analyzeProject'; import { initFrontend } from '../init-steps/s1-initFrontend'; import { initProviders } from '../init-steps/s2-initProviders'; import { scaffoldProjectHeadless } from '../init-steps/s8-scaffoldHeadless'; import { onHeadlessSuccess, onSuccess } from '../init-steps/s9-onSuccess'; import { checkForNestedProject } from './helpers/projectUtils'; +import { getAmplifyAppId } from '../extensions/amplify-helpers/get-amplify-appId'; const constructExeInfo = (context: $TSContext): void => { context.exeInfo = { @@ -18,11 +19,12 @@ const constructExeInfo = (context: $TSContext): void => { }; }; +const recommendGen2 = true; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type const runStrategy = (quickstart: boolean) => quickstart - ? [preInitSetup, analyzeProjectHeadless, scaffoldProjectHeadless, onHeadlessSuccess] - : [preInitSetup, analyzeProject, initFrontend, initProviders, onSuccess, postInitSetup]; + ? [getPreInitSetup(!recommendGen2), analyzeProjectHeadless, scaffoldProjectHeadless, onHeadlessSuccess] + : [getPreInitSetup(recommendGen2), analyzeProject, initFrontend, initProviders, onSuccess, postInitSetup]; /** * entry point for the init command @@ -31,6 +33,23 @@ export const run = async (context: $TSContext): Promise => { constructExeInfo(context); checkForNestedProject(); + // Opt-out mechanism for customers that are using old app backend environments with existing apps intentionally + const { AMPLIFY_SKIP_APP_ID_MISMATCH_CHECK } = process.env; + if (AMPLIFY_SKIP_APP_ID_MISMATCH_CHECK !== 'true') { + // check for appId mismatch + const projectPath = process.cwd(); + if (stateManager.metaFileExists(projectPath)) { + const inputAppId = context.exeInfo?.inputParams?.amplify?.appId; + const appId = getAmplifyAppId(); + if (inputAppId && appId && inputAppId !== appId) { + throw new AmplifyError('InvalidAmplifyAppIdError', { + message: `Amplify appId mismatch.`, + resolution: `You are currently working in the amplify project with Id ${appId}. If this is intentional, you may bypass this protection by setting the environment variable AMPLIFY_SKIP_APP_ID_MISMATCH_CHECK to true.`, + }); + } + } + } + const steps = runStrategy(!!context?.parameters?.options?.quickstart); for (const step of steps) { await step(context); diff --git a/packages/amplify-cli/src/domain/amplify-usageData/SerializableError.ts b/packages/amplify-cli/src/domain/amplify-usageData/SerializableError.ts index 9464011129a..887f411cbfa 100644 --- a/packages/amplify-cli/src/domain/amplify-usageData/SerializableError.ts +++ b/packages/amplify-cli/src/domain/amplify-usageData/SerializableError.ts @@ -55,21 +55,28 @@ const processPaths = (paths: string[]): string[] => { } const longestString = paths.reduce((a, b) => (a.length > b.length ? a : b)); const directoriesToRemove = longestString.split('/'); - const directoriesRemoved = new Set(); - directoriesToRemove.forEach((directory) => { + const directoriesRemoved: Array = []; + for (const directory of directoriesToRemove) { if (directory === '') { - return; + continue; } + let removedInAnyPath = false; for (let i = 0; i < result.length; i++) { if (result[i].startsWith(`/${directory}`) && result[i] !== longestString) { result[i] = result[i].replace(`/${directory}`, ''); - directoriesRemoved.add(directory); + removedInAnyPath = true; } } - }); + if (removedInAnyPath) { + directoriesRemoved.push(directory); + } else { + // if current segment is not in any path this means we removed common prefix from all paths. + break; + } + } return result.map((r) => { - if (r === longestString) { + if (r === longestString && directoriesRemoved.length > 0) { return longestString.replace(path.join(...directoriesRemoved), ''); } return r; diff --git a/packages/amplify-cli/src/domain/amplify-usageData/UsageData.ts b/packages/amplify-cli/src/domain/amplify-usageData/UsageData.ts index b41d64a11dd..ac53cce121f 100644 --- a/packages/amplify-cli/src/domain/amplify-usageData/UsageData.ts +++ b/packages/amplify-cli/src/domain/amplify-usageData/UsageData.ts @@ -1,6 +1,6 @@ /* eslint-disable class-methods-use-this */ import { ICommandInput, IFlowReport } from '@aws-amplify/amplify-cli-shared-interfaces'; -import { prompter } from '@aws-amplify/amplify-prompts'; +import { prompter, printer } from '@aws-amplify/amplify-prompts'; import https from 'https'; import { pick } from 'lodash'; import { UrlWithStringQuery } from 'url'; @@ -117,9 +117,10 @@ export class UsageData implements IUsageData { */ startCodePathTimer(codePath: StartableTimedCodePath): void { if (this.codePathTimers.has(codePath)) { - throw new Error(`${codePath} already has a running timer`); + printer.debug(`${codePath} already has a running timer`); + } else { + this.codePathTimers.set(codePath, Timer.start()); } - this.codePathTimers.set(codePath, Timer.start()); } /** diff --git a/packages/amplify-cli/src/execution-manager.ts b/packages/amplify-cli/src/execution-manager.ts index 208a87670a7..ae844c7e77c 100644 --- a/packages/amplify-cli/src/execution-manager.ts +++ b/packages/amplify-cli/src/execution-manager.ts @@ -1,6 +1,6 @@ import * as fs from 'fs-extra'; import * as path from 'path'; -import { prompter } from '@aws-amplify/amplify-prompts'; +import { printer, prompter } from '@aws-amplify/amplify-prompts'; import { twoStringSetsAreEqual, twoStringSetsAreDisjoint } from './utils/set-ops'; import { Context } from './domain/context'; import { scan, getPluginsWithNameAndCommand, getPluginsWithEventHandler } from './plugin-manager'; @@ -269,6 +269,9 @@ const raisePreExportEvent = async (context: Context): Promise => { }; const raisePreCodegenModelsEvent = async (context: Context): Promise => { + if (shouldSkipCodegenModelsEvents(context, AmplifyEvent.PreCodegenModels)) { + return; + } await raiseEvent(context, { event: AmplifyEvent.PreCodegenModels, data: {} }); }; @@ -309,7 +312,22 @@ const raisePostPullEvent = async (context: Context): Promise => { await raiseEvent(context, { event: AmplifyEvent.PostPull, data: {} }); }; +const shouldSkipCodegenModelsEvents = (context: Context, event: AmplifyEvent): boolean => { + const optionsIndicatingUninitializedModelgen = ['target', 'model-schema']; + const cliOptions = context?.parameters?.options ? new Set(Object.keys(context.parameters.options)) : new Set(); + const skipEvents = optionsIndicatingUninitializedModelgen.every((option) => cliOptions.has(option)); + if (skipEvents) { + printer.info( + `Skipping ${event} lifecycle event, due to presence of ${JSON.stringify(optionsIndicatingUninitializedModelgen)} in context options`, + ); + } + return skipEvents; +}; + const raisePostCodegenModelsEvent = async (context: Context): Promise => { + if (shouldSkipCodegenModelsEvents(context, AmplifyEvent.PostCodegenModels)) { + return; + } await raiseEvent(context, { event: AmplifyEvent.PostCodegenModels, data: {} }); }; diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/docs-manager.ts b/packages/amplify-cli/src/extensions/amplify-helpers/docs-manager.ts index fb1b7e142b5..d118d8b2765 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/docs-manager.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/docs-manager.ts @@ -3,10 +3,10 @@ const ReadMeContent = `# Getting Started with Amplify CLI This directory was generated by [Amplify CLI](https://docs.amplify.aws/cli). Helpful resources: -- Amplify documentation: https://docs.amplify.aws -- Amplify CLI documentation: https://docs.amplify.aws/cli -- More details on this folder & generated files: https://docs.amplify.aws/cli/reference/files -- Join Amplify's community: https://amplify.aws/community/ +- Amplify documentation: https://docs.amplify.aws. +- Amplify CLI documentation: https://docs.amplify.aws/cli. +- More details on this folder & generated files: https://docs.amplify.aws/cli/reference/files. +- Join Amplify's community: https://amplify.aws/community/. `; export function writeReadMeFile(readMeFilePath: string): void { diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/read-json-file.ts b/packages/amplify-cli/src/extensions/amplify-helpers/read-json-file.ts index c8b590623b1..9fdc6db413b 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/read-json-file.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/read-json-file.ts @@ -1,6 +1,7 @@ //TODO Remove this whole function once read-json removed from everywhere import { JSONUtilities, $TSAny } from '@aws-amplify/amplify-cli-core'; +// eslint-disable-next-line @typescript-eslint/no-unused-vars export function readJsonFile(jsonFilePath, encoding = 'utf8', throwOnError = true): $TSAny { return JSONUtilities.readJson(jsonFilePath, { throwIfNotExist: throwOnError, diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/remove-resource.ts b/packages/amplify-cli/src/extensions/amplify-helpers/remove-resource.ts index 975aa895f5b..8d6e29a3a4d 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/remove-resource.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/remove-resource.ts @@ -1,6 +1,7 @@ import { $TSContext, AmplifyError, + AmplifyException, AmplifyFault, exitOnNextTick, pathManager, @@ -9,7 +10,6 @@ import { stateManager, } from '@aws-amplify/amplify-cli-core'; import { printer, prompter } from '@aws-amplify/amplify-prompts'; -import * as inquirer from 'inquirer'; import _ from 'lodash'; import { removeResourceParameters } from './envResourceParams'; import { updateBackendConfigAfterResourceRemove } from './update-backend-config'; @@ -77,7 +77,6 @@ export async function removeResource( if (resourceNameCallback) { await resourceNameCallback(resourceName); } - const resourceDir = pathManager.getResourceDirectoryPath(undefined, category, resourceName); if (options.headless !== true) { @@ -99,6 +98,9 @@ export async function removeResource( try { return await deleteResourceFiles(context, category, resourceName, resourceDir); } catch (err) { + if (err instanceof AmplifyException) { + throw err; + } throw new AmplifyFault( 'ResourceRemoveFault', { message: 'An error occurred when removing the resources from the local directory' }, @@ -113,14 +115,14 @@ const deleteResourceFiles = async (context: $TSContext, category: string, resour const { allResources } = await context.amplify.getResourceStatus(); allResources.forEach((resourceItem) => { if (resourceItem.dependsOn) { - resourceItem.dependsOn.forEach((dependsOnItem) => { + for (const dependsOnItem of resourceItem.dependsOn) { if (dependsOnItem.category === category && dependsOnItem.resourceName === resourceName) { throw new AmplifyError('ResourceRemoveError', { message: 'Resource cannot be removed because it has a dependency on another resource', details: `Dependency: ${resourceItem.service} - ${resourceItem.resourceName}. Remove the dependency first.`, }); } - }); + } } }); } @@ -136,7 +138,9 @@ const deleteResourceFiles = async (context: $TSContext, category: string, resour stateManager.setMeta(undefined, amplifyMeta); // Remove resource directory from backend/ + const stackBuildDir = pathManager.getStackBuildCategoryResourceDirPath('', category, resourceName); context.filesystem.remove(resourceDir); + context.filesystem.remove(stackBuildDir); removeResourceParameters(context, category, resourceName); updateBackendConfigAfterResourceRemove(category, resourceName); diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/service-select-prompt.ts b/packages/amplify-cli/src/extensions/amplify-helpers/service-select-prompt.ts index a2b0027136e..0d942b2dd6f 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/service-select-prompt.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/service-select-prompt.ts @@ -1,4 +1,5 @@ -import { $TSAny, $TSContext, exitOnNextTick, ResourceDoesNotExistError, ServiceSelection } from '@aws-amplify/amplify-cli-core'; +import { $TSAny, $TSContext, AmplifyError, ServiceSelection } from '@aws-amplify/amplify-cli-core'; +import { printer } from '@aws-amplify/amplify-prompts'; import * as inquirer from 'inquirer'; import { getProjectConfig } from './get-project-config'; @@ -58,15 +59,14 @@ async function serviceQuestionWalkthrough( } if (options.length === 0) { - const errMessage = `No services defined by configured providers for category: ${category}`; - context.print.error(errMessage); - await context.usageData.emitError(new ResourceDoesNotExistError(errMessage)); - exitOnNextTick(1); + throw new AmplifyError('ResourceDoesNotExistError', { + message: `No services defined by configured providers for category: ${category}`, + }); } if (options.length === 1) { // No need to ask questions - context.print.info(`Using service: ${options[0].value.service}, provided by: ${options[0].value.providerName}`); + printer.info(`Using service: ${options[0].value.service}, provided by: ${options[0].value.providerName}`); return new Promise((resolve) => { resolve(options[0].value); }); diff --git a/packages/amplify-cli/src/extensions/amplify-helpers/update-amplify-meta.ts b/packages/amplify-cli/src/extensions/amplify-helpers/update-amplify-meta.ts index fd05291a6b2..a5c69375946 100644 --- a/packages/amplify-cli/src/extensions/amplify-helpers/update-amplify-meta.ts +++ b/packages/amplify-cli/src/extensions/amplify-helpers/update-amplify-meta.ts @@ -5,7 +5,6 @@ import { buildTypeKeyMap, ServiceName } from '@aws-amplify/amplify-category-func import { $TSAny, $TSMeta, $TSObject, JSONUtilities, pathManager, ResourceTuple, stateManager } from '@aws-amplify/amplify-cli-core'; import { BuildType } from '@aws-amplify/amplify-function-plugin-interface'; import * as fs from 'fs-extra'; -import glob from 'glob'; import _ from 'lodash'; import * as path from 'path'; import { ensureAmplifyMetaFrontendConfig } from './on-category-outputs-change'; @@ -77,13 +76,13 @@ const moveBackendResourcesToCurrentCloudBackend = (resources: $TSObject[]): void } fs.ensureDirSync(targetDir); + const isLambdaOrCustom = + resource?.service === ServiceName.LambdaFunction || (resource?.service && resource?.service.includes('custom')); // in the case that the resource is being deleted, the sourceDir won't exist if (fs.pathExistsSync(sourceDir)) { - fs.copySync(sourceDir, targetDir); - if (resource?.service === ServiceName.LambdaFunction || (resource?.service && resource?.service.includes('custom'))) { - removeNodeModulesDir(targetDir); - } + const nodeModulesFilterFn = (src: string): boolean => path.basename(src) !== 'node_modules'; + fs.copySync(sourceDir, targetDir, { ...(isLambdaOrCustom ? { filter: nodeModulesFilterFn } : {}) }); } } @@ -109,18 +108,6 @@ const moveBackendResourcesToCurrentCloudBackend = (resources: $TSObject[]): void } }; -const removeNodeModulesDir = (currentCloudBackendDir: string): void => { - const nodeModulesDirs = glob.sync('**/node_modules', { - cwd: currentCloudBackendDir, - absolute: true, - }); - for (const nodeModulesPath of nodeModulesDirs) { - if (fs.existsSync(nodeModulesPath)) { - fs.removeSync(nodeModulesPath); - } - } -}; - /** * Update amplify-meta.json and backend-config.json */ diff --git a/packages/amplify-cli/src/index.ts b/packages/amplify-cli/src/index.ts index 8b1f97e722d..6dfe0674fa0 100644 --- a/packages/amplify-cli/src/index.ts +++ b/packages/amplify-cli/src/index.ts @@ -86,7 +86,7 @@ export const run = async (startTime: number): Promise => { ensureFilePermissions(pathManager.getAWSCredentialsFilePath()); ensureFilePermissions(pathManager.getAWSConfigFilePath()); - let verificationResult = verifyInput(pluginPlatform, input); + let verificationResult = await verifyInput(pluginPlatform, input); // invalid input might be because plugin platform might have been updated, // scan and try again @@ -96,7 +96,7 @@ export const run = async (startTime: number): Promise => { } pluginPlatform = await scan(); input = getCommandLineInput(pluginPlatform); - verificationResult = verifyInput(pluginPlatform, input); + verificationResult = await verifyInput(pluginPlatform, input); } if (!verificationResult.verified) { if (verificationResult.helpCommandAvailable) { @@ -209,14 +209,14 @@ async function sigIntHandler(context: Context): Promise { */ export const execute = async (input: CLIInput): Promise => { let pluginPlatform = await getPluginPlatform(); - let verificationResult = verifyInput(pluginPlatform, input); + let verificationResult = await verifyInput(pluginPlatform, input); if (!verificationResult.verified) { if (verificationResult.message) { printer.warn(verificationResult.message); } pluginPlatform = await scan(); - verificationResult = verifyInput(pluginPlatform, input); + verificationResult = await verifyInput(pluginPlatform, input); } if (!verificationResult.verified) { @@ -257,5 +257,4 @@ export const executeAmplifyCommand = async (context: Context): Promise => } }; -// bump version to 12.1.0 -// +// bump version to 12.14.0 diff --git a/packages/amplify-cli/src/init-steps/preInitSetup.ts b/packages/amplify-cli/src/init-steps/preInitSetup.ts index 1f5eea6654c..80b89aabbe7 100644 --- a/packages/amplify-cli/src/init-steps/preInitSetup.ts +++ b/packages/amplify-cli/src/init-steps/preInitSetup.ts @@ -3,6 +3,19 @@ import { execSync } from 'child_process'; import * as fs from 'fs-extra'; import * as url from 'url'; import { generateLocalEnvInfoFile } from './s9-onSuccess'; +import { printer, prompter } from '@aws-amplify/amplify-prompts'; +import { isNewProject } from './s0-analyzeProject'; + +export const getPreInitSetup = (recommendGen2: boolean) => { + if (recommendGen2) { + return async (context) => { + await gen2Recommendation(context); + await preInitSetup(context); + }; + } else { + return preInitSetup; + } +}; /** * Executes before init @@ -22,6 +35,42 @@ export const preInitSetup = async (context: $TSContext): Promise<$TSContext> => return context; }; +/** + * recommend using Gen 2 or continue with Gen 1. + * ask for why they are using Gen 1 and store the answer in project-config + */ +export const gen2Recommendation = async (context: $TSContext): Promise<$TSContext> => { + if (!isNewProject(context)) { + return context; + } + printer.warn( + 'For new projects, we recommend starting with AWS Amplify Gen 2, our new code-first developer experience. Get started at https://docs.amplify.aws/react/start/quickstart/', + ); + + const continueWithGen1 = await prompter.confirmContinue('Do you want to continue with Amplify Gen 1?'); + + if (!continueWithGen1) { + process.exit(0); + } + + const whyContinueWithGen1 = await prompter.pick( + 'Why would you like to use Amplify Gen 1?', + [ + 'I am a current Gen 1 user', + 'Gen 2 is missing features I need from Gen 1', + 'I find the Gen 1 CLI easier to use', + 'Prefer not to answer', + ], + { initial: 3 }, + ); + + context.exeInfo.projectConfig = { + whyContinueWithGen1, + }; + + return context; +}; + /** * Checks whether a url is a valid remote github repository * diff --git a/packages/amplify-cli/src/init-steps/s0-analyzeProject.ts b/packages/amplify-cli/src/init-steps/s0-analyzeProject.ts index b93d4f59caa..261845048a7 100644 --- a/packages/amplify-cli/src/init-steps/s0-analyzeProject.ts +++ b/packages/amplify-cli/src/init-steps/s0-analyzeProject.ts @@ -99,12 +99,27 @@ export const analyzeProject = async (context: $TSContext): Promise<$TSContext> = } const projectPath = process.cwd(); context.exeInfo.isNewProject = isNewProject(context); + context.exeInfo.forcePush = !!context?.parameters?.options?.forcePush; const projectName = await getProjectName(context); if (context.exeInfo.isNewProject && context.parameters.command !== 'env') { await displayAndSetDefaults(context, projectPath, projectName); } + if ( + !context.exeInfo.isNewProject && + context.parameters.options && + context.parameters.options.yes && + !context.exeInfo.inputParams.amplify?.envName + ) { + throw new AmplifyError('ProjectInitError', { + message: `Amplify project ${stateManager.getAppID()} is already initialized for environment ${stateManager.getCurrentEnvName( + projectPath, + )}`, + resolution: 'To create a new environment run `amplify add env`', + }); + } + const envName = await getEnvName(context); let defaultEditor = getDefaultEditor(); @@ -137,6 +152,7 @@ export const analyzeProject = async (context: $TSContext): Promise<$TSContext> = const setProjectConfig = (context: $TSContext, projectName: string): void => { context.exeInfo.isNewProject = isNewProject(context); context.exeInfo.projectConfig = { + ...context.exeInfo.projectConfig, projectName, version: amplifyCLIConstants.CURRENT_PROJECT_CONFIG_VERSION, }; @@ -310,7 +326,7 @@ const isNewEnv = (envName: string): boolean => { return !allEnvs.includes(envName); }; -const isNewProject = (context: $TSContext): boolean => { +export const isNewProject = (context: $TSContext): boolean => { let newProject = true; const projectPath = process.cwd(); const projectConfigFilePath = context.amplify.pathManager.getProjectConfigFilePath(projectPath); diff --git a/packages/amplify-cli/src/init-steps/s9-onSuccess.ts b/packages/amplify-cli/src/init-steps/s9-onSuccess.ts index a5d49324065..4a88d76d67c 100644 --- a/packages/amplify-cli/src/init-steps/s9-onSuccess.ts +++ b/packages/amplify-cli/src/init-steps/s9-onSuccess.ts @@ -64,7 +64,14 @@ export const onSuccess = async (context: $TSContext): Promise => { } await FeatureFlags.ensureDefaultFeatureFlags(true); - const result = await prompter.yesOrNo('Help improve Amplify CLI by sharing non sensitive configurations on failures', false); + const result = await prompter.yesOrNo('Help improve Amplify CLI by sharing non-sensitive project configurations on failures', false); + printer.info(` + ${ + result + ? 'Thank you for helping us improve Amplify CLI!' + : 'You can always opt-in by running "amplify configure --share-project-config-on"' + }`); + const actualResult = context.exeInfo.inputParams.yes ? undefined : result; DebugConfig.Instance.setAndWriteShareProject(actualResult); } @@ -86,16 +93,7 @@ export const onSuccess = async (context: $TSContext): Promise => { await initializeEnv(context, currentAmplifyMeta); if (!context.parameters.options?.app) { - printWelcomeMessage(context); - } - - const appId = currentAmplifyMeta?.providers?.awscloudformation?.AmplifyAppId; - - if (!appId) { - printer.warn('The maximum number of apps that you can create with Amplify in this region has likely been reached:'); - printer.info('For more information on Amplify Service Quotas, see:'); - printer.info('https://docs.aws.amazon.com/general/latest/gr/amplify.html#service-quotas-amplify'); - printer.blankLine(); + printWelcomeMessage(); } }; @@ -219,20 +217,18 @@ const generateHooksSampleDirectory = (context: $TSContext): void => { stateManager.setSampleHooksDir(projectPath, sampleHookScriptsDirPath); }; -const printWelcomeMessage = (context: $TSContext): void => { - context.print.info(''); - context.print.success('Your project has been successfully initialized and connected to the cloud!'); - context.print.info(''); - context.print.success('Some next steps:'); - context.print.info('"amplify status" will show you what you\'ve added already and if it\'s locally configured or deployed'); - context.print.info('"amplify add " will allow you to add features like user login or a backend API'); - context.print.info('"amplify push" will build all your local backend resources and provision it in the cloud'); - context.print.info('"amplify console" to open the Amplify Console and view your project status'); - context.print.info( - '"amplify publish" will build all your local backend and frontend resources (if you have hosting category added) and provision it in the cloud', - ); - context.print.info(''); - context.print.success('Pro tip:'); - context.print.info('Try "amplify add api" to create a backend API and then "amplify push" to deploy everything'); - context.print.info(''); +const printWelcomeMessage = (): void => { + printer.success('Your project has been successfully initialized and connected to the cloud!'); + printer.info('Some next steps:', 'green'); + printer.info(` +"amplify status" will show you what you've added already and if it's locally configured or deployed +"amplify add " will allow you to add features like user login or a backend API +"amplify push" will build all your local backend resources and provision it in the cloud +"amplify console" to open the Amplify Console and view your project status +"amplify publish" will build all your local backend and frontend resources (if you have hosting category added) and provision it in the cloud +`); + printer.blankLine(); + printer.info('Pro tip:', 'green'); + printer.info('Try "amplify add api" to create a backend API and then "amplify push" to deploy everything'); + printer.blankLine(); }; diff --git a/packages/amplify-cli/src/input-manager.ts b/packages/amplify-cli/src/input-manager.ts index 815484515e0..e1a22519fcc 100644 --- a/packages/amplify-cli/src/input-manager.ts +++ b/packages/amplify-cli/src/input-manager.ts @@ -1,9 +1,10 @@ // normalize command line arguments, allow verb / noun place switch -import { constants, PluginPlatform, pathManager, stateManager, commandsInfo } from '@aws-amplify/amplify-cli-core'; +import { constants, PluginPlatform, pathManager, stateManager, commandsInfo, getPackageManager } from '@aws-amplify/amplify-cli-core'; import { getPluginsWithName, getAllPluginNames } from './plugin-manager'; import { InputVerificationResult } from './domain/input-verification-result'; import { insertAmplifyIgnore } from './extensions/amplify-helpers/git-manager'; import { CLIInput } from './domain/command-input'; +import { EOL } from 'os'; export function getCommandLineInput(pluginPlatform: PluginPlatform): CLIInput { const result = new CLIInput(process.argv); @@ -139,7 +140,7 @@ function normalizeInput(input: CLIInput): CLIInput { return input; } -export function verifyInput(pluginPlatform: PluginPlatform, input: CLIInput): InputVerificationResult { +export async function verifyInput(pluginPlatform: PluginPlatform, input: CLIInput): Promise { const result = new InputVerificationResult(); // Normalize status command options @@ -235,7 +236,12 @@ export function verifyInput(pluginPlatform: PluginPlatform, input: CLIInput): In commandString += ' ' + input.subCommands!.join(' '); } - result.message = `The Amplify CLI can NOT find command: ${commandString}`; + const packageManager = (await getPackageManager())?.packageManager ?? 'npm'; + const executeCommand = packageManager === 'npm' ? 'npx' : `${packageManager} dlx`; + + const amplifyGen2Message = `If you are trying to use Amplify Gen 2, install the @aws-amplify/backend-cli package or execute using the package name directly:${EOL}${executeCommand} @aws-amplify/backend-cli${commandString}`; + + result.message = `The Amplify CLI can NOT find command: ${commandString}${EOL}${EOL}${amplifyGen2Message}`; } } else { result.verified = false; diff --git a/packages/amplify-console-hosting/CHANGELOG.md b/packages/amplify-console-hosting/CHANGELOG.md index 4bd3a19865f..0114babaae8 100644 --- a/packages/amplify-console-hosting/CHANGELOG.md +++ b/packages/amplify-console-hosting/CHANGELOG.md @@ -3,6 +3,231 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.5.35](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-console-hosting@2.5.34...@aws-amplify/amplify-console-hosting@2.5.35) (2025-01-30) + +**Note:** Version bump only for package @aws-amplify/amplify-console-hosting + + + + + +## [2.5.34](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-console-hosting@2.5.33...@aws-amplify/amplify-console-hosting@2.5.34) (2024-08-02) + +**Note:** Version bump only for package @aws-amplify/amplify-console-hosting + + + + + +## [2.5.33](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-console-hosting@2.5.32...@aws-amplify/amplify-console-hosting@2.5.33) (2024-06-27) + +**Note:** Version bump only for package @aws-amplify/amplify-console-hosting + + + + + +## [2.5.32](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-console-hosting@2.5.31...@aws-amplify/amplify-console-hosting@2.5.32) (2024-06-20) + +**Note:** Version bump only for package @aws-amplify/amplify-console-hosting + + + + + +## [2.5.31](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-console-hosting@2.5.30...@aws-amplify/amplify-console-hosting@2.5.31) (2024-06-06) + +**Note:** Version bump only for package @aws-amplify/amplify-console-hosting + + + + + +## [2.5.30](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-console-hosting@2.5.29...@aws-amplify/amplify-console-hosting@2.5.30) (2024-05-24) + +**Note:** Version bump only for package @aws-amplify/amplify-console-hosting + + + + + +## [2.5.29](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-console-hosting@2.5.28...@aws-amplify/amplify-console-hosting@2.5.29) (2024-05-07) + +**Note:** Version bump only for package @aws-amplify/amplify-console-hosting + + + + + +## [2.5.28](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-console-hosting@2.5.27...@aws-amplify/amplify-console-hosting@2.5.28) (2024-04-18) + +**Note:** Version bump only for package @aws-amplify/amplify-console-hosting + + + + + +## [2.5.27](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-console-hosting@2.5.26...@aws-amplify/amplify-console-hosting@2.5.27) (2024-04-15) + +**Note:** Version bump only for package @aws-amplify/amplify-console-hosting + + + + + +## [2.5.26](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-console-hosting@2.5.25...@aws-amplify/amplify-console-hosting@2.5.26) (2024-03-29) + +**Note:** Version bump only for package @aws-amplify/amplify-console-hosting + + + + + +## [2.5.25](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-console-hosting@2.5.24...@aws-amplify/amplify-console-hosting@2.5.25) (2024-03-06) + +**Note:** Version bump only for package @aws-amplify/amplify-console-hosting + + + + + +## [2.5.24](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-console-hosting@2.5.23...@aws-amplify/amplify-console-hosting@2.5.24) (2023-12-11) + +**Note:** Version bump only for package @aws-amplify/amplify-console-hosting + + + + + +## [2.5.23](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-console-hosting@2.5.21...@aws-amplify/amplify-console-hosting@2.5.23) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [2.5.22](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-console-hosting@2.5.21...@aws-amplify/amplify-console-hosting@2.5.22) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-console-hosting + + + + + +## [2.5.21](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-console-hosting@2.5.20...@aws-amplify/amplify-console-hosting@2.5.21) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-console-hosting + + + + + +## [2.5.20](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-console-hosting@2.5.19...@aws-amplify/amplify-console-hosting@2.5.20) (2023-10-12) + +**Note:** Version bump only for package @aws-amplify/amplify-console-hosting + + + + + +## [2.5.19](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-console-hosting@2.5.18...@aws-amplify/amplify-console-hosting@2.5.19) (2023-10-05) + +**Note:** Version bump only for package @aws-amplify/amplify-console-hosting + + + + + +## [2.5.18](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-console-hosting@2.5.17...@aws-amplify/amplify-console-hosting@2.5.18) (2023-10-03) + +**Note:** Version bump only for package @aws-amplify/amplify-console-hosting + + + + + +## [2.5.17](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-console-hosting@2.5.16...@aws-amplify/amplify-console-hosting@2.5.17) (2023-09-22) + +**Note:** Version bump only for package @aws-amplify/amplify-console-hosting + + + + + +## [2.5.16](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-console-hosting@2.5.15...@aws-amplify/amplify-console-hosting@2.5.16) (2023-08-31) + +**Note:** Version bump only for package @aws-amplify/amplify-console-hosting + + + + + +## [2.5.15](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-console-hosting@2.5.14...@aws-amplify/amplify-console-hosting@2.5.15) (2023-08-17) + + +### Bug Fixes + +* **amplify-console-hosting:** add missing proxy support ([#12510](https://github.com/aws-amplify/amplify-cli/issues/12510)) ([40d24f5](https://github.com/aws-amplify/amplify-cli/commit/40d24f5ce268f518e7c2714b9e2a2d51c5e326c3)) + + + + + +## [2.5.14](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-console-hosting@2.5.13...@aws-amplify/amplify-console-hosting@2.5.14) (2023-08-09) + +**Note:** Version bump only for package @aws-amplify/amplify-console-hosting + + + + + +## [2.5.13](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-console-hosting@2.5.12...@aws-amplify/amplify-console-hosting@2.5.13) (2023-07-28) + +**Note:** Version bump only for package @aws-amplify/amplify-console-hosting + + + + + +## [2.5.12](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-console-hosting@2.5.11...@aws-amplify/amplify-console-hosting@2.5.12) (2023-07-27) + +**Note:** Version bump only for package @aws-amplify/amplify-console-hosting + + + + + +## [2.5.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-console-hosting@2.5.10...@aws-amplify/amplify-console-hosting@2.5.11) (2023-07-24) + +**Note:** Version bump only for package @aws-amplify/amplify-console-hosting + + + + + +## [2.5.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-console-hosting@2.5.9...@aws-amplify/amplify-console-hosting@2.5.10) (2023-07-20) + + +### Bug Fixes + +* avoid empty and string rejects ([#12818](https://github.com/aws-amplify/amplify-cli/issues/12818)) ([911faa7](https://github.com/aws-amplify/amplify-cli/commit/911faa767db594c516d1c3b65ee4369ad207f4f4)) + + + + + +## [2.5.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-console-hosting@2.5.8...@aws-amplify/amplify-console-hosting@2.5.9) (2023-06-13) + +**Note:** Version bump only for package @aws-amplify/amplify-console-hosting + + + + + ## [2.5.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-console-hosting@2.5.6...@aws-amplify/amplify-console-hosting@2.5.8) (2023-05-25) diff --git a/packages/amplify-console-hosting/package.json b/packages/amplify-console-hosting/package.json index bd56585efae..3319fc6ac1c 100644 --- a/packages/amplify-console-hosting/package.json +++ b/packages/amplify-console-hosting/package.json @@ -1,14 +1,14 @@ { "name": "@aws-amplify/amplify-console-hosting", - "version": "2.5.8", + "version": "2.5.35", "description": "cli plugin for AWS Amplify Console hosting", "main": "lib/index.js", "types": "lib/index.d.ts", "author": "Amazon Web Services", "license": "Apache-2.0", "dependencies": { - "@aws-amplify/amplify-cli-core": "4.0.8", - "@aws-amplify/amplify-environment-parameters": "1.6.3", + "@aws-amplify/amplify-cli-core": "4.3.11", + "@aws-amplify/amplify-environment-parameters": "1.9.16", "archiver": "^5.3.0", "chalk": "^4.1.1", "cli-table3": "^0.6.0", @@ -17,7 +17,8 @@ "glob": "^7.2.0", "inquirer": "^7.3.3", "node-fetch": "^2.6.7", - "ora": "^4.0.3" + "ora": "^4.0.3", + "proxy-agent": "^6.3.0" }, "publishConfig": { "access": "public" diff --git a/packages/amplify-console-hosting/src/utils/amplify-console-utils.js b/packages/amplify-console-hosting/src/utils/amplify-console-utils.js index f0cef4e40a9..93dd998d3b2 100644 --- a/packages/amplify-console-hosting/src/utils/amplify-console-utils.js +++ b/packages/amplify-console-hosting/src/utils/amplify-console-utils.js @@ -1,6 +1,7 @@ -const fetch = require('node-fetch'); -const fs = require('fs-extra'); const { spinner } = require('@aws-amplify/amplify-cli-core'); +const fs = require('fs-extra'); +const fetch = require('node-fetch'); +const { ProxyAgent } = require('proxy-agent'); const DEPLOY_ARTIFACTS_MESSAGE = 'Deploying build artifacts to the Amplify Console..'; const DEPLOY_COMPLETE_MESSAGE = 'Deployment complete!'; @@ -55,7 +56,7 @@ function waitJobToSucceed(job, amplifyClient) { return new Promise(async (resolve, reject) => { const timeout = setTimeout(() => { console.log('Job Timeout before succeeded'); - reject(); + reject(new Error('Job Timeout before succeeded')); }, 1000 * 60 * 10); let processing = true; try { @@ -84,9 +85,13 @@ function waitJobToSucceed(job, amplifyClient) { } async function httpPutFile(filePath, url) { + // HTTP_PROXY & HTTPS_PROXY env vars are read automatically by ProxyAgent, but we check to see if they are set before using the proxy + const proxy = process.env.HTTP_PROXY || process.env.HTTPS_PROXY; + const proxyOption = proxy ? { agent: new ProxyAgent() } : {}; await fetch(url, { method: 'PUT', body: fs.readFileSync(filePath), + ...proxyOption, }); } diff --git a/packages/amplify-console-hosting/src/utils/build-utils.js b/packages/amplify-console-hosting/src/utils/build-utils.js index fab45b6404e..131852a7aaf 100644 --- a/packages/amplify-console-hosting/src/utils/build-utils.js +++ b/packages/amplify-console-hosting/src/utils/build-utils.js @@ -9,7 +9,7 @@ const DIR_NOT_FOUND_ERROR_MESSAGE = 'Please ensure your build artifacts path exi function zipFile(sourceDir, destFilePath, extraFiles) { return new Promise((resolve, reject) => { if (!fs.pathExistsSync(sourceDir)) { - reject(DIR_NOT_FOUND_ERROR_MESSAGE); + reject(new Error(DIR_NOT_FOUND_ERROR_MESSAGE)); } const zipFilePath = destFilePath; const output = fs.createWriteStream(zipFilePath); diff --git a/packages/amplify-console-integration-tests/CHANGELOG.md b/packages/amplify-console-integration-tests/CHANGELOG.md index 049e0dc6533..9a66fbae562 100644 --- a/packages/amplify-console-integration-tests/CHANGELOG.md +++ b/packages/amplify-console-integration-tests/CHANGELOG.md @@ -3,6 +3,267 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.11.19](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.11.18...@aws-amplify/amplify-console-integration-tests@2.11.19) (2025-01-30) + +**Note:** Version bump only for package @aws-amplify/amplify-console-integration-tests + + + + + +## [2.11.18](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.11.17...@aws-amplify/amplify-console-integration-tests@2.11.18) (2025-01-02) + +**Note:** Version bump only for package @aws-amplify/amplify-console-integration-tests + + + + + +## [2.11.17](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.11.16...@aws-amplify/amplify-console-integration-tests@2.11.17) (2024-11-18) + +**Note:** Version bump only for package @aws-amplify/amplify-console-integration-tests + + + + + +## [2.11.16](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.11.15...@aws-amplify/amplify-console-integration-tests@2.11.16) (2024-10-05) + +**Note:** Version bump only for package @aws-amplify/amplify-console-integration-tests + + + + + +## [2.11.15](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.11.14...@aws-amplify/amplify-console-integration-tests@2.11.15) (2024-08-02) + +**Note:** Version bump only for package @aws-amplify/amplify-console-integration-tests + + + + + +## [2.11.14](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.11.13...@aws-amplify/amplify-console-integration-tests@2.11.14) (2024-06-27) + +**Note:** Version bump only for package @aws-amplify/amplify-console-integration-tests + + + + + +## [2.11.13](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.11.12...@aws-amplify/amplify-console-integration-tests@2.11.13) (2024-06-20) + +**Note:** Version bump only for package @aws-amplify/amplify-console-integration-tests + + + + + +## [2.11.12](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.11.11...@aws-amplify/amplify-console-integration-tests@2.11.12) (2024-06-06) + +**Note:** Version bump only for package @aws-amplify/amplify-console-integration-tests + + + + + +## [2.11.11](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.11.10...@aws-amplify/amplify-console-integration-tests@2.11.11) (2024-05-24) + +**Note:** Version bump only for package @aws-amplify/amplify-console-integration-tests + + + + + +## [2.11.10](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.11.9...@aws-amplify/amplify-console-integration-tests@2.11.10) (2024-05-07) + +**Note:** Version bump only for package @aws-amplify/amplify-console-integration-tests + + + + + +## [2.11.9](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.11.8...@aws-amplify/amplify-console-integration-tests@2.11.9) (2024-04-18) + +**Note:** Version bump only for package @aws-amplify/amplify-console-integration-tests + + + + + +## [2.11.8](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.11.7...@aws-amplify/amplify-console-integration-tests@2.11.8) (2024-04-15) + +**Note:** Version bump only for package @aws-amplify/amplify-console-integration-tests + + + + + +## [2.11.7](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.11.6...@aws-amplify/amplify-console-integration-tests@2.11.7) (2024-03-29) + +**Note:** Version bump only for package @aws-amplify/amplify-console-integration-tests + + + + + +## [2.11.6](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.11.5...@aws-amplify/amplify-console-integration-tests@2.11.6) (2024-03-06) + +**Note:** Version bump only for package @aws-amplify/amplify-console-integration-tests + + + + + +## [2.11.5](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.11.4...@aws-amplify/amplify-console-integration-tests@2.11.5) (2023-12-11) + +**Note:** Version bump only for package @aws-amplify/amplify-console-integration-tests + + + + + +## [2.11.4](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.11.2...@aws-amplify/amplify-console-integration-tests@2.11.4) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-console-integration-tests/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-console-integration-tests/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [2.11.3](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.11.2...@aws-amplify/amplify-console-integration-tests@2.11.3) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-console-integration-tests + + + + + +## [2.11.2](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.11.1...@aws-amplify/amplify-console-integration-tests@2.11.2) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-console-integration-tests + + + + + +## [2.11.1](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.11.0...@aws-amplify/amplify-console-integration-tests@2.11.1) (2023-10-12) + +**Note:** Version bump only for package @aws-amplify/amplify-console-integration-tests + + + + + +# [2.11.0](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.10.3...@aws-amplify/amplify-console-integration-tests@2.11.0) (2023-10-05) + + +### Features + +* **amplify-util-uibuilder:** amplify js backwards compatibility ([#13288](https://github.com/aws-amplify/amplify-console-integration-tests/issues/13288)) ([2db3e18](https://github.com/aws-amplify/amplify-console-integration-tests/commit/2db3e181cf06954085eb8fade0b26162672327db)) + + + + + +## [2.10.3](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.10.2...@aws-amplify/amplify-console-integration-tests@2.10.3) (2023-10-03) + +**Note:** Version bump only for package @aws-amplify/amplify-console-integration-tests + + + + + +## [2.10.2](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.10.1...@aws-amplify/amplify-console-integration-tests@2.10.2) (2023-09-22) + +**Note:** Version bump only for package @aws-amplify/amplify-console-integration-tests + + + + + +## [2.10.1](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.10.0...@aws-amplify/amplify-console-integration-tests@2.10.1) (2023-08-31) + +**Note:** Version bump only for package @aws-amplify/amplify-console-integration-tests + + + + + +# [2.10.0](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.9.4...@aws-amplify/amplify-console-integration-tests@2.10.0) (2023-08-17) + + +### Features + +* generate components using graphql ([1568581](https://github.com/aws-amplify/amplify-console-integration-tests/commit/15685810460881aa71e88724398b9be05ba53781)) + + + + + +## [2.9.4](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.9.3...@aws-amplify/amplify-console-integration-tests@2.9.4) (2023-08-09) + +**Note:** Version bump only for package @aws-amplify/amplify-console-integration-tests + + + + + +## [2.9.3](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.9.2...@aws-amplify/amplify-console-integration-tests@2.9.3) (2023-07-28) + +**Note:** Version bump only for package @aws-amplify/amplify-console-integration-tests + + + + + +## [2.9.2](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.9.1...@aws-amplify/amplify-console-integration-tests@2.9.2) (2023-07-27) + +**Note:** Version bump only for package @aws-amplify/amplify-console-integration-tests + + + + + +## [2.9.1](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.9.0...@aws-amplify/amplify-console-integration-tests@2.9.1) (2023-07-24) + +**Note:** Version bump only for package @aws-amplify/amplify-console-integration-tests + + + + + +# [2.9.0](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.8.4...@aws-amplify/amplify-console-integration-tests@2.9.0) (2023-07-20) + + +### Bug Fixes + +* ensure AWS_REGION matches CLI_REGION in all tests ([#12837](https://github.com/aws-amplify/amplify-console-integration-tests/issues/12837)) ([7be43e4](https://github.com/aws-amplify/amplify-console-integration-tests/commit/7be43e41ded3bf09fd20cd9d9b95467491344cbe)) +* fix yarn path ([#12769](https://github.com/aws-amplify/amplify-console-integration-tests/issues/12769)) ([dca98aa](https://github.com/aws-amplify/amplify-console-integration-tests/commit/dca98aa35e544dce4cf0ac9f340919b87041e65f)) + + +### Features + +* uibuilder codegen service ([#12896](https://github.com/aws-amplify/amplify-console-integration-tests/issues/12896)) ([3fe2f98](https://github.com/aws-amplify/amplify-console-integration-tests/commit/3fe2f98a99a9daf22efccb23a031882ea2be899b)) + + + + + +## [2.8.4](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.8.3...@aws-amplify/amplify-console-integration-tests@2.8.4) (2023-06-13) + + +### Bug Fixes + +* console integration tests ([#12748](https://github.com/aws-amplify/amplify-console-integration-tests/issues/12748)) ([e177b13](https://github.com/aws-amplify/amplify-console-integration-tests/commit/e177b1396aac2509176fea1d7fe77f5f97db0720)) + + + + + ## [2.8.3](https://github.com/aws-amplify/amplify-console-integration-tests/compare/@aws-amplify/amplify-console-integration-tests@2.8.1...@aws-amplify/amplify-console-integration-tests@2.8.3) (2023-05-25) diff --git a/packages/amplify-console-integration-tests/__tests__/consoleHosting.test.ts b/packages/amplify-console-integration-tests/__tests__/consoleHosting.test.ts index 41c44aba031..dbf63d99706 100644 --- a/packages/amplify-console-integration-tests/__tests__/consoleHosting.test.ts +++ b/packages/amplify-console-integration-tests/__tests__/consoleHosting.test.ts @@ -42,18 +42,14 @@ describe('amplify console add hosting', () => { // Manual tests it('add / publish / configure/ serve /remove hosting for manual deployment should succeed', async () => { - try { - await addManualHosting(projRoot); - expect(fs.existsSync(path.join(projRoot, 'amplify', 'backend', 'hosting', 'amplifyhosting'))).toBe(true); - const type = loadTypeFromTeamProviderInfo(projRoot, ORIGINAL_ENV); - expect(type).toBe(TYPE_MANUAL); - npmInstall(projRoot); - await amplifyPublish(projRoot); - await removeHosting(projRoot); - await amplifyPush(projRoot); - } catch (err) { - throw err; - } + await addManualHosting(projRoot); + expect(fs.existsSync(path.join(projRoot, 'amplify', 'backend', 'hosting', 'amplifyhosting'))).toBe(true); + const type = loadTypeFromTeamProviderInfo(projRoot, ORIGINAL_ENV); + expect(type).toBe(TYPE_MANUAL); + npmInstall(projRoot); + await amplifyPublish(projRoot); + await removeHosting(projRoot); + await amplifyPush(projRoot); }); it('when hosting is enabled, add new env should be able to deploy frontend successfully', async () => { diff --git a/packages/amplify-console-integration-tests/__tests__/pullAndInit.test.ts b/packages/amplify-console-integration-tests/__tests__/pullAndInit.test.ts index d6caa59b7b8..f0ed8c8c026 100644 --- a/packages/amplify-console-integration-tests/__tests__/pullAndInit.test.ts +++ b/packages/amplify-console-integration-tests/__tests__/pullAndInit.test.ts @@ -134,7 +134,7 @@ describe('amplify console build', () => { const originalProjectDirPath = await util.createNewProjectDir('console-original'); await headlessInit(originalProjectDirPath, amplifyParam, providersParam, codegenParam); expect(checkAmplifyFolderStructure(originalProjectDirPath)).toBeTruthy(); - let originalTeamProviderInfo = getTeamProviderInfo(originalProjectDirPath); + const originalTeamProviderInfo = getTeamProviderInfo(originalProjectDirPath); expect(originalTeamProviderInfo).toBeDefined(); expect(originalTeamProviderInfo['devteama']).toBeDefined(); @@ -153,7 +153,7 @@ describe('amplify console build', () => { }; await headlessInit(clonedProjectDirPath, amplifyParam, providersParam, codegenParam); expect(checkAmplifyFolderStructure(clonedProjectDirPath)).toBeTruthy(); - let clonedTeamProviderInfo = getTeamProviderInfo(clonedProjectDirPath); + const clonedTeamProviderInfo = getTeamProviderInfo(clonedProjectDirPath); expect(clonedTeamProviderInfo).toBeDefined(); expect(clonedTeamProviderInfo['devteamb']).toBeDefined(); @@ -246,7 +246,7 @@ describe('amplify app console tests', () => { expect(authTeamInfo).not.toHaveProperty('hostedUIProviderCreds'); // with frontend - const frontendConfig = deleteAmplifyDir(projRoot); + deleteAmplifyDir(projRoot); await headlessPull( projRoot, { envName, appId }, diff --git a/packages/amplify-console-integration-tests/package.json b/packages/amplify-console-integration-tests/package.json index 2c18f7222b2..de31660fb2e 100644 --- a/packages/amplify-console-integration-tests/package.json +++ b/packages/amplify-console-integration-tests/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-console-integration-tests", - "version": "2.8.3", + "version": "2.11.19", "description": "", "repository": { "type": "git", @@ -21,10 +21,10 @@ "setup-profile": "ts-node ./src/setup-profile.ts" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.0.8", - "@aws-amplify/amplify-e2e-core": "5.0.3", + "@aws-amplify/amplify-cli-core": "4.3.11", + "@aws-amplify/amplify-e2e-core": "5.7.1", "@types/ini": "^1.3.30", - "aws-sdk": "^2.1354.0", + "aws-sdk": "^2.1464.0", "dotenv": "^8.2.0", "execa": "^5.1.1", "fs-extra": "^8.1.0", diff --git a/packages/amplify-console-integration-tests/src/setup-tests.ts b/packages/amplify-console-integration-tests/src/setup-tests.ts index 40c28754c89..234192392e6 100644 --- a/packages/amplify-console-integration-tests/src/setup-tests.ts +++ b/packages/amplify-console-integration-tests/src/setup-tests.ts @@ -9,3 +9,13 @@ removeYarnPaths(); const JEST_TIMEOUT = 1000 * 60 * 60; // 1 hour jest.setTimeout(JEST_TIMEOUT); + +beforeEach(async () => { + if (process.env.CLI_REGION) { + console.log(`CLI_REGION set to: ${process.env.CLI_REGION}. Overwriting AWS_REGION and AWS_DEFAULT_REGION`); + process.env.AWS_REGION = process.env.CLI_REGION; + process.env.AWS_DEFAULT_REGION = process.env.CLI_REGION; + } else { + console.log('No CLI_REGION variable found'); + } +}); diff --git a/packages/amplify-container-hosting/CHANGELOG.md b/packages/amplify-container-hosting/CHANGELOG.md index cccae56b8e6..4e76f4b95bb 100644 --- a/packages/amplify-container-hosting/CHANGELOG.md +++ b/packages/amplify-container-hosting/CHANGELOG.md @@ -3,6 +3,272 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.8.15](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.8.14...@aws-amplify/amplify-container-hosting@2.8.15) (2025-01-30) + +**Note:** Version bump only for package @aws-amplify/amplify-container-hosting + + + + + +## [2.8.14](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.8.13...@aws-amplify/amplify-container-hosting@2.8.14) (2025-01-16) + + +### Reverts + +* Revert "chore: cateogry-api + codegen version bump (#14048)" (#14049) ([5a0cdbf](https://github.com/aws-amplify/amplify-cli/commit/5a0cdbfa46856da320323923a4336d6ba60d82b9)), closes [#14048](https://github.com/aws-amplify/amplify-cli/issues/14048) [#14049](https://github.com/aws-amplify/amplify-cli/issues/14049) + + + + + +## [2.8.13](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.8.12...@aws-amplify/amplify-container-hosting@2.8.13) (2024-11-18) + +**Note:** Version bump only for package @aws-amplify/amplify-container-hosting + + + + + +## [2.8.12](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.8.11...@aws-amplify/amplify-container-hosting@2.8.12) (2024-08-06) + + +### Bug Fixes + +* update awaiter s3 key ([#13872](https://github.com/aws-amplify/amplify-cli/issues/13872)) ([dacfab7](https://github.com/aws-amplify/amplify-cli/commit/dacfab73fcc53586b873f99e149d44c390b2d76f)) + + + + + +## [2.8.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.8.10...@aws-amplify/amplify-container-hosting@2.8.11) (2024-08-02) + +**Note:** Version bump only for package @aws-amplify/amplify-container-hosting + + + + + +## [2.8.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.8.9...@aws-amplify/amplify-container-hosting@2.8.10) (2024-06-27) + +**Note:** Version bump only for package @aws-amplify/amplify-container-hosting + + + + + +## [2.8.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.8.8...@aws-amplify/amplify-container-hosting@2.8.9) (2024-06-20) + +**Note:** Version bump only for package @aws-amplify/amplify-container-hosting + + + + + +## [2.8.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.8.7...@aws-amplify/amplify-container-hosting@2.8.8) (2024-06-06) + +**Note:** Version bump only for package @aws-amplify/amplify-container-hosting + + + + + +## [2.8.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.8.6...@aws-amplify/amplify-container-hosting@2.8.7) (2024-05-24) + +**Note:** Version bump only for package @aws-amplify/amplify-container-hosting + + + + + +## [2.8.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.8.5...@aws-amplify/amplify-container-hosting@2.8.6) (2024-05-07) + +**Note:** Version bump only for package @aws-amplify/amplify-container-hosting + + + + + +## [2.8.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.8.4...@aws-amplify/amplify-container-hosting@2.8.5) (2024-04-18) + +**Note:** Version bump only for package @aws-amplify/amplify-container-hosting + + + + + +## [2.8.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.8.3...@aws-amplify/amplify-container-hosting@2.8.4) (2024-04-15) + +**Note:** Version bump only for package @aws-amplify/amplify-container-hosting + + + + + +## [2.8.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.8.2...@aws-amplify/amplify-container-hosting@2.8.3) (2024-03-29) + +**Note:** Version bump only for package @aws-amplify/amplify-container-hosting + + + + + +## [2.8.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.8.1...@aws-amplify/amplify-container-hosting@2.8.2) (2024-03-06) + +**Note:** Version bump only for package @aws-amplify/amplify-container-hosting + + + + + +## [2.8.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.8.0...@aws-amplify/amplify-container-hosting@2.8.1) (2023-12-16) + +**Note:** Version bump only for package @aws-amplify/amplify-container-hosting + + + + + +# [2.8.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.7.6...@aws-amplify/amplify-container-hosting@2.8.0) (2023-12-11) + + +### Features + +* bump data dependencies to launch RDS feature ([#13409](https://github.com/aws-amplify/amplify-cli/issues/13409)) ([7fbf29f](https://github.com/aws-amplify/amplify-cli/commit/7fbf29f56eb7335d20de0b5526fbed7795a2af09)) + + + + + +## [2.7.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.7.4...@aws-amplify/amplify-container-hosting@2.7.6) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [2.7.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.7.4...@aws-amplify/amplify-container-hosting@2.7.5) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-container-hosting + + + + + +## [2.7.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.7.3...@aws-amplify/amplify-container-hosting@2.7.4) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-container-hosting + + + + + +## [2.7.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.7.2...@aws-amplify/amplify-container-hosting@2.7.3) (2023-10-12) + +**Note:** Version bump only for package @aws-amplify/amplify-container-hosting + + + + + +## [2.7.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.7.1...@aws-amplify/amplify-container-hosting@2.7.2) (2023-10-05) + +**Note:** Version bump only for package @aws-amplify/amplify-container-hosting + + + + + +## [2.7.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.7.0...@aws-amplify/amplify-container-hosting@2.7.1) (2023-10-03) + + +### Bug Fixes + +* update api category and codegen to capture high-priority bug-fixes ([3836b90](https://github.com/aws-amplify/amplify-cli/commit/3836b90b3f9ccd654d9c1b61a4b83c9c4712290c)) + + + + + +# [2.7.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.6.16...@aws-amplify/amplify-container-hosting@2.7.0) (2023-09-22) + + +### Features + +* support codegen and modelgen commands in non-amplify directories ([#13245](https://github.com/aws-amplify/amplify-cli/issues/13245)) ([85dd5cb](https://github.com/aws-amplify/amplify-cli/commit/85dd5cb6b33d8df41e35c2cbcf3b3b0e390b1af0)) + + + + + +## [2.6.16](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.6.15...@aws-amplify/amplify-container-hosting@2.6.16) (2023-08-31) + +**Note:** Version bump only for package @aws-amplify/amplify-container-hosting + + + + + +## [2.6.15](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.6.14...@aws-amplify/amplify-container-hosting@2.6.15) (2023-08-17) + +**Note:** Version bump only for package @aws-amplify/amplify-container-hosting + + + + + +## [2.6.14](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.6.13...@aws-amplify/amplify-container-hosting@2.6.14) (2023-08-09) + +**Note:** Version bump only for package @aws-amplify/amplify-container-hosting + + + + + +## [2.6.13](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.6.12...@aws-amplify/amplify-container-hosting@2.6.13) (2023-07-28) + +**Note:** Version bump only for package @aws-amplify/amplify-container-hosting + + + + + +## [2.6.12](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.6.11...@aws-amplify/amplify-container-hosting@2.6.12) (2023-07-27) + +**Note:** Version bump only for package @aws-amplify/amplify-container-hosting + + + + + +## [2.6.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.6.10...@aws-amplify/amplify-container-hosting@2.6.11) (2023-07-24) + +**Note:** Version bump only for package @aws-amplify/amplify-container-hosting + + + + + +## [2.6.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.6.9...@aws-amplify/amplify-container-hosting@2.6.10) (2023-07-20) + +**Note:** Version bump only for package @aws-amplify/amplify-container-hosting + + + + + +## [2.6.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.6.8...@aws-amplify/amplify-container-hosting@2.6.9) (2023-06-13) + +**Note:** Version bump only for package @aws-amplify/amplify-container-hosting + + + + + ## [2.6.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-container-hosting@2.6.6...@aws-amplify/amplify-container-hosting@2.6.8) (2023-05-25) diff --git a/packages/amplify-container-hosting/package.json b/packages/amplify-container-hosting/package.json index 5978cc0afa5..da2475dc858 100644 --- a/packages/amplify-container-hosting/package.json +++ b/packages/amplify-container-hosting/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-container-hosting", - "version": "2.6.8", + "version": "2.8.15", "description": "amplify-cli hosting plugin for containers", "repository": { "type": "git", @@ -26,9 +26,9 @@ "extract-api": "ts-node ../../scripts/extract-api.ts" }, "dependencies": { - "@aws-amplify/amplify-category-api": "^5.4.1", - "@aws-amplify/amplify-cli-core": "4.0.8", - "@aws-amplify/amplify-environment-parameters": "1.6.3", + "@aws-amplify/amplify-category-api": "^5.12.10", + "@aws-amplify/amplify-cli-core": "4.3.11", + "@aws-amplify/amplify-environment-parameters": "1.9.16", "fs-extra": "^8.1.0", "inquirer": "^7.3.3", "mime-types": "^2.1.26", diff --git a/packages/amplify-dotnet-function-runtime-provider/CHANGELOG.md b/packages/amplify-dotnet-function-runtime-provider/CHANGELOG.md index 3c47f4652a4..88e2a1ac9bb 100644 --- a/packages/amplify-dotnet-function-runtime-provider/CHANGELOG.md +++ b/packages/amplify-dotnet-function-runtime-provider/CHANGELOG.md @@ -3,6 +3,236 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.1.1](https://github.com/aws-amplify/amplify-cli/compare/amplify-dotnet-function-runtime-provider@2.1.0...amplify-dotnet-function-runtime-provider@2.1.1) (2025-01-30) + +**Note:** Version bump only for package amplify-dotnet-function-runtime-provider + + + + + +# [2.1.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-dotnet-function-runtime-provider@2.0.29...amplify-dotnet-function-runtime-provider@2.1.0) (2025-01-02) + + +### Features + +* lambda dotnet 8 support ([#14026](https://github.com/aws-amplify/amplify-cli/issues/14026)) ([540bfe1](https://github.com/aws-amplify/amplify-cli/commit/540bfe1187907609c3c813e1208c12b6a2a6ac6c)) + + + + + +## [2.0.29](https://github.com/aws-amplify/amplify-cli/compare/amplify-dotnet-function-runtime-provider@2.0.28...amplify-dotnet-function-runtime-provider@2.0.29) (2024-08-02) + +**Note:** Version bump only for package amplify-dotnet-function-runtime-provider + + + + + +## [2.0.28](https://github.com/aws-amplify/amplify-cli/compare/amplify-dotnet-function-runtime-provider@2.0.27...amplify-dotnet-function-runtime-provider@2.0.28) (2024-06-27) + +**Note:** Version bump only for package amplify-dotnet-function-runtime-provider + + + + + +## [2.0.27](https://github.com/aws-amplify/amplify-cli/compare/amplify-dotnet-function-runtime-provider@2.0.26...amplify-dotnet-function-runtime-provider@2.0.27) (2024-06-20) + +**Note:** Version bump only for package amplify-dotnet-function-runtime-provider + + + + + +## [2.0.26](https://github.com/aws-amplify/amplify-cli/compare/amplify-dotnet-function-runtime-provider@2.0.25...amplify-dotnet-function-runtime-provider@2.0.26) (2024-06-06) + +**Note:** Version bump only for package amplify-dotnet-function-runtime-provider + + + + + +## [2.0.25](https://github.com/aws-amplify/amplify-cli/compare/amplify-dotnet-function-runtime-provider@2.0.24...amplify-dotnet-function-runtime-provider@2.0.25) (2024-05-24) + +**Note:** Version bump only for package amplify-dotnet-function-runtime-provider + + + + + +## [2.0.24](https://github.com/aws-amplify/amplify-cli/compare/amplify-dotnet-function-runtime-provider@2.0.23...amplify-dotnet-function-runtime-provider@2.0.24) (2024-05-07) + +**Note:** Version bump only for package amplify-dotnet-function-runtime-provider + + + + + +## [2.0.23](https://github.com/aws-amplify/amplify-cli/compare/amplify-dotnet-function-runtime-provider@2.0.22...amplify-dotnet-function-runtime-provider@2.0.23) (2024-04-18) + +**Note:** Version bump only for package amplify-dotnet-function-runtime-provider + + + + + +## [2.0.22](https://github.com/aws-amplify/amplify-cli/compare/amplify-dotnet-function-runtime-provider@2.0.21...amplify-dotnet-function-runtime-provider@2.0.22) (2024-04-15) + +**Note:** Version bump only for package amplify-dotnet-function-runtime-provider + + + + + +## [2.0.21](https://github.com/aws-amplify/amplify-cli/compare/amplify-dotnet-function-runtime-provider@2.0.20...amplify-dotnet-function-runtime-provider@2.0.21) (2024-03-29) + +**Note:** Version bump only for package amplify-dotnet-function-runtime-provider + + + + + +## [2.0.20](https://github.com/aws-amplify/amplify-cli/compare/amplify-dotnet-function-runtime-provider@2.0.19...amplify-dotnet-function-runtime-provider@2.0.20) (2024-03-06) + +**Note:** Version bump only for package amplify-dotnet-function-runtime-provider + + + + + +## [2.0.19](https://github.com/aws-amplify/amplify-cli/compare/amplify-dotnet-function-runtime-provider@2.0.18...amplify-dotnet-function-runtime-provider@2.0.19) (2023-12-11) + +**Note:** Version bump only for package amplify-dotnet-function-runtime-provider + + + + + +## [2.0.18](https://github.com/aws-amplify/amplify-cli/compare/amplify-dotnet-function-runtime-provider@2.0.16...amplify-dotnet-function-runtime-provider@2.0.18) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [2.0.17](https://github.com/aws-amplify/amplify-cli/compare/amplify-dotnet-function-runtime-provider@2.0.16...amplify-dotnet-function-runtime-provider@2.0.17) (2023-11-08) + +**Note:** Version bump only for package amplify-dotnet-function-runtime-provider + + + + + +## [2.0.16](https://github.com/aws-amplify/amplify-cli/compare/amplify-dotnet-function-runtime-provider@2.0.15...amplify-dotnet-function-runtime-provider@2.0.16) (2023-11-08) + +**Note:** Version bump only for package amplify-dotnet-function-runtime-provider + + + + + +## [2.0.15](https://github.com/aws-amplify/amplify-cli/compare/amplify-dotnet-function-runtime-provider@2.0.14...amplify-dotnet-function-runtime-provider@2.0.15) (2023-10-12) + +**Note:** Version bump only for package amplify-dotnet-function-runtime-provider + + + + + +## [2.0.14](https://github.com/aws-amplify/amplify-cli/compare/amplify-dotnet-function-runtime-provider@2.0.13...amplify-dotnet-function-runtime-provider@2.0.14) (2023-10-05) + +**Note:** Version bump only for package amplify-dotnet-function-runtime-provider + + + + + +## [2.0.13](https://github.com/aws-amplify/amplify-cli/compare/amplify-dotnet-function-runtime-provider@2.0.12...amplify-dotnet-function-runtime-provider@2.0.13) (2023-10-03) + +**Note:** Version bump only for package amplify-dotnet-function-runtime-provider + + + + + +## [2.0.12](https://github.com/aws-amplify/amplify-cli/compare/amplify-dotnet-function-runtime-provider@2.0.11...amplify-dotnet-function-runtime-provider@2.0.12) (2023-09-22) + +**Note:** Version bump only for package amplify-dotnet-function-runtime-provider + + + + + +## [2.0.11](https://github.com/aws-amplify/amplify-cli/compare/amplify-dotnet-function-runtime-provider@2.0.10...amplify-dotnet-function-runtime-provider@2.0.11) (2023-08-31) + +**Note:** Version bump only for package amplify-dotnet-function-runtime-provider + + + + + +## [2.0.10](https://github.com/aws-amplify/amplify-cli/compare/amplify-dotnet-function-runtime-provider@2.0.9...amplify-dotnet-function-runtime-provider@2.0.10) (2023-08-17) + +**Note:** Version bump only for package amplify-dotnet-function-runtime-provider + + + + + +## [2.0.9](https://github.com/aws-amplify/amplify-cli/compare/amplify-dotnet-function-runtime-provider@2.0.8...amplify-dotnet-function-runtime-provider@2.0.9) (2023-08-09) + +**Note:** Version bump only for package amplify-dotnet-function-runtime-provider + + + + + +## [2.0.8](https://github.com/aws-amplify/amplify-cli/compare/amplify-dotnet-function-runtime-provider@2.0.7...amplify-dotnet-function-runtime-provider@2.0.8) (2023-07-28) + +**Note:** Version bump only for package amplify-dotnet-function-runtime-provider + + + + + +## [2.0.7](https://github.com/aws-amplify/amplify-cli/compare/amplify-dotnet-function-runtime-provider@2.0.6...amplify-dotnet-function-runtime-provider@2.0.7) (2023-07-27) + +**Note:** Version bump only for package amplify-dotnet-function-runtime-provider + + + + + +## [2.0.6](https://github.com/aws-amplify/amplify-cli/compare/amplify-dotnet-function-runtime-provider@2.0.5...amplify-dotnet-function-runtime-provider@2.0.6) (2023-07-24) + +**Note:** Version bump only for package amplify-dotnet-function-runtime-provider + + + + + +## [2.0.5](https://github.com/aws-amplify/amplify-cli/compare/amplify-dotnet-function-runtime-provider@2.0.4...amplify-dotnet-function-runtime-provider@2.0.5) (2023-07-20) + +**Note:** Version bump only for package amplify-dotnet-function-runtime-provider + + + + + +## [2.0.4](https://github.com/aws-amplify/amplify-cli/compare/amplify-dotnet-function-runtime-provider@2.0.3...amplify-dotnet-function-runtime-provider@2.0.4) (2023-06-13) + +**Note:** Version bump only for package amplify-dotnet-function-runtime-provider + + + + + ## [2.0.3](https://github.com/aws-amplify/amplify-cli/compare/amplify-dotnet-function-runtime-provider@2.0.1...amplify-dotnet-function-runtime-provider@2.0.3) (2023-05-25) diff --git a/packages/amplify-dotnet-function-runtime-provider/amplify-plugin.json b/packages/amplify-dotnet-function-runtime-provider/amplify-plugin.json index 1995d5169cf..8de54cf6415 100644 --- a/packages/amplify-dotnet-function-runtime-provider/amplify-plugin.json +++ b/packages/amplify-dotnet-function-runtime-provider/amplify-plugin.json @@ -11,8 +11,8 @@ }, "runtimes": [ { - "name": ".NET 6", - "value": "dotnet6" + "name": ".NET 8", + "value": "dotnet8" } ] } diff --git a/packages/amplify-dotnet-function-runtime-provider/package.json b/packages/amplify-dotnet-function-runtime-provider/package.json index b77249a5754..8c0d2675012 100644 --- a/packages/amplify-dotnet-function-runtime-provider/package.json +++ b/packages/amplify-dotnet-function-runtime-provider/package.json @@ -1,6 +1,6 @@ { "name": "amplify-dotnet-function-runtime-provider", - "version": "2.0.3", + "version": "2.1.1", "description": "Provides functionality related to functions in .NET on AWS", "repository": { "type": "git", @@ -22,9 +22,9 @@ "extract-api": "ts-node ../../scripts/extract-api.ts" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.0.8", - "@aws-amplify/amplify-function-plugin-interface": "1.10.2", - "@aws-amplify/amplify-prompts": "2.7.0", + "@aws-amplify/amplify-cli-core": "4.3.11", + "@aws-amplify/amplify-function-plugin-interface": "1.12.1", + "@aws-amplify/amplify-prompts": "2.8.6", "execa": "^5.1.1", "fs-extra": "^8.1.0", "glob": "^7.2.0", diff --git a/packages/amplify-dotnet-function-runtime-provider/src/constants.ts b/packages/amplify-dotnet-function-runtime-provider/src/constants.ts index 5cae3c69ea9..7a382ec25c8 100644 --- a/packages/amplify-dotnet-function-runtime-provider/src/constants.ts +++ b/packages/amplify-dotnet-function-runtime-provider/src/constants.ts @@ -1,4 +1,6 @@ -export const currentSupportedVersion = '6.0'; -export const dotnet6 = 'dotnet6'; +// see https://aws.amazon.com/blogs/compute/introducing-the-net-8-runtime-for-aws-lambda +// https://docs.aws.amazon.com/lambda/latest/dg/lambda-csharp.html +export const currentSupportedVersion = '8.0'; +export const dotnet8 = 'dotnet8'; export const handlerMethodName = 'LambdaHandler'; export const executableName = 'dotnet'; diff --git a/packages/amplify-dotnet-function-runtime-provider/src/index.ts b/packages/amplify-dotnet-function-runtime-provider/src/index.ts index e3079905d6c..40f867b6a06 100644 --- a/packages/amplify-dotnet-function-runtime-provider/src/index.ts +++ b/packages/amplify-dotnet-function-runtime-provider/src/index.ts @@ -1,5 +1,5 @@ import { FunctionRuntimeContributorFactory } from '@aws-amplify/amplify-function-plugin-interface'; -import { dotnet6 } from './constants'; +import { dotnet8 } from './constants'; import { detectDotNet } from './utils/detect'; import { build } from './utils/build'; import { packageAssemblies } from './utils/package'; @@ -10,14 +10,14 @@ export const functionRuntimeContributorFactory: FunctionRuntimeContributorFactor checkDependencies: detectDotNet, contribute: async (contributionRequest) => { switch (contributionRequest.selection) { - case dotnet6: + case dotnet8: return { runtime: { - name: '.NET 6', - value: dotnet6, - cloudTemplateValue: dotnet6, + name: '.NET 8', + value: dotnet8, + cloudTemplateValue: dotnet8, defaultHandler: `${contributionRequest.contributionContext.resourceName}::${contributionRequest.contributionContext.resourceName}.${contributionRequest.contributionContext.functionName}::LambdaHandler`, - layerExecutablePath: dotnet6, + layerExecutablePath: dotnet8, }, }; default: diff --git a/packages/amplify-dotnet-function-runtime-provider/src/utils/detect.ts b/packages/amplify-dotnet-function-runtime-provider/src/utils/detect.ts index ccab26c2f06..2635213cc6d 100644 --- a/packages/amplify-dotnet-function-runtime-provider/src/utils/detect.ts +++ b/packages/amplify-dotnet-function-runtime-provider/src/utils/detect.ts @@ -21,7 +21,7 @@ export const detectDotNet = async (): Promise => { if (sdkResult.exitCode !== 0) { throw new Error(`${executableName} failed SDK detection, exit code was ${sdkResult.exitCode}`); } - const requiredSdkRegex = /^6\.0/m; + const requiredSdkRegex = /^8\.0/m; const sdkInstalled = installedSdks && installedSdks.match(requiredSdkRegex); const toolResult = execa.sync(executableName, ['tool', 'list', '--global']); @@ -37,13 +37,13 @@ export const detectDotNet = async (): Promise => { if (installedToolList.match(/^amazon\.lambda\.tools/m)) { toolInstalled = true; } - const requiredTestToolVersionRegex = /^amazon\.lambda\.testtool-6\.0/m; + const requiredTestToolVersionRegex = /^amazon\.lambda\.testtool-8\.0/m; if (installedToolList.match(requiredTestToolVersionRegex)) { testToolInstalled = true; } } - // Verify that a dotnet 6 SDK and the dotnet Lambda tools is installed locally + // Verify that a dotnet 8 SDK and the dotnet Lambda tools is installed locally if (sdkInstalled && toolInstalled && testToolInstalled) { return { hasRequiredDependencies: true, @@ -54,7 +54,7 @@ export const detectDotNet = async (): Promise => { errorMessage: 'Unable to detect required dependencies:\n', }; if (!sdkInstalled) { - result.errorMessage += '- The .NET 6 SDK must be installed. It can be installed from https://dotnet.microsoft.com/download\n'; + result.errorMessage += '- The .NET 8 SDK must be installed. It can be installed from https://dotnet.microsoft.com/download\n'; } if (!toolInstalled) { result.errorMessage += @@ -62,7 +62,7 @@ export const detectDotNet = async (): Promise => { } if (!testToolInstalled) { result.errorMessage += - '- The Amazon.Lambda.TestTool-6.0 global tool must be installed. Please install by running "dotnet tool install -g Amazon.Lambda.TestTool-6.0".\n'; + '- The Amazon.Lambda.TestTool-8.0 global tool must be installed. Please install by running "dotnet tool install -g Amazon.Lambda.TestTool-8.0".\n'; } return result; } diff --git a/packages/amplify-dotnet-function-runtime-provider/src/utils/invoke.ts b/packages/amplify-dotnet-function-runtime-provider/src/utils/invoke.ts index 2dd3172457e..94fc724df13 100644 --- a/packages/amplify-dotnet-function-runtime-provider/src/utils/invoke.ts +++ b/packages/amplify-dotnet-function-runtime-provider/src/utils/invoke.ts @@ -14,7 +14,7 @@ export const invoke = async (request: InvocationRequest): Promise => { tempDir = fs.mkdtempSync(path.join(request.srcRoot, 'amplify')); eventFile = path.join(tempDir, 'event.json'); fs.writeFileSync(eventFile, request.event); - const lambdaTestTool = 'lambda-test-tool-6.0'; + const lambdaTestTool = 'lambda-test-tool-8.0'; const execPromise = execa( executableName, [lambdaTestTool, '--no-ui', '--function-handler', request.handler, '--payload', eventFile, '--pause-exit', 'false'], diff --git a/packages/amplify-dotnet-function-runtime-provider/src/utils/package.ts b/packages/amplify-dotnet-function-runtime-provider/src/utils/package.ts index 05545c445df..93a49e94087 100644 --- a/packages/amplify-dotnet-function-runtime-provider/src/utils/package.ts +++ b/packages/amplify-dotnet-function-runtime-provider/src/utils/package.ts @@ -14,7 +14,7 @@ export const packageAssemblies = async (request: PackageRequest, context: any): } const packageHash = (await context.amplify.hashDir(distPath, [])) as string; - const framework = 'net6.0'; + const framework = 'net8.0'; try { const result = execa.sync( executableName, diff --git a/packages/amplify-dotnet-function-template-provider/CHANGELOG.md b/packages/amplify-dotnet-function-template-provider/CHANGELOG.md index 269c7c0d794..7ab32426bb8 100644 --- a/packages/amplify-dotnet-function-template-provider/CHANGELOG.md +++ b/packages/amplify-dotnet-function-template-provider/CHANGELOG.md @@ -3,6 +3,242 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.7.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-dotnet-function-template-provider@2.7.0...@aws-amplify/amplify-dotnet-function-template-provider@2.7.1) (2025-01-30) + +**Note:** Version bump only for package @aws-amplify/amplify-dotnet-function-template-provider + + + + + +# [2.7.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-dotnet-function-template-provider@2.6.10...@aws-amplify/amplify-dotnet-function-template-provider@2.7.0) (2025-01-02) + + +### Features + +* lambda dotnet 8 support ([#14026](https://github.com/aws-amplify/amplify-cli/issues/14026)) ([540bfe1](https://github.com/aws-amplify/amplify-cli/commit/540bfe1187907609c3c813e1208c12b6a2a6ac6c)) + + + + + +## [2.6.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-dotnet-function-template-provider@2.6.9...@aws-amplify/amplify-dotnet-function-template-provider@2.6.10) (2024-08-02) + +**Note:** Version bump only for package @aws-amplify/amplify-dotnet-function-template-provider + + + + + +## [2.6.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-dotnet-function-template-provider@2.6.8...@aws-amplify/amplify-dotnet-function-template-provider@2.6.9) (2024-06-27) + +**Note:** Version bump only for package @aws-amplify/amplify-dotnet-function-template-provider + + + + + +## [2.6.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-dotnet-function-template-provider@2.6.7...@aws-amplify/amplify-dotnet-function-template-provider@2.6.8) (2024-06-20) + +**Note:** Version bump only for package @aws-amplify/amplify-dotnet-function-template-provider + + + + + +## [2.6.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-dotnet-function-template-provider@2.6.6...@aws-amplify/amplify-dotnet-function-template-provider@2.6.7) (2024-06-06) + +**Note:** Version bump only for package @aws-amplify/amplify-dotnet-function-template-provider + + + + + +## [2.6.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-dotnet-function-template-provider@2.6.5...@aws-amplify/amplify-dotnet-function-template-provider@2.6.6) (2024-05-24) + +**Note:** Version bump only for package @aws-amplify/amplify-dotnet-function-template-provider + + + + + +## [2.6.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-dotnet-function-template-provider@2.6.4...@aws-amplify/amplify-dotnet-function-template-provider@2.6.5) (2024-05-07) + +**Note:** Version bump only for package @aws-amplify/amplify-dotnet-function-template-provider + + + + + +## [2.6.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-dotnet-function-template-provider@2.6.3...@aws-amplify/amplify-dotnet-function-template-provider@2.6.4) (2024-04-18) + +**Note:** Version bump only for package @aws-amplify/amplify-dotnet-function-template-provider + + + + + +## [2.6.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-dotnet-function-template-provider@2.6.2...@aws-amplify/amplify-dotnet-function-template-provider@2.6.3) (2024-04-15) + +**Note:** Version bump only for package @aws-amplify/amplify-dotnet-function-template-provider + + + + + +## [2.6.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-dotnet-function-template-provider@2.6.1...@aws-amplify/amplify-dotnet-function-template-provider@2.6.2) (2024-03-29) + +**Note:** Version bump only for package @aws-amplify/amplify-dotnet-function-template-provider + + + + + +## [2.6.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-dotnet-function-template-provider@2.6.0...@aws-amplify/amplify-dotnet-function-template-provider@2.6.1) (2024-03-06) + + +### Reverts + +* Revert "chore: bump data package versions (#13486)" (#13487) ([3280d40](https://github.com/aws-amplify/amplify-cli/commit/3280d40a5ab50c675b0e2b8050ad35a69c83cdc2)), closes [#13486](https://github.com/aws-amplify/amplify-cli/issues/13486) [#13487](https://github.com/aws-amplify/amplify-cli/issues/13487) + + + + + +# [2.6.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-dotnet-function-template-provider@2.5.23...@aws-amplify/amplify-dotnet-function-template-provider@2.6.0) (2023-12-11) + + +### Features + +* bump data dependencies to launch RDS feature ([#13409](https://github.com/aws-amplify/amplify-cli/issues/13409)) ([7fbf29f](https://github.com/aws-amplify/amplify-cli/commit/7fbf29f56eb7335d20de0b5526fbed7795a2af09)) + + + + + +## [2.5.23](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-dotnet-function-template-provider@2.5.21...@aws-amplify/amplify-dotnet-function-template-provider@2.5.23) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [2.5.22](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-dotnet-function-template-provider@2.5.21...@aws-amplify/amplify-dotnet-function-template-provider@2.5.22) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-dotnet-function-template-provider + + + + + +## [2.5.21](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-dotnet-function-template-provider@2.5.20...@aws-amplify/amplify-dotnet-function-template-provider@2.5.21) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-dotnet-function-template-provider + + + + + +## [2.5.20](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-dotnet-function-template-provider@2.5.19...@aws-amplify/amplify-dotnet-function-template-provider@2.5.20) (2023-10-12) + +**Note:** Version bump only for package @aws-amplify/amplify-dotnet-function-template-provider + + + + + +## [2.5.19](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-dotnet-function-template-provider@2.5.18...@aws-amplify/amplify-dotnet-function-template-provider@2.5.19) (2023-10-05) + +**Note:** Version bump only for package @aws-amplify/amplify-dotnet-function-template-provider + + + + + +## [2.5.18](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-dotnet-function-template-provider@2.5.17...@aws-amplify/amplify-dotnet-function-template-provider@2.5.18) (2023-10-03) + +**Note:** Version bump only for package @aws-amplify/amplify-dotnet-function-template-provider + + + + + +## [2.5.17](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-dotnet-function-template-provider@2.5.16...@aws-amplify/amplify-dotnet-function-template-provider@2.5.17) (2023-09-22) + +**Note:** Version bump only for package @aws-amplify/amplify-dotnet-function-template-provider + + + + + +## [2.5.16](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-dotnet-function-template-provider@2.5.15...@aws-amplify/amplify-dotnet-function-template-provider@2.5.16) (2023-08-31) + +**Note:** Version bump only for package @aws-amplify/amplify-dotnet-function-template-provider + + + + + +## [2.5.15](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-dotnet-function-template-provider@2.5.14...@aws-amplify/amplify-dotnet-function-template-provider@2.5.15) (2023-08-17) + +**Note:** Version bump only for package @aws-amplify/amplify-dotnet-function-template-provider + + + + + +## [2.5.14](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-dotnet-function-template-provider@2.5.13...@aws-amplify/amplify-dotnet-function-template-provider@2.5.14) (2023-08-09) + +**Note:** Version bump only for package @aws-amplify/amplify-dotnet-function-template-provider + + + + + +## [2.5.13](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-dotnet-function-template-provider@2.5.12...@aws-amplify/amplify-dotnet-function-template-provider@2.5.13) (2023-07-28) + +**Note:** Version bump only for package @aws-amplify/amplify-dotnet-function-template-provider + + + + + +## [2.5.12](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-dotnet-function-template-provider@2.5.11...@aws-amplify/amplify-dotnet-function-template-provider@2.5.12) (2023-07-27) + +**Note:** Version bump only for package @aws-amplify/amplify-dotnet-function-template-provider + + + + + +## [2.5.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-dotnet-function-template-provider@2.5.10...@aws-amplify/amplify-dotnet-function-template-provider@2.5.11) (2023-07-24) + +**Note:** Version bump only for package @aws-amplify/amplify-dotnet-function-template-provider + + + + + +## [2.5.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-dotnet-function-template-provider@2.5.9...@aws-amplify/amplify-dotnet-function-template-provider@2.5.10) (2023-07-20) + +**Note:** Version bump only for package @aws-amplify/amplify-dotnet-function-template-provider + + + + + +## [2.5.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-dotnet-function-template-provider@2.5.8...@aws-amplify/amplify-dotnet-function-template-provider@2.5.9) (2023-06-13) + +**Note:** Version bump only for package @aws-amplify/amplify-dotnet-function-template-provider + + + + + ## [2.5.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-dotnet-function-template-provider@2.5.6...@aws-amplify/amplify-dotnet-function-template-provider@2.5.8) (2023-05-25) diff --git a/packages/amplify-dotnet-function-template-provider/amplify-plugin.json b/packages/amplify-dotnet-function-template-provider/amplify-plugin.json index 8ec143910c2..55520d1281f 100644 --- a/packages/amplify-dotnet-function-template-provider/amplify-plugin.json +++ b/packages/amplify-dotnet-function-template-provider/amplify-plugin.json @@ -7,7 +7,7 @@ "conditions": { "provider": "awscloudformation", "services": ["Lambda"], - "runtime": ["dotnet6"] + "runtime": ["dotnet8"] }, "templates": [ { diff --git a/packages/amplify-dotnet-function-template-provider/package.json b/packages/amplify-dotnet-function-template-provider/package.json index 042a27f9095..cfd53890574 100644 --- a/packages/amplify-dotnet-function-template-provider/package.json +++ b/packages/amplify-dotnet-function-template-provider/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-dotnet-function-template-provider", - "version": "2.5.8", + "version": "2.7.1", "description": ".NET templates supplied by the Amplify Team", "repository": { "type": "git", @@ -25,9 +25,9 @@ "extract-api": "ts-node ../../scripts/extract-api.ts" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.0.8", - "@aws-amplify/amplify-function-plugin-interface": "1.10.2", - "graphql-transformer-core": "^8.1.2" + "@aws-amplify/amplify-cli-core": "4.3.11", + "@aws-amplify/amplify-function-plugin-interface": "1.12.1", + "graphql-transformer-core": "^8.2.13" }, "devDependencies": { "@types/inquirer": "^6.5.0", diff --git a/packages/amplify-dotnet-function-template-provider/resources/lambda/Crud/Function.csproj.ejs b/packages/amplify-dotnet-function-template-provider/resources/lambda/Crud/Function.csproj.ejs index 856022f3673..721233e1543 100644 --- a/packages/amplify-dotnet-function-template-provider/resources/lambda/Crud/Function.csproj.ejs +++ b/packages/amplify-dotnet-function-template-provider/resources/lambda/Crud/Function.csproj.ejs @@ -1,6 +1,6 @@ - net6.0 + net8.0 true Lambda diff --git a/packages/amplify-dotnet-function-template-provider/resources/lambda/Crud/aws-lambda-tools-defaults.json.ejs b/packages/amplify-dotnet-function-template-provider/resources/lambda/Crud/aws-lambda-tools-defaults.json.ejs index 7927f76fe20..728f19b43e0 100644 --- a/packages/amplify-dotnet-function-template-provider/resources/lambda/Crud/aws-lambda-tools-defaults.json.ejs +++ b/packages/amplify-dotnet-function-template-provider/resources/lambda/Crud/aws-lambda-tools-defaults.json.ejs @@ -11,9 +11,9 @@ "profile":"", "region" : "", "configuration" : "Release", - "framework" : "net6.0", + "framework" : "net8.0", "function-runtime":"props.runtime.value", - "function-memory-size" : 256, + "function-memory-size" : 512, "function-timeout" : 30, "function-handler" : "<%= props.resourceName %>::<%= props.resourceName %>.<%= props.functionName %>::LambdaHandler" } diff --git a/packages/amplify-dotnet-function-template-provider/resources/lambda/HelloWorld/Function.csproj.ejs b/packages/amplify-dotnet-function-template-provider/resources/lambda/HelloWorld/Function.csproj.ejs index 5345fd6f1fe..f1d6008bd36 100644 --- a/packages/amplify-dotnet-function-template-provider/resources/lambda/HelloWorld/Function.csproj.ejs +++ b/packages/amplify-dotnet-function-template-provider/resources/lambda/HelloWorld/Function.csproj.ejs @@ -1,6 +1,6 @@ - net6.0 + net8.0 true Lambda diff --git a/packages/amplify-dotnet-function-template-provider/resources/lambda/HelloWorld/aws-lambda-tools-defaults.json.ejs b/packages/amplify-dotnet-function-template-provider/resources/lambda/HelloWorld/aws-lambda-tools-defaults.json.ejs index 7927f76fe20..728f19b43e0 100644 --- a/packages/amplify-dotnet-function-template-provider/resources/lambda/HelloWorld/aws-lambda-tools-defaults.json.ejs +++ b/packages/amplify-dotnet-function-template-provider/resources/lambda/HelloWorld/aws-lambda-tools-defaults.json.ejs @@ -11,9 +11,9 @@ "profile":"", "region" : "", "configuration" : "Release", - "framework" : "net6.0", + "framework" : "net8.0", "function-runtime":"props.runtime.value", - "function-memory-size" : 256, + "function-memory-size" : 512, "function-timeout" : 30, "function-handler" : "<%= props.resourceName %>::<%= props.resourceName %>.<%= props.functionName %>::LambdaHandler" } diff --git a/packages/amplify-dotnet-function-template-provider/resources/lambda/Serverless/Function.csproj.ejs b/packages/amplify-dotnet-function-template-provider/resources/lambda/Serverless/Function.csproj.ejs index 23fb4926dee..ab40e416e97 100644 --- a/packages/amplify-dotnet-function-template-provider/resources/lambda/Serverless/Function.csproj.ejs +++ b/packages/amplify-dotnet-function-template-provider/resources/lambda/Serverless/Function.csproj.ejs @@ -1,6 +1,6 @@ - net6.0 + net8.0 true Lambda diff --git a/packages/amplify-dotnet-function-template-provider/resources/lambda/Serverless/aws-lambda-tools-defaults.json.ejs b/packages/amplify-dotnet-function-template-provider/resources/lambda/Serverless/aws-lambda-tools-defaults.json.ejs index 7927f76fe20..728f19b43e0 100644 --- a/packages/amplify-dotnet-function-template-provider/resources/lambda/Serverless/aws-lambda-tools-defaults.json.ejs +++ b/packages/amplify-dotnet-function-template-provider/resources/lambda/Serverless/aws-lambda-tools-defaults.json.ejs @@ -11,9 +11,9 @@ "profile":"", "region" : "", "configuration" : "Release", - "framework" : "net6.0", + "framework" : "net8.0", "function-runtime":"props.runtime.value", - "function-memory-size" : 256, + "function-memory-size" : 512, "function-timeout" : 30, "function-handler" : "<%= props.resourceName %>::<%= props.resourceName %>.<%= props.functionName %>::LambdaHandler" } diff --git a/packages/amplify-dotnet-function-template-provider/resources/lambda/Trigger/Function.csproj.ejs b/packages/amplify-dotnet-function-template-provider/resources/lambda/Trigger/Function.csproj.ejs index afa478d6396..ba368ee44cb 100644 --- a/packages/amplify-dotnet-function-template-provider/resources/lambda/Trigger/Function.csproj.ejs +++ b/packages/amplify-dotnet-function-template-provider/resources/lambda/Trigger/Function.csproj.ejs @@ -1,6 +1,6 @@ - net6.0 + net8.0 true Lambda diff --git a/packages/amplify-dotnet-function-template-provider/resources/lambda/Trigger/aws-lambda-tools-defaults.json.ejs b/packages/amplify-dotnet-function-template-provider/resources/lambda/Trigger/aws-lambda-tools-defaults.json.ejs index 7927f76fe20..728f19b43e0 100644 --- a/packages/amplify-dotnet-function-template-provider/resources/lambda/Trigger/aws-lambda-tools-defaults.json.ejs +++ b/packages/amplify-dotnet-function-template-provider/resources/lambda/Trigger/aws-lambda-tools-defaults.json.ejs @@ -11,9 +11,9 @@ "profile":"", "region" : "", "configuration" : "Release", - "framework" : "net6.0", + "framework" : "net8.0", "function-runtime":"props.runtime.value", - "function-memory-size" : 256, + "function-memory-size" : 512, "function-timeout" : 30, "function-handler" : "<%= props.resourceName %>::<%= props.resourceName %>.<%= props.functionName %>::LambdaHandler" } diff --git a/packages/amplify-dotnet-function-template-provider/resources/lambda/global.json b/packages/amplify-dotnet-function-template-provider/resources/lambda/global.json index 10b65be8642..502b8f67132 100644 --- a/packages/amplify-dotnet-function-template-provider/resources/lambda/global.json +++ b/packages/amplify-dotnet-function-template-provider/resources/lambda/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "6.0.100", + "version": "8.0.404", "rollForward": "latestFeature" } } diff --git a/packages/amplify-dynamodb-simulator/CHANGELOG.md b/packages/amplify-dynamodb-simulator/CHANGELOG.md index 31500f8548c..e6509295b08 100644 --- a/packages/amplify-dynamodb-simulator/CHANGELOG.md +++ b/packages/amplify-dynamodb-simulator/CHANGELOG.md @@ -3,6 +3,231 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.9.20](https://github.com/aws-amplify/amplify-cli/compare/amplify-dynamodb-simulator@2.9.19...amplify-dynamodb-simulator@2.9.20) (2025-01-30) + +**Note:** Version bump only for package amplify-dynamodb-simulator + + + + + +## [2.9.19](https://github.com/aws-amplify/amplify-cli/compare/amplify-dynamodb-simulator@2.9.18...amplify-dynamodb-simulator@2.9.19) (2024-08-02) + +**Note:** Version bump only for package amplify-dynamodb-simulator + + + + + +## [2.9.18](https://github.com/aws-amplify/amplify-cli/compare/amplify-dynamodb-simulator@2.9.17...amplify-dynamodb-simulator@2.9.18) (2024-06-27) + +**Note:** Version bump only for package amplify-dynamodb-simulator + + + + + +## [2.9.17](https://github.com/aws-amplify/amplify-cli/compare/amplify-dynamodb-simulator@2.9.16...amplify-dynamodb-simulator@2.9.17) (2024-06-20) + +**Note:** Version bump only for package amplify-dynamodb-simulator + + + + + +## [2.9.16](https://github.com/aws-amplify/amplify-cli/compare/amplify-dynamodb-simulator@2.9.15...amplify-dynamodb-simulator@2.9.16) (2024-06-06) + +**Note:** Version bump only for package amplify-dynamodb-simulator + + + + + +## [2.9.15](https://github.com/aws-amplify/amplify-cli/compare/amplify-dynamodb-simulator@2.9.14...amplify-dynamodb-simulator@2.9.15) (2024-05-24) + +**Note:** Version bump only for package amplify-dynamodb-simulator + + + + + +## [2.9.14](https://github.com/aws-amplify/amplify-cli/compare/amplify-dynamodb-simulator@2.9.13...amplify-dynamodb-simulator@2.9.14) (2024-05-07) + +**Note:** Version bump only for package amplify-dynamodb-simulator + + + + + +## [2.9.13](https://github.com/aws-amplify/amplify-cli/compare/amplify-dynamodb-simulator@2.9.12...amplify-dynamodb-simulator@2.9.13) (2024-04-18) + +**Note:** Version bump only for package amplify-dynamodb-simulator + + + + + +## [2.9.12](https://github.com/aws-amplify/amplify-cli/compare/amplify-dynamodb-simulator@2.9.11...amplify-dynamodb-simulator@2.9.12) (2024-04-15) + +**Note:** Version bump only for package amplify-dynamodb-simulator + + + + + +## [2.9.11](https://github.com/aws-amplify/amplify-cli/compare/amplify-dynamodb-simulator@2.9.10...amplify-dynamodb-simulator@2.9.11) (2024-03-29) + +**Note:** Version bump only for package amplify-dynamodb-simulator + + + + + +## [2.9.10](https://github.com/aws-amplify/amplify-cli/compare/amplify-dynamodb-simulator@2.9.9...amplify-dynamodb-simulator@2.9.10) (2024-03-06) + +**Note:** Version bump only for package amplify-dynamodb-simulator + + + + + +## [2.9.9](https://github.com/aws-amplify/amplify-cli/compare/amplify-dynamodb-simulator@2.9.8...amplify-dynamodb-simulator@2.9.9) (2023-12-11) + +**Note:** Version bump only for package amplify-dynamodb-simulator + + + + + +## [2.9.8](https://github.com/aws-amplify/amplify-cli/compare/amplify-dynamodb-simulator@2.9.6...amplify-dynamodb-simulator@2.9.8) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [2.9.7](https://github.com/aws-amplify/amplify-cli/compare/amplify-dynamodb-simulator@2.9.6...amplify-dynamodb-simulator@2.9.7) (2023-11-08) + +**Note:** Version bump only for package amplify-dynamodb-simulator + + + + + +## [2.9.6](https://github.com/aws-amplify/amplify-cli/compare/amplify-dynamodb-simulator@2.9.5...amplify-dynamodb-simulator@2.9.6) (2023-11-08) + +**Note:** Version bump only for package amplify-dynamodb-simulator + + + + + +## [2.9.5](https://github.com/aws-amplify/amplify-cli/compare/amplify-dynamodb-simulator@2.9.4...amplify-dynamodb-simulator@2.9.5) (2023-10-12) + +**Note:** Version bump only for package amplify-dynamodb-simulator + + + + + +## [2.9.4](https://github.com/aws-amplify/amplify-cli/compare/amplify-dynamodb-simulator@2.9.3...amplify-dynamodb-simulator@2.9.4) (2023-10-05) + +**Note:** Version bump only for package amplify-dynamodb-simulator + + + + + +## [2.9.3](https://github.com/aws-amplify/amplify-cli/compare/amplify-dynamodb-simulator@2.9.2...amplify-dynamodb-simulator@2.9.3) (2023-10-03) + +**Note:** Version bump only for package amplify-dynamodb-simulator + + + + + +## [2.9.2](https://github.com/aws-amplify/amplify-cli/compare/amplify-dynamodb-simulator@2.9.1...amplify-dynamodb-simulator@2.9.2) (2023-09-22) + +**Note:** Version bump only for package amplify-dynamodb-simulator + + + + + +## [2.9.1](https://github.com/aws-amplify/amplify-cli/compare/amplify-dynamodb-simulator@2.9.0...amplify-dynamodb-simulator@2.9.1) (2023-08-31) + +**Note:** Version bump only for package amplify-dynamodb-simulator + + + + + +# [2.9.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-dynamodb-simulator@2.8.4...amplify-dynamodb-simulator@2.9.0) (2023-08-17) + + +### Features + +* generate components using graphql ([1568581](https://github.com/aws-amplify/amplify-cli/commit/15685810460881aa71e88724398b9be05ba53781)) + + + + + +## [2.8.4](https://github.com/aws-amplify/amplify-cli/compare/amplify-dynamodb-simulator@2.8.3...amplify-dynamodb-simulator@2.8.4) (2023-08-09) + +**Note:** Version bump only for package amplify-dynamodb-simulator + + + + + +## [2.8.3](https://github.com/aws-amplify/amplify-cli/compare/amplify-dynamodb-simulator@2.8.2...amplify-dynamodb-simulator@2.8.3) (2023-07-28) + +**Note:** Version bump only for package amplify-dynamodb-simulator + + + + + +## [2.8.2](https://github.com/aws-amplify/amplify-cli/compare/amplify-dynamodb-simulator@2.8.1...amplify-dynamodb-simulator@2.8.2) (2023-07-27) + +**Note:** Version bump only for package amplify-dynamodb-simulator + + + + + +## [2.8.1](https://github.com/aws-amplify/amplify-cli/compare/amplify-dynamodb-simulator@2.8.0...amplify-dynamodb-simulator@2.8.1) (2023-07-24) + +**Note:** Version bump only for package amplify-dynamodb-simulator + + + + + +# [2.8.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-dynamodb-simulator@2.7.4...amplify-dynamodb-simulator@2.8.0) (2023-07-20) + + +### Features + +* uibuilder codegen service ([#12896](https://github.com/aws-amplify/amplify-cli/issues/12896)) ([3fe2f98](https://github.com/aws-amplify/amplify-cli/commit/3fe2f98a99a9daf22efccb23a031882ea2be899b)) + + + + + +## [2.7.4](https://github.com/aws-amplify/amplify-cli/compare/amplify-dynamodb-simulator@2.7.3...amplify-dynamodb-simulator@2.7.4) (2023-06-13) + +**Note:** Version bump only for package amplify-dynamodb-simulator + + + + + ## [2.7.3](https://github.com/aws-amplify/amplify-cli/compare/amplify-dynamodb-simulator@2.7.1...amplify-dynamodb-simulator@2.7.3) (2023-05-25) diff --git a/packages/amplify-dynamodb-simulator/package.json b/packages/amplify-dynamodb-simulator/package.json index 8481e502a35..1ed0efac889 100644 --- a/packages/amplify-dynamodb-simulator/package.json +++ b/packages/amplify-dynamodb-simulator/package.json @@ -1,6 +1,6 @@ { "name": "amplify-dynamodb-simulator", - "version": "2.7.3", + "version": "2.9.20", "description": "DynamoDB emulator nodejs wrapper", "repository": { "type": "git", @@ -21,8 +21,8 @@ "test": "jest --logHeapUsage --passWithNoTests" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.0.8", - "aws-sdk": "^2.1354.0", + "@aws-amplify/amplify-cli-core": "4.3.11", + "aws-sdk": "^2.1464.0", "detect-port": "^1.3.0", "execa": "^5.1.1", "fs-extra": "^8.1.0", diff --git a/packages/amplify-e2e-core/CHANGELOG.md b/packages/amplify-e2e-core/CHANGELOG.md index 9ee979819a4..10917a90306 100644 --- a/packages/amplify-e2e-core/CHANGELOG.md +++ b/packages/amplify-e2e-core/CHANGELOG.md @@ -3,6 +3,312 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.7.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.7.0...@aws-amplify/amplify-e2e-core@5.7.1) (2025-01-30) + +**Note:** Version bump only for package @aws-amplify/amplify-e2e-core + + + + + +# [5.7.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.6.1...@aws-amplify/amplify-e2e-core@5.7.0) (2025-01-02) + + +### Features + +* lambda dotnet 8 support ([#14026](https://github.com/aws-amplify/amplify-cli/issues/14026)) ([540bfe1](https://github.com/aws-amplify/amplify-cli/commit/540bfe1187907609c3c813e1208c12b6a2a6ac6c)) + + + + + +## [5.6.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.6.0...@aws-amplify/amplify-e2e-core@5.6.1) (2024-11-18) + +**Note:** Version bump only for package @aws-amplify/amplify-e2e-core + + + + + +# [5.6.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.5.10...@aws-amplify/amplify-e2e-core@5.6.0) (2024-10-05) + + +### Features + +* add init prompts for Gen2 ([#13849](https://github.com/aws-amplify/amplify-cli/issues/13849)) ([7ab8fae](https://github.com/aws-amplify/amplify-cli/commit/7ab8faef1e2ce0c15db783d236aeee9d312ec135)) + + + + + +## [5.5.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.5.9...@aws-amplify/amplify-e2e-core@5.5.10) (2024-08-02) + +**Note:** Version bump only for package @aws-amplify/amplify-e2e-core + + + + + +## [5.5.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.5.8...@aws-amplify/amplify-e2e-core@5.5.9) (2024-06-27) + +**Note:** Version bump only for package @aws-amplify/amplify-e2e-core + + + + + +## [5.5.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.5.7...@aws-amplify/amplify-e2e-core@5.5.8) (2024-06-20) + +**Note:** Version bump only for package @aws-amplify/amplify-e2e-core + + + + + +## [5.5.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.5.6...@aws-amplify/amplify-e2e-core@5.5.7) (2024-06-06) + +**Note:** Version bump only for package @aws-amplify/amplify-e2e-core + + + + + +## [5.5.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.5.5...@aws-amplify/amplify-e2e-core@5.5.6) (2024-05-24) + +**Note:** Version bump only for package @aws-amplify/amplify-e2e-core + + + + + +## [5.5.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.5.4...@aws-amplify/amplify-e2e-core@5.5.5) (2024-05-07) + +**Note:** Version bump only for package @aws-amplify/amplify-e2e-core + + + + + +## [5.5.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.5.3...@aws-amplify/amplify-e2e-core@5.5.4) (2024-04-18) + +**Note:** Version bump only for package @aws-amplify/amplify-e2e-core + + + + + +## [5.5.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.5.2...@aws-amplify/amplify-e2e-core@5.5.3) (2024-04-15) + +**Note:** Version bump only for package @aws-amplify/amplify-e2e-core + + + + + +## [5.5.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.5.1...@aws-amplify/amplify-e2e-core@5.5.2) (2024-03-29) + +**Note:** Version bump only for package @aws-amplify/amplify-e2e-core + + + + + +## [5.5.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.5.0...@aws-amplify/amplify-e2e-core@5.5.1) (2024-03-06) + + +### Bug Fixes + +* limit query parameter parsing in auth admin api ([#13512](https://github.com/aws-amplify/amplify-cli/issues/13512)) ([2480681](https://github.com/aws-amplify/amplify-cli/commit/24806814ce2275fe7d70e5484c3c485023b8041a)) + + +### Reverts + +* Revert "chore: bump data package versions (#13486)" (#13487) ([3280d40](https://github.com/aws-amplify/amplify-cli/commit/3280d40a5ab50c675b0e2b8050ad35a69c83cdc2)), closes [#13486](https://github.com/aws-amplify/amplify-cli/issues/13486) [#13487](https://github.com/aws-amplify/amplify-cli/issues/13487) + + + + + +# [5.5.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.4.4...@aws-amplify/amplify-e2e-core@5.5.0) (2023-12-11) + + +### Features + +* bump data dependencies to launch RDS feature ([#13409](https://github.com/aws-amplify/amplify-cli/issues/13409)) ([7fbf29f](https://github.com/aws-amplify/amplify-cli/commit/7fbf29f56eb7335d20de0b5526fbed7795a2af09)) + + + + + +## [5.4.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.4.2...@aws-amplify/amplify-e2e-core@5.4.4) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [5.4.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.4.2...@aws-amplify/amplify-e2e-core@5.4.3) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-e2e-core + + + + + +## [5.4.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.4.1...@aws-amplify/amplify-e2e-core@5.4.2) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-e2e-core + + + + + +## [5.4.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.4.0...@aws-amplify/amplify-e2e-core@5.4.1) (2023-10-12) + + +### Bug Fixes + +* add retained secrets to syncSecretDeltas ([#13300](https://github.com/aws-amplify/amplify-cli/issues/13300)) ([f3c9c05](https://github.com/aws-amplify/amplify-cli/commit/f3c9c05617b55560ac78f824cf71d4001cb5c58b)) + + + + + +# [5.4.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.3.3...@aws-amplify/amplify-e2e-core@5.4.0) (2023-10-05) + + +### Features + +* **amplify-util-uibuilder:** amplify js backwards compatibility ([#13288](https://github.com/aws-amplify/amplify-cli/issues/13288)) ([2db3e18](https://github.com/aws-amplify/amplify-cli/commit/2db3e181cf06954085eb8fade0b26162672327db)) + + + + + +## [5.3.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.3.2...@aws-amplify/amplify-e2e-core@5.3.3) (2023-10-03) + +**Note:** Version bump only for package @aws-amplify/amplify-e2e-core + + + + + +## [5.3.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.3.1...@aws-amplify/amplify-e2e-core@5.3.2) (2023-09-22) + + +### Reverts + +* Revert "test: add function to run init with only yes option" ([08734a9](https://github.com/aws-amplify/amplify-cli/commit/08734a9d2d9dba671ed3cff59b84f4f456c03927)) + + + + + +## [5.3.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.3.0...@aws-amplify/amplify-e2e-core@5.3.1) (2023-08-31) + +**Note:** Version bump only for package @aws-amplify/amplify-e2e-core + + + + + +# [5.3.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.2.0...@aws-amplify/amplify-e2e-core@5.3.0) (2023-08-17) + + +### Features + +* generate components using graphql ([1568581](https://github.com/aws-amplify/amplify-cli/commit/15685810460881aa71e88724398b9be05ba53781)) + + + + + +# [5.2.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.1.3...@aws-amplify/amplify-e2e-core@5.2.0) (2023-08-09) + + +### Bug Fixes + +* Dependabot alerts for semver, tough-cookie ([#12962](https://github.com/aws-amplify/amplify-cli/issues/12962)) ([175a86b](https://github.com/aws-amplify/amplify-cli/commit/175a86b89a54c65bb6e68c0609be503d61e39d63)) +* surface override build error if scripting features are disabled ([#13013](https://github.com/aws-amplify/amplify-cli/issues/13013)) ([fa80249](https://github.com/aws-amplify/amplify-cli/commit/fa802491f8767f50dc3636e190fb70eb492fa969)) + + +### Features + +* replace oauth and userpoolclient lambdas with cfn and sdk calls ([#12935](https://github.com/aws-amplify/amplify-cli/issues/12935)) ([b3ab512](https://github.com/aws-amplify/amplify-cli/commit/b3ab5125f2ec405afd1af9d2f77b8683d5914010)) +* replace role mapping lambda in auth category ([#13003](https://github.com/aws-amplify/amplify-cli/issues/13003)) ([4ce0329](https://github.com/aws-amplify/amplify-cli/commit/4ce032932702305b9f9564a77418855ceb0f0fca)) + + + + + +## [5.1.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.1.2...@aws-amplify/amplify-e2e-core@5.1.3) (2023-07-28) + + +### Bug Fixes + +* surface override build error if scripting features are disabled ([#13013](https://github.com/aws-amplify/amplify-cli/issues/13013)) ([#13023](https://github.com/aws-amplify/amplify-cli/issues/13023)) ([9e99800](https://github.com/aws-amplify/amplify-cli/commit/9e998008c6aef13ee50e6ce88cc78d8e9367b66a)) + + + + + +## [5.1.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.1.1...@aws-amplify/amplify-e2e-core@5.1.2) (2023-07-27) + +**Note:** Version bump only for package @aws-amplify/amplify-e2e-core + + + + + +## [5.1.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.1.0...@aws-amplify/amplify-e2e-core@5.1.1) (2023-07-24) + +**Note:** Version bump only for package @aws-amplify/amplify-e2e-core + + + + + +# [5.1.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.0.4...@aws-amplify/amplify-e2e-core@5.1.0) (2023-07-20) + + +### Bug Fixes + +* added Prepush after init and before deploy ([#12674](https://github.com/aws-amplify/amplify-cli/issues/12674)) ([a54f837](https://github.com/aws-amplify/amplify-cli/commit/a54f83743b5995317170c9b4f5a140e5a1aa57f3)) +* adjust path finding for schemas in codebuild ([#12771](https://github.com/aws-amplify/amplify-cli/issues/12771)) ([fb24fe7](https://github.com/aws-amplify/amplify-cli/commit/fb24fe759a9e41e1ca86815b2f18d1b186e8cc99)) +* update notification channel name lookup ([#12763](https://github.com/aws-amplify/amplify-cli/issues/12763)) ([92ca721](https://github.com/aws-amplify/amplify-cli/commit/92ca721134d59b68e85d4f92f4814d6717a3be3a)) + + +### Features + +* lambda support for yarn2/3 and pnpm package managers ([#12750](https://github.com/aws-amplify/amplify-cli/issues/12750)) ([fd18195](https://github.com/aws-amplify/amplify-cli/commit/fd181952672efb0479ca6955c0c7a45fe248d1b1)) +* uibuilder codegen service ([#12896](https://github.com/aws-amplify/amplify-cli/issues/12896)) ([3fe2f98](https://github.com/aws-amplify/amplify-cli/commit/3fe2f98a99a9daf22efccb23a031882ea2be899b)) + + +### Reverts + +* Revert "chore: cleanup stale resources in CodeBuild (#12779)" (#12853) ([d19d17e](https://github.com/aws-amplify/amplify-cli/commit/d19d17ebcace24c9db56331c0c2bd053f8ec0966)), closes [#12779](https://github.com/aws-amplify/amplify-cli/issues/12779) [#12853](https://github.com/aws-amplify/amplify-cli/issues/12853) + + + + + +## [5.0.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.0.3...@aws-amplify/amplify-e2e-core@5.0.4) (2023-06-13) + + +### Bug Fixes + +* deploy category resources when calling amplify push ([#12587](https://github.com/aws-amplify/amplify-cli/issues/12587)) ([260723c](https://github.com/aws-amplify/amplify-cli/commit/260723cb67432308dd35a4ddbedacfbbc69c6c81)) +* do not throw when localEnvInfo is missing on pull (fixes 12492) ([#12528](https://github.com/aws-amplify/amplify-cli/issues/12528)) ([0ae8689](https://github.com/aws-amplify/amplify-cli/commit/0ae8689efbb3907393f493c8707ab025573fb487)) +* functions e2e tests on windows ([#12745](https://github.com/aws-amplify/amplify-cli/issues/12745)) ([0de4529](https://github.com/aws-amplify/amplify-cli/commit/0de45299fbaafb090893f96c1884cdcff321f511)) + + + + + ## [5.0.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-e2e-core@5.0.1...@aws-amplify/amplify-e2e-core@5.0.3) (2023-05-25) diff --git a/packages/amplify-e2e-core/failed-test-reporter.js b/packages/amplify-e2e-core/failed-test-reporter.js index dc42024a28b..f901eff688c 100644 --- a/packages/amplify-e2e-core/failed-test-reporter.js +++ b/packages/amplify-e2e-core/failed-test-reporter.js @@ -20,7 +20,7 @@ class FailedTestNameReporter { getFailedTestRegEx(results) { let failedTestNames = []; if (results.testResults) { - for (let result of results.testResults) { + for (const result of results.testResults) { failedTestNames = [...failedTestNames, ...this.getFailedTestRegEx(result)]; } } else if (results.status === 'failed') { diff --git a/packages/amplify-e2e-core/package.json b/packages/amplify-e2e-core/package.json index 6abcaaef126..4351aa6c38c 100644 --- a/packages/amplify-e2e-core/package.json +++ b/packages/amplify-e2e-core/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-e2e-core", - "version": "5.0.3", + "version": "5.7.1", "description": "", "repository": { "type": "git", @@ -22,23 +22,27 @@ "clean": "rimraf ./lib tsconfig.tsbuildinfo" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.0.8", - "amplify-headless-interface": "1.17.3", - "aws-sdk": "^2.1354.0", + "@aws-amplify/amplify-cli-core": "4.3.11", + "@aws-sdk/client-sts": "3.624.0", + "@aws-sdk/credential-providers": "3.624.0", + "amplify-headless-interface": "1.17.7", + "aws-amplify": "^5.3.16", + "aws-appsync": "^4.1.1", + "aws-sdk": "^2.1464.0", "chalk": "^4.1.1", "dotenv": "^8.2.0", "execa": "^5.1.1", "fs-extra": "^8.1.0", - "graphql-transformer-core": "^8.1.2", + "graphql-transformer-core": "^8.2.13", "ini": "^1.3.5", "jest-circus": "^27.0.0", "jest-environment-node": "^26.6.2", "lodash": "^4.17.21", "node-fetch": "^2.6.7", - "node-pty": "beta", + "node-pty": "^1.0.0", "retimer": "2.0.0", "rimraf": "^3.0.0", - "semver": "^7.3.5", + "semver": "^7.5.4", "strip-ansi": "^6.0.0", "throat": "^5.0.0", "uuid": "^8.3.2" diff --git a/packages/amplify-e2e-core/src/categories/auth.ts b/packages/amplify-e2e-core/src/categories/auth.ts index a1d67b9fdd1..3b94f5cf928 100644 --- a/packages/amplify-e2e-core/src/categories/auth.ts +++ b/packages/amplify-e2e-core/src/categories/auth.ts @@ -153,7 +153,7 @@ interface AddApiOptions { const defaultOptions: AddApiOptions = { apiName: '\r', - testingWithLatestCodebase: true, + testingWithLatestCodebase: false, transformerVersion: 2, }; @@ -383,10 +383,15 @@ export function updateAuthSignInSignOutUrl(cwd: string, settings: any): Promise< if (settings?.overrides?.category === 'auth') { chain.wait('A migration is needed to support latest updates on auth resources').sendConfirmYes(); } + chain.wait('What do you want to do?'); + + if (settings?.socialProvidersAlreadyExist) { + chain.sendKeyDown(3); + } else { + chain.sendKeyDown(2); + } + chain - .wait('What do you want to do?') - .send(KEY_DOWN_ARROW) - .send(KEY_DOWN_ARROW) .sendCarriageReturn() .wait('Which redirect signin URIs do you want to edit?') .selectAll() @@ -414,6 +419,352 @@ export function updateAuthSignInSignOutUrl(cwd: string, settings: any): Promise< }); } +export function updateAuthToUpdateUrls( + cwd: string, + settings: { + signinUrl: string; + signoutUrl: string; + testingWithLatestCodebase: boolean; + updateSigninUrl: string; + updateSignoutUrl: string; + }, +): Promise { + const testingWithLatestCodebase = settings.testingWithLatestCodebase ?? false; + const chain = spawn(getCLIPath(testingWithLatestCodebase), ['update', 'auth'], { cwd, stripColors: true }); + return chain + .wait('What do you want to do?') + .send(KEY_DOWN_ARROW) + .send(KEY_DOWN_ARROW) + .sendCarriageReturn() + .wait('Which redirect signin URIs do you want to edit?') + .selectAll() + .wait(`Update https://www.google.com/`) + .send(settings.updateSigninUrl) + .sendCarriageReturn() + .wait('Do you want to add redirect signin URIs?') + .sendNo() + .sendCarriageReturn() + .wait('Which redirect signout URIs do you want to edit?') + .selectAll() + .wait(`Update https://www.nytimes.com/`) + .send(settings.updateSignoutUrl) + .sendCarriageReturn() + .wait('Do you want to add redirect signout URIs?') + .sendNo() + .sendCarriageReturn() + .runAsync(); +} + +export function updateAuthToAddOauthProviders( + cwd: string, + settings: { + testingWithLatestCodebase: boolean; + }, +): Promise { + const { + FACEBOOK_APP_ID, + FACEBOOK_APP_SECRET, + GOOGLE_APP_ID, + GOOGLE_APP_SECRET, + AMAZON_APP_ID, + AMAZON_APP_SECRET, + APPLE_APP_ID, + APPLE_KEY_ID, + APPLE_TEAM_ID, + APPLE_PRIVATE_KEY, + } = getSocialProviders(); + + const testingWithLatestCodebase = settings.testingWithLatestCodebase ?? false; + const chain = spawn(getCLIPath(testingWithLatestCodebase), ['update', 'auth'], { cwd, stripColors: true }); + + return chain + .wait('What do you want to do?') + .send(KEY_DOWN_ARROW) + .send(KEY_DOWN_ARROW) + .send(KEY_DOWN_ARROW) + .sendCarriageReturn() + .wait('Select the identity providers you want to configure for your user pool:') + .sendCarriageReturn() + .wait('Enter your Facebook App ID for your OAuth flow:') + .send(FACEBOOK_APP_ID) + .sendCarriageReturn() + .wait('Enter your Facebook App Secret for your OAuth flow:') + .send(FACEBOOK_APP_SECRET) + .sendCarriageReturn() + .wait('Enter your Google Web Client ID for your OAuth flow:') + .send(GOOGLE_APP_ID) + .sendCarriageReturn() + .wait('Enter your Google Web Client Secret for your OAuth flow:') + .send(GOOGLE_APP_SECRET) + .sendCarriageReturn() + .wait('Enter your Amazon App ID for your OAuth flow:') + .send(AMAZON_APP_ID) + .sendCarriageReturn() + .wait('Enter your Amazon App Secret for your OAuth flow:') + .send(AMAZON_APP_SECRET) + .sendCarriageReturn() + .wait('Enter your Services ID for your OAuth flow:') + .send(APPLE_APP_ID) + .sendCarriageReturn() + .wait('Enter your Team ID for your OAuth flow:') + .send(APPLE_TEAM_ID) + .sendCarriageReturn() + .wait('Enter your Key ID for your OAuth flow:') + .send(APPLE_KEY_ID) + .sendCarriageReturn() + .wait('Enter your Private Key for your OAuth flow') + .send(APPLE_PRIVATE_KEY) + .runAsync(); +} + +export function updateAuthSignInSignOutUrlWithAll( + cwd: string, + settings: { signinUrl: string; signoutUrl: string; testingWithLatestCodebase?: boolean }, +): Promise { + const testingWithLatestCodebase = settings.testingWithLatestCodebase ?? false; + const chain = spawn(getCLIPath(testingWithLatestCodebase), ['update', 'auth'], { cwd, stripColors: true }); + + return chain + .wait('What do you want to do?') + .send(KEY_DOWN_ARROW) + .sendCarriageReturn() + .wait('Select the authentication/authorization services that you want to use:') + .sendCarriageReturn() + .wait('Allow unauthenticated logins?') + .sendCarriageReturn() + .wait('Do you want to enable 3rd party authentication providers in your identity pool?') + .send(KEY_DOWN_ARROW) + .sendCarriageReturn() + .wait('Do you want to add User Pool Groups?') + .send(KEY_DOWN_ARROW) + .sendCarriageReturn() + .wait('Do you want to add an admin queries API?') + .send(KEY_DOWN_ARROW) + .sendCarriageReturn() + .wait('Multifactor authentication (MFA) user login options:') + .sendCarriageReturn() + .wait('Email based user registration/forgot password:') + .sendCarriageReturn() + .wait('Specify an email verification subject:') + .sendCarriageReturn() + .wait('Specify an email verification message:') + .sendCarriageReturn() + .wait('Do you want to override the default password policy for this User Pool?') + .sendCarriageReturn() + .wait("Specify the app's refresh token expiration period (in days):") + .sendCarriageReturn() + .wait('Do you want to specify the user attributes this app can read and write?') + .sendCarriageReturn() + .wait('Do you want to enable any of the following capabilities?') + .sendCarriageReturn() + .wait('Do you want to use an OAuth flow?') + .sendCarriageReturn() + .wait('What domain name prefix do you want to use?') + .sendCarriageReturn() + .wait('Enter your redirect signin URI:') + .sendLine(settings.signinUrl) + .wait('Do you want to add another redirect signin URI') + .sendConfirmNo() + .sendCarriageReturn() + .wait('Enter your redirect signout URI:') + .sendLine(settings.signoutUrl) + .sendCarriageReturn() + .wait('Do you want to add another redirect signout URI') + .sendConfirmNo() + .sendCarriageReturn() + .wait('Select the OAuth flows enabled for this project') + .sendCarriageReturn() + .wait('Select the OAuth scopes enabled for this project') + .sendCarriageReturn() + .wait('Select the identity providers you want to configure for your user pool:') + .sendCarriageReturn() + .wait('Do you want to configure Lambda Triggers for Cognito?') + .sendCarriageReturn() + .wait('Which triggers do you want to enable for Cognito') + .sendCarriageReturn() + .runAsync(); +} + +export function updateAuthToAddSignInSignOutUrlAfterPull( + cwd: string, + settings: { + signinUrl: string; + signoutUrl: string; + testingWithLatestCodebase: boolean; + updateSigninUrl: string; + updateSignoutUrl: string; + }, +): Promise { + const testingWithLatestCodebase = settings.testingWithLatestCodebase ?? false; + const chain = spawn(getCLIPath(testingWithLatestCodebase), ['update', 'auth'], { cwd, stripColors: true }); + const { + FACEBOOK_APP_ID, + FACEBOOK_APP_SECRET, + GOOGLE_APP_ID, + GOOGLE_APP_SECRET, + AMAZON_APP_ID, + AMAZON_APP_SECRET, + APPLE_APP_ID, + APPLE_KEY_ID, + APPLE_TEAM_ID, + APPLE_PRIVATE_KEY, + } = getSocialProviders(true); + + return chain + .wait('What do you want to do?') + .sendCarriageReturn() + .wait('What domain name prefix do you want to use?') + .sendCarriageReturn() + .wait('Enter your redirect signin URI:') + .send(settings.updateSigninUrl) + .sendCarriageReturn() + .wait('Do you want to add another redirect signin URI') + .sendNo() + .sendCarriageReturn() + .wait('Enter your redirect signout URI:') + .sendLine(settings.signoutUrl) + .sendCarriageReturn() + .wait('Do you want to add another redirect signout URI') + .sendNo() + .sendCarriageReturn() + .wait('Select the identity providers you want to configure for your user pool:') + .selectAll() + .sendCarriageReturn() + .wait('Enter your Facebook App ID for your OAuth flow:') + .send(FACEBOOK_APP_ID) + .sendCarriageReturn() + .wait('Enter your Facebook App Secret for your OAuth flow:') + .send(FACEBOOK_APP_SECRET) + .sendCarriageReturn() + .wait('Enter your Google Web Client ID for your OAuth flow:') + .send(GOOGLE_APP_ID) + .sendCarriageReturn() + .wait('Enter your Google Web Client Secret for your OAuth flow:') + .send(GOOGLE_APP_SECRET) + .sendCarriageReturn() + .wait('Enter your Amazon App ID for your OAuth flow:') + .send(AMAZON_APP_ID) + .sendCarriageReturn() + .wait('Enter your Amazon App Secret for your OAuth flow:') + .send(AMAZON_APP_SECRET) + .sendCarriageReturn() + .wait('Enter your Services ID for your OAuth flow:') + .send(APPLE_APP_ID) + .sendCarriageReturn() + .wait('Enter your Team ID for your OAuth flow:') + .send(APPLE_TEAM_ID) + .sendCarriageReturn() + .wait('Enter your Key ID for your OAuth flow:') + .send(APPLE_KEY_ID) + .sendCarriageReturn() + .wait('Enter your Private Key for your OAuth flow') + .send(APPLE_PRIVATE_KEY) + .sendCarriageReturn() + .runAsync(); +} + +export function updateAuthDomainPrefixWithAllProvidersConfigured( + cwd: string, + settings: { domainPrefix: string; testingWithLatestCodebase?: boolean }, +): Promise { + const testingWithLatestCodebase = settings.testingWithLatestCodebase ?? false; + const chain = spawn(getCLIPath(testingWithLatestCodebase), ['update', 'auth'], { cwd, stripColors: true }); + const { + FACEBOOK_APP_ID, + FACEBOOK_APP_SECRET, + GOOGLE_APP_ID, + GOOGLE_APP_SECRET, + AMAZON_APP_ID, + AMAZON_APP_SECRET, + APPLE_APP_ID, + APPLE_KEY_ID, + APPLE_TEAM_ID, + APPLE_PRIVATE_KEY, + } = getSocialProviders(true); + + return chain + .wait('What do you want to do?') + .send(KEY_DOWN_ARROW) + .send(KEY_DOWN_ARROW) + .sendCarriageReturn() + .wait('Select the authentication/authorization services that you want to use:') + .sendCarriageReturn() + .wait('Do you want to add User Pool Groups?') + .sendCarriageReturn() + .wait('Do you want to add an admin queries API?') + .sendCarriageReturn() + .wait('Multifactor authentication (MFA) user login options:') + .sendCarriageReturn() + .wait('Email based user registration/forgot password:') + .sendCarriageReturn() + .wait('Specify an email verification subject:') + .sendCarriageReturn() + .wait('Specify an email verification message:') + .sendCarriageReturn() + .wait('Do you want to override the default password policy for this User Pool?') + .sendCarriageReturn() + .wait("Specify the app's refresh token expiration period (in days):") + .sendCarriageReturn() + .wait('Do you want to specify the user attributes this app can read and write?') + .sendCarriageReturn() + .wait('Do you want to enable any of the following capabilities?') + .sendCarriageReturn() + .wait('Do you want to use an OAuth flow?') + .sendCarriageReturn() + .wait('What domain name prefix do you want to use?') + .sendLine(settings.domainPrefix) + .wait('Which redirect signin URIs do you want to edit?') + .sendCarriageReturn() + .wait('Do you want to add redirect signin URIs?') + .sendNo() + .sendCarriageReturn() + .wait('Which redirect signout URIs do you want to edit?') + .sendCarriageReturn() + .wait('Do you want to add redirect signout URIs?') + .sendNo() + .sendCarriageReturn() + .wait('Select the OAuth flows enabled for this project') + .sendCarriageReturn() + .wait('Select the OAuth scopes enabled for this project') + .sendCarriageReturn() + .wait('Select the identity providers you want to configure for your user pool:') + .sendCarriageReturn() + .wait('Enter your Facebook App ID for your OAuth flow:') + .send(FACEBOOK_APP_ID) + .sendCarriageReturn() + .wait('Enter your Facebook App Secret for your OAuth flow:') + .send(FACEBOOK_APP_SECRET) + .sendCarriageReturn() + .wait('Enter your Google Web Client ID for your OAuth flow:') + .send(GOOGLE_APP_ID) + .sendCarriageReturn() + .wait('Enter your Google Web Client Secret for your OAuth flow:') + .send(GOOGLE_APP_SECRET) + .sendCarriageReturn() + .wait('Enter your Amazon App ID for your OAuth flow:') + .send(AMAZON_APP_ID) + .sendCarriageReturn() + .wait('Enter your Amazon App Secret for your OAuth flow:') + .send(AMAZON_APP_SECRET) + .sendCarriageReturn() + .wait('Enter your Services ID for your OAuth flow:') + .send(APPLE_APP_ID) + .sendCarriageReturn() + .wait('Enter your Team ID for your OAuth flow:') + .send(APPLE_TEAM_ID) + .sendCarriageReturn() + .wait('Enter your Key ID for your OAuth flow:') + .send(APPLE_KEY_ID) + .sendCarriageReturn() + .wait('Enter your Private Key for your OAuth flow') + .send(APPLE_PRIVATE_KEY) + .sendCarriageReturn() + .wait('Do you want to configure Lambda Triggers for Cognito?') + .sendNo() + .sendCarriageReturn() + .runAsync(); +} + export function updateAuthToRemoveFederation(cwd: string, settings: any): Promise { const testingWithLatestCodebase = settings.testingWithLatestCodebase ?? false; return new Promise((resolve, reject) => { @@ -1072,15 +1423,22 @@ export function addAuthWithMaxOptions(cwd: string, settings: any): Promise } = getSocialProviders(true); return new Promise((resolve, reject) => { - const chain = spawn(getCLIPath(), ['add', 'auth'], { cwd, stripColors: true }) + const chain = spawn(getCLIPath(settings?.testingWithLatestCodebase ?? false), ['add', 'auth'], { cwd, stripColors: true }) .wait('Do you want to use the default authentication and security configuration?') .send(KEY_DOWN_ARROW) .send(KEY_DOWN_ARROW) .sendCarriageReturn() .wait('Select the authentication/authorization services that you want to use') .sendCarriageReturn() - .wait('Provide a friendly name for your resource that will be used') - .sendCarriageReturn() + .wait('Provide a friendly name for your resource that will be used'); + + if (settings?.name) { + chain.sendLine(settings.name); + } else { + chain.sendCarriageReturn(); + } + + chain .wait('Enter a name for your identity pool') .sendCarriageReturn() .wait('Allow unauthenticated logins') @@ -1290,24 +1648,44 @@ export function addAuthWithPreTokenGenerationTrigger(projectDir: string): Promis }); } -export function updateAuthAddUserGroups(projectDir: string, groupNames: string[], settings?: any): Promise { +export function updateAuthAddUserGroups( + projectDir: string, + groupNames: string[], + settings?: { + testingWithLatestCodebase?: boolean; + updateUserPoolGroupsPosition?: number; + hasExistingUserPoolGroups?: boolean; + overrides?: { + category: string; + }; + }, +): Promise { if (groupNames.length == 0) { return undefined; } const testingWithLatestCodebase = settings && settings.testingWithLatestCodebase ? settings.testingWithLatestCodebase : false; + const updateUserPoolGroupsPosition = settings?.updateUserPoolGroupsPosition ?? 2; return new Promise((resolve, reject) => { const chain = spawn(getCLIPath(testingWithLatestCodebase), ['update', 'auth'], { cwd: projectDir, stripColors: true }); if (settings?.overrides?.category === 'auth') { chain.wait('A migration is needed to support latest updates on auth resources').sendConfirmYes(); } - chain - .wait('What do you want to do?') - .send(KEY_DOWN_ARROW) - .send(KEY_DOWN_ARROW) - .sendCarriageReturn() - .wait('Provide a name for your user pool group') - .send(groupNames[0]) - .sendCarriageReturn(); + chain.wait('What do you want to do?'); + for (let i = 0; i < updateUserPoolGroupsPosition; i++) { + chain.send(KEY_DOWN_ARROW); + } + chain.sendCarriageReturn(); + + if (settings?.hasExistingUserPoolGroups) { + chain + .wait('Select any user pool groups you want to delete') + .sendCarriageReturn() + .wait('Do you want to add another User Pool Group') + .sendYes() + .sendCarriageReturn(); + } + + chain.wait('Provide a name for your user pool group').send(groupNames[0]).sendCarriageReturn(); if (groupNames.length > 1) { let index = 1; @@ -1338,6 +1716,54 @@ export function updateAuthAddUserGroups(projectDir: string, groupNames: string[] }); } +export async function updateAuthAddUserGroupsAfterPull( + projectDir: string, + groupNames: string[], + settings?: { + testingWithLatestCodebase: boolean; + }, +): Promise { + if (groupNames.length == 0) { + return undefined; + } + const testingWithLatestCodebase = settings?.testingWithLatestCodebase || false; + const chain = spawn(getCLIPath(testingWithLatestCodebase), ['update', 'auth'], { cwd: projectDir, stripColors: true }); + + chain + .wait('What do you want to do?') + .send(KEY_DOWN_ARROW) + .send(KEY_DOWN_ARROW) + .send(KEY_DOWN_ARROW) + .sendCarriageReturn() + .wait('Select any user pool groups you want to delete:') + .sendCarriageReturn() + .wait('Do you want to add another User Pool Group') + .sendConfirmYes() + .wait('Provide a name for your user pool group') + .send(groupNames[0]) + .sendCarriageReturn(); + + if (groupNames.length > 1) { + let index = 1; + while (index < groupNames.length) { + chain + .wait('Do you want to add another User Pool Group') + .sendConfirmYes() + .wait('Provide a name for your user pool group') + .send(groupNames[index++]) + .sendCarriageReturn(); + } + } + + return await chain + .wait('Do you want to add another User Pool Group') + .sendCarriageReturn() + .wait('Sort the user pool groups in order of preference') + .sendCarriageReturn() + .wait('"amplify publish" will build all your local backend and frontend resources') + .runAsync(); +} + export function addAuthUserPoolOnlyWithOAuth(cwd: string, settings: AddAuthUserPoolOnlyWithOAuthSettings): Promise { return new Promise((resolve, reject) => { spawn(getCLIPath(), ['add', 'auth'], { cwd, stripColors: true }) @@ -1811,3 +2237,138 @@ export function updateAuthWithGroupTrigger(cwd: string): Promise { .sendCarriageReturn() .runAsync(); } + +export const addAuthWithOidcForNonJSProject = async ( + cwd: string, + settings?: { + resourceName?: string; + frontend?: string; + testingWithLatestCodebase?: boolean; + }, +): Promise => { + const { + FACEBOOK_APP_ID, + FACEBOOK_APP_SECRET, + GOOGLE_APP_ID, + GOOGLE_APP_SECRET, + AMAZON_APP_ID, + AMAZON_APP_SECRET, + APPLE_APP_ID, + APPLE_TEAM_ID, + APPLE_KEY_ID, + APPLE_PRIVATE_KEY, + } = getSocialProviders(); + + const resolvedSettings = { frontend: 'android', resourceName: 'oidcauthtest', testingWithLatestCodebase: false, ...settings }; + + const chain = spawn(getCLIPath(resolvedSettings.testingWithLatestCodebase), ['add', 'auth'], { cwd, stripColors: true }) + .wait('Do you want to use the default authentication') + .sendKeyDown(2) + .sendCarriageReturn() // Manual config + .wait('Select the authentication/authorization services that you want to use') + .sendCarriageReturn() + .wait('Provide a friendly name for your resource') + .sendLine(resolvedSettings.resourceName) + .wait('Enter a name for your identity pool') + .sendCarriageReturn() + .wait('Allow unauthenticated logins?') + .sendCarriageReturn() // No + .wait('Do you want to enable 3rd party authentication providers in your identity pool') + .sendCarriageReturn() // Yes + .wait('Select the third party identity providers you want to configure for your identity pool') + .sendCtrlA() + .sendCarriageReturn() + .wait('Enter your Facebook App ID for your identity pool') + .send('fbIDPool') + .sendCarriageReturn() + .wait('Enter your Google Web Client ID for your identity pool:') + .send('googleIDPool') + .sendCarriageReturn(); + if (resolvedSettings.frontend === 'ios') { + chain.wait('Enter your Google iOS Client ID for your identity pool').sendLine('googleiosclientId'); + } else if (resolvedSettings.frontend === 'android') { + chain.wait('Enter your Google Android Client ID for your identity pool').sendLine('googleandroidclientid'); + } + chain + .wait('Enter your Amazon App ID for your identity pool') + .send('amazonIDPool') + .sendCarriageReturn() + .wait('Enter your Bundle Identifier for your identity pool') + .send('appleIDPool') + .sendCarriageReturn() + .wait('Provide a name for your user pool') + .sendCarriageReturn() + .wait('How do you want users to be able to sign in') + .sendCarriageReturn() + .wait('Do you want to add User Pool Groups?') + .sendCarriageReturn() + .wait('Provide a name for your user pool group') + .sendLine('users') + .wait('Do you want to add another User Pool Group') + .sendCarriageReturn() // No + .wait('Sort the user pool groups in order of preference') + .sendCarriageReturn() + .wait('Do you want to add an admin queries API?') + .sendKeyDown() + .sendCarriageReturn() + .wait('Multifactor authentication (MFA) user login options') + .sendCarriageReturn() + .wait('Email based user registration/forgot password') + .sendCarriageReturn() + .wait('Specify an email verification subject:') + .sendCarriageReturn() + .wait('Specify an email verification message:') + .sendCarriageReturn() + .wait('Do you want to override the default password policy for this User Pool?') + .sendCarriageReturn() + .wait('What attributes are required for signing up?') + .sendCarriageReturn() + .wait("Specify the app's refresh token expiration period (in days)") + .sendCarriageReturn() + .wait('Do you want to specify the user attributes this app can read and write?') + .sendCarriageReturn() + .wait('Do you want to enable any of the following capabilities?') + .sendCarriageReturn() + .wait('Do you want to use an OAuth flow?') + .sendCarriageReturn() + .wait('What domain name prefix do you want to use?') + .sendCarriageReturn() + .wait('Enter your redirect signin URI') + .sendLine('https://www.google.com/') + .wait('Do you want to add another redirect signin URI') + .sendCarriageReturn() // No + .wait('Enter your redirect signout URI') + .sendLine('https://www.nytimes.com/') + .wait('Do you want to add another redirect signout UR') + .sendCarriageReturn() // No + .wait('Select the OAuth scopes enabled for this project') + .sendCarriageReturn() + .wait('Select the social providers you want to configure for your user pool') + .sendCtrlA() + .sendCarriageReturn() + .wait('Enter your Facebook App ID for your OAuth flow') + .sendLine(FACEBOOK_APP_ID) + .wait('Enter your Facebook App Secret for your OAuth flow') + .sendLine(FACEBOOK_APP_SECRET) + .wait('Enter your Google Web Client ID for your OAuth flow') + .sendLine(GOOGLE_APP_ID) + .wait('Enter your Google Web Client Secret for your OAuth flow') + .sendLine(GOOGLE_APP_SECRET) + .wait('Enter your Amazon App ID for your OAuth flow') + .sendLine(AMAZON_APP_ID) + .wait('Enter your Amazon App Secret for your OAuth flow') + .sendLine(AMAZON_APP_SECRET) + .wait('Enter your Services ID for your OAuth flow') + .sendLine(APPLE_APP_ID) + .wait('Enter your Team ID for your OAuth flow') + .sendLine(APPLE_TEAM_ID) + .wait('Enter your Key ID for your OAuth flow') + .sendLine(APPLE_KEY_ID) + .wait('Enter your Private Key for your OAuth flow') + .sendLine(APPLE_PRIVATE_KEY) + .wait('Do you want to configure Lambda Triggers for Cognito?') + .sendConfirmNo() + .sendEof(); + + return chain.runAsync(); +}; diff --git a/packages/amplify-e2e-core/src/categories/codegen.ts b/packages/amplify-e2e-core/src/categories/codegen.ts index 63d7ce42302..42af1c9ac10 100644 --- a/packages/amplify-e2e-core/src/categories/codegen.ts +++ b/packages/amplify-e2e-core/src/categories/codegen.ts @@ -1,5 +1,14 @@ import { getCLIPath, nspawn as spawn } from '..'; -export const generateModels = async (cwd: string): Promise => { - await spawn(getCLIPath(), ['codegen', 'models'], { cwd, stripColors: true }).runAsync(); +export const generateModels = ( + cwd: string, + settings?: { + expectXcode?: boolean; + }, +): Promise => { + const chain = spawn(getCLIPath(), ['codegen', 'models'], { cwd, stripColors: true }); + if (settings?.expectXcode) { + chain.wait('Updating Xcode project').wait('Successfully added models').wait('Amplify setup completed successfully.'); + } + return chain.runAsync(); }; diff --git a/packages/amplify-e2e-core/src/categories/geo.ts b/packages/amplify-e2e-core/src/categories/geo.ts index ef95914dfdc..ae4f9b9876a 100644 --- a/packages/amplify-e2e-core/src/categories/geo.ts +++ b/packages/amplify-e2e-core/src/categories/geo.ts @@ -26,7 +26,11 @@ const defaultSearchIndexQuestion = `Set this search index as the default? It wil const defaultMapQuestion = `Set this Map as the default? It will be used in Amplify Map API calls if no explicit reference is provided.`; const defaultGeofenceCollectionQuestion = `Set this geofence collection as the default? It will be used in Amplify geofence collection API calls if no explicit reference is provided.`; +const isWindowsPlatform = (): boolean => !!process?.platform?.startsWith('win'); export function getGeoJSONFilePath(fileName: string): string { + if (process.env.CODEBUILD_SRC_DIR && isWindowsPlatform()) { + return path.join(process.env.CODEBUILD_SRC_DIR, 'packages', 'amplify-e2e-tests', 'geo-json-files', fileName); + } return path.join(__dirname, '..', '..', '..', 'amplify-e2e-tests', 'geo-json-files', fileName); } diff --git a/packages/amplify-e2e-core/src/categories/lambda-function.ts b/packages/amplify-e2e-core/src/categories/lambda-function.ts index a917a9055f8..b17349b6bbc 100644 --- a/packages/amplify-e2e-core/src/categories/lambda-function.ts +++ b/packages/amplify-e2e-core/src/categories/lambda-function.ts @@ -7,12 +7,12 @@ import _ from 'lodash'; import { loadFeatureFlags } from '../utils/feature-flags'; type FunctionActions = 'create' | 'update'; -type FunctionRuntimes = 'dotnet6' | 'go' | 'java' | 'nodejs' | 'python'; +type FunctionRuntimes = 'dotnet8' | 'go' | 'java' | 'nodejs' | 'python'; type FunctionCallback = (chain: any, cwd: string, settings: any) => any; // runtimeChoices are shared between tests -export const runtimeChoices = ['.NET 6', 'Go', 'Java', 'NodeJS', 'Python']; +export const runtimeChoices = ['.NET 8', 'Go', 'Java', 'NodeJS', 'Python']; // templateChoices is per runtime const dotNetTemplateChoices = [ @@ -51,7 +51,7 @@ const additionalPermissions = (cwd: string, chain: ExecutionContext, settings: a if (settings.resourceChoices === undefined) { settings.resourceChoices = settings.resources; } - // when single resource, it gets autoselected + // when single resource, it gets auto selected if (settings.resourceChoices.length > 1) { chain.wait('Select the one you would like your Lambda to access'); if (settings.keepExistingResourceSelection) { @@ -116,15 +116,26 @@ const updateFunctionCore = (cwd: string, chain: ExecutionContext, settings: Core } } if (settings.secretsConfig) { - if (settings.secretsConfig.operation === 'add') { - throw new Error('Secres update walkthrough only supports update and delete'); - } - // this walkthrough assumes 1 existing secret is configured for the function const actions = ['Add a secret', 'Update a secret', 'Remove secrets', "I'm done"]; - const action = settings.secretsConfig.operation === 'delete' ? actions[2] : actions[1]; + const operation = settings.secretsConfig.operation; + let action: string; + if (operation === 'add') { + action = actions[0]; + } else if (operation === 'delete') { + action = actions[2]; + } else { + action = actions[1]; + } chain.wait('What do you want to do?'); singleSelect(chain, action, actions); - switch (settings.secretsConfig.operation) { + switch (operation) { + case 'add': { + chain.wait('Enter a secret name'); + chain.sendLine(settings.secretsConfig.name); + chain.wait('Enter the value for'); + chain.sendLine(settings.secretsConfig.value); + break; + } case 'delete': { chain.wait('Select the secrets to delete:'); chain.sendLine(' '); // assumes one secret @@ -137,14 +148,27 @@ const updateFunctionCore = (cwd: string, chain: ExecutionContext, settings: Core break; } } + chain.wait('What do you want to do?'); chain.sendCarriageReturn(); // "I'm done" + + if (operation === 'add') { + // assumes function is already pushed to the cloud + chain.wait('This will immediately update secret values in the cloud'); + chain.sendCarriageReturn(); // "Yes" + chain.wait('Do you want to edit the local lambda function now'); + chain.sendCarriageReturn(); // "No" + } } }; export type CoreFunctionSettings = { testingWithLatestCodebase?: boolean; name?: string; + packageManager?: { + name: string; + command?: string; + }; functionTemplate?: string; expectFailure?: boolean; additionalPermissions?: any; @@ -206,7 +230,8 @@ const coreFunction = ( settings.schedulePermissions || settings.layerOptions || settings.environmentVariables || - settings.secretsConfig + settings.secretsConfig || + settings.packageManager ) { chain.sendConfirmYes().wait('Do you want to access other resources in this project from your Lambda function?'); if (settings.additionalPermissions) { @@ -256,6 +281,20 @@ const coreFunction = ( chain.sendConfirmYes(); addSecretWalkthrough(chain, settings.secretsConfig); } + + if (runtime === 'nodejs') { + chain.wait('Choose the package manager that you want to use:'); + if (settings.packageManager?.name) { + chain.sendLine(settings.packageManager.name); + } else { + chain.sendCarriageReturn(); // npm + } + + if (settings.packageManager?.name.toLowerCase().includes('custom')) { + chain.wait('Enter command or script path to build your function:'); + chain.sendLine(settings.packageManager.command); + } + } } else { chain.sendConfirmNo(); } @@ -397,9 +436,9 @@ export interface LayerOptions { select?: string[]; // list options to select layerAndFunctionExist?: boolean; // whether this test involves both a function and a layer expectedListOptions?: string[]; // the expected list of all layers - versions?: Record; // map with keys for each element of select that determines the verison and expected version for each layer + versions?: Record; // map with keys for each element of select that determines the version and expected version for each layer customArns?: string[]; // external ARNs to enter - skipLayerAssignment?: boolean; // true if the layer assigment must be left unchanged for the function, otherwise true + skipLayerAssignment?: boolean; // true if the layer assignment must be left unchanged for the function, otherwise true layerWalkthrough?: (chain: ExecutionContext) => void; // If this function is provided the addLayerWalkthrough will invoke it instead of the standard one, suitable for full customization } @@ -616,7 +655,7 @@ export const functionCloudInvoke = async ( const getTemplateChoices = (runtime: FunctionRuntimes) => { switch (runtime) { - case 'dotnet6': + case 'dotnet8': return dotNetTemplateChoices; case 'go': return goTemplateChoices; @@ -633,8 +672,8 @@ const getTemplateChoices = (runtime: FunctionRuntimes) => { const getRuntimeDisplayName = (runtime: FunctionRuntimes) => { switch (runtime) { - case 'dotnet6': - return '.NET 6'; + case 'dotnet8': + return '.NET 8'; case 'go': return 'Go'; case 'java': diff --git a/packages/amplify-e2e-core/src/categories/notifications.ts b/packages/amplify-e2e-core/src/categories/notifications.ts index 369f772e2ec..058bd3fe21a 100644 --- a/packages/amplify-e2e-core/src/categories/notifications.ts +++ b/packages/amplify-e2e-core/src/categories/notifications.ts @@ -43,7 +43,7 @@ export const addNotificationChannel = async ( channel: string, hasAnalytics = false, hasAuth = false, - testingWithLatestCodebase = true, + testingWithLatestCodebase = false, ): Promise => { const chain = spawn(getCLIPath(testingWithLatestCodebase), ['add', 'notification'], { cwd, stripColors: true }); @@ -77,3 +77,27 @@ export const addNotificationChannel = async ( return chain.wait(`The ${channel} channel has been successfully enabled`).sendEof().runAsync(); }; + +/** + * Update notification resource for a given channel + * + * @param cwd the current working directory to run CLI in + * @param settings settings required to add a notification channel + * @param settings.resourceName the name to give to the created pinpoint resource + * @param channel the channel to add + */ +export const updateNotificationChannel = async ( + cwd: string, + channel: string, + enable = true, + testingWithLatestCodebase = false, +): Promise => { + const chain = spawn(getCLIPath(testingWithLatestCodebase), ['update', 'notification'], { cwd, stripColors: true }); + chain.wait('Choose the notification channel to configure').sendLine(channel); + chain.wait(`Do you want to ${enable ? 'enable' : 'disable'} the ${channel} channel`).sendYes(); + + return chain + .wait(`The ${channel} channel has been ${enable ? 'enabled' : 'disabled'}`) + .sendEof() + .runAsync(); +}; diff --git a/packages/amplify-e2e-core/src/categories/storage.ts b/packages/amplify-e2e-core/src/categories/storage.ts index f7886c1c0d0..2b3a84ef36e 100644 --- a/packages/amplify-e2e-core/src/categories/storage.ts +++ b/packages/amplify-e2e-core/src/categories/storage.ts @@ -278,11 +278,11 @@ export function overrideDDB(cwd: string) { }); } -export function buildOverrideStorage(cwd: string) { +export function buildOverrideStorage(cwd: string, env?: Record) { return new Promise((resolve, reject) => { // Add 'storage' as a category param once implemented const args = ['build']; - const chain = spawn(getCLIPath(), args, { cwd, stripColors: true }); + const chain = spawn(getCLIPath(), args, { cwd, stripColors: true, env }); chain.run((err: Error) => { if (!err) { resolve({}); @@ -458,35 +458,49 @@ export function addS3WithGuestAccess(cwd: string): Promise { } // Expects 2 existing user pool groups -export function addS3WithGroupAccess(cwd: string, settings: any): Promise { - return new Promise((resolve, reject) => { - spawn(getCLIPath(), ['add', 'storage'], { cwd, stripColors: true }) - .wait('Select from one of the below mentioned services') - .sendCarriageReturn() // Content - .wait('Provide a friendly name for your resource') - .sendCarriageReturn() // Default name - .wait('Provide bucket name') - .sendCarriageReturn() // Default name - .wait('Restrict access by') - .sendKeyDown() - .sendCarriageReturn() // Individual groups - .wait('Select groups') - .selectAll() // select all groups - .wait(`What kind of access do you want for ${settings?.userGroup1 ?? 'Admins'} users`) // for users? - .selectAll() // Select all permissions - .wait(`What kind of access do you want for ${settings?.userGroup2 ?? 'Users'} users`) // for users? - .selectAll() // Select all permissions - .wait('Do you want to add a Lambda Trigger for your S3 Bucket') - .sendConfirmNo() - .sendEof() - .run((err: Error) => { - if (!err) { - resolve(); - } else { - reject(err); - } - }); - }); +export function addS3WithGroupAccess(cwd: string, settings?: { userGroup1?: string; userGroup2?: string }): Promise { + return spawn(getCLIPath(), ['add', 'storage'], { cwd, stripColors: true }) + .wait('Select from one of the below mentioned services') + .sendCarriageReturn() // Content + .wait('Provide a friendly name for your resource') + .sendCarriageReturn() // Default name + .wait('Provide bucket name') + .sendCarriageReturn() // Default name + .wait('Restrict access by') + .sendKeyDown() + .sendCarriageReturn() // Individual groups + .wait('Select groups') + .selectAll() // select all groups + .wait(`What kind of access do you want for ${settings?.userGroup1 ?? 'Admins'} users`) // for users? + .selectAll() // Select all permissions + .wait(`What kind of access do you want for ${settings?.userGroup2 ?? 'Users'} users`) // for users? + .selectAll() // Select all permissions + .wait('Do you want to add a Lambda Trigger for your S3 Bucket') + .sendConfirmNo() + .sendEof() + .runAsync(); +} + +export function addS3WithFirstGroupAccess(cwd: string): Promise { + return spawn(getCLIPath(), ['add', 'storage'], { cwd, stripColors: true }) + .wait('Select from one of the below mentioned services') + .sendCarriageReturn() // Content + .wait('Provide a friendly name for your resource') + .sendCarriageReturn() // Default name + .wait('Provide bucket name') + .sendCarriageReturn() // Default name + .wait('Restrict access by') + .sendKeyDown() + .sendCarriageReturn() // Individual groups + .wait('Select groups') + .send(' ') // select first group + .sendCarriageReturn() + .wait(`What kind of access do you want for`) + .selectAll() // Select all permissions + .wait('Do you want to add a Lambda Trigger for your S3 Bucket') + .sendNo() + .sendCarriageReturn() + .runAsync(); } export function addS3WithTrigger(cwd: string): Promise { @@ -610,9 +624,9 @@ export function updateS3AddTriggerNewFunctionWithFunctionExisting(cwd: string, s }); } -export function addS3StorageWithIdpAuth(projectDir: string): Promise { +export function addS3StorageWithIdpAuth(projectDir: string, testingWithLatestCodebase = false): Promise { return new Promise((resolve, reject) => { - const chain = spawn(getCLIPath(), ['add', 'storage'], { cwd: projectDir, stripColors: true }); + const chain = spawn(getCLIPath(testingWithLatestCodebase), ['add', 'storage'], { cwd: projectDir, stripColors: true }); chain.wait('Select from one of the below mentioned services:').sendCarriageReturn(); //select - Content (Images, audio, video, etc.) @@ -647,9 +661,9 @@ export function addS3StorageWithIdpAuth(projectDir: string): Promise { }); } -export function addS3Storage(projectDir: string): Promise { +export function addS3Storage(projectDir: string, testingWithLatestCodebase = false): Promise { return new Promise((resolve, reject) => { - const chain = spawn(getCLIPath(), ['add', 'storage'], { cwd: projectDir, stripColors: true }); + const chain = spawn(getCLIPath(testingWithLatestCodebase), ['add', 'storage'], { cwd: projectDir, stripColors: true }); chain .wait('Select from one of the below mentioned services:') //'Content (Images, audio, video, etc.)' .sendCarriageReturn() @@ -677,9 +691,9 @@ export function addS3Storage(projectDir: string): Promise { }); } -export function addS3StorageWithAuthOnly(projectDir: string): Promise { +export function addS3StorageWithAuthOnly(projectDir: string, testingWithLatestCodebase = false): Promise { return new Promise((resolve, reject) => { - const chain = spawn(getCLIPath(), ['add', 'storage'], { cwd: projectDir, stripColors: true }); + const chain = spawn(getCLIPath(testingWithLatestCodebase), ['add', 'storage'], { cwd: projectDir, stripColors: true }); chain .wait('Select from one of the below mentioned services:') //'Content (Images, audio, video, etc.)' .sendCarriageReturn() diff --git a/packages/amplify-e2e-core/src/configure/index.ts b/packages/amplify-e2e-core/src/configure/index.ts index 81fc4398412..4c5523e7af2 100644 --- a/packages/amplify-e2e-core/src/configure/index.ts +++ b/packages/amplify-e2e-core/src/configure/index.ts @@ -8,6 +8,15 @@ type AmplifyConfiguration = { region?: string; }; +type CommandFlags = 'usage-data-on' | 'usage-data-off' | 'share-project-config-on' | 'share-project-config-off'; + +const commandFlagsReturnMessage: { [key in CommandFlags]: string } = { + 'usage-data-on': 'Usage Data has been turned on', + 'usage-data-off': 'Usage Data has been turned off', + 'share-project-config-on': 'Share Project Config has been turned on', + 'share-project-config-off': 'Share Project Config has been turned off', +}; + const defaultSettings = { profileName: 'amplify-integ-test-user', region: 'us-east-2', @@ -27,6 +36,7 @@ export const amplifyRegions = [ 'eu-central-1', 'ap-northeast-1', 'ap-northeast-2', + 'ap-northeast-3', 'ap-southeast-1', 'ap-southeast-2', 'ap-south-1', @@ -41,42 +51,48 @@ const authenticationOptions = ['AWS profile', 'AWS access keys']; const MANDATORY_PARAMS = ['accessKeyId', 'secretAccessKey', 'region']; -export function amplifyConfigure(settings: AmplifyConfiguration): Promise { - const s = { ...defaultSettings, ...settings }; - const missingParam = MANDATORY_PARAMS.filter((p) => !Object.keys(s).includes(p)); - if (missingParam.length) { - throw new Error(`mandatory params ${missingParam.join(' ')} are missing`); - } - - return new Promise((resolve, reject) => { - const chain = spawn(getCLIPath(), ['configure'], { stripColors: true }) - .wait('Sign in to your AWS administrator account:') - .wait('Press Enter to continue') - .sendCarriageReturn() - .wait('Specify the AWS Region'); - - singleSelect(chain, s.region, amplifyRegions); +export function amplifyConfigure(cwd: string | null, settings: AmplifyConfiguration | CommandFlags | null): Promise { + if (typeof settings === 'string') { + return spawn(getCLIPath(), ['configure', `--${settings}`], { cwd, stripColors: true }) + .wait(commandFlagsReturnMessage[settings]) + .runAsync(); + } else { + const allSettings = { ...defaultSettings, ...settings }; + const missingParam = MANDATORY_PARAMS.filter((p) => !Object.keys(allSettings).includes(p)); + if (missingParam.length) { + throw new Error(`mandatory params ${missingParam.join(' ')} are missing`); + } - chain - .wait('Press Enter to continue') - .sendCarriageReturn() - .wait('accessKeyId') - .pauseRecording() - .sendLine(s.accessKeyId) - .wait('secretAccessKey') - .sendLine(s.secretAccessKey) - .resumeRecording() - .wait('Profile Name:') - .sendLine(s.profileName) - .wait('Successfully set up the new user.') - .run((err: Error) => { - if (!err) { - resolve(); - } else { - reject(err); - } - }); - }); + return new Promise((resolve, reject) => { + const chain = spawn(getCLIPath(), ['configure'], { cwd, stripColors: true }) + .wait('Sign in to your AWS administrator account:') + .wait('Press Enter to continue') + .sendCarriageReturn() + .wait('Specify the AWS Region'); + + singleSelect(chain, allSettings.region, amplifyRegions); + + chain + .wait('Press Enter to continue') + .sendCarriageReturn() + .wait('accessKeyId') + .pauseRecording() + .sendLine(allSettings.accessKeyId) + .wait('secretAccessKey') + .sendLine(allSettings.secretAccessKey) + .resumeRecording() + .wait('Profile Name:') + .sendLine(allSettings.profileName) + .wait('Successfully set up the new user.') + .run((err: Error) => { + if (!err) { + resolve(); + } else { + reject(err); + } + }); + }); + } } export const amplifyConfigureBeforeOrAtV10_7 = (settings: AmplifyConfiguration): Promise => { diff --git a/packages/amplify-e2e-core/src/index.ts b/packages/amplify-e2e-core/src/index.ts index fe4cc70584a..1ed94b3ecdf 100644 --- a/packages/amplify-e2e-core/src/index.ts +++ b/packages/amplify-e2e-core/src/index.ts @@ -19,7 +19,7 @@ export * from './init'; export * from './utils'; export * from './categories'; export * from './export'; -export { addFeatureFlag } from './utils/feature-flags'; +export { addFeatureFlag, loadFeatureFlags } from './utils/feature-flags'; export * from './cli-version-controller'; declare global { diff --git a/packages/amplify-e2e-core/src/init/amplifyPull.ts b/packages/amplify-e2e-core/src/init/amplifyPull.ts index 48449160b35..6dcd4ba64f4 100644 --- a/packages/amplify-e2e-core/src/init/amplifyPull.ts +++ b/packages/amplify-e2e-core/src/init/amplifyPull.ts @@ -166,8 +166,7 @@ export const amplifyStudioHeadlessPull = ( awscloudformation: { configLevel: 'project', useProfile: true, - // eslint-disable-next-line spellcheck/spell-checker - profileName: profileName ?? 'amplify-integ-test-user', + profileName: profileName ?? TEST_PROFILE_NAME, }, }; const args = ['pull', '--amplify', JSON.stringify({ appId, envName }), '--providers', JSON.stringify(providersConfig), '--yes']; diff --git a/packages/amplify-e2e-core/src/init/amplifyPush.ts b/packages/amplify-e2e-core/src/init/amplifyPush.ts index 41ab098ca07..699091354e6 100644 --- a/packages/amplify-e2e-core/src/init/amplifyPush.ts +++ b/packages/amplify-e2e-core/src/init/amplifyPush.ts @@ -68,6 +68,17 @@ export const amplifyPushLegacy = async (cwd: string): Promise => { .runAsync(); }; +/** + * Function to test amplify push with --yes + */ +export const amplifyPushNonInteractive = async (cwd: string, testingWithLatestCodebase = false): Promise => { + await spawn(getCLIPath(testingWithLatestCodebase), ['push', '--yes'], { + cwd, + stripColors: true, + noOutputTimeout: pushTimeoutMS, + }).runAsync(); +}; + /** * Function to test amplify push with codegen for graphql API */ @@ -203,8 +214,8 @@ export function amplifyPushUpdateLegacy( /** * Function to test amplify push */ -export const amplifyPushAuth = (cwd: string, testingWithLatestCodebase = false): Promise => - spawn(getCLIPath(testingWithLatestCodebase), ['push'], { cwd, stripColors: true, noOutputTimeout: pushTimeoutMS }) +export const amplifyPushAuth = (cwd: string, testingWithLatestCodebase = false, env?: Record): Promise => + spawn(getCLIPath(testingWithLatestCodebase), ['push'], { cwd, stripColors: true, noOutputTimeout: pushTimeoutMS, env }) .wait('Are you sure you want to continue?') .sendYes() .wait(/.*/) @@ -400,14 +411,18 @@ export const amplifyPushDestructiveApiUpdate = (cwd: string, includeForce: boole /** * Function to test amplify push with overrides functionality */ -export const amplifyPushOverride = async (cwd: string, testingWithLatestCodebase = false): Promise => { +export const amplifyPushOverride = async ( + cwd: string, + testingWithLatestCodebase = false, + env: Record = {}, +): Promise => { // Test detailed status await spawn(getCLIPath(testingWithLatestCodebase), ['status', '-v'], { cwd, stripColors: true, noOutputTimeout: pushTimeoutMS }) .wait(/.*/) .runAsync(); // Test amplify push - await spawn(getCLIPath(testingWithLatestCodebase), ['push'], { cwd, stripColors: true, noOutputTimeout: pushTimeoutMS }) + await spawn(getCLIPath(testingWithLatestCodebase), ['push'], { cwd, stripColors: true, noOutputTimeout: pushTimeoutMS, env }) .wait('Are you sure you want to continue?') .sendConfirmYes() .wait(/.*/) diff --git a/packages/amplify-e2e-core/src/init/initProjectHelper.ts b/packages/amplify-e2e-core/src/init/initProjectHelper.ts index 5771cf9f17b..88c32280bf4 100644 --- a/packages/amplify-e2e-core/src/init/initProjectHelper.ts +++ b/packages/amplify-e2e-core/src/init/initProjectHelper.ts @@ -27,6 +27,8 @@ const defaultSettings = { providerConfig: undefined, permissionsBoundaryArn: undefined, includeUsageDataPrompt: true, + includeGen2RecommendationPrompt: true, + testingWithLatestCodebase: false, }; export function initJSProjectWithProfile(cwd: string, settings?: Partial): Promise { @@ -53,12 +55,22 @@ export function initJSProjectWithProfile(cwd: string, settings?: Partial 20) console.warn('Project names should not be longer than 20 characters. This may cause tests to break.'); - const chain = spawn(getCLIPath(), cliArgs, { + const chain = spawn(getCLIPath(s.testingWithLatestCodebase), cliArgs, { cwd, stripColors: true, env, disableCIDetection: s.disableCIDetection, - }) + }); + + if (s.includeGen2RecommendationPrompt) { + chain + .wait('Do you want to continue with Amplify Gen 1?') + .sendYes() + .wait('Why would you like to use Amplify Gen 1?') + .sendCarriageReturn(); + } + + chain .wait('Enter a name for the project') .sendLine(s.name) .wait('Initialize the project with the above configuration?') @@ -90,7 +102,7 @@ export function initJSProjectWithProfile(cwd: string, settings?: Partial { @@ -170,6 +186,10 @@ export function initIosProjectWithProfile(cwd: string, settings: Record { @@ -199,6 +219,40 @@ export function initIosProjectWithProfile(cwd: string, settings: Record { + return spawn(getCLIPath(), ['init'], { + cwd, + stripColors: true, + }) + .wait('Do you want to continue with Amplify Gen 1?') + .sendYes() + .wait('Why would you like to use Amplify Gen 1?') + .sendCarriageReturn() + .wait('Enter a name for the project') + .sendCarriageReturn() + .wait('Initialize the project with the above configuration?') + .sendConfirmNo() + .wait('Enter a name for the environment') + .sendLine(defaultSettings.envName) + .wait('Choose your default editor:') + .sendKeyDown(2) + .sendCarriageReturn() + .wait("Choose the type of app that you're building") + .sendLine('ios') + .wait('Select the authentication method you want to use:') + .sendCarriageReturn() + .wait('Please choose the profile you want to use') + .sendLine(defaultSettings.profileName) + .wait(/Help improve Amplify CLI by sharing non( |-)sensitive( | project )configurations on failures/) + .sendYes() + .wait('Updating Xcode project:') + .wait('Amplify project found.') + .wait('Amplify config files found.') + .wait('Successfully updated project') + .wait('Amplify setup completed successfully.') + .runAsync(); +} + export function initFlutterProjectWithProfile(cwd: string, settings: Record): Promise { const s = { ...defaultSettings, ...settings }; @@ -206,6 +260,10 @@ export function initFlutterProjectWithProfile(cwd: string, settings: Record { const chain = spawn(getCLIPath(), ['init'], { cwd, stripColors: true }) + .wait('Do you want to continue with Amplify Gen 1?') + .sendYes() + .wait('Why would you like to use Amplify Gen 1?') + .sendCarriageReturn() .wait('Enter a name for the project') .sendLine(s.name) .wait('Initialize the project with the above configuration?') @@ -226,7 +284,7 @@ export function initFlutterProjectWithProfile(cwd: string, settings: Record { @@ -255,6 +313,10 @@ export function initProjectWithAccessKey( CLI_DEV_INTERNAL_DISABLE_AMPLIFY_APP_CREATION: '1', }, }) + .wait('Do you want to continue with Amplify Gen 1?') + .sendYes() + .wait('Why would you like to use Amplify Gen 1?') + .sendCarriageReturn() .wait('Enter a name for the project') .sendLine(s.name) .wait('Initialize the project with the above configuration?') @@ -289,7 +351,7 @@ export function initProjectWithAccessKey( singleSelect(chain, s.region, amplifyRegions); chain - .wait('Help improve Amplify CLI by sharing non sensitive configurations on failures') + .wait('Help improve Amplify CLI by sharing non-sensitive project configurations on failures') .sendYes() .wait(/Try "amplify add api" to create a backend API and then "amplify (push|publish)" to deploy everything/) .run((err: Error) => { @@ -482,6 +544,16 @@ export function amplifyStatus(cwd: string, expectedStatus: string, testingWithLa }); } -export function initHeadless(cwd: string, envName: string, appId: string): Promise { - return spawn(getCLIPath(), ['init', '--yes', '--envName', envName, '--appId', appId], { cwd, stripColors: true }).runAsync(); +export function initHeadless(cwd: string, envName?: string, appId?: string): Promise { + const cliArgs = ['init', '--yes']; + + if (envName) { + cliArgs.push('--envName', envName); + } + + if (appId) { + cliArgs.push('--appId', appId); + } + + return spawn(getCLIPath(), cliArgs, { cwd, stripColors: true }).runAsync(); } diff --git a/packages/amplify-e2e-core/src/nexpect-reporter.js b/packages/amplify-e2e-core/src/nexpect-reporter.js index e9f3a5392f5..47fd9ba5b75 100644 --- a/packages/amplify-e2e-core/src/nexpect-reporter.js +++ b/packages/amplify-e2e-core/src/nexpect-reporter.js @@ -96,8 +96,8 @@ class AmplifyCLIExecutionReporter { }), ); } - let sanitizedSections = []; - for (let section of commandAndParams) { + const sanitizedSections = []; + for (const section of commandAndParams) { // this ensures only alphanumeric values are in the file name sanitizedSections.push(section.replace(/[^a-z0-9]/gi, '_').toLowerCase()); } diff --git a/packages/amplify-e2e-tests/src/schema-api-directives/authHelper.ts b/packages/amplify-e2e-core/src/utils/auth-utils.ts similarity index 50% rename from packages/amplify-e2e-tests/src/schema-api-directives/authHelper.ts rename to packages/amplify-e2e-core/src/utils/auth-utils.ts index 9b6f490577e..194efe18861 100644 --- a/packages/amplify-e2e-tests/src/schema-api-directives/authHelper.ts +++ b/packages/amplify-e2e-core/src/utils/auth-utils.ts @@ -1,16 +1,24 @@ +import { Amplify, Auth } from 'aws-amplify'; +import AWSAppSyncClient, { AUTH_TYPE } from 'aws-appsync'; import { CognitoIdentityServiceProvider } from 'aws-sdk'; -import { getProjectMeta, getBackendAmplifyMeta } from '@aws-amplify/amplify-e2e-core'; -import Amplify, { Auth } from 'aws-amplify'; import fs from 'fs-extra'; import path from 'path'; -import AWSAppSyncClient, { AUTH_TYPE } from 'aws-appsync'; +import { getAwsAndroidConfig, getAwsIOSConfig, getBackendAmplifyMeta, getCLIInputs, getProjectMeta, setCLIInputs } from './projectMeta'; +import { getUserPoolClients } from './sdk-calls'; +import { AddAuthUserPoolOnlyWithOAuthSettings } from '../categories'; -const tempPassword = 'tempPassword'; +const tempPassword = 'tempPassword1@'; //setupUser will add user to a cognito group and make its status to be "CONFIRMED", //if groupName is specified, add the user to the group. -export async function setupUser(userPoolId: string, username: string, password: string, groupName?: string) { - const cognitoClient = getConfiguredCognitoClient(); +export async function setupUser( + userPoolId: string, + username: string, + password: string, + groupName?: string, + region?: string, +): Promise { + const cognitoClient = getConfiguredCognitoClient(region); await cognitoClient .adminCreateUser({ UserPoolId: userPoolId, @@ -34,12 +42,8 @@ export async function setupUser(userPoolId: string, username: string, password: } } -export async function addUserToGroup( - cognitoClient: CognitoIdentityServiceProvider, - userPoolId: string, - username: string, - groupName?: string, -) { +export async function addUserToGroup(userPoolId: string, username: string, groupName: string, region?: string): Promise { + const cognitoClient = getConfiguredCognitoClient(region); await cognitoClient .adminAddUserToGroup({ UserPoolId: userPoolId, @@ -49,14 +53,14 @@ export async function addUserToGroup( .promise(); } -export function getConfiguredCognitoClient(): CognitoIdentityServiceProvider { - const cognitoClient = new CognitoIdentityServiceProvider({ apiVersion: '2016-04-19', region: process.env.CLI_REGION }); +export function getConfiguredCognitoClient(region = process.env.CLI_REGION): CognitoIdentityServiceProvider { + const cognitoClient = new CognitoIdentityServiceProvider({ apiVersion: '2016-04-19', region }); const awsconfig = { accessKeyId: process.env.AWS_ACCESS_KEY_ID, secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY, sessionToken: process.env.AWS_SESSION_TOKEN, - region: process.env.CLI_REGION, + region, }; cognitoClient.config.update(awsconfig); @@ -64,7 +68,7 @@ export function getConfiguredCognitoClient(): CognitoIdentityServiceProvider { return cognitoClient; } -export function getConfiguredAppsyncClientCognitoAuth(url: string, region: string, user: any): any { +export function getConfiguredAppsyncClientCognitoAuth(url: string, region: string, user: any) { return new AWSAppSyncClient({ url, region, @@ -76,7 +80,7 @@ export function getConfiguredAppsyncClientCognitoAuth(url: string, region: strin }); } -export function getConfiguredAppsyncClientOIDCAuth(url: string, region: string, user: any): any { +export function getConfiguredAppsyncClientOIDCAuth(url: string, region: string, user: any) { return new AWSAppSyncClient({ url, region, @@ -100,7 +104,7 @@ export function getConfiguredAppsyncClientAPIKeyAuth(url: string, region: string }); } -export function getConfiguredAppsyncClientIAMAuth(url: string, region: string): any { +export function getConfiguredAppsyncClientIAMAuth(url: string, region: string) { return new AWSAppSyncClient({ url, region, @@ -121,6 +125,10 @@ export async function signInUser(username: string, password: string) { return user; } +export async function signOutUser(): Promise { + await Auth.signOut({ global: true }); +} + export function configureAmplify(projectDir: string) { const awsconfig = getAWSExports(projectDir); Amplify.configure(awsconfig); @@ -136,25 +144,33 @@ export function getAWSExports(projectDir: string) { export function getUserPoolId(projectDir: string): string { const amplifyMeta = getProjectMeta(projectDir); - const cognitoResource = Object.values(amplifyMeta.auth).find((res: any) => { + const cognitoResource = Object.values<{ service: string; output: { UserPoolId: string } }>(amplifyMeta.auth).find((res) => { return res.service === 'Cognito'; - }) as any; + }); return cognitoResource.output.UserPoolId; } +export function getHostedUIDomain(projectDir: string): string { + const amplifyMeta = getProjectMeta(projectDir); + const cognitoResource = Object.values<{ service: string; output: { HostedUIDomain: string } }>(amplifyMeta.auth).find((res) => { + return res.service === 'Cognito'; + }); + return cognitoResource.output.HostedUIDomain; +} + export function getCognitoResourceName(projectDir: string): string { const amplifyMeta = getBackendAmplifyMeta(projectDir); - const cognitoResourceName = Object.keys(amplifyMeta.auth).find((key: any) => { + const cognitoResourceName = Object.keys(amplifyMeta.auth).find((key: string) => { return amplifyMeta.auth[key].service === 'Cognito'; - }) as any; + }); return cognitoResourceName; } export function getApiKey(projectDir: string): string { const amplifyMeta = getProjectMeta(projectDir); - const appsyncResource = Object.values(amplifyMeta.api).find((res: any) => { + const appsyncResource = Object.values<{ service: string; output: { GraphQLAPIKeyOutput: string } }>(amplifyMeta.api).find((res) => { return res.service === 'AppSync'; - }) as any; + }); return appsyncResource.output.GraphQLAPIKeyOutput; } @@ -166,11 +182,11 @@ export async function authenticateUser(username: string, tempPassword: string, p } } -export function getUserPoolIssUrl(projectDir: string) { +export function getUserPoolIssUrl(projectDir: string): string { const amplifyMeta = getProjectMeta(projectDir); - const cognitoResource = Object.values(amplifyMeta.auth).find((res: any) => { + const cognitoResource = Object.values<{ service: string; output: { UserPoolId: string } }>(amplifyMeta.auth).find((res) => { return res.service === 'Cognito'; - }) as any; + }); const userPoolId = cognitoResource.output.UserPoolId; const region = amplifyMeta.providers.awscloudformation.Region; @@ -180,9 +196,72 @@ export function getUserPoolIssUrl(projectDir: string) { export function getAppClientIDWeb(projectDir: string) { const amplifyMeta = getProjectMeta(projectDir); - const cognitoResource = Object.values(amplifyMeta.auth).find((res: any) => { + const cognitoResource = Object.values<{ service: string; output: { AppClientIDWeb: string } }>(amplifyMeta.auth).find((res) => { return res.service === 'Cognito'; - }) as any; + }); return cognitoResource.output.AppClientIDWeb; } + +/** + * asserts app client secret in projects files and on cloud + */ +export const assertAppClientSecretInFiles = async (projRoot: string, frontend: 'android' | 'ios'): Promise => { + let config; + switch (frontend) { + case 'android': + config = await getAwsAndroidConfig(projRoot); + break; + case 'ios': + config = await getAwsIOSConfig(projRoot); + break; + } + const clientSecretInAwsConfig = config.CognitoUserPool.Default.AppClientSecret; + expect(clientSecretInAwsConfig).toBeDefined(); + const meta = getProjectMeta(projRoot); + const id = Object.keys(meta.auth)[0]; + const authMeta = meta.auth[id]; + const clientIds = [authMeta.output.AppClientID]; + const clientSecretInMetaFile = authMeta.output.AppClientSecret; + // compare client secret in meta file and ios config file + expect(clientSecretInMetaFile).toBeDefined(); + expect(clientSecretInAwsConfig).toEqual(clientSecretInMetaFile); + const clients = await getUserPoolClients(authMeta.output.UserPoolId, clientIds, meta.providers.awscloudformation.Region); + expect(clients[0].UserPoolClient.ClientSecret).toBeDefined(); + // compare client secret in meta file with cloud value + expect(clients[0].UserPoolClient.ClientSecret).toEqual(clientSecretInMetaFile); +}; + +export const updateCLIParametersToGenerateUserPoolClientSecret = (projRoot: string, resourceName?: string) => { + if (!resourceName) { + const meta = getProjectMeta(projRoot); + resourceName = Object.keys(meta.auth)[0]; + } + // update parameter to generate client Secret + const parameters = getCLIInputs(projRoot, 'auth', resourceName); + parameters.cognitoConfig.userpoolClientGenerateSecret = true; + setCLIInputs(projRoot, 'auth', resourceName, parameters); +}; + +export const createUserPoolOnlyWithOAuthSettings = (projectPrefix: string, shortId: string): AddAuthUserPoolOnlyWithOAuthSettings => { + return { + resourceName: `${projectPrefix}oares${shortId}`, + userPoolName: `${projectPrefix}oaup${shortId}`, + domainPrefix: `${projectPrefix}oadom${shortId}`, + signInUrl1: 'https://sin1/', + signInUrl2: 'https://sin2/', + signOutUrl1: 'https://sout1/', + signOutUrl2: 'https://sout2/', + facebookAppId: 'facebookAppId', + facebookAppSecret: 'facebookAppSecret', + googleAppId: 'googleAppId', + googleAppSecret: 'googleAppSecret', + amazonAppId: 'amazonAppId', + amazonAppSecret: 'amazonAppSecret', + appleAppClientId: 'com.fake.app', + appleAppTeamId: '2QLEWNDK6K', + appleAppKeyID: '2QLZXKYJ8J', + appleAppPrivateKey: + '----BEGIN PRIVATE KEY----MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgIltgNsTgTfSzUadYiCS0VYtDDMFln/J8i1yJsSIw5g+gCgYIKoZIzj0DAQehRANCAASI8E0L/DhR/mIfTT07v3VwQu6q8I76lgn7kFhT0HvWoLuHKGQFcFkXXCgztgBrprzd419mUChAnKE6y89bWcNw----END PRIVATE KEY----', + }; +}; diff --git a/packages/amplify-e2e-core/src/utils/credentials-rotator.ts b/packages/amplify-e2e-core/src/utils/credentials-rotator.ts new file mode 100644 index 00000000000..e0e82f849d1 --- /dev/null +++ b/packages/amplify-e2e-core/src/utils/credentials-rotator.ts @@ -0,0 +1,70 @@ +import { AssumeRoleCommand, STSClient } from '@aws-sdk/client-sts'; +import { fromContainerMetadata } from '@aws-sdk/credential-providers'; +import { generateRandomShortId, TEST_PROFILE_NAME } from './index'; +import * as ini from 'ini'; +import * as fs from 'fs-extra'; +import { pathManager } from '@aws-amplify/amplify-cli-core'; + +const refreshCredentials = async (roleArn: string) => { + const client = new STSClient({ + // Use CodeBuild role to assume test account role. I.e. don't read credentials from process.env + credentials: fromContainerMetadata(), + }); + const sessionName = `testSession${generateRandomShortId()}`; + const command = new AssumeRoleCommand({ + RoleArn: roleArn, + RoleSessionName: sessionName, + DurationSeconds: 3600, + }); + const response = await client.send(command); + + const profileName = TEST_PROFILE_NAME; + const credentialsContents = ini.parse((await fs.readFile(pathManager.getAWSCredentialsFilePath())).toString()); + credentialsContents[profileName] = credentialsContents[profileName] || {}; + credentialsContents[profileName].aws_access_key_id = response.Credentials.AccessKeyId; + credentialsContents[profileName].aws_secret_access_key = response.Credentials.SecretAccessKey; + credentialsContents[profileName].aws_session_token = response.Credentials.SessionToken; + process.env.AWS_ACCESS_KEY_ID = response.Credentials.AccessKeyId; + process.env.AWS_SECRET_ACCESS_KEY = response.Credentials.SecretAccessKey; + process.env.AWS_SESSION_TOKEN = response.Credentials.SessionToken; + await fs.writeFile(pathManager.getAWSCredentialsFilePath(), ini.stringify(credentialsContents)); +}; + +const tryRefreshCredentials = async (roleArn: string) => { + try { + await refreshCredentials(roleArn); + console.log('Test profile credentials refreshed'); + } catch (e) { + console.error('Test profile credentials request failed'); + console.error(e); + } +}; + +let isRotationBackgroundTaskAlreadyScheduled = false; + +/** + * Schedules a background task that attempts to refresh test account credentials + * on given interval. + * + * No-op outside Amplify CI environment. + * + * No-op if a background task has already been scheduled. + */ +export const tryScheduleCredentialRefresh = () => { + if (!process.env.IS_AMPLIFY_CI || !process.env.TEST_ACCOUNT_ROLE || isRotationBackgroundTaskAlreadyScheduled) { + return; + } + + if (!process.env.USE_PARENT_ACCOUNT) { + throw new Error('Credentials rotator supports only tests running in parent account at this time'); + } + + // Attempts to refresh credentials in background every 15 minutes. + setInterval(() => { + void tryRefreshCredentials(process.env.TEST_ACCOUNT_ROLE); + }, 15 * 60 * 1000); + + isRotationBackgroundTaskAlreadyScheduled = true; + + console.log('Test profile credentials refresh was scheduled'); +}; diff --git a/packages/amplify-e2e-core/src/utils/index.ts b/packages/amplify-e2e-core/src/utils/index.ts index 19652691bf6..af69143a86c 100644 --- a/packages/amplify-e2e-core/src/utils/index.ts +++ b/packages/amplify-e2e-core/src/utils/index.ts @@ -10,6 +10,7 @@ import { getLayerDirectoryName, LayerDirectoryType } from '..'; export * from './add-circleci-tags'; export * from './api'; export * from './appsync'; +export * from './auth-utils'; export * from './envVars'; export * from './getAppId'; export * from './headless'; @@ -28,12 +29,18 @@ export * from './admin-ui'; export * from './hooks'; export * from './git-operations'; export * from './help'; +export * from './credentials-rotator'; /** * Whether the current environment is CircleCI or not */ export const isCI = (): boolean => JSON.parse(process.env.CI || 'false') && JSON.parse(process.env.CIRCLECI || 'false'); +/** + * Whether the current run is smoke test run. + */ +export const isSmokeTestRun = (): boolean => JSON.parse(process.env.IS_AMPLIFY_CLI_SMOKE_TEST_RUN || 'false'); + // eslint-disable-next-line spellcheck/spell-checker export const TEST_PROFILE_NAME = isCI() ? 'amplify-integ-test-user' : 'default'; diff --git a/packages/amplify-e2e-core/src/utils/nexpect.ts b/packages/amplify-e2e-core/src/utils/nexpect.ts index f5946e704a2..1071f556723 100644 --- a/packages/amplify-e2e-core/src/utils/nexpect.ts +++ b/packages/amplify-e2e-core/src/utils/nexpect.ts @@ -160,7 +160,7 @@ function chain(context: Context): ExecutionContext { wait( expectation: string | RegExp, - callback = (data: string) => { + callback: (data: string) => void = () => { // empty }, ): ExecutionContext { @@ -307,7 +307,7 @@ function chain(context: Context): ExecutionContext { }, name: '_send', shift: true, - description: "'[send] Y ", + description: '[send] N', requiresInput: false, }; context.queue.push(_send); @@ -737,7 +737,7 @@ export function nspawn(command: string | string[], params: string[] = [], option } const testingWithLatestCodebase = isTestingWithLatestCodebase(command); - if (testingWithLatestCodebase || (process.platform === 'win32' && !command.endsWith('.exe'))) { + if (testingWithLatestCodebase || (process.platform === 'win32' && !(command.endsWith('.exe') || command.endsWith('.cmd')))) { params.unshift(command); command = getScriptRunnerPath(testingWithLatestCodebase); } @@ -753,7 +753,7 @@ export function nspawn(command: string | string[], params: string[] = [], option // For push operations in E2E we have to explicitly disable the Amplify Console App creation // as for the tests that need it, it is already enabled for init, setting the env var here // disables the post push check we have in the CLI. - if (params.length > 0 && params.find((param: string) => param.toLowerCase() === 'push')) { + if (params.length > 0 && params.some((param: string) => param.toLowerCase() === 'push')) { pushEnv = { CLI_DEV_INTERNAL_DISABLE_AMPLIFY_APP_CREATION: '1', }; @@ -771,14 +771,9 @@ export function nspawn(command: string | string[], params: string[] = [], option }; // Undo ci-info detection, required for some tests + // see https://github.com/watson/ci-info/blob/master/index.js#L57 if (options.disableCIDetection === true) { - delete childEnv.CI; - delete childEnv.CONTINUOUS_INTEGRATION; - delete childEnv.BUILD_NUMBER; - delete childEnv.TRAVIS; - delete childEnv.GITHUB_ACTIONS; - delete childEnv.CIRCLECI; - delete childEnv.CIRCLE_PULL_REQUEST; + childEnv.CI = false; } } diff --git a/packages/amplify-e2e-core/src/utils/pinpoint.ts b/packages/amplify-e2e-core/src/utils/pinpoint.ts index b9f6ec9aec8..eb40a64d1e9 100644 --- a/packages/amplify-e2e-core/src/utils/pinpoint.ts +++ b/packages/amplify-e2e-core/src/utils/pinpoint.ts @@ -1,5 +1,4 @@ import { Pinpoint } from 'aws-sdk'; -import _ from 'lodash'; import { EOL } from 'os'; import { getCLIPath, nspawn as spawn, singleSelect, amplifyRegions, addCircleCITags, KEY_DOWN_ARROW } from '..'; @@ -67,6 +66,10 @@ export function initProjectForPinpoint(cwd: string): Promise { CLI_DEV_INTERNAL_DISABLE_AMPLIFY_APP_CREATION: '1', }, }) + .wait('Do you want to continue with Amplify Gen 1?') + .sendYes() + .wait('Why would you like to use Amplify Gen 1?') + .sendCarriageReturn() .wait('Enter a name for the project') .sendLine(settings.name) .wait('Initialize the project with the above configuration?') @@ -101,7 +104,7 @@ export function initProjectForPinpoint(cwd: string): Promise { singleSelect(chain, settings.region, amplifyRegions); chain - .wait('Help improve Amplify CLI by sharing non sensitive configurations on failures') + .wait('Help improve Amplify CLI by sharing non-sensitive project configurations on failures') .sendYes() .wait(/Try "amplify add api" to create a backend API and then "amplify (push|publish)" to deploy everything/) .run((err: Error) => { @@ -117,7 +120,7 @@ export function initProjectForPinpoint(cwd: string): Promise { /** * adds a pinpoint resource, you may specific a name for the resource */ -export function addPinpointAnalytics(cwd: string, testingWithLatestCodebase = true, pinPointResourceName?: string): Promise { +export function addPinpointAnalytics(cwd: string, testingWithLatestCodebase = false, pinPointResourceName?: string): Promise { const resourceName = pinPointResourceName || settings.pinpointResourceName; return new Promise((resolve, reject) => { spawn(getCLIPath(testingWithLatestCodebase), ['add', 'analytics'], { cwd, stripColors: true }) diff --git a/packages/amplify-e2e-core/src/utils/sdk-calls.ts b/packages/amplify-e2e-core/src/utils/sdk-calls.ts index 0ebc0b24adf..5e0f5f0acf4 100644 --- a/packages/amplify-e2e-core/src/utils/sdk-calls.ts +++ b/packages/amplify-e2e-core/src/utils/sdk-calls.ts @@ -1,9 +1,9 @@ /* eslint-disable @typescript-eslint/explicit-function-return-type */ /* eslint-disable no-return-await */ import { - config, DynamoDB, S3, + CognitoIdentity, CognitoIdentityServiceProvider, Lambda, LexModelBuildingService, @@ -134,22 +134,107 @@ export const deleteS3Bucket = async (bucket: string, providedS3Client: S3 | unde }; export const getUserPool = async (userpoolId, region) => { - config.update({ region }); let res; try { - res = await new CognitoIdentityServiceProvider().describeUserPool({ UserPoolId: userpoolId }).promise(); + res = await new CognitoIdentityServiceProvider({ region }).describeUserPool({ UserPoolId: userpoolId }).promise(); } catch (e) { console.log(e); } return res; }; +export const deleteUserPoolDomain = async (domain: string, userpoolId: string, region: string) => { + let res; + try { + res = await new CognitoIdentityServiceProvider({ region }).deleteUserPoolDomain({ Domain: domain, UserPoolId: userpoolId }).promise(); + } catch (e) { + console.log(e); + } + return res; +}; + +export const deleteSocialIdpProviders = async (providers: string[], userpoolId: string, region: string) => { + for (const provider of providers) { + try { + await new CognitoIdentityServiceProvider({ region }) + .deleteIdentityProvider({ ProviderName: provider, UserPoolId: userpoolId }) + .promise(); + } catch (err) { + console.log(err); + } + } +}; + +export const listSocialIdpProviders = async (userpoolId: string, region: string) => { + let res; + try { + res = await new CognitoIdentityServiceProvider({ region }).listIdentityProviders({ UserPoolId: userpoolId }).promise(); + } catch (err) { + console.log(err); + } + return res; +}; + +export const getSocialIdpProvider = async ( + userpoolId: string, + providerName: 'Facebook' | 'Google' | 'LoginWithAmazon' | 'SignInWithApple', + region: string, +) => { + let res; + try { + res = await new CognitoIdentityServiceProvider({ region }) + .describeIdentityProvider({ + UserPoolId: userpoolId, + ProviderName: providerName, + }) + .promise(); + } catch (err) { + console.log(err); + } + return res; +}; + +export const getUserPoolDomain = async (domain: string, region: string) => { + let res; + try { + res = await new CognitoIdentityServiceProvider({ region }) + .describeUserPoolDomain({ + Domain: domain, + }) + .promise(); + } catch (err) { + console.log(err); + } + return res; +}; + +export const getIdentityPoolRoles = async (identityPoolId: string, region: string) => { + let res; + + try { + res = await new CognitoIdentity({ region }).getIdentityPoolRoles({ IdentityPoolId: identityPoolId }).promise(); + } catch (e) { + console.log(e); + } + + return res; +}; + +export const listUserPools = async (region, maxResults = 5) => { + let res; + try { + res = await new CognitoIdentityServiceProvider({ region }).listUserPools({ MaxResults: maxResults }).promise(); + } catch (e) { + console.log(e); + } + return res?.UserPools ?? []; +}; + export const getMFAConfiguration = async ( userPoolId: string, region: string, ): Promise => { - config.update({ region }); - return await new CognitoIdentityServiceProvider().getUserPoolMfaConfig({ UserPoolId: userPoolId }).promise(); + return await new CognitoIdentityServiceProvider({ region }).getUserPoolMfaConfig({ UserPoolId: userPoolId }).promise(); }; export const getLambdaFunction = async (functionName: string, region: string) => { @@ -193,6 +278,18 @@ export const addUserToUserPool = async (userPoolId: string, region: string) => { await provider.adminCreateUser(params).promise(); }; +/** + * list all users in a Cognito user pool + */ +export const listUsersInUserPool = async (userPoolId: string, region: string): Promise => { + const provider = new CognitoIdentityServiceProvider({ region }); + const params = { + UserPoolId: userPoolId /* required */, + }; + const { Users } = await provider.listUsers(params).promise(); + return Users.map((u) => u.Username); +}; + /** * list all userPool groups to which a user belongs to */ @@ -342,8 +439,7 @@ export const putKinesisRecords = async (data: string, partitionKey: string, stre }; export const getCloudWatchEventRule = async (targetName: string, region: string) => { - config.update({ region }); - const service = new CloudWatchEvents(); + const service = new CloudWatchEvents({ region }); const params = { TargetArn: targetName /* required */, }; diff --git a/packages/amplify-e2e-tests/CHANGELOG.md b/packages/amplify-e2e-tests/CHANGELOG.md index 995fbc83ff6..713da3c02e2 100644 --- a/packages/amplify-e2e-tests/CHANGELOG.md +++ b/packages/amplify-e2e-tests/CHANGELOG.md @@ -3,6 +3,386 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [4.11.2](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.11.1...amplify-e2e-tests@4.11.2) (2025-01-30) + +**Note:** Version bump only for package amplify-e2e-tests + + + + + +## [4.11.1](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.11.0...amplify-e2e-tests@4.11.1) (2025-01-16) + +**Note:** Version bump only for package amplify-e2e-tests + + + + + +# [4.11.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.10.1...amplify-e2e-tests@4.11.0) (2025-01-02) + + +### Bug Fixes + +* UIBuilder test ([#14047](https://github.com/aws-amplify/amplify-cli/issues/14047)) ([c1d60c4](https://github.com/aws-amplify/amplify-cli/commit/c1d60c46617501dd408d4f78d16e8828886e23cb)) + + +### Features + +* lambda dotnet 8 support ([#14026](https://github.com/aws-amplify/amplify-cli/issues/14026)) ([540bfe1](https://github.com/aws-amplify/amplify-cli/commit/540bfe1187907609c3c813e1208c12b6a2a6ac6c)) + + + + + +## [4.10.1](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.10.0...amplify-e2e-tests@4.10.1) (2024-11-18) + +**Note:** Version bump only for package amplify-e2e-tests + + + + + +# [4.10.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.9.11...amplify-e2e-tests@4.10.0) (2024-10-05) + + +### Bug Fixes + +* update message when expecting s3 to throw ([de45143](https://github.com/aws-amplify/amplify-cli/commit/de45143f83b92781c6412da9a49257ab5f94eeab)) + + +### Features + +* add init prompts for Gen2 ([#13849](https://github.com/aws-amplify/amplify-cli/issues/13849)) ([7ab8fae](https://github.com/aws-amplify/amplify-cli/commit/7ab8faef1e2ce0c15db783d236aeee9d312ec135)) + + + + + +## [4.9.11](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.9.10...amplify-e2e-tests@4.9.11) (2024-08-02) + +**Note:** Version bump only for package amplify-e2e-tests + + + + + +## [4.9.10](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.9.9...amplify-e2e-tests@4.9.10) (2024-06-27) + +**Note:** Version bump only for package amplify-e2e-tests + + + + + +## [4.9.9](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.9.8...amplify-e2e-tests@4.9.9) (2024-06-20) + +**Note:** Version bump only for package amplify-e2e-tests + + + + + +## [4.9.8](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.9.7...amplify-e2e-tests@4.9.8) (2024-06-06) + +**Note:** Version bump only for package amplify-e2e-tests + + + + + +## [4.9.7](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.9.6...amplify-e2e-tests@4.9.7) (2024-05-24) + + +### Bug Fixes + +* don't create symlinks after extracting zip ([#13791](https://github.com/aws-amplify/amplify-cli/issues/13791)) ([08f358d](https://github.com/aws-amplify/amplify-cli/commit/08f358da33163fa70930ae6ef900e1d018672ef1)) + + + + + +## [4.9.6](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.9.5...amplify-e2e-tests@4.9.6) (2024-05-07) + +**Note:** Version bump only for package amplify-e2e-tests + + + + + +## [4.9.5](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.9.4...amplify-e2e-tests@4.9.5) (2024-04-18) + +**Note:** Version bump only for package amplify-e2e-tests + + + + + +## [4.9.4](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.9.3...amplify-e2e-tests@4.9.4) (2024-04-15) + + +### Bug Fixes + +* upgrade Go runtime and fix e2e ([#13671](https://github.com/aws-amplify/amplify-cli/issues/13671)) ([395f717](https://github.com/aws-amplify/amplify-cli/commit/395f717cf52e7beef76f00ee08d37877138b0c30)) +* yarn modern install workspace ([#13197](https://github.com/aws-amplify/amplify-cli/issues/13197)) ([3ca4aa9](https://github.com/aws-amplify/amplify-cli/commit/3ca4aa99457e54a89805f86e56b475aaef531d7e)) + + + + + +## [4.9.3](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.9.2...amplify-e2e-tests@4.9.3) (2024-03-29) + +**Note:** Version bump only for package amplify-e2e-tests + + + + + +## [4.9.2](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.9.1...amplify-e2e-tests@4.9.2) (2024-03-06) + + +### Bug Fixes + +* limit query parameter parsing in auth admin api ([#13512](https://github.com/aws-amplify/amplify-cli/issues/13512)) ([2480681](https://github.com/aws-amplify/amplify-cli/commit/24806814ce2275fe7d70e5484c3c485023b8041a)) + + + + + +## [4.9.1](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.9.0...amplify-e2e-tests@4.9.1) (2023-12-16) + +**Note:** Version bump only for package amplify-e2e-tests + + + + + +# [4.9.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.8.5...amplify-e2e-tests@4.9.0) (2023-12-11) + + +### Features + +* bump data dependencies to launch RDS feature ([#13409](https://github.com/aws-amplify/amplify-cli/issues/13409)) ([7fbf29f](https://github.com/aws-amplify/amplify-cli/commit/7fbf29f56eb7335d20de0b5526fbed7795a2af09)) + + + + + +## [4.8.5](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.8.3...amplify-e2e-tests@4.8.5) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [4.8.4](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.8.3...amplify-e2e-tests@4.8.4) (2023-11-08) + +**Note:** Version bump only for package amplify-e2e-tests + + + + + +## [4.8.3](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.8.2...amplify-e2e-tests@4.8.3) (2023-11-08) + + +### Bug Fixes + +* parse cognito pools with service role ([#13365](https://github.com/aws-amplify/amplify-cli/issues/13365)) ([1513938](https://github.com/aws-amplify/amplify-cli/commit/1513938ed2808c407853daf291912c0e644158c9)) + + + + + +## [4.8.2](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.8.1...amplify-e2e-tests@4.8.2) (2023-10-21) + +**Note:** Version bump only for package amplify-e2e-tests + + + + + +## [4.8.1](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.8.0...amplify-e2e-tests@4.8.1) (2023-10-12) + + +### Bug Fixes + +* add retained secrets to syncSecretDeltas ([#13300](https://github.com/aws-amplify/amplify-cli/issues/13300)) ([f3c9c05](https://github.com/aws-amplify/amplify-cli/commit/f3c9c05617b55560ac78f824cf71d4001cb5c58b)) +* set awscloudformation flag to false in vscode settings after override ([#13310](https://github.com/aws-amplify/amplify-cli/issues/13310)) ([d60e505](https://github.com/aws-amplify/amplify-cli/commit/d60e505391b4f8fc58c2cc4d352698a6157f1b59)) + + + + + +# [4.8.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.7.1...amplify-e2e-tests@4.8.0) (2023-10-05) + + +### Bug Fixes + +* dependabot alert for openpgp ([#13282](https://github.com/aws-amplify/amplify-cli/issues/13282)) ([49314ad](https://github.com/aws-amplify/amplify-cli/commit/49314ad063cfb3111af2a5406028c5c73958cd24)) +* pulling with env append to local files ([#13227](https://github.com/aws-amplify/amplify-cli/issues/13227)) ([ef1c43f](https://github.com/aws-amplify/amplify-cli/commit/ef1c43fd955596366114e883b2db31fda55feaf8)) + + +### Features + +* **amplify-util-uibuilder:** amplify js backwards compatibility ([#13288](https://github.com/aws-amplify/amplify-cli/issues/13288)) ([2db3e18](https://github.com/aws-amplify/amplify-cli/commit/2db3e181cf06954085eb8fade0b26162672327db)) + + + + + +## [4.7.1](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.7.0...amplify-e2e-tests@4.7.1) (2023-10-03) + + +### Bug Fixes + +* update api category and codegen to capture high-priority bug-fixes ([3836b90](https://github.com/aws-amplify/amplify-cli/commit/3836b90b3f9ccd654d9c1b61a4b83c9c4712290c)) + + + + + +# [4.7.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.6.0...amplify-e2e-tests@4.7.0) (2023-09-22) + + +### Bug Fixes + +* remove stale data ([#13128](https://github.com/aws-amplify/amplify-cli/issues/13128)) ([9703223](https://github.com/aws-amplify/amplify-cli/commit/970322372278762fff88f7046b44574b611ad210)) + + +### Features + +* **amplify-frontend-javascript:** generate amplifyconfiguration.json for JS projects ([#13246](https://github.com/aws-amplify/amplify-cli/issues/13246)) ([49457b1](https://github.com/aws-amplify/amplify-cli/commit/49457b100a75dc2c6791780fdf67f76876bcf320)) + + +### Reverts + +* Revert "test: add function to run init with only yes option" ([08734a9](https://github.com/aws-amplify/amplify-cli/commit/08734a9d2d9dba671ed3cff59b84f4f456c03927)) + + + + + +# [4.6.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.5.0...amplify-e2e-tests@4.6.0) (2023-08-31) + + +### Features + +* add list all to lambda crud template ([#13116](https://github.com/aws-amplify/amplify-cli/issues/13116)) ([0fde28a](https://github.com/aws-amplify/amplify-cli/commit/0fde28a08a3d82b371cbbf858f462648376a318a)) + + + + + +# [4.5.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.4.0...amplify-e2e-tests@4.5.0) (2023-08-17) + + +### Features + +* generate components using graphql ([1568581](https://github.com/aws-amplify/amplify-cli/commit/15685810460881aa71e88724398b9be05ba53781)) + + + + + +# [4.4.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.3.3...amplify-e2e-tests@4.4.0) (2023-08-09) + + +### Bug Fixes + +* remove vm2 ([#12989](https://github.com/aws-amplify/amplify-cli/issues/12989)) ([7bc0b56](https://github.com/aws-amplify/amplify-cli/commit/7bc0b5654a585104a537c1a3f9615bd672435b58)) +* surface override build error if scripting features are disabled ([#13013](https://github.com/aws-amplify/amplify-cli/issues/13013)) ([fa80249](https://github.com/aws-amplify/amplify-cli/commit/fa802491f8767f50dc3636e190fb70eb492fa969)) + + +### Features + +* replace oauth and userpoolclient lambdas with cfn and sdk calls ([#12935](https://github.com/aws-amplify/amplify-cli/issues/12935)) ([b3ab512](https://github.com/aws-amplify/amplify-cli/commit/b3ab5125f2ec405afd1af9d2f77b8683d5914010)) +* replace role mapping lambda in auth category ([#13003](https://github.com/aws-amplify/amplify-cli/issues/13003)) ([4ce0329](https://github.com/aws-amplify/amplify-cli/commit/4ce032932702305b9f9564a77418855ceb0f0fca)) + + + + + +## [4.3.3](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.3.2...amplify-e2e-tests@4.3.3) (2023-07-28) + + +### Bug Fixes + +* surface override build error if scripting features are disabled ([#13013](https://github.com/aws-amplify/amplify-cli/issues/13013)) ([#13023](https://github.com/aws-amplify/amplify-cli/issues/13023)) ([9e99800](https://github.com/aws-amplify/amplify-cli/commit/9e998008c6aef13ee50e6ce88cc78d8e9367b66a)) + + + + + +## [4.3.2](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.3.1...amplify-e2e-tests@4.3.2) (2023-07-27) + +**Note:** Version bump only for package amplify-e2e-tests + + + + + +## [4.3.1](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.3.0...amplify-e2e-tests@4.3.1) (2023-07-24) + +**Note:** Version bump only for package amplify-e2e-tests + + + + + +# [4.3.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.2.5...amplify-e2e-tests@4.3.0) (2023-07-20) + + +### Bug Fixes + +* added Prepush after init and before deploy ([#12674](https://github.com/aws-amplify/amplify-cli/issues/12674)) ([a54f837](https://github.com/aws-amplify/amplify-cli/commit/a54f83743b5995317170c9b4f5a140e5a1aa57f3)) +* ensure AWS_REGION matches CLI_REGION in all tests ([#12837](https://github.com/aws-amplify/amplify-cli/issues/12837)) ([7be43e4](https://github.com/aws-amplify/amplify-cli/commit/7be43e41ded3bf09fd20cd9d9b95467491344cbe)) +* fetch deployment key from current-cloud-backend ([#12687](https://github.com/aws-amplify/amplify-cli/issues/12687)) ([af0bf82](https://github.com/aws-amplify/amplify-cli/commit/af0bf82d18b3a30d4cdac2cdd14b8534e0ffff1d)) +* fix yarn path ([#12769](https://github.com/aws-amplify/amplify-cli/issues/12769)) ([dca98aa](https://github.com/aws-amplify/amplify-cli/commit/dca98aa35e544dce4cf0ac9f340919b87041e65f)) +* smoke test flakynes ([#12760](https://github.com/aws-amplify/amplify-cli/issues/12760)) ([5654640](https://github.com/aws-amplify/amplify-cli/commit/56546401274820207bc2e64fb682bbe2ed1981f2)) +* update notification channel name lookup ([#12763](https://github.com/aws-amplify/amplify-cli/issues/12763)) ([92ca721](https://github.com/aws-amplify/amplify-cli/commit/92ca721134d59b68e85d4f92f4814d6717a3be3a)) + + +### Features + +* lambda support for yarn2/3 and pnpm package managers ([#12750](https://github.com/aws-amplify/amplify-cli/issues/12750)) ([fd18195](https://github.com/aws-amplify/amplify-cli/commit/fd181952672efb0479ca6955c0c7a45fe248d1b1)) +* uibuilder codegen service ([#12896](https://github.com/aws-amplify/amplify-cli/issues/12896)) ([3fe2f98](https://github.com/aws-amplify/amplify-cli/commit/3fe2f98a99a9daf22efccb23a031882ea2be899b)) + + +### Reverts + +* Revert "chore: cleanup stale resources in CodeBuild (#12779)" (#12853) ([d19d17e](https://github.com/aws-amplify/amplify-cli/commit/d19d17ebcace24c9db56331c0c2bd053f8ec0966)), closes [#12779](https://github.com/aws-amplify/amplify-cli/issues/12779) [#12853](https://github.com/aws-amplify/amplify-cli/issues/12853) +* Revert "test: make test teardown resilient to failures (#12799)" (#12823) ([ec098ca](https://github.com/aws-amplify/amplify-cli/commit/ec098caa57174b928cf6b024a1bc419a65dd8aff)), closes [#12799](https://github.com/aws-amplify/amplify-cli/issues/12799) [#12823](https://github.com/aws-amplify/amplify-cli/issues/12823) + + + + + +## [4.2.5](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.2.4...amplify-e2e-tests@4.2.5) (2023-06-16) + +**Note:** Version bump only for package amplify-e2e-tests + + + + + +## [4.2.4](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.2.3...amplify-e2e-tests@4.2.4) (2023-06-13) + + +### Bug Fixes + +* deploy category resources when calling amplify push ([#12587](https://github.com/aws-amplify/amplify-cli/issues/12587)) ([260723c](https://github.com/aws-amplify/amplify-cli/commit/260723cb67432308dd35a4ddbedacfbbc69c6c81)) +* do not throw when localEnvInfo is missing on pull (fixes 12492) ([#12528](https://github.com/aws-amplify/amplify-cli/issues/12528)) ([0ae8689](https://github.com/aws-amplify/amplify-cli/commit/0ae8689efbb3907393f493c8707ab025573fb487)) +* remove parameters when resource is deleted or unlinked ([#12544](https://github.com/aws-amplify/amplify-cli/issues/12544)) ([f78fb68](https://github.com/aws-amplify/amplify-cli/commit/f78fb686f4719ef8a487251ded8bf01b9df29dbd)) + + + + + ## [4.2.3](https://github.com/aws-amplify/amplify-cli/compare/amplify-e2e-tests@4.2.1...amplify-e2e-tests@4.2.3) (2023-05-25) diff --git a/packages/amplify-e2e-tests/Readme.md b/packages/amplify-e2e-tests/Readme.md index 77e5daccbbf..eb780cc7401 100644 --- a/packages/amplify-e2e-tests/Readme.md +++ b/packages/amplify-e2e-tests/Readme.md @@ -4,27 +4,27 @@ This packages contains end to end tests that are run in CircleCI to ensure that ## Setup -To run the tests locally, you need to have your AWS credentials stored in a `.env` file of this package. These values are used to configure the test projects. +To run the tests locally, you need to have your personal AWS credentials stored in a `.env` file of this package. These values are used to configure the test projects. -Please see sample.env for the keys that are expected in your `.env` file. +Please see sample.env for the keys that are expected in your `.env` file. Or, for internal engineers, you can copy "Copy bash/zsh" directly from your personal account, and paste it in the terminal. -The `.env` file does not get commited as its in the `.gitignore` file. +The `.env` file does not get committed as its in the `.gitignore` file. -Set `AMPLIFY_PATH` to point to `amplify-cli/bin/amplify` +Set `AMPLIFY_PATH` to point to `amplify-cli/bin/amplify` or using absolute path `/packages/amplify-cli/bin/amplify` ## Running individual tests -Amplify E2E tests use Jest. So all the standard Jest comnmads work. +Amplify E2E tests use Jest. So all the standard Jest commands work. You can run a single test while adding a new test by running ```bash cd /packages/amplify-e2e-tests/ -npm run e2e src/__tests__/init.test.ts +yarn e2e src/__tests__/init_a.test.ts ``` ## Writing a new integration test -E2E tests internally use a forked version of [nexpect](https://www.npmjs.com/package/nexpect) to run the CLI. There are helper methods that helps you to set up and delete project. The recommended pattern is to create a helper method that creates a resources as a helper method so these method could be used in other tests. For instance, `initJSProjectWithProfile` is a helper method that is used in `init` tests and also used in all the other tests to initalize a new Javascript project. The tests should have all the assertions to make sure the resource created by the helper method is setup correctly. We recommend using `aws-sdk` to make assert the resource configuration. +E2E tests internally use a forked version of [nexpect](https://www.npmjs.com/package/nexpect) to run the CLI. There are helper methods that helps you to set up and delete project. The recommended pattern is to create a helper method that creates a resources as a helper method so these method could be used in other tests. For instance, `initJSProjectWithProfile` is a helper method that is used in `init` tests and also used in all the other tests to initialize a new Javascript project. The tests should have all the assertions to make sure the resource created by the helper method is setup correctly. We recommend using `aws-sdk` to make assert the resource configuration. To configure the amount of time nexpect will wait for CLI responses, you can set the `AMPLIFY_TEST_TIMEOUT_SEC` environment variable. It is helpful to set this to a low value (10 seconds or so) when writing new tests so that you don't spend unnecessary time waiting for nexpect to error out on a misconfigured wait() block diff --git a/packages/amplify-e2e-tests/functions/s3-list-objects.js b/packages/amplify-e2e-tests/functions/s3-list-objects.js index 031a372761e..849e88491ce 100644 --- a/packages/amplify-e2e-tests/functions/s3-list-objects.js +++ b/packages/amplify-e2e-tests/functions/s3-list-objects.js @@ -3,7 +3,7 @@ const awsS3Client = new AWS.S3(); const bucketEnvVar = '{{bucketEnvVar}}'; // This value is replaced from test exports.handler = async () => { - let listObjects = await awsS3Client + const listObjects = await awsS3Client .listObjectsV2({ Bucket: process.env[bucketEnvVar], }) diff --git a/packages/amplify-e2e-tests/package.json b/packages/amplify-e2e-tests/package.json index d3b41173dad..4e8d7b7f2de 100644 --- a/packages/amplify-e2e-tests/package.json +++ b/packages/amplify-e2e-tests/package.json @@ -1,6 +1,6 @@ { "name": "amplify-e2e-tests", - "version": "4.2.3", + "version": "4.11.2", "description": "", "repository": { "type": "git", @@ -22,38 +22,42 @@ "build-tests": "tsc --build tsconfig.tests.json", "setup-profile": "ts-node ./src/configure_tests.ts", "clean-e2e-resources": "ts-node ./src/cleanup-e2e-resources.ts", - "smoketest": "jest --runInBand --testPathPattern='smoketest' --config=jest.config.js" + "smoketest": "yarn e2e --testPathPattern='src/__tests__/smoke-tests/.*.test.ts'" }, "dependencies": { - "@aws-amplify/amplify-category-auth": "3.2.3", - "@aws-amplify/amplify-cli-core": "4.0.8", - "@aws-amplify/amplify-e2e-core": "5.0.3", - "@aws-amplify/amplify-opensearch-simulator": "1.4.3", - "@aws-amplify/graphql-transformer-core": "^1.3.2", - "@aws-sdk/client-appsync": "^3.303.0", - "@aws-sdk/client-dynamodb": "^3.303.0", - "@aws-sdk/client-ssm": "^3.303.0", - "amplify-dynamodb-simulator": "2.7.3", - "amplify-headless-interface": "1.17.3", - "amplify-storage-simulator": "1.9.0", - "aws-amplify": "^4.2.8", + "@aws-amplify/amplify-category-auth": "3.7.17", + "@aws-amplify/amplify-cli-core": "4.3.11", + "@aws-amplify/amplify-e2e-core": "5.7.1", + "@aws-amplify/amplify-opensearch-simulator": "1.7.16", + "@aws-amplify/graphql-transformer-core": "^2.9.4", + "@aws-sdk/client-appsync": "3.624.0", + "@aws-sdk/client-dynamodb": "3.624.0", + "@aws-sdk/client-s3": "3.624.0", + "@aws-sdk/client-ssm": "3.624.0", + "@babel/core": "^7.23.2", + "@babel/plugin-transform-modules-commonjs": "7.10.4", + "amplify-dynamodb-simulator": "2.9.20", + "amplify-headless-interface": "1.17.7", + "amplify-storage-simulator": "1.11.6", + "aws-amplify": "^5.3.16", "aws-appsync": "^4.1.1", - "aws-cdk-lib": "~2.68.0", - "aws-sdk": "^2.1354.0", - "axios": "^0.26.0", - "circleci-api": "^4.1.4", + "aws-cdk-lib": "~2.177.0", + "aws-sdk": "^2.1464.0", + "axios": "^1.6.7", "constructs": "^10.0.5", "dotenv": "^8.2.0", "esm": "^3.2.25", "execa": "^5.1.1", - "extract-zip": "^2.0.1", "fs-extra": "^8.1.0", + "get-port": "^5.1.1", "glob": "^8.0.3", "graphql-tag": "^2.10.1", - "graphql-transformer-core": "^8.1.2", + "graphql-transformer-core": "^8.2.13", "isomorphic-fetch": "^3.0.0", "lodash": "^4.17.21", + "moment": "^2.24.0", "node-fetch": "^2.6.7", + "node-pty": "^1.0.0", "rimraf": "^3.0.0", "title-case": "^3.0.3", "upper-case": "^2.0.2", @@ -66,8 +70,10 @@ "@types/express": "^4.17.3", "@types/lodash": "^4.14.149", "@types/node": "^18.16.1", + "@types/openpgp": "^4.4.18", "@types/ws": "^7.4.4", "jest": "^29.5.0", + "openpgp": "^5.10.2", "ts-jest": "^29.1.0", "ts-node": "^10.4.0" }, diff --git a/packages/amplify-e2e-tests/resources/example-ios-app/.gitignore b/packages/amplify-e2e-tests/resources/example-ios-app/.gitignore new file mode 100644 index 00000000000..875d04b5e66 --- /dev/null +++ b/packages/amplify-e2e-tests/resources/example-ios-app/.gitignore @@ -0,0 +1,22 @@ + + +#amplify-do-not-edit-begin +amplify/\#current-cloud-backend +amplify/.config/local-* +amplify/logs +amplify/mock-data +amplify/backend/amplify-meta.json +amplify/backend/.temp +build/ +dist/ +node_modules/ +aws-exports.js +awsconfiguration.json +amplifyconfiguration.json +amplifyconfiguration.dart +amplify-build-config.json +amplify-gradle-config.json +amplifytools.xcconfig +.secret-* +**.sample +#amplify-do-not-edit-end diff --git a/packages/amplify-e2e-tests/resources/example-ios-app/Gemfile b/packages/amplify-e2e-tests/resources/example-ios-app/Gemfile new file mode 100644 index 00000000000..adc90d98cfc --- /dev/null +++ b/packages/amplify-e2e-tests/resources/example-ios-app/Gemfile @@ -0,0 +1,3 @@ +source "https://rubygems.org" + +gem "fastlane" \ No newline at end of file diff --git a/packages/amplify-e2e-tests/resources/example-ios-app/Gemfile.lock b/packages/amplify-e2e-tests/resources/example-ios-app/Gemfile.lock new file mode 100644 index 00000000000..f71d7604dbe --- /dev/null +++ b/packages/amplify-e2e-tests/resources/example-ios-app/Gemfile.lock @@ -0,0 +1,221 @@ +GEM + remote: https://rubygems.org/ + specs: + CFPropertyList (3.0.5) + rexml + addressable (2.8.0) + public_suffix (>= 2.0.2, < 5.0) + artifactory (3.0.15) + atomos (0.1.3) + aws-eventstream (1.2.0) + aws-partitions (1.575.0) + aws-sdk-core (3.130.0) + aws-eventstream (~> 1, >= 1.0.2) + aws-partitions (~> 1, >= 1.525.0) + aws-sigv4 (~> 1.1) + jmespath (~> 1.0) + aws-sdk-kms (1.55.0) + aws-sdk-core (~> 3, >= 3.127.0) + aws-sigv4 (~> 1.1) + aws-sdk-s3 (1.113.0) + aws-sdk-core (~> 3, >= 3.127.0) + aws-sdk-kms (~> 1) + aws-sigv4 (~> 1.4) + aws-sigv4 (1.4.0) + aws-eventstream (~> 1, >= 1.0.2) + babosa (1.0.4) + claide (1.1.0) + colored (1.2) + colored2 (3.1.2) + commander (4.6.0) + highline (~> 2.0.0) + declarative (0.0.20) + digest-crc (0.6.4) + rake (>= 12.0.0, < 14.0.0) + domain_name (0.5.20190701) + unf (>= 0.0.5, < 1.0.0) + dotenv (2.7.6) + emoji_regex (3.2.3) + excon (0.92.2) + faraday (1.10.0) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) + faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0) + faraday-multipart (~> 1.0) + faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.0) + faraday-patron (~> 1.0) + faraday-rack (~> 1.0) + faraday-retry (~> 1.0) + ruby2_keywords (>= 0.0.4) + faraday-cookie_jar (0.0.7) + faraday (>= 0.8.0) + http-cookie (~> 1.0.0) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) + faraday-excon (1.1.0) + faraday-httpclient (1.0.1) + faraday-multipart (1.0.3) + multipart-post (>= 1.2, < 3) + faraday-net_http (1.0.1) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + faraday-rack (1.0.0) + faraday-retry (1.0.3) + faraday_middleware (1.2.0) + faraday (~> 1.0) + fastimage (2.2.6) + fastlane (2.214.0) + CFPropertyList (>= 2.3, < 4.0.0) + addressable (>= 2.8, < 3.0.0) + artifactory (~> 3.0) + aws-sdk-s3 (~> 1.0) + babosa (>= 1.0.3, < 2.0.0) + bundler (>= 1.12.0, < 3.0.0) + colored + commander (~> 4.6) + dotenv (>= 2.1.1, < 3.0.0) + emoji_regex (>= 0.1, < 4.0) + excon (>= 0.71.0, < 1.0.0) + faraday (~> 1.0) + faraday-cookie_jar (~> 0.0.6) + faraday_middleware (~> 1.0) + fastimage (>= 2.1.0, < 3.0.0) + gh_inspector (>= 1.1.2, < 2.0.0) + google-apis-androidpublisher_v3 (~> 0.3) + google-apis-playcustomapp_v1 (~> 0.1) + google-cloud-storage (~> 1.31) + highline (~> 2.0) + json (< 3.0.0) + jwt (>= 2.1.0, < 3) + mini_magick (>= 4.9.4, < 5.0.0) + multipart-post (>= 2.0.0, < 3.0.0) + naturally (~> 2.2) + optparse (~> 0.1.1) + plist (>= 3.1.0, < 4.0.0) + rubyzip (>= 2.0.0, < 3.0.0) + security (= 0.1.3) + simctl (~> 1.6.3) + terminal-notifier (>= 2.0.0, < 3.0.0) + terminal-table (>= 1.4.5, < 2.0.0) + tty-screen (>= 0.6.3, < 1.0.0) + tty-spinner (>= 0.8.0, < 1.0.0) + word_wrap (~> 1.0.0) + xcodeproj (>= 1.13.0, < 2.0.0) + xcpretty (~> 0.3.0) + xcpretty-travis-formatter (>= 0.0.3) + gh_inspector (1.1.3) + google-apis-androidpublisher_v3 (0.18.0) + google-apis-core (>= 0.4, < 2.a) + google-apis-core (0.4.2) + addressable (~> 2.5, >= 2.5.1) + googleauth (>= 0.16.2, < 2.a) + httpclient (>= 2.8.1, < 3.a) + mini_mime (~> 1.0) + representable (~> 3.0) + retriable (>= 2.0, < 4.a) + rexml + webrick + google-apis-iamcredentials_v1 (0.10.0) + google-apis-core (>= 0.4, < 2.a) + google-apis-playcustomapp_v1 (0.7.0) + google-apis-core (>= 0.4, < 2.a) + google-apis-storage_v1 (0.13.0) + google-apis-core (>= 0.4, < 2.a) + google-cloud-core (1.6.0) + google-cloud-env (~> 1.0) + google-cloud-errors (~> 1.0) + google-cloud-env (1.6.0) + faraday (>= 0.17.3, < 3.0) + google-cloud-errors (1.2.0) + google-cloud-storage (1.36.1) + addressable (~> 2.8) + digest-crc (~> 0.4) + google-apis-iamcredentials_v1 (~> 0.1) + google-apis-storage_v1 (~> 0.1) + google-cloud-core (~> 1.6) + googleauth (>= 0.16.2, < 2.a) + mini_mime (~> 1.0) + googleauth (1.1.2) + faraday (>= 0.17.3, < 3.a) + jwt (>= 1.4, < 3.0) + memoist (~> 0.16) + multi_json (~> 1.11) + os (>= 0.9, < 2.0) + signet (>= 0.16, < 2.a) + highline (2.0.3) + http-cookie (1.0.4) + domain_name (~> 0.5) + httpclient (2.8.3) + jmespath (1.6.1) + json (2.6.1) + jwt (2.3.0) + memoist (0.16.2) + mini_magick (4.11.0) + mini_mime (1.1.2) + multi_json (1.15.0) + multipart-post (2.0.0) + nanaimo (0.3.0) + naturally (2.2.1) + optparse (0.1.1) + os (1.1.4) + plist (3.6.0) + public_suffix (4.0.7) + rake (13.0.6) + representable (3.1.1) + declarative (< 0.1.0) + trailblazer-option (>= 0.1.1, < 0.2.0) + uber (< 0.2.0) + retriable (3.1.2) + rexml (3.3.9) + rouge (2.0.7) + ruby2_keywords (0.0.5) + rubyzip (2.3.2) + security (0.1.3) + signet (0.16.1) + addressable (~> 2.8) + faraday (>= 0.17.5, < 3.0) + jwt (>= 1.5, < 3.0) + multi_json (~> 1.10) + simctl (1.6.8) + CFPropertyList + naturally + terminal-notifier (2.0.0) + terminal-table (1.8.0) + unicode-display_width (~> 1.1, >= 1.1.1) + trailblazer-option (0.1.2) + tty-cursor (0.7.1) + tty-screen (0.8.1) + tty-spinner (0.9.3) + tty-cursor (~> 0.7) + uber (0.1.0) + unf (0.1.4) + unf_ext + unf_ext (0.0.8.1) + unicode-display_width (1.8.0) + webrick (1.8.2) + word_wrap (1.0.0) + xcodeproj (1.19.0) + CFPropertyList (>= 2.3.3, < 4.0) + atomos (~> 0.1.3) + claide (>= 1.0.2, < 2.0) + colored2 (~> 3.1) + nanaimo (~> 0.3.0) + xcpretty (0.3.0) + rouge (~> 2.0.7) + xcpretty-travis-formatter (1.0.1) + xcpretty (~> 0.2, >= 0.0.7) + +PLATFORMS + arm64-darwin-21 + universal-darwin-20 + x86_64-darwin-19 + x86_64-darwin-21 + x86_64-linux + +DEPENDENCIES + fastlane + +BUNDLED WITH + 2.3.11 diff --git a/packages/amplify-e2e-tests/resources/example-ios-app/MyAmplifyApp.xcodeproj/project.pbxproj b/packages/amplify-e2e-tests/resources/example-ios-app/MyAmplifyApp.xcodeproj/project.pbxproj new file mode 100644 index 00000000000..8a538c9f561 --- /dev/null +++ b/packages/amplify-e2e-tests/resources/example-ios-app/MyAmplifyApp.xcodeproj/project.pbxproj @@ -0,0 +1,525 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 52; + objects = { + +/* Begin PBXBuildFile section */ + 3A136F0C28060295006292EF /* MyAmplifyAppApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A136F0B28060295006292EF /* MyAmplifyAppApp.swift */; }; + 3A136F0E28060295006292EF /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A136F0D28060295006292EF /* ContentView.swift */; }; + 3A136F102806029E006292EF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3A136F0F2806029E006292EF /* Assets.xcassets */; }; + 3A136F132806029E006292EF /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3A136F122806029E006292EF /* Preview Assets.xcassets */; }; + 3A136F292806029F006292EF /* MyAmplifyAppUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A136F282806029F006292EF /* MyAmplifyAppUITests.swift */; }; + 4989DDE421F56C7AC37A85ED /* awsconfiguration.json in Resources */ = {isa = PBXBuildFile; fileRef = FC37E5EADB1509B0750F39D1 /* awsconfiguration.json */; }; + 5A4FCDB558061CA7A37B9D2A /* amplifyconfiguration.json in Resources */ = {isa = PBXBuildFile; fileRef = 50B98813260A5C7896822AB0 /* amplifyconfiguration.json */; }; + B41EF4282906F5C100DD6BD9 /* AWSAPIPlugin in Frameworks */ = {isa = PBXBuildFile; productRef = B41EF4272906F5C100DD6BD9 /* AWSAPIPlugin */; }; + B41EF42A2906F5C100DD6BD9 /* AWSDataStorePlugin in Frameworks */ = {isa = PBXBuildFile; productRef = B41EF4292906F5C100DD6BD9 /* AWSDataStorePlugin */; }; + B41EF42C2906F5C100DD6BD9 /* Amplify in Frameworks */ = {isa = PBXBuildFile; productRef = B41EF42B2906F5C100DD6BD9 /* Amplify */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 3A136F252806029F006292EF /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 3A136F0028060295006292EF /* Project object */; + proxyType = 1; + remoteGlobalIDString = 3A136F0728060295006292EF; + remoteInfo = MyAmplifyApp; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 3A136F0828060295006292EF /* MyAmplifyApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MyAmplifyApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 3A136F0B28060295006292EF /* MyAmplifyAppApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyAmplifyAppApp.swift; sourceTree = ""; }; + 3A136F0D28060295006292EF /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 3A136F0F2806029E006292EF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 3A136F122806029E006292EF /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + 3A136F142806029E006292EF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 3A136F242806029F006292EF /* MyAmplifyAppUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MyAmplifyAppUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3A136F282806029F006292EF /* MyAmplifyAppUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyAmplifyAppUITests.swift; sourceTree = ""; }; + 3A136F2A2806029F006292EF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 50B98813260A5C7896822AB0 /* amplifyconfiguration.json */ = {isa = PBXFileReference; explicitFileType = text.json; path = amplifyconfiguration.json; sourceTree = ""; }; + FC37E5EADB1509B0750F39D1 /* awsconfiguration.json */ = {isa = PBXFileReference; explicitFileType = text.json; path = awsconfiguration.json; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 3A136F0528060295006292EF /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + B41EF42A2906F5C100DD6BD9 /* AWSDataStorePlugin in Frameworks */, + B41EF42C2906F5C100DD6BD9 /* Amplify in Frameworks */, + B41EF4282906F5C100DD6BD9 /* AWSAPIPlugin in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3A136F212806029F006292EF /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 245B8BF34E95491633D60348 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; + 3A136EFF28060295006292EF = { + isa = PBXGroup; + children = ( + 3A136F0A28060295006292EF /* MyAmplifyApp */, + 3A136F272806029F006292EF /* MyAmplifyAppUITests */, + 3A136F0928060295006292EF /* Products */, + 245B8BF34E95491633D60348 /* Frameworks */, + E4AB4B612BABDF42DE9A1972 /* AmplifyConfig */, + ); + sourceTree = ""; + }; + 3A136F0928060295006292EF /* Products */ = { + isa = PBXGroup; + children = ( + 3A136F0828060295006292EF /* MyAmplifyApp.app */, + 3A136F242806029F006292EF /* MyAmplifyAppUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 3A136F0A28060295006292EF /* MyAmplifyApp */ = { + isa = PBXGroup; + children = ( + 3A136F0B28060295006292EF /* MyAmplifyAppApp.swift */, + 3A136F0D28060295006292EF /* ContentView.swift */, + 3A136F0F2806029E006292EF /* Assets.xcassets */, + 3A136F142806029E006292EF /* Info.plist */, + 3A136F112806029E006292EF /* Preview Content */, + ); + path = MyAmplifyApp; + sourceTree = ""; + }; + 3A136F112806029E006292EF /* Preview Content */ = { + isa = PBXGroup; + children = ( + 3A136F122806029E006292EF /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + 3A136F272806029F006292EF /* MyAmplifyAppUITests */ = { + isa = PBXGroup; + children = ( + 3A136F282806029F006292EF /* MyAmplifyAppUITests.swift */, + 3A136F2A2806029F006292EF /* Info.plist */, + ); + path = MyAmplifyAppUITests; + sourceTree = ""; + }; + E4AB4B612BABDF42DE9A1972 /* AmplifyConfig */ = { + isa = PBXGroup; + children = ( + FC37E5EADB1509B0750F39D1 /* awsconfiguration.json */, + 50B98813260A5C7896822AB0 /* amplifyconfiguration.json */, + ); + name = AmplifyConfig; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 3A136F0728060295006292EF /* MyAmplifyApp */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3A136F2D2806029F006292EF /* Build configuration list for PBXNativeTarget "MyAmplifyApp" */; + buildPhases = ( + 3A136F0428060295006292EF /* Sources */, + 3A136F0528060295006292EF /* Frameworks */, + 3A136F0628060295006292EF /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = MyAmplifyApp; + packageProductDependencies = ( + B41EF4272906F5C100DD6BD9 /* AWSAPIPlugin */, + B41EF4292906F5C100DD6BD9 /* AWSDataStorePlugin */, + B41EF42B2906F5C100DD6BD9 /* Amplify */, + ); + productName = MyAmplifyApp; + productReference = 3A136F0828060295006292EF /* MyAmplifyApp.app */; + productType = "com.apple.product-type.application"; + }; + 3A136F232806029F006292EF /* MyAmplifyAppUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3A136F332806029F006292EF /* Build configuration list for PBXNativeTarget "MyAmplifyAppUITests" */; + buildPhases = ( + 3A136F202806029F006292EF /* Sources */, + 3A136F212806029F006292EF /* Frameworks */, + 3A136F222806029F006292EF /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 3A136F262806029F006292EF /* PBXTargetDependency */, + ); + name = MyAmplifyAppUITests; + productName = MyAmplifyAppUITests; + productReference = 3A136F242806029F006292EF /* MyAmplifyAppUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 3A136F0028060295006292EF /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1240; + LastUpgradeCheck = 1240; + TargetAttributes = { + 3A136F0728060295006292EF = { + CreatedOnToolsVersion = 12.4; + }; + 3A136F232806029F006292EF = { + CreatedOnToolsVersion = 12.4; + TestTargetID = 3A136F0728060295006292EF; + }; + }; + }; + buildConfigurationList = 3A136F0328060295006292EF /* Build configuration list for PBXProject "MyAmplifyApp" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 3A136EFF28060295006292EF; + packageReferences = ( + B41EF4262906F5C100DD6BD9 /* XCRemoteSwiftPackageReference "amplify-swift" */, + ); + productRefGroup = 3A136F0928060295006292EF /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 3A136F0728060295006292EF /* MyAmplifyApp */, + 3A136F232806029F006292EF /* MyAmplifyAppUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 3A136F0628060295006292EF /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3A136F132806029E006292EF /* Preview Assets.xcassets in Resources */, + 3A136F102806029E006292EF /* Assets.xcassets in Resources */, + 4989DDE421F56C7AC37A85ED /* awsconfiguration.json in Resources */, + 5A4FCDB558061CA7A37B9D2A /* amplifyconfiguration.json in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3A136F222806029F006292EF /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 3A136F0428060295006292EF /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3A136F0E28060295006292EF /* ContentView.swift in Sources */, + 3A136F0C28060295006292EF /* MyAmplifyAppApp.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3A136F202806029F006292EF /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3A136F292806029F006292EF /* MyAmplifyAppUITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 3A136F262806029F006292EF /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 3A136F0728060295006292EF /* MyAmplifyApp */; + targetProxy = 3A136F252806029F006292EF /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 3A136F2B2806029F006292EF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.4; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 3A136F2C2806029F006292EF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.4; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 3A136F2E2806029F006292EF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_ASSET_PATHS = "\"MyAmplifyApp/Preview Content\""; + ENABLE_PREVIEWS = YES; + INFOPLIST_FILE = MyAmplifyApp/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 14.4; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = my.org.MyAmplifyApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 3A136F2F2806029F006292EF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_ASSET_PATHS = "\"MyAmplifyApp/Preview Content\""; + ENABLE_PREVIEWS = YES; + INFOPLIST_FILE = MyAmplifyApp/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 14.4; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = my.org.MyAmplifyApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 3A136F342806029F006292EF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = MyAmplifyAppUITests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 14.4; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = my.org.MyAmplifyAppUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = MyAmplifyApp; + }; + name = Debug; + }; + 3A136F352806029F006292EF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = MyAmplifyAppUITests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 14.4; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = my.org.MyAmplifyAppUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = MyAmplifyApp; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 3A136F0328060295006292EF /* Build configuration list for PBXProject "MyAmplifyApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3A136F2B2806029F006292EF /* Debug */, + 3A136F2C2806029F006292EF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 3A136F2D2806029F006292EF /* Build configuration list for PBXNativeTarget "MyAmplifyApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3A136F2E2806029F006292EF /* Debug */, + 3A136F2F2806029F006292EF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 3A136F332806029F006292EF /* Build configuration list for PBXNativeTarget "MyAmplifyAppUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3A136F342806029F006292EF /* Debug */, + 3A136F352806029F006292EF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + B41EF4262906F5C100DD6BD9 /* XCRemoteSwiftPackageReference "amplify-swift" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/aws-amplify/amplify-swift"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 2.0.0; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + B41EF4272906F5C100DD6BD9 /* AWSAPIPlugin */ = { + isa = XCSwiftPackageProductDependency; + package = B41EF4262906F5C100DD6BD9 /* XCRemoteSwiftPackageReference "amplify-swift" */; + productName = AWSAPIPlugin; + }; + B41EF4292906F5C100DD6BD9 /* AWSDataStorePlugin */ = { + isa = XCSwiftPackageProductDependency; + package = B41EF4262906F5C100DD6BD9 /* XCRemoteSwiftPackageReference "amplify-swift" */; + productName = AWSDataStorePlugin; + }; + B41EF42B2906F5C100DD6BD9 /* Amplify */ = { + isa = XCSwiftPackageProductDependency; + package = B41EF4262906F5C100DD6BD9 /* XCRemoteSwiftPackageReference "amplify-swift" */; + productName = Amplify; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = 3A136F0028060295006292EF /* Project object */; +} diff --git a/packages/amplify-e2e-tests/resources/example-ios-app/MyAmplifyApp/Assets.xcassets/AccentColor.colorset/Contents.json b/packages/amplify-e2e-tests/resources/example-ios-app/MyAmplifyApp/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 00000000000..eb878970081 --- /dev/null +++ b/packages/amplify-e2e-tests/resources/example-ios-app/MyAmplifyApp/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/packages/amplify-e2e-tests/resources/example-ios-app/MyAmplifyApp/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/amplify-e2e-tests/resources/example-ios-app/MyAmplifyApp/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000000..9221b9bb1a3 --- /dev/null +++ b/packages/amplify-e2e-tests/resources/example-ios-app/MyAmplifyApp/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/packages/amplify-e2e-tests/resources/example-ios-app/MyAmplifyApp/Assets.xcassets/Contents.json b/packages/amplify-e2e-tests/resources/example-ios-app/MyAmplifyApp/Assets.xcassets/Contents.json new file mode 100644 index 00000000000..73c00596a7f --- /dev/null +++ b/packages/amplify-e2e-tests/resources/example-ios-app/MyAmplifyApp/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/packages/amplify-e2e-tests/resources/example-ios-app/MyAmplifyApp/ContentView.swift b/packages/amplify-e2e-tests/resources/example-ios-app/MyAmplifyApp/ContentView.swift new file mode 100644 index 00000000000..ba4724b6ac6 --- /dev/null +++ b/packages/amplify-e2e-tests/resources/example-ios-app/MyAmplifyApp/ContentView.swift @@ -0,0 +1,21 @@ +// +// Copyright Amazon.com Inc. or its affiliates. +// All Rights Reserved. +// +// SPDX-License-Identifier: Apache-2.0 +// + +import SwiftUI + +struct ContentView: View { + var body: some View { + Text("Hello, world!") + .padding() + } +} + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + ContentView() + } +} diff --git a/packages/amplify-e2e-tests/resources/example-ios-app/MyAmplifyApp/Info.plist b/packages/amplify-e2e-tests/resources/example-ios-app/MyAmplifyApp/Info.plist new file mode 100644 index 00000000000..efc211a0c1b --- /dev/null +++ b/packages/amplify-e2e-tests/resources/example-ios-app/MyAmplifyApp/Info.plist @@ -0,0 +1,50 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + + UIApplicationSupportsIndirectInputEvents + + UILaunchScreen + + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/packages/amplify-e2e-tests/resources/example-ios-app/MyAmplifyApp/MyAmplifyAppApp.swift b/packages/amplify-e2e-tests/resources/example-ios-app/MyAmplifyApp/MyAmplifyAppApp.swift new file mode 100644 index 00000000000..68eddea3b88 --- /dev/null +++ b/packages/amplify-e2e-tests/resources/example-ios-app/MyAmplifyApp/MyAmplifyAppApp.swift @@ -0,0 +1,33 @@ +// +// Copyright Amazon.com Inc. or its affiliates. +// All Rights Reserved. +// +// SPDX-License-Identifier: Apache-2.0 +// + +import SwiftUI +import Amplify + + +@main +struct MyAmplifyAppApp: App { + var body: some Scene { + WindowGroup { + ContentView() + } + } + + // add a default initializer and configure Amplify + init() { + configureAmplify() + } +} +func configureAmplify() { + do { + try Amplify.configure() + print("Initialized Amplify") + } catch { + // simplified error handling for the tutorial + print("Could not initialize Amplify: \(error)") + } +} diff --git a/packages/amplify-e2e-tests/resources/example-ios-app/MyAmplifyApp/Preview Content/Preview Assets.xcassets/Contents.json b/packages/amplify-e2e-tests/resources/example-ios-app/MyAmplifyApp/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 00000000000..73c00596a7f --- /dev/null +++ b/packages/amplify-e2e-tests/resources/example-ios-app/MyAmplifyApp/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/packages/amplify-e2e-tests/resources/example-ios-app/MyAmplifyAppUITests/Info.plist b/packages/amplify-e2e-tests/resources/example-ios-app/MyAmplifyAppUITests/Info.plist new file mode 100644 index 00000000000..64d65ca4957 --- /dev/null +++ b/packages/amplify-e2e-tests/resources/example-ios-app/MyAmplifyAppUITests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/packages/amplify-e2e-tests/resources/example-ios-app/MyAmplifyAppUITests/MyAmplifyAppUITests.swift b/packages/amplify-e2e-tests/resources/example-ios-app/MyAmplifyAppUITests/MyAmplifyAppUITests.swift new file mode 100644 index 00000000000..1271490b8b5 --- /dev/null +++ b/packages/amplify-e2e-tests/resources/example-ios-app/MyAmplifyAppUITests/MyAmplifyAppUITests.swift @@ -0,0 +1,33 @@ +// +// Copyright Amazon.com Inc. or its affiliates. +// All Rights Reserved. +// +// SPDX-License-Identifier: Apache-2.0 +// + +import XCTest + +class MyAmplifyAppUITests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() throws { + // UI tests must launch the application that they test. + let app = XCUIApplication() + app.launch() + + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } +} diff --git a/packages/amplify-e2e-tests/sample.env b/packages/amplify-e2e-tests/sample.env index 728cb8dcb67..b808b38857e 100644 --- a/packages/amplify-e2e-tests/sample.env +++ b/packages/amplify-e2e-tests/sample.env @@ -1,3 +1,5 @@ +AMPLIFY_PATH= + # Used for setting up a new profile AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= @@ -17,14 +19,8 @@ AMAZON_APP_SECRET=amaznAppSecret APPLE_APP_ID=com.fake.app APPLE_TEAM_ID=2QLEWNDK6K APPLE_KEY_ID=2QLZXKYJ8J -APPLE_PRIVATE_KEY=MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgIltgNsTgTfSzUadYiCS0VYtDDMFln/J8i1yJsSIw5g+gCgYIKoZIzj0DAQehRANCAASI8E0L/DhR/mIfTT07v3VwQu6q8I76lgn7kFhT0HvWoLuHKGQFcFkXXCgztgBrprzd419mUChAnKE6y89bWcNw +APPLE_PRIVATE_KEY=----BEGIN PRIVATE KEY-----MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgIltgNsTgTfSzUadYiCS0VYtDDMFln/J8i1yJsSIw5g+gCgYIKoZIzj0DAQehRANCAASI8E0L/DhR/mIfTT07v3VwQu6q8I76lgn7kFhT0HvWoLuHKGQFcFkXXCgztgBrprzd419mUChAnKE6y89bWcNw----END PRIVATE KEY---- +APPLE_PRIVATE_KEY_2=----BEGIN PRIVATE KEY-----MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgIltgNsTgTfSzUadYiCS0VYtDDMFln/J8i1yJsSIw5g+gCgYIKoZIzj0DAQehRANCAASI8E0L/DhR/mIfTT07v3VwQu6q8I76lgn7kFhT0HvWoLuHKGQFcFkXXCgztgBrprzd419mUChAnKE6y89bWcNw----END PRIVATE KEY---- #Used for delete test -AWS_ACCESS_KEY_ID= -AWS_SECRET_ACCESS_KEY= CLI_REGION= - -# Used for cleanup script -CIRCLECI_TOKEN = '' # Token used for querying CircleCI to get the build details -CIRCLE_PROJECT_USERNAME='' -CIRCLE_PROJECT_REPONAME='amplify-cli' \ No newline at end of file diff --git a/packages/amplify-e2e-tests/src/__tests__/__snapshots__/api_10.test.ts.snap b/packages/amplify-e2e-tests/src/__tests__/__snapshots__/api_10.test.ts.snap index 1beed9c9f6a..9675cd9462c 100644 --- a/packages/amplify-e2e-tests/src/__tests__/__snapshots__/api_10.test.ts.snap +++ b/packages/amplify-e2e-tests/src/__tests__/__snapshots__/api_10.test.ts.snap @@ -62,8 +62,7 @@ $util.qr($ctx.stash.put("hasAuth", true)) #set( $isAuthorized = false ) #set( $allowedFields = [] ) #if( $util.authType() == "IAM Authorization" ) - #set( $adminRoles = ["myAdminRoleName"] ) - #foreach( $adminRole in $adminRoles ) + #foreach( $adminRole in $ctx.stash.adminRoles ) #if( $ctx.identity.userArn.contains($adminRole) && $ctx.identity.userArn != $ctx.stash.authRole && $ctx.identity.userArn != $ctx.stash.unauthRole ) #return($util.toJson({})) #end @@ -175,8 +174,7 @@ $util.qr($ctx.stash.put("hasAuth", true)) #set( $isAuthorized = false ) #set( $allowedFields = [] ) #if( $util.authType() == "IAM Authorization" ) - #set( $adminRoles = ["myAdminRoleName"] ) - #foreach( $adminRole in $adminRoles ) + #foreach( $adminRole in $ctx.stash.adminRoles ) #if( $ctx.identity.userArn.contains($adminRole) && $ctx.identity.userArn != $ctx.stash.authRole && $ctx.identity.userArn != $ctx.stash.unauthRole ) #return($util.toJson({})) #end diff --git a/packages/amplify-e2e-tests/src/__tests__/amplify-app.test.ts b/packages/amplify-e2e-tests/src/__tests__/amplify-app.test.ts index 13d4d01cedd..309e9ed86b9 100644 --- a/packages/amplify-e2e-tests/src/__tests__/amplify-app.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/amplify-app.test.ts @@ -1,21 +1,11 @@ -import { - amplifyAppAndroid, - amplifyAppIos, - amplifyAppAngular, - amplifyAppReact, - amplifyModelgen, - amplifyPush, - addIntegAccountInConfig, -} from '../amplify-app-helpers/amplify-app-setup'; -import { createNewProjectDir, deleteProject, deleteProjectDir, isCI } from '@aws-amplify/amplify-e2e-core'; +import { amplifyAppAndroid, amplifyAppIos, amplifyAppAngular } from '../amplify-app-helpers/amplify-app-setup'; +import { createNewProjectDir, deleteProjectDir, isCI } from '@aws-amplify/amplify-e2e-core'; import { AmplifyFrontend } from '@aws-amplify/amplify-cli-core'; import { validateProject, validateProjectConfig, validateApi, validateBackendConfig, - validateModelgen, - validateAmplifyPush, validateFeatureFlags, } from '../amplify-app-helpers/amplify-app-validation'; @@ -30,7 +20,7 @@ describe('amplify-app platform tests', () => { deleteProjectDir(projRoot); }); - jest.setTimeout(1000 * 60 * 30); // 30 minutes is suffice as push operations are taking time + jest.setTimeout(1000 * 60 * 30); // 30 minutes is enough as push operations are taking time it('should set up an android project', async () => { await amplifyAppAndroid(projRoot); @@ -64,19 +54,4 @@ describe('amplify-app platform tests', () => { validateBackendConfig(projRoot); validateFeatureFlags(projRoot); }); - - it('should set up a react project and run scripts', async () => { - await amplifyAppReact(projRoot); - validateProject(projRoot, AmplifyFrontend.javascript); - validateProjectConfig(projRoot, AmplifyFrontend.javascript, 'react'); - validateApi(projRoot); - validateBackendConfig(projRoot); - validateFeatureFlags(projRoot); - addIntegAccountInConfig(projRoot); - await amplifyModelgen(projRoot); - validateModelgen(projRoot); - await amplifyPush(projRoot); - validateAmplifyPush(projRoot); - await deleteProject(projRoot); - }); }); diff --git a/packages/amplify-e2e-tests/src/__tests__/amplify-configure.test.ts b/packages/amplify-e2e-tests/src/__tests__/amplify-configure.test.ts index d52b95bc30f..f62daf3297a 100644 --- a/packages/amplify-e2e-tests/src/__tests__/amplify-configure.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/amplify-configure.test.ts @@ -1,4 +1,12 @@ -import { nspawn as spawn, getCLIPath, createNewProjectDir, deleteProjectDir } from '@aws-amplify/amplify-e2e-core'; +import { + amplifyConfigure, + nspawn as spawn, + getCLIPath, + createNewProjectDir, + deleteProject, + deleteProjectDir, + initJSProjectWithProfile, +} from '@aws-amplify/amplify-e2e-core'; describe('amplify configure', () => { let projRoot: string; @@ -8,12 +16,24 @@ describe('amplify configure', () => { }); afterEach(async () => { + await deleteProject(projRoot); deleteProjectDir(projRoot); }); it('validates key inputs', async () => { await testAmplifyConfigureValidation(); }); + + it('should turn on/off Usage Data', async () => { + await amplifyConfigure(projRoot, 'usage-data-on'); + await amplifyConfigure(projRoot, 'usage-data-off'); + }); + + it('should turn on/off share-project-config', async () => { + await initJSProjectWithProfile(projRoot, {}); + await amplifyConfigure(projRoot, 'share-project-config-off'); + await amplifyConfigure(projRoot, 'share-project-config-on'); + }); }); function testAmplifyConfigureValidation(): Promise { @@ -53,6 +73,10 @@ function testAmplifyConfigureValidation(): Promise { .wait('You must enter a valid secretAccessKey') .sendLine(validMockAWSSecretAccessKey) .wait('Profile Name:') + // Fake credentials used in this test are always invalid therefore + // 'config-test' is a new profile name using defaultAWSSecretAccessKey and validMockAWSSecretAccessKey + // to avoid overwriting profiles used in other tests. + // Do NOT use TEST_PROFILE_NAME here, otherwise, it will override the default profile. .sendLine('config-test') .wait('Successfully set up the new user.') .run((err: Error) => { diff --git a/packages/amplify-e2e-tests/src/__tests__/amplify-remove.test.ts b/packages/amplify-e2e-tests/src/__tests__/amplify-remove.test.ts new file mode 100644 index 00000000000..350027daa0d --- /dev/null +++ b/packages/amplify-e2e-tests/src/__tests__/amplify-remove.test.ts @@ -0,0 +1,121 @@ +import * as fs from 'fs'; +import { + addFunction, + addLayer, + amplifyPushAuth, + amplifyPushLayer, + createNewProjectDir, + deleteProject, + deleteProjectDir, + ExecutionContext, + getCurrentLayerArnFromMeta, + getProjectConfig, + initJSProjectWithProfile, + LayerRuntime, + removeFunction, + removeLayer, + updateOptData, + validateLayerDir, +} from '@aws-amplify/amplify-e2e-core'; +import { v4 as uuid } from 'uuid'; + +describe('test amplify remove function', () => { + let projRoot: string; + let projName: string; + const envName = 'integtest'; + + beforeEach(async () => { + projRoot = await createNewProjectDir('layers'); + await initJSProjectWithProfile(projRoot, { envName }); + ({ projectName: projName } = getProjectConfig(projRoot)); + }); + + afterEach(async () => { + await deleteProject(projRoot); + deleteProjectDir(projRoot); + }); + + it('init a project, add layer, add 2 dependent functions, remove functions and layers', async () => { + const [shortId] = uuid().split('-'); + const layerName = `simplelayer${shortId}`; + const runtime: LayerRuntime = 'nodejs'; + + const settings = { + runtimes: [runtime], + layerName, + projName, + }; + const arns: string[] = []; + await addLayer(projRoot, settings); + expect(validateLayerDir(projRoot, { projName, layerName: settings.layerName }, settings.runtimes)).toBe(true); + await amplifyPushLayer(projRoot, { acceptSuggestedLayerVersionConfigurations: true }); + arns.push(getCurrentLayerArnFromMeta(projRoot, settings)); + updateOptData(projRoot, settings, 'update'); + await amplifyPushLayer(projRoot, { acceptSuggestedLayerVersionConfigurations: true }); + arns.push(getCurrentLayerArnFromMeta(projRoot, settings)); + + const fnName1 = `integtestFn1${shortId}`; + const fnName2 = `integtestFn2${shortId}`; + + await addFunction( + projRoot, + { + functionTemplate: 'Hello World', + name: fnName1, + layerOptions: { + layerWalkthrough: (chain: ExecutionContext): void => { + chain + .wait('Provide existing layers') + .sendKeyDown() + .send(' ') + .sendCarriageReturn() + .wait(`Select a version for ${projName + layerName}`) + .sendKeyDown(2) // Move from Always choose latest version to version 1 + .sendCarriageReturn(); + }, + }, + }, + runtime, + ); + await addFunction( + projRoot, + { + functionTemplate: 'Hello World', + name: fnName2, + layerOptions: { + layerWalkthrough: (chain: ExecutionContext): void => { + chain + .wait('Provide existing layers') + .sendKeyDown() + .send(' ') + .sendCarriageReturn() + .wait(`Select a version for ${projName + layerName}`) + .sendKeyDown() // Move from Always choose latest version to version 2 + .sendCarriageReturn(); + }, + }, + }, + runtime, + ); + + await removeFunction(projRoot, fnName1); + await removeFunction(projRoot, fnName2); + + const stackBuildDir = `${projRoot}/amplify/backend/awscloudformation`; + const backendDir = `${projRoot}/amplify/backend`; + const layerCreatedStack = fs.readdirSync(`${stackBuildDir}/build/function/`).join(''); + const layerCreated = fs.readdirSync(`${backendDir}/function/`).join(''); + + expect(layerCreatedStack).toEqual(projName + layerName); + expect(layerCreated).toEqual(projName + layerName); + + await removeLayer(projRoot, [1, 2], [1, 2]); + + const layerLeftStack = fs.readdirSync(`${stackBuildDir}/build/function/`).join(''); + const layerLeft = fs.readdirSync(`${backendDir}/function/`).join(''); + expect(layerLeftStack).toEqual(''); + expect(layerLeft).toEqual(''); + + await amplifyPushAuth(projRoot); + }); +}); diff --git a/packages/amplify-e2e-tests/src/__tests__/api_2b.test.ts b/packages/amplify-e2e-tests/src/__tests__/api_2b.test.ts index 42394b594c0..01d20b4beb0 100644 --- a/packages/amplify-e2e-tests/src/__tests__/api_2b.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/api_2b.test.ts @@ -15,7 +15,6 @@ import { } from '@aws-amplify/amplify-e2e-core'; import { existsSync } from 'fs'; import { TRANSFORM_CURRENT_VERSION } from 'graphql-transformer-core'; -import _ from 'lodash'; import * as path from 'path'; const providerName = 'awscloudformation'; diff --git a/packages/amplify-e2e-tests/src/__tests__/api_3.test.ts b/packages/amplify-e2e-tests/src/__tests__/api_3.test.ts index 3021d342589..fb7db3d58b0 100644 --- a/packages/amplify-e2e-tests/src/__tests__/api_3.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/api_3.test.ts @@ -50,7 +50,7 @@ describe('amplify add api (GraphQL)', () => { transformConfig.Version = TRANSFORM_BASE_VERSION; const apiRoot = path.join(projRoot, 'amplify', 'backend', 'api', name); - writeTransformerConfiguration(apiRoot, transformConfig); + await writeTransformerConfiguration(apiRoot, transformConfig); await amplifyPush(projRoot); diff --git a/packages/amplify-e2e-tests/src/__tests__/api_5.test.ts b/packages/amplify-e2e-tests/src/__tests__/api_5.test.ts index ce4c22ef7a1..234563f0555 100644 --- a/packages/amplify-e2e-tests/src/__tests__/api_5.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/api_5.test.ts @@ -39,14 +39,14 @@ describe('amplify add api (REST)', () => { expect(service).toBe('DynamoDB'); expect(lastPushTimeStamp).toBeDefined(); expect(lastPushDirHash).toBeDefined(); - validateRestApiMeta(projRoot, meta); + await validateRestApiMeta(projRoot, meta); }); it('init a project, then add a serverless rest api', async () => { await initJSProjectWithProfile(projRoot, {}); await addRestApi(projRoot, { isCrud: false }); await amplifyPushUpdate(projRoot); - validateRestApiMeta(projRoot); + await validateRestApiMeta(projRoot); }); it('init a project, create lambda and attach it to an api', async () => { @@ -54,7 +54,7 @@ describe('amplify add api (REST)', () => { await addFunction(projRoot, { functionTemplate: 'Hello World' }, 'nodejs'); await addRestApi(projRoot, { existingLambda: true }); await amplifyPushUpdate(projRoot); - validateRestApiMeta(projRoot); + await validateRestApiMeta(projRoot); }); it('init a project, create lambda and attach multiple rest apis', async () => { @@ -113,6 +113,6 @@ describe('amplify add api (REST)', () => { expect(PolicyName).toMatch(/PolicyAPIGWUnauth\d/); } - validateRestApiMeta(projRoot, amplifyMeta); + await validateRestApiMeta(projRoot, amplifyMeta); }); }); diff --git a/packages/amplify-e2e-tests/src/__tests__/api_6a.test.ts b/packages/amplify-e2e-tests/src/__tests__/api_6a.test.ts index fb9de0c6328..e9fd28a36b9 100644 --- a/packages/amplify-e2e-tests/src/__tests__/api_6a.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/api_6a.test.ts @@ -46,8 +46,12 @@ describe('amplify rebuild api', () => { expect(region).toBeDefined(); const modelNames = ['Todo', 'Task', 'Worker']; - modelNames.forEach(async (modelName) => await testTableBeforeRebuildApi(apiId, region, modelName)); + for (const modelName of modelNames) { + await testTableBeforeRebuildApi(apiId, region, modelName); + } await rebuildApi(projRoot, projName); - modelNames.forEach(async (modelName) => await testTableAfterRebuildApi(apiId, region, modelName)); + for (const modelName of modelNames) { + await testTableAfterRebuildApi(apiId, region, modelName); + } }); }); diff --git a/packages/amplify-e2e-tests/src/__tests__/api_8.test.ts b/packages/amplify-e2e-tests/src/__tests__/api_8.test.ts index 4588c58c7a9..5f694b3196d 100644 --- a/packages/amplify-e2e-tests/src/__tests__/api_8.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/api_8.test.ts @@ -34,7 +34,7 @@ describe('amplify add api (REST and GRAPHQL)', () => { await addRestApi(projRoot, { existingLambda: true }); await addRestApi(projRoot, { isFirstRestApi: false, existingLambda: true, path: '/newpath' }); await amplifyPushUpdate(projRoot); - validateRestApiMeta(projRoot); + await validateRestApiMeta(projRoot); const apisDirectory = path.join(projRoot, 'amplify', 'backend', 'api'); const apis = readdirSync(apisDirectory); @@ -69,6 +69,6 @@ describe('amplify add api (REST and GRAPHQL)', () => { expect(graphqlApi).toBeDefined(); expect(graphqlApi.apiId).toEqual(GraphQLAPIIdOutput); - validateRestApiMeta(projRoot, meta); + await validateRestApiMeta(projRoot, meta); }); }); diff --git a/packages/amplify-e2e-tests/src/__tests__/api_9b.test.ts b/packages/amplify-e2e-tests/src/__tests__/api_9b.test.ts index 8502eca4142..6eb1af05aa2 100644 --- a/packages/amplify-e2e-tests/src/__tests__/api_9b.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/api_9b.test.ts @@ -4,23 +4,19 @@ import { initJSProjectWithProfile, addApiWithoutSchema, updateApiSchema, - updateApiWithMultiAuth, createNewProjectDir, deleteProjectDir, getAppSyncApi, getProjectMeta, - getTransformConfig, getDDBTable, addFunction, getBackendAmplifyMeta, amplifyPushUpdateForDependentModel, amplifyPushForce, - createRandomName, generateRandomShortId, } from '@aws-amplify/amplify-e2e-core'; import path from 'path'; import { existsSync } from 'fs'; -import { TRANSFORM_CURRENT_VERSION } from 'graphql-transformer-core'; describe('amplify add api (GraphQL)', () => { let projRoot: string; diff --git a/packages/amplify-e2e-tests/src/__tests__/auth/admin-api.test.ts b/packages/amplify-e2e-tests/src/__tests__/auth/admin-api.test.ts new file mode 100644 index 00000000000..45e16415a30 --- /dev/null +++ b/packages/amplify-e2e-tests/src/__tests__/auth/admin-api.test.ts @@ -0,0 +1,177 @@ +import { + addAuthWithGroupsAndAdminAPI, + addUserToGroup, + amplifyPushAuth, + configureAmplify, + createNewProjectDir, + deleteProject, + deleteProjectDir, + getProjectMeta, + getUserPoolId, + initJSProjectWithProfile, + invokeFunction, + setupUser, +} from '@aws-amplify/amplify-e2e-core'; +import { $TSAny } from '@aws-amplify/amplify-cli-core'; + +describe('auth admin api tests', () => { + let projRoot: string; + let adminLambdaName: string; + let adminLambdaRegion: string; + + const callAdminLambda = async (request: $TSAny): Promise<$TSAny> => { + if (!request.requestContext) { + // Mock authorization necessary for admin API + request.requestContext = { + authorizer: { + claims: { + 'cognito:groups': 'Admins', + }, + }, + }; + } + const lambdaResponse = await invokeFunction(adminLambdaName, JSON.stringify(request), adminLambdaRegion); + return JSON.parse(lambdaResponse.Payload.toString()); + }; + + beforeAll(async () => { + projRoot = await createNewProjectDir('auth'); + await initJSProjectWithProfile(projRoot); + await addAuthWithGroupsAndAdminAPI(projRoot); + await amplifyPushAuth(projRoot); + + const meta = getProjectMeta(projRoot); + const adminLambdaOutputs = Object.keys(meta.function).map((key) => meta.function[key])[0].output; + adminLambdaName = adminLambdaOutputs.Name; + adminLambdaRegion = adminLambdaOutputs.Region; + + const userPoolId = getUserPoolId(projRoot); + await configureAmplify(projRoot); + + for (let i = 0; i < 5; i++) { + const username = `testUser${i}`; + const password = `Password12#${i}`; + await setupUser(userPoolId, username, password, 'Users', adminLambdaRegion); + } + + for (let i = 0; i < 5; i++) { + const username = `testAdminUser${i}`; + const password = `Password12#${i}`; + await setupUser(userPoolId, username, password, 'Admins', adminLambdaRegion); + await addUserToGroup(userPoolId, username, 'Users', adminLambdaRegion); + } + }); + + afterAll(async () => { + await deleteProject(projRoot); + deleteProjectDir(projRoot); + }); + + it('can list groups', async () => { + const request = { + path: '/listGroups', + httpMethod: 'GET', + }; + const response = await callAdminLambda(request); + expect(response.statusCode).toBe(200); + const responseBody = JSON.parse(response.body); + expect(responseBody.Groups.length).toBe(2); + }); + + it('can list groups with limit', async () => { + const request = { + path: '/listGroups', + httpMethod: 'GET', + queryStringParameters: { + limit: '1', + }, + }; + const response = await callAdminLambda(request); + expect(response.statusCode).toBe(200); + const responseBody = JSON.parse(response.body); + expect(responseBody.Groups.length).toBe(1); + }); + + it('can list users', async () => { + const request = { + path: '/listUsers', + httpMethod: 'GET', + }; + const response = await callAdminLambda(request); + expect(response.statusCode).toBe(200); + const responseBody = JSON.parse(response.body); + expect(responseBody.Users.length).toBe(10); + }); + + it('can list users with limit', async () => { + const request = { + path: '/listUsers', + httpMethod: 'GET', + queryStringParameters: { + limit: '1', + }, + }; + const response = await callAdminLambda(request); + expect(response.statusCode).toBe(200); + const responseBody = JSON.parse(response.body); + expect(responseBody.Users.length).toBe(1); + }); + + it('can list users in group', async () => { + const request = { + path: '/listUsersInGroup', + httpMethod: 'GET', + queryStringParameters: { + groupname: 'Admins', + }, + }; + const response = await callAdminLambda(request); + expect(response.statusCode).toBe(200); + const responseBody = JSON.parse(response.body); + expect(responseBody.Users.length).toBe(5); + }); + + it('can list users in group with limit', async () => { + const request = { + path: '/listUsersInGroup', + httpMethod: 'GET', + queryStringParameters: { + limit: '1', + groupname: 'Admins', + }, + }; + const response = await callAdminLambda(request); + expect(response.statusCode).toBe(200); + const responseBody = JSON.parse(response.body); + expect(responseBody.Users.length).toBe(1); + }); + + it('can list groups for user', async () => { + const request = { + path: '/listGroupsForUser', + httpMethod: 'GET', + queryStringParameters: { + username: 'testAdminUser1', + }, + }; + const response = await callAdminLambda(request); + expect(response.statusCode).toBe(200); + const responseBody = JSON.parse(response.body); + expect(responseBody.Groups.length).toBe(2); + }); + + it('can list groups for user with limit', async () => { + const request = { + path: '/listGroupsForUser', + httpMethod: 'GET', + queryStringParameters: { + limit: '1', + username: 'testAdminUser1', + }, + }; + const response = await callAdminLambda(request); + expect(response.statusCode).toBe(200); + const responseBody = JSON.parse(response.body); + expect(responseBody.Groups.length).toBe(1); + }); +}); diff --git a/packages/amplify-e2e-tests/src/__tests__/auth/hosted-ui.test.ts b/packages/amplify-e2e-tests/src/__tests__/auth/hosted-ui.test.ts new file mode 100644 index 00000000000..b998be45e83 --- /dev/null +++ b/packages/amplify-e2e-tests/src/__tests__/auth/hosted-ui.test.ts @@ -0,0 +1,146 @@ +import { + addAuthUserPoolOnlyWithOAuth, + addAuthWithDefault, + addAuthWithSignInSignOutUrl, + amplifyPushAuth, + createNewProjectDir, + createUserPoolOnlyWithOAuthSettings, + deleteProject, + deleteProjectDir, + deleteUserPoolDomain, + generateRandomShortId, + getHostedUIDomain, + getProjectMeta, + getUserPool, + getUserPoolDomain, + getUserPoolId, + initJSProjectWithProfile, + updateAuthDomainPrefixWithAllProvidersConfigured, + updateAuthSignInSignOutUrlWithAll, +} from '@aws-amplify/amplify-e2e-core'; + +const defaultsSettings = { + name: 'authTest', +}; + +const oauthSettings = { + signinUrl: 'https://danielle.lol/', + signoutUrl: 'https://danielle.lol/', +}; + +describe('hosted ui tests', () => { + let projRoot: string; + + beforeEach(async () => { + projRoot = await createNewProjectDir('auth'); + }); + + afterEach(async () => { + await deleteProject(projRoot); + deleteProjectDir(projRoot); + }); + + describe('...amplify add auth', () => { + describe('...creating with oauth', () => { + it('...creates a user pool domain', async () => { + await initJSProjectWithProfile(projRoot, defaultsSettings); + await addAuthWithSignInSignOutUrl(projRoot, oauthSettings); + await amplifyPushAuth(projRoot); + + const meta = getProjectMeta(projRoot); + const region = meta.providers.awscloudformation.Region; + const { HostedUIDomain, UserPoolId } = Object.keys(meta.auth) + .map((key) => meta.auth[key]) + .find((auth) => auth.service === 'Cognito').output; + + const userPoolRes = await getUserPool(UserPoolId, region); + + expect(HostedUIDomain).toBeDefined(); + expect(HostedUIDomain).toEqual(userPoolRes.UserPool.Domain); + }); + }); + }); + + describe('amplify update auth', () => { + describe('...updating to add oauth', () => { + it('...creates a user pool domain', async () => { + await initJSProjectWithProfile(projRoot, defaultsSettings); + await addAuthWithDefault(projRoot); + await updateAuthSignInSignOutUrlWithAll(projRoot, oauthSettings); + await amplifyPushAuth(projRoot); + + const meta = getProjectMeta(projRoot); + const region = meta.providers.awscloudformation.Region; + const { HostedUIDomain, UserPoolId } = Object.keys(meta.auth) + .map((key) => meta.auth[key]) + .find((auth) => auth.service === 'Cognito').output; + + const userPoolRes = await getUserPool(UserPoolId, region); + + expect(HostedUIDomain).toBeDefined(); + expect(HostedUIDomain).toEqual(userPoolRes.UserPool.Domain); + }); + }); + + describe('...updating to add oauth after push', () => { + it('...creates a user pool domain', async () => { + await initJSProjectWithProfile(projRoot, defaultsSettings); + await addAuthWithDefault(projRoot); + await amplifyPushAuth(projRoot); + + await updateAuthSignInSignOutUrlWithAll(projRoot, oauthSettings); + await amplifyPushAuth(projRoot); + + const meta = getProjectMeta(projRoot); + const region = meta.providers.awscloudformation.Region; + const { HostedUIDomain, UserPoolId } = Object.keys(meta.auth) + .map((key) => meta.auth[key]) + .find((auth) => auth.service === 'Cognito').output; + + const userPoolRes = await getUserPool(UserPoolId, region); + + expect(HostedUIDomain).toBeDefined(); + expect(HostedUIDomain).toEqual(userPoolRes.UserPool.Domain); + }); + }); + + describe('...updating to change domain prefix', () => { + it('...updates a user pool domain', async () => { + await initJSProjectWithProfile(projRoot, defaultsSettings); + const oauthSettings = createUserPoolOnlyWithOAuthSettings('hui', generateRandomShortId()); + await addAuthUserPoolOnlyWithOAuth(projRoot, oauthSettings); + await amplifyPushAuth(projRoot); + const originalUserPoolId = getUserPoolId(projRoot); + const originalHostedUIDomain = getHostedUIDomain(projRoot); + const meta = getProjectMeta(projRoot); + const region = meta.providers.awscloudformation.Region; + expect(originalHostedUIDomain).toMatch(oauthSettings.domainPrefix); + const originalUserPoolRes = await getUserPool(originalUserPoolId, region); + expect(originalHostedUIDomain).toEqual(originalUserPoolRes.UserPool.Domain); + + const updatedDomainPrefix = `new-prefix-${generateRandomShortId()}`; + await updateAuthDomainPrefixWithAllProvidersConfigured(projRoot, { + domainPrefix: updatedDomainPrefix, + }); + await amplifyPushAuth(projRoot); + + const userPoolId = getUserPoolId(projRoot); + const hostedUIDomain = getHostedUIDomain(projRoot); + expect(userPoolId).toEqual(originalUserPoolId); + const userPoolRes = await getUserPool(userPoolId, region); + expect(hostedUIDomain).not.toEqual(originalHostedUIDomain); + expect(hostedUIDomain).toMatch(updatedDomainPrefix); + expect(hostedUIDomain).toEqual(userPoolRes.UserPool.Domain); + + const updatedDomainRes = await getUserPoolDomain(hostedUIDomain, region); + expect(updatedDomainRes).toBeDefined(); + const originalDomainRes = await getUserPoolDomain(originalHostedUIDomain, region); + expect(originalDomainRes).toEqual({ DomainDescription: {} }); + + const deleteOriginalDomainRes = await deleteUserPoolDomain(originalHostedUIDomain, userPoolId, region); + // undefined response as it throws InvalidParameterException: No such domain or user pool exists. + expect(deleteOriginalDomainRes).toBeUndefined(); + }); + }); + }); +}); diff --git a/packages/amplify-e2e-tests/src/__tests__/auth/user-groups-s3-access.test.ts b/packages/amplify-e2e-tests/src/__tests__/auth/user-groups-s3-access.test.ts new file mode 100644 index 00000000000..21308eb5a56 --- /dev/null +++ b/packages/amplify-e2e-tests/src/__tests__/auth/user-groups-s3-access.test.ts @@ -0,0 +1,115 @@ +import { + addAuthWithDefault, + addS3WithFirstGroupAccess, + amplifyPushNonInteractive, + configureAmplify, + createNewProjectDir, + deleteProject, + deleteProjectDir, + getProjectMeta, + getS3StorageBucketName, + getUserPoolId, + initJSProjectWithProfile, + setupUser, + signInUser, + signOutUser, + updateAuthAddUserGroups, +} from '@aws-amplify/amplify-e2e-core'; +import { Auth } from 'aws-amplify'; +import { S3Client, GetObjectCommand, PutObjectCommand } from '@aws-sdk/client-s3'; + +const defaultsSettings = { + name: 'authS3Test', +}; + +describe('user group tests', () => { + let projRoot: string; + + beforeEach(async () => { + projRoot = await createNewProjectDir('auths3'); + }); + + afterEach(async () => { + await deleteProject(projRoot); + deleteProjectDir(projRoot); + }); + + it('users in users group has correct access to s3 storage', async () => { + await initJSProjectWithProfile(projRoot, defaultsSettings); + await addAuthWithDefault(projRoot); + await updateAuthAddUserGroups(projRoot, ['group1', 'group2']); + await addS3WithFirstGroupAccess(projRoot); + await amplifyPushNonInteractive(projRoot); + + const meta = getProjectMeta(projRoot); + const region = meta.providers.awscloudformation.Region; + const userPoolId = getUserPoolId(projRoot); + + const bucketName = getS3StorageBucketName(projRoot); + + await configureAmplify(projRoot); + + const username1 = 'testUser1'; + const password1 = 'Password12#1'; + await setupUser(userPoolId, username1, password1, 'group1', region); + + const username2 = 'testUser2'; + const password2 = 'Password12#2'; + await setupUser(userPoolId, username2, password2, 'group2', region); + + const s3key = 'foo'; + const s3val = 'bar'; + + // Check that user 1 can interact with S3 bucket + await signInUser(username1, password1); + const user1Credentials = await Auth.currentCredentials(); + + const s3Client1 = new S3Client({ + region, + credentials: Auth.essentialCredentials(user1Credentials), + }); + await s3Client1.send( + new PutObjectCommand({ + Bucket: bucketName, + Key: s3key, + Body: s3val, + }), + ); + const valRes = await ( + await s3Client1.send( + new GetObjectCommand({ + Bucket: bucketName, + Key: s3key, + }), + ) + ).Body.transformToString(); + expect(valRes).toEqual(s3val); + await signOutUser(); + + // Check that user 2 does not have permissions to interact with S3 bucket + await signInUser(username2, password2); + const user2Credentials = await Auth.currentCredentials(); + const s3Client2 = new S3Client({ + region, + credentials: Auth.essentialCredentials(user2Credentials), + }); + await expect( + s3Client2.send( + new GetObjectCommand({ + Bucket: bucketName, + Key: s3key, + }), + ), + ).rejects.toThrow(/not authorized to perform/); + await expect( + s3Client2.send( + new PutObjectCommand({ + Bucket: bucketName, + Key: s3key, + Body: s3val, + }), + ), + ).rejects.toThrow(/not authorized to perform/); + await signOutUser(); + }); +}); diff --git a/packages/amplify-e2e-tests/src/__tests__/auth/user-groups.test.ts b/packages/amplify-e2e-tests/src/__tests__/auth/user-groups.test.ts new file mode 100644 index 00000000000..34f70fdea0c --- /dev/null +++ b/packages/amplify-e2e-tests/src/__tests__/auth/user-groups.test.ts @@ -0,0 +1,158 @@ +import { + addAuthWithDefault, + addAuthWithGroups, + amplifyPushAuth, + amplifyPushNonInteractive, + createNewProjectDir, + deleteProject, + deleteProjectDir, + getIdentityPoolRoles, + getProjectMeta, + initJSProjectWithProfile, + updateAuthAddUserGroups, + updateHeadlessAuth, +} from '@aws-amplify/amplify-e2e-core'; +import { UpdateAuthRequest } from 'amplify-headless-interface'; + +const defaultsSettings = { + name: 'authTest', +}; + +describe('user group tests', () => { + let projRoot: string; + + beforeEach(async () => { + projRoot = await createNewProjectDir('auth'); + }); + + afterEach(async () => { + await deleteProject(projRoot); + deleteProjectDir(projRoot); + }); + + describe('...amplify add auth', () => { + describe('...creating with a user pool group', () => { + it('...assigns authenticated roles for users added to user group', async () => { + await initJSProjectWithProfile(projRoot, defaultsSettings); + await addAuthWithGroups(projRoot); + await amplifyPushAuth(projRoot); + + const meta = getProjectMeta(projRoot); + const region = meta.providers.awscloudformation.Region; + const { AppClientID, AppClientIDWeb, IdentityPoolId, UserPoolId } = Object.keys(meta.auth) + .map((key) => meta.auth[key]) + .find((auth) => auth.service === 'Cognito').output; + + const identityPoolRoles = await getIdentityPoolRoles(IdentityPoolId, region); + const roleMapKeyClientId = `cognito-idp.${region}.amazonaws.com/${UserPoolId}:${AppClientID}`; + const roleMapKeyWebClientId = `cognito-idp.${region}.amazonaws.com/${UserPoolId}:${AppClientIDWeb}`; + + expect(identityPoolRoles.RoleMappings[roleMapKeyClientId].AmbiguousRoleResolution).toEqual('AuthenticatedRole'); + expect(identityPoolRoles.RoleMappings[roleMapKeyClientId].Type).toEqual('Token'); + expect(identityPoolRoles.RoleMappings[roleMapKeyWebClientId].AmbiguousRoleResolution).toEqual('AuthenticatedRole'); + expect(identityPoolRoles.RoleMappings[roleMapKeyWebClientId].Type).toEqual('Token'); + }); + }); + }); + + describe('...amplify update auth', () => { + describe('...updating to add a user pool group', () => { + it('...assigns authenticated roles for users added to user group', async () => { + await initJSProjectWithProfile(projRoot, defaultsSettings); + await addAuthWithDefault(projRoot); + await amplifyPushAuth(projRoot); + + await updateAuthAddUserGroups(projRoot, ['mygroup']); + await amplifyPushAuth(projRoot); + + const meta = getProjectMeta(projRoot); + const region = meta.providers.awscloudformation.Region; + const { AppClientID, AppClientIDWeb, IdentityPoolId, UserPoolId } = Object.keys(meta.auth) + .map((key) => meta.auth[key]) + .find((auth) => auth.service === 'Cognito').output; + + const identityPoolRoles = await getIdentityPoolRoles(IdentityPoolId, region); + const roleMapKeyClientId = `cognito-idp.${region}.amazonaws.com/${UserPoolId}:${AppClientID}`; + const roleMapKeyWebClientId = `cognito-idp.${region}.amazonaws.com/${UserPoolId}:${AppClientIDWeb}`; + + expect(identityPoolRoles.RoleMappings[roleMapKeyClientId].AmbiguousRoleResolution).toEqual('AuthenticatedRole'); + expect(identityPoolRoles.RoleMappings[roleMapKeyClientId].Type).toEqual('Token'); + expect(identityPoolRoles.RoleMappings[roleMapKeyWebClientId].AmbiguousRoleResolution).toEqual('AuthenticatedRole'); + expect(identityPoolRoles.RoleMappings[roleMapKeyWebClientId].Type).toEqual('Token'); + }); + }); + + describe('...updating to add a user pool group after create', () => { + it('...assigns authenticated roles for users added to user group', async () => { + await initJSProjectWithProfile(projRoot, defaultsSettings); + await addAuthWithDefault(projRoot); + await updateAuthAddUserGroups(projRoot, ['mygroup']); + await amplifyPushAuth(projRoot); + + const meta = getProjectMeta(projRoot); + const region = meta.providers.awscloudformation.Region; + const { AppClientID, AppClientIDWeb, IdentityPoolId, UserPoolId } = Object.keys(meta.auth) + .map((key) => meta.auth[key]) + .find((auth) => auth.service === 'Cognito').output; + + const identityPoolRoles = await getIdentityPoolRoles(IdentityPoolId, region); + const roleMapKeyClientId = `cognito-idp.${region}.amazonaws.com/${UserPoolId}:${AppClientID}`; + const roleMapKeyWebClientId = `cognito-idp.${region}.amazonaws.com/${UserPoolId}:${AppClientIDWeb}`; + + expect(identityPoolRoles.RoleMappings[roleMapKeyClientId].AmbiguousRoleResolution).toEqual('AuthenticatedRole'); + expect(identityPoolRoles.RoleMappings[roleMapKeyClientId].Type).toEqual('Token'); + expect(identityPoolRoles.RoleMappings[roleMapKeyWebClientId].AmbiguousRoleResolution).toEqual('AuthenticatedRole'); + expect(identityPoolRoles.RoleMappings[roleMapKeyWebClientId].Type).toEqual('Token'); + }); + }); + + describe('...updating headless to add a user pool group', () => { + it('...assigns authenticated roles for users added to user group', async () => { + await initJSProjectWithProfile(projRoot, defaultsSettings); + await addAuthWithDefault(projRoot); + await amplifyPushNonInteractive(projRoot); + const updateAuthRequest: UpdateAuthRequest = { + version: 2, + serviceModification: { + serviceName: 'Cognito', + userPoolModification: { + autoVerifiedAttributes: [ + { + type: 'EMAIL', + }, + ], + userPoolGroups: [ + { + groupName: 'Admins', + }, + { + groupName: 'Users', + }, + ], + }, + includeIdentityPool: true, + identityPoolModification: {}, + }, + }; + + await updateHeadlessAuth(projRoot, updateAuthRequest); + await amplifyPushNonInteractive(projRoot); + + const meta = getProjectMeta(projRoot); + const region = meta.providers.awscloudformation.Region; + const { AppClientID, AppClientIDWeb, IdentityPoolId, UserPoolId } = Object.keys(meta.auth) + .map((key) => meta.auth[key]) + .find((auth) => auth.service === 'Cognito').output; + + const identityPoolRoles = await getIdentityPoolRoles(IdentityPoolId, region); + const roleMapKeyClientId = `cognito-idp.${region}.amazonaws.com/${UserPoolId}:${AppClientID}`; + const roleMapKeyWebClientId = `cognito-idp.${region}.amazonaws.com/${UserPoolId}:${AppClientIDWeb}`; + + expect(identityPoolRoles.RoleMappings[roleMapKeyClientId].AmbiguousRoleResolution).toEqual('AuthenticatedRole'); + expect(identityPoolRoles.RoleMappings[roleMapKeyClientId].Type).toEqual('Token'); + expect(identityPoolRoles.RoleMappings[roleMapKeyWebClientId].AmbiguousRoleResolution).toEqual('AuthenticatedRole'); + expect(identityPoolRoles.RoleMappings[roleMapKeyWebClientId].Type).toEqual('Token'); + }); + }); + }); +}); diff --git a/packages/amplify-e2e-tests/src/__tests__/auth_1c.test.ts b/packages/amplify-e2e-tests/src/__tests__/auth_1c.test.ts index 1cf95743a74..693d476c2d1 100644 --- a/packages/amplify-e2e-tests/src/__tests__/auth_1c.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/auth_1c.test.ts @@ -4,12 +4,11 @@ import { getAwsIOSConfig, getUserPoolClients, initIosProjectWithProfile, - getCLIInputs, - setCLIInputs, addAuthWithDefault, createNewProjectDir, deleteProjectDir, getProjectMeta, + updateCLIParametersToGenerateUserPoolClientSecret, } from '@aws-amplify/amplify-e2e-core'; const defaultsSettings = { @@ -40,20 +39,24 @@ describe('amplify add auth...', () => { let clients = await getUserPoolClients(authMeta.output.UserPoolId, clientIds, meta.providers.awscloudformation.Region); expect(clients[0].UserPoolClient.ClientSecret).toBeUndefined(); - // update parameter to generate client Secret - const parameters = getCLIInputs(projRoot, 'auth', id); - parameters.cognitoConfig.userpoolClientGenerateSecret = true; - setCLIInputs(projRoot, 'auth', id, parameters); + updateCLIParametersToGenerateUserPoolClientSecret(projRoot); await amplifyPushAuth(projRoot); config = await getAwsIOSConfig(projRoot); - expect(config.CognitoUserPool.Default.AppClientSecret).toBeDefined(); + const clientSecretInAwsIOSConfig = config.CognitoUserPool.Default.AppClientSecret; + expect(clientSecretInAwsIOSConfig).toBeDefined(); meta = getProjectMeta(projRoot); id = Object.keys(meta.auth)[0]; authMeta = meta.auth[id]; clientIds = [authMeta.output.AppClientID]; + const clientSecretInMetaFile = authMeta.output.AppClientSecret; + // compare client secret in meta file and ios config file + expect(clientSecretInMetaFile).toBeDefined(); + expect(clientSecretInAwsIOSConfig).toEqual(clientSecretInMetaFile); clients = await getUserPoolClients(authMeta.output.UserPoolId, clientIds, meta.providers.awscloudformation.Region); expect(clients[0].UserPoolClient.ClientSecret).toBeDefined(); + // compare client secret in meta file with cloud value + expect(clients[0].UserPoolClient.ClientSecret).toEqual(clientSecretInMetaFile); }); }); diff --git a/packages/amplify-e2e-tests/src/__tests__/auth_2h.test.ts b/packages/amplify-e2e-tests/src/__tests__/auth_2h.test.ts new file mode 100644 index 00000000000..38b9713e6c5 --- /dev/null +++ b/packages/amplify-e2e-tests/src/__tests__/auth_2h.test.ts @@ -0,0 +1,122 @@ +/* eslint-disable spellcheck/spell-checker */ +import { + addHeadlessAuth, + amplifyPushNonInteractive, + createNewProjectDir, + deleteProject, + deleteProjectDir, + generateRandomShortId, + getProjectMeta, + getSocialIdpProvider, + getSocialProviders, + getUserPool, + getUserPoolClients, + initJSProjectWithProfile, + isDeploymentSecretForEnvExists, + validateNodeModulesDirRemoval, +} from '@aws-amplify/amplify-e2e-core'; +import { AddAuthRequest, CognitoUserPoolSigninMethod, CognitoUserProperty } from 'amplify-headless-interface'; + +const defaultsSettings = { + name: 'authTest', +}; + +describe('amplify add auth...', () => { + let projRoot: string; + beforeEach(async () => { + projRoot = await createNewProjectDir('auth'); + }); + + afterEach(async () => { + await deleteProject(projRoot); + deleteProjectDir(projRoot); + }); + + it('...should init a project and add auth with social provider headless', async () => { + await initJSProjectWithProfile(projRoot, defaultsSettings); + + const socialProviders = getSocialProviders(true); + + const addAuthRequest: AddAuthRequest = { + version: 2, + resourceName: 'myAuthResource', + serviceConfiguration: { + serviceName: 'Cognito', + includeIdentityPool: false, + userPoolConfiguration: { + requiredSignupAttributes: [CognitoUserProperty.EMAIL], + // eslint-disable-next-line spellcheck/spell-checker + signinMethod: CognitoUserPoolSigninMethod.USERNAME, + autoVerifiedAttributes: [ + { + type: 'EMAIL', + }, + ], + oAuth: { + redirectSigninURIs: ['https://www.google.com/'], + redirectSignoutURIs: ['https://www.nytimes.com/'], + domainPrefix: generateRandomShortId(), + oAuthGrantType: 'CODE', + oAuthScopes: ['EMAIL', 'OPENID'], + socialProviderConfigurations: [ + { + provider: 'FACEBOOK', + clientId: socialProviders.FACEBOOK_APP_ID, + clientSecret: socialProviders.FACEBOOK_APP_SECRET, + }, + { + provider: 'GOOGLE', + clientId: socialProviders.GOOGLE_APP_ID, + clientSecret: socialProviders.GOOGLE_APP_SECRET, + }, + { + provider: 'LOGIN_WITH_AMAZON', + clientId: socialProviders.AMAZON_APP_ID, + clientSecret: socialProviders.AMAZON_APP_SECRET, + }, + { + provider: 'SIGN_IN_WITH_APPLE', + clientId: socialProviders.APPLE_APP_ID, + keyId: socialProviders.APPLE_KEY_ID, + teamId: socialProviders.APPLE_TEAM_ID, + privateKey: socialProviders.APPLE_PRIVATE_KEY, + }, + ], + }, + }, + }, + }; + await addHeadlessAuth(projRoot, addAuthRequest); + + expect(isDeploymentSecretForEnvExists(projRoot, 'integtest')).toBeTruthy(); + await amplifyPushNonInteractive(projRoot); + expect(isDeploymentSecretForEnvExists(projRoot, 'integtest')).toBeFalsy(); + + const meta = getProjectMeta(projRoot); + const authMeta = Object.keys(meta.auth).map((key) => meta.auth[key])[0]; + const id = authMeta.output.UserPoolId; + const userPool = await getUserPool(id, meta.providers.awscloudformation.Region); + const clientIds = [authMeta.output.AppClientIDWeb, authMeta.output.AppClientID]; + const clients = await getUserPoolClients(id, clientIds, meta.providers.awscloudformation.Region); + + expect(userPool.UserPool).toBeDefined(); + expect(clients).toHaveLength(2); + validateNodeModulesDirRemoval(projRoot); + expect(clients[0].UserPoolClient.CallbackURLs[0]).toEqual('https://www.google.com/'); + expect(clients[0].UserPoolClient.LogoutURLs[0]).toEqual('https://www.nytimes.com/'); + expect(clients[0].UserPoolClient.SupportedIdentityProviders).toHaveLength(5); + + const idpFacebook = await getSocialIdpProvider(id, 'Facebook', meta.providers.awscloudformation.Region); + const idpGoogle = await getSocialIdpProvider(id, 'Google', meta.providers.awscloudformation.Region); + const idpAmazon = await getSocialIdpProvider(id, 'LoginWithAmazon', meta.providers.awscloudformation.Region); + const idpApple = await getSocialIdpProvider(id, 'SignInWithApple', meta.providers.awscloudformation.Region); + expect(idpFacebook.IdentityProvider.ProviderDetails.client_id).toEqual(socialProviders.FACEBOOK_APP_ID); + expect(idpFacebook.IdentityProvider.ProviderDetails.client_secret).toEqual(socialProviders.FACEBOOK_APP_SECRET); + expect(idpGoogle.IdentityProvider.ProviderDetails.client_id).toEqual(socialProviders.GOOGLE_APP_ID); + expect(idpGoogle.IdentityProvider.ProviderDetails.client_secret).toEqual(socialProviders.GOOGLE_APP_SECRET); + expect(idpAmazon.IdentityProvider.ProviderDetails.client_id).toEqual(socialProviders.AMAZON_APP_ID); + expect(idpAmazon.IdentityProvider.ProviderDetails.client_secret).toEqual(socialProviders.AMAZON_APP_SECRET); + expect(idpApple.IdentityProvider.ProviderDetails.client_id).toEqual(socialProviders.APPLE_APP_ID); + expect(idpApple.IdentityProvider.ProviderDetails.key_id).toEqual(socialProviders.APPLE_KEY_ID); + }); +}); diff --git a/packages/amplify-e2e-tests/src/__tests__/auth_3a.test.ts b/packages/amplify-e2e-tests/src/__tests__/auth_3a.test.ts index fb51f65caeb..e81a1b2315f 100644 --- a/packages/amplify-e2e-tests/src/__tests__/auth_3a.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/auth_3a.test.ts @@ -8,7 +8,6 @@ import { createNewProjectDir, deleteProjectDir, } from '@aws-amplify/amplify-e2e-core'; -import _ from 'lodash'; const defaultsSettings = { name: 'authTest', @@ -41,7 +40,7 @@ describe('amplify add auth...a', () => { await removeAuthWithDefault(projRoot); await amplifyPushAuth(projRoot); - expect(AuthRoleName).not.toHaveValidPolicyConditionMatchingIdpId(idpId); - expect(UnauthRoleName).not.toHaveValidPolicyConditionMatchingIdpId(idpId); + expect(AuthRoleName).toHaveDenyAssumeRolePolicy(); + expect(UnauthRoleName).toHaveDenyAssumeRolePolicy(); }); }); diff --git a/packages/amplify-e2e-tests/src/__tests__/auth_3b.test.ts b/packages/amplify-e2e-tests/src/__tests__/auth_3b.test.ts index bf7271b9869..258b74828c3 100644 --- a/packages/amplify-e2e-tests/src/__tests__/auth_3b.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/auth_3b.test.ts @@ -2,19 +2,12 @@ import { initJSProjectWithProfile, deleteProject, amplifyPushAuth, - addAuthWithDefault, - removeAuthWithDefault, - addAuthWithMaxOptions, addAuthUserPoolOnly, - getBackendAmplifyMeta, createNewProjectDir, deleteProjectDir, getProjectMeta, getUserPool, - getUserPoolClients, - getLambdaFunction, } from '@aws-amplify/amplify-e2e-core'; -import _ from 'lodash'; const defaultsSettings = { name: 'authTest', diff --git a/packages/amplify-e2e-tests/src/__tests__/auth_3c.test.ts b/packages/amplify-e2e-tests/src/__tests__/auth_3c.test.ts index a5acc6be44f..265224d0726 100644 --- a/packages/amplify-e2e-tests/src/__tests__/auth_3c.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/auth_3c.test.ts @@ -2,11 +2,7 @@ import { initJSProjectWithProfile, deleteProject, amplifyPushAuth, - addAuthWithDefault, - removeAuthWithDefault, addAuthWithMaxOptions, - addAuthUserPoolOnly, - getBackendAmplifyMeta, createNewProjectDir, deleteProjectDir, getProjectMeta, @@ -14,7 +10,6 @@ import { getUserPoolClients, getLambdaFunction, } from '@aws-amplify/amplify-e2e-core'; -import _ from 'lodash'; const defaultsSettings = { name: 'authTest', diff --git a/packages/amplify-e2e-tests/src/__tests__/auth_4a.test.ts b/packages/amplify-e2e-tests/src/__tests__/auth_4a.test.ts index 9512dcda654..8f1e9a17298 100644 --- a/packages/amplify-e2e-tests/src/__tests__/auth_4a.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/auth_4a.test.ts @@ -2,27 +2,19 @@ import * as fs from 'fs-extra'; import { initJSProjectWithProfile, initAndroidProjectWithProfile, - initIosProjectWithProfile, deleteProject, amplifyPushAuth, - addFeatureFlag, - addAuthWithRecaptchaTrigger, addAuthWithCustomTrigger, addAuthWithSignInSignOutUrl, updateAuthWithoutCustomTrigger, - updateAuthRemoveRecaptchaTrigger, updateAuthSignInSignOutUrl, createNewProjectDir, deleteProjectDir, getProjectMeta, - getAwsAndroidConfig, - getAwsIOSConfig, getUserPool, getUserPoolClients, getLambdaFunction, - getFunction, } from '@aws-amplify/amplify-e2e-core'; -import _ from 'lodash'; const defaultsSettings = { name: 'authTest', diff --git a/packages/amplify-e2e-tests/src/__tests__/auth_4b.test.ts b/packages/amplify-e2e-tests/src/__tests__/auth_4b.test.ts index 718a8f05b04..0060cdf73b0 100644 --- a/packages/amplify-e2e-tests/src/__tests__/auth_4b.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/auth_4b.test.ts @@ -2,27 +2,18 @@ import * as fs from 'fs-extra'; import { initJSProjectWithProfile, initAndroidProjectWithProfile, - initIosProjectWithProfile, deleteProject, amplifyPushAuth, addFeatureFlag, addAuthWithRecaptchaTrigger, addAuthWithCustomTrigger, - addAuthWithSignInSignOutUrl, - updateAuthWithoutCustomTrigger, updateAuthRemoveRecaptchaTrigger, - updateAuthSignInSignOutUrl, createNewProjectDir, deleteProjectDir, getProjectMeta, getAwsAndroidConfig, - getAwsIOSConfig, - getUserPool, - getUserPoolClients, - getLambdaFunction, getFunction, } from '@aws-amplify/amplify-e2e-core'; -import _ from 'lodash'; const defaultsSettings = { name: 'authTest', diff --git a/packages/amplify-e2e-tests/src/__tests__/auth_4c.test.ts b/packages/amplify-e2e-tests/src/__tests__/auth_4c.test.ts index 1f18b5ed1b7..3621f9d5cb2 100644 --- a/packages/amplify-e2e-tests/src/__tests__/auth_4c.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/auth_4c.test.ts @@ -1,28 +1,13 @@ -import * as fs from 'fs-extra'; import { - initJSProjectWithProfile, - initAndroidProjectWithProfile, initIosProjectWithProfile, deleteProject, amplifyPushAuth, - addFeatureFlag, addAuthWithRecaptchaTrigger, - addAuthWithCustomTrigger, - addAuthWithSignInSignOutUrl, - updateAuthWithoutCustomTrigger, updateAuthRemoveRecaptchaTrigger, - updateAuthSignInSignOutUrl, createNewProjectDir, deleteProjectDir, - getProjectMeta, - getAwsAndroidConfig, getAwsIOSConfig, - getUserPool, - getUserPoolClients, - getLambdaFunction, - getFunction, } from '@aws-amplify/amplify-e2e-core'; -import _ from 'lodash'; const defaultsSettings = { name: 'authTest', diff --git a/packages/amplify-e2e-tests/src/__tests__/auth_5g.test.ts b/packages/amplify-e2e-tests/src/__tests__/auth_5g.test.ts new file mode 100644 index 00000000000..db5a3b4b1e9 --- /dev/null +++ b/packages/amplify-e2e-tests/src/__tests__/auth_5g.test.ts @@ -0,0 +1,59 @@ +/* eslint-disable import/no-extraneous-dependencies */ +import { + assertAppClientSecretInFiles, + deleteProject, + amplifyPushNonInteractive, + addHeadlessAuth, + createNewProjectDir, + deleteProjectDir, + initAndroidProjectWithProfile, + updateCLIParametersToGenerateUserPoolClientSecret, +} from '@aws-amplify/amplify-e2e-core'; +import { + // eslint-disable-next-line spellcheck/spell-checker + AddAuthRequest, + CognitoUserPoolSigninMethod, + CognitoUserProperty, +} from 'amplify-headless-interface'; + +const PROJECT_NAME = 'authTest'; +const defaultsSettings = { + name: PROJECT_NAME, +}; + +describe('headless auth g', () => { + let projRoot: string; + beforeEach(async () => { + projRoot = await createNewProjectDir('auth-update'); + }); + + afterEach(async () => { + await deleteProject(projRoot); + deleteProjectDir(projRoot); + }); + + it('adds auth resource to android project', async () => { + const addAuthRequest: AddAuthRequest = { + version: 2, + resourceName: 'myAuthResource', + serviceConfiguration: { + serviceName: 'Cognito', + includeIdentityPool: false, + userPoolConfiguration: { + requiredSignupAttributes: [CognitoUserProperty.EMAIL, CognitoUserProperty.PHONE_NUMBER], + // eslint-disable-next-line spellcheck/spell-checker + signinMethod: CognitoUserPoolSigninMethod.USERNAME, + }, + }, + }; + + await initAndroidProjectWithProfile(projRoot, defaultsSettings); + await addHeadlessAuth(projRoot, addAuthRequest); + + updateCLIParametersToGenerateUserPoolClientSecret(projRoot, addAuthRequest.resourceName); + + await amplifyPushNonInteractive(projRoot); + + await assertAppClientSecretInFiles(projRoot, 'android'); + }); +}); diff --git a/packages/amplify-e2e-tests/src/__tests__/auth_6.test.ts b/packages/amplify-e2e-tests/src/__tests__/auth_6.test.ts index 4fd5f92efcc..0e1396d0c1a 100644 --- a/packages/amplify-e2e-tests/src/__tests__/auth_6.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/auth_6.test.ts @@ -103,6 +103,9 @@ describe('zero config auth', () => { // test happy path const srcOverrideFilePath = path.join(__dirname, '..', '..', 'overrides', 'override-auth.ts'); replaceOverrideFileWithProjectInfo(srcOverrideFilePath, destOverrideFilePath, 'integtest', PROJECT_NAME); + // should throw error if AMPLIFY_CLI_DISABLE_SCRIPTING_FEATURES is set + await expect(amplifyPushOverride(projRoot, false, { AMPLIFY_CLI_DISABLE_SCRIPTING_FEATURES: 'true' })).rejects.toThrowError(); + // should succeed now await amplifyPushOverride(projRoot); // check overwritten config diff --git a/packages/amplify-e2e-tests/src/__tests__/auth_9.test.ts b/packages/amplify-e2e-tests/src/__tests__/auth_9.test.ts index 3d7ef5ed477..f12047d033b 100644 --- a/packages/amplify-e2e-tests/src/__tests__/auth_9.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/auth_9.test.ts @@ -46,7 +46,7 @@ describe('amplify auth with trigger', () => { expect(userPool.UserPool.LambdaConfig.DefineAuthChallenge).toBeDefined(); expect(userPool.UserPool.LambdaConfig.VerifyAuthChallengeResponse).toBeDefined(); - await updateAuthChangeToUserPoolOnlyAndSetCodeMessages(projRoot, {}); + await updateAuthChangeToUserPoolOnlyAndSetCodeMessages(projRoot); await amplifyPushAuth(projRoot); @@ -64,7 +64,7 @@ describe('amplify auth with trigger', () => { expect(userPool.UserPool.LambdaConfig.VerifyAuthChallengeResponse).toBeDefined(); }); - const updateAuthChangeToUserPoolOnlyAndSetCodeMessages = async (cwd: string, settings: any): Promise => { + const updateAuthChangeToUserPoolOnlyAndSetCodeMessages = async (cwd: string): Promise => { return new Promise((resolve, reject) => { const chain = spawn(getCLIPath(), ['update', 'auth'], { cwd, stripColors: true }); diff --git a/packages/amplify-e2e-tests/src/__tests__/aws-exports/js-frontend-config.test.ts b/packages/amplify-e2e-tests/src/__tests__/aws-exports/js-frontend-config.test.ts new file mode 100644 index 00000000000..c503d6acee6 --- /dev/null +++ b/packages/amplify-e2e-tests/src/__tests__/aws-exports/js-frontend-config.test.ts @@ -0,0 +1,98 @@ +import * as fs from 'fs-extra'; +import execa from 'execa'; + +import { + addAuthWithDefault, + amplifyPushAuth, + createNewProjectDir, + deleteProject, + deleteProjectDir, + getNpxPath, + initJSProjectWithProfile, +} from '@aws-amplify/amplify-e2e-core'; +import * as babel from '@babel/core'; +import * as babelTransformEsmToCjs from '@babel/plugin-transform-modules-commonjs'; +import Module from 'module'; + +describe('JS frontend config tests', () => { + let projRoot: string; + let appRoot: string; + + beforeEach(async () => { + projRoot = await createNewProjectDir('aws-exports-test'); + appRoot = await createReactApp(projRoot, 'reactapp'); + }); + + afterEach(async () => { + // extra delete in case test fails, delete is noop if project was already deleted + await deleteProject(appRoot); + deleteProjectDir(projRoot); + }); + + test('both aws-exports.js & amplifyconfiguration.json is generated', async () => { + // amplify init, this will generate aws-exports in the project + await initJSProjectWithProfile(appRoot, { name: 'reactapp' }); + + // check if amplify init generated project files + expect(fs.existsSync(`${appRoot}/src/aws-exports.js`)).toBeTruthy(); + expect(fs.existsSync(`${appRoot}/src/amplifyconfiguration.json`)).toBeTruthy(); + + const initialAwsExportsModule = readAwsExports(appRoot, `${appRoot}/src/aws-exports.js`); + const initialAmplifyConfiguration = fs.readJSONSync(`${appRoot}/src/amplifyconfiguration.json`); + + // contents should match + expect(initialAwsExportsModule).toMatchObject(initialAmplifyConfiguration); + + // should update both aws-exports.js & amplifyconfiguration.json + // add a category + await addAuthWithDefault(appRoot); + await amplifyPushAuth(appRoot); + + // when aws-exports updates, both files should still exist + const awsExportsModule = readAwsExports(appRoot, `${appRoot}/src/aws-exports.js`); + const amplifyConfiguration = fs.readJSONSync(`${appRoot}/src/amplifyconfiguration.json`); + + // config should have updated + expect(amplifyConfiguration.aws_user_pools_id).toBeDefined(); + + // contents should match + expect(amplifyConfiguration).toMatchObject(awsExportsModule); + expect(amplifyConfiguration).not.toStrictEqual(initialAmplifyConfiguration); + + // both aws-exports.js & amplifyconfiguration.json should be removed on delete + await deleteProject(appRoot); + + // when amplify app gets deleted, all config should be removed + expect(fs.existsSync(`${appRoot}/src/aws-exports.js`)).toBeFalsy(); + expect(fs.existsSync(`${appRoot}/src/amplifyconfiguration.json`)).toBeFalsy(); + }); +}); + +// returns path to react project directory +async function createReactApp(cwd: string, projectName: string) { + const projectRoot = `${cwd}/${projectName}`; + + execa.sync(getNpxPath(), ['create-react-app', '--scripts-version', '5.0.1', projectName, '--use-npm'], { cwd, encoding: 'utf-8' }); + + return projectRoot; +} + +/** + * Reads and transpiles aws exports. Jest doesn't like ES6 modules. + */ +function readAwsExports(projectPath: string, targetFilePath: string) { + const fileContents = fs.readFileSync(targetFilePath, 'utf-8'); + // transpile the file contents to CommonJS + const { code } = babel.transformSync(fileContents, { + plugins: [babelTransformEsmToCjs], + configFile: false, + babelrc: false, + }); + const mod = new Module('test_module'); + // @ts-ignore + mod._compile(code, 'aws-exports.js'); + // add paths to the module to account for node_module imports in aws-exports.js (should there be any) + mod.paths = [projectPath]; + // the transpiled result will contain `exports.default` + return mod.exports?.default || mod.exports; +} diff --git a/packages/amplify-e2e-tests/src/__tests__/build-function-yarn-modern.test.ts b/packages/amplify-e2e-tests/src/__tests__/build-function-yarn-modern.test.ts new file mode 100644 index 00000000000..aebac9607cf --- /dev/null +++ b/packages/amplify-e2e-tests/src/__tests__/build-function-yarn-modern.test.ts @@ -0,0 +1,37 @@ +import execa from 'execa'; +import { + addFunction, + createNewProjectDir, + deleteProject, + deleteProjectDir, + functionBuild, + initJSProjectWithProfile, +} from '@aws-amplify/amplify-e2e-core'; + +describe('build successfully via Yarn Modern', () => { + let projRoot: string; + + beforeEach(async () => { + projRoot = await createNewProjectDir('analytics'); + await execa('corepack', ['enable'], { cwd: projRoot }); + await execa('yarn', ['init', '-2'], { cwd: projRoot }); + await execa('yarn', ['--version'], { cwd: projRoot }); + }); + + afterEach(async () => { + await deleteProject(projRoot); + deleteProjectDir(projRoot); + }); + + it('add analytics and function', async () => { + await initJSProjectWithProfile(projRoot, {}); + await addFunction( + projRoot, + { + functionTemplate: 'Hello World', + }, + 'nodejs', + ); + await functionBuild(projRoot); + }); +}); diff --git a/packages/amplify-e2e-tests/src/__tests__/custom-resource-with-storage.test.ts b/packages/amplify-e2e-tests/src/__tests__/custom-resource-with-storage.test.ts index 244fadf69b4..776d5917509 100644 --- a/packages/amplify-e2e-tests/src/__tests__/custom-resource-with-storage.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/custom-resource-with-storage.test.ts @@ -12,6 +12,9 @@ import { getAppId, addAuthWithDefault, addS3WithGuestAccess, + /* TEMPORARY-PR12830: Remove after we ship PR12830 */ + useLatestExtensibilityHelper, + /* END TEMPORARY */ } from '@aws-amplify/amplify-e2e-core'; import * as fs from 'fs-extra'; import * as path from 'path'; @@ -20,7 +23,7 @@ import { v4 as uuid } from 'uuid'; describe('adding custom resources test', () => { const projectName = 'cusres'; let projRoot: string; - const envName = 'dev'; + const envName = 'devtest'; beforeEach(async () => { projRoot = await createNewProjectDir(projectName); await initJSProjectWithProfile(projRoot, { envName, disableAmplifyAppCreation: false }); @@ -41,6 +44,11 @@ describe('adding custom resources test', () => { const srcCustomResourceFilePath = path.join(__dirname, '..', '..', 'custom-resources', 'custom-cdk-stack-with-storage.ts'); const destCustomResourceFilePath = path.join(projRoot, 'amplify', 'backend', 'custom', cdkResourceName, 'cdk-stack.ts'); fs.copyFileSync(srcCustomResourceFilePath, destCustomResourceFilePath); + /* TEMPORARY-PR12830: Remove after we ship PR12830 + * this is required to jump over breaking change between 2.68 and 2.80 of CDK. + */ + useLatestExtensibilityHelper(projRoot, cdkResourceName); + /* END TEMPORARY */ await buildCustomResources(projRoot); await amplifyPushAuth(projRoot); await gitCleanFdX(projRoot); diff --git a/packages/amplify-e2e-tests/src/__tests__/custom_policies_container.test.ts b/packages/amplify-e2e-tests/src/__tests__/custom_policies_container.test.ts index 46284ba04cf..5971c0c44fc 100644 --- a/packages/amplify-e2e-tests/src/__tests__/custom_policies_container.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/custom_policies_container.test.ts @@ -10,7 +10,6 @@ import { createNewProjectDir, deleteProjectDir, } from '@aws-amplify/amplify-e2e-core'; -import _ from 'lodash'; import { JSONUtilities } from '@aws-amplify/amplify-cli-core'; import AWS from 'aws-sdk'; import path from 'path'; diff --git a/packages/amplify-e2e-tests/src/__tests__/custom_resources.test.ts b/packages/amplify-e2e-tests/src/__tests__/custom_resources.test.ts index fdf20042169..e669fa0c459 100644 --- a/packages/amplify-e2e-tests/src/__tests__/custom_resources.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/custom_resources.test.ts @@ -60,11 +60,19 @@ describe('adding custom resources test', () => { const ddbName = 'ddb'; await addSimpleDDB(projRoot, { name: ddbName }); - // happy path test (this custom stack compiles and runs successfully) + // should throw error if AMPLIFY_CLI_DISABLE_SCRIPTING_FEATURES is set const srcCustomResourceFilePath = path.join(__dirname, '..', '..', 'custom-resources', 'custom-cdk-stack.ts'); + fs.copyFileSync(srcRuntimeErrorTest, destCustomResourceFilePath); + await expect(amplifyPushAuth(projRoot, false, { AMPLIFY_CLI_DISABLE_SCRIPTING_FEATURES: 'true' })).rejects.toThrowError(); + + // happy path test (this custom stack compiles and runs successfully) fs.copyFileSync(srcCustomResourceFilePath, destCustomResourceFilePath); - await buildCustomResources(projRoot); + /* TEMPORARY-PR12830: Uncomment after we ship PR12830 + * this is required to jump over breaking change between 2.68 and 2.80 of CDK. + */ + // await buildCustomResources(projRoot); + /* END TEMPORARY */ // check if latest @aws-amplify/cli-extensibility-helper works // skip on Windows, we don't start local registry there diff --git a/packages/amplify-e2e-tests/src/__tests__/delete.test.ts b/packages/amplify-e2e-tests/src/__tests__/delete.test.ts index b6da88fe500..24f19f12e37 100644 --- a/packages/amplify-e2e-tests/src/__tests__/delete.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/delete.test.ts @@ -25,7 +25,6 @@ import { pushToCloud, } from '@aws-amplify/amplify-e2e-core'; import * as fs from 'fs-extra'; -import _ from 'lodash'; import { addEnvironment, checkoutEnvironment, removeEnvironment } from '../environment/env'; import { addCodegen } from '../codegen/add'; import { getAWSExportsPath } from '../aws-exports/awsExports'; @@ -123,8 +122,8 @@ async function testDeletion(projRoot: string, settings: { ios?: boolean; android if (meta.AmplifyAppId) expect(await appExists(meta.AmplifyAppId, meta.Region)).toBe(false); expect(await bucketNotExists(deploymentBucketName1)).toBe(true); expect(await bucketNotExists(deploymentBucketName2)).toBe(true); - expect(AuthRoleName).not.toBeIAMRoleWithArn(AuthRoleName); - expect(UnauthRoleName).not.toBeIAMRoleWithArn(UnauthRoleName); + await expect(AuthRoleName).not.toBeIAMRoleWithArn(AuthRoleName); + await expect(UnauthRoleName).not.toBeIAMRoleWithArn(UnauthRoleName); // check that config/exports file was deleted if (settings.ios) { expect(fs.existsSync(getAWSConfigIOSPath(projRoot))).toBe(false); @@ -174,7 +173,7 @@ async function appExists(appId: string, region: string) { } async function timeout(timeout: number) { - return new Promise((resolve, reject) => { + return new Promise((resolve) => { setTimeout(resolve, timeout); }); } diff --git a/packages/amplify-e2e-tests/src/__tests__/diagnose.test.ts b/packages/amplify-e2e-tests/src/__tests__/diagnose.test.ts index 4f97273fc9d..8b882cb61c8 100644 --- a/packages/amplify-e2e-tests/src/__tests__/diagnose.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/diagnose.test.ts @@ -10,10 +10,10 @@ import { diagnoseSendReport, diagnoseSendReport_ZipFailed, } from '@aws-amplify/amplify-e2e-core'; +import { extract } from '@aws-amplify/amplify-cli-core'; import * as fs from 'fs-extra'; import * as path from 'path'; import glob from 'glob'; -import extract from 'extract-zip'; const PARAMETERS_JSON = 'parameters.json'; const BUILD = 'build'; @@ -97,7 +97,7 @@ describe('amplify diagnose --send-report', () => { // delete the file and send report again const backendFConfigFilePath: string = path.join(projectRoot, 'amplify', 'backend', 'backend-config.json'); fs.unlinkSync(backendFConfigFilePath); - diagnoseSendReport_ZipFailed(projectRoot); + await diagnoseSendReport_ZipFailed(projectRoot); }); }); const unzipAndReturnFiles = async (zipPath: string, unzippedDir: string): Promise => { diff --git a/packages/amplify-e2e-tests/src/__tests__/export-pull-a.test.ts b/packages/amplify-e2e-tests/src/__tests__/export-pull-a.test.ts index 3e6b26f28b7..39ddc1455b6 100644 --- a/packages/amplify-e2e-tests/src/__tests__/export-pull-a.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/export-pull-a.test.ts @@ -72,7 +72,7 @@ describe('amplify export pull a', () => { const meta = getBackendAmplifyMeta(projRoot); const stackName = _.get(meta, ['providers', 'awscloudformation', 'StackName']); const pathToExportGeneratedConfig = path.join(projRoot, 'exportSrc'); - fs.ensureDir(pathToExportGeneratedConfig); + await fs.ensureDir(pathToExportGeneratedConfig); await exportPullBackend(projRoot, { exportPath: pathToExportGeneratedConfig, frontend, diff --git a/packages/amplify-e2e-tests/src/__tests__/export-pull-b.test.ts b/packages/amplify-e2e-tests/src/__tests__/export-pull-b.test.ts index ff8be8dc639..673a396f80c 100644 --- a/packages/amplify-e2e-tests/src/__tests__/export-pull-b.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/export-pull-b.test.ts @@ -76,7 +76,7 @@ describe('amplify export pull b', () => { const meta = getBackendAmplifyMeta(projRoot); const stackName = _.get(meta, ['providers', 'awscloudformation', 'StackName']); const pathToExportGeneratedConfig = path.join(projRoot, 'exportSrc'); - fs.ensureDir(pathToExportGeneratedConfig); + await fs.ensureDir(pathToExportGeneratedConfig); await exportPullBackend(projRoot, { exportPath: pathToExportGeneratedConfig, frontend, diff --git a/packages/amplify-e2e-tests/src/__tests__/export-pull-c.test.ts b/packages/amplify-e2e-tests/src/__tests__/export-pull-c.test.ts index eecab3b9f80..05145aecfce 100644 --- a/packages/amplify-e2e-tests/src/__tests__/export-pull-c.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/export-pull-c.test.ts @@ -76,7 +76,7 @@ describe('amplify export pull c', () => { const meta = getBackendAmplifyMeta(projRoot); const stackName = _.get(meta, ['providers', 'awscloudformation', 'StackName']); const pathToExportGeneratedConfig = path.join(projRoot, 'exportSrc'); - fs.ensureDir(pathToExportGeneratedConfig); + await fs.ensureDir(pathToExportGeneratedConfig); await exportPullBackend(projRoot, { exportPath: pathToExportGeneratedConfig, frontend, diff --git a/packages/amplify-e2e-tests/src/__tests__/export-pull-d.test.ts b/packages/amplify-e2e-tests/src/__tests__/export-pull-d.test.ts index 14cb5f3f0fe..cce868638a7 100644 --- a/packages/amplify-e2e-tests/src/__tests__/export-pull-d.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/export-pull-d.test.ts @@ -71,7 +71,7 @@ describe('amplify export pull d', () => { const meta = getBackendAmplifyMeta(projRoot); const stackName = _.get(meta, ['providers', 'awscloudformation', 'StackName']); const pathToExportGeneratedConfig = path.join(projRoot, 'exportSrc'); - fs.ensureDir(pathToExportGeneratedConfig); + await fs.ensureDir(pathToExportGeneratedConfig); await exportPullBackend(projRoot, { exportPath: pathToExportGeneratedConfig, frontend, diff --git a/packages/amplify-e2e-tests/src/__tests__/function_1.test.ts b/packages/amplify-e2e-tests/src/__tests__/function_1.test.ts index ba513d463ba..4140bb6c41c 100644 --- a/packages/amplify-e2e-tests/src/__tests__/function_1.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/function_1.test.ts @@ -23,8 +23,6 @@ import { generateRandomShortId, } from '@aws-amplify/amplify-e2e-core'; -import _ from 'lodash'; - describe('nodejs', () => { describe('amplify add function', () => { let projRoot: string; diff --git a/packages/amplify-e2e-tests/src/__tests__/function_14.test.ts b/packages/amplify-e2e-tests/src/__tests__/function_14.test.ts new file mode 100644 index 00000000000..2502c920a1b --- /dev/null +++ b/packages/amplify-e2e-tests/src/__tests__/function_14.test.ts @@ -0,0 +1,65 @@ +import { AmplifyCategories, JSONUtilities, pathManager } from '@aws-amplify/amplify-cli-core'; +import { + addFunction, + createNewProjectDir, + deleteProject, + deleteProjectDir, + functionBuild, + generateRandomShortId, + initJSProjectWithProfile, +} from '@aws-amplify/amplify-e2e-core'; +import path from 'path'; + +describe('amplify push function cases:', () => { + let projRoot: string; + + beforeEach(async () => { + projRoot = await createNewProjectDir('function-pm'); + const projName = `funcpm${generateRandomShortId()}`; + await initJSProjectWithProfile(projRoot, { name: projName }); + }); + + afterEach(async () => { + await deleteProject(projRoot); + deleteProjectDir(projRoot); + }); + + it('should select the NPM package manager and build', async () => { + const funcName = `npm${generateRandomShortId()}`; + + await addFunction(projRoot, { name: funcName, packageManager: { name: 'NPM' }, functionTemplate: 'Hello World' }, 'nodejs'); + await functionBuild(projRoot); + + const functionPath = pathManager.getResourceDirectoryPath(projRoot, AmplifyCategories.FUNCTION, funcName); + const amplifyState = JSONUtilities.readJson(path.join(functionPath, 'amplify.state')); + + expect(amplifyState.scripts.build).toMatch(/npm.* install --no-bin-links --production/); + }); + + it('should select the YARN package manager and build', async () => { + const funcName = `yarn${generateRandomShortId()}`; + + await addFunction(projRoot, { name: funcName, packageManager: { name: 'Yarn' }, functionTemplate: 'Hello World' }, 'nodejs'); + await functionBuild(projRoot); + + const functionPath = pathManager.getResourceDirectoryPath(projRoot, AmplifyCategories.FUNCTION, funcName); + const amplifyState = JSONUtilities.readJson(path.join(functionPath, 'amplify.state')); + + expect(amplifyState.scripts.build).toMatch(/yarn.* --no-bin-links --production/); + }); + + it('should select the CUSTOM package manager and build', async () => { + const funcName = `custom${generateRandomShortId()}`; + + await addFunction( + projRoot, + { name: funcName, packageManager: { name: 'Custom Build Command or Script Path', command: 'yarn' }, functionTemplate: 'Hello World' }, + 'nodejs', + ); + const functionPath = pathManager.getResourceDirectoryPath(projRoot, AmplifyCategories.FUNCTION, funcName); + const amplifyState = JSONUtilities.readJson(path.join(functionPath, 'amplify.state')); + expect(amplifyState.scripts.build).toMatch(/yarn.*/); + + await functionBuild(projRoot); + }); +}); diff --git a/packages/amplify-e2e-tests/src/__tests__/function_15.test.ts b/packages/amplify-e2e-tests/src/__tests__/function_15.test.ts new file mode 100644 index 00000000000..a49b6cd5677 --- /dev/null +++ b/packages/amplify-e2e-tests/src/__tests__/function_15.test.ts @@ -0,0 +1,42 @@ +import { + addFunction, + amplifyPushAuth, + createNewProjectDir, + deleteProject, + deleteProjectDir, + generateRandomShortId, + initJSProjectWithProfile, + loadFunctionTestFile, + overrideFunctionSrcNode, +} from '@aws-amplify/amplify-e2e-core'; +import { v4 as uuid } from 'uuid'; + +describe('amplify push function cases:', () => { + let projRoot: string; + + beforeEach(async () => { + projRoot = await createNewProjectDir('multiple-function-push'); + }); + + afterEach(async () => { + await deleteProject(projRoot); + deleteProjectDir(projRoot); + }); + + it('should be able to push multiple functions at the same time', async () => { + const projName = `multilambda${generateRandomShortId()}`; + await initJSProjectWithProfile(projRoot, { name: projName }); + + const [shortId] = uuid().split('-'); + const functionName = `nodetestfunction${shortId}`; + + await addFunction(projRoot, { functionTemplate: 'Hello World', name: functionName }, 'nodejs'); + await amplifyPushAuth(projRoot); + + const functionCode = loadFunctionTestFile('case-function.js').replace('{{testString}}', 'Hello from Lambda!'); + overrideFunctionSrcNode(projRoot, functionName, functionCode); + await addFunction(projRoot, { functionTemplate: 'Hello World' }, 'python'); + + await amplifyPushAuth(projRoot); + }); +}); diff --git a/packages/amplify-e2e-tests/src/__tests__/function_2a.test.ts b/packages/amplify-e2e-tests/src/__tests__/function_2a.test.ts index 1b118a96c81..0dcbd48bbd2 100644 --- a/packages/amplify-e2e-tests/src/__tests__/function_2a.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/function_2a.test.ts @@ -17,7 +17,6 @@ import { loadFunctionTestFile, generateRandomShortId, } from '@aws-amplify/amplify-e2e-core'; -import _ from 'lodash'; describe('nodejs', () => { describe('amplify add function with additional permissions', () => { diff --git a/packages/amplify-e2e-tests/src/__tests__/function_2b.test.ts b/packages/amplify-e2e-tests/src/__tests__/function_2b.test.ts index 9aff9f27cb2..99e14b1a10e 100644 --- a/packages/amplify-e2e-tests/src/__tests__/function_2b.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/function_2b.test.ts @@ -17,7 +17,6 @@ import { createRandomName, generateRandomShortId, } from '@aws-amplify/amplify-e2e-core'; -import _ from 'lodash'; describe('nodejs', () => { describe('amplify add function with additional permissions', () => { @@ -68,11 +67,7 @@ describe('nodejs', () => { await amplifyPush(projRoot); const meta = getProjectMeta(projRoot); const { GraphQLAPIIdOutput: appsyncId } = Object.keys(meta.api).map((key) => meta.api[key])[0].output; - const { - Arn: functionArn, - Name: functionName, - Region: region, - } = Object.keys(meta.function).map((key) => meta.function[key])[0].output; + const { Name: functionName, Region: region } = Object.keys(meta.function).map((key) => meta.function[key])[0].output; expect(appsyncId).toBeDefined(); expect(functionName).toBeDefined(); expect(region).toBeDefined(); diff --git a/packages/amplify-e2e-tests/src/__tests__/function_2c.test.ts b/packages/amplify-e2e-tests/src/__tests__/function_2c.test.ts index 3899c120bae..ff65536ffd8 100644 --- a/packages/amplify-e2e-tests/src/__tests__/function_2c.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/function_2c.test.ts @@ -9,7 +9,6 @@ import { initJSProjectWithProfile, generateRandomShortId, } from '@aws-amplify/amplify-e2e-core'; -import _ from 'lodash'; describe('nodejs', () => { describe('amplify add function with additional permissions', () => { diff --git a/packages/amplify-e2e-tests/src/__tests__/function_2d.test.ts b/packages/amplify-e2e-tests/src/__tests__/function_2d.test.ts index 338fb49d325..2f881d3a036 100644 --- a/packages/amplify-e2e-tests/src/__tests__/function_2d.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/function_2d.test.ts @@ -110,6 +110,17 @@ describe('nodejs', () => { expect(JSON.parse(response.Payload.toString()).statusCode).toEqual(200); expect(JSON.parse(JSON.parse(response.Payload.toString()).body)).toEqual(item2); + response = await functionCloudInvoke(projRoot, { + funcName, + payload: JSON.stringify({ + path: '/item', + httpMethod: 'GET', + }), + }); + expect(JSON.parse(response.Payload.toString()).statusCode).toEqual(200); + expect(JSON.parse(JSON.parse(response.Payload.toString()).body)).toContainEqual(item1); + expect(JSON.parse(JSON.parse(response.Payload.toString()).body)).toContainEqual(item2); + response = await functionCloudInvoke(projRoot, { funcName, payload: JSON.stringify({ diff --git a/packages/amplify-e2e-tests/src/__tests__/function_3a.test.ts b/packages/amplify-e2e-tests/src/__tests__/function_3a.test.ts deleted file mode 100644 index 80126884a59..00000000000 --- a/packages/amplify-e2e-tests/src/__tests__/function_3a.test.ts +++ /dev/null @@ -1,237 +0,0 @@ -import { - initJSProjectWithProfile, - deleteProject, - amplifyPushAuth, - getBackendAmplifyMeta, - addFunction, - functionMockAssert, - functionCloudInvoke, - createNewProjectDir, - deleteProjectDir, - generateRandomShortId, -} from '@aws-amplify/amplify-e2e-core'; -import _ from 'lodash'; - -describe('go function tests', () => { - const helloWorldSuccessOutput = 'Hello Amplify!'; - let projRoot: string; - let funcName: string; - - beforeEach(async () => { - projRoot = await createNewProjectDir('go-functions'); - await initJSProjectWithProfile(projRoot, {}); - - funcName = `gotestfn${generateRandomShortId()}`; - - await addFunction( - projRoot, - { - name: funcName, - functionTemplate: 'Hello World', - }, - 'go', - ); - }); - - afterEach(async () => { - await deleteProject(projRoot); - deleteProjectDir(projRoot); - }); - - it('add go hello world function and mock locally', async () => { - await functionMockAssert(projRoot, { - funcName, - successString: helloWorldSuccessOutput, - eventFile: 'src/event.json', - }); // will throw if successString is not in output - }); - - it('add go hello world function and invoke in the cloud', async () => { - const payload = '{"name":"Amplify"}'; - await amplifyPushAuth(projRoot); - const response = await functionCloudInvoke(projRoot, { funcName, payload }); - expect(JSON.parse(response.Payload.toString())).toEqual(helloWorldSuccessOutput); - }); -}); - -describe('python function tests', () => { - const statusCode = 200; - const headers = { - 'Access-Control-Allow-Headers': '*', - 'Access-Control-Allow-Origin': '*', - 'Access-Control-Allow-Methods': 'OPTIONS,POST,GET', - }; - const message = 'Hello from your new Amplify Python lambda!'; - const helloWorldSuccessOutput = { - statusCode, - headers, - body: message, - }; - - let projRoot: string; - let funcName: string; - - beforeEach(async () => { - projRoot = await createNewProjectDir('py-functions'); - await initJSProjectWithProfile(projRoot, {}); - - funcName = `pytestfn${generateRandomShortId()}`; - - await addFunction( - projRoot, - { - name: funcName, - functionTemplate: 'Hello World', - }, - 'python', - ); - }); - - afterEach(async () => { - await deleteProject(projRoot); - deleteProjectDir(projRoot); - }); - - it('add python hello world and mock locally', async () => { - await functionMockAssert(projRoot, { - funcName, - successString: helloWorldSuccessOutput.body, - eventFile: 'src/event.json', - timeout: 120, - }); // will throw if successString is not in output - }); - - it('add python hello world and invoke in the cloud', async () => { - const payload = '{"test":"event"}'; - await amplifyPushAuth(projRoot); - const response = await functionCloudInvoke(projRoot, { funcName, payload }); - const helloWorldSuccessOutputCloud = { - ...helloWorldSuccessOutput, - body: JSON.stringify(helloWorldSuccessOutput.body), - }; - expect(JSON.parse(response.Payload.toString())).toEqual(JSON.parse(JSON.stringify(helloWorldSuccessOutputCloud))); - }); -}); - -describe('dotnet function tests', () => { - const helloWorldSuccessObj = { - key1: 'VALUE1', - key2: 'VALUE2', - key3: 'VALUE3', - }; - const helloWorldSuccessString = ' "key3": "VALUE3"'; - let projRoot: string; - let funcName: string; - - beforeEach(async () => { - projRoot = await createNewProjectDir('dotnet-functions'); - await initJSProjectWithProfile(projRoot, {}); - - funcName = `dotnettestfn${generateRandomShortId()}`; - - await addFunction( - projRoot, - { - name: funcName, - functionTemplate: 'Hello World', - }, - 'dotnet6', - ); - }); - - afterEach(async () => { - await deleteProject(projRoot); - deleteProjectDir(projRoot); - }); - - it('add dotnet hello world function and mock locally', async () => { - await functionMockAssert(projRoot, { - funcName, - successString: helloWorldSuccessString, - eventFile: 'src/event.json', - }); // will throw if successString is not in output - }); - - it('add dotnet hello world function and invoke in the cloud', async () => { - const payload = '{"key1":"value1","key2":"value2","key3":"value3"}'; - await amplifyPushAuth(projRoot); - const response = await functionCloudInvoke(projRoot, { funcName, payload }); - expect(JSON.parse(response.Payload.toString())).toEqual(helloWorldSuccessObj); - }); -}); - -describe('nodejs function tests', () => { - const helloWorldSuccessString = 'Hello from Lambda!'; - const helloWorldSuccessObj = { - statusCode: 200, - body: '"Hello from Lambda!"', - }; - - let projRoot: string; - let funcName: string; - - beforeEach(async () => { - projRoot = await createNewProjectDir('nodejs-functions'); - await initJSProjectWithProfile(projRoot, {}); - - funcName = `nodejstestfn${generateRandomShortId()}`; - - await addFunction( - projRoot, - { - name: funcName, - functionTemplate: 'Hello World', - }, - 'nodejs', - ); - }); - - afterEach(async () => { - await deleteProject(projRoot); - deleteProjectDir(projRoot); - }); - - it('add nodejs hello world function and mock locally', async () => { - await functionMockAssert(projRoot, { - funcName, - successString: helloWorldSuccessString, - eventFile: 'src/event.json', - }); // will throw if successString is not in output - }); - - it('add nodejs hello world function and invoke in the cloud', async () => { - const payload = '{"key1":"value1","key2":"value2","key3":"value3"}'; - - await amplifyPushAuth(projRoot); - - const response = await functionCloudInvoke(projRoot, { funcName, payload }); - - expect(JSON.parse(response.Payload.toString())).toEqual(helloWorldSuccessObj); - }); - - it('add nodejs hello world function and mock locally, check buildType, push, check buildType', async () => { - await functionMockAssert(projRoot, { - funcName, - successString: helloWorldSuccessString, - eventFile: 'src/event.json', - }); // will throw if successString is not in output - - let meta = getBackendAmplifyMeta(projRoot); - let functionResource = _.get(meta, ['function', funcName]); - - const lastDevBuildTimeStampBeforePush = functionResource.lastDevBuildTimeStamp; - - // Mock should trigger a DEV build of the function - expect(functionResource).toBeDefined(); - expect(functionResource.lastBuildType).toEqual('DEV'); - - await amplifyPushAuth(projRoot); - - meta = getBackendAmplifyMeta(projRoot); - functionResource = _.get(meta, ['function', funcName]); - - // Push should trigger a PROD build of the function - expect(functionResource.lastBuildType).toEqual('PROD'); - expect(functionResource.lastDevBuildTimeStamp).toEqual(lastDevBuildTimeStampBeforePush); - }); -}); diff --git a/packages/amplify-e2e-tests/src/__tests__/function_3a_dotnet.test.ts b/packages/amplify-e2e-tests/src/__tests__/function_3a_dotnet.test.ts new file mode 100644 index 00000000000..f34c4a22958 --- /dev/null +++ b/packages/amplify-e2e-tests/src/__tests__/function_3a_dotnet.test.ts @@ -0,0 +1,58 @@ +import { + initJSProjectWithProfile, + deleteProject, + amplifyPushAuth, + addFunction, + functionMockAssert, + functionCloudInvoke, + createNewProjectDir, + deleteProjectDir, + generateRandomShortId, +} from '@aws-amplify/amplify-e2e-core'; + +describe('dotnet function tests', () => { + const helloWorldSuccessObj = { + key1: 'VALUE1', + key2: 'VALUE2', + key3: 'VALUE3', + }; + const helloWorldSuccessString = ' "key3": "VALUE3"'; + let projRoot: string; + let funcName: string; + + beforeEach(async () => { + projRoot = await createNewProjectDir('dotnet-functions'); + await initJSProjectWithProfile(projRoot, {}); + + funcName = `dotnettestfn${generateRandomShortId()}`; + + await addFunction( + projRoot, + { + name: funcName, + functionTemplate: 'Hello World', + }, + 'dotnet8', + ); + }); + + afterEach(async () => { + await deleteProject(projRoot); + deleteProjectDir(projRoot); + }); + + it('add dotnet hello world function and mock locally', async () => { + await functionMockAssert(projRoot, { + funcName, + successString: helloWorldSuccessString, + eventFile: 'src/event.json', + }); // will throw if successString is not in output + }); + + it('add dotnet hello world function and invoke in the cloud', async () => { + const payload = '{"key1":"value1","key2":"value2","key3":"value3"}'; + await amplifyPushAuth(projRoot); + const response = await functionCloudInvoke(projRoot, { funcName, payload }); + expect(JSON.parse(response.Payload.toString())).toEqual(helloWorldSuccessObj); + }); +}); diff --git a/packages/amplify-e2e-tests/src/__tests__/function_3a_go.test.ts b/packages/amplify-e2e-tests/src/__tests__/function_3a_go.test.ts new file mode 100644 index 00000000000..db523a78abe --- /dev/null +++ b/packages/amplify-e2e-tests/src/__tests__/function_3a_go.test.ts @@ -0,0 +1,44 @@ +import { + initJSProjectWithProfile, + deleteProject, + amplifyPushAuth, + addFunction, + functionCloudInvoke, + createNewProjectDir, + deleteProjectDir, + generateRandomShortId, +} from '@aws-amplify/amplify-e2e-core'; + +describe('go function tests', () => { + const helloWorldSuccessOutput = 'Hello Amplify!'; + let projRoot: string; + let funcName: string; + + beforeEach(async () => { + projRoot = await createNewProjectDir('go-functions'); + await initJSProjectWithProfile(projRoot, {}); + + funcName = `gotestfn${generateRandomShortId()}`; + + await addFunction( + projRoot, + { + name: funcName, + functionTemplate: 'Hello World', + }, + 'go', + ); + }); + + afterEach(async () => { + await deleteProject(projRoot); + deleteProjectDir(projRoot); + }); + + it('add go hello world function and invoke in the cloud', async () => { + const payload = '{"name":"Amplify"}'; + await amplifyPushAuth(projRoot); + const response = await functionCloudInvoke(projRoot, { funcName, payload }); + expect(JSON.parse(response.Payload.toString())).toEqual(helloWorldSuccessOutput); + }); +}); diff --git a/packages/amplify-e2e-tests/src/__tests__/function_3a_nodejs.test.ts b/packages/amplify-e2e-tests/src/__tests__/function_3a_nodejs.test.ts new file mode 100644 index 00000000000..39764fc6b29 --- /dev/null +++ b/packages/amplify-e2e-tests/src/__tests__/function_3a_nodejs.test.ts @@ -0,0 +1,89 @@ +import { + initJSProjectWithProfile, + deleteProject, + amplifyPushAuth, + getBackendAmplifyMeta, + addFunction, + functionMockAssert, + functionCloudInvoke, + createNewProjectDir, + deleteProjectDir, + generateRandomShortId, +} from '@aws-amplify/amplify-e2e-core'; +import _ from 'lodash'; + +describe('nodejs function tests', () => { + const helloWorldSuccessString = 'Hello from Lambda!'; + const helloWorldSuccessObj = { + statusCode: 200, + body: '"Hello from Lambda!"', + }; + + let projRoot: string; + let funcName: string; + + beforeEach(async () => { + projRoot = await createNewProjectDir('nodejs-functions'); + await initJSProjectWithProfile(projRoot, {}); + + funcName = `nodejstestfn${generateRandomShortId()}`; + + await addFunction( + projRoot, + { + name: funcName, + functionTemplate: 'Hello World', + }, + 'nodejs', + ); + }); + + afterEach(async () => { + await deleteProject(projRoot); + deleteProjectDir(projRoot); + }); + + it('add nodejs hello world function and mock locally', async () => { + await functionMockAssert(projRoot, { + funcName, + successString: helloWorldSuccessString, + eventFile: 'src/event.json', + }); // will throw if successString is not in output + }); + + it('add nodejs hello world function and invoke in the cloud', async () => { + const payload = '{"key1":"value1","key2":"value2","key3":"value3"}'; + + await amplifyPushAuth(projRoot); + + const response = await functionCloudInvoke(projRoot, { funcName, payload }); + + expect(JSON.parse(response.Payload.toString())).toEqual(helloWorldSuccessObj); + }); + + it('add nodejs hello world function and mock locally, check buildType, push, check buildType', async () => { + await functionMockAssert(projRoot, { + funcName, + successString: helloWorldSuccessString, + eventFile: 'src/event.json', + }); // will throw if successString is not in output + + let meta = getBackendAmplifyMeta(projRoot); + let functionResource = _.get(meta, ['function', funcName]); + + const lastDevBuildTimeStampBeforePush = functionResource.lastDevBuildTimeStamp; + + // Mock should trigger a DEV build of the function + expect(functionResource).toBeDefined(); + expect(functionResource.lastBuildType).toEqual('DEV'); + + await amplifyPushAuth(projRoot); + + meta = getBackendAmplifyMeta(projRoot); + functionResource = _.get(meta, ['function', funcName]); + + // Push should trigger a PROD build of the function + expect(functionResource.lastBuildType).toEqual('PROD'); + expect(functionResource.lastDevBuildTimeStamp).toEqual(lastDevBuildTimeStampBeforePush); + }); +}); diff --git a/packages/amplify-e2e-tests/src/__tests__/function_3a_python.test.ts b/packages/amplify-e2e-tests/src/__tests__/function_3a_python.test.ts new file mode 100644 index 00000000000..4f622dd0483 --- /dev/null +++ b/packages/amplify-e2e-tests/src/__tests__/function_3a_python.test.ts @@ -0,0 +1,70 @@ +import { + initJSProjectWithProfile, + deleteProject, + amplifyPushAuth, + addFunction, + functionMockAssert, + functionCloudInvoke, + createNewProjectDir, + deleteProjectDir, + generateRandomShortId, +} from '@aws-amplify/amplify-e2e-core'; + +describe('python function tests', () => { + const statusCode = 200; + const headers = { + 'Access-Control-Allow-Headers': '*', + 'Access-Control-Allow-Origin': '*', + 'Access-Control-Allow-Methods': 'OPTIONS,POST,GET', + }; + const message = 'Hello from your new Amplify Python lambda!'; + const helloWorldSuccessOutput = { + statusCode, + headers, + body: message, + }; + + let projRoot: string; + let funcName: string; + + beforeEach(async () => { + projRoot = await createNewProjectDir('py-functions'); + await initJSProjectWithProfile(projRoot, {}); + + funcName = `pytestfn${generateRandomShortId()}`; + + await addFunction( + projRoot, + { + name: funcName, + functionTemplate: 'Hello World', + }, + 'python', + ); + }); + + afterEach(async () => { + await deleteProject(projRoot); + deleteProjectDir(projRoot); + }); + + it('add python hello world and mock locally', async () => { + await functionMockAssert(projRoot, { + funcName, + successString: helloWorldSuccessOutput.body, + eventFile: 'src/event.json', + timeout: 120, + }); // will throw if successString is not in output + }); + + it('add python hello world and invoke in the cloud', async () => { + const payload = '{"test":"event"}'; + await amplifyPushAuth(projRoot); + const response = await functionCloudInvoke(projRoot, { funcName, payload }); + const helloWorldSuccessOutputCloud = { + ...helloWorldSuccessOutput, + body: JSON.stringify(helloWorldSuccessOutput.body), + }; + expect(JSON.parse(response.Payload.toString())).toEqual(JSON.parse(JSON.stringify(helloWorldSuccessOutputCloud))); + }); +}); diff --git a/packages/amplify-e2e-tests/src/__tests__/function_3b.test.ts b/packages/amplify-e2e-tests/src/__tests__/function_3b.test.ts index cb4364eb93b..9af13f0d2a3 100644 --- a/packages/amplify-e2e-tests/src/__tests__/function_3b.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/function_3b.test.ts @@ -43,10 +43,10 @@ describe('dotnet function tests', () => { const assertDotNetVersion = (): void => { const functionPath = pathManager.getResourceDirectoryPath(projRoot, AmplifyCategories.FUNCTION, funcName); const { functionRuntime } = JSONUtilities.readJson(path.join(functionPath, 'amplify.state')); - expect(functionRuntime).toEqual('dotnet6'); + expect(functionRuntime).toEqual('dotnet8'); const functionProjFilePath = path.join(functionPath, 'src', `${funcName}.csproj`); const functionProjFileContent = fs.readFileSync(functionProjFilePath, 'utf8'); - expect(functionProjFileContent).toContain('net6.0'); + expect(functionProjFileContent).toContain('net8.0'); }; it('add dotnet hello world function and mock locally', async () => { @@ -56,7 +56,7 @@ describe('dotnet function tests', () => { name: funcName, functionTemplate: 'Hello World', }, - 'dotnet6', + 'dotnet8', ); await functionMockAssert(projRoot, { funcName, @@ -74,7 +74,7 @@ describe('dotnet function tests', () => { name: funcName, functionTemplate: 'Hello World', }, - 'dotnet6', + 'dotnet8', ); const payload = '{"key1":"value1","key2":"value2","key3":"value3"}'; await amplifyPushAuth(projRoot); @@ -91,7 +91,7 @@ describe('dotnet function tests', () => { name: funcName, functionTemplate: 'Serverless', }, - 'dotnet6', + 'dotnet8', ); await functionMockAssert(projRoot, { funcName, @@ -109,7 +109,7 @@ describe('dotnet function tests', () => { name: funcName, functionTemplate: 'CRUD function for DynamoDB (Integration with API Gateway)', }, - 'dotnet6', + 'dotnet8', createNewDynamoDBForCrudTemplate, ); const payload = JSON.stringify({ @@ -135,7 +135,7 @@ describe('dotnet function tests', () => { triggerType: 'DynamoDB', eventSource: 'DynamoDB', }, - 'dotnet6', + 'dotnet8', addLambdaTrigger, // Adds DDB trigger by default ); await functionMockAssert(projRoot, { @@ -156,7 +156,7 @@ describe('dotnet function tests', () => { functionTemplate: 'Trigger (DynamoDb, Kinesis)', triggerType: 'Kinesis', }, - 'dotnet6', + 'dotnet8', addLambdaTrigger, // Adds DDB trigger by default ); await functionMockAssert(projRoot, { diff --git a/packages/amplify-e2e-tests/src/__tests__/function_6.test.ts b/packages/amplify-e2e-tests/src/__tests__/function_6.test.ts index db1ecacb125..9291c66ddbd 100644 --- a/packages/amplify-e2e-tests/src/__tests__/function_6.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/function_6.test.ts @@ -15,7 +15,6 @@ import { amplifyPushForce, generateRandomShortId, } from '@aws-amplify/amplify-e2e-core'; -import _ from 'lodash'; import { v4 as uuid } from 'uuid'; import { addEnvironmentYes } from '../environment/env'; diff --git a/packages/amplify-e2e-tests/src/__tests__/function_7.test.ts b/packages/amplify-e2e-tests/src/__tests__/function_7.test.ts index 5a7437c8b22..002c0d8ad6f 100644 --- a/packages/amplify-e2e-tests/src/__tests__/function_7.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/function_7.test.ts @@ -16,7 +16,7 @@ import { setCategoryParameters, updateFunction, } from '@aws-amplify/amplify-e2e-core'; -import { addEnvironmentYes, removeEnvironment } from '../environment/env'; +import { addEnvironmentYes, checkoutEnvironment, removeEnvironment } from '../environment/env'; describe('function secret value', () => { let projRoot: string; @@ -279,6 +279,60 @@ describe('function secret value', () => { // check that old value is removed and new one is added await expectParams([{ name: 'A_NEW_SECRET', value: 'anewtestsecretvalue' }], ['TEST_SECRET'], region, appId, 'integtest', funcName); }); + + it('keeps old secrets when pushing secrets added in another env', async () => { + // add func w/ secret + const envName = 'enva'; + await initJSProjectWithProfile(projRoot, { envName, disableAmplifyAppCreation: false }); + const funcName = `secretsTest${generateRandomShortId()}`; + const funcSecretName = 'TEST_SECRET'; + await addFunction( + projRoot, + { + functionTemplate: 'Hello World', + name: funcName, + secretsConfig: { + operation: 'add', + name: funcSecretName, + value: 'testsecretvalue', + }, + }, + 'nodejs', + ); + + await amplifyPushAuth(projRoot); + + // add new env and add new secret to func + await addEnvironmentYes(projRoot, { envName: 'envb' }); + await amplifyPushAuth(projRoot); + const newFuncSecretName = 'NEW_TEST_SECRET'; + await updateFunction( + projRoot, + { + secretsConfig: { + operation: 'add', + name: newFuncSecretName, + value: 'testsecretvalue', + }, + }, + 'nodejs', + ); + + // push updated func w/ new secret + await amplifyPushAuth(projRoot); + + await checkoutEnvironment(projRoot, { envName }); + + // check contents of function-parameters.json for new secret + const expectedFuncSecrets = [funcSecretName, newFuncSecretName]; + const funcParams = getCategoryParameters(projRoot, 'function', funcName); + expect(funcParams.secretNames).toEqual(expectedFuncSecrets); + + // push with original env and assert all secrets are in function-parameters.json + await amplifyPushMissingFuncSecret(projRoot, 'anewtestsecretvalue'); + const funcParamsPostPush = getCategoryParameters(projRoot, 'function', funcName); + expect(funcParamsPostPush.secretNames).toEqual(expectedFuncSecrets); + }); }); const expectParams = async ( diff --git a/packages/amplify-e2e-tests/src/__tests__/function_8.test.ts b/packages/amplify-e2e-tests/src/__tests__/function_8.test.ts index 8831196547f..976e1813bbb 100644 --- a/packages/amplify-e2e-tests/src/__tests__/function_8.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/function_8.test.ts @@ -1,9 +1,6 @@ import { addFunction, - addLayer, - addOptData, amplifyPushAuth, - amplifyPushLayer, createNewProjectDir, deleteProject, deleteProjectDir, diff --git a/packages/amplify-e2e-tests/src/__tests__/function_9b.test.ts b/packages/amplify-e2e-tests/src/__tests__/function_9b.test.ts index 7f691623c16..65a19100a96 100644 --- a/packages/amplify-e2e-tests/src/__tests__/function_9b.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/function_9b.test.ts @@ -20,7 +20,6 @@ import { generateRandomShortId, } from '@aws-amplify/amplify-e2e-core'; import path from 'path'; -import _ from 'lodash'; const GraphQLTransformerLatestVersion = 2; @@ -116,6 +115,7 @@ describe('nodejs', () => { projRoot, { name: fnName, + packageManager: { name: 'Yarn' }, functionTemplate: 'Hello World', additionalPermissions: { permissions: ['api'], @@ -176,6 +176,7 @@ describe('nodejs', () => { { name: fnName, functionTemplate: 'Hello World', + packageManager: { name: 'Yarn' }, additionalPermissions: { permissions: ['api'], choices: ['api'], diff --git a/packages/amplify-e2e-tests/src/__tests__/git-clone-attach.test.ts b/packages/amplify-e2e-tests/src/__tests__/git-clone-attach.test.ts index 89a15302184..ad7939eb021 100644 --- a/packages/amplify-e2e-tests/src/__tests__/git-clone-attach.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/git-clone-attach.test.ts @@ -91,7 +91,7 @@ describe('attach amplify to git-cloned project', () => { const preCleanTpi = getTeamProviderInfo(projRoot); const importBucketRegion = (Object.values(preCleanTpi[envName].categories.storage)[0] as any).region; const appId = preCleanTpi[envName].awscloudformation.AmplifyAppId; - gitCleanFdx(projRoot); + await gitCleanFdx(projRoot); const socialProviders = getSocialProviders(); const categoriesConfig = { @@ -120,9 +120,8 @@ describe('attach amplify to git-cloned project', () => { expect(changedFiles).toMatchInlineSnapshot(` [ ".gitignore", - "amplify/README.md", ] - `); // there is a .gitignore newline and the amplify/README.md file is modified after pull + `); // there is a .gitignore newline after pull expect(getTeamProviderInfo(projRoot)).toEqual(preCleanTpi); }); }); diff --git a/packages/amplify-e2e-tests/src/__tests__/global_sandbox-a.test.ts b/packages/amplify-e2e-tests/src/__tests__/global_sandbox-a.test.ts index 99280cb953e..9cd8c1721e7 100644 --- a/packages/amplify-e2e-tests/src/__tests__/global_sandbox-a.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/global_sandbox-a.test.ts @@ -27,8 +27,8 @@ describe('global sandbox mode a', () => { it('compiles schema with one model and pushes to cloud', async () => { await addApiWithOneModel(projectDir); - await apiGqlCompile(projectDir, true); + await apiGqlCompile(projectDir); await generateModels(projectDir); - await amplifyPush(projectDir, true); + await amplifyPush(projectDir); }); }); diff --git a/packages/amplify-e2e-tests/src/__tests__/global_sandbox-b.test.ts b/packages/amplify-e2e-tests/src/__tests__/global_sandbox-b.test.ts index 33e27da6f65..44344b87ff9 100644 --- a/packages/amplify-e2e-tests/src/__tests__/global_sandbox-b.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/global_sandbox-b.test.ts @@ -30,8 +30,8 @@ describe('global sandbox mode b', () => { it('compiles schema user-added schema and pushes to cloud', async () => { await addApiWithoutSchema(projectDir, { apiName }); updateApiSchema(projectDir, apiName, 'model_with_sandbox_mode.graphql'); - await apiGqlCompile(projectDir, true); + await apiGqlCompile(projectDir); await generateModels(projectDir); - await amplifyPush(projectDir, true); + await amplifyPush(projectDir); }); }); diff --git a/packages/amplify-e2e-tests/src/__tests__/global_sandbox-c.test.ts b/packages/amplify-e2e-tests/src/__tests__/global_sandbox-c.test.ts index cd955bcb55a..12801aa6520 100644 --- a/packages/amplify-e2e-tests/src/__tests__/global_sandbox-c.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/global_sandbox-c.test.ts @@ -28,8 +28,8 @@ describe('global sandbox mode c', () => { // TODO: need a reason why we're skipping this or we should remove this test it.skip('compiles schema with three models and pushes to cloud', async () => { await addApiWithThreeModels(projectDir); - await apiGqlCompile(projectDir, true); + await apiGqlCompile(projectDir); await generateModels(projectDir); - await amplifyPush(projectDir, true); + await amplifyPush(projectDir); }); }); diff --git a/packages/amplify-e2e-tests/src/__tests__/graphql-v2/api_lambda_auth_1.test.ts b/packages/amplify-e2e-tests/src/__tests__/graphql-v2/api_lambda_auth_1.test.ts index 978087184bf..ec8ec7288b5 100644 --- a/packages/amplify-e2e-tests/src/__tests__/graphql-v2/api_lambda_auth_1.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/graphql-v2/api_lambda_auth_1.test.ts @@ -126,7 +126,6 @@ describe('amplify add api (GraphQL) - Lambda Authorizer', () => { expect(graphqlApi.apiId).toEqual(GraphQLAPIIdOutput); const url = GraphQLAPIEndpointOutput as string; - const apiKey = GraphQLAPIKeyOutput as string; const appSyncClient = new AWSAppSyncClient({ url, diff --git a/packages/amplify-e2e-tests/src/__tests__/graphql-v2/api_lambda_auth_2.test.ts b/packages/amplify-e2e-tests/src/__tests__/graphql-v2/api_lambda_auth_2.test.ts index 58f55c7bc2a..05f1640cb7e 100644 --- a/packages/amplify-e2e-tests/src/__tests__/graphql-v2/api_lambda_auth_2.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/graphql-v2/api_lambda_auth_2.test.ts @@ -83,7 +83,6 @@ describe('amplify add api (GraphQL) - Lambda Authorizer', () => { expect(graphqlApi.apiId).toEqual(GraphQLAPIIdOutput); const url = GraphQLAPIEndpointOutput as string; - const apiKey = GraphQLAPIKeyOutput as string; const appSyncClient = new AWSAppSyncClient({ url, @@ -108,7 +107,7 @@ describe('amplify add api (GraphQL) - Lambda Authorizer', () => { note: 'initial note', }, }; - const createResult: any = await appSyncClient.mutate({ + await appSyncClient.mutate({ mutation: gql(createMutation), fetchPolicy: 'no-cache', variables: createInput, diff --git a/packages/amplify-e2e-tests/src/__tests__/import_auth_1a.test.ts b/packages/amplify-e2e-tests/src/__tests__/import_auth_1a.test.ts index d31cfdb86e2..0b878799892 100644 --- a/packages/amplify-e2e-tests/src/__tests__/import_auth_1a.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/import_auth_1a.test.ts @@ -8,15 +8,16 @@ import { amplifyPushAuth, amplifyStatus, createNewProjectDir, + createUserPoolOnlyWithOAuthSettings, deleteProject, deleteProjectDir, + getCognitoResourceName, initJSProjectWithProfile, } from '@aws-amplify/amplify-e2e-core'; import * as fs from 'fs-extra'; import * as path from 'path'; import { AuthProjectDetails, - createUserPoolOnlyWithOAuthSettings, expectApiHasCorrectAuthConfig, expectAuthProjectDetailsMatch, expectLocalAndCloudMetaFilesMatching, @@ -29,7 +30,6 @@ import { readRootStack, removeImportedAuthWithDefault, } from '../import-helpers'; -import { getCognitoResourceName } from '../schema-api-directives/authHelper'; import { randomizedFunctionName } from '../schema-api-directives/functionTester'; describe('auth import userpool only', () => { diff --git a/packages/amplify-e2e-tests/src/__tests__/import_auth_1b.test.ts b/packages/amplify-e2e-tests/src/__tests__/import_auth_1b.test.ts index 1872e8ea9d4..2cbf575dab9 100644 --- a/packages/amplify-e2e-tests/src/__tests__/import_auth_1b.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/import_auth_1b.test.ts @@ -7,6 +7,7 @@ import { amplifyPushAuth, amplifyStatus, createNewProjectDir, + createUserPoolOnlyWithOAuthSettings, deleteProject, deleteProjectDir, getRootStackTemplate, @@ -16,7 +17,6 @@ import { import { addS3WithAuthConfigurationMismatchErrorExit, AuthProjectDetails, - createUserPoolOnlyWithOAuthSettings, expectAuthParametersMatch, expectLocalAndCloudMetaFilesMatching, getAuthProjectDetails, @@ -108,9 +108,7 @@ describe('auth import userpool only', () => { await importUserPoolOnly(projectRoot, ogSettings.userPoolName, { native: '_app_client ', web: '_app_clientWeb' }); // Imported auth resources cannot be used together with \'storage\' category\'s authenticated and unauthenticated access. - await expect(addS3WithAuthConfigurationMismatchErrorExit(projectRoot, {})).rejects.toThrowError( - 'Process exited with non zero exit code 1', - ); + await expect(addS3WithAuthConfigurationMismatchErrorExit(projectRoot)).rejects.toThrowError('Process exited with non zero exit code 1'); }); it('imported user pool only should allow iam auth in graphql api', async () => { diff --git a/packages/amplify-e2e-tests/src/__tests__/import_auth_2a.test.ts b/packages/amplify-e2e-tests/src/__tests__/import_auth_2a.test.ts index 742cad6890a..33e204de100 100644 --- a/packages/amplify-e2e-tests/src/__tests__/import_auth_2a.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/import_auth_2a.test.ts @@ -48,7 +48,6 @@ describe('auth import identity pool and userpool', () => { // We need an extra OG project to make sure that autocomplete prompt hits in let dummyOGProjectRoot: string; - let dummyOGShortId: string; let dummyOGSettings: AddAuthIdentityPoolAndUserPoolWithOAuthSettings; let projectRoot: string; @@ -66,7 +65,6 @@ describe('auth import identity pool and userpool', () => { ogProjectDetails = getOGAuthProjectDetails(ogProjectRoot); dummyOGProjectRoot = await createNewProjectDir(dummyOGProjectSettings.name); - dummyOGShortId = getShortId(); dummyOGSettings = createIDPAndUserPoolWithOAuthSettings(dummyOGProjectSettings.name, ogShortId); await initJSProjectWithProfile(dummyOGProjectRoot, dummyOGProjectSettings); @@ -105,7 +103,7 @@ describe('auth import identity pool and userpool', () => { await initJSProjectWithProfile(projectRoot, projectSettings); await importIdentityPoolAndUserPool(projectRoot, ogSettings.userPoolName, { native: '_app_client ', web: '_app_clientWeb' }); - let projectDetails = getAuthProjectDetails(projectRoot); + const projectDetails = getAuthProjectDetails(projectRoot); expectAuthProjectDetailsMatch(projectDetails, ogProjectDetails); diff --git a/packages/amplify-e2e-tests/src/__tests__/import_auth_2b.test.ts b/packages/amplify-e2e-tests/src/__tests__/import_auth_2b.test.ts index beed84c1862..b3d426795d8 100644 --- a/packages/amplify-e2e-tests/src/__tests__/import_auth_2b.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/import_auth_2b.test.ts @@ -11,13 +11,11 @@ import { addS3StorageWithSettings, } from '@aws-amplify/amplify-e2e-core'; import { - AuthProjectDetails, createIDPAndUserPoolWithOAuthSettings, expectAuthLocalAndOGMetaFilesOutputMatching, expectLocalAndCloudMetaFilesMatching, expectLocalAndPulledBackendConfigMatching, getAuthProjectDetails, - getOGAuthProjectDetails, getShortId, headlessPull, importIdentityPoolAndUserPool, @@ -45,11 +43,9 @@ describe('auth import identity pool and userpool', () => { let ogProjectRoot: string; let ogShortId: string; let ogSettings: AddAuthIdentityPoolAndUserPoolWithOAuthSettings; - let ogProjectDetails: AuthProjectDetails; // We need an extra OG project to make sure that autocomplete prompt hits in let dummyOGProjectRoot: string; - let dummyOGShortId: string; let dummyOGSettings: AddAuthIdentityPoolAndUserPoolWithOAuthSettings; let projectRoot: string; @@ -64,10 +60,7 @@ describe('auth import identity pool and userpool', () => { await addAuthIdentityPoolAndUserPoolWithOAuth(ogProjectRoot, ogSettings); await amplifyPushAuth(ogProjectRoot); - ogProjectDetails = getOGAuthProjectDetails(ogProjectRoot); - dummyOGProjectRoot = await createNewProjectDir(dummyOGProjectSettings.name); - dummyOGShortId = getShortId(); dummyOGSettings = createIDPAndUserPoolWithOAuthSettings(dummyOGProjectSettings.name, ogShortId); await initJSProjectWithProfile(dummyOGProjectRoot, dummyOGProjectSettings); @@ -112,7 +105,7 @@ describe('auth import identity pool and userpool', () => { await amplifyPushAuth(projectRoot); - let projectDetails = getAuthProjectDetails(projectRoot); + const projectDetails = getAuthProjectDetails(projectRoot); const appId = getAppId(projectRoot); expect(appId).toBeDefined(); diff --git a/packages/amplify-e2e-tests/src/__tests__/import_auth_3.test.ts b/packages/amplify-e2e-tests/src/__tests__/import_auth_3.test.ts index a4f76652492..9510bf390d6 100644 --- a/packages/amplify-e2e-tests/src/__tests__/import_auth_3.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/import_auth_3.test.ts @@ -5,9 +5,11 @@ import { amplifyPull, amplifyPushAuth, createNewProjectDir, + createUserPoolOnlyWithOAuthSettings, deleteProject, deleteProjectDir, getAppId, + getCognitoResourceName, getEnvVars, getTeamProviderInfo, initJSProjectWithProfile, @@ -19,7 +21,6 @@ import { addAppClientWithSecret, AppClientSettings, AuthProjectDetails, - createUserPoolOnlyWithOAuthSettings, deleteAppClient, expectAuthLocalAndOGMetaFilesOutputMatching, expectAuthProjectDetailsMatch, @@ -30,7 +31,6 @@ import { getShortId, importUserPoolOnly, } from '../import-helpers'; -import { getCognitoResourceName } from '../schema-api-directives/authHelper'; import { randomizedFunctionName } from '../schema-api-directives/functionTester'; describe('auth import userpool only', () => { @@ -59,7 +59,6 @@ describe('auth import userpool only', () => { // We need an extra OG project to make sure that autocomplete prompt hits in let dummyOGProjectRoot: string; - let dummyOGShortId: string; let dummyOGSettings: AddAuthUserPoolOnlyWithOAuthSettings; let projectRoot: string; @@ -77,7 +76,6 @@ describe('auth import userpool only', () => { ogProjectDetails = getOGAuthProjectDetails(ogProjectRoot); dummyOGProjectRoot = await createNewProjectDir(dummyOGProjectSettings.name); - dummyOGShortId = getShortId(); dummyOGSettings = createUserPoolOnlyWithOAuthSettings(dummyOGProjectSettings.name, ogShortId); await initJSProjectWithProfile(dummyOGProjectRoot, dummyOGProjectSettings); @@ -259,7 +257,7 @@ describe('auth import userpool only', () => { } finally { // delete the app client if (appClientId) { - deleteAppClient(profileName, ogProjectRoot, appClientId); + await deleteAppClient(profileName, ogProjectRoot, appClientId); } } }); @@ -295,7 +293,7 @@ describe('auth import userpool only', () => { } finally { // delete the app client if (appClientId) { - deleteAppClient(profileName, ogProjectRoot, appClientId); + await deleteAppClient(profileName, ogProjectRoot, appClientId); } } }); diff --git a/packages/amplify-e2e-tests/src/__tests__/import_s3_1.test.ts b/packages/amplify-e2e-tests/src/__tests__/import_s3_1.test.ts index 5e8c4a7f579..7bc7a694d28 100644 --- a/packages/amplify-e2e-tests/src/__tests__/import_s3_1.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/import_s3_1.test.ts @@ -34,8 +34,6 @@ import { expectS3LocalAndOGMetaFilesOutputMatching, } from '../import-helpers'; -const profileName = 'amplify-integ-test-user'; - describe('s3 import', () => { const projectPrefix = 'sssimp'; const ogProjectPrefix = 'ogsssimp'; @@ -60,7 +58,6 @@ describe('s3 import', () => { // We need an extra OG project to make sure that autocomplete prompt hits in let dummyOGProjectRoot: string; - let dummyOGShortId: string; let dummyOGSettings: AddStorageSettings; let projectRoot: string; @@ -79,7 +76,6 @@ describe('s3 import', () => { ogProjectDetails = getOGStorageProjectDetails(ogProjectRoot); dummyOGProjectRoot = await createNewProjectDir(dummyOGProjectSettings.name); - dummyOGShortId = getShortId(); dummyOGSettings = createStorageSettings(dummyOGProjectSettings.name, ogShortId); await initJSProjectWithProfile(dummyOGProjectRoot, dummyOGProjectSettings); diff --git a/packages/amplify-e2e-tests/src/__tests__/import_s3_3.test.ts b/packages/amplify-e2e-tests/src/__tests__/import_s3_3.test.ts index 0c2fa240914..0e8ed5e3883 100644 --- a/packages/amplify-e2e-tests/src/__tests__/import_s3_3.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/import_s3_3.test.ts @@ -19,11 +19,9 @@ import { getS3ResourceName, } from '../import-helpers'; -const profileName = 'amplify-integ-test-user'; - describe('headless s3 import', () => { const projectPrefix = 'sssheadimp'; - const bucketPrefix = 'sss-headless-import-'; + const bucketPrefix = 'sss-headless-import-test'; const projectSettings = { name: projectPrefix, @@ -38,9 +36,6 @@ describe('headless s3 import', () => { const shortId = getShortId(); bucketNameToImport = `${bucketPrefix}${shortId}`; - const credentials = new aws.SharedIniFileCredentials({ profile: profileName }); - aws.config.credentials = credentials; - const s3 = new aws.S3(); await s3 diff --git a/packages/amplify-e2e-tests/src/__tests__/init-force-push.test.ts b/packages/amplify-e2e-tests/src/__tests__/init-force-push.test.ts index d395207a9de..7aaa62f5d17 100644 --- a/packages/amplify-e2e-tests/src/__tests__/init-force-push.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/init-force-push.test.ts @@ -63,7 +63,7 @@ describe('init --forcePush', () => { projRoot, getAmplifyInitConfig(projectName, 'newenv'), undefined, - true, + false, undefined, false, // don't reject on failure ); @@ -78,7 +78,7 @@ describe('init --forcePush', () => { delete tpi?.[envName]?.categories?.function?.[funcName]?.fooBar; setTeamProviderInfo(projRoot, tpi); - await nonInteractiveInitWithForcePushAttach(projRoot, getAmplifyInitConfig(projectName, envName), undefined, true); + await nonInteractiveInitWithForcePushAttach(projRoot, getAmplifyInitConfig(projectName, envName), undefined, false); const tpiAfter = getTeamProviderInfo(projRoot); expect(tpiAfter?.[envName]?.categories?.function?.[funcName]?.fooBar).toBe('fooBar'); @@ -91,6 +91,6 @@ describe('init --forcePush', () => { await gitCommitAll(projRoot); await gitCleanFdx(projRoot); - await nonInteractiveInitWithForcePushAttach(projRoot, getAmplifyInitConfig(projectName, envName), undefined, true); + await nonInteractiveInitWithForcePushAttach(projRoot, getAmplifyInitConfig(projectName, envName), undefined, false); }); }); diff --git a/packages/amplify-e2e-tests/src/__tests__/init-special-case.test.ts b/packages/amplify-e2e-tests/src/__tests__/init-special-case.test.ts index 964f8c8678e..f642584e81d 100644 --- a/packages/amplify-e2e-tests/src/__tests__/init-special-case.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/init-special-case.test.ts @@ -11,6 +11,7 @@ import { gitCleanFdx, gitCommitAll, gitInit, + initHeadless, initJSProjectWithProfile, updateAuthAddUserGroups, updatedInitNewEnvWithProfile, @@ -33,13 +34,13 @@ describe('amplify init', () => { const meta = getBackendAmplifyMeta(projectRoot).providers.awscloudformation; expect(meta.Region).toBeDefined(); const { AuthRoleName, UnauthRoleName, UnauthRoleArn, AuthRoleArn, DeploymentBucketName } = meta; - expect(UnauthRoleName).toBeIAMRoleWithArn(UnauthRoleArn); - expect(AuthRoleName).toBeIAMRoleWithArn(AuthRoleArn); - expect(DeploymentBucketName).toBeAS3Bucket(DeploymentBucketName); + await expect(UnauthRoleName).toBeIAMRoleWithArn(UnauthRoleArn); + await expect(AuthRoleName).toBeIAMRoleWithArn(AuthRoleArn); + await expect(DeploymentBucketName).toBeAS3Bucket(DeploymentBucketName); }); it('test init on a git pulled project', async () => { - const envName = 'dev'; + const envName = 'devtest'; const resourceName = 'authConsoleTest'; await initJSProjectWithProfile(projectRoot, { disableAmplifyAppCreation: false, name: resourceName, envName }); await addAuthWithDefault(projectRoot); @@ -72,4 +73,11 @@ describe('amplify init', () => { getParameters(projectRoot, category, authResourceName); }).not.toThrow(); }); + + it('should fail if running amplify init -y on already initialized project', async () => { + const envName = 'devtest'; + const resourceName = 'twoInitDefaultTest'; + await initJSProjectWithProfile(projectRoot, { disableAmplifyAppCreation: false, name: resourceName, envName }); + await expect(initHeadless(projectRoot)).rejects.toThrowError('Process exited with non zero exit code 1'); + }); }); diff --git a/packages/amplify-e2e-tests/src/__tests__/init_b.test.ts b/packages/amplify-e2e-tests/src/__tests__/init_b.test.ts index 51cfdd2f418..7a9fc233d0b 100644 --- a/packages/amplify-e2e-tests/src/__tests__/init_b.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/init_b.test.ts @@ -27,9 +27,9 @@ describe('amplify init b', () => { expect(meta.Region).toBeDefined(); const { AuthRoleName, UnauthRoleName, UnauthRoleArn, AuthRoleArn, DeploymentBucketName } = meta; - expect(UnauthRoleName).toBeIAMRoleWithArn(UnauthRoleArn); - expect(AuthRoleName).toBeIAMRoleWithArn(AuthRoleArn); - expect(DeploymentBucketName).toBeAS3Bucket(DeploymentBucketName); + await expect(UnauthRoleName).toBeIAMRoleWithArn(UnauthRoleArn); + await expect(AuthRoleName).toBeIAMRoleWithArn(AuthRoleArn); + await expect(DeploymentBucketName).toBeAS3Bucket(DeploymentBucketName); // init new env await initNewEnvWithProfile(projRoot, { envName: 'foo' }); @@ -49,8 +49,8 @@ describe('amplify init b', () => { expect(AuthRoleArn).not.toEqual(newEnvAuthRoleArn); expect(DeploymentBucketName).not.toEqual(newEnvDeploymentBucketName); - expect(newEnvUnAuthRoleName).toBeIAMRoleWithArn(newEnvUnauthRoleArn); - expect(newEnvAuthRoleName).toBeIAMRoleWithArn(newEnvAuthRoleArn); - expect(newEnvDeploymentBucketName).toBeAS3Bucket(DeploymentBucketName); + await expect(newEnvUnAuthRoleName).toBeIAMRoleWithArn(newEnvUnauthRoleArn); + await expect(newEnvAuthRoleName).toBeIAMRoleWithArn(newEnvAuthRoleArn); + await expect(newEnvDeploymentBucketName).toBeAS3Bucket(DeploymentBucketName); }); }); diff --git a/packages/amplify-e2e-tests/src/__tests__/init_c.test.ts b/packages/amplify-e2e-tests/src/__tests__/init_c.test.ts index 6f78a5a94eb..f7fda383a3e 100644 --- a/packages/amplify-e2e-tests/src/__tests__/init_c.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/init_c.test.ts @@ -36,9 +36,9 @@ describe('amplify init c', () => { expect(meta.Region).toBeDefined(); const { AuthRoleName, UnauthRoleName, UnauthRoleArn, AuthRoleArn, DeploymentBucketName } = meta; - expect(UnauthRoleName).toBeIAMRoleWithArn(UnauthRoleArn); - expect(AuthRoleName).toBeIAMRoleWithArn(AuthRoleArn); - expect(DeploymentBucketName).toBeAS3Bucket(DeploymentBucketName); + await expect(UnauthRoleName).toBeIAMRoleWithArn(UnauthRoleArn); + await expect(AuthRoleName).toBeIAMRoleWithArn(AuthRoleArn); + await expect(DeploymentBucketName).toBeAS3Bucket(DeploymentBucketName); // init new env await initNewEnvWithAccessKey(projRoot, { @@ -62,8 +62,8 @@ describe('amplify init c', () => { expect(AuthRoleArn).not.toEqual(newEnvAuthRoleArn); expect(DeploymentBucketName).not.toEqual(newEnvDeploymentBucketName); - expect(newEnvUnAuthRoleName).toBeIAMRoleWithArn(newEnvUnauthRoleArn); - expect(newEnvAuthRoleName).toBeIAMRoleWithArn(newEnvAuthRoleArn); - expect(newEnvDeploymentBucketName).toBeAS3Bucket(DeploymentBucketName); + await expect(newEnvUnAuthRoleName).toBeIAMRoleWithArn(newEnvUnauthRoleArn); + await expect(newEnvAuthRoleName).toBeIAMRoleWithArn(newEnvAuthRoleArn); + await expect(newEnvDeploymentBucketName).toBeAS3Bucket(DeploymentBucketName); }); }); diff --git a/packages/amplify-e2e-tests/src/__tests__/init_e.test.ts b/packages/amplify-e2e-tests/src/__tests__/init_e.test.ts index 2d0ac25ae7e..d7ceec14f7e 100644 --- a/packages/amplify-e2e-tests/src/__tests__/init_e.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/init_e.test.ts @@ -40,12 +40,21 @@ describe('amplify init e', () => { expect(meta.Region).toBeDefined(); const { AuthRoleName, UnauthRoleName, UnauthRoleArn, AuthRoleArn, DeploymentBucketName } = meta; - expect(UnauthRoleName).toBeIAMRoleWithArn(UnauthRoleArn); - expect(AuthRoleName).toBeIAMRoleWithArn(AuthRoleArn); - expect(DeploymentBucketName).toBeAS3Bucket(DeploymentBucketName); + // test default vscode settings.json for awscloudformation folder + const editorSettingsPath = path.join(projRoot, '.vscode', 'settings.json'); + const editorSettings = fs.readJSONSync(editorSettingsPath); + expect(editorSettings['files.exclude']['amplify/backend/awscloudformation']).toEqual(true); + + await expect(UnauthRoleName).toBeIAMRoleWithArn(UnauthRoleArn); + await expect(AuthRoleName).toBeIAMRoleWithArn(AuthRoleArn); + await expect(DeploymentBucketName).toBeAS3Bucket(DeploymentBucketName); // override new env - await amplifyOverrideRoot(projRoot, { testingWithLatestCodebase: true }); + await amplifyOverrideRoot(projRoot, { testingWithLatestCodebase: false }); + + // test awscloudformation folder is not excluded in vscode settings.json after override + const editorSettingsAfterOverride = fs.readJSONSync(editorSettingsPath); + expect(editorSettingsAfterOverride['files.exclude']['amplify/backend/awscloudformation']).toEqual(false); // this is where we will write overrides to const destOverrideFilePath = path.join(projRoot, 'amplify', 'backend', 'awscloudformation', 'override.ts'); @@ -60,9 +69,12 @@ describe('amplify init e', () => { fs.copyFileSync(srcInvalidOverrideRuntimeError, destOverrideFilePath); await expect(amplifyPushOverride(projRoot)).rejects.toThrowError(); - // test happy path + // test with valid file const srcOverrideFilePath = path.join(__dirname, '..', '..', 'overrides', 'override-root.ts'); replaceOverrideFileWithProjectInfo(srcOverrideFilePath, destOverrideFilePath, 'integtest', projectName); + // should throw error if AMPLIFY_CLI_DISABLE_SCRIPTING_FEATURES is set + await expect(amplifyPushOverride(projRoot, false, { AMPLIFY_CLI_DISABLE_SCRIPTING_FEATURES: 'true' })).rejects.toThrowError(); + // should succeed now await amplifyPushOverride(projRoot); const newEnvMeta = getProjectMeta(projRoot).providers.awscloudformation; expect(newEnvMeta.AuthRoleName).toContain('mockRole'); @@ -85,7 +97,7 @@ describe('amplify init e', () => { await gitInit(projRoot); await gitCommitAll(projRoot); await gitCleanFdx(projRoot); - await nonInteractiveInitWithForcePushAttach(projRoot, getAmplifyInitConfig(projectName, 'integtest'), undefined, true); + await nonInteractiveInitWithForcePushAttach(projRoot, getAmplifyInitConfig(projectName, 'integtest'), undefined, false); // check if overrides are applied const gitClonedMeta = getProjectMeta(projRoot).providers.awscloudformation; expect(await listRolePolicies(gitClonedMeta.AuthRoleName, gitClonedMeta.Region)).toMatchInlineSnapshot(` diff --git a/packages/amplify-e2e-tests/src/__tests__/layer-1.test.ts b/packages/amplify-e2e-tests/src/__tests__/layer-1.test.ts index d8082e01e65..d67135b5147 100644 --- a/packages/amplify-e2e-tests/src/__tests__/layer-1.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/layer-1.test.ts @@ -175,7 +175,7 @@ describe('amplify add lambda layer', () => { projName, }; - const noLayerEnv = 'nolayerenv'; + const noLayerEnv = 'nolyrtest'; await addEnvironment(projRoot, { envName: noLayerEnv }); await checkoutEnvironment(projRoot, { envName }); diff --git a/packages/amplify-e2e-tests/src/__tests__/layer-3.test.ts b/packages/amplify-e2e-tests/src/__tests__/layer-3.test.ts index 2c68d1c0ec7..23cd4eb0e3b 100644 --- a/packages/amplify-e2e-tests/src/__tests__/layer-3.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/layer-3.test.ts @@ -68,7 +68,7 @@ describe('test amplify remove function', () => { }); arns.push(getCurrentLayerArnFromMeta(projRoot, settings)); arns.splice(0, 3); - validateLayerMetadata(projRoot, settings, getProjectMeta(projRoot), envName, arns); + await validateLayerMetadata(projRoot, settings, getProjectMeta(projRoot), envName, arns); }); it('init a project, add layer, push 2 layer versions, add 2 dependent functions, check that removal is blocked', async () => { @@ -135,13 +135,13 @@ describe('test amplify remove function', () => { ); await removeLayerVersion(projRoot, { removeNoLayerVersions: true, multipleResources: true }, [1, 2], [1, 2]); - validateLayerMetadata(projRoot, settings, getProjectMeta(projRoot), envName, arns); + await validateLayerMetadata(projRoot, settings, getProjectMeta(projRoot), envName, arns); await removeFunction(projRoot, fnName1); await removeFunction(projRoot, fnName2); await removeLayerVersion(projRoot, {}, [1], [1, 2]); await amplifyPushAuth(projRoot); - validateLayerMetadata(projRoot, settings, getProjectMeta(projRoot), envName, arns.splice(1)); + await validateLayerMetadata(projRoot, settings, getProjectMeta(projRoot), envName, arns.splice(1)); }); }); diff --git a/packages/amplify-e2e-tests/src/__tests__/migration/node.function.test.ts b/packages/amplify-e2e-tests/src/__tests__/migration/node.function.test.ts index 8a19b93bce3..1cd3c89024f 100644 --- a/packages/amplify-e2e-tests/src/__tests__/migration/node.function.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/migration/node.function.test.ts @@ -83,7 +83,6 @@ describe('nodejs version migration tests', () => { functionStackContent = fs.readFileSync(functionStackFileName).toString(); expect(projectConfigContent.indexOf('3.1')).toBeGreaterThan(0); - expect(authStackContent.indexOf('nodejs16.x')).toBeGreaterThan(0); expect(functionStackContent.indexOf('nodejs16.x')).toBeGreaterThan(0); }); diff --git a/packages/amplify-e2e-tests/src/__tests__/minify-cloudformation.test.ts b/packages/amplify-e2e-tests/src/__tests__/minify-cloudformation.test.ts index 8b970cbd7a7..9390cafc004 100644 --- a/packages/amplify-e2e-tests/src/__tests__/minify-cloudformation.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/minify-cloudformation.test.ts @@ -37,7 +37,7 @@ describe('minify behavior', () => { await initJSProjectWithProfile(projRoot, { name: projName, envName }); await addApiWithBlankSchema(projRoot); updateApiSchema(projRoot, projName, 'simple_model.graphql', false); - await amplifyPush(projRoot, true, { minify: false }); + await amplifyPush(projRoot, false, { minify: false }); // Read Cfn file sizes for both nested API stacks and top-level stacks const currentCloudBackendPath = path.join(projRoot, 'amplify', '#current-cloud-backend'); @@ -63,7 +63,7 @@ describe('minify behavior', () => { const pushParams = { projRoot, waitForText: undefined, - useLatestCodebase: true, + useLatestCodebase: false, destructivePush: false, overrideTimeout: 0, minify: true, diff --git a/packages/amplify-e2e-tests/src/__tests__/notifications-sms-update.test.ts b/packages/amplify-e2e-tests/src/__tests__/notifications-sms-update.test.ts new file mode 100644 index 00000000000..b9644cfecc0 --- /dev/null +++ b/packages/amplify-e2e-tests/src/__tests__/notifications-sms-update.test.ts @@ -0,0 +1,38 @@ +import { + addNotificationChannel, + createNewProjectDir, + deleteProject, + deleteProjectDir, + initJSProjectWithProfile, + updateNotificationChannel, +} from '@aws-amplify/amplify-e2e-core'; +import { getShortId } from '../import-helpers'; + +describe('notification category update test', () => { + const testChannel = 'SMS'; + const testChannelSelection = 'SMS'; + const projectPrefix = `notification${testChannel}`.substring(0, 19); + const projectSettings = { + name: projectPrefix, + disableAmplifyAppCreation: false, + }; + + let projectRoot: string; + + beforeEach(async () => { + projectRoot = await createNewProjectDir(projectPrefix); + }); + + afterEach(async () => { + await deleteProject(projectRoot); + deleteProjectDir(projectRoot); + }); + + it(`should add and update the ${testChannel} channel`, async () => { + await initJSProjectWithProfile(projectRoot, projectSettings); + + const settings = { resourceName: `${projectPrefix}${getShortId()}` }; + await addNotificationChannel(projectRoot, settings, testChannelSelection); + await updateNotificationChannel(projectRoot, testChannelSelection, false); + }); +}); diff --git a/packages/amplify-e2e-tests/src/__tests__/opensearch-simulator/opensearch-simulator.test.ts b/packages/amplify-e2e-tests/src/__tests__/opensearch-simulator/opensearch-simulator.test.ts index 276b8d70e8b..4305bd49e6c 100644 --- a/packages/amplify-e2e-tests/src/__tests__/opensearch-simulator/opensearch-simulator.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/opensearch-simulator/opensearch-simulator.test.ts @@ -78,7 +78,9 @@ describe('emulator operations', () => { it('should fail to launch on windows OS', async () => { jest.spyOn(cliCore, 'isWindowsPlatform').mockReturnValueOnce(true); - expect(() => openSearchEmulator.launch(mockSearchableResourcePath)).rejects.toThrow('Cannot launch OpenSearch simulator on windows OS'); + await expect(() => openSearchEmulator.launch(mockSearchableResourcePath)).rejects.toThrow( + 'Cannot launch OpenSearch simulator on windows OS', + ); }); it('correctly resolves the path to local opensearch binary', async () => { const relativePathFromMockSearchableResourceDir = await openSearchEmulator.getPathToOpenSearchBinary(); diff --git a/packages/amplify-e2e-tests/src/__tests__/parameter-store-2.test.ts b/packages/amplify-e2e-tests/src/__tests__/parameter-store-2.test.ts index 2e263cd3097..04c25260d4f 100644 --- a/packages/amplify-e2e-tests/src/__tests__/parameter-store-2.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/parameter-store-2.test.ts @@ -19,7 +19,7 @@ import { describe('parameters in Parameter Store', () => { let projRoot: string; - const envName = 'enva'; + const envName = 'devtest'; beforeEach(async () => { projRoot = await createNewProjectDir('multi-env'); diff --git a/packages/amplify-e2e-tests/src/__tests__/pinpoint/analytics-pinpoint-config-util.ts b/packages/amplify-e2e-tests/src/__tests__/pinpoint/analytics-pinpoint-config-util.ts index 71f0ea21a85..25283531021 100644 --- a/packages/amplify-e2e-tests/src/__tests__/pinpoint/analytics-pinpoint-config-util.ts +++ b/packages/amplify-e2e-tests/src/__tests__/pinpoint/analytics-pinpoint-config-util.ts @@ -6,12 +6,12 @@ import { amplifyPushAuth, createNewProjectDir, deleteProjectDir, + getAmplifyFlutterConfig, getAppId, + getAWSExports, removeAnalytics, } from '@aws-amplify/amplify-e2e-core'; import { JSONUtilities, $TSAny } from '@aws-amplify/amplify-cli-core'; -import { getAmplifyFlutterConfig } from '@aws-amplify/amplify-e2e-core'; -import { getAWSExports } from '../../schema-api-directives/authHelper'; export const runPinpointConfigTest = async ( projectRoot: string, diff --git a/packages/amplify-e2e-tests/src/__tests__/pinpoint/notifications-pinpoint-config-util.ts b/packages/amplify-e2e-tests/src/__tests__/pinpoint/notifications-pinpoint-config-util.ts index faf56149221..fef119572d3 100644 --- a/packages/amplify-e2e-tests/src/__tests__/pinpoint/notifications-pinpoint-config-util.ts +++ b/packages/amplify-e2e-tests/src/__tests__/pinpoint/notifications-pinpoint-config-util.ts @@ -6,13 +6,13 @@ import { deleteProjectDir, getAmplifyFlutterConfig, getAppId, + getAWSExports, removeAllNotificationChannel, } from '@aws-amplify/amplify-e2e-core'; import { $TSAny, JSONUtilities } from '@aws-amplify/amplify-cli-core'; import * as fs from 'fs-extra'; import * as path from 'path'; import { getShortId } from '../../import-helpers'; -import { getAWSExports } from '../../schema-api-directives'; const pinpointSettings = { resourceName: `notifications${getShortId()}` }; diff --git a/packages/amplify-e2e-tests/src/__tests__/pr-previews-multi-env-1.test.ts b/packages/amplify-e2e-tests/src/__tests__/pr-previews-multi-env-1.test.ts index 108f5b147cc..c48eb879fdc 100644 --- a/packages/amplify-e2e-tests/src/__tests__/pr-previews-multi-env-1.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/pr-previews-multi-env-1.test.ts @@ -7,7 +7,6 @@ import { getAmplifyInitConfig, getAwsProviderConfig, getProjectConfig, - getProjectMeta, gitCleanFdX, gitCommitAll, gitInit, @@ -17,17 +16,12 @@ import { describe('environment commands with functions secrets handling', () => { let projRoot: string; - let appId: string; - let region: string; beforeAll(async () => { projRoot = await createNewProjectDir('env-test'); await initJSProjectWithProfile(projRoot, { disableAmplifyAppCreation: false, envName: 'dev' }); await addManualHosting(projRoot); await amplifyPushAuth(projRoot); - const meta = getProjectMeta(projRoot); - appId = meta.providers.awscloudformation.AmplifyAppId; - region = meta.providers.awscloudformation.Region; }); afterAll(async () => { diff --git a/packages/amplify-e2e-tests/src/__tests__/pull-2.test.ts b/packages/amplify-e2e-tests/src/__tests__/pull-2.test.ts index 8f361186664..b69926f11d9 100644 --- a/packages/amplify-e2e-tests/src/__tests__/pull-2.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/pull-2.test.ts @@ -1,4 +1,3 @@ -/* eslint-disable spellcheck/spell-checker */ import { addAuthIdentityPoolAndUserPoolWithOAuth, amplifyPushAuth, @@ -6,6 +5,7 @@ import { deleteProject, deleteProjectDir, getAppId, + getProjectMeta, initJSProjectWithProfile, pullProject, } from '@aws-amplify/amplify-e2e-core'; @@ -47,7 +47,11 @@ describe('amplify pull', () => { name: 'import', envName: 'integtest', }); - await importSingleIdentityPoolAndUserPool(importRoot, settings.userPoolName, { native: '_app_client ', web: '_app_clientWeb' }); + + const meta = getProjectMeta(importRoot); + const region = meta.providers.awscloudformation.Region; + + await importSingleIdentityPoolAndUserPool(importRoot, settings.userPoolName, region, { native: '_app_client ', web: '_app_clientWeb' }); await amplifyPushAuth(importRoot); const appId = getAppId(importRoot); diff --git a/packages/amplify-e2e-tests/src/__tests__/pull.test.ts b/packages/amplify-e2e-tests/src/__tests__/pull.test.ts index b2c8d4b6493..22f6f401542 100644 --- a/packages/amplify-e2e-tests/src/__tests__/pull.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/pull.test.ts @@ -16,8 +16,10 @@ import { amplifyPullNonInteractive, amplifyPullWithCtrlCOnFrameworkPrompt, } from '@aws-amplify/amplify-e2e-core'; +import { stateManager } from '@aws-amplify/amplify-cli-core'; import * as fs from 'fs-extra'; import * as path from 'path'; +import { addEnvironment } from '../environment/env'; describe('amplify pull in two directories', () => { let projRoot: string; @@ -57,6 +59,24 @@ describe('amplify pull in two directories', () => { await amplifyPullWithCtrlCOnFrameworkPrompt(projRoot2, { appId, envName }); await amplifyPull(projRoot2, { appId, envName, emptyDir: true }); }); + + it('appends pulled env to local-aws-info contents instead of overriding existing env', async () => { + const envName = 'testing'; + const newEnvName = 'newenv'; + const expectedEnvs = [envName, newEnvName]; + + // add both envs to project + await initJSProjectWithProfile(projRoot, { envName, disableAmplifyAppCreation: false }); + await addEnvironment(projRoot, { envName: newEnvName }); + + // pull twice for both envs in other directory + const appId = getBackendAmplifyMeta(projRoot)?.providers?.awscloudformation?.AmplifyAppId; + await amplifyPullNonInteractive(projRoot2, { appId, envName: envName }); + await amplifyPullNonInteractive(projRoot2, { appId, envName: newEnvName }); + + // assert that local-aws-info.json contains both envs + expect(Object.keys(stateManager.getLocalAWSInfo(projRoot2))).toEqual(expectedEnvs); + }); }); describe('amplify pull', () => { diff --git a/packages/amplify-e2e-tests/src/__tests__/resolvers.test.ts b/packages/amplify-e2e-tests/src/__tests__/resolvers.test.ts index f7039a8d2a1..e99fc768646 100644 --- a/packages/amplify-e2e-tests/src/__tests__/resolvers.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/resolvers.test.ts @@ -15,7 +15,6 @@ import { } from '@aws-amplify/amplify-e2e-core'; import { join } from 'path'; import * as fs from 'fs-extra'; -import _ from 'lodash'; describe('user created resolvers', () => { let projectDir: string; @@ -39,12 +38,12 @@ describe('user created resolvers', () => { await addApiWithoutSchema(projectDir, { apiName }); await updateApiSchema(projectDir, apiName, 'simple_model.graphql'); - await apiGqlCompile(projectDir, true); + await apiGqlCompile(projectDir); expect(fs.readFileSync(generatedResolverPath).toString()).not.toEqual(resolver); addCustomResolver(projectDir, apiName, resolverName, resolver); - await apiGqlCompile(projectDir, true); + await apiGqlCompile(projectDir); expect(fs.readFileSync(generatedResolverPath).toString()).toEqual(resolver); }); @@ -189,13 +188,13 @@ describe('user created resolvers', () => { await addApiWithoutSchema(projectDir, { apiName }); await updateApiSchema(projectDir, apiName, 'custom_query.graphql'); - await apiGqlCompile(projectDir, true); + await apiGqlCompile(projectDir); addCustomResolver(projectDir, apiName, resolverReqName, resolverReq); addCustomResolver(projectDir, apiName, resolverResName, resolverRes); writeToCustomResourcesJson(projectDir, apiName, Resources); - await apiGqlCompile(projectDir, true); + await apiGqlCompile(projectDir); expect(fs.readFileSync(generatedReqResolverPath).toString()).toEqual(resolverReq); expect(fs.readFileSync(generatedResResolverPath).toString()).toEqual(resolverRes); diff --git a/packages/amplify-e2e-tests/src/__tests__/schema-iterative-update-locking.test.ts b/packages/amplify-e2e-tests/src/__tests__/schema-iterative-update-locking.test.ts index 68980d69152..bbfa4996da4 100644 --- a/packages/amplify-e2e-tests/src/__tests__/schema-iterative-update-locking.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/schema-iterative-update-locking.test.ts @@ -52,9 +52,7 @@ describe('Schema iterative update - locking', () => { const appId = getAppId(projectRoot); expect(appId).toBeDefined(); - let projectRootPull; - - projectRootPull = await createNewProjectDir('iterlock-pull'); + const projectRootPull = await createNewProjectDir('iterlock-pull'); await amplifyPull(projectRootPull, { override: false, emptyDir: true, appId }); diff --git a/packages/amplify-e2e-tests/src/__tests__/smoke-tests/smoketest-amplify-app.test.ts b/packages/amplify-e2e-tests/src/__tests__/smoke-tests/smoketest-amplify-app.test.ts new file mode 100644 index 00000000000..449402bdb56 --- /dev/null +++ b/packages/amplify-e2e-tests/src/__tests__/smoke-tests/smoketest-amplify-app.test.ts @@ -0,0 +1,50 @@ +import { amplifyAppReact, amplifyModelgen, amplifyPush, addIntegAccountInConfig } from '../../amplify-app-helpers/amplify-app-setup'; +import { createNewProjectDir, deleteProject, deleteProjectDir, getCLIPath } from '@aws-amplify/amplify-e2e-core'; +import { AmplifyFrontend } from '@aws-amplify/amplify-cli-core'; +import { + validateProject, + validateProjectConfig, + validateApi, + validateBackendConfig, + validateModelgen, + validateAmplifyPush, + validateFeatureFlags, +} from '../../amplify-app-helpers/amplify-app-validation'; +import execa from 'execa'; + +describe('amplify-app platform tests', () => { + let projRoot: string; + + beforeAll(async () => { + const cliPath = getCLIPath(); + const cliVersion = (await execa(cliPath, ['version'])).stdout; + // Print CLI path, CLI version and process.env.AMPLIFY_PATH for reference + // Code generated by amplify-app honors AMPLIFY_PATH env variable + console.log(`amplify-app tests: CLI path ${cliPath}, AMPLIFY_PATH=${process.env.AMPLIFY_PATH}, CLI version ${cliVersion}`); + }); + + beforeEach(async () => { + projRoot = await createNewProjectDir('amplify-app'); + }); + + afterEach(() => { + deleteProjectDir(projRoot); + }); + + jest.setTimeout(1000 * 60 * 30); // 30 minutes is enough as push operations are taking time + + it('should set up a react project and run scripts', async () => { + await amplifyAppReact(projRoot); + validateProject(projRoot, AmplifyFrontend.javascript); + validateProjectConfig(projRoot, AmplifyFrontend.javascript, 'react'); + validateApi(projRoot); + validateBackendConfig(projRoot); + validateFeatureFlags(projRoot); + addIntegAccountInConfig(projRoot); + await amplifyModelgen(projRoot); + validateModelgen(projRoot); + await amplifyPush(projRoot); + validateAmplifyPush(projRoot); + await deleteProject(projRoot); + }); +}); diff --git a/packages/amplify-e2e-tests/src/__tests__/smoke-tests/smoketest-ios.test.ts b/packages/amplify-e2e-tests/src/__tests__/smoke-tests/smoketest-ios.test.ts new file mode 100644 index 00000000000..ed927df7b43 --- /dev/null +++ b/packages/amplify-e2e-tests/src/__tests__/smoke-tests/smoketest-ios.test.ts @@ -0,0 +1,56 @@ +import { + addApi, + createNewProjectDir, + deleteProject, + deleteProjectDir, + generateModels, + initIosProjectWithXcode, + nspawn as spawn, +} from '@aws-amplify/amplify-e2e-core'; +import * as fs from 'fs/promises'; +import * as path from 'path'; + +describe('Smoke Test - iOS', () => { + if (process.platform == 'darwin') { + let projRoot: string; + const exampleIOSAppPath = path.resolve(__dirname, '..', '..', '..', 'resources', 'example-ios-app'); + beforeEach(async () => { + projRoot = await createNewProjectDir('ios-app'); + }); + + afterEach(async () => { + await deleteProject(projRoot); + deleteProjectDir(projRoot); + }); + + it('Creates Amplify iOS App', async () => { + await fs.cp(exampleIOSAppPath, projRoot, { + recursive: true, + }); + + await initIosProjectWithXcode(projRoot); + await addApi(projRoot); + await generateModels(projRoot, { expectXcode: true }); + await rubyBundleInstall(projRoot); + await buildAndTestExampleIosApp(projRoot); + }); + } else { + it('dummy test', () => {}); + } +}); + +function rubyBundleInstall(cwd: string) { + return spawn('bundle', ['install'], { + cwd, + }) + .wait('Bundle complete') + .runAsync(); +} + +function buildAndTestExampleIosApp(cwd: string) { + return spawn('bundle', ['exec', 'fastlane', 'scan', '--device', 'iPhone 13 Pro', '--deployment_target_version', '16.1'], { + cwd, + }) + .wait(/Test.*Succeeded/) + .runAsync(); +} diff --git a/packages/amplify-e2e-tests/src/__tests__/smoketest.test.ts b/packages/amplify-e2e-tests/src/__tests__/smoke-tests/smoketest.test.ts similarity index 85% rename from packages/amplify-e2e-tests/src/__tests__/smoketest.test.ts rename to packages/amplify-e2e-tests/src/__tests__/smoke-tests/smoketest.test.ts index 694ee460626..ebdb6b6758a 100644 --- a/packages/amplify-e2e-tests/src/__tests__/smoketest.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/smoke-tests/smoketest.test.ts @@ -2,37 +2,11 @@ import execa from 'execa'; import * as path from 'path'; import * as fs from 'fs-extra'; import * as os from 'os'; -import * as pty from 'node-pty'; import { getCLIPath, initJSProjectWithProfile, nspawn as spawn } from '@aws-amplify/amplify-e2e-core'; jest.retryTimes(0); -export const NPM = { - install(pkgName: string, isGlobal: boolean = false): Promise { - return new Promise((resolve) => { - const args = ['install']; - if (isGlobal) { - args.push('-g'); - } - args.push(pkgName); - execa.sync('npm', args, { stdio: 'inherit' }); - resolve(); - }); - }, - uninstall(pkgName: string, isGlobal: boolean = false): Promise { - return new Promise((resolve) => { - const args = ['uninstall', pkgName]; - if (isGlobal) { - args.push('-g'); - } - execa.sync('npm', args, { stdio: 'inherit' }); - resolve(); - }); - }, -}; - export type SmoketestArgs = { projectDirectory: string; - cliVersion: string; destructive: boolean; }; @@ -46,10 +20,9 @@ function defaultProjectDirectoryName(): string { } function getArgs(): SmoketestArgs { - const { DESTRUCTIVE = 'false', CLI_VERSION = 'latest', PROJECT_DIRECTORY = defaultProjectDirectoryName() } = process.env; + const { DESTRUCTIVE = 'false', PROJECT_DIRECTORY = defaultProjectDirectoryName() } = process.env; return { projectDirectory: PROJECT_DIRECTORY, - cliVersion: CLI_VERSION, destructive: DESTRUCTIVE.toLowerCase() === 'true', }; } @@ -69,14 +42,17 @@ export function removeProjectDirectory(projectDirectory: string) { fs.removeSync(projectDirectory); } -export type Evaluatable = { - evaluate(data: string, ptyProcess: pty.IPty): Promise; -}; export class Amplify { private executionArgs: { cwd: string; encoding: 'utf8' }; constructor(projectDirectory: string) { this.executionArgs = { cwd: projectDirectory, encoding: 'utf8' }; } + version = async () => { + const cliPath = getCLIPath(); + const versionResult = await execa(cliPath, ['version']); + const version = versionResult.stdout; + writeBanner(`CLI version is ${version}`); + }; init = async (cwd: string) => { return initJSProjectWithProfile(cwd, {}); }; @@ -172,7 +148,6 @@ export class Amplify { .sendLine('n') .wait('Do you want to add another path?') .sendNo() - .runAsync(); }; status = () => { @@ -224,11 +199,11 @@ function writeBanner(text: string) { process.stdout.write('\n'); } -describe('Release Smoke Tests', () => { - const createCommands = (amplify: Amplify, cliVersion: string, directory: string): Command[] => [ +describe('Smoke Tests', () => { + const createCommands = (amplify: Amplify, directory: string): Command[] => [ { - description: `Install @aws-amplify/cli@${cliVersion}`, - run: () => NPM.install(`@aws-amplify/cli@${cliVersion}`, true), + description: 'Amplify CLI version', + run: () => amplify.version(), }, { description: 'Create an Amplify project', @@ -287,7 +262,7 @@ describe('Release Smoke Tests', () => { run: () => amplify.delete(), }, ]; - test('An amplify project can be created without error', async () => { + it('An amplify project can be created without error', async () => { const args = getArgs(); const amplify = new Amplify(args.projectDirectory); @@ -298,7 +273,7 @@ describe('Release Smoke Tests', () => { } assertEmpty(args.projectDirectory); - const commands = createCommands(amplify, args.cliVersion, args.projectDirectory); + const commands = createCommands(amplify, args.projectDirectory); for (const command of commands) { writeBanner(command.description); await command.run(); diff --git a/packages/amplify-e2e-tests/src/__tests__/storage-1a.test.ts b/packages/amplify-e2e-tests/src/__tests__/storage-1a.test.ts index 5441e5cb13b..c31ce723597 100644 --- a/packages/amplify-e2e-tests/src/__tests__/storage-1a.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/storage-1a.test.ts @@ -22,6 +22,7 @@ function getServiceMeta(projectRoot: string, category: string, service: string): return meta.storage[storageResourceName]; } } + return undefined; } describe('amplify add/update storage(S3)', () => { diff --git a/packages/amplify-e2e-tests/src/__tests__/storage-1b.test.ts b/packages/amplify-e2e-tests/src/__tests__/storage-1b.test.ts index c513d1249ff..f7ce12ae069 100644 --- a/packages/amplify-e2e-tests/src/__tests__/storage-1b.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/storage-1b.test.ts @@ -21,6 +21,7 @@ function getServiceMeta(projectRoot: string, category: string, service: string): return meta.storage[storageResourceName]; } } + return undefined; } describe('amplify add/update storage(S3)', () => { @@ -48,7 +49,7 @@ describe('amplify add/update storage(S3)', () => { it('init a project and add S3 bucket with user pool groups and Admin API', async () => { await initJSProjectWithProfile(projRoot, {}); await addAuthWithGroupsAndAdminAPI(projRoot); - await addS3WithGroupAccess(projRoot, {}); + await addS3WithGroupAccess(projRoot); await amplifyPushAuth(projRoot); await validate(projRoot); }); @@ -68,7 +69,7 @@ describe('amplify add/update storage(S3)', () => { }; await initJSProjectWithProfile(projRoot, {}); await addAuthWithGroupsAndAdminAPI(projRoot); - await addS3WithGroupAccess(projRoot, settings); + await addS3WithGroupAccess(projRoot); await updateS3AddTriggerNewFunctionWithFunctionExisting(projRoot, settings); await amplifyPushAuth(projRoot); await validate(projRoot); diff --git a/packages/amplify-e2e-tests/src/__tests__/storage-5.test.ts b/packages/amplify-e2e-tests/src/__tests__/storage-5.test.ts index 17c13016a49..e2bcbd0b617 100644 --- a/packages/amplify-e2e-tests/src/__tests__/storage-5.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/storage-5.test.ts @@ -31,6 +31,7 @@ function getServiceMeta(projectRoot: string, category: string, service: string): return meta.storage[storageResourceName]; } } + return undefined; } describe('s3 override tests', () => { @@ -208,6 +209,9 @@ describe('ddb override tests', () => { ); replaceOverrideFileWithProjectInfo(srcOverrideFilePath, destOverrideFilePath, 'integtest', projectName); + // should throw error if AMPLIFY_CLI_DISABLE_SCRIPTING_FEATURES is set + await expect(buildOverrideStorage(projRoot, { AMPLIFY_CLI_DISABLE_SCRIPTING_FEATURES: 'true' })).rejects.toThrowError(); + // should succeed now await buildOverrideStorage(projRoot); let ddbCFNFileJSON = JSONUtilities.readJson<$TSObject>(cfnFilePath); // check if overrides are applied to the cfn file diff --git a/packages/amplify-e2e-tests/src/__tests__/storage-simulator/S3server.test.ts b/packages/amplify-e2e-tests/src/__tests__/storage-simulator/S3server.test.ts index f905e0d15cf..b158e2869cc 100644 --- a/packages/amplify-e2e-tests/src/__tests__/storage-simulator/S3server.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/storage-simulator/S3server.test.ts @@ -2,11 +2,10 @@ import { AmplifyStorageSimulator } from 'amplify-storage-simulator'; import * as AWS from 'aws-sdk'; import * as fs from 'fs-extra'; -let port = 20005; // for testing -let route = '/mock-testing'; -let bucket = 'mock-testing'; -let localDirS3 = __dirname + '/test-data/'; -const actual_file = __dirname + '/test-data/2.png'; +const port = 20005; // for testing +const route = '/mock-testing'; +const bucket = 'mock-testing'; +const localDirS3 = __dirname + '/test-data/'; let s3client; let simulator; @@ -20,7 +19,7 @@ beforeAll(async () => { region: 'eu-west-2', }); - let ep = new AWS.Endpoint('http://localhost:20005'); + const ep = new AWS.Endpoint('http://localhost:20005'); s3client = new AWS.S3({ apiVersion: '2006-03-01', endpoint: ep.href, @@ -56,7 +55,6 @@ describe('test server running', () => { }); describe('Test get api', () => { - const actual_file = __dirname + '/test-data/2.png'; test('get image work ', async () => { const data = await s3client.getObject({ Bucket: bucket, Key: '2.png' }).promise(); expect(data).toBeDefined(); @@ -90,7 +88,7 @@ describe('Test list api', () => { }); test('list object pagination', async () => { - let maxKeys = 2; + const maxKeys = 2; let total = 7; let response = await s3client .listObjects({ @@ -124,7 +122,7 @@ describe('Test delete api', () => { fs.copySync(__dirname + '/test-data/normal/', dirPathOne + '/'); }); test('test one delete ', async () => { - const data = await s3client.deleteObject({ Bucket: bucket, Key: 'deleteOne/2.png' }).promise(); + await s3client.deleteObject({ Bucket: bucket, Key: 'deleteOne/2.png' }).promise(); expect(fs.rmdirSync(dirPathOne)).toBeUndefined; }); }); diff --git a/packages/amplify-e2e-tests/src/__tests__/tags.test.ts b/packages/amplify-e2e-tests/src/__tests__/tags.test.ts index f76701eb6ee..593c251d469 100644 --- a/packages/amplify-e2e-tests/src/__tests__/tags.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/tags.test.ts @@ -36,7 +36,7 @@ describe('generated tags test', () => { it('should compare the nested stack tags key with the tags.json file and return true', async () => { const projName = 'tagsTest'; - const envName = 'devtag'; + const envName = 'devtagtest'; await initJSProjectWithProfile(projRoot, { name: projName, envName }); await addPRODHosting(projRoot); await amplifyPushWithoutCodegen(projRoot); @@ -58,7 +58,7 @@ describe('generated tags test', () => { function checkEquality(localTags: {}[], generatedTags: {}[]) { localTags.forEach((tagObj) => { const rootTag = generatedTags.find((obj) => obj['Key'] === tagObj['Key']); - if (tagObj['Key'] !== rootTag['Key']) return false; + return tagObj['Key'] === rootTag['Key']; }); return true; diff --git a/packages/amplify-e2e-tests/src/__tests__/transformer-migrations/auth-migration.test.ts b/packages/amplify-e2e-tests/src/__tests__/transformer-migrations/auth-migration.test.ts index 0fd988340ed..74dfdb19736 100644 --- a/packages/amplify-e2e-tests/src/__tests__/transformer-migrations/auth-migration.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/transformer-migrations/auth-migration.test.ts @@ -1,32 +1,26 @@ import { - initJSProjectWithProfile, - deleteProject, + addApiWithoutSchema, + addFeatureFlag, amplifyPush, amplifyPushUpdate, - addFeatureFlag, - createRandomName, - updateApiSchema, + configureAmplify, createNewProjectDir, + createRandomName, + deleteProject, deleteProjectDir, - updateApiWithMultiAuth, - addApiWithoutSchema, - updateAuthAddUserGroups, -} from '@aws-amplify/amplify-e2e-core'; -import gql from 'graphql-tag'; -import { default as CognitoClient } from 'aws-sdk/clients/cognitoidentityserviceprovider'; -import { Auth } from 'aws-amplify'; -import moment from 'moment'; -import { IAM } from 'aws-sdk'; -import { - configureAmplify, - getUserPoolId, - getConfiguredAppsyncClientCognitoAuth, - getConfiguredAppsyncClientAPIKeyAuth, getApiKey, + getConfiguredAppsyncClientAPIKeyAuth, + getConfiguredAppsyncClientCognitoAuth, getConfiguredAppsyncClientIAMAuth, + getUserPoolId, + initJSProjectWithProfile, setupUser, signInUser, -} from '../../schema-api-directives'; + updateApiSchema, + updateApiWithMultiAuth, + updateAuthAddUserGroups, +} from '@aws-amplify/amplify-e2e-core'; +import gql from 'graphql-tag'; (global as any).fetch = require('node-fetch'); @@ -34,12 +28,9 @@ describe('transformer @auth migration test', () => { let projRoot: string; let projectName: string; - const BUILD_TIMESTAMP = moment().format('YYYYMMDDHHmmss'); const GROUPNAME = 'Admin'; const PASSWORD = 'user1Password'; - const NEW_PASSWORD = 'user1Password!!!**@@@'; const EMAIL = 'username@amazon.com'; - const UNAUTH_ROLE_NAME = `unauthRole${BUILD_TIMESTAMP}`; const modelSchemaV1 = 'transformer_migration/auth-model-v1.graphql'; const modelSchemaV2 = 'transformer_migration/auth-model-v2.graphql'; @@ -62,7 +53,6 @@ describe('transformer @auth migration test', () => { }); it('migration of queries with different auth methods should succeed', async () => { - const iamHelper = new IAM({ region: 'us-east-2' }); const awsconfig = configureAmplify(projRoot); const userPoolId = getUserPoolId(projRoot); diff --git a/packages/amplify-e2e-tests/src/__tests__/transformer-migrations/function-migration.test.ts b/packages/amplify-e2e-tests/src/__tests__/transformer-migrations/function-migration.test.ts index 1b7bde01ad1..3aa662e6216 100644 --- a/packages/amplify-e2e-tests/src/__tests__/transformer-migrations/function-migration.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/transformer-migrations/function-migration.test.ts @@ -1,16 +1,18 @@ import { - initJSProjectWithProfile, - deleteProject, - createNewProjectDir, - deleteProjectDir, + addApi, addFeatureFlag, amplifyPush, - addApi, amplifyPushUpdate, + configureAmplify, + createNewProjectDir, + deleteProject, + deleteProjectDir, + getApiKey, + getConfiguredAppsyncClientAPIKeyAuth, + initJSProjectWithProfile, } from '@aws-amplify/amplify-e2e-core'; +import { testQueries, updateSchemaInTestProject } from '../../schema-api-directives/common'; import { addSimpleFunction, updateFunctionNameInSchema } from '../../schema-api-directives/functionTester'; -import { updateSchemaInTestProject, testQueries } from '../../schema-api-directives/common'; -import { getApiKey, configureAmplify, getConfiguredAppsyncClientAPIKeyAuth } from '../../schema-api-directives/authHelper'; describe('api directives @function v1 to v2 migration', () => { let projectDir: string; diff --git a/packages/amplify-e2e-tests/src/__tests__/transformer-migrations/model-migration.test.ts b/packages/amplify-e2e-tests/src/__tests__/transformer-migrations/model-migration.test.ts index 9d7e6a22464..41d0dfda234 100644 --- a/packages/amplify-e2e-tests/src/__tests__/transformer-migrations/model-migration.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/transformer-migrations/model-migration.test.ts @@ -113,6 +113,9 @@ describe('transformer model migration test', () => { await updateApiSchema(projRoot, projectName, modelSchemaV2); await amplifyPushUpdate(projRoot); + // Wait for 20s to ensure the newly-created roles have propagated + await new Promise((resolve) => setTimeout(resolve, 20000)); + appSyncClient = getAppSyncClientFromProj(projRoot); createPostMutation = /* GraphQL */ ` diff --git a/packages/amplify-e2e-tests/src/__tests__/transformer-migrations/predictions-migration.test.ts b/packages/amplify-e2e-tests/src/__tests__/transformer-migrations/predictions-migration.test.ts index b20f3e89b1b..816a538f8e8 100644 --- a/packages/amplify-e2e-tests/src/__tests__/transformer-migrations/predictions-migration.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/transformer-migrations/predictions-migration.test.ts @@ -55,7 +55,7 @@ describe('transformer predictions migration test', () => { expect(translateResult.errors).toBeUndefined(); expect(translateResult.data).toBeDefined(); expect((translateResult.data as any).translateThis).toMatch( - /((\bDies\b)|(\bdas\b)|(\bder\b)) ist ein ((\bStimmtest\b)|(\Sprachtest\b))/i, + /((\bDies\b)|(\bdas\b)|(\bder\b)) ist ein ((\bStimmtest\b)|(\Sprachtest\b)|(\bStimmentest\b))/i, ); const speakQuery = /* GraphQL */ ` @@ -93,7 +93,7 @@ describe('transformer predictions migration test', () => { expect(translateResult.errors).toBeUndefined(); expect(translateResult.data).toBeDefined(); expect((translateResult.data as any).translateThis).toMatch( - /((\bDies\b)|(\bdas\b)|(\bder\b)) ist ein ((\bStimmtest\b)|(\Sprachtest\b))/i, + /((\bDies\b)|(\bdas\b)|(\bder\b)) ist ein ((\bStimmtest\b)|(\Sprachtest\b)|(\bStimmentest\b))/i, ); speakResult = await appSyncClient.query({ diff --git a/packages/amplify-e2e-tests/src/__tests__/transformer-migrations/searchable-migration.test.ts b/packages/amplify-e2e-tests/src/__tests__/transformer-migrations/searchable-migration.test.ts index 9831561fbcc..69ca413d873 100644 --- a/packages/amplify-e2e-tests/src/__tests__/transformer-migrations/searchable-migration.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/transformer-migrations/searchable-migration.test.ts @@ -11,6 +11,7 @@ import { getProjectMeta, createNewProjectDir, deleteProjectDir, + tryScheduleCredentialRefresh, } from '@aws-amplify/amplify-e2e-core'; import gql from 'graphql-tag'; import AWSAppSyncClient, { AUTH_TYPE } from 'aws-appsync'; @@ -24,6 +25,10 @@ describe('transformer model searchable migration test', () => { let projectName: string; let appSyncClient; + beforeAll(() => { + tryScheduleCredentialRefresh(); + }); + beforeEach(async () => { projectName = createRandomName(); projRoot = await createNewProjectDir(createRandomName()); diff --git a/packages/amplify-e2e-tests/src/__tests__/uibuilder.test.ts b/packages/amplify-e2e-tests/src/__tests__/uibuilder.test.ts index 19afa38e745..21b477bd289 100644 --- a/packages/amplify-e2e-tests/src/__tests__/uibuilder.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/uibuilder.test.ts @@ -28,14 +28,13 @@ describe('amplify pull with uibuilder', () => { let appId: string; const envName = 'integtest'; + // fixes recent esm module changes by removing require('cypress'), while still disabling supportFile const cypressConfig = ` - const { defineConfig } = require('cypress') - - module.exports = defineConfig({ + module.exports = { e2e: { supportFile: false } - }) + } `; beforeEach(async () => { projRoot = await createNewProjectDir('pull-uibuilder'); @@ -92,12 +91,15 @@ describe('amplify pull with uibuilder', () => { expect(fileList).toContain('index.js'); expect(fileList).toContain('studioTheme.js'); expect(fileList).toContain('studioTheme.js.d.ts'); - expect(fileList).toHaveLength(7); + expect(fileList).toContain('utils.js'); + expect(fileList).toHaveLength(8); spawnSync( getNpmPath(), // in some runs spawnSync/npx will still use an old ver of react-scripts moving it into npm install flow - ['install', '-E', '@types/react', 'cypress', '@aws-amplify/ui-react', 'aws-amplify', 'react-scripts@5'], + // using '--legacy-peer-deps' here as support for react 19 is not quite ready: + // see: https://github.com/aws-amplify/amplify-ui/issues/6084 + ['install', '-E', '@types/react', 'cypress', '@aws-amplify/ui-react', 'aws-amplify', 'react-scripts@5', '--legacy-peer-deps'], { cwd: reactDir }, ); @@ -109,11 +111,13 @@ describe('amplify pull with uibuilder', () => { `${reactDir}/cypress/e2e/sample_spec.cy.js`, fs.readFileSync(path.join(__dirname, '..', 'cypress', 'uibuilder', 'uibuilder-spec.js')), ); - const npmStartProcess = spawn(getNpmPath(), ['start'], { cwd: reactDir, timeout: 300000 }); // Give react server time to start await new Promise((resolve) => setTimeout(resolve, 60000)); - const res = execa.sync(getNpxPath(), ['cypress', 'run'], { cwd: reactDir, encoding: 'utf8' }); + const res = execa.sync(getNpxPath(), ['cypress', 'run'], { + cwd: reactDir, + encoding: 'utf8', + }); // kill the react server process spawnSync('kill', [`${npmStartProcess.pid}`], { encoding: 'utf8' }); await new Promise((resolve) => setTimeout(resolve, 1000)); diff --git a/packages/amplify-e2e-tests/src/__tests__/with-babel-config.test.ts b/packages/amplify-e2e-tests/src/__tests__/with-babel-config.test.ts index 4800356b0bd..9fe458b8cf8 100644 --- a/packages/amplify-e2e-tests/src/__tests__/with-babel-config.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/with-babel-config.test.ts @@ -15,7 +15,7 @@ describe('project with babel config', () => { let packageJsonPath: string; let babelConfigPath: string; const projName = 'withBabelConfig'; - const envName = 'dev'; + const envName = 'devtest'; beforeAll(async () => { projectRoot = await createNewProjectDir(projName); diff --git a/packages/amplify-e2e-tests/src/amplify-app-helpers/amplify-app-setup.ts b/packages/amplify-e2e-tests/src/amplify-app-helpers/amplify-app-setup.ts index 821bc714454..211f8d7b1c9 100644 --- a/packages/amplify-e2e-tests/src/amplify-app-helpers/amplify-app-setup.ts +++ b/packages/amplify-e2e-tests/src/amplify-app-helpers/amplify-app-setup.ts @@ -1,14 +1,24 @@ -import { nspawn as spawn, KEY_DOWN_ARROW, isCI } from '@aws-amplify/amplify-e2e-core'; +import { nspawn as spawn, KEY_DOWN_ARROW, isCI, isSmokeTestRun } from '@aws-amplify/amplify-e2e-core'; import * as fs from 'fs-extra'; import * as path from 'path'; -const npm = /^win/.test(process.platform) ? 'npm.cmd' : 'npm'; +const isRunningOnWindows = /^win/.test(process.platform); +const npm = isRunningOnWindows ? 'npm.cmd' : 'npm'; +const npx = isRunningOnWindows ? 'npx.cmd' : 'npx'; const amplifyAppBinPath = path.join(__dirname, '..', '..', '..', 'amplify-app', 'bin', 'amplify-app'); -const spawnCommand = isCI() ? 'amplify-app' : amplifyAppBinPath; +const getSpawnCommand = () => { + if (isSmokeTestRun()) { + return [npx, 'amplify-app', '--yes']; + } else if (isCI() && !isRunningOnWindows) { + return 'amplify-app'; + } else { + return amplifyAppBinPath; + } +}; function amplifyAppAndroid(projRoot: string): Promise { return new Promise((resolve, reject) => { - spawn(spawnCommand, ['--platform', 'android'], { cwd: projRoot, stripColors: true }) + spawn(getSpawnCommand(), ['--platform', 'android'], { cwd: projRoot, stripColors: true }) .wait('Successfully created base Amplify Project') .wait('Amplify setup completed successfully') .run(function (err) { @@ -23,7 +33,7 @@ function amplifyAppAndroid(projRoot: string): Promise { function amplifyAppIos(projRoot: string): Promise { return new Promise((resolve, reject) => { - spawn(spawnCommand, ['--platform', 'ios'], { cwd: projRoot, stripColors: true }) + spawn(getSpawnCommand(), ['--platform', 'ios'], { cwd: projRoot, stripColors: true }) .wait('Successfully created base Amplify Project') .wait('Amplify setup completed successfully') .run(function (err) { @@ -38,7 +48,7 @@ function amplifyAppIos(projRoot: string): Promise { function amplifyAppAngular(projRoot: string): Promise { return new Promise((resolve, reject) => { - spawn(spawnCommand, [], { cwd: projRoot, stripColors: true }) + spawn(getSpawnCommand(), [], { cwd: projRoot, stripColors: true }) .wait('What type of app are you building') .sendCarriageReturn() .wait('What javascript framework are you using') @@ -54,8 +64,24 @@ function amplifyAppAngular(projRoot: string): Promise { } function amplifyAppReact(projRoot: string): Promise { + const env: Record = {}; + if (isSmokeTestRun()) { + // If we're smoke testing we have to prepend a directory component of AMPLIFY_PATH to PATH + // Internally amplify-app spawns 'amplify' which makes OS look into PATH + // However, yarn injects local binaries into PATH as well which makes OS find packages/amplify-cli/bin content + // and packages are not fully built in smoke tests. + // OS traverses PATH from left to right, so prepending forces it to use AMPLIFY_PATH location. + if (!process.env.AMPLIFY_PATH) { + throw new Error('AMPLIFY_PATH must be set in smoke tests'); + } + const amplifyPathDir = path.parse(process.env.AMPLIFY_PATH).dir; + let pathEnvVar = process.env.PATH; + const separator = isRunningOnWindows ? ';' : ':'; + pathEnvVar = amplifyPathDir + separator + pathEnvVar; + env['PATH'] = pathEnvVar; + } return new Promise((resolve, reject) => { - spawn(spawnCommand, [], { cwd: projRoot, stripColors: true }) + spawn(getSpawnCommand(), [], { cwd: projRoot, stripColors: true, env }) .wait('What type of app are you building') .sendCarriageReturn() .wait('What javascript framework are you using') diff --git a/packages/amplify-e2e-tests/src/amplify-app-helpers/amplify-app-validation.ts b/packages/amplify-e2e-tests/src/amplify-app-helpers/amplify-app-validation.ts index a566de9c2d7..90cac7e971b 100644 --- a/packages/amplify-e2e-tests/src/amplify-app-helpers/amplify-app-validation.ts +++ b/packages/amplify-e2e-tests/src/amplify-app-helpers/amplify-app-validation.ts @@ -2,6 +2,8 @@ import * as fs from 'fs-extra'; import * as path from 'path'; import { AmplifyFrontend, pathManager } from '@aws-amplify/amplify-cli-core'; +const npm = /^win/.test(process.platform) ? 'npm.cmd' : 'npm'; + function validateProject(projRoot: string, platform: AmplifyFrontend) { expect(fs.existsSync(path.join(projRoot, 'amplify'))).toBe(true); expect(fs.existsSync(path.join(projRoot, '.gitignore'))).toBe(true); @@ -46,7 +48,7 @@ function validateProjectConfig(projRoot: string, platform: AmplifyFrontend, fram break; case 'react': expect(config['javascript']['framework']).toBe('react'); - expect(config['javascript']['config']['StartCommand']).toBe('npm run-script start'); + expect(config['javascript']['config']['StartCommand']).toBe(`${npm} run-script start`); break; default: expect(false).toBe(true); diff --git a/packages/amplify-e2e-tests/src/aws-matchers/iamMatcher.ts b/packages/amplify-e2e-tests/src/aws-matchers/iamMatcher.ts index 465e11b60ce..b06e6e6874f 100644 --- a/packages/amplify-e2e-tests/src/aws-matchers/iamMatcher.ts +++ b/packages/amplify-e2e-tests/src/aws-matchers/iamMatcher.ts @@ -67,3 +67,30 @@ export const toHaveValidPolicyConditionMatchingIdpId = async (roleName: string, pass, }; }; + +export const toHaveDenyAssumeRolePolicy = async (roleName: string) => { + let pass = false; + let message = ''; + + try { + const iam = new IAM({ + accessKeyId: process.env.AWS_ACCESS_KEY_ID, + secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY, + sessionToken: process.env.AWS_SESSION_TOKEN, + }); + + const { Role: role } = await iam.getRole({ RoleName: roleName }).promise(); + const assumeRolePolicyDocument = JSON.parse(decodeURIComponent(role.AssumeRolePolicyDocument)); + + pass = assumeRolePolicyDocument?.Statement?.length === 1 && assumeRolePolicyDocument?.Statement?.[0]?.Effect === 'Deny'; + + message = pass ? 'Assume role policy has Effect: Deny' : `Assume role policy does not exist or does not have Effect: Deny.`; + } catch (e) { + message = 'IAM GetRole threw Error: ' + e.message; + } + + return { + message: () => message, + pass, + }; +}; diff --git a/packages/amplify-e2e-tests/src/cleanup-codebuild-resources.ts b/packages/amplify-e2e-tests/src/cleanup-codebuild-resources.ts new file mode 100644 index 00000000000..61c492499c4 --- /dev/null +++ b/packages/amplify-e2e-tests/src/cleanup-codebuild-resources.ts @@ -0,0 +1,1087 @@ +import { + Amplify, + AppSync, + CloudFormation, + CodeBuild, + CognitoIdentityServiceProvider, + IAM, + Organizations, + Pinpoint, + S3, + STS, +} from 'aws-sdk'; +import fs from 'fs-extra'; +import _ from 'lodash'; +import path from 'path'; + +const AWS_REGIONS_TO_RUN_TESTS = [ + 'us-east-1', + 'us-east-2', + 'us-west-2', + 'eu-west-2', + 'eu-west-3', + 'eu-central-1', + 'ap-northeast-1', + 'ap-northeast-2', + 'ap-southeast-1', + 'ap-southeast-2', +]; + +const AWS_REGIONS_TO_RUN_TESTS_PINPOINT = AWS_REGIONS_TO_RUN_TESTS.filter((region) => region !== 'eu-west-3'); + +// Limits are enforced per region +// we collect resources from each region & then delete as an entire batch +const DELETE_LIMITS = { + PER_REGION: { + OTHER: 25, + CFN_STACK: 50, + }, + PER_BATCH: { + OTHER: 50, + CFN_STACK: 100, + }, +}; + +const reportPath = path.normalize(path.join(__dirname, '..', 'amplify-e2e-reports', 'stale-resources.json')); + +const MULTI_JOB_APP = ''; +const ORPHAN = ''; +const UNKNOWN = ''; + +type StackInfo = { + stackName: string; + stackStatus: string; + resourcesFailedToDelete?: string[]; + tags: Record; + region: string; + cbInfo?: CodeBuild.Build; +}; + +type AmplifyAppInfo = { + appId: string; + name: string; + region: string; + backends: Record; +}; + +type S3BucketInfo = { + name?: string; + cbInfo?: CodeBuild.Build; + createTime?: Date; +}; + +type UserPoolInfo = { + name?: string; + region: string; + userPoolId?: string; +}; + +type PinpointAppInfo = { + id: string; + name?: string; + arn: string; + region: string; + cbInfo?: CodeBuild.Build; + createTime: Date; +}; + +type IamRoleInfo = { + name: string; + cbInfo?: CodeBuild.Build; + createTime: Date; +}; + +type AppSyncApiInfo = { + apiId?: string; + name?: string; + region: string; + cbInfo?: CodeBuild.Build; +}; + +type ReportEntry = { + jobId?: string; + workflowId?: string; + cbInfo?: CodeBuild.Build; + amplifyApps: AmplifyAppInfo[]; + stacks: StackInfo[]; + buckets: Record; + roles: Record; + pinpointApps: Record; + appSyncApis: Record; + userPools: Record; +}; + +type JobFilterPredicate = (job: ReportEntry) => boolean; + +type CIJobInfo = { + workflowId: string; + workflowName: string; + ciJobDetails: string; + buildStatus: string; +}; + +type AWSAccountInfo = { + accessKeyId: string; + secretAccessKey: string; + sessionToken: string; + parent: boolean; +}; + +const PINPOINT_TEST_REGEX = /integtest/; +const APPSYNC_TEST_REGEX = /integtest/; +const BUCKET_TEST_REGEX = /test/; +const IAM_TEST_REGEX = /!RotateE2eAwsToken-e2eTestContextRole|-integtest$|^amplify-|^eu-|^us-|^ap-/; +const USER_POOL_TEST_REGEX = /integtest|amplify_backend_manager/; +const STALE_DURATION_MS = 2 * 60 * 60 * 1000; // 2 hours in milliseconds + +/* + * Exit on expired token as all future requests will fail. + */ +const handleExpiredTokenException = (): void => { + console.log('Token expired. Exiting...'); + process.exit(1); +}; + +/** + * Check if a resource is stale based on its created date + * @param created + * @returns + */ +const isStale = (created: string | Date | undefined): boolean => { + let normalizedDate; + if (typeof created === 'string') { + normalizedDate = new Date(created); + } else { + normalizedDate = created; + } + const now = new Date().getTime(); + const isStale = normalizedDate ? now - normalizedDate.getTime() > STALE_DURATION_MS : false; + return isStale; +}; + +/** + * We define a resource as viable for deletion if it matches TEST_REGEX in the name, and if it is > STALE_DURATION_MS old. + */ +const testBucketStalenessFilter = (resource: S3.Bucket): boolean => { + const isTestResource = !!resource?.Name?.match(BUCKET_TEST_REGEX); + return isTestResource && isStale(resource.CreationDate); +}; + +const testRoleStalenessFilter = (resource: IAM.Role): boolean => { + const isTestResource = !!resource?.RoleName?.match(IAM_TEST_REGEX); + return isTestResource && isStale(resource.CreateDate); +}; + +const testUserPoolStalenessFilter = (resource: CognitoIdentityServiceProvider.UserPoolDescriptionType): boolean => { + const isTestResource = !!resource?.Name?.match(USER_POOL_TEST_REGEX); + return isTestResource && isStale(resource.CreationDate); +}; + +const testAppSyncApiStalenessFilter = (resource: AppSync.GraphqlApi): boolean => { + const isTestResource = !!resource?.name?.match(APPSYNC_TEST_REGEX); + const createTimeTagValue = resource?.tags?.['codebuild:create_time']; + let isStaleResource = true; + if (createTimeTagValue) { + const createTime = new Date(createTimeTagValue); + isStaleResource = isStale(createTime); + } + return isTestResource && isStaleResource; +}; + +const testPinpointAppStalenessFilter = (resource: Pinpoint.ApplicationResponse): boolean => { + const isTestResource = !!(resource.Name.match(PINPOINT_TEST_REGEX) && resource.CreationDate); + return isTestResource && isStale(resource.CreationDate); +}; + +/** + * Get all S3 buckets in the account, and filter down to the ones we consider stale. + */ +const getOrphanS3TestBuckets = async (account: AWSAccountInfo): Promise => { + const s3Client = new S3(getAWSConfig(account)); + const listBucketResponse = await s3Client.listBuckets().promise(); + const staleBuckets = listBucketResponse?.Buckets?.filter(testBucketStalenessFilter); + return staleBuckets?.map((it) => ({ name: it.Name, createTime: it.CreationDate })) ?? []; +}; + +/** + * Get all iam roles in the account, and filter down to the ones we consider stale. + */ +const getOrphanTestIamRoles = async (account: AWSAccountInfo): Promise => { + const iamClient = new IAM(getAWSConfig(account)); + const listRoleResponse = await iamClient.listRoles({ MaxItems: 1000 }).promise(); + const staleRoles = listRoleResponse.Roles.filter(testRoleStalenessFilter); + return staleRoles.map((it) => ({ name: it.RoleName, createTime: it.CreateDate })); +}; + +const getOrphanPinpointApplications = async (account: AWSAccountInfo, region: string): Promise => { + const pinpoint = new Pinpoint(getAWSConfig(account, region)); + const apps: PinpointAppInfo[] = []; + let nextToken = undefined; + + do { + const result: Pinpoint.GetAppsResponse = await pinpoint.getApps({ Token: nextToken }).promise(); + apps.push( + ...(result.ApplicationsResponse?.Item || []).filter(testPinpointAppStalenessFilter).map((it) => ({ + id: it.Id, + name: it.Name, + arn: it.Arn, + region, + createTime: new Date(it?.CreationDate ?? 'Invalid Date'), + })), + ); + + nextToken = result.ApplicationsResponse.NextToken; + } while (nextToken); + + return apps; +}; + +const getOrphanUserPools = async (account: AWSAccountInfo, region: string): Promise => { + const cognitoClient = new CognitoIdentityServiceProvider(getAWSConfig(account, region)); + const userPools = await cognitoClient.listUserPools({ MaxResults: 60 }).promise(); + const staleUserPools = userPools?.UserPools?.filter(testUserPoolStalenessFilter); + return staleUserPools?.map((it) => ({ name: it.Name, userPoolId: it.Id, region })) ?? []; +}; + +/** + * Get all AppSync Apis in the account, and filter down to the ones we consider stale. + */ +const getOrphanAppSyncApis = async (account: AWSAccountInfo, region: string): Promise => { + const appSyncClient = new AppSync(getAWSConfig(account, region)); + const listApisResponse = await appSyncClient.listGraphqlApis({ maxResults: 25 }).promise(); + const staleApis = listApisResponse?.graphqlApis?.filter(testAppSyncApiStalenessFilter); + return staleApis?.map((it) => ({ apiId: it.apiId, name: it.name, region })) ?? []; +}; + +/** + * Get all OIDC providers in the account that match + */ +const deleteOrphanedOidcProviders = async (account: AWSAccountInfo): Promise => { + const iamClient = new IAM(getAWSConfig(account)); + const response = await iamClient.listOpenIDConnectProviders().promise(); + if (response.OpenIDConnectProviderList) { + for (const provider of response.OpenIDConnectProviderList) { + // these seem to be the only offending resources at this time, but we can add more later + if (provider.Arn.endsWith('oidc-provider/accounts.google.com')) { + console.log('OIDC PROVIDER:', provider.Arn); + await iamClient.deleteOpenIDConnectProvider({ OpenIDConnectProviderArn: provider.Arn }).promise(); + } + } + } +}; + +/** + * Get the relevant AWS config object for a given account and region. + */ +const getAWSConfig = ({ accessKeyId, secretAccessKey, sessionToken }: AWSAccountInfo, region?: string) => ({ + credentials: { + accessKeyId, + secretAccessKey, + sessionToken, + }, + ...(region ? { region } : {}), + maxRetries: 10, +}); + +/** + * delete an S3 bucket, copied from amplify-e2e-core + */ +const deleteS3Bucket = async (bucket: string, providedS3Client: S3 | undefined = undefined) => { + const s3 = providedS3Client || new S3(); + let continuationToken: Pick | undefined = undefined; + const objectKeyAndVersion = []; + let truncated = true; + while (truncated) { + const results: S3.ListObjectVersionsOutput = await s3 + .listObjectVersions({ + Bucket: bucket, + ...(continuationToken ? continuationToken : {}), + }) + .promise(); + + results.Versions?.forEach(({ Key, VersionId }) => { + if (Key) { + objectKeyAndVersion.push({ Key, VersionId }); + } + }); + + results.DeleteMarkers?.forEach(({ Key, VersionId }) => { + if (Key) { + objectKeyAndVersion.push({ Key, VersionId }); + } + }); + + continuationToken = { KeyMarker: results.NextKeyMarker, VersionIdMarker: results.NextVersionIdMarker }; + truncated = !!results.IsTruncated; + } + const chunkedResult = _.chunk(objectKeyAndVersion, 1000); + const deleteReq = chunkedResult + .map((r: S3.ObjectIdentifier[]) => ({ + Bucket: bucket, + Delete: { + Objects: r, + Quiet: true, + }, + })) + .map((delParams: S3.DeleteObjectsRequest) => s3.deleteObjects(delParams).promise()); + await Promise.all(deleteReq); + await s3 + .deleteBucket({ + Bucket: bucket, + }) + .promise(); + await bucketNotExists(bucket); +}; + +/** + * Copied from amplify-e2e-core + */ +const bucketNotExists = async (bucket: string) => { + const s3 = new S3(); + const params = { + Bucket: bucket, + $waiter: { maxAttempts: 10, delay: 30 }, + }; + try { + await s3.waitFor('bucketNotExists', params).promise(); + return true; + } catch (error) { + if (error.statusCode === 200) { + return false; + } + throw error; + } +}; + +/** + * Copied from amplify-e2e-core + */ +const sleep = async (milliseconds: number): Promise => new Promise((resolve) => setTimeout(resolve, milliseconds)); + +/** + * Returns a list of Amplify Apps in the region. The apps includes information about the CircleCI build that created the app + * This is determined by looking at tags of the backend environments that are associated with the Apps + * @param account aws account to query for amplify Apps + * @param region aws region to query for amplify Apps + * @returns Promise a list of Amplify Apps in the region with build info + */ +const getAmplifyApps = async (account: AWSAccountInfo, region: string, cbClient: CodeBuild): Promise => { + if (region === 'us-east-1' && account.parent) { + return []; // temporarily disabled until us-east-1 is re-enabled for this account + } + const amplifyClient = new Amplify(getAWSConfig(account, region)); + try { + const amplifyApps = await amplifyClient.listApps({ maxResults: 25 }).promise(); // keeping it to 25 as max supported is 25 + const result: AmplifyAppInfo[] = []; + for (const app of amplifyApps.apps) { + if (!isStale(app.createTime)) { + continue; // skip + } + const backends: Record = {}; + try { + const backendEnvironments = await amplifyClient.listBackendEnvironments({ appId: app.appId, maxResults: 5 }).promise(); + for (const backendEnv of backendEnvironments.backendEnvironments) { + if (backendEnv.stackName) { + const buildInfo = await getStackDetails(backendEnv.stackName, account, region, cbClient); + if (buildInfo) { + backends[backendEnv.environmentName] = buildInfo; + } + } + } + } catch (e) { + // console.log(e); + } + result.push({ + appId: app.appId, + name: app.name, + region, + backends, + }); + } + return result; + } catch (e) { + console.log(e); + return []; + } +}; + +/** + * Return the job id looking at `codebuild:build_id` in the tags + * @param tags Tags associated with the resource + * @returns build number or undefined + */ +const getJobId = (tags: CloudFormation.Tags = []): string | undefined => { + const jobId = tags.find((tag) => tag.Key === 'codebuild:build_id')?.Value; + return jobId; +}; + +/** + * Gets details about a stack and CI job that created the stack. If a stack has status of + * `DELETE_FAILED` then it also includes the list of physical id of resources that caused + * deletion failures + * + * @param stackName name of the stack + * @param account account + * @param region region + * @returns stack details + */ +const getStackDetails = async (stackName: string, account: AWSAccountInfo, region: string, cbClient: CodeBuild): Promise => { + const cfnClient = new CloudFormation(getAWSConfig(account, region)); + const stack = await cfnClient.describeStacks({ StackName: stackName }).promise(); + const tags = stack?.Stacks?.[0].Tags ?? []; + const stackStatus = stack?.Stacks?.[0]?.StackStatus ?? 'UNDEFINED'; + let resourcesFailedToDelete: string[] = []; + if (stackStatus === 'DELETE_FAILED') { + // Todo: We need to investigate if we should go ahead and remove the resources to prevent account getting cluttered + const resources = await cfnClient.listStackResources({ StackName: stackName }).promise(); + resourcesFailedToDelete = + resources?.StackResourceSummaries?.filter((r) => r.ResourceStatus === 'DELETE_FAILED').map((r) => r.LogicalResourceId) ?? []; + } + const jobId = getJobId(tags); + return { + stackName, + stackStatus, + resourcesFailedToDelete, + region, + tags: tags.reduce((acc, tag) => ({ ...acc, [tag.Key]: tag.Value }), {}), + cbInfo: jobId ? await getCIJobDetails(jobId, cbClient) : undefined, + }; +}; + +const getStacks = async (account: AWSAccountInfo, region: string, cbClient: CodeBuild): Promise => { + const cfnClient = new CloudFormation(getAWSConfig(account, region)); + const stackStatusFilter = [ + 'CREATE_COMPLETE', + 'ROLLBACK_FAILED', + 'ROLLBACK_COMPLETE', + 'DELETE_FAILED', + 'UPDATE_COMPLETE', + 'UPDATE_ROLLBACK_FAILED', + 'UPDATE_ROLLBACK_COMPLETE', + 'IMPORT_COMPLETE', + 'IMPORT_ROLLBACK_FAILED', + 'IMPORT_ROLLBACK_COMPLETE', + ]; + const stacks = await cfnClient + .listStacks({ + StackStatusFilter: stackStatusFilter, + }) + .promise(); + // loop + let nextToken = stacks.NextToken; + while (nextToken && stacks?.StackSummaries?.length && stacks.StackSummaries.length < DELETE_LIMITS.PER_REGION.CFN_STACK) { + const nextPage = await cfnClient + .listStacks({ + StackStatusFilter: stackStatusFilter, + NextToken: nextToken, + }) + .promise(); + if (nextPage?.StackSummaries?.length) { + stacks.StackSummaries.push(...nextPage.StackSummaries); + nextToken = nextPage.NextToken; + } + } + + stacks.StackSummaries = stacks.StackSummaries || []; + + // We are interested in only the root stacks that are deployed by amplify-cli + // NOTE: every few months, we should disable the filter , and clean up all stacks (not just root stacks) + // this is because some child stacks fail to delete (but we don't let that stop us from deleting root stacks) + // eventually, we must clean up those child stacks too. + let rootStacks = stacks.StackSummaries.filter((stack) => { + const isRoot = !stack.RootId; + const isStackStale = isStale(stack.CreationTime); + if (!isStackStale) { + console.log('Skipping stack because created date is:', stack.CreationTime); + } + return isRoot && isStackStale; + }); + if (rootStacks.length > DELETE_LIMITS.PER_REGION.CFN_STACK) { + // we can only delete 100 stacks accross all regions every batch, + // so we shouldn't take more than 50 stacks from each of those 8 regions. + // this should at least limit calls to getStackDetails below + rootStacks = rootStacks.slice(0, DELETE_LIMITS.PER_REGION.CFN_STACK); + } + const results: StackInfo[] = []; + for (const stack of rootStacks) { + try { + const details = await getStackDetails(stack.StackName, account, region, cbClient); + if (details) { + results.push(details); + } + } catch { + // don't want to barf and fail e2e tests + } + } + return results; +}; + +const getCIJobDetails = async (build_id: string, cbClient: CodeBuild): Promise => { + const batchBuilds = await cbClient.batchGetBuilds({ ids: [build_id] }).promise(); + const buildInfo = batchBuilds?.builds?.[0]; + + return buildInfo; +}; + +const getS3Buckets = async (account: AWSAccountInfo, cbClient: CodeBuild): Promise => { + const s3Client = new S3(getAWSConfig(account)); + const buckets = await s3Client.listBuckets().promise(); + if (buckets.Buckets === undefined) { + return []; + } + const result: S3BucketInfo[] = []; + for (const bucket of buckets.Buckets) { + if (!bucket.Name) { + continue; + } + try { + const bucketDetails = await s3Client.getBucketTagging({ Bucket: bucket.Name }).promise(); + const jobId = getJobId(bucketDetails.TagSet); + if (jobId) { + result.push({ + name: bucket.Name, + cbInfo: await getCIJobDetails(jobId, cbClient), + createTime: bucket.CreationDate, + }); + } + } catch (e) { + if (e.code !== 'NoSuchTagSet' && e.code !== 'NoSuchBucket') { + throw e; + } + result.push({ + name: bucket.Name, + createTime: bucket.CreationDate, + }); + } + } + return result; +}; + +/** + * extract and moves CI job details + */ +const extractCIJobInfo = (record: S3BucketInfo | StackInfo | AmplifyAppInfo): CIJobInfo => ({ + workflowId: _.get(record, ['0', 'cbInfo', 'workflows', 'workflow_id']), + workflowName: _.get(record, ['0', 'cbInfo', 'workflows', 'workflow_name']), + buildStatus: _.get(record, ['0', 'cbInfo', 'buildStatus']), + ciJobDetails: _.get(record, ['0', 'cbInfo']), +}); + +/** + * Merges stale resources and returns a list grouped by the CI jobId. Amplify Apps that don't have + * any backend environment are grouped as Orphan apps and apps that have Backend created by different CI jobs are + * grouped as MULTI_JOB_APP. Any resource that do not have a CI job is grouped under UNKNOWN + */ +const mergeResourcesByCIJob = ( + amplifyApp: AmplifyAppInfo[], + cfnStacks: StackInfo[], + s3Buckets: S3BucketInfo[], + orphanS3Buckets: S3BucketInfo[], + orphanIamRoles: IamRoleInfo[], + orphanPinpointApplications: PinpointAppInfo[], + orphanAppSyncApis: AppSyncApiInfo[], + orphanUserPools: UserPoolInfo[], +): Record => { + const result: Record = {}; + + const stacksByJobId = _.groupBy(cfnStacks, (stack: StackInfo) => _.get(stack, ['cbInfo', 'id'], UNKNOWN)); + + const bucketByJobId = _.groupBy(s3Buckets, (bucketInfo: S3BucketInfo) => _.get(bucketInfo, ['cbInfo', 'id'], UNKNOWN)); + + const amplifyAppByJobId = _.groupBy(amplifyApp, (appInfo: AmplifyAppInfo) => { + if (Object.keys(appInfo.backends).length === 0) { + return ORPHAN; + } + + const buildIds = _.groupBy(appInfo.backends, (backendInfo: StackInfo) => _.get(backendInfo, ['cbInfo', 'id'], UNKNOWN)); + if (Object.keys(buildIds).length === 1) { + return Object.keys(buildIds)[0]; + } + + return MULTI_JOB_APP; + }); + + _.mergeWith( + result, + _.pickBy(amplifyAppByJobId, (__: unknown, key: string) => key !== MULTI_JOB_APP), + (val: any, src: AmplifyAppInfo, key: string) => ({ + ...val, + ...extractCIJobInfo(src), + jobId: key, + amplifyApps: src, + }), + ); + + _.mergeWith( + result, + stacksByJobId, + (__: unknown, key: string) => key !== ORPHAN, + (val: any, src: StackInfo, key: string) => ({ + ...val, + ...extractCIJobInfo(src), + jobId: key, + stacks: src, + }), + ); + + _.mergeWith(result, bucketByJobId, (val: any, src: S3BucketInfo, key: string) => ({ + ...val, + ...extractCIJobInfo(src), + jobId: key, + buckets: src, + })); + + const orphanBuckets = { + [ORPHAN]: orphanS3Buckets, + }; + + _.mergeWith(result, orphanBuckets, (val: any, src: S3BucketInfo, key: string) => ({ + ...val, + jobId: key, + buckets: src, + })); + + const orphanIamRolesGroup = { + [ORPHAN]: orphanIamRoles, + }; + + _.mergeWith(result, orphanIamRolesGroup, (val: any, src: IamRoleInfo, key: string) => ({ + ...val, + jobId: key, + roles: src, + })); + + const orphanPinpointApps = { + [ORPHAN]: orphanPinpointApplications, + }; + + _.mergeWith(result, orphanPinpointApps, (val: any, src: PinpointAppInfo, key: string) => ({ + ...val, + jobId: key, + pinpointApps: src, + })); + + _.mergeWith( + result, + { + [ORPHAN]: orphanAppSyncApis, + }, + (val: any, src: AppSyncApiInfo, key: string) => ({ + ...val, + jobId: key, + appSyncApis: src, + }), + ); + + _.mergeWith( + result, + { + [ORPHAN]: orphanUserPools, + }, + (val: any, src: UserPoolInfo, key: string) => ({ + ...val, + jobId: key, + userPools: src, + }), + ); + + return result; +}; + +const deleteAmplifyApps = async (account: AWSAccountInfo, accountIndex: number, apps: AmplifyAppInfo[]): Promise => { + await Promise.all(apps.slice(0, DELETE_LIMITS.PER_BATCH.OTHER).map((app) => deleteAmplifyApp(account, accountIndex, app))); +}; + +const deleteAmplifyApp = async (account: AWSAccountInfo, accountIndex: number, app: AmplifyAppInfo): Promise => { + const { name, appId, region } = app; + console.log(`[ACCOUNT ${accountIndex}] Deleting App ${name}(${appId})`); + const amplifyClient = new Amplify(getAWSConfig(account, region)); + try { + await amplifyClient.deleteApp({ appId }).promise(); + } catch (e) { + console.log(`[ACCOUNT ${accountIndex}] Deleting Amplify App ${appId} failed with the following error`, e); + if (e.code === 'ExpiredTokenException') { + handleExpiredTokenException(); + } + } +}; + +const deleteIamRoles = async (account: AWSAccountInfo, accountIndex: number, roles: IamRoleInfo[]): Promise => { + await Promise.all(roles.slice(0, DELETE_LIMITS.PER_BATCH.OTHER).map((role) => deleteIamRole(account, accountIndex, role))); +}; + +const deleteIamRole = async (account: AWSAccountInfo, accountIndex: number, role: IamRoleInfo): Promise => { + const { name: roleName } = role; + try { + console.log(`[ACCOUNT ${accountIndex}] Deleting Iam Role ${roleName}`); + console.log(`Role creation time (PST): ${role.createTime.toLocaleTimeString('en-US', { timeZone: 'America/Los_Angeles' })}`); + const iamClient = new IAM(getAWSConfig(account)); + await deleteAttachedRolePolicies(account, accountIndex, roleName); + await deleteRolePolicies(account, accountIndex, roleName); + await iamClient.deleteRole({ RoleName: roleName }).promise(); + } catch (e) { + console.log(`[ACCOUNT ${accountIndex}] Deleting iam role ${roleName} failed with error ${e.message}`); + if (e.code === 'ExpiredTokenException') { + handleExpiredTokenException(); + } + } +}; + +const deleteAttachedRolePolicies = async (account: AWSAccountInfo, accountIndex: number, roleName: string): Promise => { + const iamClient = new IAM(getAWSConfig(account)); + const rolePolicies = await iamClient.listAttachedRolePolicies({ RoleName: roleName }).promise(); + if (rolePolicies?.AttachedPolicies) { + await Promise.all(rolePolicies.AttachedPolicies.map((policy) => detachIamAttachedRolePolicy(account, accountIndex, roleName, policy))); + } +}; + +const detachIamAttachedRolePolicy = async ( + account: AWSAccountInfo, + accountIndex: number, + roleName: string, + policy: IAM.AttachedPolicy, +): Promise => { + if (policy?.PolicyArn) { + try { + console.log(`[ACCOUNT ${accountIndex}] Detach Iam Attached Role Policy ${policy.PolicyName}`); + const iamClient = new IAM(getAWSConfig(account)); + await iamClient.detachRolePolicy({ RoleName: roleName, PolicyArn: policy.PolicyArn }).promise(); + } catch (e) { + console.log(`[ACCOUNT ${accountIndex}] Detach iam role policy ${policy.PolicyName} failed with error ${e.message}`); + if (e.code === 'ExpiredTokenException') { + handleExpiredTokenException(); + } + } + } +}; + +const deleteRolePolicies = async (account: AWSAccountInfo, accountIndex: number, roleName: string): Promise => { + const iamClient = new IAM(getAWSConfig(account)); + const rolePolicies = await iamClient.listRolePolicies({ RoleName: roleName }).promise(); + await Promise.all(rolePolicies.PolicyNames.map((policy) => deleteIamRolePolicy(account, accountIndex, roleName, policy))); +}; + +const deleteIamRolePolicy = async (account: AWSAccountInfo, accountIndex: number, roleName: string, policyName: string): Promise => { + try { + console.log(`[ACCOUNT ${accountIndex}] Deleting Iam Role Policy ${policyName}`); + const iamClient = new IAM(getAWSConfig(account)); + await iamClient.deleteRolePolicy({ RoleName: roleName, PolicyName: policyName }).promise(); + } catch (e) { + console.log(`[ACCOUNT ${accountIndex}] Deleting iam role policy ${policyName} failed with error ${e.message}`); + if (e.code === 'ExpiredTokenException') { + handleExpiredTokenException(); + } + } +}; + +const deleteBuckets = async (account: AWSAccountInfo, accountIndex: number, buckets: S3BucketInfo[]): Promise => { + await Promise.all(buckets.slice(0, DELETE_LIMITS.PER_BATCH.OTHER).map((bucket) => deleteBucket(account, accountIndex, bucket))); +}; + +const deleteBucket = async (account: AWSAccountInfo, accountIndex: number, bucket: S3BucketInfo): Promise => { + const { createTime, name } = bucket; + if (name) { + try { + console.log(`[ACCOUNT ${accountIndex}] Deleting S3 Bucket ${name}`); + console.log(`Bucket creation time (PST): ${createTime?.toLocaleTimeString('en-US', { timeZone: 'America/Los_Angeles' })}`); + const s3 = new S3(getAWSConfig(account)); + await deleteS3Bucket(name, s3); + } catch (e) { + console.log(`[ACCOUNT ${accountIndex}] Deleting bucket ${name} failed with error ${e.message}`); + if (e.code === 'ExpiredTokenException') { + handleExpiredTokenException(); + } + } + } +}; + +const deletePinpointApps = async (account: AWSAccountInfo, accountIndex: number, apps: PinpointAppInfo[]): Promise => { + await Promise.all(apps.slice(0, DELETE_LIMITS.PER_BATCH.OTHER).map((app) => deletePinpointApp(account, accountIndex, app))); +}; + +const deletePinpointApp = async (account: AWSAccountInfo, accountIndex: number, app: PinpointAppInfo): Promise => { + const { id, name, region } = app; + try { + console.log(`[ACCOUNT ${accountIndex}] Deleting Pinpoint App ${name}`); + console.log(`Pinpoint creation time (PST): ${app.createTime.toLocaleTimeString('en-US', { timeZone: 'America/Los_Angeles' })}`); + const pinpoint = new Pinpoint(getAWSConfig(account, region)); + await pinpoint.deleteApp({ ApplicationId: id }).promise(); + } catch (e) { + console.log(`[ACCOUNT ${accountIndex}] Deleting pinpoint app ${name} failed with error ${e.message}`); + } +}; + +const deleteAppSyncApis = async (account: AWSAccountInfo, accountIndex: number, apis: AppSyncApiInfo[]): Promise => { + await Promise.all(apis.slice(0, DELETE_LIMITS.PER_BATCH.OTHER).map((api) => deleteAppSyncApi(account, accountIndex, api))); +}; + +const deleteAppSyncApi = async (account: AWSAccountInfo, accountIndex: number, api: AppSyncApiInfo): Promise => { + const { apiId, name, region } = api; + if (apiId) { + try { + console.log(`[ACCOUNT ${accountIndex}] Deleting AppSync Api ${name}`); + const appSync = new AppSync(getAWSConfig(account, region)); + await appSync.deleteGraphqlApi({ apiId }).promise(); + } catch (e) { + console.log(`[ACCOUNT ${accountIndex}] Deleting AppSync Api ${name} failed with error ${e.message}`); + } + } +}; + +const deleteUserPools = async (account: AWSAccountInfo, accountIndex: number, userPools: UserPoolInfo[]): Promise => { + await Promise.all(userPools.slice(0, DELETE_LIMITS.PER_BATCH.OTHER).map((userPool) => deleteUserPool(account, accountIndex, userPool))); +}; + +const deleteUserPool = async (account: AWSAccountInfo, accountIndex: number, userPool: UserPoolInfo): Promise => { + const { name, region, userPoolId } = userPool; + if (!userPoolId) { + return; + } + try { + console.log(`[ACCOUNT ${accountIndex}] Deleting UserPool ${name}`); + const cognitoClient = new CognitoIdentityServiceProvider(getAWSConfig(account, region)); + const userPoolDetails = await cognitoClient.describeUserPool({ UserPoolId: userPoolId }).promise(); + if (userPoolDetails?.UserPool?.Domain) { + await cognitoClient + .deleteUserPoolDomain({ + UserPoolId: userPoolId, + Domain: userPoolDetails.UserPool.Domain, + }) + .promise(); + } + await cognitoClient.deleteUserPool({ UserPoolId: userPoolId }).promise(); + } catch (e) { + console.log(`[ACCOUNT ${accountIndex}] Deleting UserPool ${name} failed with error ${e.message}`); + } +}; + +const deleteCfnStacks = async (account: AWSAccountInfo, accountIndex: number, stacks: StackInfo[]): Promise => { + await Promise.all(stacks.slice(0, DELETE_LIMITS.PER_BATCH.CFN_STACK).map((stack) => deleteCfnStack(account, accountIndex, stack))); +}; + +const deleteCfnStack = async (account: AWSAccountInfo, accountIndex: number, stack: StackInfo): Promise => { + const { stackName, region, resourcesFailedToDelete } = stack; + const resourceToRetain = resourcesFailedToDelete?.length ? resourcesFailedToDelete : undefined; + console.log(`[ACCOUNT ${accountIndex}] Deleting CloudFormation stack ${stackName}`); + try { + const cfnClient = new CloudFormation(getAWSConfig(account, region)); + await cfnClient.deleteStack({ StackName: stackName, RetainResources: resourceToRetain }).promise(); + // we'll only wait up to a minute before moving on + await cfnClient.waitFor('stackDeleteComplete', { StackName: stackName, $waiter: { maxAttempts: 2 } }).promise(); + } catch (e) { + console.log(`Deleting CloudFormation stack ${stackName} failed with error ${e.message}`); + if (e.code === 'ExpiredTokenException') { + handleExpiredTokenException(); + } + } +}; + +const generateReport = (jobs: _.Dictionary): void => { + fs.ensureFileSync(reportPath); + fs.writeFileSync(reportPath, JSON.stringify(jobs, null, 4)); +}; + +/** + * While we basically fan-out deletes elsewhere in this script, leaving the app->cfn->bucket delete process + * serial within a given account, it's not immediately clear if this is necessary, but seems possibly valuable. + */ +const deleteResources = async ( + account: AWSAccountInfo, + accountIndex: number, + staleResources: Record, +): Promise => { + for (const jobId of Object.keys(staleResources)) { + const resources = staleResources[jobId]; + if (resources.amplifyApps) { + console.log(`Deleting up to ${DELETE_LIMITS.PER_BATCH.OTHER} of ${resources.amplifyApps.length} apps on ACCOUNT[${accountIndex}]`); + await deleteAmplifyApps(account, accountIndex, Object.values(resources.amplifyApps)); + } + + if (resources.stacks) { + console.log(`Deleting up to ${DELETE_LIMITS.PER_BATCH.CFN_STACK} of ${resources.stacks.length} stacks on ACCOUNT[${accountIndex}]`); + await deleteCfnStacks(account, accountIndex, Object.values(resources.stacks)); + } + + if (resources.buckets) { + console.log(`Deleting up to ${DELETE_LIMITS.PER_BATCH.OTHER} of ${resources.buckets.length} buckets on ACCOUNT[${accountIndex}]`); + await deleteBuckets(account, accountIndex, Object.values(resources.buckets)); + } + + if (resources.roles) { + console.log(`Deleting up to ${DELETE_LIMITS.PER_BATCH.OTHER} of ${resources.roles.length} roles on ACCOUNT[${accountIndex}]`); + await deleteIamRoles(account, accountIndex, Object.values(resources.roles)); + } + + if (resources.pinpointApps) { + console.log( + `Deleting up to ${DELETE_LIMITS.PER_BATCH.OTHER} of ${resources.pinpointApps.length} pinpoint apps on ACCOUNT[${accountIndex}]`, + ); + await deletePinpointApps(account, accountIndex, Object.values(resources.pinpointApps)); + } + + if (resources.appSyncApis) { + console.log( + `Deleting up to ${DELETE_LIMITS.PER_BATCH.OTHER} of ${resources.appSyncApis.length} appSyncApis on ACCOUNT[${accountIndex}]`, + ); + await deleteAppSyncApis(account, accountIndex, Object.values(resources.appSyncApis)); + } + + if (resources.userPools) { + console.log(`Deleting up to ${DELETE_LIMITS.PER_BATCH.OTHER} of ${resources.userPools.length} userPools on ACCOUNT[${accountIndex}]`); + await deleteUserPools(account, accountIndex, Object.values(resources.userPools)); + } + } +}; + +/** + * Retrieve the accounts to process for potential cleanup. By default we will attempt + * to get all accounts within the root account organization. + */ +const getAccountsToCleanup = async (): Promise => { + const stsRes = new STS({ + apiVersion: '2011-06-15', + accessKeyId: process.env.AWS_ACCESS_KEY_ID, + secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY, + sessionToken: process.env.AWS_SESSION_TOKEN, + }); + const parentAccountIdentity = await stsRes.getCallerIdentity().promise(); + const orgApi = new Organizations({ + apiVersion: '2016-11-28', + // the region where the organization exists + region: 'us-east-1', + }); + try { + const orgAccounts = await orgApi.listAccounts().promise(); + const allAccounts = orgAccounts.Accounts ?? []; + let nextToken = orgAccounts.NextToken; + while (nextToken) { + const nextPage = await orgApi.listAccounts({ NextToken: nextToken }).promise(); + if (!nextPage?.Accounts?.length) { + break; + } + allAccounts.push(...nextPage.Accounts); + nextToken = nextPage.NextToken; + } + const accountCredentialPromises = allAccounts.map(async (account) => { + if (account.Id === parentAccountIdentity.Account) { + return getEnvVarCredentials(); + } + const randomNumber = Math.floor(Math.random() * 100000); + const assumeRoleRes = await stsRes + .assumeRole({ + RoleArn: `arn:aws:iam::${account.Id}:role/OrganizationAccountAccessRole`, + RoleSessionName: `testSession${randomNumber}`, + // One hour + DurationSeconds: 1 * 60 * 60, + }) + .promise(); + + const accessKeyId = assumeRoleRes?.Credentials?.AccessKeyId ?? ''; + const secretAccessKey = assumeRoleRes?.Credentials?.SecretAccessKey ?? ''; + const sessionToken = assumeRoleRes?.Credentials?.SessionToken ?? ''; + + return { + accessKeyId, + secretAccessKey, + sessionToken, + parent: false, + }; + }); + return await Promise.all(accountCredentialPromises); + } catch (e) { + console.error(e); + console.log( + 'Error assuming child account role. This could be because the script is already running from within a child account. Running on current AWS account only.', + ); + + return [getEnvVarCredentials()]; + } +}; + +const getEnvVarCredentials = (): AWSAccountInfo => { + if (!process.env.AWS_ACCESS_KEY_ID || !process.env.AWS_SECRET_ACCESS_KEY || !process.env.AWS_SESSION_TOKEN) { + throw Error('Credentials are missing in environment variables'); + } + + return { + accessKeyId: process.env.AWS_ACCESS_KEY_ID, + secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY, + sessionToken: process.env.AWS_SESSION_TOKEN, + parent: true, + }; +}; + +const cleanupAccount = async (account: AWSAccountInfo, accountIndex: number, filterPredicate: JobFilterPredicate): Promise => { + const cbClient = new CodeBuild(getAWSConfig(account)); + const appPromises = AWS_REGIONS_TO_RUN_TESTS.map((region) => getAmplifyApps(account, region, cbClient)); + const stackPromises = AWS_REGIONS_TO_RUN_TESTS.map((region) => getStacks(account, region, cbClient)); + const bucketPromise = getS3Buckets(account, cbClient); + const orphanPinpointApplicationsPromise = AWS_REGIONS_TO_RUN_TESTS_PINPOINT.map((region) => + getOrphanPinpointApplications(account, region), + ); + const orphanBucketPromise = getOrphanS3TestBuckets(account); + const orphanIamRolesPromise = getOrphanTestIamRoles(account); + const orphanAppSyncApisPromise = AWS_REGIONS_TO_RUN_TESTS.map((region) => getOrphanAppSyncApis(account, region)); + const orphanUserPoolsPromise = AWS_REGIONS_TO_RUN_TESTS.map((region) => getOrphanUserPools(account, region)); + + const apps = (await Promise.all(appPromises)).flat(); + const stacks = (await Promise.all(stackPromises)).flat(); + const buckets = await bucketPromise; + const orphanBuckets = await orphanBucketPromise; + const orphanIamRoles = await orphanIamRolesPromise; + const orphanPinpointApplications = (await Promise.all(orphanPinpointApplicationsPromise)).flat(); + const orphanAppSyncApis = (await Promise.all(orphanAppSyncApisPromise)).flat(); + const orphanUserPools = (await Promise.all(orphanUserPoolsPromise)).flat(); + + const allResources = mergeResourcesByCIJob( + apps, + stacks, + buckets, + orphanBuckets, + orphanIamRoles, + orphanPinpointApplications, + orphanAppSyncApis, + orphanUserPools, + ); + // cleanup resources that are but that are definitely amplify resources + // this includes apps with names that include "test" or stacks that include both "amplify" & "test" + const testApps = allResources['']?.amplifyApps?.filter((a) => a.name.toLocaleLowerCase().includes('test')); + const testStacks = allResources['']?.stacks?.filter( + (s) => s.stackName.toLocaleLowerCase().includes('test') && s.stackName.toLocaleLowerCase().includes('amplify'), + ); + const orphanedResources = allResources['']; + orphanedResources.amplifyApps = orphanedResources.amplifyApps ?? []; + orphanedResources.stacks = orphanedResources.stacks ?? []; + orphanedResources.amplifyApps.push(...(testApps ? testApps : [])); + orphanedResources.stacks.push(...(testStacks ? testStacks : [])); + const staleResources = _.pickBy(allResources, filterPredicate); + + generateReport(staleResources); + await deleteResources(account, accountIndex, staleResources); + await deleteOrphanedOidcProviders(account); + console.log(`[ACCOUNT ${accountIndex}] Cleanup done!`); +}; + +/** + * Execute the cleanup script. + * Cleanup will happen in parallel across all accounts within a given organization, + * based on the requested filter parameters (i.e. for a given workflow, job, or all stale resources). + * Logs are emitted for given account ids anywhere we've fanned out, but we use an indexing scheme instead + * of account ids since the logs these are written to will be effectively public. + */ +const cleanup = async (): Promise => { + const filterPredicateStaleResources = (job: ReportEntry) => job?.cbInfo?.buildStatus === 'finished' || job.jobId === ORPHAN; + const accounts = await getAccountsToCleanup(); + for (let i = 0; i < 3; ++i) { + console.log('CLEANUP ROUND: ', i + 1); + await Promise.all( + accounts.map((account, i) => { + return cleanupAccount(account, i, filterPredicateStaleResources); + }), + ); + await sleep(60 * 1000); // run again after 60 seconds + } + console.log('Done cleaning all accounts!'); +}; + +void cleanup(); diff --git a/packages/amplify-e2e-tests/src/cleanup-e2e-resources.ts b/packages/amplify-e2e-tests/src/cleanup-e2e-resources.ts index 1f506fe2da4..83da29fa3b5 100644 --- a/packages/amplify-e2e-tests/src/cleanup-e2e-resources.ts +++ b/packages/amplify-e2e-tests/src/cleanup-e2e-resources.ts @@ -1,6 +1,5 @@ /* eslint-disable camelcase */ /* eslint-disable spellcheck/spell-checker */ -import { CircleCI, GitType, CircleCIOptions } from 'circleci-api'; import { config } from 'dotenv'; import yargs from 'yargs'; import * as aws from 'aws-sdk'; @@ -44,25 +43,12 @@ const MULTI_JOB_APP = ''; const ORPHAN = ''; const UNKNOWN = ''; -type CircleCIJobDetails = { - build_url: string; - branch: string; - build_num: number; - outcome: string; - canceled: string; - infrastructure_fail: boolean; - status: string; - committer_name: null; - workflows: { workflow_id: string }; -}; - type StackInfo = { stackName: string; stackStatus: string; resourcesFailedToDelete?: string[]; tags: Record; region: string; - cciInfo: CircleCIJobDetails; }; type AmplifyAppInfo = { @@ -74,7 +60,6 @@ type AmplifyAppInfo = { type S3BucketInfo = { name: string; - cciInfo?: CircleCIJobDetails; createTime: Date; }; @@ -89,13 +74,11 @@ type PinpointAppInfo = { name: string; arn: string; region: string; - cciInfo?: CircleCIJobDetails; createTime: Date; }; type IamRoleInfo = { name: string; - cciInfo?: CircleCIJobDetails; createTime: Date; }; @@ -103,14 +86,12 @@ type AppSyncApiInfo = { apiId: string; name: string; region: string; - cciInfo?: CircleCIJobDetails; }; type ReportEntry = { jobId?: string; workflowId?: string; lifecycle?: string; - cciJobDetails?: CircleCIJobDetails; amplifyApps: AmplifyAppInfo[]; stacks: StackInfo[]; buckets: Record; @@ -261,6 +242,23 @@ const getOrphanAppSyncApis = async (account: AWSAccountInfo, region: string): Pr return staleApis.map((it) => ({ apiId: it.apiId, name: it.name, region })); }; +/** + * Get all OIDC providers in the account that match + */ +const deleteOrphanedOidcProviders = async (account: AWSAccountInfo): Promise => { + const iamClient = new aws.IAM(getAWSConfig(account)); + const response = await iamClient.listOpenIDConnectProviders().promise(); + if (response.OpenIDConnectProviderList) { + for (const provider of response.OpenIDConnectProviderList) { + // these seem to be the only offending resources at this time, but we can add more later + if (provider.Arn.endsWith('oidc-provider/accounts.google.com')) { + console.log('OIDC PROVIDER:', provider.Arn); + await iamClient.deleteOpenIDConnectProvider({ OpenIDConnectProviderArn: provider.Arn }).promise(); + } + } + } +}; + /** * Get the relevant AWS config object for a given account and region. */ @@ -282,9 +280,6 @@ const getAWSConfig = ({ accessKeyId, secretAccessKey, sessionToken }: AWSAccount * @returns Promise a list of Amplify Apps in the region with build info */ const getAmplifyApps = async (account: AWSAccountInfo, region: string): Promise => { - if (region === 'us-east-1' && account.parent) { - return []; // temporarily disabled until us-east-1 is re-enabled for this account - } const amplifyClient = new aws.Amplify(getAWSConfig(account, region)); try { const amplifyApps = await amplifyClient.listApps({ maxResults: 25 }).promise(); // keeping it to 25 as max supported is 25 @@ -352,14 +347,12 @@ const getStackDetails = async (stackName: string, account: AWSAccountInfo, regio (r) => r.LogicalResourceId, ); } - const jobId = getJobId(tags); return { stackName, stackStatus, resourcesFailedToDelete, region, tags: tags.reduce((acc, tag) => ({ ...acc, [tag.Key]: tag.Value }), {}), - cciInfo: jobId && (await getJobCircleCIDetails(jobId)), }; }; @@ -401,10 +394,11 @@ const getStacks = async (account: AWSAccountInfo, region: string): Promise { const isRoot = !stack.RootId; - if (!isStale(stack.CreationTime)) { + const isStackStale = isStale(stack.CreationTime); + if (!isStackStale) { console.log('Skipping stack because created date is:', stack.CreationTime); } - return isRoot && isStale; + return isRoot && isStackStale; }); if (rootStacks.length > DELETE_LIMITS.PER_REGION.CFN_STACK) { // we can only delete 100 stacks accross all regions every batch, @@ -426,37 +420,6 @@ const getStacks = async (account: AWSAccountInfo, region: string): Promise { - const options: CircleCIOptions = { - token: process.env.CIRCLECI_TOKEN, - vcs: { - repo: process.env.CIRCLE_PROJECT_REPONAME, - owner: process.env.CIRCLE_PROJECT_USERNAME, - type: GitType.GITHUB, - }, - }; - return new CircleCI(options); -}; - -const getJobCircleCIDetails = async (jobId: number): Promise => { - const client = getCircleCIClient(); - const result = await client.build(jobId); - - const r = _.pick(result, [ - 'build_url', - 'branch', - 'build_num', - 'outcome', - 'canceled', - 'infrastructure_fail', - 'status', - 'committer_name', - 'workflows.workflow_id', - 'lifecycle', - ]) as unknown as CircleCIJobDetails; - return r; -}; - const getS3Buckets = async (account: AWSAccountInfo): Promise => { const s3Client = new aws.S3(getAWSConfig(account)); const buckets = await s3Client.listBuckets().promise(); @@ -468,7 +431,6 @@ const getS3Buckets = async (account: AWSAccountInfo): Promise => if (jobId) { result.push({ name: bucket.Name, - cciInfo: await getJobCircleCIDetails(jobId), createTime: bucket.CreationDate, }); } @@ -989,6 +951,7 @@ const cleanupAccount = async (account: AWSAccountInfo, accountIndex: number, fil generateReport(staleResources); await deleteResources(account, accountIndex, staleResources); + await deleteOrphanedOidcProviders(account); console.log(`[ACCOUNT ${accountIndex}] Cleanup done!`); }; diff --git a/packages/amplify-e2e-tests/src/configure_tests.ts b/packages/amplify-e2e-tests/src/configure_tests.ts index 0141f728485..dc4e6ce37dc 100644 --- a/packages/amplify-e2e-tests/src/configure_tests.ts +++ b/packages/amplify-e2e-tests/src/configure_tests.ts @@ -8,7 +8,7 @@ async function setupAmplify() { if (!AWS_ACCESS_KEY_ID || !AWS_SECRET_ACCESS_KEY || !REGION) { throw new Error('Please set AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and CLI_REGION in .env'); } - await configure({ + await configure(null, { accessKeyId: AWS_ACCESS_KEY_ID, secretAccessKey: AWS_SECRET_ACCESS_KEY, profileName: 'amplify-integ-test-user', diff --git a/packages/amplify-e2e-tests/src/cypress/uibuilder/uibuilder-spec.js b/packages/amplify-e2e-tests/src/cypress/uibuilder/uibuilder-spec.js index f9c7c8d0996..1fd238f4f25 100644 --- a/packages/amplify-e2e-tests/src/cypress/uibuilder/uibuilder-spec.js +++ b/packages/amplify-e2e-tests/src/cypress/uibuilder/uibuilder-spec.js @@ -1,5 +1,4 @@ describe('Assert page loads properly', () => { - /* eslint-disable-next-line jest/expect-expect */ it('Visits the page', () => { cy.visit('http://localhost:3000'); cy.get('.amplify-input').first().type('fake@email.com').should('have.value', 'fake@email.com'); diff --git a/packages/amplify-e2e-tests/src/import-helpers/settings.ts b/packages/amplify-e2e-tests/src/import-helpers/settings.ts index a71ebb1cb01..5cad6cb64e3 100644 --- a/packages/amplify-e2e-tests/src/import-helpers/settings.ts +++ b/packages/amplify-e2e-tests/src/import-helpers/settings.ts @@ -1,9 +1,9 @@ import { - AddAuthUserPoolOnlyWithOAuthSettings, AddAuthUserPoolOnlyNoOAuthSettings, AddAuthIdentityPoolAndUserPoolWithOAuthSettings, AddStorageSettings, AddDynamoDBSettings, + createUserPoolOnlyWithOAuthSettings, } from '@aws-amplify/amplify-e2e-core'; export const createNoOAuthSettings = (projectPrefix: string, shortId: string): AddAuthUserPoolOnlyNoOAuthSettings => { @@ -13,29 +13,6 @@ export const createNoOAuthSettings = (projectPrefix: string, shortId: string): A }; }; -export const createUserPoolOnlyWithOAuthSettings = (projectPrefix: string, shortId: string): AddAuthUserPoolOnlyWithOAuthSettings => { - return { - resourceName: `${projectPrefix}oares${shortId}`, - userPoolName: `${projectPrefix}oaup${shortId}`, - domainPrefix: `${projectPrefix}oadom${shortId}`, - signInUrl1: 'https://sin1/', - signInUrl2: 'https://sin2/', - signOutUrl1: 'https://sout1/', - signOutUrl2: 'https://sout2/', - facebookAppId: 'facebookAppId', - facebookAppSecret: 'facebookAppSecret', - googleAppId: 'googleAppId', - googleAppSecret: 'googleAppSecret', - amazonAppId: 'amazonAppId', - amazonAppSecret: 'amazonAppSecret', - appleAppClientId: 'com.fake.app', - appleAppTeamId: '2QLEWNDK6K', - appleAppKeyID: '2QLZXKYJ8J', - appleAppPrivateKey: - '----BEGIN PRIVATE KEY----MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgIltgNsTgTfSzUadYiCS0VYtDDMFln/J8i1yJsSIw5g+gCgYIKoZIzj0DAQehRANCAASI8E0L/DhR/mIfTT07v3VwQu6q8I76lgn7kFhT0HvWoLuHKGQFcFkXXCgztgBrprzd419mUChAnKE6y89bWcNw----END PRIVATE KEY----', - }; -}; - export const createIDPAndUserPoolWithOAuthSettings = ( projectPrefix: string, shortId: string, diff --git a/packages/amplify-e2e-tests/src/import-helpers/utilities.ts b/packages/amplify-e2e-tests/src/import-helpers/utilities.ts index 097caf039cd..17507102d02 100644 --- a/packages/amplify-e2e-tests/src/import-helpers/utilities.ts +++ b/packages/amplify-e2e-tests/src/import-helpers/utilities.ts @@ -3,6 +3,7 @@ import { addAuthIdentityPoolAndUserPoolWithOAuth, addAuthUserPoolOnlyWithOAuth, amplifyPushAuth, + createUserPoolOnlyWithOAuthSettings, getBackendAmplifyMeta, getProjectMeta, getTeamProviderInfo, @@ -13,7 +14,7 @@ import _ from 'lodash'; import * as path from 'path'; import { v4 as uuid } from 'uuid'; // eslint-disable-next-line import/no-cycle -import { AuthProjectDetails, createIDPAndUserPoolWithOAuthSettings, createUserPoolOnlyWithOAuthSettings, StorageProjectDetails } from '.'; +import { AuthProjectDetails, createIDPAndUserPoolWithOAuthSettings, StorageProjectDetails } from '.'; import { AppClientSettings, DynamoDBProjectDetails } from './types'; export const getShortId = (): string => { diff --git a/packages/amplify-e2e-tests/src/import-helpers/walkthroughs.ts b/packages/amplify-e2e-tests/src/import-helpers/walkthroughs.ts index cc73272ba58..b6dd946a5bd 100644 --- a/packages/amplify-e2e-tests/src/import-helpers/walkthroughs.ts +++ b/packages/amplify-e2e-tests/src/import-helpers/walkthroughs.ts @@ -1,5 +1,4 @@ -/* eslint-disable */ -import { getCLIPath, nspawn as spawn } from '@aws-amplify/amplify-e2e-core'; +import { getCLIPath, listUserPools, nspawn as spawn } from '@aws-amplify/amplify-e2e-core'; export const importUserPoolOnly = (cwd: string, autoCompletePrefix: string, clientNames?: { web?: string; native?: string }) => { return new Promise((resolve, reject) => { @@ -41,16 +40,25 @@ export const importUserPoolOnly = (cwd: string, autoCompletePrefix: string, clie }); }; -export const importSingleIdentityPoolAndUserPool = ( +export const importSingleIdentityPoolAndUserPool = async ( cwd: string, autoCompletePrefix: string, + region: string, clientNames?: { web?: string; native?: string }, ) => { const chain = spawn(getCLIPath(), ['auth', 'import'], { cwd, stripColors: true }) .wait('What type of auth resource do you want to import') - .sendCarriageReturn() - .wait('Only one Cognito User Pool') - .delay(500); // Some delay required for autocomplete and terminal to catch up + .sendCarriageReturn(); + + const userpools = await listUserPools(region); + + if (userpools.length > 1) { + chain.wait('Select the User Pool you want to import:').sendLine(autoCompletePrefix); + } else { + chain.wait('Only one Cognito User Pool'); + } + + chain.delay(500); // Some delay required for autocomplete and terminal to catch up if (clientNames?.web) { chain @@ -126,7 +134,7 @@ export const removeImportedAuthHeadless = async (cwd: string, authResourceName: await chain.runAsync(); }; -export const addS3WithAuthConfigurationMismatchErrorExit = (cwd: string, settings: any) => { +export const addS3WithAuthConfigurationMismatchErrorExit = (cwd: string) => { return new Promise((resolve, reject) => { spawn(getCLIPath(), ['add', 'storage'], { cwd, stripColors: true }) .wait('Select from one of the below mentioned services') @@ -155,11 +163,11 @@ export const addS3WithAuthConfigurationMismatchErrorExit = (cwd: string, setting export const headlessPullExpectError = ( projectRoot: string, - amplifyParameters: Object, - providersParameter: Object, + amplifyParameters: Record, + providersParameter: Record, errorMessage: string, - categoriesParameter?: Object, - frontendParameter?: Object, + categoriesParameter?: Record, + frontendParameter?: Record, ): Promise => { const pullCommand: string[] = [ 'pull', @@ -194,10 +202,10 @@ export const headlessPullExpectError = ( export const headlessPull = ( projectRoot: string, - amplifyParameters: Object, - providersParameter: Object, - categoriesParameter?: Object, - frontendParameter?: Object, + amplifyParameters: Record, + providersParameter: Record, + categoriesParameter?: Record, + frontendParameter?: Record, ): Promise => { const pullCommand: string[] = [ 'pull', diff --git a/packages/amplify-e2e-tests/src/init-special-cases/index.ts b/packages/amplify-e2e-tests/src/init-special-cases/index.ts index c68586c12c9..a9534d1e7f5 100644 --- a/packages/amplify-e2e-tests/src/init-special-cases/index.ts +++ b/packages/amplify-e2e-tests/src/init-special-cases/index.ts @@ -51,6 +51,10 @@ async function initWorkflow(cwd: string, settings: { accessKeyId: string; secret CLI_DEV_INTERNAL_DISABLE_AMPLIFY_APP_CREATION: '1', }, }) + .wait('Do you want to continue with Amplify Gen 1?') + .sendYes() + .wait('Why would you like to use Amplify Gen 1?') + .sendCarriageReturn() .wait('Enter a name for the project') .sendCarriageReturn() .wait('Initialize the project with the above configuration?') @@ -85,7 +89,7 @@ async function initWorkflow(cwd: string, settings: { accessKeyId: string; secret singleSelect(chain, settings.region, amplifyRegions); chain - .wait('Help improve Amplify CLI by sharing non sensitive configurations on failures') + .wait('Help improve Amplify CLI by sharing non-sensitive project configurations on failures') .sendYes() .wait(/Try "amplify add api" to create a backend API and then "amplify (push|publish)" to deploy everything/) .run((err: Error) => { diff --git a/packages/amplify-e2e-tests/src/schema-api-directives/common.ts b/packages/amplify-e2e-tests/src/schema-api-directives/common.ts index 27bad5969cb..ea62dc95d13 100644 --- a/packages/amplify-e2e-tests/src/schema-api-directives/common.ts +++ b/packages/amplify-e2e-tests/src/schema-api-directives/common.ts @@ -1,19 +1,19 @@ /* eslint-disable */ -import path from 'path'; -import fs from 'fs-extra'; -import _ from 'lodash'; -import gql from 'graphql-tag'; -import { addApi, amplifyPush, updateAuthAddUserGroups } from '@aws-amplify/amplify-e2e-core'; - import { - setupUser, - getUserPoolId, - getApiKey, + addApi, + amplifyPush, configureAmplify, - signInUser, + getApiKey, getConfiguredAppsyncClientAPIKeyAuth, getConfiguredAppsyncClientCognitoAuth, -} from './authHelper'; + getUserPoolId, + setupUser, + signInUser, + updateAuthAddUserGroups, +} from '@aws-amplify/amplify-e2e-core'; +import fs from 'fs-extra'; +import gql from 'graphql-tag'; +import path from 'path'; const GROUPNAME = 'Admin'; const USERNAME = 'user1'; diff --git a/packages/amplify-e2e-tests/src/schema-api-directives/functionTester.ts b/packages/amplify-e2e-tests/src/schema-api-directives/functionTester.ts index 7bad2d2eb9b..b5961d65be5 100644 --- a/packages/amplify-e2e-tests/src/schema-api-directives/functionTester.ts +++ b/packages/amplify-e2e-tests/src/schema-api-directives/functionTester.ts @@ -1,11 +1,16 @@ +import { + addApi, + addFunction, + amplifyPush, + configureAmplify, + getApiKey, + getConfiguredAppsyncClientAPIKeyAuth, +} from '@aws-amplify/amplify-e2e-core'; +import fs from 'fs-extra'; import path from 'path'; import { v4 as uuid } from 'uuid'; -import fs from 'fs-extra'; -import { amplifyPush, addFunction, addApi } from '@aws-amplify/amplify-e2e-core'; - -import { configureAmplify, getApiKey, getConfiguredAppsyncClientAPIKeyAuth } from './authHelper'; -import { updateSchemaInTestProject, testQueries } from './common'; +import { testQueries, updateSchemaInTestProject } from './common'; export async function runFunctionTest(projectDir: string, testModule: any) { const functionName = await addSimpleFunction(projectDir, testModule, 'func'); diff --git a/packages/amplify-e2e-tests/src/schema-api-directives/index.ts b/packages/amplify-e2e-tests/src/schema-api-directives/index.ts index d54d6b03b70..46525823935 100644 --- a/packages/amplify-e2e-tests/src/schema-api-directives/index.ts +++ b/packages/amplify-e2e-tests/src/schema-api-directives/index.ts @@ -53,5 +53,3 @@ export async function testSchema(projectDir: string, directive: string, section: return false; } } - -export * from './authHelper'; diff --git a/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-customClaims.ts b/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-customClaims.ts index 05284a4c972..e0f77a4c709 100644 --- a/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-customClaims.ts +++ b/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-customClaims.ts @@ -1,15 +1,18 @@ -import path from 'path'; -import fs from 'fs-extra'; import { - addAuthWithPreTokenGenerationTrigger, addApiWithCognitoUserPoolAuthTypeWhenAuthExists, - updateAuthAddUserGroups, + addAuthWithPreTokenGenerationTrigger, amplifyPush, + configureAmplify, + getConfiguredAppsyncClientCognitoAuth, + getUserPoolId, + setupUser, + signInUser, + updateAuthAddUserGroups, } from '@aws-amplify/amplify-e2e-core'; +import fs from 'fs-extra'; +import path from 'path'; -import { getUserPoolId, configureAmplify, setupUser, signInUser, getConfiguredAppsyncClientCognitoAuth } from '../authHelper'; - -import { updateSchemaInTestProject, testMutation } from '../common'; +import { testMutation, updateSchemaInTestProject } from '../common'; const GROUPNAME = 'Moderator'; const USERNAME = 'user1'; diff --git a/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-customClaims2.ts b/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-customClaims2.ts index da576eaf21f..9ddfefb94e8 100644 --- a/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-customClaims2.ts +++ b/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-customClaims2.ts @@ -1,16 +1,18 @@ /* eslint-disable */ -import path from 'path'; -import fs from 'fs-extra'; import { - addAuthWithPreTokenGenerationTrigger, addApiWithCognitoUserPoolAuthTypeWhenAuthExists, - updateAuthAddUserGroups, + addAuthWithPreTokenGenerationTrigger, amplifyPush, + configureAmplify, + getConfiguredAppsyncClientCognitoAuth, + getUserPoolId, + setupUser, + signInUser, + updateAuthAddUserGroups, } from '@aws-amplify/amplify-e2e-core'; - -import { getUserPoolId, configureAmplify, setupUser, signInUser, getConfiguredAppsyncClientCognitoAuth } from '../authHelper'; - -import { updateSchemaInTestProject, testMutation } from '../common'; +import fs from 'fs-extra'; +import path from 'path'; +import { testMutation, updateSchemaInTestProject } from '../common'; const GROUPNAME = 'Moderator'; const USERNAME = 'user1'; diff --git a/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-owner10.ts b/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-owner10.ts index f01eadd814f..44eb16c1878 100644 --- a/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-owner10.ts +++ b/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-owner10.ts @@ -1,8 +1,16 @@ /* eslint-disable */ -import { addApi, amplifyPush, updateAuthAddUserGroups, getAwsIOSConfig } from '@aws-amplify/amplify-e2e-core'; -import Amplify from 'aws-amplify'; -import { signInUser, getConfiguredAppsyncClientCognitoAuth, setupUser, getUserPoolId } from '../authHelper'; -import { updateSchemaInTestProject, testMutations, testQueries, testSubscriptions } from '../common'; +import { + addApi, + amplifyPush, + getAwsIOSConfig, + getConfiguredAppsyncClientCognitoAuth, + getUserPoolId, + setupUser, + signInUser, + updateAuthAddUserGroups, +} from '@aws-amplify/amplify-e2e-core'; +import { Amplify } from 'aws-amplify'; +import { testMutations, testQueries, testSubscriptions, updateSchemaInTestProject } from '../common'; const GROUPNAME = 'Admin'; const USERNAME = 'user1'; diff --git a/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-owner11.ts b/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-owner11.ts index 4305b85bab9..ab0514573f8 100644 --- a/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-owner11.ts +++ b/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-owner11.ts @@ -1,8 +1,16 @@ /* eslint-disable */ -import { addApi, amplifyPushWithoutCodegen, updateAuthAddUserGroups, getAmplifyFlutterConfig } from '@aws-amplify/amplify-e2e-core'; -import { signInUser, getConfiguredAppsyncClientCognitoAuth, setupUser, getUserPoolId } from '../authHelper'; -import { updateSchemaInTestProject, testMutations, testQueries, testSubscriptions } from '../common'; -import Amplify from 'aws-amplify'; +import { + addApi, + amplifyPushWithoutCodegen, + getAmplifyFlutterConfig, + getConfiguredAppsyncClientCognitoAuth, + getUserPoolId, + setupUser, + signInUser, + updateAuthAddUserGroups, +} from '@aws-amplify/amplify-e2e-core'; +import { Amplify } from 'aws-amplify'; +import { testMutations, testQueries, testSubscriptions, updateSchemaInTestProject } from '../common'; const GROUPNAME = 'Admin'; const USERNAME = 'user1'; diff --git a/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-owner8.ts b/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-owner8.ts index e6d4c02e9c7..7733a9a1488 100644 --- a/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-owner8.ts +++ b/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-owner8.ts @@ -1,7 +1,15 @@ /* eslint-disable */ -import { addApi, amplifyPush, updateAuthAddUserGroups } from '@aws-amplify/amplify-e2e-core'; -import { setupUser, getUserPoolId, configureAmplify, signInUser, getConfiguredAppsyncClientCognitoAuth } from '../authHelper'; -import { updateSchemaInTestProject, testMutations, testQueries, testSubscriptions } from '../common'; +import { + addApi, + amplifyPush, + configureAmplify, + getConfiguredAppsyncClientCognitoAuth, + getUserPoolId, + setupUser, + signInUser, + updateAuthAddUserGroups, +} from '@aws-amplify/amplify-e2e-core'; +import { testMutations, testQueries, testSubscriptions, updateSchemaInTestProject } from '../common'; const GROUPNAME = 'Admin'; const USERNAME = 'user1'; diff --git a/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-owner9.ts b/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-owner9.ts index 475d5a9882a..9413416fd91 100644 --- a/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-owner9.ts +++ b/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-owner9.ts @@ -1,8 +1,16 @@ /* eslint-disable */ -import { addApi, amplifyPush, updateAuthAddUserGroups, getAwsAndroidConfig } from '@aws-amplify/amplify-e2e-core'; -import Amplify from 'aws-amplify'; -import { signInUser, getConfiguredAppsyncClientCognitoAuth, setupUser, getUserPoolId } from '../authHelper'; -import { updateSchemaInTestProject, testMutations, testQueries, testSubscriptions } from '../common'; +import { + addApi, + amplifyPush, + getAwsAndroidConfig, + getConfiguredAppsyncClientCognitoAuth, + getUserPoolId, + setupUser, + signInUser, + updateAuthAddUserGroups, +} from '@aws-amplify/amplify-e2e-core'; +import { Amplify } from 'aws-amplify'; +import { testMutations, testQueries, testSubscriptions, updateSchemaInTestProject } from '../common'; const GROUPNAME = 'Admin'; const USERNAME = 'user1'; diff --git a/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-private2.ts b/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-private2.ts index 2683200fe7e..655190a07bf 100644 --- a/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-private2.ts +++ b/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-private2.ts @@ -1,6 +1,4 @@ -import { addApi, amplifyPush } from '@aws-amplify/amplify-e2e-core'; - -import { configureAmplify, getConfiguredAppsyncClientIAMAuth } from '../authHelper'; +import { addApi, amplifyPush, configureAmplify, getConfiguredAppsyncClientIAMAuth } from '@aws-amplify/amplify-e2e-core'; import { updateSchemaInTestProject, testMutations, testQueries } from '../common'; diff --git a/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-public1.ts b/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-public1.ts index 9e31ec5906b..63def200827 100644 --- a/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-public1.ts +++ b/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-public1.ts @@ -1,8 +1,6 @@ -import { addApi, amplifyPush } from '@aws-amplify/amplify-e2e-core'; +import { addApi, amplifyPush, configureAmplify, getApiKey, getConfiguredAppsyncClientAPIKeyAuth } from '@aws-amplify/amplify-e2e-core'; -import { getApiKey, configureAmplify, getConfiguredAppsyncClientAPIKeyAuth } from '../authHelper'; - -import { updateSchemaInTestProject, testMutations, testQueries } from '../common'; +import { testMutations, testQueries, updateSchemaInTestProject } from '../common'; export async function runTest(projectDir: string, testModule: any) { await addApi(projectDir, { transformerVersion: 1 }); diff --git a/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-public2.ts b/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-public2.ts index 773e8374b69..bc7460de01f 100644 --- a/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-public2.ts +++ b/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-public2.ts @@ -1,6 +1,4 @@ -import { addApi, amplifyPush } from '@aws-amplify/amplify-e2e-core'; - -import { configureAmplify, getConfiguredAppsyncClientIAMAuth } from '../authHelper'; +import { addApi, amplifyPush, configureAmplify, getConfiguredAppsyncClientIAMAuth } from '@aws-amplify/amplify-e2e-core'; import { updateSchemaInTestProject, testMutations, testQueries } from '../common'; diff --git a/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-usingOidc.ts b/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-usingOidc.ts index 81f33029e2e..903a845762b 100644 --- a/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-usingOidc.ts +++ b/packages/amplify-e2e-tests/src/schema-api-directives/tests/auth-usingOidc.ts @@ -1,17 +1,20 @@ -import { addAuthWithDefault, amplifyPushWithoutCodegen, addApi, updateAuthAddUserGroups, amplifyPush } from '@aws-amplify/amplify-e2e-core'; - import { + addApi, + addAuthWithDefault, + amplifyPush, + amplifyPushWithoutCodegen, + configureAmplify, getAppClientIDWeb, + getConfiguredAppsyncClientIAMAuth, + getConfiguredAppsyncClientOIDCAuth, getUserPoolId, - configureAmplify, getUserPoolIssUrl, setupUser, signInUser, - getConfiguredAppsyncClientIAMAuth, - getConfiguredAppsyncClientOIDCAuth, -} from '../authHelper'; + updateAuthAddUserGroups, +} from '@aws-amplify/amplify-e2e-core'; -import { updateSchemaInTestProject, testMutation } from '../common'; +import { testMutation, updateSchemaInTestProject } from '../common'; const GROUPNAME = 'Admin'; const USERNAME = 'user1'; diff --git a/packages/amplify-e2e-tests/src/schema-api-directives/tests/function-chaining.ts b/packages/amplify-e2e-tests/src/schema-api-directives/tests/function-chaining.ts index fa56b095b8f..095e2130908 100644 --- a/packages/amplify-e2e-tests/src/schema-api-directives/tests/function-chaining.ts +++ b/packages/amplify-e2e-tests/src/schema-api-directives/tests/function-chaining.ts @@ -1,8 +1,6 @@ -import { addApi, amplifyPush } from '@aws-amplify/amplify-e2e-core'; +import { addApi, amplifyPush, configureAmplify, getApiKey, getConfiguredAppsyncClientAPIKeyAuth } from '@aws-amplify/amplify-e2e-core'; -import { getApiKey, configureAmplify, getConfiguredAppsyncClientAPIKeyAuth } from '../authHelper'; - -import { updateSchemaInTestProject, testQueries } from '../common'; +import { testQueries, updateSchemaInTestProject } from '../common'; import { addSimpleFunction, updateFunctionNameInSchema } from '../functionTester'; diff --git a/packages/amplify-e2e-tests/src/schema-api-directives/tests/function-differentRegion.ts b/packages/amplify-e2e-tests/src/schema-api-directives/tests/function-differentRegion.ts index 3fb4f58b313..c620a37a415 100644 --- a/packages/amplify-e2e-tests/src/schema-api-directives/tests/function-differentRegion.ts +++ b/packages/amplify-e2e-tests/src/schema-api-directives/tests/function-differentRegion.ts @@ -1,21 +1,22 @@ //special handling needed becasue we need to set up the function in a differnt region -import path from 'path'; import fs from 'fs-extra'; +import path from 'path'; import { - getProjectMeta, - deleteProject, - deleteProjectDir, addApi, + addFunction, amplifyPush, amplifyPushWithoutCodegen, - addFunction, + configureAmplify, + deleteProject, + deleteProjectDir, + getApiKey, + getConfiguredAppsyncClientAPIKeyAuth, + getProjectMeta, initProjectWithAccessKey, } from '@aws-amplify/amplify-e2e-core'; -import { getApiKey, configureAmplify, getConfiguredAppsyncClientAPIKeyAuth } from '../authHelper'; - -import { updateSchemaInTestProject, testQueries } from '../common'; +import { testQueries, updateSchemaInTestProject } from '../common'; import { randomizedFunctionName } from '../functionTester'; diff --git a/packages/amplify-e2e-tests/src/schema-api-directives/tests/function-example2.ts b/packages/amplify-e2e-tests/src/schema-api-directives/tests/function-example2.ts index 664ed78d4a5..87a53f5039a 100644 --- a/packages/amplify-e2e-tests/src/schema-api-directives/tests/function-example2.ts +++ b/packages/amplify-e2e-tests/src/schema-api-directives/tests/function-example2.ts @@ -1,26 +1,23 @@ //special handling needed becasue we need to set up the function in a differnt region -import path from 'path'; -import fs from 'fs-extra'; import { - amplifyPush, - addFunction, addApiWithCognitoUserPoolAuthTypeWhenAuthExists, - updateAuthAddUserGroups, addAuthWithDefault, -} from '@aws-amplify/amplify-e2e-core'; - -import { updateFunctionNameInSchema } from '../functionTester'; - -import { + addFunction, + amplifyPush, configureAmplify, - getUserPoolId, getCognitoResourceName, + getConfiguredAppsyncClientCognitoAuth, + getUserPoolId, setupUser, signInUser, - getConfiguredAppsyncClientCognitoAuth, -} from '../authHelper'; + updateAuthAddUserGroups, +} from '@aws-amplify/amplify-e2e-core'; +import fs from 'fs-extra'; +import path from 'path'; + +import { updateFunctionNameInSchema } from '../functionTester'; -import { updateSchemaInTestProject, testQueries } from '../common'; +import { testQueries, updateSchemaInTestProject } from '../common'; import { randomizedFunctionName } from '../functionTester'; diff --git a/packages/amplify-e2e-tests/src/schema-api-directives/tests/key-howTo4.ts b/packages/amplify-e2e-tests/src/schema-api-directives/tests/key-howTo4.ts index 961e5a45470..1cb6b7fd4a2 100644 --- a/packages/amplify-e2e-tests/src/schema-api-directives/tests/key-howTo4.ts +++ b/packages/amplify-e2e-tests/src/schema-api-directives/tests/key-howTo4.ts @@ -1,6 +1,12 @@ -import { addApiWithBlankSchemaAndConflictDetection, amplifyPush, updateApiSchema } from '@aws-amplify/amplify-e2e-core'; -import { getApiKey, configureAmplify, getConfiguredAppsyncClientAPIKeyAuth } from '../authHelper'; -import { testQueries, testMutations } from '../common'; +import { + addApiWithBlankSchemaAndConflictDetection, + amplifyPush, + configureAmplify, + getApiKey, + getConfiguredAppsyncClientAPIKeyAuth, + updateApiSchema, +} from '@aws-amplify/amplify-e2e-core'; +import { testMutations, testQueries } from '../common'; //schema export const schemaName = 'selective_sync.graphql'; diff --git a/packages/amplify-e2e-tests/src/schema-api-directives/tests/predictions-usage.ts b/packages/amplify-e2e-tests/src/schema-api-directives/tests/predictions-usage.ts index 46a98c81aab..1464ce8b61b 100644 --- a/packages/amplify-e2e-tests/src/schema-api-directives/tests/predictions-usage.ts +++ b/packages/amplify-e2e-tests/src/schema-api-directives/tests/predictions-usage.ts @@ -1,9 +1,16 @@ //special handling needed to test prediction //This test will faile due to a possible AppSync bug, see details below the test code +import { + addApi, + addAuthWithDefault, + addS3Storage, + amplifyPush, + configureAmplify, + getApiKey, + getConfiguredAppsyncClientAPIKeyAuth, +} from '@aws-amplify/amplify-e2e-core'; import gql from 'graphql-tag'; -import { addAuthWithDefault, addS3Storage, addApi, amplifyPush } from '@aws-amplify/amplify-e2e-core'; -import { getApiKey, configureAmplify, getConfiguredAppsyncClientAPIKeyAuth } from '../authHelper'; import { updateSchemaInTestProject } from '../common'; export async function runTest(projectDir: string, testModule: any) { diff --git a/packages/amplify-e2e-tests/src/schema-api-directives/tests/searchable-usage.ts b/packages/amplify-e2e-tests/src/schema-api-directives/tests/searchable-usage.ts index 27228a2e297..e3dbaf8646b 100644 --- a/packages/amplify-e2e-tests/src/schema-api-directives/tests/searchable-usage.ts +++ b/packages/amplify-e2e-tests/src/schema-api-directives/tests/searchable-usage.ts @@ -1,8 +1,6 @@ -import { addApi, amplifyPush } from '@aws-amplify/amplify-e2e-core'; +import { addApi, amplifyPush, configureAmplify, getApiKey, getConfiguredAppsyncClientAPIKeyAuth } from '@aws-amplify/amplify-e2e-core'; -import { getApiKey, configureAmplify, getConfiguredAppsyncClientAPIKeyAuth } from '../authHelper'; - -import { updateSchemaInTestProject, testMutations, testQueries } from '../common'; +import { testMutations, testQueries, updateSchemaInTestProject } from '../common'; export async function runTest(projectDir: string, testModule: any) { await addApi(projectDir, { transformerVersion: 1 }); diff --git a/packages/amplify-e2e-tests/src/setup-tests.ts b/packages/amplify-e2e-tests/src/setup-tests.ts index 490f8becf67..ab3a190663b 100644 --- a/packages/amplify-e2e-tests/src/setup-tests.ts +++ b/packages/amplify-e2e-tests/src/setup-tests.ts @@ -1,4 +1,4 @@ -import { toBeIAMRoleWithArn, toHaveValidPolicyConditionMatchingIdpId, toBeAS3Bucket } from './aws-matchers'; +import { toBeIAMRoleWithArn, toHaveValidPolicyConditionMatchingIdpId, toBeAS3Bucket, toHaveDenyAssumeRolePolicy } from './aws-matchers'; const removeYarnPaths = () => { // Remove yarn's temporary PATH modifications as they affect the yarn version used by jest tests when building the lambda functions @@ -9,6 +9,7 @@ const removeYarnPaths = () => { expect.extend({ toBeIAMRoleWithArn }); expect.extend({ toHaveValidPolicyConditionMatchingIdpId }); +expect.extend({ toHaveDenyAssumeRolePolicy }); expect.extend({ toBeAS3Bucket }); removeYarnPaths(); @@ -18,3 +19,13 @@ jest.setTimeout(JEST_TIMEOUT); if (process.env.CIRCLECI) { jest.retryTimes(1); } + +beforeEach(async () => { + if (process.env.CLI_REGION) { + console.log(`CLI_REGION set to: ${process.env.CLI_REGION}. Overwriting AWS_REGION and AWS_DEFAULT_REGION`); + process.env.AWS_REGION = process.env.CLI_REGION; + process.env.AWS_DEFAULT_REGION = process.env.CLI_REGION; + } else { + console.log('No CLI_REGION variable found'); + } +}); diff --git a/packages/amplify-e2e-tests/typings/aws-matchers.d.ts b/packages/amplify-e2e-tests/typings/aws-matchers.d.ts index f9f835f7448..f06dc761f74 100644 --- a/packages/amplify-e2e-tests/typings/aws-matchers.d.ts +++ b/packages/amplify-e2e-tests/typings/aws-matchers.d.ts @@ -1,7 +1,10 @@ +// eslint-disable-next-line @typescript-eslint/no-unused-vars namespace jest { + // eslint-disable-next-line @typescript-eslint/no-unused-vars interface Matchers { toBeIAMRoleWithArn(roleName: string, arn?: string): R; toBeAS3Bucket(bucketName: string): R; toHaveValidPolicyConditionMatchingIdpId(idpId: string): R; + toHaveDenyAssumeRolePolicy(): R; } } diff --git a/packages/amplify-environment-parameters/.npmignore b/packages/amplify-environment-parameters/.npmignore new file mode 100644 index 00000000000..2c166892c41 --- /dev/null +++ b/packages/amplify-environment-parameters/.npmignore @@ -0,0 +1,4 @@ +**/__tests__/** +src +tsconfig.json +tsconfig.tsbuildinfo diff --git a/packages/amplify-environment-parameters/CHANGELOG.md b/packages/amplify-environment-parameters/CHANGELOG.md index dedfa9e21cc..14abfca2375 100644 --- a/packages/amplify-environment-parameters/CHANGELOG.md +++ b/packages/amplify-environment-parameters/CHANGELOG.md @@ -3,6 +3,237 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.9.16](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-environment-parameters@1.9.15...@aws-amplify/amplify-environment-parameters@1.9.16) (2025-01-30) + +**Note:** Version bump only for package @aws-amplify/amplify-environment-parameters + + + + + +## [1.9.15](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-environment-parameters@1.9.14...@aws-amplify/amplify-environment-parameters@1.9.15) (2024-08-02) + +**Note:** Version bump only for package @aws-amplify/amplify-environment-parameters + + + + + +## [1.9.14](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-environment-parameters@1.9.13...@aws-amplify/amplify-environment-parameters@1.9.14) (2024-06-27) + +**Note:** Version bump only for package @aws-amplify/amplify-environment-parameters + + + + + +## [1.9.13](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-environment-parameters@1.9.12...@aws-amplify/amplify-environment-parameters@1.9.13) (2024-06-20) + +**Note:** Version bump only for package @aws-amplify/amplify-environment-parameters + + + + + +## [1.9.12](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-environment-parameters@1.9.11...@aws-amplify/amplify-environment-parameters@1.9.12) (2024-06-06) + +**Note:** Version bump only for package @aws-amplify/amplify-environment-parameters + + + + + +## [1.9.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-environment-parameters@1.9.10...@aws-amplify/amplify-environment-parameters@1.9.11) (2024-05-24) + +**Note:** Version bump only for package @aws-amplify/amplify-environment-parameters + + + + + +## [1.9.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-environment-parameters@1.9.9...@aws-amplify/amplify-environment-parameters@1.9.10) (2024-05-07) + +**Note:** Version bump only for package @aws-amplify/amplify-environment-parameters + + + + + +## [1.9.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-environment-parameters@1.9.8...@aws-amplify/amplify-environment-parameters@1.9.9) (2024-04-18) + +**Note:** Version bump only for package @aws-amplify/amplify-environment-parameters + + + + + +## [1.9.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-environment-parameters@1.9.7...@aws-amplify/amplify-environment-parameters@1.9.8) (2024-04-15) + +**Note:** Version bump only for package @aws-amplify/amplify-environment-parameters + + + + + +## [1.9.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-environment-parameters@1.9.6...@aws-amplify/amplify-environment-parameters@1.9.7) (2024-03-29) + +**Note:** Version bump only for package @aws-amplify/amplify-environment-parameters + + + + + +## [1.9.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-environment-parameters@1.9.5...@aws-amplify/amplify-environment-parameters@1.9.6) (2024-03-06) + +**Note:** Version bump only for package @aws-amplify/amplify-environment-parameters + + + + + +## [1.9.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-environment-parameters@1.9.4...@aws-amplify/amplify-environment-parameters@1.9.5) (2023-12-11) + +**Note:** Version bump only for package @aws-amplify/amplify-environment-parameters + + + + + +## [1.9.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-environment-parameters@1.9.2...@aws-amplify/amplify-environment-parameters@1.9.4) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [1.9.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-environment-parameters@1.9.2...@aws-amplify/amplify-environment-parameters@1.9.3) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-environment-parameters + + + + + +## [1.9.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-environment-parameters@1.9.1...@aws-amplify/amplify-environment-parameters@1.9.2) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-environment-parameters + + + + + +## [1.9.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-environment-parameters@1.9.0...@aws-amplify/amplify-environment-parameters@1.9.1) (2023-10-12) + +**Note:** Version bump only for package @aws-amplify/amplify-environment-parameters + + + + + +# [1.9.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-environment-parameters@1.8.3...@aws-amplify/amplify-environment-parameters@1.9.0) (2023-10-05) + + +### Features + +* **amplify-util-uibuilder:** amplify js backwards compatibility ([#13288](https://github.com/aws-amplify/amplify-cli/issues/13288)) ([2db3e18](https://github.com/aws-amplify/amplify-cli/commit/2db3e181cf06954085eb8fade0b26162672327db)) + + + + + +## [1.8.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-environment-parameters@1.8.2...@aws-amplify/amplify-environment-parameters@1.8.3) (2023-10-03) + +**Note:** Version bump only for package @aws-amplify/amplify-environment-parameters + + + + + +## [1.8.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-environment-parameters@1.8.1...@aws-amplify/amplify-environment-parameters@1.8.2) (2023-09-22) + +**Note:** Version bump only for package @aws-amplify/amplify-environment-parameters + + + + + +## [1.8.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-environment-parameters@1.8.0...@aws-amplify/amplify-environment-parameters@1.8.1) (2023-08-31) + + +### Bug Fixes + +* exclude tests from publish ([#13153](https://github.com/aws-amplify/amplify-cli/issues/13153)) ([1b1fe09](https://github.com/aws-amplify/amplify-cli/commit/1b1fe09a1c08be0262a1013f71354abd7160722a)) + + + + + +# [1.8.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-environment-parameters@1.7.4...@aws-amplify/amplify-environment-parameters@1.8.0) (2023-08-17) + + +### Features + +* generate components using graphql ([1568581](https://github.com/aws-amplify/amplify-cli/commit/15685810460881aa71e88724398b9be05ba53781)) + + + + + +## [1.7.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-environment-parameters@1.7.3...@aws-amplify/amplify-environment-parameters@1.7.4) (2023-08-09) + +**Note:** Version bump only for package @aws-amplify/amplify-environment-parameters + + + + + +## [1.7.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-environment-parameters@1.7.2...@aws-amplify/amplify-environment-parameters@1.7.3) (2023-07-28) + +**Note:** Version bump only for package @aws-amplify/amplify-environment-parameters + + + + + +## [1.7.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-environment-parameters@1.7.1...@aws-amplify/amplify-environment-parameters@1.7.2) (2023-07-27) + +**Note:** Version bump only for package @aws-amplify/amplify-environment-parameters + + + + + +## [1.7.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-environment-parameters@1.7.0...@aws-amplify/amplify-environment-parameters@1.7.1) (2023-07-24) + +**Note:** Version bump only for package @aws-amplify/amplify-environment-parameters + + + + + +# [1.7.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-environment-parameters@1.6.4...@aws-amplify/amplify-environment-parameters@1.7.0) (2023-07-20) + + +### Features + +* uibuilder codegen service ([#12896](https://github.com/aws-amplify/amplify-cli/issues/12896)) ([3fe2f98](https://github.com/aws-amplify/amplify-cli/commit/3fe2f98a99a9daf22efccb23a031882ea2be899b)) + + + + + +## [1.6.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-environment-parameters@1.6.3...@aws-amplify/amplify-environment-parameters@1.6.4) (2023-06-13) + +**Note:** Version bump only for package @aws-amplify/amplify-environment-parameters + + + + + ## [1.6.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-environment-parameters@1.6.1...@aws-amplify/amplify-environment-parameters@1.6.3) (2023-05-25) diff --git a/packages/amplify-environment-parameters/package.json b/packages/amplify-environment-parameters/package.json index d96a579879f..73860dab87b 100644 --- a/packages/amplify-environment-parameters/package.json +++ b/packages/amplify-environment-parameters/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-environment-parameters", - "version": "1.6.3", + "version": "1.9.16", "description": "Amplify CLI environment parameter manager", "repository": { "type": "git", @@ -27,12 +27,12 @@ "generate-schemas": "mkdirp lib/schemas src/schemas && ts-json-schema-generator --path src/backend-parameters.d.ts --type BackendParameters --no-type-check --out lib/schemas/BackendParameters.schema.json && copyfiles --flat lib/schemas/BackendParameters.schema.json src/schemas" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.0.8", + "@aws-amplify/amplify-cli-core": "4.3.11", "ajv": "^6.12.6", "lodash": "^4.17.21" }, "devDependencies": { - "aws-sdk": "^2.1354.0", + "aws-sdk": "^2.1464.0", "mkdirp": "^1.0.4", "ts-json-schema-generator": "~1.1.2" }, diff --git a/packages/amplify-environment-parameters/src/__tests__/backend-config-parameters-controller.test.ts b/packages/amplify-environment-parameters/src/__tests__/backend-config-parameters-controller.test.ts index 424a221d869..0d82f6f520b 100644 --- a/packages/amplify-environment-parameters/src/__tests__/backend-config-parameters-controller.test.ts +++ b/packages/amplify-environment-parameters/src/__tests__/backend-config-parameters-controller.test.ts @@ -29,7 +29,7 @@ describe('BackendConfigParameterMapController', () => { beforeEach(() => { jest.clearAllMocks(); - jest.isolateModules(async () => { + jest.isolateModules(() => { // eslint-disable-next-line global-require, @typescript-eslint/no-var-requires const { getParametersControllerInstance } = require('../backend-config-parameters-controller'); backendParamsController = getParametersControllerInstance(); @@ -136,7 +136,7 @@ describe('BackendConfigParameterMapController', () => { describe('save', () => { it('writes current parameter state to backend config', async () => { - backendParamsController.save(); + await backendParamsController.save(); expect(stateManagerMock.setBackendConfig.mock.calls[0][1]).toMatchInlineSnapshot(` { "parameters": { diff --git a/packages/amplify-environment-parameters/src/__tests__/environment-parameter-manager.test.ts b/packages/amplify-environment-parameters/src/__tests__/environment-parameter-manager.test.ts index 09616860a2e..9cae5b5191d 100644 --- a/packages/amplify-environment-parameters/src/__tests__/environment-parameter-manager.test.ts +++ b/packages/amplify-environment-parameters/src/__tests__/environment-parameter-manager.test.ts @@ -31,6 +31,7 @@ let ensureEnvParamManager: () => Promise<{ instance: IEnvironmentParameterManage beforeEach(() => { jest.clearAllMocks(); + // eslint-disable-next-line @typescript-eslint/no-misused-promises jest.isolateModules(async () => { ({ ensureEnvParamManager } = await import('../environment-parameter-manager')); }); diff --git a/packages/amplify-frontend-android/.npmignore b/packages/amplify-frontend-android/.npmignore index 3ee5d55b0b8..22f3c1db9d8 100644 --- a/packages/amplify-frontend-android/.npmignore +++ b/packages/amplify-frontend-android/.npmignore @@ -1,5 +1,6 @@ **/__mocks__/** **/__tests__/** +**/tests/** src tsconfig.json tsconfig.tsbuildinfo diff --git a/packages/amplify-frontend-android/CHANGELOG.md b/packages/amplify-frontend-android/CHANGELOG.md index 8969985c5ea..4a8a5955f58 100644 --- a/packages/amplify-frontend-android/CHANGELOG.md +++ b/packages/amplify-frontend-android/CHANGELOG.md @@ -3,6 +3,44 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [3.5.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-android@3.5.6...@aws-amplify/amplify-frontend-android@3.5.8) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [3.5.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-android@3.5.6...@aws-amplify/amplify-frontend-android@3.5.7) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-android + + + + + +## [3.5.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-android@3.5.5...@aws-amplify/amplify-frontend-android@3.5.6) (2023-08-31) + + +### Bug Fixes + +* exclude tests from publish ([#13153](https://github.com/aws-amplify/amplify-cli/issues/13153)) ([1b1fe09](https://github.com/aws-amplify/amplify-cli/commit/1b1fe09a1c08be0262a1013f71354abd7160722a)) + + + + + +## [3.5.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-android@3.5.4...@aws-amplify/amplify-frontend-android@3.5.5) (2023-06-13) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-android + + + + + ## [3.5.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-android@3.5.3...@aws-amplify/amplify-frontend-android@3.5.4) (2023-05-11) **Note:** Version bump only for package @aws-amplify/amplify-frontend-android diff --git a/packages/amplify-frontend-android/package.json b/packages/amplify-frontend-android/package.json index 7c72d593456..1af128a6b3e 100644 --- a/packages/amplify-frontend-android/package.json +++ b/packages/amplify-frontend-android/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-frontend-android", - "version": "3.5.4", + "version": "3.5.8", "description": "amplify-cli front-end plugin for Android project", "repository": { "type": "git", diff --git a/packages/amplify-frontend-flutter/.npmignore b/packages/amplify-frontend-flutter/.npmignore index 3ee5d55b0b8..22f3c1db9d8 100644 --- a/packages/amplify-frontend-flutter/.npmignore +++ b/packages/amplify-frontend-flutter/.npmignore @@ -1,5 +1,6 @@ **/__mocks__/** **/__tests__/** +**/tests/** src tsconfig.json tsconfig.tsbuildinfo diff --git a/packages/amplify-frontend-flutter/CHANGELOG.md b/packages/amplify-frontend-flutter/CHANGELOG.md index e804cdd2f88..8e4d76920ff 100644 --- a/packages/amplify-frontend-flutter/CHANGELOG.md +++ b/packages/amplify-frontend-flutter/CHANGELOG.md @@ -3,6 +3,52 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.4.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-flutter@1.4.5...@aws-amplify/amplify-frontend-flutter@1.4.7) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [1.4.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-flutter@1.4.5...@aws-amplify/amplify-frontend-flutter@1.4.6) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-flutter + + + + + +## [1.4.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-flutter@1.4.4...@aws-amplify/amplify-frontend-flutter@1.4.5) (2023-08-31) + + +### Bug Fixes + +* exclude tests from publish ([#13153](https://github.com/aws-amplify/amplify-cli/issues/13153)) ([1b1fe09](https://github.com/aws-amplify/amplify-cli/commit/1b1fe09a1c08be0262a1013f71354abd7160722a)) + + + + + +## [1.4.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-flutter@1.4.3...@aws-amplify/amplify-frontend-flutter@1.4.4) (2023-07-20) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-flutter + + + + + +## [1.4.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-flutter@1.4.2...@aws-amplify/amplify-frontend-flutter@1.4.3) (2023-06-13) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-flutter + + + + + ## [1.4.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-flutter@1.4.0...@aws-amplify/amplify-frontend-flutter@1.4.2) (2023-04-14) **Note:** Version bump only for package @aws-amplify/amplify-frontend-flutter diff --git a/packages/amplify-frontend-flutter/lib/dart-fs.js b/packages/amplify-frontend-flutter/lib/dart-fs.js index 58fd61e517d..dd43f0b321a 100644 --- a/packages/amplify-frontend-flutter/lib/dart-fs.js +++ b/packages/amplify-frontend-flutter/lib/dart-fs.js @@ -6,16 +6,23 @@ function readJsonFromDart(jsonFilePath, encoding = 'utf8', throwOnError = true) return undefined; } const fileContents = fs.readFileSync(jsonFilePath, encoding); - let jsonValue = fileContents.substring(fileContents.indexOf('{'), fileContents.lastIndexOf('}') + 1); + const configStart = fileContents.indexOf('const amplifyconfig'); + if (configStart === -1) { + return undefined; + } + const QUOTE = "'''"; + const jsonStart = fileContents.indexOf(QUOTE, configStart) + QUOTE.length; + const jsonEnd = fileContents.indexOf(QUOTE, jsonStart); + const jsonValue = fileContents.substring(jsonStart, jsonEnd).trim(); return JSON.parse(jsonValue); } -function writeJsonToDart(dest, obj) { +function writeJsonToDart(dest, json) { const destPath = path.parse(dest).dir; if (!fs.existsSync(destPath)) { fs.mkdirSync(destPath, { recursive: true }); } - const dartContent = `const amplifyconfig = ''' ${obj}''';`; + const dartContent = `const amplifyconfig = '''${json}''';\n`; fs.writeFileSync(dest, dartContent); } diff --git a/packages/amplify-frontend-flutter/package.json b/packages/amplify-frontend-flutter/package.json index 4dc0f22afe5..f7135791915 100644 --- a/packages/amplify-frontend-flutter/package.json +++ b/packages/amplify-frontend-flutter/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-frontend-flutter", - "version": "1.4.2", + "version": "1.4.7", "description": "amplify-cli front-end plugin for Flutter projects", "repository": { "type": "git", diff --git a/packages/amplify-frontend-flutter/tests/amplify-config-helper.test.js b/packages/amplify-frontend-flutter/tests/amplify-config-helper.test.js index 423a987b036..4abf43cbba3 100644 --- a/packages/amplify-frontend-flutter/tests/amplify-config-helper.test.js +++ b/packages/amplify-frontend-flutter/tests/amplify-config-helper.test.js @@ -1,4 +1,6 @@ const configHelper = require('../lib/amplify-config-helper'); +const fs = require('fs'); +const { readJsonFromDart } = require('../lib/dart-fs'); describe('customer pinpoint configuration', () => { it('generates correct notifications channel pinpoint configuration', () => { @@ -40,3 +42,76 @@ describe('customer pinpoint configuration', () => { expect(amplifyConfiguration).toMatchObject(expectedAmplifyConfiguration); }); }); + +describe('Dart configuration file', () => { + let tmpDir; + + beforeAll(() => { + tmpDir = fs.mkdtempSync('amplify-frontend-flutter'); + }); + + afterAll(() => { + fs.rmSync(tmpDir, { recursive: true }); + }); + + const writeTempConfig = (config) => { + const filepath = `${tmpDir}/amplifyconfiguration.dart`; + fs.writeFileSync(filepath, config); + return filepath; + }; + + const parseConfig = (config) => { + const configPath = writeTempConfig(config); + return readJsonFromDart(configPath); + }; + + it('parses old format', () => { + const parsedConfig = parseConfig(`const amplifyconfig = ''' { + "UserAgent": "aws-amplify-cli/2.0", + "Version": "1.0" +}''';`); + expect(parsedConfig).toMatchObject({ + UserAgent: 'aws-amplify-cli/2.0', + Version: '1.0', + }); + }); + + it('parses new format', () => { + const parsedConfig = parseConfig(`const amplifyconfig = '''{ + "UserAgent": "aws-amplify-cli/2.0", + "Version": "1.0" + }''';`); + expect(parsedConfig).toMatchObject({ + UserAgent: 'aws-amplify-cli/2.0', + Version: '1.0', + }); + }); + + it('parses with data before', () => { + const parsedConfig = parseConfig(` + const someOtherConfig = '{}'; + + const amplifyconfig = '''{ + "UserAgent": "aws-amplify-cli/2.0", + "Version": "1.0" + }''';`); + expect(parsedConfig).toMatchObject({ + UserAgent: 'aws-amplify-cli/2.0', + Version: '1.0', + }); + }); + + it('parses with data after', () => { + const parsedConfig = parseConfig(` + const amplifyconfig = '''{ + "UserAgent": "aws-amplify-cli/2.0", + "Version": "1.0" + }'''; + + const someOtherConfig = {};`); + expect(parsedConfig).toMatchObject({ + UserAgent: 'aws-amplify-cli/2.0', + Version: '1.0', + }); + }); +}); diff --git a/packages/amplify-frontend-ios/.npmignore b/packages/amplify-frontend-ios/.npmignore index 3ee5d55b0b8..22f3c1db9d8 100644 --- a/packages/amplify-frontend-ios/.npmignore +++ b/packages/amplify-frontend-ios/.npmignore @@ -1,5 +1,6 @@ **/__mocks__/** **/__tests__/** +**/tests/** src tsconfig.json tsconfig.tsbuildinfo diff --git a/packages/amplify-frontend-ios/CHANGELOG.md b/packages/amplify-frontend-ios/CHANGELOG.md index 62e8c71fd8c..3fed31fa8f2 100644 --- a/packages/amplify-frontend-ios/CHANGELOG.md +++ b/packages/amplify-frontend-ios/CHANGELOG.md @@ -3,6 +3,256 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [3.7.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-ios@3.7.8...@aws-amplify/amplify-frontend-ios@3.7.9) (2025-01-30) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-ios + + + + + +## [3.7.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-ios@3.7.7...@aws-amplify/amplify-frontend-ios@3.7.8) (2025-01-02) + + +### Bug Fixes + +* **amplify-xode:** updated to support Xcode 16 ([#14029](https://github.com/aws-amplify/amplify-cli/issues/14029)) ([b8b6498](https://github.com/aws-amplify/amplify-cli/commit/b8b6498a350639d6bb798d6fcea167481a3718ae)) + + + + + +## [3.7.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-ios@3.7.6...@aws-amplify/amplify-frontend-ios@3.7.7) (2024-08-02) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-ios + + + + + +## [3.7.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-ios@3.7.5...@aws-amplify/amplify-frontend-ios@3.7.6) (2024-06-27) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-ios + + + + + +## [3.7.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-ios@3.7.4...@aws-amplify/amplify-frontend-ios@3.7.5) (2024-06-20) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-ios + + + + + +## [3.7.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-ios@3.7.3...@aws-amplify/amplify-frontend-ios@3.7.4) (2024-06-06) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-ios + + + + + +## [3.7.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-ios@3.7.2...@aws-amplify/amplify-frontend-ios@3.7.3) (2024-05-24) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-ios + + + + + +## [3.7.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-ios@3.7.1...@aws-amplify/amplify-frontend-ios@3.7.2) (2024-05-07) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-ios + + + + + +## [3.7.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-ios@3.7.0...@aws-amplify/amplify-frontend-ios@3.7.1) (2024-04-18) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-ios + + + + + +# [3.7.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-ios@3.6.29...@aws-amplify/amplify-frontend-ios@3.7.0) (2024-04-15) + + +### Features + +* **amplify-frontend-ios:** update amplify-xcode integration ([#13616](https://github.com/aws-amplify/amplify-cli/issues/13616)) ([46c6334](https://github.com/aws-amplify/amplify-cli/commit/46c6334bbf087edd19ccfc5612e84d626c8dd5d2)) + + + + + +## [3.6.29](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-ios@3.6.28...@aws-amplify/amplify-frontend-ios@3.6.29) (2024-03-29) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-ios + + + + + +## [3.6.28](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-ios@3.6.27...@aws-amplify/amplify-frontend-ios@3.6.28) (2024-03-06) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-ios + + + + + +## [3.6.27](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-ios@3.6.26...@aws-amplify/amplify-frontend-ios@3.6.27) (2023-12-11) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-ios + + + + + +## [3.6.26](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-ios@3.6.24...@aws-amplify/amplify-frontend-ios@3.6.26) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [3.6.25](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-ios@3.6.24...@aws-amplify/amplify-frontend-ios@3.6.25) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-ios + + + + + +## [3.6.24](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-ios@3.6.23...@aws-amplify/amplify-frontend-ios@3.6.24) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-ios + + + + + +## [3.6.23](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-ios@3.6.22...@aws-amplify/amplify-frontend-ios@3.6.23) (2023-10-12) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-ios + + + + + +## [3.6.22](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-ios@3.6.21...@aws-amplify/amplify-frontend-ios@3.6.22) (2023-10-05) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-ios + + + + + +## [3.6.21](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-ios@3.6.20...@aws-amplify/amplify-frontend-ios@3.6.21) (2023-10-03) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-ios + + + + + +## [3.6.20](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-ios@3.6.19...@aws-amplify/amplify-frontend-ios@3.6.20) (2023-09-22) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-ios + + + + + +## [3.6.19](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-ios@3.6.18...@aws-amplify/amplify-frontend-ios@3.6.19) (2023-08-31) + + +### Bug Fixes + +* allow whitespace characters in Xcode projects ([#13151](https://github.com/aws-amplify/amplify-cli/issues/13151)) ([415a430](https://github.com/aws-amplify/amplify-cli/commit/415a430aab368cf4c0f0a14599088e6e188975f6)) + + + + + +## [3.6.18](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-ios@3.6.17...@aws-amplify/amplify-frontend-ios@3.6.18) (2023-08-17) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-ios + + + + + +## [3.6.17](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-ios@3.6.16...@aws-amplify/amplify-frontend-ios@3.6.17) (2023-08-14) + + +### Reverts + +* Revert "fix(amplify-frontend-ios): pass paths to command options as strings (#12596)" (#13106) ([8921dd0](https://github.com/aws-amplify/amplify-cli/commit/8921dd028d66e2a28498970231fd756504944968)), closes [#12596](https://github.com/aws-amplify/amplify-cli/issues/12596) [#13106](https://github.com/aws-amplify/amplify-cli/issues/13106) + + + + + +## [3.6.16](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-ios@3.6.15...@aws-amplify/amplify-frontend-ios@3.6.16) (2023-08-09) + + +### Bug Fixes + +* **amplify-frontend-ios:** pass paths to command options as strings ([#12596](https://github.com/aws-amplify/amplify-cli/issues/12596)) ([43f73ab](https://github.com/aws-amplify/amplify-cli/commit/43f73ab268c2c08ed31faf16989fff12ef84c46e)) + + + + + +## [3.6.15](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-ios@3.6.14...@aws-amplify/amplify-frontend-ios@3.6.15) (2023-07-28) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-ios + + + + + +## [3.6.14](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-ios@3.6.13...@aws-amplify/amplify-frontend-ios@3.6.14) (2023-07-27) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-ios + + + + + +## [3.6.13](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-ios@3.6.12...@aws-amplify/amplify-frontend-ios@3.6.13) (2023-07-24) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-ios + + + + + +## [3.6.12](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-ios@3.6.11...@aws-amplify/amplify-frontend-ios@3.6.12) (2023-07-20) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-ios + + + + + +## [3.6.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-ios@3.6.10...@aws-amplify/amplify-frontend-ios@3.6.11) (2023-06-13) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-ios + + + + + ## [3.6.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-ios@3.6.8...@aws-amplify/amplify-frontend-ios@3.6.10) (2023-05-25) diff --git a/packages/amplify-frontend-ios/lib/amplify-xcode.js b/packages/amplify-frontend-ios/lib/amplify-xcode.js index aea5b59c353..e57eb95df51 100644 --- a/packages/amplify-frontend-ios/lib/amplify-xcode.js +++ b/packages/amplify-frontend-ios/lib/amplify-xcode.js @@ -31,11 +31,12 @@ const amplifyXcodePath = () => path.join(pathManager.getAmplifyPackageLibDirPath * @param {String} params.path - Project base path */ async function importConfig(params) { - let command = `${amplifyXcodePath()} import-config`; + const command = amplifyXcodePath(); + const args = ['import-config']; if (params['path']) { - command += ` --path=${params['path']}`; + args.push(`--path=${params['path']}`); } - await execa.command(command, { stdout: 'inherit' }); + await execa(command, args, { stdout: 'inherit' }); } /** @@ -44,11 +45,12 @@ async function importConfig(params) { * @param {String} params.path - Project base path */ async function importModels(params) { - let command = `${amplifyXcodePath()} import-models`; + const command = amplifyXcodePath(); + const args = ['import-models']; if (params['path']) { - command += ` --path=${params['path']}`; + args.push(`--path=${params['path']}`); } - await execa.command(command, { stdout: 'inherit' }); + await execa(command, args, { stdout: 'inherit' }); } /** @@ -57,11 +59,12 @@ async function importModels(params) { * @param {String} params.output-path - Path to save the output of generated schema file */ async function generateSchema(params) { - let command = `${amplifyXcodePath()} generate-schema`; + const command = amplifyXcodePath(); + const args = ['generate-schema']; if (params['output-path']) { - command += ` --output-path=${params['output-path']}`; + args.push(`--output-path=${params['output-path']}`); } - await execa.command(command, { stdout: 'inherit' }); + await execa(command, args, { stdout: 'inherit' }); } module.exports = { diff --git a/packages/amplify-frontend-ios/native-bindings-codegen/index.js b/packages/amplify-frontend-ios/native-bindings-codegen/index.js index 795bf27001c..427dc4c7135 100644 --- a/packages/amplify-frontend-ios/native-bindings-codegen/index.js +++ b/packages/amplify-frontend-ios/native-bindings-codegen/index.js @@ -49,13 +49,13 @@ const generateCommandParameters = (parameters) => { let output; switch (kind) { case 'option': - output = [`if (${funcParamValue}) {`, ` command += \` --${name}=\${${funcParamValue}}\`;`, ` }`]; + output = [`if (${funcParamValue}) {`, ` args.push(\`--${name}=\${${funcParamValue}}\`);`, ` }`]; break; case 'flag': - output = [`if (${funcParamValue}) {`, ` command += \` --${name}\`;`, ` }`]; + output = [`if (${funcParamValue}) {`, ` args.push(\`--${name}\`);`, ` }`]; break; case 'argument': - output = [` command += \` \${${funcParamValue}}\`;`]; + output = [` args.push(\`\${${funcParamValue}}\`);`]; } return output; }); diff --git a/packages/amplify-frontend-ios/native-bindings-codegen/templates/function.jst b/packages/amplify-frontend-ios/native-bindings-codegen/templates/function.jst index f547dc4548a..19d48d1e6c9 100644 --- a/packages/amplify-frontend-ios/native-bindings-codegen/templates/function.jst +++ b/packages/amplify-frontend-ios/native-bindings-codegen/templates/function.jst @@ -1,6 +1,7 @@ <%= __FUNCTION_DOCS__ %> async function <%= __FUNCTION_NAME__ %>(params) { - let command = `${amplifyXcodePath()} <%= __COMMAND_NAME__ %>`; + const command = amplifyXcodePath(); + const args = ['<%= __COMMAND_NAME__ %>']; <%=__COMMAND_PARAMS__ %> - await execa.command(command, { stdout: 'inherit' }); + await execa(command, args, { stdout: 'inherit' }); } diff --git a/packages/amplify-frontend-ios/native-bindings-codegen/templates/preamble.jst b/packages/amplify-frontend-ios/native-bindings-codegen/templates/preamble.jst index 313813328f1..48182e47cda 100644 --- a/packages/amplify-frontend-ios/native-bindings-codegen/templates/preamble.jst +++ b/packages/amplify-frontend-ios/native-bindings-codegen/templates/preamble.jst @@ -22,5 +22,5 @@ const path = require('path'); const { pathManager } = require('@aws-amplify/amplify-cli-core'); const BINARY_PATH = 'resources/amplify-xcode'; -const PACKAGE_NAME = 'amplify-frontend-ios'; +const PACKAGE_NAME = '@aws-amplify/amplify-frontend-ios'; const amplifyXcodePath = () => path.join(pathManager.getAmplifyPackageLibDirPath(PACKAGE_NAME), BINARY_PATH); diff --git a/packages/amplify-frontend-ios/package.json b/packages/amplify-frontend-ios/package.json index 9731613ec65..999038612f6 100644 --- a/packages/amplify-frontend-ios/package.json +++ b/packages/amplify-frontend-ios/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-frontend-ios", - "version": "3.6.10", + "version": "3.7.9", "description": "amplify-cli front-end plugin for xcode projects", "repository": { "type": "git", @@ -24,7 +24,7 @@ "test-watch": "jest --watch" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.0.8", + "@aws-amplify/amplify-cli-core": "4.3.11", "execa": "^5.1.1", "fs-extra": "^8.1.0", "graphql-config": "^2.2.1", diff --git a/packages/amplify-frontend-ios/resources/amplify-xcode b/packages/amplify-frontend-ios/resources/amplify-xcode index cdad85823ef..8f4b4b5a77f 100755 Binary files a/packages/amplify-frontend-ios/resources/amplify-xcode and b/packages/amplify-frontend-ios/resources/amplify-xcode differ diff --git a/packages/amplify-frontend-ios/tests/.gitignore b/packages/amplify-frontend-ios/tests/.gitignore new file mode 100644 index 00000000000..58f34d965c6 --- /dev/null +++ b/packages/amplify-frontend-ios/tests/.gitignore @@ -0,0 +1 @@ +sample\ xcode\ project diff --git a/packages/amplify-frontend-ios/tests/amplify-xcode.test.js b/packages/amplify-frontend-ios/tests/amplify-xcode.test.js new file mode 100644 index 00000000000..f5afc6f3a8d --- /dev/null +++ b/packages/amplify-frontend-ios/tests/amplify-xcode.test.js @@ -0,0 +1,32 @@ +const { importConfig, importModels, generateSchema } = require('../lib/amplify-xcode'); +const execa = require('execa'); + +const amplifyIosFakePath = '/amplify-ios/fake/path'; +const expectedAmplifyXcodeBinaryPath = '/amplify-ios/fake/path/resources/amplify-xcode'; + +jest.mock('execa'); +jest.mock('@aws-amplify/amplify-cli-core', () => ({ + pathManager: { + getAmplifyPackageLibDirPath: jest.fn().mockReturnValue(amplifyIosFakePath), + }, +})); + +describe('Should call amplify-xcode binary', () => { + it('should importConfig', async () => { + const path = '/some/path'; + await importConfig({ path }); + expect(execa).toBeCalledWith(expectedAmplifyXcodeBinaryPath, ['import-config', '--path=/some/path'], { stdout: 'inherit' }); + }); + + it('should importModels', async () => { + const path = '/some/path'; + await importModels({ path }); + expect(execa).toBeCalledWith(expectedAmplifyXcodeBinaryPath, ['import-models', '--path=/some/path'], { stdout: 'inherit' }); + }); + + it('should generateSchema', async () => { + const path = '/some/path'; + await generateSchema({ 'output-path': path }); + expect(execa).toBeCalledWith(expectedAmplifyXcodeBinaryPath, ['generate-schema', '--output-path=/some/path'], { stdout: 'inherit' }); + }); +}); diff --git a/packages/amplify-frontend-ios/tests/native-bindings-codegen.test.js b/packages/amplify-frontend-ios/tests/native-bindings-codegen.test.js index f5221543707..1db184621ae 100644 --- a/packages/amplify-frontend-ios/tests/native-bindings-codegen.test.js +++ b/packages/amplify-frontend-ios/tests/native-bindings-codegen.test.js @@ -7,7 +7,7 @@ describe('amplify-xcode native bindings codegen', () => { name: 'option-name', kind: 'option', }; - const expected = [[`if (params['${param.name}']) {`, ` command += \` --${param.name}=\${params['${param.name}']}\`;`, ` }`]]; + const expected = [[`if (params['${param.name}']) {`, ` args.push(\`--${param.name}=\${params['${param.name}']}\`);`, ` }`]]; expect(generateCommandParameters([param])).toEqual(expected); }); @@ -16,7 +16,7 @@ describe('amplify-xcode native bindings codegen', () => { name: 'flagName', kind: 'flag', }; - const expected = [[`if (params['${param.name}']) {`, ` command += \` --${param.name}\`;`, ` }`]]; + const expected = [[`if (params['${param.name}']) {`, ` args.push(\`--${param.name}\`);`, ` }`]]; expect(generateCommandParameters([param])).toEqual(expected); }); @@ -25,7 +25,7 @@ describe('amplify-xcode native bindings codegen', () => { name: 'argName', kind: 'argument', }; - const expected = [[" command += ` ${params['argName']}`;"]]; + const expected = [[" args.push(`${params['argName']}`);"]]; expect(generateCommandParameters([param])).toEqual(expected); }); }); diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/.eslintignore b/packages/amplify-frontend-ios/tests/sample-xcode-project/.eslintignore new file mode 100644 index 00000000000..1e373ff2140 --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/.eslintignore @@ -0,0 +1 @@ +amplify-codegen-temp/models \ No newline at end of file diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/.gitignore b/packages/amplify-frontend-ios/tests/sample-xcode-project/.gitignore new file mode 100644 index 00000000000..288374a5966 --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/.gitignore @@ -0,0 +1,19 @@ +#amplify-do-not-edit-begin +amplify/\#current-cloud-backend +amplify/.config/local-* +amplify/logs +amplify/mock-data +amplify/mock-api-resources +amplify/backend/amplify-meta.json +amplify/backend/.temp +build/ +dist/ +node_modules/ +aws-exports.js +amplifyconfiguration.dart +amplify-build-config.json +amplify-gradle-config.json +amplifytools.xcconfig +.secret-* +**.sample +#amplify-do-not-edit-end diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/.graphqlconfig.yml b/packages/amplify-frontend-ios/tests/sample-xcode-project/.graphqlconfig.yml new file mode 100644 index 00000000000..7c761d51e34 --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/.graphqlconfig.yml @@ -0,0 +1,12 @@ +projects: + samplexcodeproject: + schemaPath: graphql/schema.json + includes: + - graphql/**/*.graphql + excludes: + - ./amplify/** + extensions: + amplify: + codeGenTarget: swift + generatedFileName: API.swift + docsFilePath: graphql diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/API.swift b/packages/amplify-frontend-ios/tests/sample-xcode-project/API.swift new file mode 100644 index 00000000000..02bb8c50995 --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/API.swift @@ -0,0 +1,2305 @@ +// This file was automatically generated and should not be edited. + +#if canImport(AWSAPIPlugin) +import Foundation + +public protocol GraphQLInputValue { +} + +public struct GraphQLVariable { + let name: String + + public init(_ name: String) { + self.name = name + } +} + +extension GraphQLVariable: GraphQLInputValue { +} + +extension JSONEncodable { + public func evaluate(with variables: [String: JSONEncodable]?) throws -> Any { + return jsonValue + } +} + +public typealias GraphQLMap = [String: JSONEncodable?] + +extension Dictionary where Key == String, Value == JSONEncodable? { + public var withNilValuesRemoved: Dictionary { + var filtered = Dictionary(minimumCapacity: count) + for (key, value) in self { + if value != nil { + filtered[key] = value + } + } + return filtered + } +} + +public protocol GraphQLMapConvertible: JSONEncodable { + var graphQLMap: GraphQLMap { get } +} + +public extension GraphQLMapConvertible { + var jsonValue: Any { + return graphQLMap.withNilValuesRemoved.jsonValue + } +} + +public typealias GraphQLID = String + +public protocol APISwiftGraphQLOperation: AnyObject { + + static var operationString: String { get } + static var requestString: String { get } + static var operationIdentifier: String? { get } + + var variables: GraphQLMap? { get } + + associatedtype Data: GraphQLSelectionSet +} + +public extension APISwiftGraphQLOperation { + static var requestString: String { + return operationString + } + + static var operationIdentifier: String? { + return nil + } + + var variables: GraphQLMap? { + return nil + } +} + +public protocol GraphQLQuery: APISwiftGraphQLOperation {} + +public protocol GraphQLMutation: APISwiftGraphQLOperation {} + +public protocol GraphQLSubscription: APISwiftGraphQLOperation {} + +public protocol GraphQLFragment: GraphQLSelectionSet { + static var possibleTypes: [String] { get } +} + +public typealias Snapshot = [String: Any?] + +public protocol GraphQLSelectionSet: Decodable { + static var selections: [GraphQLSelection] { get } + + var snapshot: Snapshot { get } + init(snapshot: Snapshot) +} + +extension GraphQLSelectionSet { + public init(from decoder: Decoder) throws { + if let jsonObject = try? APISwiftJSONValue(from: decoder) { + let encoder = JSONEncoder() + let jsonData = try encoder.encode(jsonObject) + let decodedDictionary = try JSONSerialization.jsonObject(with: jsonData, options: []) as! [String: Any] + let optionalDictionary = decodedDictionary.mapValues { $0 as Any? } + + self.init(snapshot: optionalDictionary) + } else { + self.init(snapshot: [:]) + } + } +} + +enum APISwiftJSONValue: Codable { + case array([APISwiftJSONValue]) + case boolean(Bool) + case number(Double) + case object([String: APISwiftJSONValue]) + case string(String) + case null + + init(from decoder: Decoder) throws { + let container = try decoder.singleValueContainer() + + if let value = try? container.decode([String: APISwiftJSONValue].self) { + self = .object(value) + } else if let value = try? container.decode([APISwiftJSONValue].self) { + self = .array(value) + } else if let value = try? container.decode(Double.self) { + self = .number(value) + } else if let value = try? container.decode(Bool.self) { + self = .boolean(value) + } else if let value = try? container.decode(String.self) { + self = .string(value) + } else { + self = .null + } + } + + func encode(to encoder: Encoder) throws { + var container = encoder.singleValueContainer() + + switch self { + case .array(let value): + try container.encode(value) + case .boolean(let value): + try container.encode(value) + case .number(let value): + try container.encode(value) + case .object(let value): + try container.encode(value) + case .string(let value): + try container.encode(value) + case .null: + try container.encodeNil() + } + } +} + +public protocol GraphQLSelection { +} + +public struct GraphQLField: GraphQLSelection { + let name: String + let alias: String? + let arguments: [String: GraphQLInputValue]? + + var responseKey: String { + return alias ?? name + } + + let type: GraphQLOutputType + + public init(_ name: String, alias: String? = nil, arguments: [String: GraphQLInputValue]? = nil, type: GraphQLOutputType) { + self.name = name + self.alias = alias + + self.arguments = arguments + + self.type = type + } +} + +public indirect enum GraphQLOutputType { + case scalar(JSONDecodable.Type) + case object([GraphQLSelection]) + case nonNull(GraphQLOutputType) + case list(GraphQLOutputType) + + var namedType: GraphQLOutputType { + switch self { + case .nonNull(let innerType), .list(let innerType): + return innerType.namedType + case .scalar, .object: + return self + } + } +} + +public struct GraphQLBooleanCondition: GraphQLSelection { + let variableName: String + let inverted: Bool + let selections: [GraphQLSelection] + + public init(variableName: String, inverted: Bool, selections: [GraphQLSelection]) { + self.variableName = variableName + self.inverted = inverted; + self.selections = selections; + } +} + +public struct GraphQLTypeCondition: GraphQLSelection { + let possibleTypes: [String] + let selections: [GraphQLSelection] + + public init(possibleTypes: [String], selections: [GraphQLSelection]) { + self.possibleTypes = possibleTypes + self.selections = selections; + } +} + +public struct GraphQLFragmentSpread: GraphQLSelection { + let fragment: GraphQLFragment.Type + + public init(_ fragment: GraphQLFragment.Type) { + self.fragment = fragment + } +} + +public struct GraphQLTypeCase: GraphQLSelection { + let variants: [String: [GraphQLSelection]] + let `default`: [GraphQLSelection] + + public init(variants: [String: [GraphQLSelection]], default: [GraphQLSelection]) { + self.variants = variants + self.default = `default`; + } +} + +public typealias JSONObject = [String: Any] + +public protocol JSONDecodable { + init(jsonValue value: Any) throws +} + +public protocol JSONEncodable: GraphQLInputValue { + var jsonValue: Any { get } +} + +public enum JSONDecodingError: Error, LocalizedError { + case missingValue + case nullValue + case wrongType + case couldNotConvert(value: Any, to: Any.Type) + + public var errorDescription: String? { + switch self { + case .missingValue: + return "Missing value" + case .nullValue: + return "Unexpected null value" + case .wrongType: + return "Wrong type" + case .couldNotConvert(let value, let expectedType): + return "Could not convert \"\(value)\" to \(expectedType)" + } + } +} + +extension String: JSONDecodable, JSONEncodable { + public init(jsonValue value: Any) throws { + guard let string = value as? String else { + throw JSONDecodingError.couldNotConvert(value: value, to: String.self) + } + self = string + } + + public var jsonValue: Any { + return self + } +} + +extension Int: JSONDecodable, JSONEncodable { + public init(jsonValue value: Any) throws { + guard let number = value as? NSNumber else { + throw JSONDecodingError.couldNotConvert(value: value, to: Int.self) + } + self = number.intValue + } + + public var jsonValue: Any { + return self + } +} + +extension Float: JSONDecodable, JSONEncodable { + public init(jsonValue value: Any) throws { + guard let number = value as? NSNumber else { + throw JSONDecodingError.couldNotConvert(value: value, to: Float.self) + } + self = number.floatValue + } + + public var jsonValue: Any { + return self + } +} + +extension Double: JSONDecodable, JSONEncodable { + public init(jsonValue value: Any) throws { + guard let number = value as? NSNumber else { + throw JSONDecodingError.couldNotConvert(value: value, to: Double.self) + } + self = number.doubleValue + } + + public var jsonValue: Any { + return self + } +} + +extension Bool: JSONDecodable, JSONEncodable { + public init(jsonValue value: Any) throws { + guard let bool = value as? Bool else { + throw JSONDecodingError.couldNotConvert(value: value, to: Bool.self) + } + self = bool + } + + public var jsonValue: Any { + return self + } +} + +extension RawRepresentable where RawValue: JSONDecodable { + public init(jsonValue value: Any) throws { + let rawValue = try RawValue(jsonValue: value) + if let tempSelf = Self(rawValue: rawValue) { + self = tempSelf + } else { + throw JSONDecodingError.couldNotConvert(value: value, to: Self.self) + } + } +} + +extension RawRepresentable where RawValue: JSONEncodable { + public var jsonValue: Any { + return rawValue.jsonValue + } +} + +extension Optional where Wrapped: JSONDecodable { + public init(jsonValue value: Any) throws { + if value is NSNull { + self = .none + } else { + self = .some(try Wrapped(jsonValue: value)) + } + } +} + +extension Optional: JSONEncodable { + public var jsonValue: Any { + switch self { + case .none: + return NSNull() + case .some(let wrapped as JSONEncodable): + return wrapped.jsonValue + default: + fatalError("Optional is only JSONEncodable if Wrapped is") + } + } +} + +extension Dictionary: JSONEncodable { + public var jsonValue: Any { + return jsonObject + } + + public var jsonObject: JSONObject { + var jsonObject = JSONObject(minimumCapacity: count) + for (key, value) in self { + if case let (key as String, value as JSONEncodable) = (key, value) { + jsonObject[key] = value.jsonValue + } else { + fatalError("Dictionary is only JSONEncodable if Value is (and if Key is String)") + } + } + return jsonObject + } +} + +extension Array: JSONEncodable { + public var jsonValue: Any { + return map() { element -> (Any) in + if case let element as JSONEncodable = element { + return element.jsonValue + } else { + fatalError("Array is only JSONEncodable if Element is") + } + } + } +} + +extension URL: JSONDecodable, JSONEncodable { + public init(jsonValue value: Any) throws { + guard let string = value as? String else { + throw JSONDecodingError.couldNotConvert(value: value, to: URL.self) + } + self.init(string: string)! + } + + public var jsonValue: Any { + return self.absoluteString + } +} + +extension Dictionary { + static func += (lhs: inout Dictionary, rhs: Dictionary) { + lhs.merge(rhs) { (_, new) in new } + } +} + +#elseif canImport(AWSAppSync) +import AWSAppSync +#endif + +public struct CreateTodoInput: GraphQLMapConvertible { + public var graphQLMap: GraphQLMap + + public init(id: GraphQLID? = nil, name: String, description: String? = nil) { + graphQLMap = ["id": id, "name": name, "description": description] + } + + public var id: GraphQLID? { + get { + return graphQLMap["id"] as! GraphQLID? + } + set { + graphQLMap.updateValue(newValue, forKey: "id") + } + } + + public var name: String { + get { + return graphQLMap["name"] as! String + } + set { + graphQLMap.updateValue(newValue, forKey: "name") + } + } + + public var description: String? { + get { + return graphQLMap["description"] as! String? + } + set { + graphQLMap.updateValue(newValue, forKey: "description") + } + } +} + +public struct ModelTodoConditionInput: GraphQLMapConvertible { + public var graphQLMap: GraphQLMap + + public init(name: ModelStringInput? = nil, description: ModelStringInput? = nil, and: [ModelTodoConditionInput?]? = nil, or: [ModelTodoConditionInput?]? = nil, not: ModelTodoConditionInput? = nil) { + graphQLMap = ["name": name, "description": description, "and": and, "or": or, "not": not] + } + + public var name: ModelStringInput? { + get { + return graphQLMap["name"] as! ModelStringInput? + } + set { + graphQLMap.updateValue(newValue, forKey: "name") + } + } + + public var description: ModelStringInput? { + get { + return graphQLMap["description"] as! ModelStringInput? + } + set { + graphQLMap.updateValue(newValue, forKey: "description") + } + } + + public var and: [ModelTodoConditionInput?]? { + get { + return graphQLMap["and"] as! [ModelTodoConditionInput?]? + } + set { + graphQLMap.updateValue(newValue, forKey: "and") + } + } + + public var or: [ModelTodoConditionInput?]? { + get { + return graphQLMap["or"] as! [ModelTodoConditionInput?]? + } + set { + graphQLMap.updateValue(newValue, forKey: "or") + } + } + + public var not: ModelTodoConditionInput? { + get { + return graphQLMap["not"] as! ModelTodoConditionInput? + } + set { + graphQLMap.updateValue(newValue, forKey: "not") + } + } +} + +public struct ModelStringInput: GraphQLMapConvertible { + public var graphQLMap: GraphQLMap + + public init(ne: String? = nil, eq: String? = nil, le: String? = nil, lt: String? = nil, ge: String? = nil, gt: String? = nil, contains: String? = nil, notContains: String? = nil, between: [String?]? = nil, beginsWith: String? = nil, attributeExists: Bool? = nil, attributeType: ModelAttributeTypes? = nil, size: ModelSizeInput? = nil) { + graphQLMap = ["ne": ne, "eq": eq, "le": le, "lt": lt, "ge": ge, "gt": gt, "contains": contains, "notContains": notContains, "between": between, "beginsWith": beginsWith, "attributeExists": attributeExists, "attributeType": attributeType, "size": size] + } + + public var ne: String? { + get { + return graphQLMap["ne"] as! String? + } + set { + graphQLMap.updateValue(newValue, forKey: "ne") + } + } + + public var eq: String? { + get { + return graphQLMap["eq"] as! String? + } + set { + graphQLMap.updateValue(newValue, forKey: "eq") + } + } + + public var le: String? { + get { + return graphQLMap["le"] as! String? + } + set { + graphQLMap.updateValue(newValue, forKey: "le") + } + } + + public var lt: String? { + get { + return graphQLMap["lt"] as! String? + } + set { + graphQLMap.updateValue(newValue, forKey: "lt") + } + } + + public var ge: String? { + get { + return graphQLMap["ge"] as! String? + } + set { + graphQLMap.updateValue(newValue, forKey: "ge") + } + } + + public var gt: String? { + get { + return graphQLMap["gt"] as! String? + } + set { + graphQLMap.updateValue(newValue, forKey: "gt") + } + } + + public var contains: String? { + get { + return graphQLMap["contains"] as! String? + } + set { + graphQLMap.updateValue(newValue, forKey: "contains") + } + } + + public var notContains: String? { + get { + return graphQLMap["notContains"] as! String? + } + set { + graphQLMap.updateValue(newValue, forKey: "notContains") + } + } + + public var between: [String?]? { + get { + return graphQLMap["between"] as! [String?]? + } + set { + graphQLMap.updateValue(newValue, forKey: "between") + } + } + + public var beginsWith: String? { + get { + return graphQLMap["beginsWith"] as! String? + } + set { + graphQLMap.updateValue(newValue, forKey: "beginsWith") + } + } + + public var attributeExists: Bool? { + get { + return graphQLMap["attributeExists"] as! Bool? + } + set { + graphQLMap.updateValue(newValue, forKey: "attributeExists") + } + } + + public var attributeType: ModelAttributeTypes? { + get { + return graphQLMap["attributeType"] as! ModelAttributeTypes? + } + set { + graphQLMap.updateValue(newValue, forKey: "attributeType") + } + } + + public var size: ModelSizeInput? { + get { + return graphQLMap["size"] as! ModelSizeInput? + } + set { + graphQLMap.updateValue(newValue, forKey: "size") + } + } +} + +public enum ModelAttributeTypes: RawRepresentable, Equatable, JSONDecodable, JSONEncodable { + public typealias RawValue = String + case binary + case binarySet + case bool + case list + case map + case number + case numberSet + case string + case stringSet + case null + /// Auto generated constant for unknown enum values + case unknown(RawValue) + + public init?(rawValue: RawValue) { + switch rawValue { + case "binary": self = .binary + case "binarySet": self = .binarySet + case "bool": self = .bool + case "list": self = .list + case "map": self = .map + case "number": self = .number + case "numberSet": self = .numberSet + case "string": self = .string + case "stringSet": self = .stringSet + case "_null": self = .null + default: self = .unknown(rawValue) + } + } + + public var rawValue: RawValue { + switch self { + case .binary: return "binary" + case .binarySet: return "binarySet" + case .bool: return "bool" + case .list: return "list" + case .map: return "map" + case .number: return "number" + case .numberSet: return "numberSet" + case .string: return "string" + case .stringSet: return "stringSet" + case .null: return "_null" + case .unknown(let value): return value + } + } + + public static func == (lhs: ModelAttributeTypes, rhs: ModelAttributeTypes) -> Bool { + switch (lhs, rhs) { + case (.binary, .binary): return true + case (.binarySet, .binarySet): return true + case (.bool, .bool): return true + case (.list, .list): return true + case (.map, .map): return true + case (.number, .number): return true + case (.numberSet, .numberSet): return true + case (.string, .string): return true + case (.stringSet, .stringSet): return true + case (.null, .null): return true + case (.unknown(let lhsValue), .unknown(let rhsValue)): return lhsValue == rhsValue + default: return false + } + } +} + +public struct ModelSizeInput: GraphQLMapConvertible { + public var graphQLMap: GraphQLMap + + public init(ne: Int? = nil, eq: Int? = nil, le: Int? = nil, lt: Int? = nil, ge: Int? = nil, gt: Int? = nil, between: [Int?]? = nil) { + graphQLMap = ["ne": ne, "eq": eq, "le": le, "lt": lt, "ge": ge, "gt": gt, "between": between] + } + + public var ne: Int? { + get { + return graphQLMap["ne"] as! Int? + } + set { + graphQLMap.updateValue(newValue, forKey: "ne") + } + } + + public var eq: Int? { + get { + return graphQLMap["eq"] as! Int? + } + set { + graphQLMap.updateValue(newValue, forKey: "eq") + } + } + + public var le: Int? { + get { + return graphQLMap["le"] as! Int? + } + set { + graphQLMap.updateValue(newValue, forKey: "le") + } + } + + public var lt: Int? { + get { + return graphQLMap["lt"] as! Int? + } + set { + graphQLMap.updateValue(newValue, forKey: "lt") + } + } + + public var ge: Int? { + get { + return graphQLMap["ge"] as! Int? + } + set { + graphQLMap.updateValue(newValue, forKey: "ge") + } + } + + public var gt: Int? { + get { + return graphQLMap["gt"] as! Int? + } + set { + graphQLMap.updateValue(newValue, forKey: "gt") + } + } + + public var between: [Int?]? { + get { + return graphQLMap["between"] as! [Int?]? + } + set { + graphQLMap.updateValue(newValue, forKey: "between") + } + } +} + +public struct UpdateTodoInput: GraphQLMapConvertible { + public var graphQLMap: GraphQLMap + + public init(id: GraphQLID, name: String? = nil, description: String? = nil) { + graphQLMap = ["id": id, "name": name, "description": description] + } + + public var id: GraphQLID { + get { + return graphQLMap["id"] as! GraphQLID + } + set { + graphQLMap.updateValue(newValue, forKey: "id") + } + } + + public var name: String? { + get { + return graphQLMap["name"] as! String? + } + set { + graphQLMap.updateValue(newValue, forKey: "name") + } + } + + public var description: String? { + get { + return graphQLMap["description"] as! String? + } + set { + graphQLMap.updateValue(newValue, forKey: "description") + } + } +} + +public struct DeleteTodoInput: GraphQLMapConvertible { + public var graphQLMap: GraphQLMap + + public init(id: GraphQLID) { + graphQLMap = ["id": id] + } + + public var id: GraphQLID { + get { + return graphQLMap["id"] as! GraphQLID + } + set { + graphQLMap.updateValue(newValue, forKey: "id") + } + } +} + +public struct ModelTodoFilterInput: GraphQLMapConvertible { + public var graphQLMap: GraphQLMap + + public init(id: ModelIDInput? = nil, name: ModelStringInput? = nil, description: ModelStringInput? = nil, and: [ModelTodoFilterInput?]? = nil, or: [ModelTodoFilterInput?]? = nil, not: ModelTodoFilterInput? = nil) { + graphQLMap = ["id": id, "name": name, "description": description, "and": and, "or": or, "not": not] + } + + public var id: ModelIDInput? { + get { + return graphQLMap["id"] as! ModelIDInput? + } + set { + graphQLMap.updateValue(newValue, forKey: "id") + } + } + + public var name: ModelStringInput? { + get { + return graphQLMap["name"] as! ModelStringInput? + } + set { + graphQLMap.updateValue(newValue, forKey: "name") + } + } + + public var description: ModelStringInput? { + get { + return graphQLMap["description"] as! ModelStringInput? + } + set { + graphQLMap.updateValue(newValue, forKey: "description") + } + } + + public var and: [ModelTodoFilterInput?]? { + get { + return graphQLMap["and"] as! [ModelTodoFilterInput?]? + } + set { + graphQLMap.updateValue(newValue, forKey: "and") + } + } + + public var or: [ModelTodoFilterInput?]? { + get { + return graphQLMap["or"] as! [ModelTodoFilterInput?]? + } + set { + graphQLMap.updateValue(newValue, forKey: "or") + } + } + + public var not: ModelTodoFilterInput? { + get { + return graphQLMap["not"] as! ModelTodoFilterInput? + } + set { + graphQLMap.updateValue(newValue, forKey: "not") + } + } +} + +public struct ModelIDInput: GraphQLMapConvertible { + public var graphQLMap: GraphQLMap + + public init(ne: GraphQLID? = nil, eq: GraphQLID? = nil, le: GraphQLID? = nil, lt: GraphQLID? = nil, ge: GraphQLID? = nil, gt: GraphQLID? = nil, contains: GraphQLID? = nil, notContains: GraphQLID? = nil, between: [GraphQLID?]? = nil, beginsWith: GraphQLID? = nil, attributeExists: Bool? = nil, attributeType: ModelAttributeTypes? = nil, size: ModelSizeInput? = nil) { + graphQLMap = ["ne": ne, "eq": eq, "le": le, "lt": lt, "ge": ge, "gt": gt, "contains": contains, "notContains": notContains, "between": between, "beginsWith": beginsWith, "attributeExists": attributeExists, "attributeType": attributeType, "size": size] + } + + public var ne: GraphQLID? { + get { + return graphQLMap["ne"] as! GraphQLID? + } + set { + graphQLMap.updateValue(newValue, forKey: "ne") + } + } + + public var eq: GraphQLID? { + get { + return graphQLMap["eq"] as! GraphQLID? + } + set { + graphQLMap.updateValue(newValue, forKey: "eq") + } + } + + public var le: GraphQLID? { + get { + return graphQLMap["le"] as! GraphQLID? + } + set { + graphQLMap.updateValue(newValue, forKey: "le") + } + } + + public var lt: GraphQLID? { + get { + return graphQLMap["lt"] as! GraphQLID? + } + set { + graphQLMap.updateValue(newValue, forKey: "lt") + } + } + + public var ge: GraphQLID? { + get { + return graphQLMap["ge"] as! GraphQLID? + } + set { + graphQLMap.updateValue(newValue, forKey: "ge") + } + } + + public var gt: GraphQLID? { + get { + return graphQLMap["gt"] as! GraphQLID? + } + set { + graphQLMap.updateValue(newValue, forKey: "gt") + } + } + + public var contains: GraphQLID? { + get { + return graphQLMap["contains"] as! GraphQLID? + } + set { + graphQLMap.updateValue(newValue, forKey: "contains") + } + } + + public var notContains: GraphQLID? { + get { + return graphQLMap["notContains"] as! GraphQLID? + } + set { + graphQLMap.updateValue(newValue, forKey: "notContains") + } + } + + public var between: [GraphQLID?]? { + get { + return graphQLMap["between"] as! [GraphQLID?]? + } + set { + graphQLMap.updateValue(newValue, forKey: "between") + } + } + + public var beginsWith: GraphQLID? { + get { + return graphQLMap["beginsWith"] as! GraphQLID? + } + set { + graphQLMap.updateValue(newValue, forKey: "beginsWith") + } + } + + public var attributeExists: Bool? { + get { + return graphQLMap["attributeExists"] as! Bool? + } + set { + graphQLMap.updateValue(newValue, forKey: "attributeExists") + } + } + + public var attributeType: ModelAttributeTypes? { + get { + return graphQLMap["attributeType"] as! ModelAttributeTypes? + } + set { + graphQLMap.updateValue(newValue, forKey: "attributeType") + } + } + + public var size: ModelSizeInput? { + get { + return graphQLMap["size"] as! ModelSizeInput? + } + set { + graphQLMap.updateValue(newValue, forKey: "size") + } + } +} + +public struct ModelSubscriptionTodoFilterInput: GraphQLMapConvertible { + public var graphQLMap: GraphQLMap + + public init(id: ModelSubscriptionIDInput? = nil, name: ModelSubscriptionStringInput? = nil, description: ModelSubscriptionStringInput? = nil, and: [ModelSubscriptionTodoFilterInput?]? = nil, or: [ModelSubscriptionTodoFilterInput?]? = nil) { + graphQLMap = ["id": id, "name": name, "description": description, "and": and, "or": or] + } + + public var id: ModelSubscriptionIDInput? { + get { + return graphQLMap["id"] as! ModelSubscriptionIDInput? + } + set { + graphQLMap.updateValue(newValue, forKey: "id") + } + } + + public var name: ModelSubscriptionStringInput? { + get { + return graphQLMap["name"] as! ModelSubscriptionStringInput? + } + set { + graphQLMap.updateValue(newValue, forKey: "name") + } + } + + public var description: ModelSubscriptionStringInput? { + get { + return graphQLMap["description"] as! ModelSubscriptionStringInput? + } + set { + graphQLMap.updateValue(newValue, forKey: "description") + } + } + + public var and: [ModelSubscriptionTodoFilterInput?]? { + get { + return graphQLMap["and"] as! [ModelSubscriptionTodoFilterInput?]? + } + set { + graphQLMap.updateValue(newValue, forKey: "and") + } + } + + public var or: [ModelSubscriptionTodoFilterInput?]? { + get { + return graphQLMap["or"] as! [ModelSubscriptionTodoFilterInput?]? + } + set { + graphQLMap.updateValue(newValue, forKey: "or") + } + } +} + +public struct ModelSubscriptionIDInput: GraphQLMapConvertible { + public var graphQLMap: GraphQLMap + + public init(ne: GraphQLID? = nil, eq: GraphQLID? = nil, le: GraphQLID? = nil, lt: GraphQLID? = nil, ge: GraphQLID? = nil, gt: GraphQLID? = nil, contains: GraphQLID? = nil, notContains: GraphQLID? = nil, between: [GraphQLID?]? = nil, beginsWith: GraphQLID? = nil, `in`: [GraphQLID?]? = nil, notIn: [GraphQLID?]? = nil) { + graphQLMap = ["ne": ne, "eq": eq, "le": le, "lt": lt, "ge": ge, "gt": gt, "contains": contains, "notContains": notContains, "between": between, "beginsWith": beginsWith, "in": `in`, "notIn": notIn] + } + + public var ne: GraphQLID? { + get { + return graphQLMap["ne"] as! GraphQLID? + } + set { + graphQLMap.updateValue(newValue, forKey: "ne") + } + } + + public var eq: GraphQLID? { + get { + return graphQLMap["eq"] as! GraphQLID? + } + set { + graphQLMap.updateValue(newValue, forKey: "eq") + } + } + + public var le: GraphQLID? { + get { + return graphQLMap["le"] as! GraphQLID? + } + set { + graphQLMap.updateValue(newValue, forKey: "le") + } + } + + public var lt: GraphQLID? { + get { + return graphQLMap["lt"] as! GraphQLID? + } + set { + graphQLMap.updateValue(newValue, forKey: "lt") + } + } + + public var ge: GraphQLID? { + get { + return graphQLMap["ge"] as! GraphQLID? + } + set { + graphQLMap.updateValue(newValue, forKey: "ge") + } + } + + public var gt: GraphQLID? { + get { + return graphQLMap["gt"] as! GraphQLID? + } + set { + graphQLMap.updateValue(newValue, forKey: "gt") + } + } + + public var contains: GraphQLID? { + get { + return graphQLMap["contains"] as! GraphQLID? + } + set { + graphQLMap.updateValue(newValue, forKey: "contains") + } + } + + public var notContains: GraphQLID? { + get { + return graphQLMap["notContains"] as! GraphQLID? + } + set { + graphQLMap.updateValue(newValue, forKey: "notContains") + } + } + + public var between: [GraphQLID?]? { + get { + return graphQLMap["between"] as! [GraphQLID?]? + } + set { + graphQLMap.updateValue(newValue, forKey: "between") + } + } + + public var beginsWith: GraphQLID? { + get { + return graphQLMap["beginsWith"] as! GraphQLID? + } + set { + graphQLMap.updateValue(newValue, forKey: "beginsWith") + } + } + + public var `in`: [GraphQLID?]? { + get { + return graphQLMap["in"] as! [GraphQLID?]? + } + set { + graphQLMap.updateValue(newValue, forKey: "in") + } + } + + public var notIn: [GraphQLID?]? { + get { + return graphQLMap["notIn"] as! [GraphQLID?]? + } + set { + graphQLMap.updateValue(newValue, forKey: "notIn") + } + } +} + +public struct ModelSubscriptionStringInput: GraphQLMapConvertible { + public var graphQLMap: GraphQLMap + + public init(ne: String? = nil, eq: String? = nil, le: String? = nil, lt: String? = nil, ge: String? = nil, gt: String? = nil, contains: String? = nil, notContains: String? = nil, between: [String?]? = nil, beginsWith: String? = nil, `in`: [String?]? = nil, notIn: [String?]? = nil) { + graphQLMap = ["ne": ne, "eq": eq, "le": le, "lt": lt, "ge": ge, "gt": gt, "contains": contains, "notContains": notContains, "between": between, "beginsWith": beginsWith, "in": `in`, "notIn": notIn] + } + + public var ne: String? { + get { + return graphQLMap["ne"] as! String? + } + set { + graphQLMap.updateValue(newValue, forKey: "ne") + } + } + + public var eq: String? { + get { + return graphQLMap["eq"] as! String? + } + set { + graphQLMap.updateValue(newValue, forKey: "eq") + } + } + + public var le: String? { + get { + return graphQLMap["le"] as! String? + } + set { + graphQLMap.updateValue(newValue, forKey: "le") + } + } + + public var lt: String? { + get { + return graphQLMap["lt"] as! String? + } + set { + graphQLMap.updateValue(newValue, forKey: "lt") + } + } + + public var ge: String? { + get { + return graphQLMap["ge"] as! String? + } + set { + graphQLMap.updateValue(newValue, forKey: "ge") + } + } + + public var gt: String? { + get { + return graphQLMap["gt"] as! String? + } + set { + graphQLMap.updateValue(newValue, forKey: "gt") + } + } + + public var contains: String? { + get { + return graphQLMap["contains"] as! String? + } + set { + graphQLMap.updateValue(newValue, forKey: "contains") + } + } + + public var notContains: String? { + get { + return graphQLMap["notContains"] as! String? + } + set { + graphQLMap.updateValue(newValue, forKey: "notContains") + } + } + + public var between: [String?]? { + get { + return graphQLMap["between"] as! [String?]? + } + set { + graphQLMap.updateValue(newValue, forKey: "between") + } + } + + public var beginsWith: String? { + get { + return graphQLMap["beginsWith"] as! String? + } + set { + graphQLMap.updateValue(newValue, forKey: "beginsWith") + } + } + + public var `in`: [String?]? { + get { + return graphQLMap["in"] as! [String?]? + } + set { + graphQLMap.updateValue(newValue, forKey: "in") + } + } + + public var notIn: [String?]? { + get { + return graphQLMap["notIn"] as! [String?]? + } + set { + graphQLMap.updateValue(newValue, forKey: "notIn") + } + } +} + +public final class CreateTodoMutation: GraphQLMutation { + public static let operationString = + "mutation CreateTodo($input: CreateTodoInput!, $condition: ModelTodoConditionInput) {\n createTodo(input: $input, condition: $condition) {\n __typename\n id\n name\n description\n createdAt\n updatedAt\n }\n}" + + public var input: CreateTodoInput + public var condition: ModelTodoConditionInput? + + public init(input: CreateTodoInput, condition: ModelTodoConditionInput? = nil) { + self.input = input + self.condition = condition + } + + public var variables: GraphQLMap? { + return ["input": input, "condition": condition] + } + + public struct Data: GraphQLSelectionSet { + public static let possibleTypes = ["Mutation"] + + public static let selections: [GraphQLSelection] = [ + GraphQLField("createTodo", arguments: ["input": GraphQLVariable("input"), "condition": GraphQLVariable("condition")], type: .object(CreateTodo.selections)), + ] + + public var snapshot: Snapshot + + public init(snapshot: Snapshot) { + self.snapshot = snapshot + } + + public init(createTodo: CreateTodo? = nil) { + self.init(snapshot: ["__typename": "Mutation", "createTodo": createTodo.flatMap { $0.snapshot }]) + } + + public var createTodo: CreateTodo? { + get { + return (snapshot["createTodo"] as? Snapshot).flatMap { CreateTodo(snapshot: $0) } + } + set { + snapshot.updateValue(newValue?.snapshot, forKey: "createTodo") + } + } + + public struct CreateTodo: GraphQLSelectionSet { + public static let possibleTypes = ["Todo"] + + public static let selections: [GraphQLSelection] = [ + GraphQLField("__typename", type: .nonNull(.scalar(String.self))), + GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), + GraphQLField("name", type: .nonNull(.scalar(String.self))), + GraphQLField("description", type: .scalar(String.self)), + GraphQLField("createdAt", type: .nonNull(.scalar(String.self))), + GraphQLField("updatedAt", type: .nonNull(.scalar(String.self))), + ] + + public var snapshot: Snapshot + + public init(snapshot: Snapshot) { + self.snapshot = snapshot + } + + public init(id: GraphQLID, name: String, description: String? = nil, createdAt: String, updatedAt: String) { + self.init(snapshot: ["__typename": "Todo", "id": id, "name": name, "description": description, "createdAt": createdAt, "updatedAt": updatedAt]) + } + + public var __typename: String { + get { + return snapshot["__typename"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "__typename") + } + } + + public var id: GraphQLID { + get { + return snapshot["id"]! as! GraphQLID + } + set { + snapshot.updateValue(newValue, forKey: "id") + } + } + + public var name: String { + get { + return snapshot["name"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "name") + } + } + + public var description: String? { + get { + return snapshot["description"] as? String + } + set { + snapshot.updateValue(newValue, forKey: "description") + } + } + + public var createdAt: String { + get { + return snapshot["createdAt"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "createdAt") + } + } + + public var updatedAt: String { + get { + return snapshot["updatedAt"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "updatedAt") + } + } + } + } +} + +public final class UpdateTodoMutation: GraphQLMutation { + public static let operationString = + "mutation UpdateTodo($input: UpdateTodoInput!, $condition: ModelTodoConditionInput) {\n updateTodo(input: $input, condition: $condition) {\n __typename\n id\n name\n description\n createdAt\n updatedAt\n }\n}" + + public var input: UpdateTodoInput + public var condition: ModelTodoConditionInput? + + public init(input: UpdateTodoInput, condition: ModelTodoConditionInput? = nil) { + self.input = input + self.condition = condition + } + + public var variables: GraphQLMap? { + return ["input": input, "condition": condition] + } + + public struct Data: GraphQLSelectionSet { + public static let possibleTypes = ["Mutation"] + + public static let selections: [GraphQLSelection] = [ + GraphQLField("updateTodo", arguments: ["input": GraphQLVariable("input"), "condition": GraphQLVariable("condition")], type: .object(UpdateTodo.selections)), + ] + + public var snapshot: Snapshot + + public init(snapshot: Snapshot) { + self.snapshot = snapshot + } + + public init(updateTodo: UpdateTodo? = nil) { + self.init(snapshot: ["__typename": "Mutation", "updateTodo": updateTodo.flatMap { $0.snapshot }]) + } + + public var updateTodo: UpdateTodo? { + get { + return (snapshot["updateTodo"] as? Snapshot).flatMap { UpdateTodo(snapshot: $0) } + } + set { + snapshot.updateValue(newValue?.snapshot, forKey: "updateTodo") + } + } + + public struct UpdateTodo: GraphQLSelectionSet { + public static let possibleTypes = ["Todo"] + + public static let selections: [GraphQLSelection] = [ + GraphQLField("__typename", type: .nonNull(.scalar(String.self))), + GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), + GraphQLField("name", type: .nonNull(.scalar(String.self))), + GraphQLField("description", type: .scalar(String.self)), + GraphQLField("createdAt", type: .nonNull(.scalar(String.self))), + GraphQLField("updatedAt", type: .nonNull(.scalar(String.self))), + ] + + public var snapshot: Snapshot + + public init(snapshot: Snapshot) { + self.snapshot = snapshot + } + + public init(id: GraphQLID, name: String, description: String? = nil, createdAt: String, updatedAt: String) { + self.init(snapshot: ["__typename": "Todo", "id": id, "name": name, "description": description, "createdAt": createdAt, "updatedAt": updatedAt]) + } + + public var __typename: String { + get { + return snapshot["__typename"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "__typename") + } + } + + public var id: GraphQLID { + get { + return snapshot["id"]! as! GraphQLID + } + set { + snapshot.updateValue(newValue, forKey: "id") + } + } + + public var name: String { + get { + return snapshot["name"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "name") + } + } + + public var description: String? { + get { + return snapshot["description"] as? String + } + set { + snapshot.updateValue(newValue, forKey: "description") + } + } + + public var createdAt: String { + get { + return snapshot["createdAt"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "createdAt") + } + } + + public var updatedAt: String { + get { + return snapshot["updatedAt"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "updatedAt") + } + } + } + } +} + +public final class DeleteTodoMutation: GraphQLMutation { + public static let operationString = + "mutation DeleteTodo($input: DeleteTodoInput!, $condition: ModelTodoConditionInput) {\n deleteTodo(input: $input, condition: $condition) {\n __typename\n id\n name\n description\n createdAt\n updatedAt\n }\n}" + + public var input: DeleteTodoInput + public var condition: ModelTodoConditionInput? + + public init(input: DeleteTodoInput, condition: ModelTodoConditionInput? = nil) { + self.input = input + self.condition = condition + } + + public var variables: GraphQLMap? { + return ["input": input, "condition": condition] + } + + public struct Data: GraphQLSelectionSet { + public static let possibleTypes = ["Mutation"] + + public static let selections: [GraphQLSelection] = [ + GraphQLField("deleteTodo", arguments: ["input": GraphQLVariable("input"), "condition": GraphQLVariable("condition")], type: .object(DeleteTodo.selections)), + ] + + public var snapshot: Snapshot + + public init(snapshot: Snapshot) { + self.snapshot = snapshot + } + + public init(deleteTodo: DeleteTodo? = nil) { + self.init(snapshot: ["__typename": "Mutation", "deleteTodo": deleteTodo.flatMap { $0.snapshot }]) + } + + public var deleteTodo: DeleteTodo? { + get { + return (snapshot["deleteTodo"] as? Snapshot).flatMap { DeleteTodo(snapshot: $0) } + } + set { + snapshot.updateValue(newValue?.snapshot, forKey: "deleteTodo") + } + } + + public struct DeleteTodo: GraphQLSelectionSet { + public static let possibleTypes = ["Todo"] + + public static let selections: [GraphQLSelection] = [ + GraphQLField("__typename", type: .nonNull(.scalar(String.self))), + GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), + GraphQLField("name", type: .nonNull(.scalar(String.self))), + GraphQLField("description", type: .scalar(String.self)), + GraphQLField("createdAt", type: .nonNull(.scalar(String.self))), + GraphQLField("updatedAt", type: .nonNull(.scalar(String.self))), + ] + + public var snapshot: Snapshot + + public init(snapshot: Snapshot) { + self.snapshot = snapshot + } + + public init(id: GraphQLID, name: String, description: String? = nil, createdAt: String, updatedAt: String) { + self.init(snapshot: ["__typename": "Todo", "id": id, "name": name, "description": description, "createdAt": createdAt, "updatedAt": updatedAt]) + } + + public var __typename: String { + get { + return snapshot["__typename"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "__typename") + } + } + + public var id: GraphQLID { + get { + return snapshot["id"]! as! GraphQLID + } + set { + snapshot.updateValue(newValue, forKey: "id") + } + } + + public var name: String { + get { + return snapshot["name"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "name") + } + } + + public var description: String? { + get { + return snapshot["description"] as? String + } + set { + snapshot.updateValue(newValue, forKey: "description") + } + } + + public var createdAt: String { + get { + return snapshot["createdAt"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "createdAt") + } + } + + public var updatedAt: String { + get { + return snapshot["updatedAt"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "updatedAt") + } + } + } + } +} + +public final class GetTodoQuery: GraphQLQuery { + public static let operationString = + "query GetTodo($id: ID!) {\n getTodo(id: $id) {\n __typename\n id\n name\n description\n createdAt\n updatedAt\n }\n}" + + public var id: GraphQLID + + public init(id: GraphQLID) { + self.id = id + } + + public var variables: GraphQLMap? { + return ["id": id] + } + + public struct Data: GraphQLSelectionSet { + public static let possibleTypes = ["Query"] + + public static let selections: [GraphQLSelection] = [ + GraphQLField("getTodo", arguments: ["id": GraphQLVariable("id")], type: .object(GetTodo.selections)), + ] + + public var snapshot: Snapshot + + public init(snapshot: Snapshot) { + self.snapshot = snapshot + } + + public init(getTodo: GetTodo? = nil) { + self.init(snapshot: ["__typename": "Query", "getTodo": getTodo.flatMap { $0.snapshot }]) + } + + public var getTodo: GetTodo? { + get { + return (snapshot["getTodo"] as? Snapshot).flatMap { GetTodo(snapshot: $0) } + } + set { + snapshot.updateValue(newValue?.snapshot, forKey: "getTodo") + } + } + + public struct GetTodo: GraphQLSelectionSet { + public static let possibleTypes = ["Todo"] + + public static let selections: [GraphQLSelection] = [ + GraphQLField("__typename", type: .nonNull(.scalar(String.self))), + GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), + GraphQLField("name", type: .nonNull(.scalar(String.self))), + GraphQLField("description", type: .scalar(String.self)), + GraphQLField("createdAt", type: .nonNull(.scalar(String.self))), + GraphQLField("updatedAt", type: .nonNull(.scalar(String.self))), + ] + + public var snapshot: Snapshot + + public init(snapshot: Snapshot) { + self.snapshot = snapshot + } + + public init(id: GraphQLID, name: String, description: String? = nil, createdAt: String, updatedAt: String) { + self.init(snapshot: ["__typename": "Todo", "id": id, "name": name, "description": description, "createdAt": createdAt, "updatedAt": updatedAt]) + } + + public var __typename: String { + get { + return snapshot["__typename"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "__typename") + } + } + + public var id: GraphQLID { + get { + return snapshot["id"]! as! GraphQLID + } + set { + snapshot.updateValue(newValue, forKey: "id") + } + } + + public var name: String { + get { + return snapshot["name"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "name") + } + } + + public var description: String? { + get { + return snapshot["description"] as? String + } + set { + snapshot.updateValue(newValue, forKey: "description") + } + } + + public var createdAt: String { + get { + return snapshot["createdAt"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "createdAt") + } + } + + public var updatedAt: String { + get { + return snapshot["updatedAt"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "updatedAt") + } + } + } + } +} + +public final class ListTodosQuery: GraphQLQuery { + public static let operationString = + "query ListTodos($filter: ModelTodoFilterInput, $limit: Int, $nextToken: String) {\n listTodos(filter: $filter, limit: $limit, nextToken: $nextToken) {\n __typename\n items {\n __typename\n id\n name\n description\n createdAt\n updatedAt\n }\n nextToken\n }\n}" + + public var filter: ModelTodoFilterInput? + public var limit: Int? + public var nextToken: String? + + public init(filter: ModelTodoFilterInput? = nil, limit: Int? = nil, nextToken: String? = nil) { + self.filter = filter + self.limit = limit + self.nextToken = nextToken + } + + public var variables: GraphQLMap? { + return ["filter": filter, "limit": limit, "nextToken": nextToken] + } + + public struct Data: GraphQLSelectionSet { + public static let possibleTypes = ["Query"] + + public static let selections: [GraphQLSelection] = [ + GraphQLField("listTodos", arguments: ["filter": GraphQLVariable("filter"), "limit": GraphQLVariable("limit"), "nextToken": GraphQLVariable("nextToken")], type: .object(ListTodo.selections)), + ] + + public var snapshot: Snapshot + + public init(snapshot: Snapshot) { + self.snapshot = snapshot + } + + public init(listTodos: ListTodo? = nil) { + self.init(snapshot: ["__typename": "Query", "listTodos": listTodos.flatMap { $0.snapshot }]) + } + + public var listTodos: ListTodo? { + get { + return (snapshot["listTodos"] as? Snapshot).flatMap { ListTodo(snapshot: $0) } + } + set { + snapshot.updateValue(newValue?.snapshot, forKey: "listTodos") + } + } + + public struct ListTodo: GraphQLSelectionSet { + public static let possibleTypes = ["ModelTodoConnection"] + + public static let selections: [GraphQLSelection] = [ + GraphQLField("__typename", type: .nonNull(.scalar(String.self))), + GraphQLField("items", type: .nonNull(.list(.object(Item.selections)))), + GraphQLField("nextToken", type: .scalar(String.self)), + ] + + public var snapshot: Snapshot + + public init(snapshot: Snapshot) { + self.snapshot = snapshot + } + + public init(items: [Item?], nextToken: String? = nil) { + self.init(snapshot: ["__typename": "ModelTodoConnection", "items": items.map { $0.flatMap { $0.snapshot } }, "nextToken": nextToken]) + } + + public var __typename: String { + get { + return snapshot["__typename"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "__typename") + } + } + + public var items: [Item?] { + get { + return (snapshot["items"] as! [Snapshot?]).map { $0.flatMap { Item(snapshot: $0) } } + } + set { + snapshot.updateValue(newValue.map { $0.flatMap { $0.snapshot } }, forKey: "items") + } + } + + public var nextToken: String? { + get { + return snapshot["nextToken"] as? String + } + set { + snapshot.updateValue(newValue, forKey: "nextToken") + } + } + + public struct Item: GraphQLSelectionSet { + public static let possibleTypes = ["Todo"] + + public static let selections: [GraphQLSelection] = [ + GraphQLField("__typename", type: .nonNull(.scalar(String.self))), + GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), + GraphQLField("name", type: .nonNull(.scalar(String.self))), + GraphQLField("description", type: .scalar(String.self)), + GraphQLField("createdAt", type: .nonNull(.scalar(String.self))), + GraphQLField("updatedAt", type: .nonNull(.scalar(String.self))), + ] + + public var snapshot: Snapshot + + public init(snapshot: Snapshot) { + self.snapshot = snapshot + } + + public init(id: GraphQLID, name: String, description: String? = nil, createdAt: String, updatedAt: String) { + self.init(snapshot: ["__typename": "Todo", "id": id, "name": name, "description": description, "createdAt": createdAt, "updatedAt": updatedAt]) + } + + public var __typename: String { + get { + return snapshot["__typename"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "__typename") + } + } + + public var id: GraphQLID { + get { + return snapshot["id"]! as! GraphQLID + } + set { + snapshot.updateValue(newValue, forKey: "id") + } + } + + public var name: String { + get { + return snapshot["name"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "name") + } + } + + public var description: String? { + get { + return snapshot["description"] as? String + } + set { + snapshot.updateValue(newValue, forKey: "description") + } + } + + public var createdAt: String { + get { + return snapshot["createdAt"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "createdAt") + } + } + + public var updatedAt: String { + get { + return snapshot["updatedAt"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "updatedAt") + } + } + } + } + } +} + +public final class OnCreateTodoSubscription: GraphQLSubscription { + public static let operationString = + "subscription OnCreateTodo($filter: ModelSubscriptionTodoFilterInput) {\n onCreateTodo(filter: $filter) {\n __typename\n id\n name\n description\n createdAt\n updatedAt\n }\n}" + + public var filter: ModelSubscriptionTodoFilterInput? + + public init(filter: ModelSubscriptionTodoFilterInput? = nil) { + self.filter = filter + } + + public var variables: GraphQLMap? { + return ["filter": filter] + } + + public struct Data: GraphQLSelectionSet { + public static let possibleTypes = ["Subscription"] + + public static let selections: [GraphQLSelection] = [ + GraphQLField("onCreateTodo", arguments: ["filter": GraphQLVariable("filter")], type: .object(OnCreateTodo.selections)), + ] + + public var snapshot: Snapshot + + public init(snapshot: Snapshot) { + self.snapshot = snapshot + } + + public init(onCreateTodo: OnCreateTodo? = nil) { + self.init(snapshot: ["__typename": "Subscription", "onCreateTodo": onCreateTodo.flatMap { $0.snapshot }]) + } + + public var onCreateTodo: OnCreateTodo? { + get { + return (snapshot["onCreateTodo"] as? Snapshot).flatMap { OnCreateTodo(snapshot: $0) } + } + set { + snapshot.updateValue(newValue?.snapshot, forKey: "onCreateTodo") + } + } + + public struct OnCreateTodo: GraphQLSelectionSet { + public static let possibleTypes = ["Todo"] + + public static let selections: [GraphQLSelection] = [ + GraphQLField("__typename", type: .nonNull(.scalar(String.self))), + GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), + GraphQLField("name", type: .nonNull(.scalar(String.self))), + GraphQLField("description", type: .scalar(String.self)), + GraphQLField("createdAt", type: .nonNull(.scalar(String.self))), + GraphQLField("updatedAt", type: .nonNull(.scalar(String.self))), + ] + + public var snapshot: Snapshot + + public init(snapshot: Snapshot) { + self.snapshot = snapshot + } + + public init(id: GraphQLID, name: String, description: String? = nil, createdAt: String, updatedAt: String) { + self.init(snapshot: ["__typename": "Todo", "id": id, "name": name, "description": description, "createdAt": createdAt, "updatedAt": updatedAt]) + } + + public var __typename: String { + get { + return snapshot["__typename"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "__typename") + } + } + + public var id: GraphQLID { + get { + return snapshot["id"]! as! GraphQLID + } + set { + snapshot.updateValue(newValue, forKey: "id") + } + } + + public var name: String { + get { + return snapshot["name"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "name") + } + } + + public var description: String? { + get { + return snapshot["description"] as? String + } + set { + snapshot.updateValue(newValue, forKey: "description") + } + } + + public var createdAt: String { + get { + return snapshot["createdAt"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "createdAt") + } + } + + public var updatedAt: String { + get { + return snapshot["updatedAt"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "updatedAt") + } + } + } + } +} + +public final class OnUpdateTodoSubscription: GraphQLSubscription { + public static let operationString = + "subscription OnUpdateTodo($filter: ModelSubscriptionTodoFilterInput) {\n onUpdateTodo(filter: $filter) {\n __typename\n id\n name\n description\n createdAt\n updatedAt\n }\n}" + + public var filter: ModelSubscriptionTodoFilterInput? + + public init(filter: ModelSubscriptionTodoFilterInput? = nil) { + self.filter = filter + } + + public var variables: GraphQLMap? { + return ["filter": filter] + } + + public struct Data: GraphQLSelectionSet { + public static let possibleTypes = ["Subscription"] + + public static let selections: [GraphQLSelection] = [ + GraphQLField("onUpdateTodo", arguments: ["filter": GraphQLVariable("filter")], type: .object(OnUpdateTodo.selections)), + ] + + public var snapshot: Snapshot + + public init(snapshot: Snapshot) { + self.snapshot = snapshot + } + + public init(onUpdateTodo: OnUpdateTodo? = nil) { + self.init(snapshot: ["__typename": "Subscription", "onUpdateTodo": onUpdateTodo.flatMap { $0.snapshot }]) + } + + public var onUpdateTodo: OnUpdateTodo? { + get { + return (snapshot["onUpdateTodo"] as? Snapshot).flatMap { OnUpdateTodo(snapshot: $0) } + } + set { + snapshot.updateValue(newValue?.snapshot, forKey: "onUpdateTodo") + } + } + + public struct OnUpdateTodo: GraphQLSelectionSet { + public static let possibleTypes = ["Todo"] + + public static let selections: [GraphQLSelection] = [ + GraphQLField("__typename", type: .nonNull(.scalar(String.self))), + GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), + GraphQLField("name", type: .nonNull(.scalar(String.self))), + GraphQLField("description", type: .scalar(String.self)), + GraphQLField("createdAt", type: .nonNull(.scalar(String.self))), + GraphQLField("updatedAt", type: .nonNull(.scalar(String.self))), + ] + + public var snapshot: Snapshot + + public init(snapshot: Snapshot) { + self.snapshot = snapshot + } + + public init(id: GraphQLID, name: String, description: String? = nil, createdAt: String, updatedAt: String) { + self.init(snapshot: ["__typename": "Todo", "id": id, "name": name, "description": description, "createdAt": createdAt, "updatedAt": updatedAt]) + } + + public var __typename: String { + get { + return snapshot["__typename"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "__typename") + } + } + + public var id: GraphQLID { + get { + return snapshot["id"]! as! GraphQLID + } + set { + snapshot.updateValue(newValue, forKey: "id") + } + } + + public var name: String { + get { + return snapshot["name"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "name") + } + } + + public var description: String? { + get { + return snapshot["description"] as? String + } + set { + snapshot.updateValue(newValue, forKey: "description") + } + } + + public var createdAt: String { + get { + return snapshot["createdAt"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "createdAt") + } + } + + public var updatedAt: String { + get { + return snapshot["updatedAt"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "updatedAt") + } + } + } + } +} + +public final class OnDeleteTodoSubscription: GraphQLSubscription { + public static let operationString = + "subscription OnDeleteTodo($filter: ModelSubscriptionTodoFilterInput) {\n onDeleteTodo(filter: $filter) {\n __typename\n id\n name\n description\n createdAt\n updatedAt\n }\n}" + + public var filter: ModelSubscriptionTodoFilterInput? + + public init(filter: ModelSubscriptionTodoFilterInput? = nil) { + self.filter = filter + } + + public var variables: GraphQLMap? { + return ["filter": filter] + } + + public struct Data: GraphQLSelectionSet { + public static let possibleTypes = ["Subscription"] + + public static let selections: [GraphQLSelection] = [ + GraphQLField("onDeleteTodo", arguments: ["filter": GraphQLVariable("filter")], type: .object(OnDeleteTodo.selections)), + ] + + public var snapshot: Snapshot + + public init(snapshot: Snapshot) { + self.snapshot = snapshot + } + + public init(onDeleteTodo: OnDeleteTodo? = nil) { + self.init(snapshot: ["__typename": "Subscription", "onDeleteTodo": onDeleteTodo.flatMap { $0.snapshot }]) + } + + public var onDeleteTodo: OnDeleteTodo? { + get { + return (snapshot["onDeleteTodo"] as? Snapshot).flatMap { OnDeleteTodo(snapshot: $0) } + } + set { + snapshot.updateValue(newValue?.snapshot, forKey: "onDeleteTodo") + } + } + + public struct OnDeleteTodo: GraphQLSelectionSet { + public static let possibleTypes = ["Todo"] + + public static let selections: [GraphQLSelection] = [ + GraphQLField("__typename", type: .nonNull(.scalar(String.self))), + GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), + GraphQLField("name", type: .nonNull(.scalar(String.self))), + GraphQLField("description", type: .scalar(String.self)), + GraphQLField("createdAt", type: .nonNull(.scalar(String.self))), + GraphQLField("updatedAt", type: .nonNull(.scalar(String.self))), + ] + + public var snapshot: Snapshot + + public init(snapshot: Snapshot) { + self.snapshot = snapshot + } + + public init(id: GraphQLID, name: String, description: String? = nil, createdAt: String, updatedAt: String) { + self.init(snapshot: ["__typename": "Todo", "id": id, "name": name, "description": description, "createdAt": createdAt, "updatedAt": updatedAt]) + } + + public var __typename: String { + get { + return snapshot["__typename"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "__typename") + } + } + + public var id: GraphQLID { + get { + return snapshot["id"]! as! GraphQLID + } + set { + snapshot.updateValue(newValue, forKey: "id") + } + } + + public var name: String { + get { + return snapshot["name"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "name") + } + } + + public var description: String? { + get { + return snapshot["description"] as? String + } + set { + snapshot.updateValue(newValue, forKey: "description") + } + } + + public var createdAt: String { + get { + return snapshot["createdAt"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "createdAt") + } + } + + public var updatedAt: String { + get { + return snapshot["updatedAt"]! as! String + } + set { + snapshot.updateValue(newValue, forKey: "updatedAt") + } + } + } + } +} \ No newline at end of file diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/README.md b/packages/amplify-frontend-ios/tests/sample-xcode-project/README.md new file mode 100644 index 00000000000..fc70933158b --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/README.md @@ -0,0 +1,17 @@ +This is an example Xcode project with amplify initialized. + +It's used for `xcode.integration.test.js`. That test assumes certain directory layout, i.e. Xcode files and amplify backed with codegen outputs. + +If you have to re-generate this project follow these steps: + +- Purge `sample-xcode-project` directory content. +- Open Xcode and create new project in `sample-xcode-project`, pick defaults. +- Open shell and navigate to `sample-xcode-project`. +- Run `amplify init`, pick `iOS` and `Xcode` as editors +- Add graphql API. `amplify add api` follow wizard pick defaults, i.e. `ToDo` models. +- Run `amplify codegen models`. +- Commit files. + - Make sure to include `amplifyconfiguration.json` and `awsconfiguration.json`, they're git ignored by default when initializing Amplify backend. + - Redact credentials if any. + +This project is never pushed and does not require valid credentials. We just need valid project files for `amplify-xcode` to work. diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/.config/project-config.json b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/.config/project-config.json new file mode 100644 index 00000000000..6395a080d02 --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/.config/project-config.json @@ -0,0 +1,8 @@ +{ + "projectName": "samplexcodeproject", + "version": "3.1", + "frontend": "ios", + "providers": [ + "awscloudformation" + ] +} \ No newline at end of file diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/README.md b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/README.md new file mode 100644 index 00000000000..7c0a9e285fa --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/README.md @@ -0,0 +1,8 @@ +# Getting Started with Amplify CLI +This directory was generated by [Amplify CLI](https://docs.amplify.aws/cli). + +Helpful resources: +- Amplify documentation: https://docs.amplify.aws +- Amplify CLI documentation: https://docs.amplify.aws/cli +- More details on this folder & generated files: https://docs.amplify.aws/cli/reference/files +- Join Amplify's community: https://amplify.aws/community/ diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/backend/api/samplexcodeproject/cli-inputs.json b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/backend/api/samplexcodeproject/cli-inputs.json new file mode 100644 index 00000000000..2ef28c3fdae --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/backend/api/samplexcodeproject/cli-inputs.json @@ -0,0 +1,11 @@ +{ + "version": 1, + "serviceConfiguration": { + "apiName": "samplexcodeproject", + "serviceName": "AppSync", + "defaultAuthType": { + "mode": "API_KEY", + "expirationTime": 7 + } + } +} \ No newline at end of file diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/backend/api/samplexcodeproject/parameters.json b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/backend/api/samplexcodeproject/parameters.json new file mode 100644 index 00000000000..8c6097ff5e8 --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/backend/api/samplexcodeproject/parameters.json @@ -0,0 +1,5 @@ +{ + "AppSyncApiName": "samplexcodeproject", + "DynamoDBBillingMode": "PAY_PER_REQUEST", + "DynamoDBEnableServerSideEncryption": false +} \ No newline at end of file diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/backend/api/samplexcodeproject/resolvers/README.md b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/backend/api/samplexcodeproject/resolvers/README.md new file mode 100644 index 00000000000..89e564c5b31 --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/backend/api/samplexcodeproject/resolvers/README.md @@ -0,0 +1,2 @@ +Any resolvers that you add in this directory will override the ones automatically generated by Amplify CLI and will be directly copied to the cloud. +For more information, visit [https://docs.amplify.aws/cli/graphql-transformer/resolvers](https://docs.amplify.aws/cli/graphql-transformer/resolvers) \ No newline at end of file diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/backend/api/samplexcodeproject/schema.graphql b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/backend/api/samplexcodeproject/schema.graphql new file mode 100644 index 00000000000..9133bac414d --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/backend/api/samplexcodeproject/schema.graphql @@ -0,0 +1,9 @@ +# This "input" configures a global authorization rule to enable public access to +# all models in this schema. Learn more about authorization rules here: https://docs.amplify.aws/cli/graphql/authorization-rules +input AMPLIFY { globalAuthRule: AuthRule = { allow: public } } # FOR TESTING ONLY! + +type Todo @model { + id: ID! + name: String! + description: String +} diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/backend/api/samplexcodeproject/stacks/CustomResources.json b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/backend/api/samplexcodeproject/stacks/CustomResources.json new file mode 100644 index 00000000000..f95feea378a --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/backend/api/samplexcodeproject/stacks/CustomResources.json @@ -0,0 +1,58 @@ +{ + "AWSTemplateFormatVersion": "2010-09-09", + "Description": "An auto-generated nested stack.", + "Metadata": {}, + "Parameters": { + "AppSyncApiId": { + "Type": "String", + "Description": "The id of the AppSync API associated with this project." + }, + "AppSyncApiName": { + "Type": "String", + "Description": "The name of the AppSync API", + "Default": "AppSyncSimpleTransform" + }, + "env": { + "Type": "String", + "Description": "The environment name. e.g. Dev, Test, or Production", + "Default": "NONE" + }, + "S3DeploymentBucket": { + "Type": "String", + "Description": "The S3 bucket containing all deployment assets for the project." + }, + "S3DeploymentRootKey": { + "Type": "String", + "Description": "An S3 key relative to the S3DeploymentBucket that points to the root\nof the deployment directory." + } + }, + "Resources": { + "EmptyResource": { + "Type": "Custom::EmptyResource", + "Condition": "AlwaysFalse" + } + }, + "Conditions": { + "HasEnvironmentParameter": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "env" + }, + "NONE" + ] + } + ] + }, + "AlwaysFalse": { + "Fn::Equals": ["true", "false"] + } + }, + "Outputs": { + "EmptyOutput": { + "Description": "An empty output. You may delete this if you have at least one resource above.", + "Value": "" + } + } +} diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/backend/api/samplexcodeproject/transform.conf.json b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/backend/api/samplexcodeproject/transform.conf.json new file mode 100644 index 00000000000..98e1e19f038 --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/backend/api/samplexcodeproject/transform.conf.json @@ -0,0 +1,4 @@ +{ + "Version": 5, + "ElasticsearchWarning": true +} \ No newline at end of file diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/backend/backend-config.json b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/backend/backend-config.json new file mode 100644 index 00000000000..e43f49d3f4b --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/backend/backend-config.json @@ -0,0 +1,20 @@ +{ + "api": { + "samplexcodeproject": { + "dependsOn": [], + "output": { + "authConfig": { + "additionalAuthenticationProviders": [], + "defaultAuthentication": { + "apiKeyConfig": { + "apiKeyExpirationDays": 7 + }, + "authenticationType": "API_KEY" + } + } + }, + "providerPlugin": "awscloudformation", + "service": "AppSync" + } + } +} \ No newline at end of file diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/backend/tags.json b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/backend/tags.json new file mode 100644 index 00000000000..b9321d71b83 --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/backend/tags.json @@ -0,0 +1,10 @@ +[ + { + "Key": "user:Stack", + "Value": "{project-env}" + }, + { + "Key": "user:Application", + "Value": "{project-name}" + } +] \ No newline at end of file diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/backend/types/amplify-dependent-resources-ref.d.ts b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/backend/types/amplify-dependent-resources-ref.d.ts new file mode 100644 index 00000000000..b452c807ca4 --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/backend/types/amplify-dependent-resources-ref.d.ts @@ -0,0 +1,9 @@ +export type AmplifyDependentResourcesAttributes = { + "api": { + "samplexcodeproject": { + "GraphQLAPIEndpointOutput": "string", + "GraphQLAPIIdOutput": "string", + "GraphQLAPIKeyOutput": "string" + } + } +} \ No newline at end of file diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/cli.json b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/cli.json new file mode 100644 index 00000000000..1058d7b081f --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/cli.json @@ -0,0 +1,63 @@ +{ + "features": { + "graphqltransformer": { + "addmissingownerfields": true, + "improvepluralization": false, + "validatetypenamereservedwords": true, + "useexperimentalpipelinedtransformer": true, + "enableiterativegsiupdates": true, + "secondarykeyasgsi": true, + "skipoverridemutationinputtypes": true, + "transformerversion": 2, + "suppressschemamigrationprompt": true, + "securityenhancementnotification": false, + "showfieldauthnotification": false, + "usesubusernamefordefaultidentityclaim": true, + "usefieldnameforprimarykeyconnectionfield": false, + "enableautoindexquerynames": true, + "respectprimarykeyattributesonconnectionfield": true, + "shoulddeepmergedirectiveconfigdefaults": false, + "populateownerfieldforstaticgroupauth": true + }, + "frontend-ios": { + "enablexcodeintegration": true + }, + "auth": { + "enablecaseinsensitivity": true, + "useinclusiveterminology": true, + "breakcirculardependency": true, + "forcealiasattributes": false, + "useenabledmfas": true + }, + "codegen": { + "useappsyncmodelgenplugin": true, + "usedocsgeneratorplugin": true, + "usetypesgeneratorplugin": true, + "cleangeneratedmodelsdirectory": true, + "retaincasestyle": true, + "addtimestampfields": true, + "handlelistnullabilitytransparently": true, + "emitauthprovider": true, + "generateindexrules": true, + "enabledartnullsafety": true, + "generatemodelsforlazyloadandcustomselectionset": false + }, + "appsync": { + "generategraphqlpermissions": true + }, + "latestregionsupport": { + "pinpoint": 1, + "translate": 1, + "transcribe": 1, + "rekognition": 1, + "textract": 1, + "comprehend": 1 + }, + "project": { + "overrides": true + } + }, + "debug": { + "shareProjectConfig": false + } +} \ No newline at end of file diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/generated/models/AmplifyModels.swift b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/generated/models/AmplifyModels.swift new file mode 100644 index 00000000000..98a9c172bfd --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/generated/models/AmplifyModels.swift @@ -0,0 +1,13 @@ +// swiftlint:disable all +import Amplify +import Foundation + +// Contains the set of classes that conforms to the `Model` protocol. + +final public class AmplifyModels: AmplifyModelRegistration { + public let version: String = "4401034582a70c60713e1f7f9da3b752" + + public func registerModels(registry: ModelRegistry.Type) { + ModelRegistry.register(modelType: Todo.self) + } +} \ No newline at end of file diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/generated/models/Todo+Schema.swift b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/generated/models/Todo+Schema.swift new file mode 100644 index 00000000000..d3565f62fd8 --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/generated/models/Todo+Schema.swift @@ -0,0 +1,41 @@ +// swiftlint:disable all +import Amplify +import Foundation + +extension Todo { + // MARK: - CodingKeys + public enum CodingKeys: String, ModelKey { + case id + case name + case description + case createdAt + case updatedAt + } + + public static let keys = CodingKeys.self + // MARK: - ModelSchema + + public static let schema = defineSchema { model in + let todo = Todo.keys + + model.listPluralName = "Todos" + model.syncPluralName = "Todos" + + model.attributes( + .primaryKey(fields: [todo.id]) + ) + + model.fields( + .field(todo.id, is: .required, ofType: .string), + .field(todo.name, is: .required, ofType: .string), + .field(todo.description, is: .optional, ofType: .string), + .field(todo.createdAt, is: .optional, isReadOnly: true, ofType: .dateTime), + .field(todo.updatedAt, is: .optional, isReadOnly: true, ofType: .dateTime) + ) + } +} + +extension Todo: ModelIdentifiable { + public typealias IdentifierFormat = ModelIdentifierFormat.Default + public typealias IdentifierProtocol = DefaultModelIdentifier +} \ No newline at end of file diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/generated/models/Todo.swift b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/generated/models/Todo.swift new file mode 100644 index 00000000000..ae7e49ffcfb --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/generated/models/Todo.swift @@ -0,0 +1,32 @@ +// swiftlint:disable all +import Amplify +import Foundation + +public struct Todo: Model { + public let id: String + public var name: String + public var description: String? + public var createdAt: Temporal.DateTime? + public var updatedAt: Temporal.DateTime? + + public init(id: String = UUID().uuidString, + name: String, + description: String? = nil) { + self.init(id: id, + name: name, + description: description, + createdAt: nil, + updatedAt: nil) + } + internal init(id: String = UUID().uuidString, + name: String, + description: String? = nil, + createdAt: Temporal.DateTime? = nil, + updatedAt: Temporal.DateTime? = nil) { + self.id = id + self.name = name + self.description = description + self.createdAt = createdAt + self.updatedAt = updatedAt + } +} \ No newline at end of file diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/hooks/README.md b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/hooks/README.md new file mode 100644 index 00000000000..8fb601eaebe --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/hooks/README.md @@ -0,0 +1,7 @@ +# Command Hooks + +Command hooks can be used to run custom scripts upon Amplify CLI lifecycle events like pre-push, post-add-function, etc. + +To get started, add your script files based on the expected naming convention in this directory. + +Learn more about the script file naming convention, hook parameters, third party dependencies, and advanced configurations at https://docs.amplify.aws/cli/usage/command-hooks diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/team-provider-info.json b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/team-provider-info.json new file mode 100644 index 00000000000..fda84e33a88 --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplify/team-provider-info.json @@ -0,0 +1,20 @@ +{ + "dev": { + "awscloudformation": { + "AuthRoleName": "amplify-samplexcodeproject-dev-90949-authRole", + "UnauthRoleArn": "arn:aws:iam::595032847868:role/amplify-samplexcodeproject-dev-90949-unauthRole", + "AuthRoleArn": "arn:aws:iam::595032847868:role/amplify-samplexcodeproject-dev-90949-authRole", + "Region": "us-west-2", + "DeploymentBucketName": "amplify-samplexcodeproject-dev-90949-deployment", + "UnauthRoleName": "amplify-samplexcodeproject-dev-90949-unauthRole", + "StackName": "amplify-samplexcodeproject-dev-90949", + "StackId": "arn:aws:cloudformation:us-west-2:595032847868:stack/amplify-samplexcodeproject-dev-90949/a6fdb0d0-4298-11ee-9b50-0a9c954e78b3", + "AmplifyAppId": "d19g9qfivk7dw4" + }, + "categories": { + "api": { + "samplexcodeproject": {} + } + } + } +} \ No newline at end of file diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/amplifyconfiguration.json b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplifyconfiguration.json new file mode 100644 index 00000000000..bca4f678ecd --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/amplifyconfiguration.json @@ -0,0 +1,17 @@ +{ + "UserAgent": "aws-amplify-cli/2.0", + "Version": "1.0", + "api": { + "plugins": { + "awsAPIPlugin": { + "samplexcodeproject": { + "endpointType": "GraphQL", + "endpoint": "https://gvjvge2nl5dlxbosyswzqsykve.appsync-api.us-west-2.amazonaws.com/graphql", + "region": "us-west-2", + "authorizationType": "API_KEY", + "apiKey": "REDACTED" + } + } + } + } +} diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/awsconfiguration.json b/packages/amplify-frontend-ios/tests/sample-xcode-project/awsconfiguration.json new file mode 100644 index 00000000000..5a3b3ac7ebf --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/awsconfiguration.json @@ -0,0 +1,16 @@ +{ + "UserAgent": "aws-amplify/cli", + "Version": "0.1.0", + "IdentityManager": { + "Default": {} + }, + "AppSync": { + "Default": { + "ApiUrl": "https://gvjvge2nl5dlxbosyswzqsykve.appsync-api.us-west-2.amazonaws.com/graphql", + "Region": "us-west-2", + "AuthMode": "API_KEY", + "ApiKey": "REDACTED", + "ClientDatabasePrefix": "samplexcodeproject_API_KEY" + } + } +} diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/graphql/mutations.graphql b/packages/amplify-frontend-ios/tests/sample-xcode-project/graphql/mutations.graphql new file mode 100644 index 00000000000..e7b461ce89c --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/graphql/mutations.graphql @@ -0,0 +1,43 @@ +# this is an auto generated file. This will be overwritten + +mutation CreateTodo( + $input: CreateTodoInput! + $condition: ModelTodoConditionInput +) { + createTodo(input: $input, condition: $condition) { + id + name + description + createdAt + updatedAt + __typename + } +} + +mutation UpdateTodo( + $input: UpdateTodoInput! + $condition: ModelTodoConditionInput +) { + updateTodo(input: $input, condition: $condition) { + id + name + description + createdAt + updatedAt + __typename + } +} + +mutation DeleteTodo( + $input: DeleteTodoInput! + $condition: ModelTodoConditionInput +) { + deleteTodo(input: $input, condition: $condition) { + id + name + description + createdAt + updatedAt + __typename + } +} diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/graphql/queries.graphql b/packages/amplify-frontend-ios/tests/sample-xcode-project/graphql/queries.graphql new file mode 100644 index 00000000000..30a90555780 --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/graphql/queries.graphql @@ -0,0 +1,31 @@ +# this is an auto generated file. This will be overwritten + +query GetTodo($id: ID!) { + getTodo(id: $id) { + id + name + description + createdAt + updatedAt + __typename + } +} + +query ListTodos( + $filter: ModelTodoFilterInput + $limit: Int + $nextToken: String +) { + listTodos(filter: $filter, limit: $limit, nextToken: $nextToken) { + items { + id + name + description + createdAt + updatedAt + __typename + } + nextToken + __typename + } +} diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/graphql/schema.json b/packages/amplify-frontend-ios/tests/sample-xcode-project/graphql/schema.json new file mode 100644 index 00000000000..545a1003a3a --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/graphql/schema.json @@ -0,0 +1,2786 @@ +{ + "data" : { + "__schema" : { + "queryType" : { + "name" : "Query" + }, + "mutationType" : { + "name" : "Mutation" + }, + "subscriptionType" : { + "name" : "Subscription" + }, + "types" : [ { + "kind" : "OBJECT", + "name" : "Query", + "description" : null, + "fields" : [ { + "name" : "getTodo", + "description" : null, + "args" : [ { + "name" : "id", + "description" : null, + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "ID", + "ofType" : null + } + }, + "defaultValue" : null + } ], + "type" : { + "kind" : "OBJECT", + "name" : "Todo", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "listTodos", + "description" : null, + "args" : [ { + "name" : "filter", + "description" : null, + "type" : { + "kind" : "INPUT_OBJECT", + "name" : "ModelTodoFilterInput", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "limit", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Int", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "nextToken", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "defaultValue" : null + } ], + "type" : { + "kind" : "OBJECT", + "name" : "ModelTodoConnection", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + } ], + "inputFields" : null, + "interfaces" : [ ], + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "OBJECT", + "name" : "Todo", + "description" : null, + "fields" : [ { + "name" : "id", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "ID", + "ofType" : null + } + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "name", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + } + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "description", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "createdAt", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "AWSDateTime", + "ofType" : null + } + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "updatedAt", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "AWSDateTime", + "ofType" : null + } + }, + "isDeprecated" : false, + "deprecationReason" : null + } ], + "inputFields" : null, + "interfaces" : [ ], + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "SCALAR", + "name" : "ID", + "description" : "Built-in ID", + "fields" : null, + "inputFields" : null, + "interfaces" : null, + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "SCALAR", + "name" : "String", + "description" : "Built-in String", + "fields" : null, + "inputFields" : null, + "interfaces" : null, + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "SCALAR", + "name" : "AWSDateTime", + "description" : "The `AWSDateTime` scalar type provided by AWS AppSync, represents a valid ***extended*** [ISO 8601 DateTime](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) string. In other words, this scalar type accepts datetime strings of the form `YYYY-MM-DDThh:mm:ss.SSSZ`. The scalar can also accept \"negative years\" of the form `-YYYY` which correspond to years before `0000`. For example, \"**-2017-01-01T00:00Z**\" and \"**-9999-01-01T00:00Z**\" are both valid datetime strings. The field after the two digit seconds field is a nanoseconds field. It can accept between 1 and 9 digits. So, for example, \"**1970-01-01T12:00:00.2Z**\", \"**1970-01-01T12:00:00.277Z**\" and \"**1970-01-01T12:00:00.123456789Z**\" are all valid datetime strings. The seconds and nanoseconds fields are optional (the seconds field must be specified if the nanoseconds field is to be used). The [time zone offset](https://en.wikipedia.org/wiki/ISO_8601#Time_zone_designators) is compulsory for this scalar. The time zone offset must either be `Z` (representing the UTC time zone) or be in the format `±hh:mm:ss`. The seconds field in the timezone offset will be considered valid even though it is not part of the ISO 8601 standard.", + "fields" : null, + "inputFields" : null, + "interfaces" : null, + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "OBJECT", + "name" : "ModelTodoConnection", + "description" : null, + "fields" : [ { + "name" : "items", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "OBJECT", + "name" : "Todo", + "ofType" : null + } + } + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "nextToken", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + } ], + "inputFields" : null, + "interfaces" : [ ], + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "INPUT_OBJECT", + "name" : "ModelTodoFilterInput", + "description" : null, + "fields" : null, + "inputFields" : [ { + "name" : "id", + "description" : null, + "type" : { + "kind" : "INPUT_OBJECT", + "name" : "ModelIDInput", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "name", + "description" : null, + "type" : { + "kind" : "INPUT_OBJECT", + "name" : "ModelStringInput", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "description", + "description" : null, + "type" : { + "kind" : "INPUT_OBJECT", + "name" : "ModelStringInput", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "and", + "description" : null, + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "INPUT_OBJECT", + "name" : "ModelTodoFilterInput", + "ofType" : null + } + }, + "defaultValue" : null + }, { + "name" : "or", + "description" : null, + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "INPUT_OBJECT", + "name" : "ModelTodoFilterInput", + "ofType" : null + } + }, + "defaultValue" : null + }, { + "name" : "not", + "description" : null, + "type" : { + "kind" : "INPUT_OBJECT", + "name" : "ModelTodoFilterInput", + "ofType" : null + }, + "defaultValue" : null + } ], + "interfaces" : null, + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "INPUT_OBJECT", + "name" : "ModelIDInput", + "description" : null, + "fields" : null, + "inputFields" : [ { + "name" : "ne", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "ID", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "eq", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "ID", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "le", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "ID", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "lt", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "ID", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "ge", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "ID", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "gt", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "ID", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "contains", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "ID", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "notContains", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "ID", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "between", + "description" : null, + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "ID", + "ofType" : null + } + }, + "defaultValue" : null + }, { + "name" : "beginsWith", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "ID", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "attributeExists", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Boolean", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "attributeType", + "description" : null, + "type" : { + "kind" : "ENUM", + "name" : "ModelAttributeTypes", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "size", + "description" : null, + "type" : { + "kind" : "INPUT_OBJECT", + "name" : "ModelSizeInput", + "ofType" : null + }, + "defaultValue" : null + } ], + "interfaces" : null, + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "SCALAR", + "name" : "Boolean", + "description" : "Built-in Boolean", + "fields" : null, + "inputFields" : null, + "interfaces" : null, + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "ENUM", + "name" : "ModelAttributeTypes", + "description" : null, + "fields" : null, + "inputFields" : null, + "interfaces" : null, + "enumValues" : [ { + "name" : "binary", + "description" : null, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "binarySet", + "description" : null, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "bool", + "description" : null, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "list", + "description" : null, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "map", + "description" : null, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "number", + "description" : null, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "numberSet", + "description" : null, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "string", + "description" : null, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "stringSet", + "description" : null, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "_null", + "description" : null, + "isDeprecated" : false, + "deprecationReason" : null + } ], + "possibleTypes" : null + }, { + "kind" : "INPUT_OBJECT", + "name" : "ModelSizeInput", + "description" : null, + "fields" : null, + "inputFields" : [ { + "name" : "ne", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Int", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "eq", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Int", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "le", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Int", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "lt", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Int", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "ge", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Int", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "gt", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Int", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "between", + "description" : null, + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "Int", + "ofType" : null + } + }, + "defaultValue" : null + } ], + "interfaces" : null, + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "SCALAR", + "name" : "Int", + "description" : "Built-in Int", + "fields" : null, + "inputFields" : null, + "interfaces" : null, + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "INPUT_OBJECT", + "name" : "ModelStringInput", + "description" : null, + "fields" : null, + "inputFields" : [ { + "name" : "ne", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "eq", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "le", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "lt", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "ge", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "gt", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "contains", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "notContains", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "between", + "description" : null, + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + } + }, + "defaultValue" : null + }, { + "name" : "beginsWith", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "attributeExists", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Boolean", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "attributeType", + "description" : null, + "type" : { + "kind" : "ENUM", + "name" : "ModelAttributeTypes", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "size", + "description" : null, + "type" : { + "kind" : "INPUT_OBJECT", + "name" : "ModelSizeInput", + "ofType" : null + }, + "defaultValue" : null + } ], + "interfaces" : null, + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "OBJECT", + "name" : "Mutation", + "description" : null, + "fields" : [ { + "name" : "createTodo", + "description" : null, + "args" : [ { + "name" : "input", + "description" : null, + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "INPUT_OBJECT", + "name" : "CreateTodoInput", + "ofType" : null + } + }, + "defaultValue" : null + }, { + "name" : "condition", + "description" : null, + "type" : { + "kind" : "INPUT_OBJECT", + "name" : "ModelTodoConditionInput", + "ofType" : null + }, + "defaultValue" : null + } ], + "type" : { + "kind" : "OBJECT", + "name" : "Todo", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "updateTodo", + "description" : null, + "args" : [ { + "name" : "input", + "description" : null, + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "INPUT_OBJECT", + "name" : "UpdateTodoInput", + "ofType" : null + } + }, + "defaultValue" : null + }, { + "name" : "condition", + "description" : null, + "type" : { + "kind" : "INPUT_OBJECT", + "name" : "ModelTodoConditionInput", + "ofType" : null + }, + "defaultValue" : null + } ], + "type" : { + "kind" : "OBJECT", + "name" : "Todo", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "deleteTodo", + "description" : null, + "args" : [ { + "name" : "input", + "description" : null, + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "INPUT_OBJECT", + "name" : "DeleteTodoInput", + "ofType" : null + } + }, + "defaultValue" : null + }, { + "name" : "condition", + "description" : null, + "type" : { + "kind" : "INPUT_OBJECT", + "name" : "ModelTodoConditionInput", + "ofType" : null + }, + "defaultValue" : null + } ], + "type" : { + "kind" : "OBJECT", + "name" : "Todo", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + } ], + "inputFields" : null, + "interfaces" : [ ], + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "INPUT_OBJECT", + "name" : "CreateTodoInput", + "description" : null, + "fields" : null, + "inputFields" : [ { + "name" : "id", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "ID", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "name", + "description" : null, + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + } + }, + "defaultValue" : null + }, { + "name" : "description", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "defaultValue" : null + } ], + "interfaces" : null, + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "INPUT_OBJECT", + "name" : "ModelTodoConditionInput", + "description" : null, + "fields" : null, + "inputFields" : [ { + "name" : "name", + "description" : null, + "type" : { + "kind" : "INPUT_OBJECT", + "name" : "ModelStringInput", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "description", + "description" : null, + "type" : { + "kind" : "INPUT_OBJECT", + "name" : "ModelStringInput", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "and", + "description" : null, + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "INPUT_OBJECT", + "name" : "ModelTodoConditionInput", + "ofType" : null + } + }, + "defaultValue" : null + }, { + "name" : "or", + "description" : null, + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "INPUT_OBJECT", + "name" : "ModelTodoConditionInput", + "ofType" : null + } + }, + "defaultValue" : null + }, { + "name" : "not", + "description" : null, + "type" : { + "kind" : "INPUT_OBJECT", + "name" : "ModelTodoConditionInput", + "ofType" : null + }, + "defaultValue" : null + } ], + "interfaces" : null, + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "INPUT_OBJECT", + "name" : "UpdateTodoInput", + "description" : null, + "fields" : null, + "inputFields" : [ { + "name" : "id", + "description" : null, + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "ID", + "ofType" : null + } + }, + "defaultValue" : null + }, { + "name" : "name", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "description", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "defaultValue" : null + } ], + "interfaces" : null, + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "INPUT_OBJECT", + "name" : "DeleteTodoInput", + "description" : null, + "fields" : null, + "inputFields" : [ { + "name" : "id", + "description" : null, + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "ID", + "ofType" : null + } + }, + "defaultValue" : null + } ], + "interfaces" : null, + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "OBJECT", + "name" : "Subscription", + "description" : null, + "fields" : [ { + "name" : "onCreateTodo", + "description" : null, + "args" : [ { + "name" : "filter", + "description" : null, + "type" : { + "kind" : "INPUT_OBJECT", + "name" : "ModelSubscriptionTodoFilterInput", + "ofType" : null + }, + "defaultValue" : null + } ], + "type" : { + "kind" : "OBJECT", + "name" : "Todo", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "onUpdateTodo", + "description" : null, + "args" : [ { + "name" : "filter", + "description" : null, + "type" : { + "kind" : "INPUT_OBJECT", + "name" : "ModelSubscriptionTodoFilterInput", + "ofType" : null + }, + "defaultValue" : null + } ], + "type" : { + "kind" : "OBJECT", + "name" : "Todo", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "onDeleteTodo", + "description" : null, + "args" : [ { + "name" : "filter", + "description" : null, + "type" : { + "kind" : "INPUT_OBJECT", + "name" : "ModelSubscriptionTodoFilterInput", + "ofType" : null + }, + "defaultValue" : null + } ], + "type" : { + "kind" : "OBJECT", + "name" : "Todo", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + } ], + "inputFields" : null, + "interfaces" : [ ], + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "INPUT_OBJECT", + "name" : "ModelSubscriptionTodoFilterInput", + "description" : null, + "fields" : null, + "inputFields" : [ { + "name" : "id", + "description" : null, + "type" : { + "kind" : "INPUT_OBJECT", + "name" : "ModelSubscriptionIDInput", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "name", + "description" : null, + "type" : { + "kind" : "INPUT_OBJECT", + "name" : "ModelSubscriptionStringInput", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "description", + "description" : null, + "type" : { + "kind" : "INPUT_OBJECT", + "name" : "ModelSubscriptionStringInput", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "and", + "description" : null, + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "INPUT_OBJECT", + "name" : "ModelSubscriptionTodoFilterInput", + "ofType" : null + } + }, + "defaultValue" : null + }, { + "name" : "or", + "description" : null, + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "INPUT_OBJECT", + "name" : "ModelSubscriptionTodoFilterInput", + "ofType" : null + } + }, + "defaultValue" : null + } ], + "interfaces" : null, + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "INPUT_OBJECT", + "name" : "ModelSubscriptionIDInput", + "description" : null, + "fields" : null, + "inputFields" : [ { + "name" : "ne", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "ID", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "eq", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "ID", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "le", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "ID", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "lt", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "ID", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "ge", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "ID", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "gt", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "ID", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "contains", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "ID", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "notContains", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "ID", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "between", + "description" : null, + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "ID", + "ofType" : null + } + }, + "defaultValue" : null + }, { + "name" : "beginsWith", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "ID", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "in", + "description" : null, + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "ID", + "ofType" : null + } + }, + "defaultValue" : null + }, { + "name" : "notIn", + "description" : null, + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "ID", + "ofType" : null + } + }, + "defaultValue" : null + } ], + "interfaces" : null, + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "INPUT_OBJECT", + "name" : "ModelSubscriptionStringInput", + "description" : null, + "fields" : null, + "inputFields" : [ { + "name" : "ne", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "eq", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "le", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "lt", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "ge", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "gt", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "contains", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "notContains", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "between", + "description" : null, + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + } + }, + "defaultValue" : null + }, { + "name" : "beginsWith", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "in", + "description" : null, + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + } + }, + "defaultValue" : null + }, { + "name" : "notIn", + "description" : null, + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + } + }, + "defaultValue" : null + } ], + "interfaces" : null, + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "INPUT_OBJECT", + "name" : "ModelSubscriptionIntInput", + "description" : null, + "fields" : null, + "inputFields" : [ { + "name" : "ne", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Int", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "eq", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Int", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "le", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Int", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "lt", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Int", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "ge", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Int", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "gt", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Int", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "between", + "description" : null, + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "Int", + "ofType" : null + } + }, + "defaultValue" : null + }, { + "name" : "in", + "description" : null, + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "Int", + "ofType" : null + } + }, + "defaultValue" : null + }, { + "name" : "notIn", + "description" : null, + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "Int", + "ofType" : null + } + }, + "defaultValue" : null + } ], + "interfaces" : null, + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "INPUT_OBJECT", + "name" : "ModelFloatInput", + "description" : null, + "fields" : null, + "inputFields" : [ { + "name" : "ne", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Float", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "eq", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Float", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "le", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Float", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "lt", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Float", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "ge", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Float", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "gt", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Float", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "between", + "description" : null, + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "Float", + "ofType" : null + } + }, + "defaultValue" : null + }, { + "name" : "attributeExists", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Boolean", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "attributeType", + "description" : null, + "type" : { + "kind" : "ENUM", + "name" : "ModelAttributeTypes", + "ofType" : null + }, + "defaultValue" : null + } ], + "interfaces" : null, + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "SCALAR", + "name" : "Float", + "description" : "Built-in Float", + "fields" : null, + "inputFields" : null, + "interfaces" : null, + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "INPUT_OBJECT", + "name" : "ModelSubscriptionBooleanInput", + "description" : null, + "fields" : null, + "inputFields" : [ { + "name" : "ne", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Boolean", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "eq", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Boolean", + "ofType" : null + }, + "defaultValue" : null + } ], + "interfaces" : null, + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "ENUM", + "name" : "ModelSortDirection", + "description" : null, + "fields" : null, + "inputFields" : null, + "interfaces" : null, + "enumValues" : [ { + "name" : "ASC", + "description" : null, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "DESC", + "description" : null, + "isDeprecated" : false, + "deprecationReason" : null + } ], + "possibleTypes" : null + }, { + "kind" : "INPUT_OBJECT", + "name" : "ModelSubscriptionFloatInput", + "description" : null, + "fields" : null, + "inputFields" : [ { + "name" : "ne", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Float", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "eq", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Float", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "le", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Float", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "lt", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Float", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "ge", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Float", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "gt", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Float", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "between", + "description" : null, + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "Float", + "ofType" : null + } + }, + "defaultValue" : null + }, { + "name" : "in", + "description" : null, + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "Float", + "ofType" : null + } + }, + "defaultValue" : null + }, { + "name" : "notIn", + "description" : null, + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "Float", + "ofType" : null + } + }, + "defaultValue" : null + } ], + "interfaces" : null, + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "INPUT_OBJECT", + "name" : "ModelBooleanInput", + "description" : null, + "fields" : null, + "inputFields" : [ { + "name" : "ne", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Boolean", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "eq", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Boolean", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "attributeExists", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Boolean", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "attributeType", + "description" : null, + "type" : { + "kind" : "ENUM", + "name" : "ModelAttributeTypes", + "ofType" : null + }, + "defaultValue" : null + } ], + "interfaces" : null, + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "INPUT_OBJECT", + "name" : "ModelIntInput", + "description" : null, + "fields" : null, + "inputFields" : [ { + "name" : "ne", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Int", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "eq", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Int", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "le", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Int", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "lt", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Int", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "ge", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Int", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "gt", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Int", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "between", + "description" : null, + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "Int", + "ofType" : null + } + }, + "defaultValue" : null + }, { + "name" : "attributeExists", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Boolean", + "ofType" : null + }, + "defaultValue" : null + }, { + "name" : "attributeType", + "description" : null, + "type" : { + "kind" : "ENUM", + "name" : "ModelAttributeTypes", + "ofType" : null + }, + "defaultValue" : null + } ], + "interfaces" : null, + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "OBJECT", + "name" : "__Schema", + "description" : "A GraphQL Introspection defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, the entry points for query, mutation, and subscription operations.", + "fields" : [ { + "name" : "types", + "description" : "A list of all types supported by this server.", + "args" : [ ], + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "OBJECT", + "name" : "__Type", + "ofType" : null + } + } + } + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "queryType", + "description" : "The type that query operations will be rooted at.", + "args" : [ ], + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "OBJECT", + "name" : "__Type", + "ofType" : null + } + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "mutationType", + "description" : "If this server supports mutation, the type that mutation operations will be rooted at.", + "args" : [ ], + "type" : { + "kind" : "OBJECT", + "name" : "__Type", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "directives", + "description" : "'A list of all directives supported by this server.", + "args" : [ ], + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "OBJECT", + "name" : "__Directive", + "ofType" : null + } + } + } + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "subscriptionType", + "description" : "'If this server support subscription, the type that subscription operations will be rooted at.", + "args" : [ ], + "type" : { + "kind" : "OBJECT", + "name" : "__Type", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + } ], + "inputFields" : null, + "interfaces" : [ ], + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "OBJECT", + "name" : "__Type", + "description" : null, + "fields" : [ { + "name" : "kind", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "ENUM", + "name" : "__TypeKind", + "ofType" : null + } + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "name", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "description", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "fields", + "description" : null, + "args" : [ { + "name" : "includeDeprecated", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Boolean", + "ofType" : null + }, + "defaultValue" : "false" + } ], + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "OBJECT", + "name" : "__Field", + "ofType" : null + } + } + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "interfaces", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "OBJECT", + "name" : "__Type", + "ofType" : null + } + } + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "possibleTypes", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "OBJECT", + "name" : "__Type", + "ofType" : null + } + } + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "enumValues", + "description" : null, + "args" : [ { + "name" : "includeDeprecated", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "Boolean", + "ofType" : null + }, + "defaultValue" : "false" + } ], + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "OBJECT", + "name" : "__EnumValue", + "ofType" : null + } + } + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "inputFields", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "OBJECT", + "name" : "__InputValue", + "ofType" : null + } + } + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "ofType", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "OBJECT", + "name" : "__Type", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + } ], + "inputFields" : null, + "interfaces" : [ ], + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "ENUM", + "name" : "__TypeKind", + "description" : "An enum describing what kind of type a given __Type is", + "fields" : null, + "inputFields" : null, + "interfaces" : null, + "enumValues" : [ { + "name" : "SCALAR", + "description" : "Indicates this type is a scalar.", + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "OBJECT", + "description" : "Indicates this type is an object. `fields` and `interfaces` are valid fields.", + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "INTERFACE", + "description" : "Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.", + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "UNION", + "description" : "Indicates this type is a union. `possibleTypes` is a valid field.", + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "ENUM", + "description" : "Indicates this type is an enum. `enumValues` is a valid field.", + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "INPUT_OBJECT", + "description" : "Indicates this type is an input object. `inputFields` is a valid field.", + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "LIST", + "description" : "Indicates this type is a list. `ofType` is a valid field.", + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "NON_NULL", + "description" : "Indicates this type is a non-null. `ofType` is a valid field.", + "isDeprecated" : false, + "deprecationReason" : null + } ], + "possibleTypes" : null + }, { + "kind" : "OBJECT", + "name" : "__Field", + "description" : null, + "fields" : [ { + "name" : "name", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + } + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "description", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "args", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "OBJECT", + "name" : "__InputValue", + "ofType" : null + } + } + } + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "type", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "OBJECT", + "name" : "__Type", + "ofType" : null + } + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "isDeprecated", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "Boolean", + "ofType" : null + } + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "deprecationReason", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + } ], + "inputFields" : null, + "interfaces" : [ ], + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "OBJECT", + "name" : "__InputValue", + "description" : null, + "fields" : [ { + "name" : "name", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + } + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "description", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "type", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "OBJECT", + "name" : "__Type", + "ofType" : null + } + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "defaultValue", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + } ], + "inputFields" : null, + "interfaces" : [ ], + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "OBJECT", + "name" : "__EnumValue", + "description" : null, + "fields" : [ { + "name" : "name", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + } + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "description", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "isDeprecated", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "Boolean", + "ofType" : null + } + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "deprecationReason", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + } ], + "inputFields" : null, + "interfaces" : [ ], + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "OBJECT", + "name" : "__Directive", + "description" : null, + "fields" : [ { + "name" : "name", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "description", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "locations", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "ENUM", + "name" : "__DirectiveLocation", + "ofType" : null + } + } + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "args", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "OBJECT", + "name" : "__InputValue", + "ofType" : null + } + } + } + }, + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "onOperation", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "SCALAR", + "name" : "Boolean", + "ofType" : null + }, + "isDeprecated" : true, + "deprecationReason" : "Use `locations`." + }, { + "name" : "onFragment", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "SCALAR", + "name" : "Boolean", + "ofType" : null + }, + "isDeprecated" : true, + "deprecationReason" : "Use `locations`." + }, { + "name" : "onField", + "description" : null, + "args" : [ ], + "type" : { + "kind" : "SCALAR", + "name" : "Boolean", + "ofType" : null + }, + "isDeprecated" : true, + "deprecationReason" : "Use `locations`." + } ], + "inputFields" : null, + "interfaces" : [ ], + "enumValues" : null, + "possibleTypes" : null + }, { + "kind" : "ENUM", + "name" : "__DirectiveLocation", + "description" : "An enum describing valid locations where a directive can be placed", + "fields" : null, + "inputFields" : null, + "interfaces" : null, + "enumValues" : [ { + "name" : "QUERY", + "description" : "Indicates the directive is valid on queries.", + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "MUTATION", + "description" : "Indicates the directive is valid on mutations.", + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "FIELD", + "description" : "Indicates the directive is valid on fields.", + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "FRAGMENT_DEFINITION", + "description" : "Indicates the directive is valid on fragment definitions.", + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "FRAGMENT_SPREAD", + "description" : "Indicates the directive is valid on fragment spreads.", + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "INLINE_FRAGMENT", + "description" : "Indicates the directive is valid on inline fragments.", + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "SCHEMA", + "description" : "Indicates the directive is valid on a schema SDL definition.", + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "SCALAR", + "description" : "Indicates the directive is valid on a scalar SDL definition.", + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "OBJECT", + "description" : "Indicates the directive is valid on an object SDL definition.", + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "FIELD_DEFINITION", + "description" : "Indicates the directive is valid on a field SDL definition.", + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "ARGUMENT_DEFINITION", + "description" : "Indicates the directive is valid on a field argument SDL definition.", + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "INTERFACE", + "description" : "Indicates the directive is valid on an interface SDL definition.", + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "UNION", + "description" : "Indicates the directive is valid on an union SDL definition.", + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "ENUM", + "description" : "Indicates the directive is valid on an enum SDL definition.", + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "ENUM_VALUE", + "description" : "Indicates the directive is valid on an enum value SDL definition.", + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "INPUT_OBJECT", + "description" : "Indicates the directive is valid on an input object SDL definition.", + "isDeprecated" : false, + "deprecationReason" : null + }, { + "name" : "INPUT_FIELD_DEFINITION", + "description" : "Indicates the directive is valid on an input object field SDL definition.", + "isDeprecated" : false, + "deprecationReason" : null + } ], + "possibleTypes" : null + } ], + "directives" : [ { + "name" : "include", + "description" : "Directs the executor to include this field or fragment only when the `if` argument is true", + "locations" : [ "FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT" ], + "args" : [ { + "name" : "if", + "description" : "Included when true.", + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "Boolean", + "ofType" : null + } + }, + "defaultValue" : null + } ], + "onOperation" : false, + "onFragment" : true, + "onField" : true + }, { + "name" : "skip", + "description" : "Directs the executor to skip this field or fragment when the `if`'argument is true.", + "locations" : [ "FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT" ], + "args" : [ { + "name" : "if", + "description" : "Skipped when true.", + "type" : { + "kind" : "NON_NULL", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "Boolean", + "ofType" : null + } + }, + "defaultValue" : null + } ], + "onOperation" : false, + "onFragment" : true, + "onField" : true + }, { + "name" : "defer", + "description" : "This directive allows results to be deferred during execution", + "locations" : [ "FIELD" ], + "args" : [ ], + "onOperation" : false, + "onFragment" : false, + "onField" : true + }, { + "name" : "aws_iam", + "description" : "Tells the service this field/object has access authorized by sigv4 signing.", + "locations" : [ "OBJECT", "FIELD_DEFINITION" ], + "args" : [ ], + "onOperation" : false, + "onFragment" : false, + "onField" : false + }, { + "name" : "aws_subscribe", + "description" : "Tells the service which mutation triggers this subscription.", + "locations" : [ "FIELD_DEFINITION" ], + "args" : [ { + "name" : "mutations", + "description" : "List of mutations which will trigger this subscription when they are called.", + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + } + }, + "defaultValue" : null + } ], + "onOperation" : false, + "onFragment" : false, + "onField" : false + }, { + "name" : "deprecated", + "description" : null, + "locations" : [ "FIELD_DEFINITION", "ENUM_VALUE" ], + "args" : [ { + "name" : "reason", + "description" : null, + "type" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + }, + "defaultValue" : "\"No longer supported\"" + } ], + "onOperation" : false, + "onFragment" : false, + "onField" : false + }, { + "name" : "aws_publish", + "description" : "Tells the service which subscriptions will be published to when this mutation is called. This directive is deprecated use @aws_susbscribe directive instead.", + "locations" : [ "FIELD_DEFINITION" ], + "args" : [ { + "name" : "subscriptions", + "description" : "List of subscriptions which will be published to when this mutation is called.", + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + } + }, + "defaultValue" : null + } ], + "onOperation" : false, + "onFragment" : false, + "onField" : false + }, { + "name" : "aws_auth", + "description" : "Directs the schema to enforce authorization on a field", + "locations" : [ "FIELD_DEFINITION" ], + "args" : [ { + "name" : "cognito_groups", + "description" : "List of cognito user pool groups which have access on this field", + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + } + }, + "defaultValue" : null + } ], + "onOperation" : false, + "onFragment" : false, + "onField" : false + }, { + "name" : "aws_api_key", + "description" : "Tells the service this field/object has access authorized by an API key.", + "locations" : [ "OBJECT", "FIELD_DEFINITION" ], + "args" : [ ], + "onOperation" : false, + "onFragment" : false, + "onField" : false + }, { + "name" : "aws_oidc", + "description" : "Tells the service this field/object has access authorized by an OIDC token.", + "locations" : [ "OBJECT", "FIELD_DEFINITION" ], + "args" : [ ], + "onOperation" : false, + "onFragment" : false, + "onField" : false + }, { + "name" : "aws_lambda", + "description" : "Tells the service this field/object has access authorized by a Lambda Authorizer.", + "locations" : [ "OBJECT", "FIELD_DEFINITION" ], + "args" : [ ], + "onOperation" : false, + "onFragment" : false, + "onField" : false + }, { + "name" : "aws_cognito_user_pools", + "description" : "Tells the service this field/object has access authorized by a Cognito User Pools token.", + "locations" : [ "OBJECT", "FIELD_DEFINITION" ], + "args" : [ { + "name" : "cognito_groups", + "description" : "List of cognito user pool groups which have access on this field", + "type" : { + "kind" : "LIST", + "name" : null, + "ofType" : { + "kind" : "SCALAR", + "name" : "String", + "ofType" : null + } + }, + "defaultValue" : null + } ], + "onOperation" : false, + "onFragment" : false, + "onField" : false + } ] + } + } +} \ No newline at end of file diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/graphql/subscriptions.graphql b/packages/amplify-frontend-ios/tests/sample-xcode-project/graphql/subscriptions.graphql new file mode 100644 index 00000000000..9bd85b24fc4 --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/graphql/subscriptions.graphql @@ -0,0 +1,34 @@ +# this is an auto generated file. This will be overwritten + +subscription OnCreateTodo($filter: ModelSubscriptionTodoFilterInput) { + onCreateTodo(filter: $filter) { + id + name + description + createdAt + updatedAt + __typename + } +} + +subscription OnUpdateTodo($filter: ModelSubscriptionTodoFilterInput) { + onUpdateTodo(filter: $filter) { + id + name + description + createdAt + updatedAt + __typename + } +} + +subscription OnDeleteTodo($filter: ModelSubscriptionTodoFilterInput) { + onDeleteTodo(filter: $filter) { + id + name + description + createdAt + updatedAt + __typename + } +} diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project.xcodeproj/project.pbxproj b/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project.xcodeproj/project.pbxproj new file mode 100644 index 00000000000..469573d661f --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project.xcodeproj/project.pbxproj @@ -0,0 +1,391 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + 15698E225C502D8FE35936BB /* AmplifyModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = 517FACFAC5907C34D4D650BE /* AmplifyModels.swift */; }; + 6D8CADDB0186A4D397FB4D87 /* Todo.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEA157D0CB823FBA0F43DD18 /* Todo.swift */; }; + 72DDFE0FED933E1351D5A5C0 /* Todo+Schema.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9C914A21FB5E4214F5A7EF7 /* Todo+Schema.swift */; }; + 90B338CE2A97B78400D80930 /* sample_xcode_projectApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90B338CD2A97B78400D80930 /* sample_xcode_projectApp.swift */; }; + 90B338D02A97B78400D80930 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90B338CF2A97B78400D80930 /* ContentView.swift */; }; + 90B338D22A97B78600D80930 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 90B338D12A97B78600D80930 /* Assets.xcassets */; }; + 90B338D62A97B78600D80930 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 90B338D52A97B78600D80930 /* Preview Assets.xcassets */; }; + DF5CC66E906A4F2DAF29D5C2 /* amplifyconfiguration.json in Resources */ = {isa = PBXBuildFile; fileRef = DCDC8207C7FC40B83770115D /* amplifyconfiguration.json */; }; + EFF7A31765DB26C31D94F411 /* awsconfiguration.json in Resources */ = {isa = PBXBuildFile; fileRef = 58FEFC9F73495A547BE089D3 /* awsconfiguration.json */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 517FACFAC5907C34D4D650BE /* AmplifyModels.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; lastKnownFileType = sourcecode.swift; name = AmplifyModels.swift; path = amplify/generated/models/AmplifyModels.swift; sourceTree = ""; }; + 58FEFC9F73495A547BE089D3 /* awsconfiguration.json */ = {isa = PBXFileReference; explicitFileType = text.json; lastKnownFileType = text.json; name = awsconfiguration.json; path = awsconfiguration.json; sourceTree = ""; }; + 90B338CA2A97B78400D80930 /* sample xcode project.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "sample xcode project.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 90B338CD2A97B78400D80930 /* sample_xcode_projectApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = sample_xcode_projectApp.swift; sourceTree = ""; }; + 90B338CF2A97B78400D80930 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 90B338D12A97B78600D80930 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 90B338D32A97B78600D80930 /* sample_xcode_project.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = sample_xcode_project.entitlements; sourceTree = ""; }; + 90B338D52A97B78600D80930 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + A9C914A21FB5E4214F5A7EF7 /* Todo+Schema.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; lastKnownFileType = sourcecode.swift; name = "Todo+Schema.swift"; path = "amplify/generated/models/Todo+Schema.swift"; sourceTree = ""; }; + DCDC8207C7FC40B83770115D /* amplifyconfiguration.json */ = {isa = PBXFileReference; explicitFileType = text.json; lastKnownFileType = text.json; name = amplifyconfiguration.json; path = amplifyconfiguration.json; sourceTree = ""; }; + DEA157D0CB823FBA0F43DD18 /* Todo.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; lastKnownFileType = sourcecode.swift; name = Todo.swift; path = amplify/generated/models/Todo.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 90B338C72A97B78400D80930 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 3188B6083E00F1E5E4D23FBE /* AmplifyConfig */ = { + isa = PBXGroup; + children = ( + 58FEFC9F73495A547BE089D3 /* awsconfiguration.json */, + DCDC8207C7FC40B83770115D /* amplifyconfiguration.json */, + ); + name = AmplifyConfig; + sourceTree = ""; + }; + 8731FCDE51DDC790EACD8060 /* AmplifyModels */ = { + isa = PBXGroup; + children = ( + 517FACFAC5907C34D4D650BE /* AmplifyModels.swift */, + A9C914A21FB5E4214F5A7EF7 /* Todo+Schema.swift */, + DEA157D0CB823FBA0F43DD18 /* Todo.swift */, + ); + name = AmplifyModels; + sourceTree = ""; + }; + 90B338C12A97B78400D80930 = { + isa = PBXGroup; + children = ( + 90B338CC2A97B78400D80930 /* sample xcode project */, + 90B338CB2A97B78400D80930 /* Products */, + 3188B6083E00F1E5E4D23FBE /* AmplifyConfig */, + 8731FCDE51DDC790EACD8060 /* AmplifyModels */, + ); + sourceTree = ""; + }; + 90B338CB2A97B78400D80930 /* Products */ = { + isa = PBXGroup; + children = ( + 90B338CA2A97B78400D80930 /* sample xcode project.app */, + ); + name = Products; + sourceTree = ""; + }; + 90B338CC2A97B78400D80930 /* sample xcode project */ = { + isa = PBXGroup; + children = ( + 90B338CD2A97B78400D80930 /* sample_xcode_projectApp.swift */, + 90B338CF2A97B78400D80930 /* ContentView.swift */, + 90B338D12A97B78600D80930 /* Assets.xcassets */, + 90B338D32A97B78600D80930 /* sample_xcode_project.entitlements */, + 90B338D42A97B78600D80930 /* Preview Content */, + ); + path = "sample xcode project"; + sourceTree = ""; + }; + 90B338D42A97B78600D80930 /* Preview Content */ = { + isa = PBXGroup; + children = ( + 90B338D52A97B78600D80930 /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 90B338C92A97B78400D80930 /* sample xcode project */ = { + isa = PBXNativeTarget; + buildConfigurationList = 90B338D92A97B78600D80930 /* Build configuration list for PBXNativeTarget "sample xcode project" */; + buildPhases = ( + 90B338C62A97B78400D80930 /* Sources */, + 90B338C72A97B78400D80930 /* Frameworks */, + 90B338C82A97B78400D80930 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "sample xcode project"; + productName = "sample xcode project"; + productReference = 90B338CA2A97B78400D80930 /* sample xcode project.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 90B338C22A97B78400D80930 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1430; + LastUpgradeCheck = 1430; + TargetAttributes = { + 90B338C92A97B78400D80930 = { + CreatedOnToolsVersion = 14.3.1; + }; + }; + }; + buildConfigurationList = 90B338C52A97B78400D80930 /* Build configuration list for PBXProject "sample xcode project" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 90B338C12A97B78400D80930; + productRefGroup = 90B338CB2A97B78400D80930 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 90B338C92A97B78400D80930 /* sample xcode project */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 90B338C82A97B78400D80930 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 90B338D62A97B78600D80930 /* Preview Assets.xcassets in Resources */, + 90B338D22A97B78600D80930 /* Assets.xcassets in Resources */, + EFF7A31765DB26C31D94F411 /* awsconfiguration.json in Resources */, + DF5CC66E906A4F2DAF29D5C2 /* amplifyconfiguration.json in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 90B338C62A97B78400D80930 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 90B338D02A97B78400D80930 /* ContentView.swift in Sources */, + 90B338CE2A97B78400D80930 /* sample_xcode_projectApp.swift in Sources */, + 15698E225C502D8FE35936BB /* AmplifyModels.swift in Sources */, + 72DDFE0FED933E1351D5A5C0 /* Todo+Schema.swift in Sources */, + 6D8CADDB0186A4D397FB4D87 /* Todo.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 90B338D72A97B78600D80930 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 90B338D82A97B78600D80930 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 90B338DA2A97B78600D80930 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = "sample xcode project/sample_xcode_project.entitlements"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"sample xcode project/Preview Content\""; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 16.4; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; + "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 13.3; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.aws.amplify.sample-xcode-project"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 90B338DB2A97B78600D80930 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = "sample xcode project/sample_xcode_project.entitlements"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"sample xcode project/Preview Content\""; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 16.4; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; + "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 13.3; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.aws.amplify.sample-xcode-project"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 90B338C52A97B78400D80930 /* Build configuration list for PBXProject "sample xcode project" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 90B338D72A97B78600D80930 /* Debug */, + 90B338D82A97B78600D80930 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 90B338D92A97B78600D80930 /* Build configuration list for PBXNativeTarget "sample xcode project" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 90B338DA2A97B78600D80930 /* Debug */, + 90B338DB2A97B78600D80930 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 90B338C22A97B78400D80930 /* Project object */; +} diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000000..919434a6254 --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000000..18d981003d6 --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project.xcodeproj/project.xcworkspace/xcuserdata/sobkamil.xcuserdatad/UserInterfaceState.xcuserstate b/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project.xcodeproj/project.xcworkspace/xcuserdata/sobkamil.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 00000000000..706b947f056 Binary files /dev/null and b/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project.xcodeproj/project.xcworkspace/xcuserdata/sobkamil.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project.xcodeproj/xcuserdata/sobkamil.xcuserdatad/xcschemes/xcschememanagement.plist b/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project.xcodeproj/xcuserdata/sobkamil.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 00000000000..4320cfb9f56 --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project.xcodeproj/xcuserdata/sobkamil.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + sample xcode project.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project/Assets.xcassets/AccentColor.colorset/Contents.json b/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 00000000000..eb878970081 --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000000..532cd729c61 --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,63 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "512x512" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "512x512" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project/Assets.xcassets/Contents.json b/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project/Assets.xcassets/Contents.json new file mode 100644 index 00000000000..73c00596a7f --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project/ContentView.swift b/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project/ContentView.swift new file mode 100644 index 00000000000..7c77d12cc2d --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project/ContentView.swift @@ -0,0 +1,26 @@ +// +// ContentView.swift +// sample xcode project +// +// Created by Sobol, Kamil on 8/24/23. +// + +import SwiftUI + +struct ContentView: View { + var body: some View { + VStack { + Image(systemName: "globe") + .imageScale(.large) + .foregroundColor(.accentColor) + Text("Hello, world!") + } + .padding() + } +} + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + ContentView() + } +} diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project/Preview Content/Preview Assets.xcassets/Contents.json b/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 00000000000..73c00596a7f --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project/sample_xcode_project.entitlements b/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project/sample_xcode_project.entitlements new file mode 100644 index 00000000000..f2ef3ae0265 --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project/sample_xcode_project.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + + diff --git a/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project/sample_xcode_projectApp.swift b/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project/sample_xcode_projectApp.swift new file mode 100644 index 00000000000..77e5e57c552 --- /dev/null +++ b/packages/amplify-frontend-ios/tests/sample-xcode-project/sample xcode project/sample_xcode_projectApp.swift @@ -0,0 +1,17 @@ +// +// sample_xcode_projectApp.swift +// sample xcode project +// +// Created by Sobol, Kamil on 8/24/23. +// + +import SwiftUI + +@main +struct sample_xcode_projectApp: App { + var body: some Scene { + WindowGroup { + ContentView() + } + } +} diff --git a/packages/amplify-frontend-ios/tests/xcode.integration.test.js b/packages/amplify-frontend-ios/tests/xcode.integration.test.js new file mode 100644 index 00000000000..de73eacf635 --- /dev/null +++ b/packages/amplify-frontend-ios/tests/xcode.integration.test.js @@ -0,0 +1,57 @@ +const { importConfig, importModels } = require('../lib/amplify-xcode'); +const path = require('path'); +const fs = require('fs/promises'); +const { existsSync } = require('fs'); + +jest.mock('@aws-amplify/amplify-cli-core', () => { + const path = require('path'); + const amplifyIosResourcePath = path.resolve(__dirname, '..'); + return { + pathManager: { + getAmplifyPackageLibDirPath: jest.fn().mockReturnValue(amplifyIosResourcePath), + }, + }; +}); + +describe('Should call amplify-xcode binary', () => { + if (process.platform === 'darwin') { + const pathsToTest = []; + const sampleXcodeProjectPath = path.resolve(__dirname, 'sample-xcode-project'); + const sampleXcodeProjectWithWhiteSpacePath = path.resolve(__dirname, 'sample xcode project'); + beforeAll(async () => { + pathsToTest.push(sampleXcodeProjectPath); + pathsToTest.push(sampleXcodeProjectWithWhiteSpacePath); + if (!existsSync(sampleXcodeProjectWithWhiteSpacePath)) { + await fs.mkdir(sampleXcodeProjectWithWhiteSpacePath); + await fs.cp(sampleXcodeProjectPath, sampleXcodeProjectWithWhiteSpacePath, { + recursive: true, + }); + } + }); + + afterAll(async () => { + if (existsSync(sampleXcodeProjectWithWhiteSpacePath)) { + await fs.rm(sampleXcodeProjectWithWhiteSpacePath, { + recursive: true, + force: true, + }); + } + }); + + it('should importConfig', async () => { + for (const projPath of pathsToTest) { + await importConfig({ path: projPath }); + } + }); + + it('should importModels', async () => { + for (const projPath of pathsToTest) { + await importModels({ path: projPath }); + } + }); + } else { + it('dummy test', () => { + console.log('Xcode integration test can only run on macOS'); + }); + } +}); diff --git a/packages/amplify-frontend-javascript/.npmignore b/packages/amplify-frontend-javascript/.npmignore index 3ee5d55b0b8..22f3c1db9d8 100644 --- a/packages/amplify-frontend-javascript/.npmignore +++ b/packages/amplify-frontend-javascript/.npmignore @@ -1,5 +1,6 @@ **/__mocks__/** **/__tests__/** +**/tests/** src tsconfig.json tsconfig.tsbuildinfo diff --git a/packages/amplify-frontend-javascript/CHANGELOG.md b/packages/amplify-frontend-javascript/CHANGELOG.md index 149711d23e5..b9449289e6d 100644 --- a/packages/amplify-frontend-javascript/CHANGELOG.md +++ b/packages/amplify-frontend-javascript/CHANGELOG.md @@ -3,6 +3,239 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [3.10.19](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-javascript@3.10.18...@aws-amplify/amplify-frontend-javascript@3.10.19) (2025-01-30) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-javascript + + + + + +## [3.10.18](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-javascript@3.10.17...@aws-amplify/amplify-frontend-javascript@3.10.18) (2024-08-02) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-javascript + + + + + +## [3.10.17](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-javascript@3.10.16...@aws-amplify/amplify-frontend-javascript@3.10.17) (2024-06-27) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-javascript + + + + + +## [3.10.16](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-javascript@3.10.15...@aws-amplify/amplify-frontend-javascript@3.10.16) (2024-06-20) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-javascript + + + + + +## [3.10.15](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-javascript@3.10.14...@aws-amplify/amplify-frontend-javascript@3.10.15) (2024-06-06) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-javascript + + + + + +## [3.10.14](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-javascript@3.10.13...@aws-amplify/amplify-frontend-javascript@3.10.14) (2024-05-24) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-javascript + + + + + +## [3.10.13](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-javascript@3.10.12...@aws-amplify/amplify-frontend-javascript@3.10.13) (2024-05-07) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-javascript + + + + + +## [3.10.12](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-javascript@3.10.11...@aws-amplify/amplify-frontend-javascript@3.10.12) (2024-04-18) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-javascript + + + + + +## [3.10.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-javascript@3.10.10...@aws-amplify/amplify-frontend-javascript@3.10.11) (2024-04-15) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-javascript + + + + + +## [3.10.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-javascript@3.10.9...@aws-amplify/amplify-frontend-javascript@3.10.10) (2024-03-29) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-javascript + + + + + +## [3.10.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-javascript@3.10.8...@aws-amplify/amplify-frontend-javascript@3.10.9) (2024-03-06) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-javascript + + + + + +## [3.10.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-javascript@3.10.7...@aws-amplify/amplify-frontend-javascript@3.10.8) (2023-12-11) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-javascript + + + + + +## [3.10.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-javascript@3.10.5...@aws-amplify/amplify-frontend-javascript@3.10.7) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [3.10.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-javascript@3.10.5...@aws-amplify/amplify-frontend-javascript@3.10.6) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-javascript + + + + + +## [3.10.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-javascript@3.10.4...@aws-amplify/amplify-frontend-javascript@3.10.5) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-javascript + + + + + +## [3.10.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-javascript@3.10.3...@aws-amplify/amplify-frontend-javascript@3.10.4) (2023-10-21) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-javascript + + + + + +## [3.10.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-javascript@3.10.2...@aws-amplify/amplify-frontend-javascript@3.10.3) (2023-10-12) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-javascript + + + + + +## [3.10.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-javascript@3.10.1...@aws-amplify/amplify-frontend-javascript@3.10.2) (2023-10-05) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-javascript + + + + + +## [3.10.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-javascript@3.10.0...@aws-amplify/amplify-frontend-javascript@3.10.1) (2023-10-03) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-javascript + + + + + +# [3.10.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-javascript@3.9.16...@aws-amplify/amplify-frontend-javascript@3.10.0) (2023-09-22) + + +### Features + +* **amplify-frontend-javascript:** generate amplifyconfiguration.json for JS projects ([#13246](https://github.com/aws-amplify/amplify-cli/issues/13246)) ([49457b1](https://github.com/aws-amplify/amplify-cli/commit/49457b100a75dc2c6791780fdf67f76876bcf320)) + + + + + +## [3.9.16](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-javascript@3.9.15...@aws-amplify/amplify-frontend-javascript@3.9.16) (2023-08-31) + + +### Bug Fixes + +* exclude tests from publish ([#13153](https://github.com/aws-amplify/amplify-cli/issues/13153)) ([1b1fe09](https://github.com/aws-amplify/amplify-cli/commit/1b1fe09a1c08be0262a1013f71354abd7160722a)) + + + + + +## [3.9.15](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-javascript@3.9.14...@aws-amplify/amplify-frontend-javascript@3.9.15) (2023-08-17) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-javascript + + + + + +## [3.9.14](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-javascript@3.9.13...@aws-amplify/amplify-frontend-javascript@3.9.14) (2023-08-09) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-javascript + + + + + +## [3.9.13](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-javascript@3.9.12...@aws-amplify/amplify-frontend-javascript@3.9.13) (2023-07-28) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-javascript + + + + + +## [3.9.12](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-javascript@3.9.11...@aws-amplify/amplify-frontend-javascript@3.9.12) (2023-07-27) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-javascript + + + + + +## [3.9.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-javascript@3.9.10...@aws-amplify/amplify-frontend-javascript@3.9.11) (2023-07-24) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-javascript + + + + + +## [3.9.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-javascript@3.9.9...@aws-amplify/amplify-frontend-javascript@3.9.10) (2023-07-20) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-javascript + + + + + +## [3.9.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-javascript@3.9.8...@aws-amplify/amplify-frontend-javascript@3.9.9) (2023-06-13) + +**Note:** Version bump only for package @aws-amplify/amplify-frontend-javascript + + + + + ## [3.9.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-frontend-javascript@3.9.6...@aws-amplify/amplify-frontend-javascript@3.9.8) (2023-05-25) diff --git a/packages/amplify-frontend-javascript/index.js b/packages/amplify-frontend-javascript/index.js index 80dd0353d2e..824b157b88e 100644 --- a/packages/amplify-frontend-javascript/index.js +++ b/packages/amplify-frontend-javascript/index.js @@ -37,7 +37,9 @@ async function createFrontendConfigsAtPath(context, amplifyResources, amplifyClo const cloudOutputsForFrontend = amplifyCloudResources.outputsForFrontend; const amplifyConfig = await getAWSExports(context, newOutputsForFrontend, cloudOutputsForFrontend); - await generateAwsExportsAtPath(context, path.join(exportPath, constants.exportsFilename), amplifyConfig); + + context.amplify.writeObjectAsJson(path.join(exportPath, constants.exportsJSONFilename), amplifyConfig, true); + await generateAwsExportsAtPath(context, path.join(exportPath, constants.exportsJSFilename), amplifyConfig); } async function createFrontendConfigs(context, amplifyResources, amplifyCloudResources) { diff --git a/packages/amplify-frontend-javascript/lib/constants.js b/packages/amplify-frontend-javascript/lib/constants.js index 31e7e63cbdf..d5771fcfe2c 100644 --- a/packages/amplify-frontend-javascript/lib/constants.js +++ b/packages/amplify-frontend-javascript/lib/constants.js @@ -3,5 +3,6 @@ module.exports = { ProjectScanBaseScore: 10, ProjectScanMaxScore: 90, configFilename: 'amplify-config.js', - exportsFilename: 'aws-exports.js', + exportsJSFilename: 'aws-exports.js', + exportsJSONFilename: 'amplifyconfiguration.json', }; diff --git a/packages/amplify-frontend-javascript/lib/frontend-config-creator.js b/packages/amplify-frontend-javascript/lib/frontend-config-creator.js index a66d9805c08..478dd222cf3 100644 --- a/packages/amplify-frontend-javascript/lib/frontend-config-creator.js +++ b/packages/amplify-frontend-javascript/lib/frontend-config-creator.js @@ -86,10 +86,14 @@ const fileNames = ['queries', 'mutations', 'subscriptions']; function deleteAmplifyConfig(context) { const { srcDirPath, projectPath } = getSrcDir(context); - // delete aws-exports + // delete aws-exports.js & amplifyConfiguration.json if (fs.existsSync(srcDirPath)) { - const targetFilePath = path.join(srcDirPath, constants.exportsFilename); - fs.removeSync(targetFilePath); + [constants.exportsJSFilename, constants.exportsJSONFilename].forEach((filename) => { + const filepath = path.join(srcDirPath, filename); + if (fs.existsSync(filepath)) { + fs.removeSync(filepath); + } + }); } // eslint-disable-next-line spellcheck/spell-checker if (!fs.existsSync(path.join(projectPath, '.graphqlconfig.yml'))) return; @@ -275,8 +279,7 @@ async function getCurrentAWSExports(context) { const projectPath = exeInfo?.localEnvInfo?.projectPath || amplify.getEnvInfo().projectPath; const { config: frontendConfig } = exeInfo?.projectConfig?.[constants.Label] || amplify.getProjectConfig()[constants.Label]; const srcDirPath = path.join(projectPath, frontendConfig.SourceDir); - - const targetFilePath = path.join(srcDirPath, constants.exportsFilename); + const targetFilePath = path.join(srcDirPath, constants.exportsJSFilename); let awsExports = {}; if (fs.existsSync(targetFilePath)) { @@ -314,8 +317,11 @@ async function generateAWSExportsFile(context, configOutput) { fs.ensureDirSync(srcDirPath); - const targetFilePath = path.join(srcDirPath, constants.exportsFilename); - await generateAwsExportsAtPath(context, targetFilePath, configOutput); + const pathToAwsExportsJS = path.join(srcDirPath, constants.exportsJSFilename); + const pathToAmplifyConfigurationJSON = path.join(srcDirPath, constants.exportsJSONFilename); + + context.amplify.writeObjectAsJson(pathToAmplifyConfigurationJSON, configOutput, true); + await generateAwsExportsAtPath(context, pathToAwsExportsJS, configOutput); } async function generateAwsExportsAtPath(context, targetFilePath, configOutput) { diff --git a/packages/amplify-frontend-javascript/package.json b/packages/amplify-frontend-javascript/package.json index 831412c6592..2fb58186d5f 100644 --- a/packages/amplify-frontend-javascript/package.json +++ b/packages/amplify-frontend-javascript/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-frontend-javascript", - "version": "3.9.8", + "version": "3.10.19", "description": "amplify-cli front-end plugin for JavaScript projects", "scripts": { "test": "jest --logHeapUsage", @@ -23,8 +23,8 @@ "access": "public" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.0.8", - "@babel/core": "^7.10.5", + "@aws-amplify/amplify-cli-core": "4.3.11", + "@babel/core": "^7.23.2", "@babel/plugin-transform-modules-commonjs": "7.10.4", "chalk": "^4.1.1", "execa": "^5.1.1", diff --git a/packages/amplify-function-plugin-interface/API.md b/packages/amplify-function-plugin-interface/API.md index bd123d7585f..72dd925266d 100644 --- a/packages/amplify-function-plugin-interface/API.md +++ b/packages/amplify-function-plugin-interface/API.md @@ -16,6 +16,9 @@ export type BuildRequest = { lastBuildTimeStamp?: Date; lastBuildType?: BuildType; service?: string; + scripts?: { + build: string; + }; }; // @public (undocumented) @@ -108,6 +111,9 @@ export type FunctionParameters = { defaultRuntime?: string; skipAdvancedSection?: boolean; skipNextSteps?: boolean; + scripts?: { + build: string; + }; }; // @public (undocumented) @@ -209,6 +215,10 @@ export interface FunctionTriggerParameters { // (undocumented) roleName: string; // (undocumented) + scripts?: { + build: string; + }; + // (undocumented) skipEdit: boolean; // (undocumented) skipNextSteps?: boolean; diff --git a/packages/amplify-function-plugin-interface/CHANGELOG.md b/packages/amplify-function-plugin-interface/CHANGELOG.md index 7ac9c82c681..9ac0c5583c7 100644 --- a/packages/amplify-function-plugin-interface/CHANGELOG.md +++ b/packages/amplify-function-plugin-interface/CHANGELOG.md @@ -3,6 +3,47 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.12.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-function-plugin-interface@1.11.0...@aws-amplify/amplify-function-plugin-interface@1.12.1) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +# [1.12.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-function-plugin-interface@1.10.3...@aws-amplify/amplify-function-plugin-interface@1.12.0) (2023-11-08) + + +### Features + +* lambda support for yarn2/3 and pnpm package managers ([#12750](https://github.com/aws-amplify/amplify-cli/issues/12750)) ([fd18195](https://github.com/aws-amplify/amplify-cli/commit/fd181952672efb0479ca6955c0c7a45fe248d1b1)) + + + + + +# [1.11.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-function-plugin-interface@1.10.3...@aws-amplify/amplify-function-plugin-interface@1.11.0) (2023-07-20) + + +### Features + +* lambda support for yarn2/3 and pnpm package managers ([#12750](https://github.com/aws-amplify/amplify-cli/issues/12750)) ([fd18195](https://github.com/aws-amplify/amplify-cli/commit/fd181952672efb0479ca6955c0c7a45fe248d1b1)) + + + + + +## [1.10.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-function-plugin-interface@1.10.2...@aws-amplify/amplify-function-plugin-interface@1.10.3) (2023-06-13) + +**Note:** Version bump only for package @aws-amplify/amplify-function-plugin-interface + + + + + ## [1.10.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-function-plugin-interface@1.10.0...@aws-amplify/amplify-function-plugin-interface@1.10.2) (2023-04-14) **Note:** Version bump only for package @aws-amplify/amplify-function-plugin-interface diff --git a/packages/amplify-function-plugin-interface/package.json b/packages/amplify-function-plugin-interface/package.json index 7df8d6b44af..d7a380aaea9 100644 --- a/packages/amplify-function-plugin-interface/package.json +++ b/packages/amplify-function-plugin-interface/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-function-plugin-interface", - "version": "1.10.2", + "version": "1.12.1", "description": "Interface for plugins that provide additional functionality to function category plugins", "repository": { "type": "git", diff --git a/packages/amplify-function-plugin-interface/src/index.ts b/packages/amplify-function-plugin-interface/src/index.ts index e41b95ddd0c..547ec25a4b5 100644 --- a/packages/amplify-function-plugin-interface/src/index.ts +++ b/packages/amplify-function-plugin-interface/src/index.ts @@ -72,6 +72,7 @@ export type BuildRequest = { lastBuildTimeStamp?: Date; lastBuildType?: BuildType; service?: string; + scripts?: { build: string }; }; export enum BuildType { @@ -141,6 +142,7 @@ export type FunctionParameters = { defaultRuntime?: string; skipAdvancedSection?: boolean; skipNextSteps?: boolean; + scripts?: { build: string }; }; /** @@ -169,6 +171,7 @@ export interface FunctionTriggerParameters { cloudResourceTemplatePath?: string; environmentVariables?: Record; skipNextSteps?: boolean; + scripts?: { build: string }; } export interface ProviderContext { diff --git a/packages/amplify-go-function-runtime-provider/CHANGELOG.md b/packages/amplify-go-function-runtime-provider/CHANGELOG.md index 4446629ffa9..8e32f7b037a 100644 --- a/packages/amplify-go-function-runtime-provider/CHANGELOG.md +++ b/packages/amplify-go-function-runtime-provider/CHANGELOG.md @@ -3,6 +3,237 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.3.48](https://github.com/aws-amplify/amplify-cli/compare/amplify-go-function-runtime-provider@2.3.47...amplify-go-function-runtime-provider@2.3.48) (2025-01-30) + +**Note:** Version bump only for package amplify-go-function-runtime-provider + + + + + +## [2.3.47](https://github.com/aws-amplify/amplify-cli/compare/amplify-go-function-runtime-provider@2.3.46...amplify-go-function-runtime-provider@2.3.47) (2024-08-02) + + +### Bug Fixes + +* remove go.exe as argument to go command ([#13789](https://github.com/aws-amplify/amplify-cli/issues/13789)) ([2570d0c](https://github.com/aws-amplify/amplify-cli/commit/2570d0c448b63e6cad419757030fd9f26eb97557)) + + + + + +## [2.3.46](https://github.com/aws-amplify/amplify-cli/compare/amplify-go-function-runtime-provider@2.3.45...amplify-go-function-runtime-provider@2.3.46) (2024-06-27) + +**Note:** Version bump only for package amplify-go-function-runtime-provider + + + + + +## [2.3.45](https://github.com/aws-amplify/amplify-cli/compare/amplify-go-function-runtime-provider@2.3.44...amplify-go-function-runtime-provider@2.3.45) (2024-06-20) + +**Note:** Version bump only for package amplify-go-function-runtime-provider + + + + + +## [2.3.44](https://github.com/aws-amplify/amplify-cli/compare/amplify-go-function-runtime-provider@2.3.43...amplify-go-function-runtime-provider@2.3.44) (2024-06-06) + +**Note:** Version bump only for package amplify-go-function-runtime-provider + + + + + +## [2.3.43](https://github.com/aws-amplify/amplify-cli/compare/amplify-go-function-runtime-provider@2.3.42...amplify-go-function-runtime-provider@2.3.43) (2024-05-24) + + +### Bug Fixes + +* fix Go project with multiple files ([#13765](https://github.com/aws-amplify/amplify-cli/issues/13765)) ([bd5dc93](https://github.com/aws-amplify/amplify-cli/commit/bd5dc939dccc19520d45e6ff1d2e3870b2c9d679)) + + + + + +## [2.3.42](https://github.com/aws-amplify/amplify-cli/compare/amplify-go-function-runtime-provider@2.3.41...amplify-go-function-runtime-provider@2.3.42) (2024-05-07) + +**Note:** Version bump only for package amplify-go-function-runtime-provider + + + + + +## [2.3.41](https://github.com/aws-amplify/amplify-cli/compare/amplify-go-function-runtime-provider@2.3.40...amplify-go-function-runtime-provider@2.3.41) (2024-04-18) + +**Note:** Version bump only for package amplify-go-function-runtime-provider + + + + + +## [2.3.40](https://github.com/aws-amplify/amplify-cli/compare/amplify-go-function-runtime-provider@2.3.39...amplify-go-function-runtime-provider@2.3.40) (2024-04-15) + + +### Bug Fixes + +* upgrade Go runtime and fix e2e ([#13671](https://github.com/aws-amplify/amplify-cli/issues/13671)) ([395f717](https://github.com/aws-amplify/amplify-cli/commit/395f717cf52e7beef76f00ee08d37877138b0c30)) + + + + + +## [2.3.39](https://github.com/aws-amplify/amplify-cli/compare/amplify-go-function-runtime-provider@2.3.38...amplify-go-function-runtime-provider@2.3.39) (2024-03-29) + +**Note:** Version bump only for package amplify-go-function-runtime-provider + + + + + +## [2.3.38](https://github.com/aws-amplify/amplify-cli/compare/amplify-go-function-runtime-provider@2.3.37...amplify-go-function-runtime-provider@2.3.38) (2024-03-06) + +**Note:** Version bump only for package amplify-go-function-runtime-provider + + + + + +## [2.3.37](https://github.com/aws-amplify/amplify-cli/compare/amplify-go-function-runtime-provider@2.3.36...amplify-go-function-runtime-provider@2.3.37) (2023-12-11) + +**Note:** Version bump only for package amplify-go-function-runtime-provider + + + + + +## [2.3.36](https://github.com/aws-amplify/amplify-cli/compare/amplify-go-function-runtime-provider@2.3.34...amplify-go-function-runtime-provider@2.3.36) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [2.3.35](https://github.com/aws-amplify/amplify-cli/compare/amplify-go-function-runtime-provider@2.3.34...amplify-go-function-runtime-provider@2.3.35) (2023-11-08) + +**Note:** Version bump only for package amplify-go-function-runtime-provider + + + + + +## [2.3.34](https://github.com/aws-amplify/amplify-cli/compare/amplify-go-function-runtime-provider@2.3.33...amplify-go-function-runtime-provider@2.3.34) (2023-11-08) + +**Note:** Version bump only for package amplify-go-function-runtime-provider + + + + + +## [2.3.33](https://github.com/aws-amplify/amplify-cli/compare/amplify-go-function-runtime-provider@2.3.32...amplify-go-function-runtime-provider@2.3.33) (2023-10-12) + +**Note:** Version bump only for package amplify-go-function-runtime-provider + + + + + +## [2.3.32](https://github.com/aws-amplify/amplify-cli/compare/amplify-go-function-runtime-provider@2.3.31...amplify-go-function-runtime-provider@2.3.32) (2023-10-05) + +**Note:** Version bump only for package amplify-go-function-runtime-provider + + + + + +## [2.3.31](https://github.com/aws-amplify/amplify-cli/compare/amplify-go-function-runtime-provider@2.3.30...amplify-go-function-runtime-provider@2.3.31) (2023-10-03) + +**Note:** Version bump only for package amplify-go-function-runtime-provider + + + + + +## [2.3.30](https://github.com/aws-amplify/amplify-cli/compare/amplify-go-function-runtime-provider@2.3.29...amplify-go-function-runtime-provider@2.3.30) (2023-09-22) + +**Note:** Version bump only for package amplify-go-function-runtime-provider + + + + + +## [2.3.29](https://github.com/aws-amplify/amplify-cli/compare/amplify-go-function-runtime-provider@2.3.28...amplify-go-function-runtime-provider@2.3.29) (2023-08-31) + +**Note:** Version bump only for package amplify-go-function-runtime-provider + + + + + +## [2.3.28](https://github.com/aws-amplify/amplify-cli/compare/amplify-go-function-runtime-provider@2.3.27...amplify-go-function-runtime-provider@2.3.28) (2023-08-17) + +**Note:** Version bump only for package amplify-go-function-runtime-provider + + + + + +## [2.3.27](https://github.com/aws-amplify/amplify-cli/compare/amplify-go-function-runtime-provider@2.3.26...amplify-go-function-runtime-provider@2.3.27) (2023-08-09) + + +### Bug Fixes + +* Dependabot alerts for semver, tough-cookie ([#12962](https://github.com/aws-amplify/amplify-cli/issues/12962)) ([175a86b](https://github.com/aws-amplify/amplify-cli/commit/175a86b89a54c65bb6e68c0609be503d61e39d63)) + + + + + +## [2.3.26](https://github.com/aws-amplify/amplify-cli/compare/amplify-go-function-runtime-provider@2.3.25...amplify-go-function-runtime-provider@2.3.26) (2023-07-28) + +**Note:** Version bump only for package amplify-go-function-runtime-provider + + + + + +## [2.3.25](https://github.com/aws-amplify/amplify-cli/compare/amplify-go-function-runtime-provider@2.3.24...amplify-go-function-runtime-provider@2.3.25) (2023-07-27) + +**Note:** Version bump only for package amplify-go-function-runtime-provider + + + + + +## [2.3.24](https://github.com/aws-amplify/amplify-cli/compare/amplify-go-function-runtime-provider@2.3.23...amplify-go-function-runtime-provider@2.3.24) (2023-07-24) + +**Note:** Version bump only for package amplify-go-function-runtime-provider + + + + + +## [2.3.23](https://github.com/aws-amplify/amplify-cli/compare/amplify-go-function-runtime-provider@2.3.22...amplify-go-function-runtime-provider@2.3.23) (2023-07-20) + +**Note:** Version bump only for package amplify-go-function-runtime-provider + + + + + +## [2.3.22](https://github.com/aws-amplify/amplify-cli/compare/amplify-go-function-runtime-provider@2.3.21...amplify-go-function-runtime-provider@2.3.22) (2023-06-13) + +**Note:** Version bump only for package amplify-go-function-runtime-provider + + + + + ## [2.3.21](https://github.com/aws-amplify/amplify-cli/compare/amplify-go-function-runtime-provider@2.3.19...amplify-go-function-runtime-provider@2.3.21) (2023-05-25) diff --git a/packages/amplify-go-function-runtime-provider/package.json b/packages/amplify-go-function-runtime-provider/package.json index 31699b736f0..7ecbd57483e 100644 --- a/packages/amplify-go-function-runtime-provider/package.json +++ b/packages/amplify-go-function-runtime-provider/package.json @@ -1,6 +1,6 @@ { "name": "amplify-go-function-runtime-provider", - "version": "2.3.21", + "version": "2.3.48", "description": "Provides functionality related to functions in Go 1.x on AWS", "repository": { "type": "git", @@ -25,14 +25,14 @@ "extract-api": "ts-node ../../scripts/extract-api.ts" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.0.8", - "@aws-amplify/amplify-function-plugin-interface": "1.10.2", + "@aws-amplify/amplify-cli-core": "4.3.11", + "@aws-amplify/amplify-function-plugin-interface": "1.12.1", "archiver": "^5.3.0", "execa": "^5.1.1", "fs-extra": "^8.1.0", "get-port": "^5.1.1", "glob": "^7.2.0", - "semver": "^7.3.5", + "semver": "^7.5.4", "which": "^2.0.2" }, "devDependencies": { diff --git a/packages/amplify-go-function-runtime-provider/src/constants.ts b/packages/amplify-go-function-runtime-provider/src/constants.ts index 49c97e57af0..d53eead0060 100644 --- a/packages/amplify-go-function-runtime-provider/src/constants.ts +++ b/packages/amplify-go-function-runtime-provider/src/constants.ts @@ -6,8 +6,8 @@ export const BIN = 'bin'; export const SRC = 'src'; export const DIST = 'dist'; export const MAIN_SOURCE = 'main.go'; -export const MAIN_BINARY = 'main'; -export const MAIN_BINARY_WIN = 'main.exe'; +export const MAIN_BINARY = 'bootstrap'; +export const MAIN_BINARY_WIN = 'bootstrap.exe'; export const BASE_PORT = 8900; export const MAX_PORT = 9999; diff --git a/packages/amplify-go-function-runtime-provider/src/index.ts b/packages/amplify-go-function-runtime-provider/src/index.ts index af1f3fa44fb..9af4fdc96c8 100644 --- a/packages/amplify-go-function-runtime-provider/src/index.ts +++ b/packages/amplify-go-function-runtime-provider/src/index.ts @@ -12,11 +12,11 @@ export const functionRuntimeContributorFactory: FunctionRuntimeContributorFactor } return Promise.resolve({ runtime: { - name: 'Go 1.x', - value: 'go1.x', - cloudTemplateValue: 'go1.x', - defaultHandler: 'main', - layerExecutablePath: 'go1.x', + name: 'provided.al2023', + value: 'provided.al2023', + cloudTemplateValue: 'provided.al2023', + defaultHandler: 'bootstrap', + layerExecutablePath: 'provided.al2023', }, }); }, diff --git a/packages/amplify-go-function-runtime-provider/src/localinvoke.ts b/packages/amplify-go-function-runtime-provider/src/localinvoke.ts index 62cddff48aa..bd9a063c823 100644 --- a/packages/amplify-go-function-runtime-provider/src/localinvoke.ts +++ b/packages/amplify-go-function-runtime-provider/src/localinvoke.ts @@ -26,7 +26,7 @@ const buildLocalInvoker = async (context: any) => { // Build localInvoker context.print.info('Local invoker binary was not found, building it...'); executeCommand(['mod', 'tidy'], true, undefined, localInvokerDir); - executeCommand(['build', MAIN_SOURCE], true, undefined, localInvokerDir); + executeCommand(['build', '-o', 'bootstrap', MAIN_SOURCE], true, undefined, localInvokerDir); } return { diff --git a/packages/amplify-go-function-runtime-provider/src/runtime.ts b/packages/amplify-go-function-runtime-provider/src/runtime.ts index 2867a5e9be3..7e2403d2485 100644 --- a/packages/amplify-go-function-runtime-provider/src/runtime.ts +++ b/packages/amplify-go-function-runtime-provider/src/runtime.ts @@ -73,8 +73,6 @@ export const buildResource = async ({ buildType, srcRoot, lastBuildTimeStamp }: const outDir = path.join(srcRoot, buildDir); const isWindows = process.platform.startsWith('win'); - const executableName = isWindows && buildType === BuildType.DEV ? MAIN_BINARY_WIN : MAIN_BINARY; - const executablePath = path.join(outDir, executableName); if (!lastBuildTimeStamp || isBuildStale(srcRoot, lastBuildTimeStamp, outDir)) { const srcDir = path.join(srcRoot, SRC); @@ -86,7 +84,7 @@ export const buildResource = async ({ buildType, srcRoot, lastBuildTimeStamp }: fs.mkdirSync(outDir); } - const envVars: any = {}; + const envVars: any = { GOPROXY: 'direct' }; if (buildType === BuildType.PROD) { envVars.GOOS = 'linux'; @@ -95,12 +93,14 @@ export const buildResource = async ({ buildType, srcRoot, lastBuildTimeStamp }: if (isWindows) { envVars.CGO_ENABLED = 0; + executeCommand(['install', 'github.com/aws/aws-lambda-go/cmd/build-lambda-zip@latest'], true, envVars, srcDir); } // for go@1.16, dependencies must be manually installed executeCommand(['mod', 'tidy', '-v'], true, envVars, srcDir); // Execute the build command, cwd must be the source file directory (Windows requires it) - executeCommand(['build', '-o', executablePath, '.'], true, envVars, srcDir); + // Details: https://github.com/aws/aws-lambda-go + executeCommand(['build', '-o', '../bin/bootstrap', '.'], true, envVars, srcDir); rebuilt = true; } diff --git a/packages/amplify-go-function-template-provider/CHANGELOG.md b/packages/amplify-go-function-template-provider/CHANGELOG.md index 7827f352c38..aaf2da0fc8a 100644 --- a/packages/amplify-go-function-template-provider/CHANGELOG.md +++ b/packages/amplify-go-function-template-provider/CHANGELOG.md @@ -3,6 +3,52 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.4.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-go-function-template-provider@1.4.7...@aws-amplify/amplify-go-function-template-provider@1.4.8) (2024-04-15) + + +### Bug Fixes + +* upgrade Go runtime and fix e2e ([#13671](https://github.com/aws-amplify/amplify-cli/issues/13671)) ([395f717](https://github.com/aws-amplify/amplify-cli/commit/395f717cf52e7beef76f00ee08d37877138b0c30)) + + + + + +## [1.4.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-go-function-template-provider@1.4.5...@aws-amplify/amplify-go-function-template-provider@1.4.7) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [1.4.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-go-function-template-provider@1.4.4...@aws-amplify/amplify-go-function-template-provider@1.4.6) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-go-function-template-provider + + + + + +## [1.4.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-go-function-template-provider@1.4.4...@aws-amplify/amplify-go-function-template-provider@1.4.5) (2023-07-20) + +**Note:** Version bump only for package @aws-amplify/amplify-go-function-template-provider + + + + + +## [1.4.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-go-function-template-provider@1.4.3...@aws-amplify/amplify-go-function-template-provider@1.4.4) (2023-06-13) + +**Note:** Version bump only for package @aws-amplify/amplify-go-function-template-provider + + + + + ## [1.4.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-go-function-template-provider@1.4.1...@aws-amplify/amplify-go-function-template-provider@1.4.3) (2023-04-14) **Note:** Version bump only for package @aws-amplify/amplify-go-function-template-provider diff --git a/packages/amplify-go-function-template-provider/amplify-plugin.json b/packages/amplify-go-function-template-provider/amplify-plugin.json index 3a06c1c4895..2415925746b 100644 --- a/packages/amplify-go-function-template-provider/amplify-plugin.json +++ b/packages/amplify-go-function-template-provider/amplify-plugin.json @@ -7,7 +7,7 @@ "conditions": { "provider": "awscloudformation", "services": ["Lambda"], - "runtime": "go1.x" + "runtime": "provided.al2023" }, "templates": [ { diff --git a/packages/amplify-go-function-template-provider/package.json b/packages/amplify-go-function-template-provider/package.json index 332010f6f69..00858c64405 100644 --- a/packages/amplify-go-function-template-provider/package.json +++ b/packages/amplify-go-function-template-provider/package.json @@ -1,7 +1,7 @@ { "name": "@aws-amplify/amplify-go-function-template-provider", - "version": "1.4.3", - "description": "Go 1.x templates supplied by the Amplify Team", + "version": "1.4.8", + "description": "Go templates supplied by the Amplify Team", "repository": { "type": "git", "url": "https://github.com/aws-amplify/amplify-cli.git", @@ -25,7 +25,7 @@ "extract-api": "ts-node ../../scripts/extract-api.ts" }, "dependencies": { - "@aws-amplify/amplify-function-plugin-interface": "1.10.2" + "@aws-amplify/amplify-function-plugin-interface": "1.12.1" }, "devDependencies": { "@types/fs-extra": "^8.0.1", diff --git a/packages/amplify-graphiql-explorer/CHANGELOG.md b/packages/amplify-graphiql-explorer/CHANGELOG.md index a52ee51c619..34fb4daac31 100644 --- a/packages/amplify-graphiql-explorer/CHANGELOG.md +++ b/packages/amplify-graphiql-explorer/CHANGELOG.md @@ -3,6 +3,83 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.6.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-graphiql-explorer@2.5.14...@aws-amplify/amplify-graphiql-explorer@2.6.0) (2024-05-07) + + +### Features + +* support https for mock util plugin ([#13700](https://github.com/aws-amplify/amplify-cli/issues/13700)) ([cf418f1](https://github.com/aws-amplify/amplify-cli/commit/cf418f1d9ebc46fff8e12abe7a61d9a5e4ccdfe7)) + + + + + +## [2.5.14](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-graphiql-explorer@2.5.13...@aws-amplify/amplify-graphiql-explorer@2.5.14) (2024-04-15) + + +### Bug Fixes + +* bump webpack deps version ([#13675](https://github.com/aws-amplify/amplify-cli/issues/13675)) ([41ec40a](https://github.com/aws-amplify/amplify-cli/commit/41ec40a220ec693fd0eeb8b9e4033e00f8bad29e)) +* resolve issues with graphiql explorer ([#13691](https://github.com/aws-amplify/amplify-cli/issues/13691)) ([4d0677d](https://github.com/aws-amplify/amplify-cli/commit/4d0677def73fb0d1c2fb77e30ed8b7c0e34cfebd)) + + + + + +## [2.5.13](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-graphiql-explorer@2.5.12...@aws-amplify/amplify-graphiql-explorer@2.5.13) (2023-12-11) + +**Note:** Version bump only for package @aws-amplify/amplify-graphiql-explorer + + + + + +## [2.5.12](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-graphiql-explorer@2.5.10...@aws-amplify/amplify-graphiql-explorer@2.5.12) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [2.5.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-graphiql-explorer@2.5.10...@aws-amplify/amplify-graphiql-explorer@2.5.11) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-graphiql-explorer + + + + + +## [2.5.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-graphiql-explorer@2.5.9...@aws-amplify/amplify-graphiql-explorer@2.5.10) (2023-10-21) + +**Note:** Version bump only for package @aws-amplify/amplify-graphiql-explorer + + + + + +## [2.5.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-graphiql-explorer@2.5.8...@aws-amplify/amplify-graphiql-explorer@2.5.9) (2023-08-09) + + +### Bug Fixes + +* Dependabot alerts for semver, tough-cookie ([#12962](https://github.com/aws-amplify/amplify-cli/issues/12962)) ([175a86b](https://github.com/aws-amplify/amplify-cli/commit/175a86b89a54c65bb6e68c0609be503d61e39d63)) + + + + + +## [2.5.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-graphiql-explorer@2.5.7...@aws-amplify/amplify-graphiql-explorer@2.5.8) (2023-06-13) + +**Note:** Version bump only for package @aws-amplify/amplify-graphiql-explorer + + + + + ## [2.5.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-graphiql-explorer@2.5.5...@aws-amplify/amplify-graphiql-explorer@2.5.7) (2023-04-14) **Note:** Version bump only for package @aws-amplify/amplify-graphiql-explorer diff --git a/packages/amplify-graphiql-explorer/README.md b/packages/amplify-graphiql-explorer/README.md index 2698c8a68dd..8a8021b987e 100644 --- a/packages/amplify-graphiql-explorer/README.md +++ b/packages/amplify-graphiql-explorer/README.md @@ -4,4 +4,4 @@ This is the package that contains graphiql explorer assets for amplify-appsync-s ## Development Mode -When making changes to grapiql-explore, run `yarn start`. All the requests get proxied to `http://localhost:20002/` +When making changes to grapiql-explorer, run `yarn start`. All the requests get proxied to `http://localhost:20002/` by default (If you use the --https flag on `amplify mock`, change the proxy from `http://localhost:20002/` to `https://localhost:20002/` in package.json.) diff --git a/packages/amplify-graphiql-explorer/package.json b/packages/amplify-graphiql-explorer/package.json index b2dd4b58418..006bed92fb4 100644 --- a/packages/amplify-graphiql-explorer/package.json +++ b/packages/amplify-graphiql-explorer/package.json @@ -1,9 +1,9 @@ { "name": "@aws-amplify/amplify-graphiql-explorer", - "version": "2.5.7", + "version": "2.6.0", "private": true, "dependencies": { - "@babel/core": "^7.16.0", + "@babel/core": "^7.23.2", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.3", "@svgr/webpack": "^5.5.0", "@testing-library/jest-dom": "^5.11.4", @@ -20,8 +20,8 @@ "case-sensitive-paths-webpack-plugin": "^2.4.0", "cross-env": "^7.0.3", "crypto-browserify": "^3.12.0", - "css-loader": "^6.5.1", - "css-minimizer-webpack-plugin": "^3.2.0", + "css-loader": "^6.8.1", + "css-minimizer-webpack-plugin": "^5.0.1", "dotenv": "^10.0.0", "dotenv-expand": "^5.1.0", "eslint": "^8.3.0", @@ -29,17 +29,18 @@ "eslint-webpack-plugin": "^3.1.1", "file-loader": "^6.2.0", "fs-extra": "^10.0.0", - "graphiql": "^1.5.16", + "graphiql": ">=1.5.16 <=1.8.10", "graphiql-explorer": "^0.6.2", "graphql": "^15.5.0", + "graphql-ws": "^5.14.3", "html-webpack-plugin": "^5.5.0", "identity-obj-proxy": "^3.0.0", "jest": "^29.0.0", "jest-resolve": "^26.0.2", "jest-watch-typeahead": "^1.0.0", - "jsonwebtoken": "^9.0.0", + "jose": "^5.2.0", "mini-css-extract-plugin": "^2.4.5", - "postcss": "^8.4.4", + "postcss": "^8.4.31", "postcss-flexbugs-fixes": "^5.0.2", "postcss-loader": "^6.2.1", "postcss-normalize": "^10.0.1", @@ -52,11 +53,11 @@ "react-dom": "^17.0.2", "react-refresh": "^0.11.0", "resolve": "^1.20.0", - "resolve-url-loader": "^4.0.0", + "resolve-url-loader": "^5.0.0", "sass-loader": "^12.3.0", "semantic-ui-css": "^2.5.0", "semantic-ui-react": "^2.1.3", - "semver": "^7.3.5", + "semver": "^7.5.4", "source-map-loader": "^3.0.0", "stream-browserify": "^3.0.0", "style-loader": "^3.3.1", @@ -66,7 +67,7 @@ "util": "^0.12.4", "web-vitals": "^0.2.4", "webpack": "^5.64.4", - "webpack-dev-server": "^4.6.0", + "webpack-dev-server": "^4.15.2", "webpack-manifest-plugin": "^4.0.2", "workbox-webpack-plugin": "^6.4.1" }, diff --git a/packages/amplify-graphiql-explorer/src/App.tsx b/packages/amplify-graphiql-explorer/src/App.tsx index 01eb8ec37eb..e26c1f8a678 100644 --- a/packages/amplify-graphiql-explorer/src/App.tsx +++ b/packages/amplify-graphiql-explorer/src/App.tsx @@ -2,7 +2,7 @@ import GraphiQL from 'graphiql'; import GraphiQLExplorer from 'graphiql-explorer'; import 'graphiql/graphiql.css'; import { buildClientSchema, getIntrospectionQuery, GraphQLSchema, parse } from 'graphql'; -import React, { Component } from 'react'; +import { Component } from 'react'; import 'semantic-ui-css/semantic.min.css'; import './App.css'; import { AuthModal, AUTH_MODE } from './AuthModal'; @@ -125,14 +125,14 @@ class App extends Component<{}, State> { } async componentDidMount() { const apiInfo = await getAPIInfo(); - this.loadCredentials(apiInfo); + await this.loadCredentials(apiInfo); this.setState({ apiInfo }); const introspectionResult = await this.fetch({ query: getIntrospectionQuery(), }); const editor = this._graphiql?.getQueryEditor(); - editor.setOption('extraKeys', { + editor?.setOption('extraKeys', { ...(editor.options.extraKeys || {}), 'Shift-Alt-LeftClick': this._handleInspectOperation, }); @@ -263,7 +263,7 @@ class App extends Component<{}, State> { })); } - loadCredentials(apiInfo = this.state.apiInfo) { + async loadCredentials(apiInfo = this.state.apiInfo) { const credentials = {}; const authProviders = [apiInfo.defaultAuthenticationType, ...apiInfo.additionalAuthenticationProviders]; const possibleAuth = authProviders.map((auth) => auth.authenticationType); @@ -273,12 +273,13 @@ class App extends Component<{}, State> { } if (possibleAuth.includes('AMAZON_COGNITO_USER_POOLS')) { - try { - credentials['cognitoJWTToken'] = refreshToken(window.localStorage.getItem(LOCAL_STORAGE_KEY_NAMES.cognitoToken) || ''); - } catch (e) { + let token = window.localStorage.getItem(LOCAL_STORAGE_KEY_NAMES.cognitoToken); + if (token) { + credentials['cognitoJWTToken'] = await refreshToken(token); + } else { console.warn('Invalid Cognito token found in local storage. Using the default OIDC token'); // token is not valid - credentials['cognitoJWTToken'] = refreshToken(DEFAULT_COGNITO_JWT_TOKEN); + credentials['cognitoJWTToken'] = await refreshToken(DEFAULT_COGNITO_JWT_TOKEN); } } @@ -287,10 +288,10 @@ class App extends Component<{}, State> { .filter((auth) => auth.authenticationType === AUTH_MODE.OPENID_CONNECT) .map((auth: any) => auth.openIDConnectConfig.Issuer); try { - credentials['oidcJWTToken'] = refreshToken(window.localStorage.getItem(LOCAL_STORAGE_KEY_NAMES.oidcToken) || '', issuers[0]); + credentials['oidcJWTToken'] = await refreshToken(window.localStorage.getItem(LOCAL_STORAGE_KEY_NAMES.oidcToken) || '', issuers[0]); } catch (e) { console.warn('Invalid OIDC token found in local storage. Using the default OIDC token'); - credentials['oidcJWTToken'] = refreshToken(DEFAULT_OIDC_JWT_TOKEN, issuers[0]); + credentials['oidcJWTToken'] = await refreshToken(DEFAULT_OIDC_JWT_TOKEN, issuers[0]); } } @@ -329,6 +330,35 @@ class App extends Component<{}, State> { const clearDataModal = clearDataModalVisible ? ( ) : null; + + const buttons = [ + { + onClick: () => this._graphiql?.handlePrettifyQuery(), + label: 'Prettify', + title: 'Prettify Query (Shift-Ctrl-P)', + }, + { + onClick: () => this._graphiql?.handleToggleHistory(), + label: 'History', + title: 'Show History', + }, + { + onClick: this._handleToggleExplorer, + label: 'Explorer', + title: 'Toggle Explorer', + }, + { + onClick: this.toggleAuthModal, + label: 'Update Auth', + title: 'Auth Setting', + }, + { + onClick: this.toggleClearDataModal, + label: 'Clear data', + title: 'Clear Mock Data', + }, + ]; + return ( <> {authModal} @@ -351,23 +381,18 @@ class App extends Component<{}, State> { response={clearResponse} > - this._graphiql?.handlePrettifyQuery()} - label="Prettify" - title="Prettify Query (Shift-Ctrl-P)" - /> - this._graphiql?.handleToggleHistory()} label="History" title="Show History" /> - - - + {buttons.map((button, index) => ( + + ))} - {authModes.map((mode) => ( + {authModes.map((mode, index) => ( this.switchAuthMode(mode)} diff --git a/packages/amplify-graphiql-explorer/src/AuthModal.tsx b/packages/amplify-graphiql-explorer/src/AuthModal.tsx index d4b8399e373..7c889b1ead5 100644 --- a/packages/amplify-graphiql-explorer/src/AuthModal.tsx +++ b/packages/amplify-graphiql-explorer/src/AuthModal.tsx @@ -304,15 +304,15 @@ export class AuthModal extends Component { ); } - onGenerate() { + async onGenerate() { try { const newState = { isOpen: false, }; if (this.state.currentAuthMode === AUTH_MODE.AMAZON_COGNITO_USER_POOLS) { - newState['currentCognitoToken'] = this.generateCognitoJWTToken(); + newState['currentCognitoToken'] = await this.generateCognitoJWTToken(); } else if (this.state.currentAuthMode === AUTH_MODE.OPENID_CONNECT) { - newState['currentOIDCToken'] = this.generateOIDCJWTToken(); + newState['currentOIDCToken'] = await this.generateOIDCJWTToken(); } this.setState(newState, () => { this.onClose(); @@ -320,7 +320,7 @@ export class AuthModal extends Component { } catch (e) {} } - generateCognitoJWTToken() { + async generateCognitoJWTToken() { let additionalFields; try { additionalFields = JSON.parse(this.state.additionalFields?.trim() || '{}'); @@ -348,14 +348,14 @@ export class AuthModal extends Component { tokenPayload['cognito:groups'] = this.state.userGroups; tokenPayload['auth_time'] = Math.floor(Date.now() / 1000); // In seconds - const token = generateToken(tokenPayload); + const token = await generateToken(tokenPayload); return token; } - generateOIDCJWTToken() { + async generateOIDCJWTToken() { const tokenPayload = this.state.currentOIDCTokenDecoded || ''; try { - return generateToken(tokenPayload); + return await generateToken(tokenPayload); } catch (e) { this.setState({ oidcTokenError: e.message, diff --git a/packages/amplify-graphiql-explorer/src/utils/jwt.ts b/packages/amplify-graphiql-explorer/src/utils/jwt.ts index 4a9184090eb..e130926fca0 100644 --- a/packages/amplify-graphiql-explorer/src/utils/jwt.ts +++ b/packages/amplify-graphiql-explorer/src/utils/jwt.ts @@ -1,12 +1,13 @@ -import { decode, sign, verify } from 'jsonwebtoken'; +import { decodeJwt, SignJWT, jwtVerify, JWTPayload } from 'jose'; -export function generateToken(decodedToken: string | object): string { +export async function generateToken(decodedToken: string | object): Promise { try { if (typeof decodedToken === 'string') { decodedToken = JSON.parse(decodedToken); } - const token = sign(decodedToken, 'open-secrete'); - verify(token, 'open-secrete'); + const secret = new TextEncoder().encode('open-secrete'); + const token = await new SignJWT(decodedToken as JWTPayload).setProtectedHeader({ alg: 'HS256' }).sign(secret); + await jwtVerify(token, secret); return token; } catch (e) { const err = new Error('Error when generating OIDC token: ' + e.message); @@ -14,8 +15,11 @@ export function generateToken(decodedToken: string | object): string { } } -export function parse(token): object { - const decodedToken = decode(token); +export function parse(token: string | undefined): object | null { + if (typeof token === 'undefined' || typeof token !== 'string') { + return null; + } + const decodedToken = decodeJwt(token); return decodedToken as object; } @@ -25,7 +29,7 @@ export function parse(token): object { * @param token * @param issuer */ -export function refreshToken(token: string, issuer?: string): string { +export async function refreshToken(token: string, issuer?: string): Promise { const tokenObj: any = parse(token); if (!Object.keys(tokenObj).length) { throw new Error(`Invalid token ${token}`); @@ -34,5 +38,5 @@ export function refreshToken(token: string, issuer?: string): string { tokenObj.iss = issuer; } tokenObj.exp = Math.floor(Date.now() / 100 + 20000); - return generateToken(JSON.stringify(tokenObj)); + return await generateToken(JSON.stringify(tokenObj)); } diff --git a/packages/amplify-graphql-migration-tests/CHANGELOG.md b/packages/amplify-graphql-migration-tests/CHANGELOG.md deleted file mode 100644 index f1a20ba6d62..00000000000 --- a/packages/amplify-graphql-migration-tests/CHANGELOG.md +++ /dev/null @@ -1,620 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [2.4.8](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.4.6...amplify-graphql-migration-tests@2.4.8) (2023-05-25) - - -### Bug Fixes - -* version bump ([f820824](https://github.com/aws-amplify/amplify-cli/commit/f82082416187bd1dd33de9f7b35753026ac17eea)) - - - - - -## [2.4.7](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.4.5...amplify-graphql-migration-tests@2.4.7) (2023-05-25) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.4.6](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.4.5...amplify-graphql-migration-tests@2.4.6) (2023-05-25) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.4.5](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.4.4...amplify-graphql-migration-tests@2.4.5) (2023-05-11) - - - -## 11.0.4 (2023-04-10) - - -### Bug Fixes - -* api hotfix for ownerfield as pk ([#12422](https://github.com/aws-amplify/amplify-cli/issues/12422)) ([fe4347a](https://github.com/aws-amplify/amplify-cli/commit/fe4347a21f7ec45930332e053df9dfe8f526f2c9)) - - - - - -## [2.4.4](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.4.3...amplify-graphql-migration-tests@2.4.4) (2023-04-24) - - -### Bug Fixes - -* fixes unit test and pin gql transformer v1 version ([bfeb9c4](https://github.com/aws-amplify/amplify-cli/commit/bfeb9c421c90a8afced1c89d6430d66705e49a35)) - - - - - -## [2.4.3](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.4.1...amplify-graphql-migration-tests@2.4.3) (2023-04-14) - - -### Bug Fixes - -* **api:** bump api with ownerfield hotfix of 5.1.1 ([dacff4a](https://github.com/aws-amplify/amplify-cli/commit/dacff4ac65fc10d32ab3effbb61c604343f0a1a0)) - - - - - -## [2.4.1](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.4.1-rc.e9e0d157d.0...amplify-graphql-migration-tests@2.4.1) (2023-03-23) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.4.1-rc.e9e0d157d.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.4.0...amplify-graphql-migration-tests@2.4.1-rc.e9e0d157d.0) (2023-03-17) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -# [2.4.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.3.10...amplify-graphql-migration-tests@2.4.0) (2023-03-13) - - -### Features - -* migrate CLI to CDK v2 ([#10988](https://github.com/aws-amplify/amplify-cli/issues/10988)) ([7fd3bc1](https://github.com/aws-amplify/amplify-cli/commit/7fd3bc1cb18a1e6efe0b5abc938debcfc1445e13)), closes [#11230](https://github.com/aws-amplify/amplify-cli/issues/11230) - - - - - -# [2.4.0-beta.8](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.3.7...amplify-graphql-migration-tests@2.4.0-beta.8) (2023-02-23) - - -### Features - -* migrate CLI to CDK v2 ([#10988](https://github.com/aws-amplify/amplify-cli/issues/10988)) ([7fd3bc1](https://github.com/aws-amplify/amplify-cli/commit/7fd3bc1cb18a1e6efe0b5abc938debcfc1445e13)), closes [#11230](https://github.com/aws-amplify/amplify-cli/issues/11230) - - - - - -# [2.4.0-beta.7](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.3.7...amplify-graphql-migration-tests@2.4.0-beta.7) (2023-02-17) - - -### Features - -* migrate CLI to CDK v2 ([#10988](https://github.com/aws-amplify/amplify-cli/issues/10988)) ([7fd3bc1](https://github.com/aws-amplify/amplify-cli/commit/7fd3bc1cb18a1e6efe0b5abc938debcfc1445e13)), closes [#11230](https://github.com/aws-amplify/amplify-cli/issues/11230) - - - - - -# [2.4.0-beta.6](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.3.7...amplify-graphql-migration-tests@2.4.0-beta.6) (2023-02-15) - - -### Features - -* migrate CLI to CDK v2 ([#10988](https://github.com/aws-amplify/amplify-cli/issues/10988)) ([7fd3bc1](https://github.com/aws-amplify/amplify-cli/commit/7fd3bc1cb18a1e6efe0b5abc938debcfc1445e13)), closes [#11230](https://github.com/aws-amplify/amplify-cli/issues/11230) - - - - - -# [2.4.0-beta.5](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.3.7...amplify-graphql-migration-tests@2.4.0-beta.5) (2023-02-07) - - -### Features - -* migrate CLI to CDK v2 ([#10988](https://github.com/aws-amplify/amplify-cli/issues/10988)) ([7fd3bc1](https://github.com/aws-amplify/amplify-cli/commit/7fd3bc1cb18a1e6efe0b5abc938debcfc1445e13)), closes [#11230](https://github.com/aws-amplify/amplify-cli/issues/11230) - - - - - -## [2.3.10](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.3.9...amplify-graphql-migration-tests@2.3.10) (2023-02-28) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.3.9](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.3.8...amplify-graphql-migration-tests@2.3.9) (2023-02-27) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.3.8](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.3.7...amplify-graphql-migration-tests@2.3.8) (2023-02-16) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.3.7](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.3.6...amplify-graphql-migration-tests@2.3.7) (2023-02-02) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.3.6](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.3.5...amplify-graphql-migration-tests@2.3.6) (2023-01-17) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.3.5](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.3.4...amplify-graphql-migration-tests@2.3.5) (2023-01-03) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.3.4](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.3.3...amplify-graphql-migration-tests@2.3.4) (2022-11-17) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.3.3](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.3.2...amplify-graphql-migration-tests@2.3.3) (2022-11-11) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.3.2](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.3.1...amplify-graphql-migration-tests@2.3.2) (2022-10-13) - - -### Bug Fixes - -* updateUserAttributeSetting during add/update/push flows ([#10773](https://github.com/aws-amplify/amplify-cli/issues/10773)) ([52c1e49](https://github.com/aws-amplify/amplify-cli/commit/52c1e49caa5098c37c32c9f2b6f095cfd60454b1)) - - - - - -## [2.3.1](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.48...amplify-graphql-migration-tests@2.3.1) (2022-09-21) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.48](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.48-rc.224a2e0e4.0...amplify-graphql-migration-tests@2.2.48) (2022-09-06) - - - -# 10.0.0-rc.0 (2022-08-24) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.48-rc.224a2e0e4.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.47...amplify-graphql-migration-tests@2.2.48-rc.224a2e0e4.0) (2022-08-15) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.47](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.46...amplify-graphql-migration-tests@2.2.47) (2022-08-06) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.46](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.44...amplify-graphql-migration-tests@2.2.46) (2022-08-02) - - -### Reverts - -* Revert "chore: upgrade api category dependencies" ([7e24faf](https://github.com/aws-amplify/amplify-cli/commit/7e24faf472f96eeb34171b7befa49f4b0da3f7ae)) - - - - - -## [2.2.45](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.44...amplify-graphql-migration-tests@2.2.45) (2022-06-30) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.44](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.43...amplify-graphql-migration-tests@2.2.44) (2022-06-22) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.43](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.42...amplify-graphql-migration-tests@2.2.43) (2022-06-13) - - - -# 8.5.0 (2022-06-10) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.42](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.41...amplify-graphql-migration-tests@2.2.42) (2022-06-03) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.41](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.40...amplify-graphql-migration-tests@2.2.41) (2022-05-24) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.40](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.39...amplify-graphql-migration-tests@2.2.40) (2022-05-10) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.39](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.38...amplify-graphql-migration-tests@2.2.39) (2022-04-29) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.38](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.37...amplify-graphql-migration-tests@2.2.38) (2022-04-27) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.37](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.36...amplify-graphql-migration-tests@2.2.37) (2022-04-18) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.36](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.35...amplify-graphql-migration-tests@2.2.36) (2022-04-11) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.35](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.34...amplify-graphql-migration-tests@2.2.35) (2022-04-07) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.34](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.33...amplify-graphql-migration-tests@2.2.34) (2022-03-23) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.33](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.32...amplify-graphql-migration-tests@2.2.33) (2022-03-17) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.32](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.31...amplify-graphql-migration-tests@2.2.32) (2022-03-14) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.31](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.30...amplify-graphql-migration-tests@2.2.31) (2022-03-07) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.30](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.29...amplify-graphql-migration-tests@2.2.30) (2022-02-25) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.29](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.28...amplify-graphql-migration-tests@2.2.29) (2022-02-15) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.28](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.24...amplify-graphql-migration-tests@2.2.28) (2022-02-10) - - - -## 7.6.19 (2022-02-08) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.24](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.23...amplify-graphql-migration-tests@2.2.24) (2022-02-03) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.23](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.22...amplify-graphql-migration-tests@2.2.23) (2022-01-31) - - - -## 7.6.14 (2022-01-28) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.22](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.21...amplify-graphql-migration-tests@2.2.22) (2022-01-27) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.21](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.20...amplify-graphql-migration-tests@2.2.21) (2022-01-23) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.20](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.19...amplify-graphql-migration-tests@2.2.20) (2022-01-20) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.19](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.18...amplify-graphql-migration-tests@2.2.19) (2022-01-20) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.18](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.17...amplify-graphql-migration-tests@2.2.18) (2022-01-13) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.17](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.15...amplify-graphql-migration-tests@2.2.17) (2022-01-10) - - - -## 7.6.7 (2022-01-10) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.15](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.14...amplify-graphql-migration-tests@2.2.15) (2021-12-21) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.14](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.13...amplify-graphql-migration-tests@2.2.14) (2021-12-17) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.13](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.12...amplify-graphql-migration-tests@2.2.13) (2021-12-03) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.12](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.11...amplify-graphql-migration-tests@2.2.12) (2021-12-02) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.11](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.10...amplify-graphql-migration-tests@2.2.11) (2021-12-01) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.10](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.9...amplify-graphql-migration-tests@2.2.10) (2021-11-29) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.9](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.8...amplify-graphql-migration-tests@2.2.9) (2021-11-26) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.8](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.7...amplify-graphql-migration-tests@2.2.8) (2021-11-24) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.7](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.6...amplify-graphql-migration-tests@2.2.7) (2021-11-23) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.6](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.5...amplify-graphql-migration-tests@2.2.6) (2021-11-21) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.5](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.4...amplify-graphql-migration-tests@2.2.5) (2021-11-20) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.4](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.2...amplify-graphql-migration-tests@2.2.4) (2021-11-19) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.3](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.2...amplify-graphql-migration-tests@2.2.3) (2021-11-19) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.2](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@2.2.1...amplify-graphql-migration-tests@2.2.2) (2021-11-17) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## [2.2.1](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@1.0.1...amplify-graphql-migration-tests@2.2.1) (2021-11-15) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -# [2.0.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-graphql-migration-tests@1.0.1...amplify-graphql-migration-tests@2.0.0) (2021-11-13) - -**Note:** Version bump only for package amplify-graphql-migration-tests - - - - - -## 1.0.1 (2021-11-11) - - -### Bug Fixes - -* move [@model](https://github.com/model) params to root stack and fix ds logical id ([#8736](https://github.com/aws-amplify/amplify-cli/issues/8736)) ([df4408c](https://github.com/aws-amplify/amplify-cli/commit/df4408c4080949ddd638778df9ae20e763dd5824)) diff --git a/packages/amplify-graphql-migration-tests/package.json b/packages/amplify-graphql-migration-tests/package.json deleted file mode 100644 index 6fe15e68b56..00000000000 --- a/packages/amplify-graphql-migration-tests/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "name": "amplify-graphql-migration-tests", - "version": "2.4.8", - "description": "Tests migration from v1 to v2 of the Amplify GraphQL transformer", - "main": "lib/index.js", - "private": true, - "scripts": { - "test": "jest --logHeapUsage" - }, - "repository": { - "type": "git", - "url": "https://github.com/aws-amplify/amplify-cli.git", - "directory": "packages/amplify-schema-migrator-tests" - }, - "keywords": [ - "graphql", - "transformer", - "migration", - "test" - ], - "author": "Amazon Web Services", - "license": "Apache-2.0", - "jest": { - "collectCoverage": true, - "collectCoverageFrom": [ - "src/**/*.{ts,tsx,js,jsx}", - "!src/__tests__/" - ], - "transform": { - "^.+\\.tsx?$": "ts-jest" - }, - "testEnvironmentOptions": { - "url": "http://localhost" - }, - "testRegex": "((\\.|/)(test|spec))\\.(jsx?|tsx?)$", - "moduleFileExtensions": [ - "ts", - "tsx", - "js", - "jsx", - "json", - "node" - ] - }, - "devDependencies": { - "@aws-amplify/amplify-prompts": "2.7.0", - "@aws-amplify/graphql-auth-transformer": "^2.1.6", - "@aws-amplify/graphql-default-value-transformer": "^1.1.6", - "@aws-amplify/graphql-function-transformer": "^1.2.4", - "@aws-amplify/graphql-http-transformer": "^1.2.4", - "@aws-amplify/graphql-index-transformer": "^1.2.2", - "@aws-amplify/graphql-model-transformer": "^1.3.2", - "@aws-amplify/graphql-predictions-transformer": "^1.2.4", - "@aws-amplify/graphql-relational-transformer": "^1.2.2", - "@aws-amplify/graphql-searchable-transformer": "^1.2.4", - "@aws-amplify/graphql-transformer-core": "^1.3.2", - "@aws-amplify/graphql-transformer-interfaces": "2.2.1", - "@aws-amplify/graphql-transformer-migrator": "^2.1.6", - "@aws-cdk/cloudformation-diff": "~2.68.0", - "fs-extra": "^8.1.0", - "graphql-auth-transformer": "^7.2.56", - "graphql-connection-transformer": "^5.2.55", - "graphql-dynamodb-transformer": "^7.2.55", - "graphql-elasticsearch-transformer": "^5.2.56", - "graphql-function-transformer": "^3.3.46", - "graphql-http-transformer": "^5.2.55", - "graphql-key-transformer": "^3.2.55", - "graphql-predictions-transformer": "^3.2.55", - "graphql-transformer-core": "^8.1.2", - "graphql-versioned-transformer": "^5.2.55" - }, - "berry": { - "plugins": [ - "@yarn/plugin-typescript" - ] - } -} diff --git a/packages/amplify-graphql-migration-tests/src/__tests__/graphql-version-migration.test.ts b/packages/amplify-graphql-migration-tests/src/__tests__/graphql-version-migration.test.ts deleted file mode 100644 index 8a31d39bd9f..00000000000 --- a/packages/amplify-graphql-migration-tests/src/__tests__/graphql-version-migration.test.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { getTestCaseRegistry } from '../test-case-registry'; -import { v1transformerProvider } from '../v1-transformer-provider'; -import { v2transformerProvider } from '../v2-transformer-provider'; -import { migrateSchema } from '../migrate-schema-wrapper'; -import { getNestedStackDiffRules } from '../nested-stack-diff-rules'; -import * as cdkDiff from '@aws-cdk/cloudformation-diff'; -import { ResourceImpact } from '@aws-cdk/cloudformation-diff'; - -describe('v1 to v2 migration', () => { - test.concurrent.each(getTestCaseRegistry())( - `validate %s schema migration`, - async (_, schema, v1TransformerConfig, v2TransformerConfig) => { - // run v1 transformer - const v1Transformer = v1transformerProvider(v1TransformerConfig); - const v1result = v1Transformer.transform(schema); - - // migrate schema from v1 to v2 - const migratedSchema = await migrateSchema(schema); - - // run v2 transformer - const v2transformer = v2transformerProvider(v2TransformerConfig); - const v2result = v2transformer.transform(migratedSchema); - - // get initial nested stack names - // TODO will probably have to update the logic a bit if we want to test @searchable migrations here as that will create a SearchableStack that we need to account for - const v1nestedStackNames = Object.keys(v1result.stacks).filter((stackName) => stackName !== 'ConnectionStack'); // The v1 transformer puts all connection resolvers in a 'ConnectionStack'. This stack does not define any data resources - - // verify root stack diff - const diff = cdkDiff.diffTemplate(v1result.rootStack, v2result.rootStack); - v1nestedStackNames.forEach((stackName) => { - try { - expect([ResourceImpact.WILL_UPDATE, ResourceImpact.NO_CHANGE]).toContain(diff.resources.changes[stackName].changeImpact); - } catch (err) { - console.log(`${stackName} not in correct state`); - throw err; - } - }); - - // verify nested stack diffs - const nestedStackDiffRules = getNestedStackDiffRules(); - v1nestedStackNames.forEach((stackName) => { - const nestedStackDiff = cdkDiff.diffTemplate(v1result.stacks[stackName], v2result.stacks[stackName]); - nestedStackDiffRules.forEach((rule) => rule(stackName, nestedStackDiff)); - }); - }, - ); -}); diff --git a/packages/amplify-graphql-migration-tests/src/feature-flag-stub.ts b/packages/amplify-graphql-migration-tests/src/feature-flag-stub.ts deleted file mode 100644 index fc98e398381..00000000000 --- a/packages/amplify-graphql-migration-tests/src/feature-flag-stub.ts +++ /dev/null @@ -1,6 +0,0 @@ -export const featureFlagProviderStub = { - getBoolean: () => true, - getString: () => '', - getNumber: () => 0, - getObject: () => ({}), -}; diff --git a/packages/amplify-graphql-migration-tests/src/migrate-schema-wrapper.ts b/packages/amplify-graphql-migration-tests/src/migrate-schema-wrapper.ts deleted file mode 100644 index e8e940d1de4..00000000000 --- a/packages/amplify-graphql-migration-tests/src/migrate-schema-wrapper.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { runMigration } from '@aws-amplify/graphql-transformer-migrator'; -import * as fs from 'fs-extra'; -import { prompter } from '@aws-amplify/amplify-prompts'; - -jest.mock('fs-extra'); -jest.mock('@aws-amplify/amplify-prompts'); - -const fs_mock = fs as jest.Mocked; -const prompter_mock = prompter as jest.Mocked; - -export type AuthMode = 'apiKey' | 'iam' | 'userPools' | 'oidc'; - -export const migrateSchema = async (schema: string, authMode: AuthMode = 'apiKey'): Promise => { - const pathHash = Date.now().toLocaleString().replace(/,/g, ''); - fs_mock.writeFile.mockClear(); - prompter_mock.pick.mockResolvedValue('Yes'); - await runMigration([{ schema, filePath: pathHash }], authMode); - const transformedSchema = fs_mock.writeFile.mock.calls.find(([hash]) => hash === pathHash)?.[1]; - expect(typeof transformedSchema).toBe('string'); - return transformedSchema; -}; diff --git a/packages/amplify-graphql-migration-tests/src/nested-stack-diff-rules.ts b/packages/amplify-graphql-migration-tests/src/nested-stack-diff-rules.ts deleted file mode 100644 index ea3ad422592..00000000000 --- a/packages/amplify-graphql-migration-tests/src/nested-stack-diff-rules.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { ResourceImpact, TemplateDiff } from '@aws-cdk/cloudformation-diff'; - -export const getNestedStackDiffRules = (): NestedStackDiffRule[] => [ - onlyUpdatesTableNameProperty, - tableNameResolvesToSameName, - dataSourceLogicalIdsAreSame, -]; - -/** - * The table name is not actually updated but the way it's defined is changed (tableNameResolvesToSameName will check the table name) - * This check asserts that no other table properties were changed by the migration (GSIs, LSIs, etc) - * @param stackName The name of the nested stack - * @param diff The diff of the nested stack - */ -const onlyUpdatesTableNameProperty = (stackName: string, diff: TemplateDiff) => { - const propertyUpdates = diff.resources.changes[`${stackName}Table`].propertyUpdates; - try { - expect(Object.keys(propertyUpdates)).toEqual(['TableName']); // The table name should resolve to the same value but the way it's defined is different so it shows up here as a diff - } catch (err) { - console.error(`Expected only TableName update for table ${stackName}Table. Instead got updates:`); - console.log(JSON.stringify(propertyUpdates, undefined, 2)); - throw err; - } -}; - -const tableNameResolvesToSameName = (stackName: string, diff: TemplateDiff) => { - const propertyUpdates = diff.resources.changes[`${stackName}Table`].propertyUpdates; - const newTableName = propertyUpdates.TableName.newValue; - expect(newTableName['Fn::Join']).toBeDefined(); - const joinParams = newTableName['Fn::Join']; - const joinStr = joinParams[0] as string; - const joinElements = joinParams[1] as any[]; - - const apiId = 'testApiId'; - const env = 'testEnv'; - - const replacedElements = joinElements.map((el) => { - if (typeof el?.Ref === 'string') { - // eslint-disable-next-line spellcheck/spell-checker - if (el.Ref.startsWith('referencetotransformerrootstackGraphQLAPI')) { - return apiId; - } - // eslint-disable-next-line spellcheck/spell-checker - if (el.Ref.startsWith('referencetotransformerrootstackenv')) { - return env; - } - } - return el; - }); - const finalTableName = replacedElements.join(joinStr); - expect(finalTableName).toEqual(`${stackName}-${apiId}-${env}`); -}; - -const dataSourceLogicalIdsAreSame = (_: string, diff: TemplateDiff) => { - const areDataSourcesReplaced = Object.values(diff.resources.changes) - .filter((diff) => diff.resourceType === 'AWS::AppSync::DataSource') - .map((diff) => diff.changeImpact === ResourceImpact.WILL_REPLACE) - .reduce((acc, it) => acc && it, true); - expect(areDataSourcesReplaced).toBe(true); -}; - -export type NestedStackDiffRule = (stackName: string, diff: TemplateDiff) => void; diff --git a/packages/amplify-graphql-migration-tests/src/test-case-registry.ts b/packages/amplify-graphql-migration-tests/src/test-case-registry.ts deleted file mode 100644 index 792250074a8..00000000000 --- a/packages/amplify-graphql-migration-tests/src/test-case-registry.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { TestEntry } from './test-case-types'; - -/* - REGISTER TEST CASES HERE -*/ -export const getTestCaseRegistry = (): TestEntry[] => [ - ['bi-di connection', biDiConnectionSchema], - ['many to many', manyToManySchema], - ['recursive', recursiveSchema], - ['compound sort key', compoundSortKey], - ['custom primary key', customPrimaryKey], - ['connection on custom primary key', connectionOnCustomPrimaryKey], - ['support renaming timestamps', renameTimestampFields], - /* - [ - 'add additional tests with a descriptive name', - schemaObject // define the schema below and reference it here. If the schema is exceptionally large, consider importing it from another file - { - v1TransformerConfigObject // if the tests needs custom v1 transformer config, include it here (the framework currently has limited support for additional config so you may need to make updates) - }, - { - v2TransformerConfig: // same for v2 transformer - } - ] - */ -]; - -/* - DEFINE TEST SCHEMAS BELOW -*/ - -const biDiConnectionSchema = /* GraphQL */ ` - type Blog @model { - id: ID! - name: String! - postID: ID - post: Post @connection(fields: ["postID"]) - } - - type Post @model { - id: ID! - title: String! - blogID: ID! - blog: Blog @connection(fields: ["blogID"]) - comments: [Comment] @connection(keyName: "byPost", fields: ["id"]) - } - - type Comment @model @key(name: "byPost", fields: ["postID"]) { - id: ID! - postID: ID! - post: Post @connection(fields: ["postID"]) - } -`; - -const manyToManySchema = /* GraphQL */ ` - type Post @model { - id: ID! - title: String! - editors: [PostEditor] @connection(keyName: "byPost", fields: ["id"]) - } - - type PostEditor - @model(queries: null) - @key(name: "byPost", fields: ["postId", "editorId"]) - @key(name: "byEditor", fields: ["editorId", "postId"]) { - id: ID! - postId: ID! - editorId: ID! - post: Post! @connection(fields: ["postId"]) - editor: User! @connection(fields: ["editorId"]) - } - - type User @model { - id: ID! - username: String! - posts: [PostEditor] @connection(keyName: "byEditor", fields: ["id"]) - } -`; - -const recursiveSchema = /* GraphQL */ ` - type Directory @model @key(name: "byParent", fields: ["parentId"]) { - id: ID! - parentId: ID! - parent: Directory @connection(fields: ["parentId"]) - children: [Directory] @connection(keyName: "byParent", fields: ["id"]) - } -`; - -const compoundSortKey = /* GraphQL */ ` - type Book @model @key(name: "byGenreAuthorPublishDate", fields: ["genre", "author", "publishDate"]) { - id: ID! - genre: String! - author: String! - publishDate: AWSDateTime! - } -`; - -const customPrimaryKey = /* GraphQL */ ` - type Book @model @key(fields: ["title", "author"]) { - title: String! - author: String! - genre: String - } -`; - -const connectionOnCustomPrimaryKey = /* GraphQL */ ` - type Member @model @key(fields: ["name", "signupTime"]) { - name: String! - signupTime: AWSDateTime! - activities: [Activity] @connection(keyName: "byMember", fields: ["name", "signupTime"]) - } - - type Activity @model @key(fields: ["type", "location", "duration"]) @key(name: "byMember", fields: ["memberName", "memberSignupTime"]) { - type: String! - location: String! - duration: Int! - memberName: String - memberSignupTime: AWSDateTime - member: Member @connection(fields: ["memberName", "memberSignupTime"]) - } -`; - -const renameTimestampFields = /* GraphQL */ ` - type Post @model(timestamps: { createdAt: "made", updatedAt: "updated" }) { - id: ID! - title: String! - contents: String - } -`; diff --git a/packages/amplify-graphql-migration-tests/src/test-case-types.ts b/packages/amplify-graphql-migration-tests/src/test-case-types.ts deleted file mode 100644 index f0ff9c83347..00000000000 --- a/packages/amplify-graphql-migration-tests/src/test-case-types.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { TransformerPluginProvider } from '@aws-amplify/graphql-transformer-interfaces'; -import { ITransformer } from 'graphql-transformer-core'; - -// Defines a single test input -type TestName = string; -type Schema = string; -export type TestEntry = [TestName, Schema, V1TransformerTestConfig?, V2TransformerTestConfig?]; - -// If we need to vary other transformer config per test we can add additional parameters here -export type V1TransformerTestConfig = { - transformers: ITransformer[]; -}; - -// If we need to vary other transformer config per test we can add additional parameters here -export type V2TransformerTestConfig = { - transformers: TransformerPluginProvider[]; -}; diff --git a/packages/amplify-graphql-migration-tests/src/v1-transformer-provider.ts b/packages/amplify-graphql-migration-tests/src/v1-transformer-provider.ts deleted file mode 100644 index ade172b53da..00000000000 --- a/packages/amplify-graphql-migration-tests/src/v1-transformer-provider.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { DynamoDBModelTransformer } from 'graphql-dynamodb-transformer'; -import { ModelConnectionTransformer } from 'graphql-connection-transformer'; -import { VersionedModelTransformer } from 'graphql-versioned-transformer'; -import { ModelAuthTransformer } from 'graphql-auth-transformer'; -import { HttpTransformer } from 'graphql-http-transformer'; -import { KeyTransformer } from 'graphql-key-transformer'; -import { GraphQLTransform } from 'graphql-transformer-core'; -import { featureFlagProviderStub } from './feature-flag-stub'; -import { V1TransformerTestConfig } from './test-case-types'; - -export const v1transformerProvider = (config: Partial = {}): GraphQLTransform => { - const subbedConfig: V1TransformerTestConfig = { ...getDefaultConfig(), ...config }; - - return new GraphQLTransform({ - transformers: subbedConfig.transformers, - transformConfig: { - Version: 5, - }, - featureFlags: featureFlagProviderStub, - }); -}; - -const getDefaultConfig = (): V1TransformerTestConfig => ({ - transformers: [ - new DynamoDBModelTransformer(), - new VersionedModelTransformer(), - new HttpTransformer(), - new KeyTransformer(), - new ModelConnectionTransformer(), - new ModelAuthTransformer({ - authConfig: { - defaultAuthentication: { - authenticationType: 'API_KEY', - }, - additionalAuthenticationProviders: [ - { - authenticationType: 'AWS_IAM', - }, - { - authenticationType: 'AMAZON_COGNITO_USER_POOLS', - }, - ], - }, - }), - ], -}); diff --git a/packages/amplify-graphql-migration-tests/src/v2-transformer-provider.ts b/packages/amplify-graphql-migration-tests/src/v2-transformer-provider.ts deleted file mode 100644 index 2963574fdaf..00000000000 --- a/packages/amplify-graphql-migration-tests/src/v2-transformer-provider.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { GraphQLTransform } from '@aws-amplify/graphql-transformer-core'; -import { ModelTransformer } from '@aws-amplify/graphql-model-transformer'; -import { AuthTransformer } from '@aws-amplify/graphql-auth-transformer'; -import { FunctionTransformer } from '@aws-amplify/graphql-function-transformer'; -import { HttpTransformer } from '@aws-amplify/graphql-http-transformer'; -import { IndexTransformer, PrimaryKeyTransformer } from '@aws-amplify/graphql-index-transformer'; -import { - BelongsToTransformer, - HasManyTransformer, - HasOneTransformer, - ManyToManyTransformer, -} from '@aws-amplify/graphql-relational-transformer'; -import { DefaultValueTransformer } from '@aws-amplify/graphql-default-value-transformer'; -import { TransformerPluginProvider, AppSyncAuthConfiguration } from '@aws-amplify/graphql-transformer-interfaces'; -import { featureFlagProviderStub } from './feature-flag-stub'; -import { V2TransformerTestConfig } from './test-case-types'; - -export const v2transformerProvider = (config: Partial = {}): GraphQLTransform => { - const transform = new GraphQLTransform({ - transformers: config.transformers ?? getDefaultTransformers(), - authConfig: defaultAuthConfig, - featureFlags: featureFlagProviderStub, - sandboxModeEnabled: true, - }); - - return transform; -}; - -const getDefaultTransformers = () => { - const modelTransformer = new ModelTransformer(); - const indexTransformer = new IndexTransformer(); - const hasOneTransformer = new HasOneTransformer(); - - const authTransformer = new AuthTransformer(); - const transformers: TransformerPluginProvider[] = [ - modelTransformer, - new FunctionTransformer(), - new HttpTransformer(), - new PrimaryKeyTransformer(), - indexTransformer, - new BelongsToTransformer(), - new HasManyTransformer(), - hasOneTransformer, - new ManyToManyTransformer(modelTransformer, indexTransformer, hasOneTransformer, authTransformer), - new DefaultValueTransformer(), - authTransformer, - ]; - - return transformers; -}; - -const defaultAuthConfig: AppSyncAuthConfiguration = { - defaultAuthentication: { - authenticationType: 'API_KEY', - }, - additionalAuthenticationProviders: [ - { - authenticationType: 'AWS_IAM', - }, - { - authenticationType: 'AMAZON_COGNITO_USER_POOLS', - }, - ], -}; diff --git a/packages/amplify-graphql-migration-tests/tsconfig.json b/packages/amplify-graphql-migration-tests/tsconfig.json deleted file mode 100644 index 4569328b796..00000000000 --- a/packages/amplify-graphql-migration-tests/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "outDir": "./lib", - "rootDir": "./src" - }, - "references": [{ "path": "../amplify-function-plugin-interface" }] -} diff --git a/packages/amplify-headless-interface/CHANGELOG.md b/packages/amplify-headless-interface/CHANGELOG.md index a451963172c..b1042f063ed 100644 --- a/packages/amplify-headless-interface/CHANGELOG.md +++ b/packages/amplify-headless-interface/CHANGELOG.md @@ -3,6 +3,44 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.17.7](https://github.com/aws-amplify/amplify-cli/compare/amplify-headless-interface@1.17.6...amplify-headless-interface@1.17.7) (2024-05-07) + + +### Bug Fixes + +* **amplify-headless-interface:** added lambda auth type to headless api payloads ([#13729](https://github.com/aws-amplify/amplify-cli/issues/13729)) ([450eaf1](https://github.com/aws-amplify/amplify-cli/commit/450eaf18af24f3cc15117a55fc565b68b5a63768)) + + + + + +## [1.17.6](https://github.com/aws-amplify/amplify-cli/compare/amplify-headless-interface@1.17.4...amplify-headless-interface@1.17.6) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [1.17.5](https://github.com/aws-amplify/amplify-cli/compare/amplify-headless-interface@1.17.4...amplify-headless-interface@1.17.5) (2023-11-08) + +**Note:** Version bump only for package amplify-headless-interface + + + + + +## [1.17.4](https://github.com/aws-amplify/amplify-cli/compare/amplify-headless-interface@1.17.3...amplify-headless-interface@1.17.4) (2023-06-13) + +**Note:** Version bump only for package amplify-headless-interface + + + + + ## [1.17.3](https://github.com/aws-amplify/amplify-cli/compare/amplify-headless-interface@1.17.1...amplify-headless-interface@1.17.3) (2023-04-14) **Note:** Version bump only for package amplify-headless-interface diff --git a/packages/amplify-headless-interface/package.json b/packages/amplify-headless-interface/package.json index a517620bc40..b872512eacb 100644 --- a/packages/amplify-headless-interface/package.json +++ b/packages/amplify-headless-interface/package.json @@ -1,6 +1,6 @@ { "name": "amplify-headless-interface", - "version": "1.17.3", + "version": "1.17.7", "description": "interfaces for amplify headless mode payloads", "main": "lib/index.js", "scripts": { diff --git a/packages/amplify-headless-interface/schemas/api/1/AddApiRequest.schema.json b/packages/amplify-headless-interface/schemas/api/1/AddApiRequest.schema.json index 9fda5cb294e..703c63e1e14 100644 --- a/packages/amplify-headless-interface/schemas/api/1/AddApiRequest.schema.json +++ b/packages/amplify-headless-interface/schemas/api/1/AddApiRequest.schema.json @@ -45,6 +45,9 @@ }, { "$ref": "#/definitions/AppSyncOpenIDConnectAuthType" + }, + { + "$ref": "#/definitions/AppSyncLambdaAuthType" } ] }, @@ -64,6 +67,9 @@ }, { "$ref": "#/definitions/AppSyncOpenIDConnectAuthType" + }, + { + "$ref": "#/definitions/AppSyncLambdaAuthType" } ] } @@ -144,6 +150,23 @@ }, "required": ["mode", "openIDClientID", "openIDIssuerURL", "openIDProviderName"] }, + "AppSyncLambdaAuthType": { + "description": "Specifies that the AppSync API should be secured using a Lambda Function.", + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": ["AWS_LAMBDA"] + }, + "lambdaFunction": { + "type": "string" + }, + "ttlSeconds": { + "type": "string" + } + }, + "required": ["mode", "lambdaFunction"] + }, "ConflictResolution": { "description": "Defines a strategy for resolving API write conflicts.", "type": "object", diff --git a/packages/amplify-headless-interface/schemas/api/1/UpdateApiRequest.schema.json b/packages/amplify-headless-interface/schemas/api/1/UpdateApiRequest.schema.json index a4cbb0a3d66..e66c1d10b69 100644 --- a/packages/amplify-headless-interface/schemas/api/1/UpdateApiRequest.schema.json +++ b/packages/amplify-headless-interface/schemas/api/1/UpdateApiRequest.schema.json @@ -52,6 +52,9 @@ }, { "$ref": "#/definitions/AppSyncOpenIDConnectAuthType" + }, + { + "$ref": "#/definitions/AppSyncLambdaAuthType" } ] }, @@ -71,6 +74,9 @@ }, { "$ref": "#/definitions/AppSyncOpenIDConnectAuthType" + }, + { + "$ref": "#/definitions/AppSyncLambdaAuthType" } ] } @@ -150,6 +156,23 @@ }, "required": ["mode", "openIDClientID", "openIDIssuerURL", "openIDProviderName"] }, + "AppSyncLambdaAuthType": { + "description": "Specifies that the AppSync API should be secured using a Lambda Function.", + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": ["AWS_LAMBDA"] + }, + "lambdaFunction": { + "type": "string" + }, + "ttlSeconds": { + "type": "string" + } + }, + "required": ["mode", "lambdaFunction"] + }, "ConflictResolution": { "description": "Defines a strategy for resolving API write conflicts.", "type": "object", diff --git a/packages/amplify-java-function-runtime-provider/CHANGELOG.md b/packages/amplify-java-function-runtime-provider/CHANGELOG.md index 2e4fbe59554..aab9a66304e 100644 --- a/packages/amplify-java-function-runtime-provider/CHANGELOG.md +++ b/packages/amplify-java-function-runtime-provider/CHANGELOG.md @@ -3,6 +3,228 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.3.48](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-runtime-provider@2.3.47...amplify-java-function-runtime-provider@2.3.48) (2025-01-30) + +**Note:** Version bump only for package amplify-java-function-runtime-provider + + + + + +## [2.3.47](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-runtime-provider@2.3.46...amplify-java-function-runtime-provider@2.3.47) (2024-08-02) + +**Note:** Version bump only for package amplify-java-function-runtime-provider + + + + + +## [2.3.46](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-runtime-provider@2.3.45...amplify-java-function-runtime-provider@2.3.46) (2024-06-27) + +**Note:** Version bump only for package amplify-java-function-runtime-provider + + + + + +## [2.3.45](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-runtime-provider@2.3.44...amplify-java-function-runtime-provider@2.3.45) (2024-06-20) + +**Note:** Version bump only for package amplify-java-function-runtime-provider + + + + + +## [2.3.44](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-runtime-provider@2.3.43...amplify-java-function-runtime-provider@2.3.44) (2024-06-06) + +**Note:** Version bump only for package amplify-java-function-runtime-provider + + + + + +## [2.3.43](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-runtime-provider@2.3.42...amplify-java-function-runtime-provider@2.3.43) (2024-05-24) + +**Note:** Version bump only for package amplify-java-function-runtime-provider + + + + + +## [2.3.42](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-runtime-provider@2.3.41...amplify-java-function-runtime-provider@2.3.42) (2024-05-07) + +**Note:** Version bump only for package amplify-java-function-runtime-provider + + + + + +## [2.3.41](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-runtime-provider@2.3.40...amplify-java-function-runtime-provider@2.3.41) (2024-04-18) + +**Note:** Version bump only for package amplify-java-function-runtime-provider + + + + + +## [2.3.40](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-runtime-provider@2.3.39...amplify-java-function-runtime-provider@2.3.40) (2024-04-15) + +**Note:** Version bump only for package amplify-java-function-runtime-provider + + + + + +## [2.3.39](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-runtime-provider@2.3.38...amplify-java-function-runtime-provider@2.3.39) (2024-03-29) + +**Note:** Version bump only for package amplify-java-function-runtime-provider + + + + + +## [2.3.38](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-runtime-provider@2.3.37...amplify-java-function-runtime-provider@2.3.38) (2024-03-06) + +**Note:** Version bump only for package amplify-java-function-runtime-provider + + + + + +## [2.3.37](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-runtime-provider@2.3.36...amplify-java-function-runtime-provider@2.3.37) (2023-12-11) + +**Note:** Version bump only for package amplify-java-function-runtime-provider + + + + + +## [2.3.36](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-runtime-provider@2.3.34...amplify-java-function-runtime-provider@2.3.36) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [2.3.35](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-runtime-provider@2.3.34...amplify-java-function-runtime-provider@2.3.35) (2023-11-08) + +**Note:** Version bump only for package amplify-java-function-runtime-provider + + + + + +## [2.3.34](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-runtime-provider@2.3.33...amplify-java-function-runtime-provider@2.3.34) (2023-11-08) + +**Note:** Version bump only for package amplify-java-function-runtime-provider + + + + + +## [2.3.33](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-runtime-provider@2.3.32...amplify-java-function-runtime-provider@2.3.33) (2023-10-12) + +**Note:** Version bump only for package amplify-java-function-runtime-provider + + + + + +## [2.3.32](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-runtime-provider@2.3.31...amplify-java-function-runtime-provider@2.3.32) (2023-10-05) + +**Note:** Version bump only for package amplify-java-function-runtime-provider + + + + + +## [2.3.31](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-runtime-provider@2.3.30...amplify-java-function-runtime-provider@2.3.31) (2023-10-03) + +**Note:** Version bump only for package amplify-java-function-runtime-provider + + + + + +## [2.3.30](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-runtime-provider@2.3.29...amplify-java-function-runtime-provider@2.3.30) (2023-09-22) + +**Note:** Version bump only for package amplify-java-function-runtime-provider + + + + + +## [2.3.29](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-runtime-provider@2.3.28...amplify-java-function-runtime-provider@2.3.29) (2023-08-31) + +**Note:** Version bump only for package amplify-java-function-runtime-provider + + + + + +## [2.3.28](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-runtime-provider@2.3.27...amplify-java-function-runtime-provider@2.3.28) (2023-08-17) + +**Note:** Version bump only for package amplify-java-function-runtime-provider + + + + + +## [2.3.27](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-runtime-provider@2.3.26...amplify-java-function-runtime-provider@2.3.27) (2023-08-09) + + +### Bug Fixes + +* Dependabot alerts for semver, tough-cookie ([#12962](https://github.com/aws-amplify/amplify-cli/issues/12962)) ([175a86b](https://github.com/aws-amplify/amplify-cli/commit/175a86b89a54c65bb6e68c0609be503d61e39d63)) + + + + + +## [2.3.26](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-runtime-provider@2.3.25...amplify-java-function-runtime-provider@2.3.26) (2023-07-28) + +**Note:** Version bump only for package amplify-java-function-runtime-provider + + + + + +## [2.3.25](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-runtime-provider@2.3.24...amplify-java-function-runtime-provider@2.3.25) (2023-07-27) + +**Note:** Version bump only for package amplify-java-function-runtime-provider + + + + + +## [2.3.24](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-runtime-provider@2.3.23...amplify-java-function-runtime-provider@2.3.24) (2023-07-24) + +**Note:** Version bump only for package amplify-java-function-runtime-provider + + + + + +## [2.3.23](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-runtime-provider@2.3.22...amplify-java-function-runtime-provider@2.3.23) (2023-07-20) + +**Note:** Version bump only for package amplify-java-function-runtime-provider + + + + + +## [2.3.22](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-runtime-provider@2.3.21...amplify-java-function-runtime-provider@2.3.22) (2023-06-13) + +**Note:** Version bump only for package amplify-java-function-runtime-provider + + + + + ## [2.3.21](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-runtime-provider@2.3.19...amplify-java-function-runtime-provider@2.3.21) (2023-05-25) diff --git a/packages/amplify-java-function-runtime-provider/package.json b/packages/amplify-java-function-runtime-provider/package.json index 59aff81a858..d5dd5729192 100644 --- a/packages/amplify-java-function-runtime-provider/package.json +++ b/packages/amplify-java-function-runtime-provider/package.json @@ -1,6 +1,6 @@ { "name": "amplify-java-function-runtime-provider", - "version": "2.3.21", + "version": "2.3.48", "description": "Provides functionality related to functions in JAVA on AWS", "repository": { "type": "git", @@ -25,12 +25,12 @@ "extract-api": "ts-node ../../scripts/extract-api.ts" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.0.8", - "@aws-amplify/amplify-function-plugin-interface": "1.10.2", + "@aws-amplify/amplify-cli-core": "4.3.11", + "@aws-amplify/amplify-function-plugin-interface": "1.12.1", "execa": "^5.1.1", "fs-extra": "^8.1.0", "glob": "^7.2.0", - "semver": "^7.3.5", + "semver": "^7.5.4", "which": "^2.0.2" }, "devDependencies": { diff --git a/packages/amplify-java-function-template-provider/CHANGELOG.md b/packages/amplify-java-function-template-provider/CHANGELOG.md index c3cc4268767..73870090d43 100644 --- a/packages/amplify-java-function-template-provider/CHANGELOG.md +++ b/packages/amplify-java-function-template-provider/CHANGELOG.md @@ -3,6 +3,41 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.5.24](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-template-provider@1.5.22...amplify-java-function-template-provider@1.5.24) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [1.5.23](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-template-provider@1.5.21...amplify-java-function-template-provider@1.5.23) (2023-11-08) + +**Note:** Version bump only for package amplify-java-function-template-provider + + + + + +## [1.5.22](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-template-provider@1.5.21...amplify-java-function-template-provider@1.5.22) (2023-07-20) + +**Note:** Version bump only for package amplify-java-function-template-provider + + + + + +## [1.5.21](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-template-provider@1.5.20...amplify-java-function-template-provider@1.5.21) (2023-06-13) + +**Note:** Version bump only for package amplify-java-function-template-provider + + + + + ## [1.5.20](https://github.com/aws-amplify/amplify-cli/compare/amplify-java-function-template-provider@1.5.19...amplify-java-function-template-provider@1.5.20) (2023-04-24) **Note:** Version bump only for package amplify-java-function-template-provider diff --git a/packages/amplify-java-function-template-provider/package.json b/packages/amplify-java-function-template-provider/package.json index 3e808eccf3b..967b2711555 100644 --- a/packages/amplify-java-function-template-provider/package.json +++ b/packages/amplify-java-function-template-provider/package.json @@ -1,6 +1,6 @@ { "name": "amplify-java-function-template-provider", - "version": "1.5.20", + "version": "1.5.24", "description": "JAVA templates supplied by the Amplify Team", "repository": { "type": "git", @@ -22,7 +22,7 @@ "extract-api": "ts-node ../../scripts/extract-api.ts" }, "dependencies": { - "@aws-amplify/amplify-function-plugin-interface": "1.10.2" + "@aws-amplify/amplify-function-plugin-interface": "1.12.1" }, "berry": { "plugins": [ diff --git a/packages/amplify-migration-tests/CHANGELOG.md b/packages/amplify-migration-tests/CHANGELOG.md index 20af23d3d26..7019f0e700e 100644 --- a/packages/amplify-migration-tests/CHANGELOG.md +++ b/packages/amplify-migration-tests/CHANGELOG.md @@ -3,6 +3,297 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.5.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.5.1...@aws-amplify/amplify-migration-tests@6.5.2) (2025-01-30) + +**Note:** Version bump only for package @aws-amplify/amplify-migration-tests + + + + + +## [6.5.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.5.0...@aws-amplify/amplify-migration-tests@6.5.1) (2025-01-16) + + +### Bug Fixes + +* removed migration tests between versions of Gen 1 ([#14062](https://github.com/aws-amplify/amplify-cli/issues/14062)) ([58856c8](https://github.com/aws-amplify/amplify-cli/commit/58856c8fb908ed21f3aea850d4dcc0d4a03f4114)) + + + + + +# [6.5.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.4.1...@aws-amplify/amplify-migration-tests@6.5.0) (2025-01-02) + + +### Features + +* lambda dotnet 8 support ([#14026](https://github.com/aws-amplify/amplify-cli/issues/14026)) ([540bfe1](https://github.com/aws-amplify/amplify-cli/commit/540bfe1187907609c3c813e1208c12b6a2a6ac6c)) + + + + + +## [6.4.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.4.0...@aws-amplify/amplify-migration-tests@6.4.1) (2024-11-18) + +**Note:** Version bump only for package @aws-amplify/amplify-migration-tests + + + + + +# [6.4.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.3.10...@aws-amplify/amplify-migration-tests@6.4.0) (2024-10-05) + + +### Features + +* add init prompts for Gen2 ([#13849](https://github.com/aws-amplify/amplify-cli/issues/13849)) ([7ab8fae](https://github.com/aws-amplify/amplify-cli/commit/7ab8faef1e2ce0c15db783d236aeee9d312ec135)) + + + + + +## [6.3.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.3.9...@aws-amplify/amplify-migration-tests@6.3.10) (2024-08-02) + +**Note:** Version bump only for package @aws-amplify/amplify-migration-tests + + + + + +## [6.3.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.3.8...@aws-amplify/amplify-migration-tests@6.3.9) (2024-06-27) + +**Note:** Version bump only for package @aws-amplify/amplify-migration-tests + + + + + +## [6.3.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.3.7...@aws-amplify/amplify-migration-tests@6.3.8) (2024-06-20) + +**Note:** Version bump only for package @aws-amplify/amplify-migration-tests + + + + + +## [6.3.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.3.6...@aws-amplify/amplify-migration-tests@6.3.7) (2024-06-06) + +**Note:** Version bump only for package @aws-amplify/amplify-migration-tests + + + + + +## [6.3.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.3.5...@aws-amplify/amplify-migration-tests@6.3.6) (2024-05-24) + +**Note:** Version bump only for package @aws-amplify/amplify-migration-tests + + + + + +## [6.3.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.3.4...@aws-amplify/amplify-migration-tests@6.3.5) (2024-05-07) + +**Note:** Version bump only for package @aws-amplify/amplify-migration-tests + + + + + +## [6.3.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.3.3...@aws-amplify/amplify-migration-tests@6.3.4) (2024-04-18) + +**Note:** Version bump only for package @aws-amplify/amplify-migration-tests + + + + + +## [6.3.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.3.2...@aws-amplify/amplify-migration-tests@6.3.3) (2024-04-15) + +**Note:** Version bump only for package @aws-amplify/amplify-migration-tests + + + + + +## [6.3.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.3.1...@aws-amplify/amplify-migration-tests@6.3.2) (2024-03-29) + +**Note:** Version bump only for package @aws-amplify/amplify-migration-tests + + + + + +## [6.3.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.3.0...@aws-amplify/amplify-migration-tests@6.3.1) (2024-03-06) + + +### Reverts + +* Revert "chore: bump data package versions (#13486)" (#13487) ([3280d40](https://github.com/aws-amplify/amplify-cli/commit/3280d40a5ab50c675b0e2b8050ad35a69c83cdc2)), closes [#13486](https://github.com/aws-amplify/amplify-cli/issues/13486) [#13487](https://github.com/aws-amplify/amplify-cli/issues/13487) + + + + + +# [6.3.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.2.9...@aws-amplify/amplify-migration-tests@6.3.0) (2023-12-11) + + +### Features + +* bump data dependencies to launch RDS feature ([#13409](https://github.com/aws-amplify/amplify-cli/issues/13409)) ([7fbf29f](https://github.com/aws-amplify/amplify-cli/commit/7fbf29f56eb7335d20de0b5526fbed7795a2af09)) + + + + + +## [6.2.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.2.7...@aws-amplify/amplify-migration-tests@6.2.9) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [6.2.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.2.7...@aws-amplify/amplify-migration-tests@6.2.8) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-migration-tests + + + + + +## [6.2.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.2.6...@aws-amplify/amplify-migration-tests@6.2.7) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-migration-tests + + + + + +## [6.2.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.2.5...@aws-amplify/amplify-migration-tests@6.2.6) (2023-10-12) + +**Note:** Version bump only for package @aws-amplify/amplify-migration-tests + + + + + +## [6.2.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.2.4...@aws-amplify/amplify-migration-tests@6.2.5) (2023-10-05) + +**Note:** Version bump only for package @aws-amplify/amplify-migration-tests + + + + + +## [6.2.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.2.3...@aws-amplify/amplify-migration-tests@6.2.4) (2023-10-03) + +**Note:** Version bump only for package @aws-amplify/amplify-migration-tests + + + + + +## [6.2.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.2.2...@aws-amplify/amplify-migration-tests@6.2.3) (2023-09-22) + +**Note:** Version bump only for package @aws-amplify/amplify-migration-tests + + + + + +## [6.2.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.2.1...@aws-amplify/amplify-migration-tests@6.2.2) (2023-08-31) + +**Note:** Version bump only for package @aws-amplify/amplify-migration-tests + + + + + +## [6.2.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.2.0...@aws-amplify/amplify-migration-tests@6.2.1) (2023-08-17) + +**Note:** Version bump only for package @aws-amplify/amplify-migration-tests + + + + + +# [6.2.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.1.3...@aws-amplify/amplify-migration-tests@6.2.0) (2023-08-09) + + +### Bug Fixes + +* Dependabot alerts for semver, tough-cookie ([#12962](https://github.com/aws-amplify/amplify-cli/issues/12962)) ([175a86b](https://github.com/aws-amplify/amplify-cli/commit/175a86b89a54c65bb6e68c0609be503d61e39d63)) +* typo in migration tests manifest ([#12949](https://github.com/aws-amplify/amplify-cli/issues/12949)) ([bc97cfb](https://github.com/aws-amplify/amplify-cli/commit/bc97cfb68216a4fa2a94fd7b199914fcd9b58aff)) + + +### Features + +* replace oauth and userpoolclient lambdas with cfn and sdk calls ([#12935](https://github.com/aws-amplify/amplify-cli/issues/12935)) ([b3ab512](https://github.com/aws-amplify/amplify-cli/commit/b3ab5125f2ec405afd1af9d2f77b8683d5914010)) +* replace role mapping lambda in auth category ([#13003](https://github.com/aws-amplify/amplify-cli/issues/13003)) ([4ce0329](https://github.com/aws-amplify/amplify-cli/commit/4ce032932702305b9f9564a77418855ceb0f0fca)) +* run auth lambdas on node 18 ([#13011](https://github.com/aws-amplify/amplify-cli/issues/13011)) ([a9e12ff](https://github.com/aws-amplify/amplify-cli/commit/a9e12ff9552ba024887312a81bf411fb5c7926d0)) + + + + + +## [6.1.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.1.2...@aws-amplify/amplify-migration-tests@6.1.3) (2023-07-28) + +**Note:** Version bump only for package @aws-amplify/amplify-migration-tests + + + + + +## [6.1.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.1.1...@aws-amplify/amplify-migration-tests@6.1.2) (2023-07-27) + +**Note:** Version bump only for package @aws-amplify/amplify-migration-tests + + + + + +## [6.1.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.1.0...@aws-amplify/amplify-migration-tests@6.1.1) (2023-07-24) + +**Note:** Version bump only for package @aws-amplify/amplify-migration-tests + + + + + +# [6.1.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.0.4...@aws-amplify/amplify-migration-tests@6.1.0) (2023-07-20) + + +### Bug Fixes + +* ensure AWS_REGION matches CLI_REGION in all tests ([#12837](https://github.com/aws-amplify/amplify-cli/issues/12837)) ([7be43e4](https://github.com/aws-amplify/amplify-cli/commit/7be43e41ded3bf09fd20cd9d9b95467491344cbe)) +* fix yarn path ([#12769](https://github.com/aws-amplify/amplify-cli/issues/12769)) ([dca98aa](https://github.com/aws-amplify/amplify-cli/commit/dca98aa35e544dce4cf0ac9f340919b87041e65f)) + + +### Features + +* lambda support for yarn2/3 and pnpm package managers ([#12750](https://github.com/aws-amplify/amplify-cli/issues/12750)) ([fd18195](https://github.com/aws-amplify/amplify-cli/commit/fd181952672efb0479ca6955c0c7a45fe248d1b1)) + + +### Reverts + +* Revert "chore: cleanup stale resources in CodeBuild (#12779)" (#12853) ([d19d17e](https://github.com/aws-amplify/amplify-cli/commit/d19d17ebcace24c9db56331c0c2bd053f8ec0966)), closes [#12779](https://github.com/aws-amplify/amplify-cli/issues/12779) [#12853](https://github.com/aws-amplify/amplify-cli/issues/12853) + + + + + +## [6.0.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.0.3...@aws-amplify/amplify-migration-tests@6.0.4) (2023-06-13) + +**Note:** Version bump only for package @aws-amplify/amplify-migration-tests + + + + + ## [6.0.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-migration-tests@6.0.1...@aws-amplify/amplify-migration-tests@6.0.3) (2023-05-25) diff --git a/packages/amplify-migration-tests/Readme.md b/packages/amplify-migration-tests/Readme.md index 9aa1d5481ee..874d7024669 100644 --- a/packages/amplify-migration-tests/Readme.md +++ b/packages/amplify-migration-tests/Readme.md @@ -4,11 +4,11 @@ This packages contains migration tests that are run in CircleCI to ensure that c ## Setup -To run the tests locally, you need to have your AWS credentials stored in a `.env` file of this package. These values are used to configure the test projects. +To run the tests locally, you need to have your personal AWS credentials stored in a `.env` file of this package. These values are used to configure the test projects. -Please see sample.env for the keys that are expected in your `.env` file. +Please see sample.env for the keys that are expected in your `.env` file. Or, for internal engineers, you can copy "Copy bash/zsh" directly from your personal account, and paste it in the terminal. -The `.env` file does not get commited as its in the `.gitignore` file. +The `.env` file does not get committed as its in the `.gitignore` file. # Verbose logging @@ -26,19 +26,20 @@ but a native installation overrides an npm installation on your PATH ## Running individual tests -Amplify Migration tests use Jest. So all the standard Jest comnmads work. +Amplify Migration tests use Jest. So all the standard Jest commands work. You can run a single test while adding a new test by running ```bash -cd /packages/amplify-migration-tests/__tests__/ -yarn migration update_tests/function_migration_update.test.ts +cd /packages/amplify-migration-tests +yarn migration_v src/__tests__/migration_tests_v/scaffold.test.ts +# e.g. `yarn migration_v10.5.1 src/__tests__/migration_tests_v10/scaffold.test.ts` ``` The exact command is different for some tests. See `package.json` for all of the variations of the `migration` script. ## Writing a new integration test -E2E tests internally use [nexpect](https://www.npmjs.com/package/nexpect) to run the CLI. There are helper methods that helps you to set up and delete project. The recommended pattern is to create a helper method that creates a resources as a helper method so these method could be used in other tests. For instance, `initJSProjectWithProfileV4_52_0 is a helper method that is used in `init`tests and also used in all the other tests to initalize a new Javascript project. The tests should have all the assertions to make sure the resource created by the helper method is setup correctly. We recommend using`aws-sdk` to make assert the resource configuration. +E2E tests internally use [nexpect](https://www.npmjs.com/package/nexpect) to run the CLI. There are helper methods that helps you to set up and delete project. The recommended pattern is to create a helper method that creates a resources as a helper method so these method could be used in other tests. For instance, `initJSProjectWithProfileV4_52_0 is a helper method that is used in `init`tests and also used in all the other tests to initialize a new Javascript project. The tests should have all the assertions to make sure the resource created by the helper method is setup correctly. We recommend using`aws-sdk` to make assert the resource configuration. ```typescript import { initJSProjectWithProfileV4_52_0, deleteProject, amplifyPush } from '../init'; diff --git a/packages/amplify-migration-tests/custom-resources/custom-cdk-stack-v10.ts b/packages/amplify-migration-tests/custom-resources/custom-cdk-stack-v10.ts deleted file mode 100644 index a50e993fbbe..00000000000 --- a/packages/amplify-migration-tests/custom-resources/custom-cdk-stack-v10.ts +++ /dev/null @@ -1,47 +0,0 @@ -import * as cdk from '@aws-cdk/core'; -import * as iam from '@aws-cdk/aws-iam'; -import * as sns from '@aws-cdk/aws-sns'; -import * as subs from '@aws-cdk/aws-sns-subscriptions'; -import * as sqs from '@aws-cdk/aws-sqs'; - -export class cdkStack extends cdk.Stack { - constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) { - super(scope, id, props); - - /* Do not remove - Amplify CLI automatically injects the current deployment environment in this input parameter */ - new cdk.CfnParameter(this, 'env', { - type: 'String', - description: 'Current Amplify CLI env name', - }); - - /* AWS CDK Code goes here - Learn more: https://docs.aws.amazon.com/cdk/latest/guide/home.html */ - - /* Example 1: Set up an SQS queue with an SNS topic */ - - const queue = new sqs.Queue(this, 'sqs-queue'); - - // 👇 create sns topic - const topic = new sns.Topic(this, 'sns-topic'); - - // 👇 subscribe queue to topic - topic.addSubscription(new subs.SqsSubscription(queue)); - - new cdk.CfnOutput(this, 'snsTopicArn', { - value: topic.topicArn, - description: 'The arn of the SNS topic', - }); - - /* Example 2: Adding IAM role to the custom stack */ - const role = new iam.Role(this, 'CustomRole', { - assumedBy: new iam.AccountRootPrincipal(), - }); - - /*Example 3: Adding policy to the IAM role*/ - role.addToPolicy( - new iam.PolicyStatement({ - actions: ['*'], - resources: [topic.topicArn], - }), - ); - } -} diff --git a/packages/amplify-migration-tests/custom-resources/custom-cdk-stack-vLatest.package.json b/packages/amplify-migration-tests/custom-resources/custom-cdk-stack-vLatest.package.json index c5991c9177a..2d578af0eb6 100644 --- a/packages/amplify-migration-tests/custom-resources/custom-cdk-stack-vLatest.package.json +++ b/packages/amplify-migration-tests/custom-resources/custom-cdk-stack-vLatest.package.json @@ -9,7 +9,7 @@ }, "dependencies": { "@aws-amplify/cli-extensibility-helper": "^3.0.0", - "aws-cdk-lib": "~2.53.0", + "aws-cdk-lib": "~2.177.0", "constructs": "^10.0.5" }, "devDependencies": { diff --git a/packages/amplify-migration-tests/overrides/override-api-gql.v10.ts b/packages/amplify-migration-tests/overrides/override-api-gql.v10.ts deleted file mode 100644 index e0339976783..00000000000 --- a/packages/amplify-migration-tests/overrides/override-api-gql.v10.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function override(resource: Record): void { - resource.api['GraphQLAPI'].xrayEnabled = true; -} diff --git a/packages/amplify-migration-tests/package.json b/packages/amplify-migration-tests/package.json index a2ab67ccbf7..26abe3c2e2e 100644 --- a/packages/amplify-migration-tests/package.json +++ b/packages/amplify-migration-tests/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-migration-tests", - "version": "6.0.3", + "version": "6.5.2", "description": "", "repository": { "type": "git", @@ -21,19 +21,23 @@ "migration_v4.28.2_nonmultienv_layers": "yarn setup-profile 4.28.2 && jest src/__tests__/migration_tests/lambda-layer-migration/layer-migration.test.ts --verbose --config=jest.config.js", "migration_v4.52.0_multienv_layers": "yarn setup-profile 4.52.0 && jest src/__tests__/migration_tests/lambda-layer-migration/layer-migration.test.ts --verbose --config=jest.config.js", "migration_v10.5.1": "yarn setup-profile 10.5.1 && jest --verbose --config=jest.config.js", + "migration_v12.0.3": "yarn setup-profile 12.0.3 && jest --verbose --config=jest.config.js", "migration_v8.2.0": "yarn setup-profile 8.2.0 && jest --verbose --config=jest.config.js", "setup-profile": "ts-node ./src/configure_tests.ts" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.0.8", - "@aws-amplify/amplify-e2e-core": "5.0.3", + "@aws-amplify/amplify-cli-core": "4.3.11", + "@aws-amplify/amplify-e2e-core": "5.7.1", "@aws-cdk/cloudformation-diff": "~2.68.0", - "aws-cdk-lib": "~2.68.0", + "@aws-sdk/client-s3": "3.624.0", + "amplify-headless-interface": "1.17.7", + "aws-amplify": "^5.3.16", + "aws-cdk-lib": "~2.177.0", "constructs": "^10.0.5", "fs-extra": "^8.1.0", - "graphql-transformer-core": "^8.1.2", + "graphql-transformer-core": "^8.2.13", "lodash": "^4.17.21", - "semver": "^7.3.5", + "semver": "^7.5.4", "strip-ansi": "^6.0.0", "uuid": "^8.3.2" }, diff --git a/packages/amplify-migration-tests/sample.env b/packages/amplify-migration-tests/sample.env index 5f5f5df5709..8f9ac53f60a 100644 --- a/packages/amplify-migration-tests/sample.env +++ b/packages/amplify-migration-tests/sample.env @@ -1,3 +1,5 @@ +AMPLIFY_PATH= + # Used for setting up a new profile AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-2.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-2.test.ts deleted file mode 100644 index c788a7cd461..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-2.test.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { - addNotificationChannel, - amplifyPushAuth, - amplifyPushAuthV5V6, - createNewProjectDir, - deleteProject, - deleteProjectDir, - initJSProjectWithProfile, -} from '@aws-amplify/amplify-e2e-core'; -import { versionCheck } from '../../../migration-helpers'; -import { addLegacySmsNotificationChannel } from '../../../migration-helpers/notifications-helpers'; -import { getShortId } from '../../../migration-helpers/utils'; - -describe('amplify add notifications', () => { - let projectRoot: string; - const migrateFromVersion = { v: '10.0.0' }; - const migrateToVersion = { v: 'uninitialized' }; - - beforeEach(async () => { - projectRoot = await createNewProjectDir('notification-migration-2'); - await versionCheck(process.cwd(), false, migrateFromVersion); - await versionCheck(process.cwd(), true, migrateToVersion); - }); - - afterEach(async () => { - await deleteProject(projectRoot, undefined, true); - deleteProjectDir(projectRoot); - }); - - it('should add in app notifications if another notification channel added with an older version', async () => { - expect(migrateFromVersion.v).not.toEqual(migrateToVersion.v); - const settings = { resourceName: `notification${getShortId()}` }; - - await initJSProjectWithProfile(projectRoot, { includeUsageDataPrompt: false }); - await addLegacySmsNotificationChannel(projectRoot, settings.resourceName); - await addNotificationChannel(projectRoot, settings, 'In-App Messaging', true, true, true); - await amplifyPushAuth(projectRoot, true); - }); - - it('should add in app notifications if another notification channel added and pushed with an older version', async () => { - expect(migrateFromVersion.v).not.toEqual(migrateToVersion.v); - const settings = { resourceName: `notification${getShortId()}` }; - - await initJSProjectWithProfile(projectRoot, { includeUsageDataPrompt: false }); - await addLegacySmsNotificationChannel(projectRoot, settings.resourceName); - await amplifyPushAuthV5V6(projectRoot); - await addNotificationChannel(projectRoot, settings, 'In-App Messaging', true, true, true); - await amplifyPushAuth(projectRoot, true); - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-3.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-3.test.ts deleted file mode 100644 index 72c61786764..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-3.test.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { - addNotificationChannel, - addPinpointAnalytics, - amplifyPushAuth, - amplifyPushAuthV5V6, - createNewProjectDir, - deleteProject, - deleteProjectDir, - initJSProjectWithProfile, -} from '@aws-amplify/amplify-e2e-core'; -import { versionCheck } from '../../../migration-helpers'; -import { addLegacySmsNotificationChannel } from '../../../migration-helpers/notifications-helpers'; -import { getShortId } from '../../../migration-helpers/utils'; - -describe('amplify add notifications', () => { - let projectRoot: string; - const migrateFromVersion = { v: '10.0.0' }; - const migrateToVersion = { v: 'uninitialized' }; - - beforeEach(async () => { - projectRoot = await createNewProjectDir('notification-migration-3'); - await versionCheck(process.cwd(), false, migrateFromVersion); - await versionCheck(process.cwd(), true, migrateToVersion); - }); - - afterEach(async () => { - await deleteProject(projectRoot, undefined, true); - deleteProjectDir(projectRoot); - }); - - it('should add in app notifications if analytics then another notification channel added and pushed with an older version', async () => { - expect(migrateFromVersion.v).not.toEqual(migrateToVersion.v); - const settings = { resourceName: `notification${getShortId()}` }; - - await initJSProjectWithProfile(projectRoot, { includeUsageDataPrompt: false }); - await addPinpointAnalytics(projectRoot, false); - await amplifyPushAuthV5V6(projectRoot); - await addLegacySmsNotificationChannel(projectRoot, settings.resourceName, true); - await addNotificationChannel(projectRoot, settings, 'In-App Messaging', true, true, true); - await amplifyPushAuth(projectRoot, true); - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-4.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-4.test.ts deleted file mode 100644 index ba7b6549ed9..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-4.test.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { - amplifyPull, - amplifyPushAuthV5V6, - createNewProjectDir, - deleteProject, - deleteProjectDir, - getAppId, - initJSProjectWithProfile, -} from '@aws-amplify/amplify-e2e-core'; -import { versionCheck } from '../../../migration-helpers'; -import { addLegacySmsNotificationChannel, removeLegacyAllNotificationChannel } from '../../../migration-helpers/notifications-helpers'; -import { getShortId } from '../../../migration-helpers/utils'; - -describe('amplify add notifications', () => { - let projectRoot: string; - const migrateFromVersion = { v: '10.0.0' }; - const migrateToVersion = { v: 'uninitialized' }; - - beforeEach(async () => { - projectRoot = await createNewProjectDir('notification-migration-4'); - await versionCheck(process.cwd(), false, migrateFromVersion); - await versionCheck(process.cwd(), true, migrateToVersion); - }); - - afterEach(async () => { - await deleteProject(projectRoot, undefined, true); - deleteProjectDir(projectRoot); - }); - - it('should pull app if notifications added and removed with an older version', async () => { - expect(migrateFromVersion.v).not.toEqual(migrateToVersion.v); - const settings = { resourceName: `notification${getShortId()}` }; - - await initJSProjectWithProfile(projectRoot, { - disableAmplifyAppCreation: false, - includeUsageDataPrompt: false, - }); - const appId = getAppId(projectRoot); - expect(appId).toBeDefined(); - - await addLegacySmsNotificationChannel(projectRoot, settings.resourceName); - await amplifyPushAuthV5V6(projectRoot); - - await removeLegacyAllNotificationChannel(projectRoot); - const projectRootPull = await createNewProjectDir('removed-notifications-pull'); - try { - await amplifyPull(projectRootPull, { override: false, emptyDir: true, appId }, true); - } finally { - deleteProjectDir(projectRootPull); - } - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-5.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-5.test.ts deleted file mode 100644 index 56c8dc1bd0f..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-5.test.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { - addAuthWithDefault, - addNotificationChannel, - amplifyPushAuth, - amplifyPushAuthV5V6, - createNewProjectDir, - deleteProject, - deleteProjectDir, - initJSProjectWithProfile, -} from '@aws-amplify/amplify-e2e-core'; -import { versionCheck } from '../../../migration-helpers'; -import { addLegacySmsNotificationChannel } from '../../../migration-helpers/notifications-helpers'; -import { getShortId } from '../../../migration-helpers/utils'; - -describe('amplify add notifications', () => { - let projectRoot: string; - const migrateFromVersion = { v: '10.0.0' }; - const migrateToVersion = { v: 'uninitialized' }; - - beforeEach(async () => { - projectRoot = await createNewProjectDir('notification-migration-3'); - await versionCheck(process.cwd(), false, migrateFromVersion); - await versionCheck(process.cwd(), true, migrateToVersion); - }); - - afterEach(async () => { - await deleteProject(projectRoot, undefined, true); - deleteProjectDir(projectRoot); - }); - - it('should add in app notifications if analytics then another notification channel and auth added and pushed with an older version', async () => { - expect(migrateFromVersion.v).not.toEqual(migrateToVersion.v); - const settings = { resourceName: `notification${getShortId()}` }; - - await initJSProjectWithProfile(projectRoot, { includeUsageDataPrompt: false }); - await addAuthWithDefault(projectRoot, false); - await amplifyPushAuthV5V6(projectRoot); - await addLegacySmsNotificationChannel(projectRoot, settings.resourceName); - await addNotificationChannel(projectRoot, settings, 'In-App Messaging', true, true, true); - await amplifyPushAuth(projectRoot, true); - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-6.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-6.test.ts deleted file mode 100644 index 5cceb21164c..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration-6.test.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { - addAuthWithDefault, - addNotificationChannel, - amplifyPushAuth, - createNewProjectDir, - deleteProject, - deleteProjectDir, - initJSProjectWithProfile, -} from '@aws-amplify/amplify-e2e-core'; -import { versionCheck } from '../../../migration-helpers'; -import { addLegacySmsNotificationChannel } from '../../../migration-helpers/notifications-helpers'; -import { getShortId } from '../../../migration-helpers/utils'; - -describe('amplify add notifications', () => { - let projectRoot: string; - const migrateFromVersion = { v: '10.0.0' }; - const migrateToVersion = { v: 'uninitialized' }; - - beforeEach(async () => { - projectRoot = await createNewProjectDir('notification-migration-3'); - await versionCheck(process.cwd(), false, migrateFromVersion); - await versionCheck(process.cwd(), true, migrateToVersion); - }); - - afterEach(async () => { - await deleteProject(projectRoot, undefined, true); - deleteProjectDir(projectRoot); - }); - - it('should add in app notifications if analytics then another notification channel and auth added with an older version', async () => { - expect(migrateFromVersion.v).not.toEqual(migrateToVersion.v); - const settings = { resourceName: `notification${getShortId()}` }; - - await initJSProjectWithProfile(projectRoot, { includeUsageDataPrompt: false }); - await addAuthWithDefault(projectRoot, true); - await addLegacySmsNotificationChannel(projectRoot, settings.resourceName); - await addNotificationChannel(projectRoot, settings, 'In-App Messaging', true, true, true); - await amplifyPushAuth(projectRoot, true); - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration.test.ts deleted file mode 100644 index 2fdca92fc31..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests/notifications-migration/notifications-migration.test.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { - addNotificationChannel, - addPinpointAnalytics, - amplifyPushAuth, - amplifyPushAuthV5V6, - createNewProjectDir, - deleteProject, - deleteProjectDir, - initJSProjectWithProfile, -} from '@aws-amplify/amplify-e2e-core'; -import { versionCheck } from '../../../migration-helpers'; -import { getShortId } from '../../../migration-helpers/utils'; - -describe('amplify add notifications', () => { - let projectRoot: string; - const migrateFromVersion = { v: '10.0.0' }; - const migrateToVersion = { v: 'uninitialized' }; - - beforeEach(async () => { - projectRoot = await createNewProjectDir('init'); - await versionCheck(process.cwd(), false, migrateFromVersion); - await versionCheck(process.cwd(), true, migrateToVersion); - }); - - afterEach(async () => { - await deleteProject(projectRoot, undefined, true); - deleteProjectDir(projectRoot); - }); - - it('should add in app notifications if analytics added with an older version', async () => { - expect(migrateFromVersion.v).not.toEqual(migrateToVersion.v); - - await initJSProjectWithProfile(projectRoot, { includeUsageDataPrompt: false }); - await addPinpointAnalytics(projectRoot, false); - - const settings = { resourceName: `notification${getShortId()}` }; - await addNotificationChannel(projectRoot, settings, 'In-App Messaging', true, true, true); - - await amplifyPushAuth(projectRoot, true); - }); - - it('should add in app notifications if analytics added and pushed with an older version', async () => { - expect(migrateFromVersion.v).not.toEqual(migrateToVersion.v); - - await initJSProjectWithProfile(projectRoot, { includeUsageDataPrompt: false }); - await addPinpointAnalytics(projectRoot, false); - await amplifyPushAuthV5V6(projectRoot); - - const settings = { resourceName: `notification${getShortId()}` }; - await addNotificationChannel(projectRoot, settings, 'In-App Messaging', true, true, true); - - await amplifyPushAuth(projectRoot, true); - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests/transformer_migration/api.key.migration-2.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests/transformer_migration/api.key.migration-2.test.ts index 6b6b818fdc2..d5e4bafd268 100644 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests/transformer_migration/api.key.migration-2.test.ts +++ b/packages/amplify-migration-tests/src/__tests__/migration_tests/transformer_migration/api.key.migration-2.test.ts @@ -28,6 +28,7 @@ describe('amplify key force push', () => { await initJSProjectWithProfile(projRoot, { name: 'gqlkeytwomigration', includeUsageDataPrompt: false, + includeGen2RecommendationPrompt: false, }); }); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests/transformer_migration/api.key.migration.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests/transformer_migration/api.key.migration.test.ts index 8692660d33c..e2f99d6d920 100644 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests/transformer_migration/api.key.migration.test.ts +++ b/packages/amplify-migration-tests/src/__tests__/migration_tests/transformer_migration/api.key.migration.test.ts @@ -28,6 +28,7 @@ describe('amplify key force push', () => { await initJSProjectWithProfile(projRoot, { name: 'gqlkeymigration', includeUsageDataPrompt: false, + includeGen2RecommendationPrompt: false, }); }); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/api-graphql-v2.migration.test.ts.snap b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/api-graphql-v2.migration.test.ts.snap deleted file mode 100644 index baac4d6c8bf..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/api-graphql-v2.migration.test.ts.snap +++ /dev/null @@ -1,5 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`api graphql v2 migration tests ...adds graphql with v2 transformer, adds overrides, and pulls in latest version 1`] = `""`; - -exports[`api graphql v2 migration tests ...adds graphql with v2 transformer, adds overrides, and pulls in latest version 2`] = `""`; diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/api-rest-basic.migration.test.ts.snap b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/api-rest-basic.migration.test.ts.snap deleted file mode 100644 index 1477cf09a52..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/api-rest-basic.migration.test.ts.snap +++ /dev/null @@ -1,10 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`api REST migration tests ...adds rest APIs & DDB with v10 and pulls without drift in latest version 1`] = `""`; - -exports[`api REST migration tests ...adds rest APIs & DDB with v10 and pulls without drift in latest version 2`] = ` -"Outputs -[+] Output LambdaExecutionRoleArn: {\"Value\":{\"Fn::GetAtt\":[\"LambdaExecutionRole\",\"Arn\"]}} - -" -`; diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/api-rest-lambda.migration.test.ts.snap b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/api-rest-lambda.migration.test.ts.snap deleted file mode 100644 index 244712e21e5..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/api-rest-lambda.migration.test.ts.snap +++ /dev/null @@ -1,127 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`api lambda migration tests ...adds lambda with multiple rest APIs with v10 and pulls without drift in latest version 1`] = ` -"Resources -[~] AWS::Lambda::Function UserPoolClientLambda - ├─ [~] Code - │ └─ [~] .ZipFile: - │ ├─ [-] const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - const params = { - ClientId: event.ResourceProperties.clientId, - UserPoolId: event.ResourceProperties.userpoolId, - }; - identity - .describeUserPoolClient(params) - .promise() - .then(res => { - response.send(event, context, response.SUCCESS, { appSecret: res.UserPoolClient.ClientSecret }); - }) - .catch(err => { - response.send(event, context, response.FAILED, { err }); - }); - } -}; - - │ └─ [+] const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - const params = { - ClientId: event.ResourceProperties.clientId, - UserPoolId: event.ResourceProperties.userpoolId, - }; - identity - .describeUserPoolClient(params) - .promise() - .then((res) => { - response.send(event, context, response.SUCCESS, { appSecret: res.UserPoolClient.ClientSecret }); - }) - .catch((err) => { - response.send(event, context, response.FAILED, { err }); - }); - } -}; - - └─ [~] Runtime - ├─ [-] nodejs14.x - └─ [+] nodejs16.x - -" -`; - -exports[`api lambda migration tests ...adds lambda with multiple rest APIs with v10 and pulls without drift in latest version 2`] = ` -"Outputs -[+] Output LambdaExecutionRoleArn: {\"Value\":{\"Fn::GetAtt\":[\"LambdaExecutionRole\",\"Arn\"]}} - -Outputs -[+] Output LambdaExecutionRoleArn: {\"Value\":{\"Fn::GetAtt\":[\"LambdaExecutionRole\",\"Arn\"]}} - -Resources -[~] AWS::Lambda::Function UserPoolClientLambda - ├─ [~] Code - │ └─ [~] .ZipFile: - │ ├─ [-] const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - const params = { - ClientId: event.ResourceProperties.clientId, - UserPoolId: event.ResourceProperties.userpoolId, - }; - identity - .describeUserPoolClient(params) - .promise() - .then(res => { - response.send(event, context, response.SUCCESS, { appSecret: res.UserPoolClient.ClientSecret }); - }) - .catch(err => { - response.send(event, context, response.FAILED, { err }); - }); - } -}; - - │ └─ [+] const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - const params = { - ClientId: event.ResourceProperties.clientId, - UserPoolId: event.ResourceProperties.userpoolId, - }; - identity - .describeUserPoolClient(params) - .promise() - .then((res) => { - response.send(event, context, response.SUCCESS, { appSecret: res.UserPoolClient.ClientSecret }); - }) - .catch((err) => { - response.send(event, context, response.FAILED, { err }); - }); - } -}; - - └─ [~] Runtime - ├─ [-] nodejs14.x - └─ [+] nodejs16.x - -" -`; diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/api-rest-serverless.migration.test.ts.snap b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/api-rest-serverless.migration.test.ts.snap deleted file mode 100644 index 705b84ce000..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/api-rest-serverless.migration.test.ts.snap +++ /dev/null @@ -1,10 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`api serverless migration tests ...adds serverless REST api with v10 and pulls without drift in latest version 1`] = `""`; - -exports[`api serverless migration tests ...adds serverless REST api with v10 and pulls without drift in latest version 2`] = ` -"Outputs -[+] Output LambdaExecutionRoleArn: {\"Value\":{\"Fn::GetAtt\":[\"LambdaExecutionRole\",\"Arn\"]}} - -" -`; diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/auth-add-all.migration.test.ts.snap b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/auth-add-all.migration.test.ts.snap deleted file mode 100644 index d2b12730b07..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/auth-add-all.migration.test.ts.snap +++ /dev/null @@ -1,564 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`amplify migration test auth ...should add auth with max options and work on the latest version 1`] = ` -"Resources -[~] AWS::Lambda::Function RoleMapFunction - └─ [~] Runtime - ├─ [-] nodejs14.x - └─ [+] nodejs16.x - -Parameters -[-] Parameter facebookAppId: {\"Type\":\"String\"} -[-] Parameter googleClientId: {\"Type\":\"String\"} -[-] Parameter amazonAppId: {\"Type\":\"String\"} -[-] Parameter appleAppId: {\"Type\":\"String\"} -[~] Parameter hostedUIProviderCreds: {\"Type\":\"String\"} to {\"Type\":\"String\",\"NoEcho\":true} - -Resources -[~] AWS::Lambda::Function UserPoolClientLambda - ├─ [~] Code - │ └─ [~] .ZipFile: - │ ├─ [-] const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - const params = { - ClientId: event.ResourceProperties.clientId, - UserPoolId: event.ResourceProperties.userpoolId, - }; - identity - .describeUserPoolClient(params) - .promise() - .then(res => { - response.send(event, context, response.SUCCESS, { appSecret: res.UserPoolClient.ClientSecret }); - }) - .catch(err => { - response.send(event, context, response.FAILED, { err }); - }); - } -}; - - │ └─ [+] const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - const params = { - ClientId: event.ResourceProperties.clientId, - UserPoolId: event.ResourceProperties.userpoolId, - }; - identity - .describeUserPoolClient(params) - .promise() - .then((res) => { - response.send(event, context, response.SUCCESS, { appSecret: res.UserPoolClient.ClientSecret }); - }) - .catch((err) => { - response.send(event, context, response.FAILED, { err }); - }); - } -}; - - └─ [~] Runtime - ├─ [-] nodejs14.x - └─ [+] nodejs16.x -[~] AWS::Lambda::Function HostedUICustomResource - ├─ [~] Code - │ └─ [~] .ZipFile: - │ ├─ [-] const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - const userPoolId = event.ResourceProperties.userPoolId; - const inputDomainName = event.ResourceProperties.hostedUIDomainName; - let deleteUserPoolDomain = domainName => { - let params = { Domain: domainName, UserPoolId: userPoolId }; - return identity.deleteUserPoolDomain(params).promise(); - }; - if (event.RequestType == 'Delete') { - deleteUserPoolDomain(inputDomainName) - .then(() => { - response.send(event, context, response.SUCCESS, {}); - }) - .catch(err => { - console.log(err); - response.send(event, context, response.FAILED, { err }); - }); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - let checkDomainAvailability = domainName => { - let params = { Domain: domainName }; - return identity - .describeUserPoolDomain(params) - .promise() - .then(res => { - if (res.DomainDescription && res.DomainDescription.UserPool) { - return false; - } - return true; - }) - .catch(err => { - return false; - }); - }; - let createUserPoolDomain = domainName => { - let params = { Domain: domainName, UserPoolId: userPoolId }; - return identity.createUserPoolDomain(params).promise(); - }; - identity - .describeUserPool({ UserPoolId: userPoolId }) - .promise() - .then(result => { - if (inputDomainName) { - if (result.UserPool.Domain === inputDomainName) { - return; - } else { - if (!result.UserPool.Domain) { - return checkDomainAvailability(inputDomainName).then(isDomainAvailable => { - if (isDomainAvailable) { - return createUserPoolDomain(inputDomainName); - } else { - throw new Error('Domain not available'); - } - }); - } else { - return checkDomainAvailability(inputDomainName).then(isDomainAvailable => { - if (isDomainAvailable) { - return deleteUserPoolDomain(result.UserPool.Domain).then(() => createUserPoolDomain(inputDomainName)); - } else { - throw new Error('Domain not available'); - } - }); - } - } - } else { - if (result.UserPool.Domain) { - return deleteUserPoolDomain(result.UserPool.Domain); - } - } - }) - .then(() => { - response.send(event, context, response.SUCCESS, {}); - }) - .catch(err => { - console.log(err); - response.send(event, context, response.FAILED, { err }); - }); - } -}; - - │ └─ [+] const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - const userPoolId = event.ResourceProperties.userPoolId; - const inputDomainName = event.ResourceProperties.hostedUIDomainName; - let deleteUserPoolDomain = (domainName) => { - let params = { Domain: domainName, UserPoolId: userPoolId }; - return identity.deleteUserPoolDomain(params).promise(); - }; - if (event.RequestType == 'Delete') { - deleteUserPoolDomain(inputDomainName) - .then(() => { - response.send(event, context, response.SUCCESS, {}); - }) - .catch((err) => { - console.log(err); - response.send(event, context, response.FAILED, { err }); - }); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - let checkDomainAvailability = (domainName) => { - let params = { Domain: domainName }; - return identity - .describeUserPoolDomain(params) - .promise() - .then((res) => { - if (res.DomainDescription && res.DomainDescription.UserPool) { - return false; - } - return true; - }) - .catch((err) => { - return false; - }); - }; - let createUserPoolDomain = (domainName) => { - let params = { Domain: domainName, UserPoolId: userPoolId }; - return identity.createUserPoolDomain(params).promise(); - }; - identity - .describeUserPool({ UserPoolId: userPoolId }) - .promise() - .then((result) => { - if (inputDomainName) { - if (result.UserPool.Domain === inputDomainName) { - return; - } else { - if (!result.UserPool.Domain) { - return checkDomainAvailability(inputDomainName).then((isDomainAvailable) => { - if (isDomainAvailable) { - return createUserPoolDomain(inputDomainName); - } else { - throw new Error('Domain not available'); - } - }); - } else { - return checkDomainAvailability(inputDomainName).then((isDomainAvailable) => { - if (isDomainAvailable) { - return deleteUserPoolDomain(result.UserPool.Domain).then(() => createUserPoolDomain(inputDomainName)); - } else { - throw new Error('Domain not available'); - } - }); - } - } - } else { - if (result.UserPool.Domain) { - return deleteUserPoolDomain(result.UserPool.Domain); - } - } - }) - .then(() => { - response.send(event, context, response.SUCCESS, {}); - }) - .catch((err) => { - console.log(err); - response.send(event, context, response.FAILED, { err }); - }); - } -}; - - └─ [~] Runtime - ├─ [-] nodejs14.x - └─ [+] nodejs16.x -[~] AWS::Lambda::Function HostedUIProvidersCustomResource - ├─ [~] Code - │ └─ [~] .ZipFile: - │ ├─ [-] const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - try { - const userPoolId = event.ResourceProperties.userPoolId; - let hostedUIProviderMeta = JSON.parse(event.ResourceProperties.hostedUIProviderMeta); - let hostedUIProviderCreds = JSON.parse(event.ResourceProperties.hostedUIProviderCreds); - if (hostedUIProviderCreds.length === 0) { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - let getRequestParams = providerName => { - let providerMetaIndex = hostedUIProviderMeta.findIndex(provider => provider.ProviderName === providerName); - let providerMeta = hostedUIProviderMeta[providerMetaIndex]; - let providerCredsIndex = hostedUIProviderCreds.findIndex(provider => provider.ProviderName === providerName); - let providerCreds = hostedUIProviderCreds[providerCredsIndex]; - let requestParams = { - ProviderName: providerMeta.ProviderName, - UserPoolId: userPoolId, - AttributeMapping: providerMeta.AttributeMapping, - }; - if (providerMeta.ProviderName === 'SignInWithApple') { - if (providerCreds.client_id && providerCreds.team_id && providerCreds.key_id && providerCreds.private_key) { - requestParams.ProviderDetails = { - client_id: providerCreds.client_id, - team_id: providerCreds.team_id, - key_id: providerCreds.key_id, - private_key: providerCreds.private_key, - authorize_scopes: providerMeta.authorize_scopes, - }; - } else { - requestParams = null; - } - } else { - if (providerCreds.client_id && providerCreds.client_secret) { - requestParams.ProviderDetails = { - client_id: providerCreds.client_id, - client_secret: providerCreds.client_secret, - authorize_scopes: providerMeta.authorize_scopes, - }; - } else { - requestParams = null; - } - } - return requestParams; - }; - let createIdentityProvider = providerName => { - let requestParams = getRequestParams(providerName); - if (!requestParams) { - return Promise.resolve(); - } - requestParams.ProviderType = requestParams.ProviderName; - return identity.createIdentityProvider(requestParams).promise(); - }; - let updateIdentityProvider = providerName => { - let requestParams = getRequestParams(providerName); - if (!requestParams) { - return Promise.resolve(); - } - return identity.updateIdentityProvider(requestParams).promise(); - }; - let deleteIdentityProvider = providerName => { - let params = { ProviderName: providerName, UserPoolId: userPoolId }; - return identity.deleteIdentityProvider(params).promise(); - }; - let providerPromises = []; - identity - .listIdentityProviders({ UserPoolId: userPoolId, MaxResults: 60 }) - .promise() - .then(result => { - console.log(result); - let providerList = result.Providers.map(provider => provider.ProviderName); - let providerListInParameters = hostedUIProviderMeta.map(provider => provider.ProviderName); - hostedUIProviderMeta.forEach(providerMetadata => { - if (providerList.indexOf(providerMetadata.ProviderName) > -1) { - providerPromises.push(updateIdentityProvider(providerMetadata.ProviderName)); - } else { - providerPromises.push(createIdentityProvider(providerMetadata.ProviderName)); - } - }); - providerList.forEach(provider => { - if (providerListInParameters.indexOf(provider) < 0) { - providerPromises.push(deleteIdentityProvider(provider)); - } - }); - return Promise.all(providerPromises); - }) - .then(() => { - response.send(event, context, response.SUCCESS, {}); - }) - .catch(err => { - console.log(err.stack); - response.send(event, context, response.FAILED, { err }); - }); - } - } catch (err) { - console.log(err.stack); - response.send(event, context, response.FAILED, { err }); - } -}; - - │ └─ [+] const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - try { - const userPoolId = event.ResourceProperties.userPoolId; - let hostedUIProviderMeta = JSON.parse(event.ResourceProperties.hostedUIProviderMeta); - let hostedUIProviderCreds = JSON.parse(event.ResourceProperties.hostedUIProviderCreds); - if (hostedUIProviderCreds.length === 0) { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - let getRequestParams = (providerName) => { - let providerMetaIndex = hostedUIProviderMeta.findIndex((provider) => provider.ProviderName === providerName); - let providerMeta = hostedUIProviderMeta[providerMetaIndex]; - let providerCredsIndex = hostedUIProviderCreds.findIndex((provider) => provider.ProviderName === providerName); - let providerCreds = hostedUIProviderCreds[providerCredsIndex]; - let requestParams = { - ProviderName: providerMeta.ProviderName, - UserPoolId: userPoolId, - AttributeMapping: providerMeta.AttributeMapping, - }; - if (providerMeta.ProviderName === 'SignInWithApple') { - if (providerCreds.client_id && providerCreds.team_id && providerCreds.key_id && providerCreds.private_key) { - requestParams.ProviderDetails = { - client_id: providerCreds.client_id, - team_id: providerCreds.team_id, - key_id: providerCreds.key_id, - private_key: providerCreds.private_key, - authorize_scopes: providerMeta.authorize_scopes, - }; - } else { - requestParams = null; - } - } else { - if (providerCreds.client_id && providerCreds.client_secret) { - requestParams.ProviderDetails = { - client_id: providerCreds.client_id, - client_secret: providerCreds.client_secret, - authorize_scopes: providerMeta.authorize_scopes, - }; - } else { - requestParams = null; - } - } - return requestParams; - }; - let createIdentityProvider = (providerName) => { - let requestParams = getRequestParams(providerName); - if (!requestParams) { - return Promise.resolve(); - } - requestParams.ProviderType = requestParams.ProviderName; - return identity.createIdentityProvider(requestParams).promise(); - }; - let updateIdentityProvider = (providerName) => { - let requestParams = getRequestParams(providerName); - if (!requestParams) { - return Promise.resolve(); - } - return identity.updateIdentityProvider(requestParams).promise(); - }; - let deleteIdentityProvider = (providerName) => { - let params = { ProviderName: providerName, UserPoolId: userPoolId }; - return identity.deleteIdentityProvider(params).promise(); - }; - let providerPromises = []; - identity - .listIdentityProviders({ UserPoolId: userPoolId, MaxResults: 60 }) - .promise() - .then((result) => { - console.log(result); - let providerList = result.Providers.map((provider) => provider.ProviderName); - let providerListInParameters = hostedUIProviderMeta.map((provider) => provider.ProviderName); - hostedUIProviderMeta.forEach((providerMetadata) => { - if (providerList.indexOf(providerMetadata.ProviderName) > -1) { - providerPromises.push(updateIdentityProvider(providerMetadata.ProviderName)); - } else { - providerPromises.push(createIdentityProvider(providerMetadata.ProviderName)); - } - }); - providerList.forEach((provider) => { - if (providerListInParameters.indexOf(provider) < 0) { - providerPromises.push(deleteIdentityProvider(provider)); - } - }); - return Promise.all(providerPromises); - }) - .then(() => { - response.send(event, context, response.SUCCESS, {}); - }) - .catch((err) => { - console.log(err.stack); - response.send(event, context, response.FAILED, { err }); - }); - } - } catch (err) { - console.log(err.stack); - response.send(event, context, response.FAILED, { err }); - } -}; - - └─ [~] Runtime - ├─ [-] nodejs14.x - └─ [+] nodejs16.x -[~] AWS::Lambda::Function OAuthCustomResource - ├─ [~] Code - │ └─ [~] .ZipFile: - │ ├─ [-] const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - try { - const userPoolId = event.ResourceProperties.userPoolId; - let webClientId = event.ResourceProperties.webClientId; - let nativeClientId = event.ResourceProperties.nativeClientId; - let hostedUIProviderMeta = JSON.parse(event.ResourceProperties.hostedUIProviderMeta); - let oAuthMetadata = JSON.parse(event.ResourceProperties.oAuthMetadata); - let providerList = hostedUIProviderMeta.map(provider => provider.ProviderName); - providerList.push('COGNITO'); - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - let params = { - UserPoolId: userPoolId, - AllowedOAuthFlows: oAuthMetadata.AllowedOAuthFlows, - AllowedOAuthFlowsUserPoolClient: true, - AllowedOAuthScopes: oAuthMetadata.AllowedOAuthScopes, - CallbackURLs: oAuthMetadata.CallbackURLs, - LogoutURLs: oAuthMetadata.LogoutURLs, - SupportedIdentityProviders: providerList, - }; - console.log(params); - let updateUserPoolClientPromises = []; - params.ClientId = webClientId; - updateUserPoolClientPromises.push(identity.updateUserPoolClient(params).promise()); - params.ClientId = nativeClientId; - updateUserPoolClientPromises.push(identity.updateUserPoolClient(params).promise()); - Promise.all(updateUserPoolClientPromises) - .then(() => { - response.send(event, context, response.SUCCESS, {}); - }) - .catch(err => { - console.log(err.stack); - response.send(event, context, response.FAILED, { err }); - }); - } - } catch (err) { - console.log(err.stack); - response.send(event, context, response.FAILED, { err }); - } -}; - - │ └─ [+] const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - try { - const userPoolId = event.ResourceProperties.userPoolId; - let webClientId = event.ResourceProperties.webClientId; - let nativeClientId = event.ResourceProperties.nativeClientId; - let hostedUIProviderMeta = JSON.parse(event.ResourceProperties.hostedUIProviderMeta); - let oAuthMetadata = JSON.parse(event.ResourceProperties.oAuthMetadata); - let providerList = hostedUIProviderMeta.map((provider) => provider.ProviderName); - providerList.push('COGNITO'); - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - let params = { - UserPoolId: userPoolId, - AllowedOAuthFlows: oAuthMetadata.AllowedOAuthFlows, - AllowedOAuthFlowsUserPoolClient: true, - AllowedOAuthScopes: oAuthMetadata.AllowedOAuthScopes, - CallbackURLs: oAuthMetadata.CallbackURLs, - LogoutURLs: oAuthMetadata.LogoutURLs, - SupportedIdentityProviders: providerList, - }; - console.log(params); - let updateUserPoolClientPromises = []; - params.ClientId = webClientId; - updateUserPoolClientPromises.push(identity.updateUserPoolClient(params).promise()); - params.ClientId = nativeClientId; - updateUserPoolClientPromises.push(identity.updateUserPoolClient(params).promise()); - Promise.all(updateUserPoolClientPromises) - .then(() => { - response.send(event, context, response.SUCCESS, {}); - }) - .catch((err) => { - console.log(err.stack); - response.send(event, context, response.FAILED, { err }); - }); - } - } catch (err) { - console.log(err.stack); - response.send(event, context, response.FAILED, { err }); - } -}; - - └─ [~] Runtime - ├─ [-] nodejs14.x - └─ [+] nodejs16.x - -Outputs -[-] Output GoogleWebClient: {\"Value\":{\"Ref\":\"googleClientId\"}} -[-] Output FacebookWebClient: {\"Value\":{\"Ref\":\"facebookAppId\"}} -[-] Output AmazonWebClient: {\"Value\":{\"Ref\":\"amazonAppId\"}} -[-] Output AppleWebClient: {\"Value\":{\"Ref\":\"appleAppId\"}} - -" -`; diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/auth-override.migration.test.ts.snap b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/auth-override.migration.test.ts.snap deleted file mode 100644 index a43ce2a31e0..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/auth-override.migration.test.ts.snap +++ /dev/null @@ -1,121 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`amplify migration test auth ...should add auth with overrides and work fine on latest version 1`] = ` -"Resources -[~] AWS::Lambda::Function UserPoolClientLambda - ├─ [~] Code - │ └─ [~] .ZipFile: - │ ├─ [-] const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - const params = { - ClientId: event.ResourceProperties.clientId, - UserPoolId: event.ResourceProperties.userpoolId, - }; - identity - .describeUserPoolClient(params) - .promise() - .then(res => { - response.send(event, context, response.SUCCESS, { appSecret: res.UserPoolClient.ClientSecret }); - }) - .catch(err => { - response.send(event, context, response.FAILED, { err }); - }); - } -}; - - │ └─ [+] const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - const params = { - ClientId: event.ResourceProperties.clientId, - UserPoolId: event.ResourceProperties.userpoolId, - }; - identity - .describeUserPoolClient(params) - .promise() - .then((res) => { - response.send(event, context, response.SUCCESS, { appSecret: res.UserPoolClient.ClientSecret }); - }) - .catch((err) => { - response.send(event, context, response.FAILED, { err }); - }); - } -}; - - └─ [~] Runtime - ├─ [-] nodejs14.x - └─ [+] nodejs16.x - -" -`; - -exports[`amplify migration test auth ...should add auth with overrides and work fine on latest version 2`] = ` -"Resources -[~] AWS::Lambda::Function UserPoolClientLambda - ├─ [~] Code - │ └─ [~] .ZipFile: - │ ├─ [-] const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - const params = { - ClientId: event.ResourceProperties.clientId, - UserPoolId: event.ResourceProperties.userpoolId, - }; - identity - .describeUserPoolClient(params) - .promise() - .then(res => { - response.send(event, context, response.SUCCESS, { appSecret: res.UserPoolClient.ClientSecret }); - }) - .catch(err => { - response.send(event, context, response.FAILED, { err }); - }); - } -}; - - │ └─ [+] const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - const params = { - ClientId: event.ResourceProperties.clientId, - UserPoolId: event.ResourceProperties.userpoolId, - }; - identity - .describeUserPoolClient(params) - .promise() - .then((res) => { - response.send(event, context, response.SUCCESS, { appSecret: res.UserPoolClient.ClientSecret }); - }) - .catch((err) => { - response.send(event, context, response.FAILED, { err }); - }); - } -}; - - └─ [~] Runtime - ├─ [-] nodejs14.x - └─ [+] nodejs16.x - -" -`; diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/custom-stack.migration.test.ts.snap b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/custom-stack.migration.test.ts.snap deleted file mode 100644 index 8ca6b1208de..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/custom-stack.migration.test.ts.snap +++ /dev/null @@ -1,5 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`adding custom resources migration test add/update CDK and CFN custom resources 1`] = `""`; - -exports[`adding custom resources migration test add/update CDK and CFN custom resources 2`] = `""`; diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/geo.migration.test.ts.snap b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/geo.migration.test.ts.snap deleted file mode 100644 index a6385d715c0..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/geo.migration.test.ts.snap +++ /dev/null @@ -1,133 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`geo category migration from v10 to latest ...pull and push should not drift with new amplify version 1`] = ` -"Resources -[~] AWS::Lambda::Function UserPoolClientLambda - ├─ [~] Code - │ └─ [~] .ZipFile: - │ ├─ [-] const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - const params = { - ClientId: event.ResourceProperties.clientId, - UserPoolId: event.ResourceProperties.userpoolId, - }; - identity - .describeUserPoolClient(params) - .promise() - .then(res => { - response.send(event, context, response.SUCCESS, { appSecret: res.UserPoolClient.ClientSecret }); - }) - .catch(err => { - response.send(event, context, response.FAILED, { err }); - }); - } -}; - - │ └─ [+] const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - const params = { - ClientId: event.ResourceProperties.clientId, - UserPoolId: event.ResourceProperties.userpoolId, - }; - identity - .describeUserPoolClient(params) - .promise() - .then((res) => { - response.send(event, context, response.SUCCESS, { appSecret: res.UserPoolClient.ClientSecret }); - }) - .catch((err) => { - response.send(event, context, response.FAILED, { err }); - }); - } -}; - - └─ [~] Runtime - ├─ [-] nodejs14.x - └─ [+] nodejs16.x - -Resources -[~] AWS::Lambda::Function RoleMapFunction - └─ [~] Runtime - ├─ [-] nodejs14.x - └─ [+] nodejs16.x - -" -`; - -exports[`geo category migration from v10 to latest ...pull and push should not drift with new amplify version 2`] = ` -"Resources -[~] AWS::Lambda::Function UserPoolClientLambda - ├─ [~] Code - │ └─ [~] .ZipFile: - │ ├─ [-] const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - const params = { - ClientId: event.ResourceProperties.clientId, - UserPoolId: event.ResourceProperties.userpoolId, - }; - identity - .describeUserPoolClient(params) - .promise() - .then(res => { - response.send(event, context, response.SUCCESS, { appSecret: res.UserPoolClient.ClientSecret }); - }) - .catch(err => { - response.send(event, context, response.FAILED, { err }); - }); - } -}; - - │ └─ [+] const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - const params = { - ClientId: event.ResourceProperties.clientId, - UserPoolId: event.ResourceProperties.userpoolId, - }; - identity - .describeUserPoolClient(params) - .promise() - .then((res) => { - response.send(event, context, response.SUCCESS, { appSecret: res.UserPoolClient.ClientSecret }); - }) - .catch((err) => { - response.send(event, context, response.FAILED, { err }); - }); - } -}; - - └─ [~] Runtime - ├─ [-] nodejs14.x - └─ [+] nodejs16.x - -Resources -[~] AWS::Lambda::Function RoleMapFunction - └─ [~] Runtime - ├─ [-] nodejs14.x - └─ [+] nodejs16.x - -" -`; diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/storage.migration.test.ts.snap b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/storage.migration.test.ts.snap deleted file mode 100644 index eeed5579656..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/__snapshots__/storage.migration.test.ts.snap +++ /dev/null @@ -1,124 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`storage category migration from v10 to latest ...pull and push should not drift with new amplify version 1`] = ` -"Resources -[~] AWS::Lambda::Function UserPoolClientLambda - ├─ [~] Code - │ └─ [~] .ZipFile: - │ ├─ [-] const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - const params = { - ClientId: event.ResourceProperties.clientId, - UserPoolId: event.ResourceProperties.userpoolId, - }; - identity - .describeUserPoolClient(params) - .promise() - .then(res => { - response.send(event, context, response.SUCCESS, { appSecret: res.UserPoolClient.ClientSecret }); - }) - .catch(err => { - response.send(event, context, response.FAILED, { err }); - }); - } -}; - - │ └─ [+] const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - const params = { - ClientId: event.ResourceProperties.clientId, - UserPoolId: event.ResourceProperties.userpoolId, - }; - identity - .describeUserPoolClient(params) - .promise() - .then((res) => { - response.send(event, context, response.SUCCESS, { appSecret: res.UserPoolClient.ClientSecret }); - }) - .catch((err) => { - response.send(event, context, response.FAILED, { err }); - }); - } -}; - - └─ [~] Runtime - ├─ [-] nodejs14.x - └─ [+] nodejs16.x - -" -`; - -exports[`storage category migration from v10 to latest ...pull and push should not drift with new amplify version 2`] = ` -"Outputs -[+] Output LambdaExecutionRoleArn: {\"Value\":{\"Fn::GetAtt\":[\"LambdaExecutionRole\",\"Arn\"]}} - -Resources -[~] AWS::Lambda::Function UserPoolClientLambda - ├─ [~] Code - │ └─ [~] .ZipFile: - │ ├─ [-] const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - const params = { - ClientId: event.ResourceProperties.clientId, - UserPoolId: event.ResourceProperties.userpoolId, - }; - identity - .describeUserPoolClient(params) - .promise() - .then(res => { - response.send(event, context, response.SUCCESS, { appSecret: res.UserPoolClient.ClientSecret }); - }) - .catch(err => { - response.send(event, context, response.FAILED, { err }); - }); - } -}; - - │ └─ [+] const response = require('cfn-response'); -const aws = require('aws-sdk'); -const identity = new aws.CognitoIdentityServiceProvider(); -exports.handler = (event, context, callback) => { - if (event.RequestType == 'Delete') { - response.send(event, context, response.SUCCESS, {}); - } - if (event.RequestType == 'Update' || event.RequestType == 'Create') { - const params = { - ClientId: event.ResourceProperties.clientId, - UserPoolId: event.ResourceProperties.userpoolId, - }; - identity - .describeUserPoolClient(params) - .promise() - .then((res) => { - response.send(event, context, response.SUCCESS, { appSecret: res.UserPoolClient.ClientSecret }); - }) - .catch((err) => { - response.send(event, context, response.FAILED, { err }); - }); - } -}; - - └─ [~] Runtime - ├─ [-] nodejs14.x - └─ [+] nodejs16.x - -" -`; diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/api-graphql-v2.migration.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/api-graphql-v2.migration.test.ts deleted file mode 100644 index 27ad5d190c2..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/api-graphql-v2.migration.test.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { - addApiWithoutSchema, - amplifyOverrideApi, - amplifyPull, - amplifyPushLegacy, - amplifyPushAuth, - amplifyPushOverride, - createNewProjectDir, - deleteProject, - deleteProjectDir, - getAppId, - getAppSyncApi, - getProjectMeta, - updateApiSchema, -} from '@aws-amplify/amplify-e2e-core'; -import { initJSProjectWithProfileV10 } from '../../migration-helpers-v10/init'; -import { assertNoParameterChangesBetweenProjects, collectCloudformationDiffBetweenProjects } from '../../migration-helpers/utils'; -import * as fs from 'fs-extra'; -import path from 'path'; -import { cfnDiffExclusions } from '../../migration-helpers-v10/cfn-diff-exclusions'; - -describe('api graphql v2 migration tests', () => { - let projRoot: string; - - afterEach(async () => { - await deleteProject(projRoot, undefined, true); - deleteProjectDir(projRoot); - }); - - // inspired by api_7.test.ts - it('...adds graphql with v2 transformer, adds overrides, and pulls in latest version', async () => { - const projectName = 'gqmigration'; - projRoot = await createNewProjectDir(projectName); - - await initJSProjectWithProfileV10(projRoot, { name: projectName, disableAmplifyAppCreation: false }); - await addApiWithoutSchema(projRoot); - await updateApiSchema(projRoot, projectName, 'simple_model.graphql'); - await amplifyPushLegacy(projRoot); - - const meta = getProjectMeta(projRoot); - const region = meta.providers.awscloudformation.Region; - // eslint-disable-next-line spellcheck/spell-checker - const { output } = meta.api.gqmigration; - const { GraphQLAPIIdOutput } = output; - - // add overrides - await amplifyOverrideApi(projRoot); - const srcOverrideFilePath = path.join(__dirname, '..', '..', '..', 'overrides', 'override-api-gql.v10.ts'); - const destOverrideFilePath = path.join(projRoot, 'amplify', 'backend', 'api', `${projectName}`, 'override.ts'); - fs.copyFileSync(srcOverrideFilePath, destOverrideFilePath); - await amplifyPushOverride(projRoot); - - // pull down with vlatest - const appId = getAppId(projRoot); - expect(appId).toBeDefined(); - const projRoot2 = await createNewProjectDir(`${projectName}2`); - try { - await amplifyPull(projRoot2, { emptyDir: true, appId }, true); - assertNoParameterChangesBetweenProjects(projRoot, projRoot2); - expect(collectCloudformationDiffBetweenProjects(projRoot, projRoot2, cfnDiffExclusions)).toMatchSnapshot(); - await amplifyPushAuth(projRoot2, true); - assertNoParameterChangesBetweenProjects(projRoot, projRoot2); - expect(collectCloudformationDiffBetweenProjects(projRoot, projRoot2, cfnDiffExclusions)).toMatchSnapshot(); - - // check overridden config in cloud after pushing with vLatest - const overriddenAppsyncApiOverride = await getAppSyncApi(GraphQLAPIIdOutput, region); - expect(overriddenAppsyncApiOverride.graphqlApi).toBeDefined(); - expect(overriddenAppsyncApiOverride.graphqlApi.apiId).toEqual(GraphQLAPIIdOutput); - // eslint-disable-next-line spellcheck/spell-checker - expect(overriddenAppsyncApiOverride.graphqlApi.xrayEnabled).toEqual(true); - } finally { - deleteProjectDir(projRoot2); - } - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/api-rest-basic.migration.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/api-rest-basic.migration.test.ts deleted file mode 100644 index 3cdd842d723..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/api-rest-basic.migration.test.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { - addRestApi, - addSimpleDDB, - amplifyPull, - amplifyPushAuth, - amplifyPushUpdateLegacy, - createNewProjectDir, - deleteProject, - deleteProjectDir, - generateRandomShortId, - getAppId, - getProjectMeta, - validateRestApiMeta, -} from '@aws-amplify/amplify-e2e-core'; -import { cfnDiffExclusions } from '../../migration-helpers-v10/cfn-diff-exclusions'; -import { initJSProjectWithProfileV10 } from '../../migration-helpers-v10/init'; -import { assertNoParameterChangesBetweenProjects, collectCloudformationDiffBetweenProjects } from '../../migration-helpers/utils'; - -describe('api REST migration tests', () => { - let projRoot: string; - let projectName: string; - - afterEach(async () => { - await deleteProject(projRoot, undefined, true); - deleteProjectDir(projRoot); - }); - - it('...adds rest APIs & DDB with v10 and pulls without drift in latest version', async () => { - projectName = 'restDDB'; - projRoot = await createNewProjectDir(projectName); - - const randomId = await generateRandomShortId(); - const DDB_NAME = `ddb${randomId}`; - await initJSProjectWithProfileV10(projRoot, { name: 'restApiTest', disableAmplifyAppCreation: false }); - await addSimpleDDB(projRoot, { name: DDB_NAME }); - await addRestApi(projRoot, { isCrud: true, projectContainsFunctions: false }); - await amplifyPushUpdateLegacy(projRoot); - - const meta = getProjectMeta(projRoot); - validateRestApiMeta(projRoot, meta); - - // pull down with vlatest - const appId = getAppId(projRoot); - expect(appId).toBeDefined(); - const projRoot2 = await createNewProjectDir(`${projectName}2`); - try { - await amplifyPull(projRoot2, { emptyDir: true, appId }, true); - assertNoParameterChangesBetweenProjects(projRoot, projRoot2); - expect(collectCloudformationDiffBetweenProjects(projRoot, projRoot2, cfnDiffExclusions)).toMatchSnapshot(); - await amplifyPushAuth(projRoot2, true); - assertNoParameterChangesBetweenProjects(projRoot, projRoot2); - expect(collectCloudformationDiffBetweenProjects(projRoot, projRoot2, cfnDiffExclusions)).toMatchSnapshot(); - - // validate metadata - const meta2 = getProjectMeta(projRoot2); - validateRestApiMeta(projRoot2, meta2); - } finally { - deleteProjectDir(projRoot2); - } - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/api-rest-lambda.migration.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/api-rest-lambda.migration.test.ts deleted file mode 100644 index 69633c4df7e..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/api-rest-lambda.migration.test.ts +++ /dev/null @@ -1,112 +0,0 @@ -import { - addFunction, - addRestApi, - amplifyPull, - amplifyPushAuth, - amplifyPushUpdateLegacy, - createNewProjectDir, - deleteProject, - deleteProjectDir, - getAppId, - getProjectMeta, - listAttachedRolePolicies, - listRolePolicies, - updateAuthAddAdminQueries, - validateRestApiMeta, -} from '@aws-amplify/amplify-e2e-core'; -import { cfnDiffExclusions } from '../../migration-helpers-v10/cfn-diff-exclusions'; -import { initJSProjectWithProfileV10 } from '../../migration-helpers-v10/init'; -import { assertNoParameterChangesBetweenProjects, collectCloudformationDiffBetweenProjects } from '../../migration-helpers/utils'; - -describe('api lambda migration tests', () => { - let projRoot: string; - let projectName: string; - - afterEach(async () => { - await deleteProject(projRoot, undefined, true); - deleteProjectDir(projRoot); - }); - - it('...adds lambda with multiple rest APIs with v10 and pulls without drift in latest version', async () => { - projectName = 'restAdvanced'; - projRoot = await createNewProjectDir(projectName); - - await initJSProjectWithProfileV10(projRoot, { name: 'restApiTest', disableAmplifyAppCreation: false }); - await addFunction(projRoot, { functionTemplate: 'Hello World' }, 'nodejs'); - await addRestApi(projRoot, { - existingLambda: true, - restrictAccess: true, - allowGuestUsers: true, - }); - await addRestApi(projRoot, { - isFirstRestApi: false, - existingLambda: true, - restrictAccess: true, - allowGuestUsers: true, - }); - await addRestApi(projRoot, { - isFirstRestApi: false, - existingLambda: true, - restrictAccess: true, - allowGuestUsers: false, - }); - - // add more paths to and test policy slicing - for (let i = 0; i < 15; i++) { - await addRestApi(projRoot, { - path: `/items${i}`, - isFirstRestApi: false, - existingLambda: true, - restrictAccess: true, - allowGuestUsers: true, - }); - } - await addRestApi(projRoot, { isFirstRestApi: false, existingLambda: true }); - await updateAuthAddAdminQueries(projRoot, undefined, {}); - await amplifyPushUpdateLegacy(projRoot); - - // make sure current project meta is valid - const meta = getProjectMeta(projRoot); - validateRestApiMeta(projRoot, meta); - - // pull down with vlatest - const appId = getAppId(projRoot); - expect(appId).toBeDefined(); - const projRoot2 = await createNewProjectDir(`${projectName}2`); - try { - await amplifyPull(projRoot2, { emptyDir: true, appId }, true); - assertNoParameterChangesBetweenProjects(projRoot, projRoot2); - - expect(collectCloudformationDiffBetweenProjects(projRoot, projRoot2, cfnDiffExclusions)).toMatchSnapshot(); - await amplifyPushAuth(projRoot2, true); - assertNoParameterChangesBetweenProjects(projRoot, projRoot2); - expect(collectCloudformationDiffBetweenProjects(projRoot, projRoot2, cfnDiffExclusions)).toMatchSnapshot(); - - // validate metadata for pulled down project - const meta2 = getProjectMeta(projRoot2); - validateRestApiMeta(projRoot2, meta2); - - // validate role policies - const cfnMeta = meta2.providers.awscloudformation; - const { AuthRoleName, UnauthRoleName, Region } = cfnMeta; - - // there should be no inline policies attached to the roles - expect(await listRolePolicies(AuthRoleName, Region)).toEqual([]); - expect(await listRolePolicies(UnauthRoleName, Region)).toEqual([]); - - // there should be some managed policies attached to the roles - const authPolicies = await listAttachedRolePolicies(AuthRoleName, Region); - expect(authPolicies.length).toBeGreaterThan(0); - for (const { PolicyName } of authPolicies) { - expect(PolicyName).toMatch(/PolicyAPIGWAuth\d/); - } - const unauthPolicies = await listAttachedRolePolicies(UnauthRoleName, Region); - expect(unauthPolicies.length).toBeGreaterThan(0); - for (const { PolicyName } of unauthPolicies) { - expect(PolicyName).toMatch(/PolicyAPIGWUnauth\d/); - } - } finally { - deleteProjectDir(projRoot2); - } - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/api-rest-serverless.migration.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/api-rest-serverless.migration.test.ts deleted file mode 100644 index 3b19d1e52bd..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/api-rest-serverless.migration.test.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { - addRestApi, - amplifyPull, - amplifyPushAuth, - amplifyPushUpdateLegacy, - createNewProjectDir, - deleteProject, - deleteProjectDir, - getAppId, - getProjectMeta, - validateRestApiMeta, -} from '@aws-amplify/amplify-e2e-core'; -import { cfnDiffExclusions } from '../../migration-helpers-v10/cfn-diff-exclusions'; -import { initJSProjectWithProfileV10 } from '../../migration-helpers-v10/init'; -import { assertNoParameterChangesBetweenProjects, collectCloudformationDiffBetweenProjects } from '../../migration-helpers/utils'; - -describe('api serverless migration tests', () => { - let projRoot: string; - let projectName: string; - - afterEach(async () => { - await deleteProject(projRoot, undefined, true); - deleteProjectDir(projRoot); - }); - - it('...adds serverless REST api with v10 and pulls without drift in latest version', async () => { - projectName = 'restDDB'; - projRoot = await createNewProjectDir(projectName); - - await initJSProjectWithProfileV10(projRoot, { name: 'restApiTest', disableAmplifyAppCreation: false }); - await addRestApi(projRoot, { isCrud: false }); - await amplifyPushUpdateLegacy(projRoot); - - const meta = getProjectMeta(projRoot); - validateRestApiMeta(projRoot, meta); - - // pull down with vlatest - const appId = getAppId(projRoot); - expect(appId).toBeDefined(); - const projRoot2 = await createNewProjectDir(`${projectName}2`); - try { - await amplifyPull(projRoot2, { emptyDir: true, appId }, true); - assertNoParameterChangesBetweenProjects(projRoot, projRoot2); - expect(collectCloudformationDiffBetweenProjects(projRoot, projRoot2, cfnDiffExclusions)).toMatchSnapshot(); - await amplifyPushAuth(projRoot2, true); - assertNoParameterChangesBetweenProjects(projRoot, projRoot2); - expect(collectCloudformationDiffBetweenProjects(projRoot, projRoot2, cfnDiffExclusions)).toMatchSnapshot(); - - // validate metadata - const meta2 = getProjectMeta(projRoot2); - validateRestApiMeta(projRoot2, meta2); - } finally { - deleteProjectDir(projRoot2); - } - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/auth-add-all.migration.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/auth-add-all.migration.test.ts deleted file mode 100644 index 2d2016d1ad6..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/auth-add-all.migration.test.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { - addAuthWithMaxOptions, - amplifyPull, - amplifyPushAuthV10, - createNewProjectDir, - deleteProject, - deleteProjectDir, - getAppId, -} from '@aws-amplify/amplify-e2e-core'; -import { versionCheck, allowedVersionsToMigrateFrom } from '../../migration-helpers'; -import { cfnDiffExclusions } from '../../migration-helpers-v10/cfn-diff-exclusions'; -import { initJSProjectWithProfileV10 } from '../../migration-helpers-v10/init'; -import { assertNoParameterChangesBetweenProjects, collectCloudformationDiffBetweenProjects } from '../../migration-helpers/utils'; - -describe('amplify migration test auth', () => { - let projRoot1: string; - - beforeAll(async () => { - const migrateFromVersion = { v: 'unintialized' }; - const migrateToVersion = { v: 'unintialized' }; - await versionCheck(process.cwd(), false, migrateFromVersion); - await versionCheck(process.cwd(), true, migrateToVersion); - console.log(`Test migration from: ${migrateFromVersion.v} to ${migrateToVersion.v}`); - expect(migrateFromVersion.v).not.toEqual(migrateToVersion.v); - expect(allowedVersionsToMigrateFrom).toContain(migrateFromVersion.v); - }); - - beforeEach(async () => { - projRoot1 = await createNewProjectDir('authMigration1'); - }); - - afterEach(async () => { - // note - this deletes the original project using the latest codebase - await deleteProject(projRoot1, null, true); - deleteProjectDir(projRoot1); - }); - - it('...should add auth with max options and work on the latest version', async () => { - await initJSProjectWithProfileV10(projRoot1, { name: 'authTest', disableAmplifyAppCreation: false }); - - await addAuthWithMaxOptions(projRoot1, {}); - await amplifyPushAuthV10(projRoot1); - - const appId = getAppId(projRoot1); - expect(appId).toBeDefined(); - const projRoot2 = await createNewProjectDir('authMigration2'); - - try { - await amplifyPull(projRoot2, { emptyDir: true, appId }, true); - assertNoParameterChangesBetweenProjects(projRoot1, projRoot2); - expect(collectCloudformationDiffBetweenProjects(projRoot1, projRoot2, cfnDiffExclusions)).toMatchSnapshot(); - - // The following checks can be re-enabled once we find a way to configure the social logic provider values - // on a newly pulled down project. Currently, those parameters don't get pulled down. - - // await amplifyPushWithoutCodegen(projRoot2, true); - // assertNoParameterChangesBetweenProjects(projRoot1, projRoot2); - // expect(collectCloudformationDiffBetweenProjects(projRoot1, projRoot2, cfnDiffExclusions)).toMatchSnapshot(); - - // // should be able to remove & add auth after pulling down an older project - // await removeAuthWithDefault(projRoot2, true); - // await addAuthWithDefault(projRoot2, {}, true); - // await amplifyPushAuth(projRoot2, true); - } finally { - deleteProjectDir(projRoot2); - } - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/auth-override.migration.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/auth-override.migration.test.ts deleted file mode 100644 index d14ee049af5..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/auth-override.migration.test.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { - addAuthWithDefault, - amplifyOverrideAuth, - amplifyPull, - amplifyPushOverride, - amplifyPushWithoutCodegen, - createNewProjectDir, - deleteProject, - deleteProjectDir, - getAppId, - getProjectMeta, - getUserPool, - replaceOverrideFileWithProjectInfo, -} from '@aws-amplify/amplify-e2e-core'; -import { versionCheck, allowedVersionsToMigrateFrom } from '../../migration-helpers'; -import { initJSProjectWithProfileV10 } from '../../migration-helpers-v10/init'; -import { assertNoParameterChangesBetweenProjects, collectCloudformationDiffBetweenProjects } from '../../migration-helpers/utils'; -import * as path from 'path'; - -describe('amplify migration test auth', () => { - let projRoot1: string; - - beforeAll(async () => { - const migrateFromVersion = { v: 'unintialized' }; - const migrateToVersion = { v: 'unintialized' }; - await versionCheck(process.cwd(), false, migrateFromVersion); - await versionCheck(process.cwd(), true, migrateToVersion); - console.log(`Test migration from: ${migrateFromVersion.v} to ${migrateToVersion.v}`); - expect(migrateFromVersion.v).not.toEqual(migrateToVersion.v); - expect(allowedVersionsToMigrateFrom).toContain(migrateFromVersion.v); - }); - - beforeEach(async () => { - projRoot1 = await createNewProjectDir('authMigration1'); - }); - - afterEach(async () => { - // note - this deletes the original project using the latest codebase - await deleteProject(projRoot1, null, true); - deleteProjectDir(projRoot1); - }); - - it('...should add auth with overrides and work fine on latest version', async () => { - const projectName = 'authTest'; - await initJSProjectWithProfileV10(projRoot1, { name: projectName, disableAmplifyAppCreation: false }); - - await addAuthWithDefault(projRoot1); - await amplifyPushWithoutCodegen(projRoot1); - - const meta = getProjectMeta(projRoot1); - const authResourceName = Object.keys(meta.auth).filter((key) => meta.auth[key].service === 'Cognito'); - const userPoolId = Object.keys(meta.auth).map((key) => meta.auth[key])[0].output.UserPoolId; - - // override new env - await amplifyOverrideAuth(projRoot1); - // this is where we will write our override logic to - const destOverrideFilePath = path.join(projRoot1, 'amplify', 'backend', 'auth', `${authResourceName}`, 'override.ts'); - const srcOverrideFilePath = path.join(__dirname, '..', '..', '..', 'overrides', 'override-auth.ts'); - replaceOverrideFileWithProjectInfo(srcOverrideFilePath, destOverrideFilePath, 'integtest', projectName); - await amplifyPushOverride(projRoot1); - - const appId = getAppId(projRoot1); - expect(appId).toBeDefined(); - const projRoot2 = await createNewProjectDir('authMigration2'); - try { - await amplifyPull(projRoot2, { emptyDir: true, appId }, true); - assertNoParameterChangesBetweenProjects(projRoot1, projRoot2); - expect(collectCloudformationDiffBetweenProjects(projRoot1, projRoot2)).toMatchSnapshot(); - await amplifyPushWithoutCodegen(projRoot2, true); - assertNoParameterChangesBetweenProjects(projRoot1, projRoot2); - expect(collectCloudformationDiffBetweenProjects(projRoot1, projRoot2)).toMatchSnapshot(); - - // check overwritten config - const overwrittenUserPool = await getUserPool(userPoolId, meta.providers.awscloudformation.Region); - expect(overwrittenUserPool.UserPool).toBeDefined(); - expect(overwrittenUserPool.UserPool.DeviceConfiguration.ChallengeRequiredOnNewDevice).toBe(true); - } finally { - deleteProjectDir(projRoot2); - } - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/custom-stack.migration.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/custom-stack.migration.test.ts deleted file mode 100644 index 1bf3d3166c4..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/custom-stack.migration.test.ts +++ /dev/null @@ -1,144 +0,0 @@ -import { JSONUtilities } from '@aws-amplify/amplify-cli-core'; -import { - addCDKCustomResource, - addCFNCustomResource, - amplifyPull, - amplifyPushAuth, - amplifyPushAuthV10, - buildCustomResources, - createNewProjectDir, - deleteProject, - deleteProjectDir, - getAppId, - getProjectMeta, -} from '@aws-amplify/amplify-e2e-core'; -import * as fs from 'fs-extra'; -import * as path from 'path'; -import { v4 as uuid } from 'uuid'; -import { initJSProjectWithProfileV10 } from '../../migration-helpers-v10/init'; -import { assertNoParameterChangesBetweenProjects, collectCloudformationDiffBetweenProjects } from '../../migration-helpers/utils'; - -describe('adding custom resources migration test', () => { - let projRoot: string; - beforeEach(async () => { - projRoot = await createNewProjectDir('custom-resources'); - }); - - afterEach(async () => { - await deleteProject(projRoot, null, true); - deleteProjectDir(projRoot); - }); - - it('add/update CDK and CFN custom resources', async () => { - const cdkResourceName = `custom${uuid().split('-')[0]}`; - const cfnResourceName = `custom${uuid().split('-')[0]}`; - const cfnResourceNameWithV10 = `custom${uuid().split('-')[0]}`; - - await initJSProjectWithProfileV10(projRoot, { name: 'customMigration', disableAmplifyAppCreation: false }); - const appId = getAppId(projRoot); - expect(appId).toBeDefined(); - - await addCDKCustomResource(projRoot, { name: cdkResourceName }); - await addCFNCustomResource(projRoot, { name: cfnResourceNameWithV10, promptForCategorySelection: true }); - const srcCFNCustomResourceFilePath = path.join(__dirname, '..', '..', '..', 'custom-resources', 'custom-cfn-stack.json'); - // adding a resource to custom cfn stack - const destCFNCustomResourceFilePath = path.join( - projRoot, - 'amplify', - 'backend', - 'custom', - cfnResourceNameWithV10, - `${cfnResourceNameWithV10}-cloudformation-template.json`, - ); - fs.copyFileSync(srcCFNCustomResourceFilePath, destCFNCustomResourceFilePath); - - // this is where we will write our custom cdk stack logic to - const destCustomResourceFilePath = path.join(projRoot, 'amplify', 'backend', 'custom', cdkResourceName, 'cdk-stack.ts'); - const cfnFilePath = path.join( - projRoot, - 'amplify', - 'backend', - 'custom', - cdkResourceName, - 'build', - `${cdkResourceName}-cloudformation-template.json`, - ); - const srcCustomResourceFilePath = path.join(__dirname, '..', '..', '..', 'custom-resources', 'custom-cdk-stack-v10.ts'); - fs.copyFileSync(srcCustomResourceFilePath, destCustomResourceFilePath); - await buildCustomResources(projRoot); - await amplifyPushAuthV10(projRoot); - - // check if cfn file is generated in the build dir - expect(fs.existsSync(cfnFilePath)).toEqual(true); - const buildCFNFileJSON: any = JSONUtilities.readJson(cfnFilePath); - // Basic sanity generated CFN file content check - expect(buildCFNFileJSON?.Parameters).toEqual({ - env: { Type: 'String', Description: 'Current Amplify CLI env name' }, - }); - expect(Object.keys(buildCFNFileJSON?.Outputs)).toEqual(['snsTopicArn']); - const meta = getProjectMeta(projRoot); - const { snsTopicArn: customResourceSNSArn } = Object.keys(meta.custom).map((key) => meta.custom[key])[0].output; - expect(customResourceSNSArn).toBeDefined(); - - // using latest code, pull down the project - const projRoot2 = await createNewProjectDir('customMigration2'); - const usingLatestCode = true; - try { - await amplifyPull(projRoot2, { emptyDir: true, appId }, usingLatestCode); - assertNoParameterChangesBetweenProjects(projRoot, projRoot2); - expect(collectCloudformationDiffBetweenProjects(projRoot, projRoot2)).toMatchSnapshot(); - await amplifyPushAuth(projRoot2, usingLatestCode); - assertNoParameterChangesBetweenProjects(projRoot, projRoot2); - expect(collectCloudformationDiffBetweenProjects(projRoot, projRoot2)).toMatchSnapshot(); - - // building custom resources succeeds against a v10 cdk stack, even when using vLatest to build - await expect(buildCustomResources(projRoot2, usingLatestCode)).resolves.not.toThrow(); - - // migrate overrides to use vLatest - const srcVLatestCustomResourceFilePath = path.join(__dirname, '..', '..', '..', 'custom-resources', 'custom-cdk-stack-vLatest.ts'); - const destVLatestCustomResourceFilePath = path.join(projRoot2, 'amplify', 'backend', 'custom', cdkResourceName, 'cdk-stack.ts'); - fs.copyFileSync(srcVLatestCustomResourceFilePath, destVLatestCustomResourceFilePath); - - // this should fail because customer also needs to update package.json dependencies for cdkV2 - await expect(buildCustomResources(projRoot2, usingLatestCode)).rejects.toThrow(); - - // emulate updating the package.json dependencies - const srcVLatestCustomPackageJSONFilePath = path.join( - __dirname, - '..', - '..', - '..', - 'custom-resources', - 'custom-cdk-stack-vLatest.package.json', - ); - const destVLatestCustomPackageJSONFilePath = path.join(projRoot2, 'amplify', 'backend', 'custom', cdkResourceName, 'package.json'); - fs.copyFileSync(srcVLatestCustomPackageJSONFilePath, destVLatestCustomPackageJSONFilePath); - - // this should pass now - await buildCustomResources(projRoot2, usingLatestCode); - await amplifyPushAuth(projRoot2, usingLatestCode); - - // // Using latest code, add custom CFN and add dependency of custom CDK resource on the custom CFN - await addCFNCustomResource(projRoot2, { name: cfnResourceName, promptForCustomResourcesSelection: true }, usingLatestCode); - const customCFNFilePath = path.join( - projRoot2, - 'amplify', - 'backend', - 'custom', - cfnResourceName, - `${cfnResourceName}-cloudformation-template.json`, - ); - const customCFNFileJSON: any = JSONUtilities.readJson(customCFNFilePath); - // Make sure input params has params from the resource dependency - expect(customCFNFileJSON?.Parameters).toEqual({ - env: { Type: 'String' }, - [`custom${cdkResourceName}snsTopicArn`]: { - Type: 'String', - Description: `Input parameter describing snsTopicArn attribute for custom/${cdkResourceName} resource`, - }, - }); - } finally { - deleteProjectDir(projRoot2); - } - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/geo.migration.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/geo.migration.test.ts deleted file mode 100644 index 9a6f7cabc74..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/geo.migration.test.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { - addAuthWithDefault, - addGeofenceCollectionWithDefault, - addMapWithDefault, - addPlaceIndexWithDefault, - amplifyPushWithoutCodegen, - createNewProjectDir, - deleteProject, - deleteProjectDir, - updateAuthAddUserGroups, -} from '@aws-amplify/amplify-e2e-core'; -import { validateVersionsForMigrationTest } from '../../migration-helpers'; -import { initJSProjectWithProfileV10 } from '../../migration-helpers-v10/init'; -import { pullPushWithLatestCodebaseValidateParameterAndCfnDrift } from '../../migration-helpers/utils'; - -describe('geo category migration from v10 to latest', () => { - const projectName = 'geoMigration'; - let projRoot: string; - - beforeAll(async () => { - await validateVersionsForMigrationTest(); - }); - - beforeEach(async () => { - projRoot = await createNewProjectDir(projectName); - await initJSProjectWithProfileV10(projRoot, { name: 'geoMigration', disableAmplifyAppCreation: false }); - await addAuthWithDefault(projRoot); - await addMapWithDefault(projRoot); - await addPlaceIndexWithDefault(projRoot); - const cognitoGroups = ['admin', 'admin1']; - await updateAuthAddUserGroups(projRoot, cognitoGroups); - await addGeofenceCollectionWithDefault(projRoot, cognitoGroups); - await amplifyPushWithoutCodegen(projRoot); - }); - - afterEach(async () => { - await deleteProject(projRoot, null, true); - deleteProjectDir(projRoot); - }); - - it('...pull and push should not drift with new amplify version', async () => { - await pullPushWithLatestCodebaseValidateParameterAndCfnDrift(projRoot, projectName); - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/git-clone-migration-tests.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/git-clone-migration-tests.test.ts deleted file mode 100644 index cd5ab4dab59..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/git-clone-migration-tests.test.ts +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Tests for headless init/pull workflows on git-cloned projects - * These tests exercise workflows that hosting executes during backend builds - */ - -import { - addAuthUserPoolOnly, - amplifyPushAuthV5V6, - createNewProjectDir, - deleteProject, - deleteProjectDir, - getAmplifyInitConfig, - getProjectConfig, - getProjectMeta, - getSocialProviders, - gitCleanFdx, - gitCommitAll, - gitInit, - nonInteractiveInitWithForcePushAttach, -} from '@aws-amplify/amplify-e2e-core'; -import { initJSProjectWithProfileV10 } from '../../migration-helpers-v10/init'; - -describe('attach amplify to git-cloned project', () => { - const envName = 'test'; - let projRoot: string; - beforeAll(async () => { - projRoot = await createNewProjectDir('clone-test'); - await initJSProjectWithProfileV10(projRoot, { envName, disableAmplifyAppCreation: false }); - await addAuthUserPoolOnly(projRoot); - await amplifyPushAuthV5V6(projRoot); - await gitInit(projRoot); - await gitCommitAll(projRoot); - }); - - afterAll(async () => { - await deleteProject(projRoot, undefined, true); - deleteProjectDir(projRoot); - }); - - test('headless init and forcePush when triggers are added', async () => { - // checks amplify hosting forcePush on existing projects with v10.5.1 - const { projectName } = getProjectConfig(projRoot); - assertLambdaexecutionRoleArns(projRoot, false); - await gitCleanFdx(projRoot); - const socialProviders = getSocialProviders(); - const categoriesConfig = { - auth: { - facebookAppIdUserPool: socialProviders.FACEBOOK_APP_ID, - facebookAppSecretUserPool: socialProviders.FACEBOOK_APP_SECRET, - googleAppIdUserPool: socialProviders.GOOGLE_APP_ID, - googleAppSecretUserPool: socialProviders.GOOGLE_APP_SECRET, - // eslint-disable-next-line spellcheck/spell-checker - loginwithamazonAppIdUserPool: socialProviders.AMAZON_APP_ID, - // eslint-disable-next-line spellcheck/spell-checker - loginwithamazonAppSecretUserPool: socialProviders.AMAZON_APP_SECRET, - }, - }; - await nonInteractiveInitWithForcePushAttach(projRoot, getAmplifyInitConfig(projectName, envName), categoriesConfig, true); - assertLambdaexecutionRoleArns(projRoot, true); - }); -}); - -const assertLambdaexecutionRoleArns = (projRoot: string, isDefined: boolean) => { - const meta = getProjectMeta(projRoot); - const authKey = Object.keys(meta.auth).find((key) => meta.auth[key].service === 'Cognito'); - const createFunctionResourceName = `${authKey}CreateAuthChallenge`; - const defineFunctionResourceName = `${authKey}DefineAuthChallenge`; - const customMessageFunctionResourceName = `${authKey}CustomMessage`; - const createFunctionMeta = meta.function[createFunctionResourceName]; - const defineFunctionMeta = meta.function[defineFunctionResourceName]; - const customMessageFunctionMeta = meta.function[customMessageFunctionResourceName]; - const createFunctionRoleArn = createFunctionMeta.output.LambdaExecutionRoleArn; - const defineFunctionRoleArn = defineFunctionMeta.output.LambdaExecutionRoleArn; - const customMessageFunctionRoleArn = customMessageFunctionMeta.output.LambdaExecutionRoleArn; - if (isDefined) { - expect(createFunctionRoleArn).toBeDefined(); - expect(defineFunctionRoleArn).toBeDefined(); - expect(customMessageFunctionRoleArn).toBeDefined(); - } else { - expect(createFunctionRoleArn).not.toBeDefined(); - expect(defineFunctionRoleArn).not.toBeDefined(); - expect(customMessageFunctionRoleArn).not.toBeDefined(); - } -}; diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/pinpoint-region.migration.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/pinpoint-region.migration.test.ts deleted file mode 100644 index 638c6138c80..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/pinpoint-region.migration.test.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { - addNotificationChannel, - addPinpointAnalytics, - amplifyPushAuth, - amplifyPushWithoutCodegen, - createNewProjectDir, - deleteProject, - deleteProjectDir, -} from '@aws-amplify/amplify-e2e-core'; -import { validateVersionsForMigrationTest } from '../../migration-helpers'; -import { initJSProjectWithProfileV10 } from '../../migration-helpers-v10/init'; -import { getShortId } from '../../migration-helpers/utils'; - -describe('pinpoint region migration from v10 to latest', () => { - const projectName = 'pinpointMigration'; - let projectRoot: string; - - beforeAll(async () => { - await validateVersionsForMigrationTest(); - }); - - beforeEach(async () => { - projectRoot = await createNewProjectDir(projectName); - await initJSProjectWithProfileV10(projectRoot, { name: 'pinpointMigration', disableAmplifyAppCreation: false }); - await addPinpointAnalytics(projectRoot, false); - await amplifyPushWithoutCodegen(projectRoot); - }); - - afterEach(async () => { - await deleteProject(projectRoot, null, true); - deleteProjectDir(projectRoot); - }); - - // test forced to be executed in us-east-2 region - it('should add notifications using us-east-1 region client to match original pinpoint resource', async () => { - const settings = { resourceName: `notification${getShortId()}` }; - await addNotificationChannel(projectRoot, settings, 'In-App Messaging', true, true, true); - await addNotificationChannel(projectRoot, settings, 'SMS', true, true, true); - await amplifyPushAuth(projectRoot, true); - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/scaffold.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/scaffold.test.ts deleted file mode 100644 index 4dff6ea1bbb..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/scaffold.test.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { createNewProjectDir, deleteProject, deleteProjectDir } from '@aws-amplify/amplify-e2e-core'; -import { versionCheck, allowedVersionsToMigrateFrom } from '../../migration-helpers'; -import { initJSProjectWithProfileV10 } from '../../migration-helpers-v10/init'; - -describe('amplify migration test scaffold v10', () => { - let projRoot: string; - - beforeEach(async () => { - projRoot = await createNewProjectDir('scaffoldTest'); - const migrateFromVersion = { v: 'unintialized' }; - const migrateToVersion = { v: 'unintialized' }; - await versionCheck(process.cwd(), false, migrateFromVersion); - await versionCheck(process.cwd(), true, migrateToVersion); - console.log(`Test migration from: ${migrateFromVersion} to ${migrateToVersion}`); - expect(migrateFromVersion.v).not.toEqual(migrateToVersion.v); // uncomment this once we are in v11 for local codebase - expect(allowedVersionsToMigrateFrom).toContain(migrateFromVersion.v); - }); - - afterEach(async () => { - await deleteProject(projRoot, null, true); - deleteProjectDir(projRoot); - }); - - it('...should init a project', async () => { - await initJSProjectWithProfileV10(projRoot, { name: 'scaffoldTest' }); - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/storage.migration.test.ts b/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/storage.migration.test.ts deleted file mode 100644 index 64b9dd02273..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/migration_tests_v10/storage.migration.test.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { - addAuthWithDefault, - addDDBWithTrigger, - addDynamoDBWithGSIWithSettings, - addS3StorageWithSettings, - amplifyPushWithoutCodegen, - createNewProjectDir, - deleteProject, - deleteProjectDir, -} from '@aws-amplify/amplify-e2e-core'; -import { validateVersionsForMigrationTest } from '../../migration-helpers'; -import { initJSProjectWithProfileV10 } from '../../migration-helpers-v10/init'; -import { getShortId, pullPushWithLatestCodebaseValidateParameterAndCfnDrift } from '../../migration-helpers/utils'; - -describe('storage category migration from v10 to latest', () => { - const projectName = 'storageMigration'; - let projRoot: string; - - beforeAll(async () => { - await validateVersionsForMigrationTest(); - }); - - beforeEach(async () => { - projRoot = await createNewProjectDir(projectName); - await initJSProjectWithProfileV10(projRoot, { name: 'storageMigration', disableAmplifyAppCreation: false }); - await addDynamoDBWithGSIWithSettings(projRoot, { - resourceName: `${projectName}res${getShortId()}`, - tableName: `${projectName}tbl${getShortId()}`, - gsiName: `${projectName}gsi${getShortId()}`, - }); - await addDDBWithTrigger(projRoot, {}); - await addAuthWithDefault(projRoot); - await addS3StorageWithSettings(projRoot, {}); - await amplifyPushWithoutCodegen(projRoot); - }); - - afterEach(async () => { - await deleteProject(projRoot, null, true); - deleteProjectDir(projRoot); - }); - - it('...pull and push should not drift with new amplify version', async () => { - await pullPushWithLatestCodebaseValidateParameterAndCfnDrift(projRoot, projectName); - }); -}); diff --git a/packages/amplify-migration-tests/src/__tests__/update_tests/function_migration_update.test.ts b/packages/amplify-migration-tests/src/__tests__/update_tests/function_migration_update.test.ts deleted file mode 100644 index 0591977e209..00000000000 --- a/packages/amplify-migration-tests/src/__tests__/update_tests/function_migration_update.test.ts +++ /dev/null @@ -1,145 +0,0 @@ -import { - addFunction, - addLayer, - amplifyPush, - amplifyPushAuthV5V6, - amplifyPushLayer, - createNewProjectDir, - deleteProject, - deleteProjectDir, - getCurrentLayerArnFromMeta, - getProjectConfig, - getProjectMeta, - invokeFunction, - LayerRuntime, - loadFunctionTestFile, - overrideFunctionSrcNode, - updateApiSchema, - updateFunction, - validateLayerMetadata, - addApiWithoutSchema, - generateRandomShortId, - initJSProjectWithProfile, -} from '@aws-amplify/amplify-e2e-core'; -import { v4 as uuid } from 'uuid'; -import { versionCheck, allowedVersionsToMigrateFrom } from '../../migration-helpers'; - -describe('amplify function migration', () => { - let projRoot: string; - - beforeEach(async () => { - projRoot = await createNewProjectDir('functions'); - const migrateFromVersion = { v: 'unintialized' }; - const migrateToVersion = { v: 'unintialized' }; - await versionCheck(process.cwd(), false, migrateFromVersion); - await versionCheck(process.cwd(), true, migrateToVersion); - expect(migrateFromVersion.v).not.toEqual(migrateToVersion.v); - expect(allowedVersionsToMigrateFrom).toContain(migrateFromVersion.v); - - await initJSProjectWithProfile(projRoot, { - name: 'functionmigration', - includeUsageDataPrompt: false, - }); - }); - - afterEach(async () => { - await deleteProject(projRoot, null, true); - deleteProjectDir(projRoot); - }); - - it('existing lambda updated with additional permissions should be able to scan ddb', async () => { - const { projectName: appName } = getProjectConfig(projRoot); - - const fnName = `integtestfn${generateRandomShortId()}`; - await addFunction( - projRoot, - { - name: fnName, - functionTemplate: 'Hello World', - }, - 'nodejs', - ); - - const functionCode = loadFunctionTestFile('dynamodb-scan-v2.js'); - - overrideFunctionSrcNode(projRoot, fnName, functionCode); - - await amplifyPushAuthV5V6(projRoot); - let meta = getProjectMeta(projRoot); - const { Arn: functionArn, Name: functionName, Region: region } = Object.keys(meta.function).map((key) => meta.function[key])[0].output; - expect(functionArn).toBeDefined(); - expect(functionName).toBeDefined(); - expect(region).toBeDefined(); - - await addApiWithoutSchema(projRoot, { testingWithLatestCodebase: true, transformerVersion: 1 }); - await updateApiSchema(projRoot, appName, 'simple_model.graphql'); - - await updateFunction( - projRoot, - { - name: fnName, - additionalPermissions: { - permissions: ['storage'], - choices: ['function', 'api', 'storage'], - resources: ['Todo:@model(appsync)'], - resourceChoices: ['Todo:@model(appsync)'], - operations: ['read'], - }, - testingWithLatestCodebase: true, - }, - 'nodejs', - ); - await amplifyPush(projRoot, true); - - meta = getProjectMeta(projRoot); - const { GraphQLAPIIdOutput: appsyncId } = Object.keys(meta.api).map((key) => meta.api[key])[0].output; - const result = await invokeFunction(functionName, JSON.stringify({ tableName: `Todo-${appsyncId}-integtest` }), region); - expect(result.StatusCode).toBe(200); - expect(result.Payload).toBeDefined(); - - const payload = JSON.parse(result.Payload.toString()); - expect(payload.errorType).toBeUndefined(); - expect(payload.errorMessage).toBeUndefined(); - expect(payload.Items).toBeDefined(); - expect(payload.Count).toBeDefined(); - expect(payload.ScannedCount).toBeDefined(); - }); - - it('Add 2 functions, upgrade cli, add layer, update a function to depend on layer', async () => { - const [shortId] = uuid().split('-'); - const function1 = `function1${shortId}`; - const function2 = `function2${shortId}`; - const runtime: LayerRuntime = 'nodejs'; - const { projectName: projName } = getProjectConfig(projRoot); - - await addFunction(projRoot, { name: function1, functionTemplate: 'Hello World' }, runtime, undefined); - await addFunction(projRoot, { name: function2, functionTemplate: 'Hello World' }, runtime, undefined); - await amplifyPushAuthV5V6(projRoot); - - const layerName = `test${shortId}`; - const layerSettings = { - layerName, - projName, - runtimes: [runtime], - }; - - await addLayer(projRoot, layerSettings, true); - await updateFunction( - projRoot, - { - layerOptions: { - select: [projName + layerName], - expectedListOptions: [projName + layerName], - layerAndFunctionExist: true, - }, - name: function1, - testingWithLatestCodebase: true, - }, - runtime, - ); - await amplifyPushLayer(projRoot, {}, true); - const arns: string[] = [getCurrentLayerArnFromMeta(projRoot, { layerName, projName })]; - const meta = getProjectMeta(projRoot); - await validateLayerMetadata(projRoot, { layerName, projName }, meta, 'integtest', arns); - }); -}); diff --git a/packages/amplify-migration-tests/src/configure_tests.ts b/packages/amplify-migration-tests/src/configure_tests.ts index cd710d57e7d..6c654256f05 100644 --- a/packages/amplify-migration-tests/src/configure_tests.ts +++ b/packages/amplify-migration-tests/src/configure_tests.ts @@ -29,7 +29,7 @@ async function setupAmplify(version = 'latest') { if (!validSemver || semver.gt(version, '10.7.0')) { // version is either after 10.7 or it's a tag name like latest so use the current configure function - await configure({ + await configure(null, { accessKeyId: AWS_ACCESS_KEY_ID, secretAccessKey: AWS_SECRET_ACCESS_KEY, profileName: 'amplify-integ-test-user', diff --git a/packages/amplify-migration-tests/src/migration-helpers-v10/cfn-diff-exclusions.ts b/packages/amplify-migration-tests/src/migration-helpers-v10/cfn-diff-exclusions.ts deleted file mode 100644 index 8b237fb0cb8..00000000000 --- a/packages/amplify-migration-tests/src/migration-helpers-v10/cfn-diff-exclusions.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { ExcludeFromCFNDiff } from '../migration-helpers/utils'; - -/** - * Due to a known limitation of APIGateway, we do not want the AWS::ApiGateway::Deployment resource - * from being compared in the CFN diff because it is regenerated whenever an amplify app is pulled down. - * This would produce a false positive when checking for differences in the CFN templates of project1 & project2. - * https://github.com/aws/aws-cdk/issues/8646#issuecomment-647561856 - * - * AWS::ApiGateway::GatewayResponse is also excluded - */ -export const cfnDiffExclusions: ExcludeFromCFNDiff = ( - currentCategory: string, - currentResourceKey: string, - cfnTemplates: { - project1: Record; - project2: Record; - }, -) => { - const excludeAPIGateWayDeploymentResource = (cfnTemplate: Record): void => { - const resources = cfnTemplate.Resources ?? {}; - const resourceKeys = Object.keys(resources); - for (const key of resourceKeys) { - const resource = resources[key]; - if (resource.Type === 'AWS::ApiGateway::Deployment' || resource.Type === 'AWS::ApiGateway::GatewayResponse') { - delete resources[key]; - } - if (resource.Type === 'AWS::AppSync::ApiKey' && resource.Properties) { - delete resource.Properties.Expires; - } - } - }; - if (currentCategory === 'api') { - excludeAPIGateWayDeploymentResource(cfnTemplates.project1); - excludeAPIGateWayDeploymentResource(cfnTemplates.project2); - } - return { project1: cfnTemplates.project1, project2: cfnTemplates.project2 }; -}; diff --git a/packages/amplify-migration-tests/src/migration-helpers-v10/init.ts b/packages/amplify-migration-tests/src/migration-helpers-v10/init.ts deleted file mode 100644 index 70da8a0f60b..00000000000 --- a/packages/amplify-migration-tests/src/migration-helpers-v10/init.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { addCircleCITags, getCLIPath, nspawn as spawn } from '@aws-amplify/amplify-e2e-core'; -import { EOL } from 'os'; - -const defaultSettings = { - name: EOL, - // eslint-disable-next-line spellcheck/spell-checker - envName: 'integtest', - editor: EOL, - appType: EOL, - framework: EOL, - srcDir: EOL, - distDir: EOL, - buildCmd: EOL, - startCmd: EOL, - useProfile: EOL, - profileName: EOL, - region: process.env.CLI_REGION, - local: false, - disableAmplifyAppCreation: true, - disableCIDetection: false, - providerConfig: undefined, - permissionsBoundaryArn: undefined, -}; - -export function initJSProjectWithProfileV10(cwd: string, settings?: Partial): Promise { - const s = { ...defaultSettings, ...settings }; - let env; - - if (s.disableAmplifyAppCreation === true) { - env = { - CLI_DEV_INTERNAL_DISABLE_AMPLIFY_APP_CREATION: '1', - }; - } - - addCircleCITags(cwd); - - const cliArgs = ['init']; - const providerConfigSpecified = !!s.providerConfig && typeof s.providerConfig === 'object'; - if (providerConfigSpecified) { - cliArgs.push('--providers', JSON.stringify(s.providerConfig)); - } - - if (s.permissionsBoundaryArn) { - cliArgs.push('--permissions-boundary', s.permissionsBoundaryArn); - } - - if (s?.name?.length > 20) console.warn('Project names should not be longer than 20 characters. This may cause tests to break.'); - - return new Promise((resolve, reject) => { - const chain = spawn(getCLIPath(), cliArgs, { - cwd, - stripColors: true, - env, - disableCIDetection: s.disableCIDetection, - }) - .wait('Enter a name for the project') - .sendLine(s.name) - .wait('Initialize the project with the above configuration?') - .sendConfirmNo() - .wait('Enter a name for the environment') - .sendLine(s.envName) - .wait('Choose your default editor:') - .sendLine(s.editor) - .wait("Choose the type of app that you're building") - .sendLine(s.appType) - .wait('What javascript framework are you using') - .sendLine(s.framework) - .wait('Source Directory Path:') - .sendLine(s.srcDir) - .wait('Distribution Directory Path:') - .sendLine(s.distDir) - .wait('Build Command:') - .sendLine(s.buildCmd) - .wait('Start Command:') - .sendCarriageReturn(); - - if (!providerConfigSpecified) { - chain - .wait('Using default provider awscloudformation') - .wait('Select the authentication method you want to use:') - .sendCarriageReturn() - .wait('Please choose the profile you want to use') - .sendLine(s.profileName); - } - chain - .wait('Help improve Amplify CLI by sharing non sensitive configurations on failures') - .sendYes() - .wait(/Try "amplify add api" to create a backend API and then "amplify (push|publish)" to deploy everything/) - .run((err: Error) => { - if (err) { - reject(err); - } else { - resolve(); - } - }); - }); -} diff --git a/packages/amplify-migration-tests/src/migration-helpers/check-version.ts b/packages/amplify-migration-tests/src/migration-helpers/check-version.ts index 9d821d5d38e..f01c8add68b 100644 --- a/packages/amplify-migration-tests/src/migration-helpers/check-version.ts +++ b/packages/amplify-migration-tests/src/migration-helpers/check-version.ts @@ -34,4 +34,4 @@ export const validateVersionsForMigrationTest = async (): Promise => { * * ext migrate flow: https://github.com/aws-amplify/amplify-cli/pull/8806 */ -export const allowedVersionsToMigrateFrom = ['8.2.0', '10.5.1']; +export const allowedVersionsToMigrateFrom = ['8.2.0', '10.5.1', '12.0.3']; diff --git a/packages/amplify-migration-tests/src/migration-helpers/lambda-function.ts b/packages/amplify-migration-tests/src/migration-helpers/lambda-function.ts new file mode 100644 index 00000000000..685fa2fee13 --- /dev/null +++ b/packages/amplify-migration-tests/src/migration-helpers/lambda-function.ts @@ -0,0 +1,540 @@ +import { $TSAny } from '@aws-amplify/amplify-cli-core'; +import { + ExecutionContext, + getBackendAmplifyMeta, + getCLIPath, + multiSelect, + singleSelect, + nspawn as spawn, + loadFeatureFlags, + moveUp, + moveDown, +} from '@aws-amplify/amplify-e2e-core'; +import _ from 'lodash'; + +type FunctionActions = 'create' | 'update'; +type FunctionRuntimes = 'dotnet8' | 'go' | 'java' | 'nodejs' | 'python'; +type FunctionCallback = (chain: $TSAny, cwd: string, settings: $TSAny) => $TSAny; + +// runtimeChoices are shared between tests +export const runtimeChoices = ['.NET 6', 'Go', 'Java', 'NodeJS', 'Python']; + +// templateChoices is per runtime +const dotNetTemplateChoices = [ + 'CRUD function for DynamoDB (Integration with API Gateway)', + 'Hello World', + 'Serverless', + 'Trigger (DynamoDb, Kinesis)', +]; + +const goTemplateChoices = ['Hello World']; + +const javaTemplateChoices = ['Hello World']; + +const nodeJSTemplateChoices = [ + 'AppSync - GraphQL API request (with IAM)', + 'CRUD function for DynamoDB (Integration with API Gateway)', + 'GraphQL Lambda Authorizer', + 'Hello World', + 'Lambda trigger', + 'Serverless ExpressJS function (Integration with API Gateway)', +]; + +const pythonTemplateChoices = ['Hello World']; + +const crudOptions = ['create', 'read', 'update', 'delete']; + +const appSyncOptions = ['Query', 'Mutation', 'Subscription']; + +const additionalPermissions = (cwd: string, chain: ExecutionContext, settings: $TSAny) => { + multiSelect(chain.wait('Select the categories you want this function to have access to'), settings.permissions, settings.choices); + + if (!settings.resources) { + return; + } + + if (settings.resourceChoices === undefined) { + settings.resourceChoices = settings.resources; + } + // when single resource, it gets auto selected + if (settings.resourceChoices.length > 1) { + chain.wait('Select the one you would like your Lambda to access'); + if (settings.keepExistingResourceSelection) { + chain.sendCarriageReturn(); + } else { + multiSelect(chain, settings.resources, settings.resourceChoices); + } + } + + // n-resources repeated questions + settings.resources.forEach((elem: string) => { + const service = _.get(getBackendAmplifyMeta(cwd), ['api', elem, 'service']); + const graphQlPermFF = !!_.get(loadFeatureFlags(cwd), ['features', 'appsync', 'generateGraphQlPermissions']); + const isAppSyncApi = service === 'AppSync'; + const allChoices = isAppSyncApi && graphQlPermFF ? appSyncOptions : crudOptions; + multiSelect(chain.wait(`Select the operations you want to permit on ${elem}`), settings.operations, allChoices); + }); +}; + +const updateFunctionCore = (cwd: string, chain: ExecutionContext, settings: CoreFunctionSettings) => { + singleSelect( + chain.wait('Which setting do you want to update?'), + settings.additionalPermissions + ? 'Resource access permissions' + : settings.schedulePermissions + ? 'Scheduled recurring invocation' + : settings.layerOptions + ? 'Lambda layers configuration' + : settings.environmentVariables + ? 'Environment variables configuration' + : 'Secret values configuration', + [ + 'Resource access permissions', + 'Scheduled recurring invocation', + 'Lambda layers configuration', + 'Environment variables configuration', + 'Secret values configuration', + ], + ); + if (settings.additionalPermissions) { + // update permissions + additionalPermissions(cwd, chain, settings.additionalPermissions); + } + if (settings.schedulePermissions) { + // update scheduling + if (settings.schedulePermissions.noScheduleAdded) { + chain.wait('Do you want to invoke this function on a recurring schedule?'); + } else { + chain.wait(`Do you want to update or remove the function's schedule?`); + } + chain.sendConfirmYes(); + cronWalkthrough(chain, settings, settings.schedulePermissions.noScheduleAdded ? 'create' : 'update'); + } + if (settings.layerOptions) { + // update layers + chain.wait('Do you want to enable Lambda layers for this function?'); + if (settings.layerOptions === undefined) { + chain.sendConfirmNo(); + } else { + chain.sendConfirmYes(); + addLayerWalkthrough(chain, settings.layerOptions); + } + } + if (settings.secretsConfig) { + if (settings.secretsConfig.operation === 'add') { + throw new Error('Secrets update walkthrough only supports update and delete'); + } + // this walkthrough assumes 1 existing secret is configured for the function + const actions = ['Add a secret', 'Update a secret', 'Remove secrets', "I'm done"]; + const action = settings.secretsConfig.operation === 'delete' ? actions[2] : actions[1]; + chain.wait('What do you want to do?'); + singleSelect(chain, action, actions); + switch (settings.secretsConfig.operation) { + case 'delete': { + chain.wait('Select the secrets to delete:'); + chain.sendLine(' '); // assumes one secret + break; + } + case 'update': { + chain.wait('Select the secret to update:'); + chain.sendCarriageReturn(); // assumes one secret + chain.sendLine(settings.secretsConfig.value); + break; + } + } + chain.wait('What do you want to do?'); + chain.sendCarriageReturn(); // "I'm done" + } +}; + +export type CoreFunctionSettings = { + testingWithLatestCodebase?: boolean; + name?: string; + packageManager?: { + name: string; + command?: string; + }; + functionTemplate?: string; + expectFailure?: boolean; + additionalPermissions?: $TSAny; + schedulePermissions?: $TSAny; + layerOptions?: LayerOptions; + environmentVariables?: $TSAny; + secretsConfig?: AddSecretInput | UpdateSecretInput | DeleteSecretInput; + triggerType?: string; + eventSource?: string; +}; + +const coreFunction = ( + cwd: string, + settings: CoreFunctionSettings, + action: FunctionActions, + runtime: FunctionRuntimes, + functionConfigCallback: FunctionCallback, +) => { + return new Promise((resolve, reject) => { + const chain = spawn(getCLIPath(settings.testingWithLatestCodebase), [action === 'update' ? 'update' : 'add', 'function'], { + cwd, + stripColors: true, + }); + + if (action === 'create') { + chain + .wait('Select which capability you want to add:') + .sendCarriageReturn() // lambda function + .wait('Provide an AWS Lambda function name:') + .sendLine(settings.name || ''); + + selectRuntime(chain, runtime); + const templateChoices = getTemplateChoices(runtime); + if (templateChoices.length > 1) { + selectTemplate(chain, settings.functionTemplate, runtime); + } + } else { + if (settings.layerOptions && settings.layerOptions.layerAndFunctionExist) { + chain.wait('Select which capability you want to update:').sendCarriageReturn(); // lambda function + } + chain.wait('Select the Lambda function you want to update').sendCarriageReturn(); // assumes only one function configured in the project + } + + if (functionConfigCallback) { + functionConfigCallback(chain, cwd, settings); + } + + if (settings.expectFailure) { + runChain(chain, resolve, reject); + return; + } + + // advanced settings flow + if (action === 'create') { + chain.wait('Do you want to configure advanced settings?'); + + if ( + settings.additionalPermissions || + settings.schedulePermissions || + settings.layerOptions || + settings.environmentVariables || + settings.secretsConfig + ) { + chain.sendConfirmYes().wait('Do you want to access other resources in this project from your Lambda function?'); + if (settings.additionalPermissions) { + // other permissions flow + chain.sendConfirmYes(); + additionalPermissions(cwd, chain, settings.additionalPermissions); + } else { + chain.sendConfirmNo(); + } + + //scheduling questions + chain.wait('Do you want to invoke this function on a recurring schedule?'); + + if (settings.schedulePermissions === undefined) { + chain.sendConfirmNo(); + } else { + chain.sendConfirmYes(); + cronWalkthrough(chain, settings, action); + } + + // lambda layers question + chain.wait('Do you want to enable Lambda layers for this function?'); + if (settings.layerOptions === undefined) { + chain.sendConfirmNo(); + } else { + chain.sendConfirmYes(); + addLayerWalkthrough(chain, settings.layerOptions); + } + + // environment variable question + chain.wait('Do you want to configure environment variables for this function?'); + if (settings.environmentVariables === undefined) { + chain.sendConfirmNo(); + } else { + chain.sendConfirmYes(); + addEnvVarWalkthrough(chain, settings.environmentVariables); + } + + // secrets config + chain.wait('Do you want to configure secret values this function can access?'); + if (settings.secretsConfig === undefined) { + chain.sendConfirmNo(); + } else { + if (settings.secretsConfig.operation !== 'add') { + throw new Error('add walkthrough only supports add secrets operation'); + } + chain.sendConfirmYes(); + addSecretWalkthrough(chain, settings.secretsConfig); + } + } else { + chain.sendConfirmNo(); + } + } else { + updateFunctionCore(cwd, chain, settings); + } + + // edit function question + chain.wait('Do you want to edit the local lambda function now?').sendConfirmNo().sendEof(); + + runChain(chain, resolve, reject); + }); +}; + +const runChain = (chain: ExecutionContext, resolve, reject) => { + chain.run((err: Error) => { + if (!err) { + resolve(); + } else { + reject(err); + } + }); +}; + +export const addFunctionPreV12 = ( + cwd: string, + settings: CoreFunctionSettings, + runtime: FunctionRuntimes, + functionConfigCallback: FunctionCallback = undefined, +) => { + return coreFunction(cwd, settings, 'create', runtime, functionConfigCallback); +}; + +export const updateFunction = (cwd: string, settings: CoreFunctionSettings, runtime: FunctionRuntimes) => { + return coreFunction(cwd, settings, 'update', runtime, undefined); +}; + +export const selectRuntime = (chain: ExecutionContext, runtime: FunctionRuntimes) => { + const runtimeName = getRuntimeDisplayName(runtime); + chain.wait('Choose the runtime that you want to use:'); + + // reset cursor to top of list because node is default but it throws off offset calculations + moveUp(chain, runtimeChoices.indexOf(getRuntimeDisplayName('nodejs'))); + + singleSelect(chain, runtimeName, runtimeChoices); +}; + +export const selectTemplate = (chain: ExecutionContext, functionTemplate: string, runtime: FunctionRuntimes) => { + const templateChoices = getTemplateChoices(runtime); + chain.wait('Choose the function template that you want to use'); + + // reset cursor to top of list because Hello World is default but it throws off offset calculations + moveUp(chain, templateChoices.indexOf('Hello World')); + + singleSelect(chain, functionTemplate, templateChoices); +}; + +export interface LayerOptions { + select?: string[]; // list options to select + layerAndFunctionExist?: boolean; // whether this test involves both a function and a layer + expectedListOptions?: string[]; // the expected list of all layers + versions?: Record; // map with keys for each element of select that determines the version and expected version for each layer + customArns?: string[]; // external ARNs to enter + skipLayerAssignment?: boolean; // true if the layer assignment must be left unchanged for the function, otherwise true + layerWalkthrough?: (chain: ExecutionContext) => void; // If this function is provided the addLayerWalkthrough will invoke it instead of the standard one, suitable for full customization +} + +const addLayerWalkthrough = (chain: ExecutionContext, options: LayerOptions) => { + if (options.layerWalkthrough) { + options.layerWalkthrough(chain); + + return; + } + + chain.wait('Provide existing layers'); + + const hasCustomArns = options.customArns && options.customArns.length > 0; + + // If no select passed in then it was called from update function probably and + // there is a layer already assigned and no need to change + if (options.skipLayerAssignment === true) { + chain.sendCarriageReturn(); + } else { + const prependedListOptions = ['Provide existing Lambda layer ARNs', ...options.expectedListOptions]; + const amendedSelection = [...options.select]; + + if (hasCustomArns) { + amendedSelection.unshift('Provide existing Lambda layer ARNs'); + } + + multiSelect(chain, amendedSelection, prependedListOptions); + } + + // If no versions present in options, skip the version selection prompt + if (options.versions) { + options.select.forEach((selection) => { + chain.wait(`Select a version for ${selection}`); + + singleSelect(chain, options.versions[selection].version.toString(), [ + 'Always choose latest version', + ...options.versions[selection].expectedVersionOptions.map((op) => op.toString()), + ]); + }); + } + + if (hasCustomArns) { + chain.wait('existing Lambda layer ARNs (comma-separated)'); + chain.sendLine(options.customArns.join(', ')); + } + + // not going to attempt to automate the reorder thingy. For e2e tests we can just create the lambda layers in the order we want them + const totalLength = hasCustomArns ? options.customArns.length : 0 + options.select.length; + + if (totalLength > 1) { + chain.wait('Modify the layer order'); + chain.sendCarriageReturn(); + } +}; + +export type EnvVarInput = { + key: string; + value: string; +}; + +const addEnvVarWalkthrough = (chain: ExecutionContext, input: EnvVarInput) => { + chain.wait('Enter the environment variable name:').sendLine(input.key); + chain.wait('Enter the environment variable value:').sendLine(input.value); + chain.wait("I'm done").sendCarriageReturn(); +}; + +export type AddSecretInput = { + operation: 'add'; + name: string; + value: string; +}; + +export type DeleteSecretInput = { + operation: 'delete'; + name: string; +}; + +export type UpdateSecretInput = { + operation: 'update'; + name: string; + value: string; +}; + +const addSecretWalkthrough = (chain: ExecutionContext, input: AddSecretInput) => { + chain.wait('Enter a secret name'); + chain.sendLine(input.name); + chain.wait(`Enter the value for`); + chain.sendLine(input.value); + chain.wait("I'm done").sendCarriageReturn(); +}; + +const cronWalkthrough = (chain: ExecutionContext, settings: $TSAny, action: string) => { + if (action === 'create') { + addCron(chain, settings); + } else { + chain.wait('Select from the following options:'); + + switch (settings.schedulePermissions.action) { + case 'Update the schedule': + chain.sendCarriageReturn(); + addCron(chain, settings); + break; + case 'Remove the schedule': + moveDown(chain, 1).sendCarriageReturn(); + break; + default: + chain.sendCarriageReturn(); + break; + } + } + + return chain; +}; + +const addMinutes = (chain: ExecutionContext) => { + chain.wait('Enter rate for minutes(1-59)?').sendLine('5').sendCarriageReturn(); + return chain; +}; + +const addHourly = (chain: ExecutionContext) => { + chain.wait('Enter rate for hours(1-23)?').sendLine('5').sendCarriageReturn(); + return chain; +}; + +const addWeekly = (chain: ExecutionContext) => { + chain + .wait('Select the day to invoke the function:') + .sendCarriageReturn() + .wait('Select the start time in UTC (use arrow keys):') + .sendCarriageReturn(); + return chain; +}; + +const addMonthly = (chain: ExecutionContext) => { + chain.wait('Select date to start cron').sendCarriageReturn(); + return chain; +}; + +const addYearly = (chain: ExecutionContext) => { + chain.wait('Select date to start cron').sendCarriageReturn(); + return chain; +}; + +const addCron = (chain: ExecutionContext, settings: $TSAny) => { + chain.wait('At which interval should the function be invoked:'); + + switch (settings.schedulePermissions.interval) { + case 'Minutes': + addMinutes(chain); + break; + case 'Hourly': + addHourly(moveDown(chain, 1).sendCarriageReturn()); + break; + case 'Daily': + moveDown(chain, 2).sendCarriageReturn().wait('Select the start time in UTC (use arrow keys):').sendCarriageReturn(); + break; + case 'Weekly': + addWeekly(moveDown(chain, 3).sendCarriageReturn()); + break; + case 'Monthly': + addMonthly(moveDown(chain, 4).sendCarriageReturn()); + break; + case 'Yearly': + addYearly(moveDown(chain, 5).sendCarriageReturn()); + break; + case 'Custom AWS cron expression': + moveDown(chain, 6).sendCarriageReturn(); + break; + default: + chain.sendCarriageReturn(); + break; + } + + return chain; +}; + +const getTemplateChoices = (runtime: FunctionRuntimes) => { + switch (runtime) { + case 'dotnet8': + return dotNetTemplateChoices; + case 'go': + return goTemplateChoices; + case 'java': + return javaTemplateChoices; + case 'nodejs': + return nodeJSTemplateChoices; + case 'python': + return pythonTemplateChoices; + default: + throw new Error(`Invalid runtime value: ${runtime}`); + } +}; + +const getRuntimeDisplayName = (runtime: FunctionRuntimes) => { + switch (runtime) { + case 'dotnet8': + return '.NET 8'; + case 'go': + return 'Go'; + case 'java': + return 'Java'; + case 'nodejs': + return 'NodeJS'; + case 'python': + return 'Python'; + default: + throw new Error(`Invalid runtime value: ${runtime}`); + } +}; diff --git a/packages/amplify-migration-tests/src/migration-helpers/utils.ts b/packages/amplify-migration-tests/src/migration-helpers/utils.ts index c8ff1b0ed31..0dc8c2a5118 100644 --- a/packages/amplify-migration-tests/src/migration-helpers/utils.ts +++ b/packages/amplify-migration-tests/src/migration-helpers/utils.ts @@ -1,6 +1,6 @@ -import { v4 as uuid } from 'uuid'; import { amplifyPull, + amplifyPushForce, amplifyPushWithoutCodegen, cliInputsExists, createNewProjectDir, @@ -16,6 +16,7 @@ import * as cfnDiff from '@aws-cdk/cloudformation-diff'; import { Writable } from 'stream'; import { AmplifyCategories } from '@aws-amplify/amplify-cli-core'; import strip from 'strip-ansi'; +import { v4 as uuid } from 'uuid'; /** * generates a random string @@ -170,3 +171,21 @@ export const pullPushWithLatestCodebaseValidateParameterAndCfnDrift = async (pro deleteProjectDir(projRoot2); } }; + +/** + * Pulls and pushes with force project with latest codebase. Validates parameter and cfn drift. + */ +export const pullPushForceWithLatestCodebaseValidateParameterAndCfnDrift = async (projRoot: string, projRoot2: string): Promise => { + const appId = getAppId(projRoot); + expect(appId).toBeDefined(); + try { + await amplifyPull(projRoot2, { emptyDir: true, appId }, true); + assertNoParameterChangesBetweenProjects(projRoot, projRoot2); + expect(collectCloudformationDiffBetweenProjects(projRoot, projRoot2)).toMatchSnapshot(); + await amplifyPushForce(projRoot2, true); + assertNoParameterChangesBetweenProjects(projRoot, projRoot2); + expect(collectCloudformationDiffBetweenProjects(projRoot, projRoot2)).toMatchSnapshot(); + } finally { + deleteProjectDir(projRoot2); + } +}; diff --git a/packages/amplify-migration-tests/src/setup-tests.ts b/packages/amplify-migration-tests/src/setup-tests.ts index c92402be35d..bcd4040f9ff 100644 --- a/packages/amplify-migration-tests/src/setup-tests.ts +++ b/packages/amplify-migration-tests/src/setup-tests.ts @@ -13,3 +13,13 @@ jest.setTimeout(JEST_TIMEOUT); if (process.env.CIRCLECI) { jest.retryTimes(1); } + +beforeEach(async () => { + if (process.env.CLI_REGION) { + console.log(`CLI_REGION set to: ${process.env.CLI_REGION}. Overwriting AWS_REGION and AWS_DEFAULT_REGION`); + process.env.AWS_REGION = process.env.CLI_REGION; + process.env.AWS_DEFAULT_REGION = process.env.CLI_REGION; + } else { + console.log('No CLI_REGION variable found'); + } +}); diff --git a/packages/amplify-nodejs-function-runtime-provider/CHANGELOG.md b/packages/amplify-nodejs-function-runtime-provider/CHANGELOG.md index f8b5480d65d..a0727e6bb80 100644 --- a/packages/amplify-nodejs-function-runtime-provider/CHANGELOG.md +++ b/packages/amplify-nodejs-function-runtime-provider/CHANGELOG.md @@ -3,6 +3,234 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.5.25](https://github.com/aws-amplify/amplify-cli/compare/amplify-nodejs-function-runtime-provider@2.5.24...amplify-nodejs-function-runtime-provider@2.5.25) (2025-01-30) + +**Note:** Version bump only for package amplify-nodejs-function-runtime-provider + + + + + +## [2.5.24](https://github.com/aws-amplify/amplify-cli/compare/amplify-nodejs-function-runtime-provider@2.5.23...amplify-nodejs-function-runtime-provider@2.5.24) (2024-08-02) + +**Note:** Version bump only for package amplify-nodejs-function-runtime-provider + + + + + +## [2.5.23](https://github.com/aws-amplify/amplify-cli/compare/amplify-nodejs-function-runtime-provider@2.5.22...amplify-nodejs-function-runtime-provider@2.5.23) (2024-06-27) + +**Note:** Version bump only for package amplify-nodejs-function-runtime-provider + + + + + +## [2.5.22](https://github.com/aws-amplify/amplify-cli/compare/amplify-nodejs-function-runtime-provider@2.5.21...amplify-nodejs-function-runtime-provider@2.5.22) (2024-06-20) + +**Note:** Version bump only for package amplify-nodejs-function-runtime-provider + + + + + +## [2.5.21](https://github.com/aws-amplify/amplify-cli/compare/amplify-nodejs-function-runtime-provider@2.5.20...amplify-nodejs-function-runtime-provider@2.5.21) (2024-06-06) + +**Note:** Version bump only for package amplify-nodejs-function-runtime-provider + + + + + +## [2.5.20](https://github.com/aws-amplify/amplify-cli/compare/amplify-nodejs-function-runtime-provider@2.5.19...amplify-nodejs-function-runtime-provider@2.5.20) (2024-05-24) + +**Note:** Version bump only for package amplify-nodejs-function-runtime-provider + + + + + +## [2.5.19](https://github.com/aws-amplify/amplify-cli/compare/amplify-nodejs-function-runtime-provider@2.5.18...amplify-nodejs-function-runtime-provider@2.5.19) (2024-05-07) + +**Note:** Version bump only for package amplify-nodejs-function-runtime-provider + + + + + +## [2.5.18](https://github.com/aws-amplify/amplify-cli/compare/amplify-nodejs-function-runtime-provider@2.5.17...amplify-nodejs-function-runtime-provider@2.5.18) (2024-04-18) + +**Note:** Version bump only for package amplify-nodejs-function-runtime-provider + + + + + +## [2.5.17](https://github.com/aws-amplify/amplify-cli/compare/amplify-nodejs-function-runtime-provider@2.5.16...amplify-nodejs-function-runtime-provider@2.5.17) (2024-04-15) + + +### Bug Fixes + +* yarn modern install workspace ([#13197](https://github.com/aws-amplify/amplify-cli/issues/13197)) ([3ca4aa9](https://github.com/aws-amplify/amplify-cli/commit/3ca4aa99457e54a89805f86e56b475aaef531d7e)) + + + + + +## [2.5.16](https://github.com/aws-amplify/amplify-cli/compare/amplify-nodejs-function-runtime-provider@2.5.15...amplify-nodejs-function-runtime-provider@2.5.16) (2024-03-29) + +**Note:** Version bump only for package amplify-nodejs-function-runtime-provider + + + + + +## [2.5.15](https://github.com/aws-amplify/amplify-cli/compare/amplify-nodejs-function-runtime-provider@2.5.14...amplify-nodejs-function-runtime-provider@2.5.15) (2024-03-06) + +**Note:** Version bump only for package amplify-nodejs-function-runtime-provider + + + + + +## [2.5.14](https://github.com/aws-amplify/amplify-cli/compare/amplify-nodejs-function-runtime-provider@2.5.13...amplify-nodejs-function-runtime-provider@2.5.14) (2023-12-11) + +**Note:** Version bump only for package amplify-nodejs-function-runtime-provider + + + + + +## [2.5.13](https://github.com/aws-amplify/amplify-cli/compare/amplify-nodejs-function-runtime-provider@2.5.11...amplify-nodejs-function-runtime-provider@2.5.13) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [2.5.12](https://github.com/aws-amplify/amplify-cli/compare/amplify-nodejs-function-runtime-provider@2.5.11...amplify-nodejs-function-runtime-provider@2.5.12) (2023-11-08) + +**Note:** Version bump only for package amplify-nodejs-function-runtime-provider + + + + + +## [2.5.11](https://github.com/aws-amplify/amplify-cli/compare/amplify-nodejs-function-runtime-provider@2.5.10...amplify-nodejs-function-runtime-provider@2.5.11) (2023-11-08) + +**Note:** Version bump only for package amplify-nodejs-function-runtime-provider + + + + + +## [2.5.10](https://github.com/aws-amplify/amplify-cli/compare/amplify-nodejs-function-runtime-provider@2.5.9...amplify-nodejs-function-runtime-provider@2.5.10) (2023-10-12) + +**Note:** Version bump only for package amplify-nodejs-function-runtime-provider + + + + + +## [2.5.9](https://github.com/aws-amplify/amplify-cli/compare/amplify-nodejs-function-runtime-provider@2.5.8...amplify-nodejs-function-runtime-provider@2.5.9) (2023-10-05) + +**Note:** Version bump only for package amplify-nodejs-function-runtime-provider + + + + + +## [2.5.8](https://github.com/aws-amplify/amplify-cli/compare/amplify-nodejs-function-runtime-provider@2.5.7...amplify-nodejs-function-runtime-provider@2.5.8) (2023-10-03) + +**Note:** Version bump only for package amplify-nodejs-function-runtime-provider + + + + + +## [2.5.7](https://github.com/aws-amplify/amplify-cli/compare/amplify-nodejs-function-runtime-provider@2.5.6...amplify-nodejs-function-runtime-provider@2.5.7) (2023-09-22) + +**Note:** Version bump only for package amplify-nodejs-function-runtime-provider + + + + + +## [2.5.6](https://github.com/aws-amplify/amplify-cli/compare/amplify-nodejs-function-runtime-provider@2.5.5...amplify-nodejs-function-runtime-provider@2.5.6) (2023-08-31) + +**Note:** Version bump only for package amplify-nodejs-function-runtime-provider + + + + + +## [2.5.5](https://github.com/aws-amplify/amplify-cli/compare/amplify-nodejs-function-runtime-provider@2.5.4...amplify-nodejs-function-runtime-provider@2.5.5) (2023-08-17) + +**Note:** Version bump only for package amplify-nodejs-function-runtime-provider + + + + + +## [2.5.4](https://github.com/aws-amplify/amplify-cli/compare/amplify-nodejs-function-runtime-provider@2.5.3...amplify-nodejs-function-runtime-provider@2.5.4) (2023-08-09) + + +### Bug Fixes + +* Dependabot alerts for semver, tough-cookie ([#12962](https://github.com/aws-amplify/amplify-cli/issues/12962)) ([175a86b](https://github.com/aws-amplify/amplify-cli/commit/175a86b89a54c65bb6e68c0609be503d61e39d63)) + + + + + +## [2.5.3](https://github.com/aws-amplify/amplify-cli/compare/amplify-nodejs-function-runtime-provider@2.5.2...amplify-nodejs-function-runtime-provider@2.5.3) (2023-07-28) + +**Note:** Version bump only for package amplify-nodejs-function-runtime-provider + + + + + +## [2.5.2](https://github.com/aws-amplify/amplify-cli/compare/amplify-nodejs-function-runtime-provider@2.5.1...amplify-nodejs-function-runtime-provider@2.5.2) (2023-07-27) + +**Note:** Version bump only for package amplify-nodejs-function-runtime-provider + + + + + +## [2.5.1](https://github.com/aws-amplify/amplify-cli/compare/amplify-nodejs-function-runtime-provider@2.5.0...amplify-nodejs-function-runtime-provider@2.5.1) (2023-07-24) + +**Note:** Version bump only for package amplify-nodejs-function-runtime-provider + + + + + +# [2.5.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-nodejs-function-runtime-provider@2.4.4...amplify-nodejs-function-runtime-provider@2.5.0) (2023-07-20) + + +### Features + +* lambda support for yarn2/3 and pnpm package managers ([#12750](https://github.com/aws-amplify/amplify-cli/issues/12750)) ([fd18195](https://github.com/aws-amplify/amplify-cli/commit/fd181952672efb0479ca6955c0c7a45fe248d1b1)) + + + + + +## [2.4.4](https://github.com/aws-amplify/amplify-cli/compare/amplify-nodejs-function-runtime-provider@2.4.3...amplify-nodejs-function-runtime-provider@2.4.4) (2023-06-13) + +**Note:** Version bump only for package amplify-nodejs-function-runtime-provider + + + + + ## [2.4.3](https://github.com/aws-amplify/amplify-cli/compare/amplify-nodejs-function-runtime-provider@2.4.1...amplify-nodejs-function-runtime-provider@2.4.3) (2023-05-25) diff --git a/packages/amplify-nodejs-function-runtime-provider/package.json b/packages/amplify-nodejs-function-runtime-provider/package.json index b3453918f0d..688f61876ef 100644 --- a/packages/amplify-nodejs-function-runtime-provider/package.json +++ b/packages/amplify-nodejs-function-runtime-provider/package.json @@ -1,6 +1,6 @@ { "name": "amplify-nodejs-function-runtime-provider", - "version": "2.4.3", + "version": "2.5.25", "description": "Provides functionality related to functions in NodeJS on AWS", "repository": { "type": "git", @@ -27,8 +27,8 @@ "extract-api": "ts-node ../../scripts/extract-api.ts" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.0.8", - "@aws-amplify/amplify-function-plugin-interface": "1.10.2", + "@aws-amplify/amplify-cli-core": "4.3.11", + "@aws-amplify/amplify-function-plugin-interface": "1.12.1", "execa": "^5.1.1", "exit": "^0.1.2", "fs-extra": "^8.1.0", @@ -38,7 +38,7 @@ "@types/exit": "^0.1.31", "@types/node": "^12.12.6", "@types/semver": "^7", - "semver": "^7.5.0" + "semver": "^7.5.4" }, "jest": { "transform": { diff --git a/packages/amplify-nodejs-function-runtime-provider/src/__tests__/utils/handlerWithSyntaxError.js b/packages/amplify-nodejs-function-runtime-provider/src/__tests__/utils/handlerWithSyntaxError.js index 5e657bea463..60c17e6c073 100644 --- a/packages/amplify-nodejs-function-runtime-provider/src/__tests__/utils/handlerWithSyntaxError.js +++ b/packages/amplify-nodejs-function-runtime-provider/src/__tests__/utils/handlerWithSyntaxError.js @@ -1,3 +1,4 @@ +/* eslint-disable */ module.exports.syntaxError = async () => { if (false) { diff --git a/packages/amplify-nodejs-function-runtime-provider/src/__tests__/utils/legacyBuild.test.ts b/packages/amplify-nodejs-function-runtime-provider/src/__tests__/utils/legacyBuild.test.ts index c8ddd560602..1eac07ee241 100644 --- a/packages/amplify-nodejs-function-runtime-provider/src/__tests__/utils/legacyBuild.test.ts +++ b/packages/amplify-nodejs-function-runtime-provider/src/__tests__/utils/legacyBuild.test.ts @@ -1,6 +1,5 @@ import glob from 'glob'; import fs from 'fs-extra'; -import _ from 'lodash'; import { buildResource } from '../../../src/utils/legacyBuild'; import { BuildType } from '@aws-amplify/amplify-function-plugin-interface'; diff --git a/packages/amplify-nodejs-function-runtime-provider/src/utils/legacyBuild.ts b/packages/amplify-nodejs-function-runtime-provider/src/utils/legacyBuild.ts index a97e572714e..f6d8a0d3e71 100644 --- a/packages/amplify-nodejs-function-runtime-provider/src/utils/legacyBuild.ts +++ b/packages/amplify-nodejs-function-runtime-provider/src/utils/legacyBuild.ts @@ -1,3 +1,4 @@ +import { execWithOutputAsString } from '@aws-amplify/amplify-cli-core'; import { $TSObject, getPackageManager, JSONUtilities, AmplifyError, PackageManager } from '@aws-amplify/amplify-cli-core'; import { BuildRequest, BuildResult, BuildType } from '@aws-amplify/amplify-function-plugin-interface'; import execa from 'execa'; @@ -12,19 +13,24 @@ export const buildResource = async (request: BuildRequest): Promise const resourceDir = request.service ? request.srcRoot : path.join(request.srcRoot, 'src'); if (!request.lastBuildTimeStamp || isBuildStale(request.srcRoot, request.lastBuildTimeStamp, request.buildType, request.lastBuildType)) { - await installDependencies(resourceDir, request.buildType); + if (request.scripts?.build) { + await execWithOutputAsString(request.scripts.build, { cwd: resourceDir }); + } else { + await installDependencies(resourceDir, request.buildType); + } + if (request.legacyBuildHookParams) { await runBuildScriptHook(request.legacyBuildHookParams.resourceName, request.legacyBuildHookParams.projectRoot); } - return Promise.resolve({ rebuilt: true }); + return { rebuilt: true }; } - return Promise.resolve({ rebuilt: false }); + return { rebuilt: false }; }; const runBuildScriptHook = async (resourceName: string, projectRoot: string): Promise => { const scriptName = `amplify:${resourceName}`; if (scriptExists(projectRoot, scriptName)) { - await runPackageManager(projectRoot, undefined, scriptName); + await runPackageManagerScript(projectRoot, scriptName); } }; @@ -36,19 +42,34 @@ const scriptExists = (projectRoot: string, scriptName: string): boolean => { }; const installDependencies = async (resourceDir: string, buildType: BuildType): Promise => { - await runPackageManager(resourceDir, buildType); + await runPackageManagerInstall(resourceDir, buildType); }; -const runPackageManager = async (resourceDir: string, buildType?: BuildType, scriptName?: string): Promise => { +const runPackageManagerInstall = async (resourceDir: string, buildType: BuildType): Promise => { const packageManager = await getPackageManager(resourceDir); + if (packageManager === null) { + // If no package manager was detected, it means that this functions or layer has no package.json, so no package operations + // should be done. + return; + } + + const args = packageManager.getInstallArgs(buildType, resourceDir); + await runPackageManager(packageManager, args, resourceDir); +}; +const runPackageManagerScript = async (resourceDir: string, scriptName: string): Promise => { + const packageManager = await getPackageManager(resourceDir); if (packageManager === null) { // If no package manager was detected, it means that this functions or layer has no package.json, so no package operations // should be done. return; } - const args = await toPackageManagerArgs(packageManager, buildType, scriptName); + const args = packageManager.getRunScriptArgs(scriptName); + await runPackageManager(packageManager, args, resourceDir); +}; + +const runPackageManager = async (packageManager: PackageManager, args: string[], resourceDir: string): Promise => { try { execa.sync(packageManager.executable, args, { cwd: resourceDir, @@ -76,43 +97,6 @@ const runPackageManager = async (resourceDir: string, buildType?: BuildType, scr } }; -const toPackageManagerArgs = async (packageManager: PackageManager, buildType?: BuildType, scriptName?: string): Promise => { - switch (packageManager.packageManager) { - case 'yarn': { - const useYarnModern = packageManager.version?.major && packageManager.version?.major > 1; - if (scriptName) { - return [scriptName]; - } - - const args = useYarnModern ? [] : ['--no-bin-links']; - - if (buildType === BuildType.PROD) { - args.push(useYarnModern ? 'build' : '--production'); - } - - return args; - } - case 'npm': { - if (scriptName) { - return ['run-script', scriptName]; - } - - const args = ['install', '--no-bin-links']; - - if (buildType === BuildType.PROD) { - args.push('--production'); - } - - return args; - } - default: { - throw new AmplifyError('PackagingLambdaFunctionError', { - message: `Packaging lambda function failed. Unsupported package manager ${packageManager.packageManager}`, - }); - } - } -}; - const isBuildStale = (resourceDir: string, lastBuildTimeStamp: Date, buildType: BuildType, lastBuildType?: BuildType): boolean => { const dirTime = new Date(fs.statSync(resourceDir).mtime); // If the last build type not matching we have to flag a stale build to force diff --git a/packages/amplify-nodejs-function-template-provider/CHANGELOG.md b/packages/amplify-nodejs-function-template-provider/CHANGELOG.md index bd5951c28ab..50cf55ef751 100644 --- a/packages/amplify-nodejs-function-template-provider/CHANGELOG.md +++ b/packages/amplify-nodejs-function-template-provider/CHANGELOG.md @@ -3,6 +3,237 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.10.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-nodejs-function-template-provider@2.10.10...@aws-amplify/amplify-nodejs-function-template-provider@2.10.11) (2025-01-30) + +**Note:** Version bump only for package @aws-amplify/amplify-nodejs-function-template-provider + + + + + +## [2.10.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-nodejs-function-template-provider@2.10.9...@aws-amplify/amplify-nodejs-function-template-provider@2.10.10) (2024-08-02) + +**Note:** Version bump only for package @aws-amplify/amplify-nodejs-function-template-provider + + + + + +## [2.10.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-nodejs-function-template-provider@2.10.8...@aws-amplify/amplify-nodejs-function-template-provider@2.10.9) (2024-06-27) + +**Note:** Version bump only for package @aws-amplify/amplify-nodejs-function-template-provider + + + + + +## [2.10.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-nodejs-function-template-provider@2.10.7...@aws-amplify/amplify-nodejs-function-template-provider@2.10.8) (2024-06-20) + +**Note:** Version bump only for package @aws-amplify/amplify-nodejs-function-template-provider + + + + + +## [2.10.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-nodejs-function-template-provider@2.10.6...@aws-amplify/amplify-nodejs-function-template-provider@2.10.7) (2024-06-06) + +**Note:** Version bump only for package @aws-amplify/amplify-nodejs-function-template-provider + + + + + +## [2.10.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-nodejs-function-template-provider@2.10.5...@aws-amplify/amplify-nodejs-function-template-provider@2.10.6) (2024-05-24) + +**Note:** Version bump only for package @aws-amplify/amplify-nodejs-function-template-provider + + + + + +## [2.10.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-nodejs-function-template-provider@2.10.4...@aws-amplify/amplify-nodejs-function-template-provider@2.10.5) (2024-05-07) + +**Note:** Version bump only for package @aws-amplify/amplify-nodejs-function-template-provider + + + + + +## [2.10.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-nodejs-function-template-provider@2.10.3...@aws-amplify/amplify-nodejs-function-template-provider@2.10.4) (2024-04-18) + +**Note:** Version bump only for package @aws-amplify/amplify-nodejs-function-template-provider + + + + + +## [2.10.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-nodejs-function-template-provider@2.10.2...@aws-amplify/amplify-nodejs-function-template-provider@2.10.3) (2024-04-15) + +**Note:** Version bump only for package @aws-amplify/amplify-nodejs-function-template-provider + + + + + +## [2.10.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-nodejs-function-template-provider@2.10.1...@aws-amplify/amplify-nodejs-function-template-provider@2.10.2) (2024-03-29) + +**Note:** Version bump only for package @aws-amplify/amplify-nodejs-function-template-provider + + + + + +## [2.10.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-nodejs-function-template-provider@2.10.0...@aws-amplify/amplify-nodejs-function-template-provider@2.10.1) (2024-03-06) + + +### Reverts + +* Revert "chore: bump data package versions (#13486)" (#13487) ([3280d40](https://github.com/aws-amplify/amplify-cli/commit/3280d40a5ab50c675b0e2b8050ad35a69c83cdc2)), closes [#13486](https://github.com/aws-amplify/amplify-cli/issues/13486) [#13487](https://github.com/aws-amplify/amplify-cli/issues/13487) + + + + + +# [2.10.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-nodejs-function-template-provider@2.9.7...@aws-amplify/amplify-nodejs-function-template-provider@2.10.0) (2023-12-11) + + +### Features + +* bump data dependencies to launch RDS feature ([#13409](https://github.com/aws-amplify/amplify-cli/issues/13409)) ([7fbf29f](https://github.com/aws-amplify/amplify-cli/commit/7fbf29f56eb7335d20de0b5526fbed7795a2af09)) + + + + + +## [2.9.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-nodejs-function-template-provider@2.9.5...@aws-amplify/amplify-nodejs-function-template-provider@2.9.7) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [2.9.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-nodejs-function-template-provider@2.9.5...@aws-amplify/amplify-nodejs-function-template-provider@2.9.6) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-nodejs-function-template-provider + + + + + +## [2.9.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-nodejs-function-template-provider@2.9.4...@aws-amplify/amplify-nodejs-function-template-provider@2.9.5) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-nodejs-function-template-provider + + + + + +## [2.9.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-nodejs-function-template-provider@2.9.3...@aws-amplify/amplify-nodejs-function-template-provider@2.9.4) (2023-10-12) + +**Note:** Version bump only for package @aws-amplify/amplify-nodejs-function-template-provider + + + + + +## [2.9.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-nodejs-function-template-provider@2.9.2...@aws-amplify/amplify-nodejs-function-template-provider@2.9.3) (2023-10-05) + +**Note:** Version bump only for package @aws-amplify/amplify-nodejs-function-template-provider + + + + + +## [2.9.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-nodejs-function-template-provider@2.9.1...@aws-amplify/amplify-nodejs-function-template-provider@2.9.2) (2023-10-03) + +**Note:** Version bump only for package @aws-amplify/amplify-nodejs-function-template-provider + + + + + +## [2.9.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-nodejs-function-template-provider@2.9.0...@aws-amplify/amplify-nodejs-function-template-provider@2.9.1) (2023-09-22) + +**Note:** Version bump only for package @aws-amplify/amplify-nodejs-function-template-provider + + + + + +# [2.9.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-nodejs-function-template-provider@2.8.10...@aws-amplify/amplify-nodejs-function-template-provider@2.9.0) (2023-08-31) + + +### Features + +* add list all to lambda crud template ([#13116](https://github.com/aws-amplify/amplify-cli/issues/13116)) ([0fde28a](https://github.com/aws-amplify/amplify-cli/commit/0fde28a08a3d82b371cbbf858f462648376a318a)) + + + + + +## [2.8.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-nodejs-function-template-provider@2.8.9...@aws-amplify/amplify-nodejs-function-template-provider@2.8.10) (2023-08-17) + +**Note:** Version bump only for package @aws-amplify/amplify-nodejs-function-template-provider + + + + + +## [2.8.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-nodejs-function-template-provider@2.8.8...@aws-amplify/amplify-nodejs-function-template-provider@2.8.9) (2023-08-09) + +**Note:** Version bump only for package @aws-amplify/amplify-nodejs-function-template-provider + + + + + +## [2.8.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-nodejs-function-template-provider@2.8.7...@aws-amplify/amplify-nodejs-function-template-provider@2.8.8) (2023-07-28) + +**Note:** Version bump only for package @aws-amplify/amplify-nodejs-function-template-provider + + + + + +## [2.8.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-nodejs-function-template-provider@2.8.6...@aws-amplify/amplify-nodejs-function-template-provider@2.8.7) (2023-07-27) + +**Note:** Version bump only for package @aws-amplify/amplify-nodejs-function-template-provider + + + + + +## [2.8.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-nodejs-function-template-provider@2.8.5...@aws-amplify/amplify-nodejs-function-template-provider@2.8.6) (2023-07-24) + +**Note:** Version bump only for package @aws-amplify/amplify-nodejs-function-template-provider + + + + + +## [2.8.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-nodejs-function-template-provider@2.8.4...@aws-amplify/amplify-nodejs-function-template-provider@2.8.5) (2023-07-20) + + +### Bug Fixes + +* update lambda-auth mock event.json with the correct request authorization event payload ([#11428](https://github.com/aws-amplify/amplify-cli/issues/11428)) ([9980330](https://github.com/aws-amplify/amplify-cli/commit/9980330a64ffd937f4f226ac38116afb43a61128)) + + + + + +## [2.8.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-nodejs-function-template-provider@2.8.3...@aws-amplify/amplify-nodejs-function-template-provider@2.8.4) (2023-06-13) + +**Note:** Version bump only for package @aws-amplify/amplify-nodejs-function-template-provider + + + + + ## [2.8.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-nodejs-function-template-provider@2.8.1...@aws-amplify/amplify-nodejs-function-template-provider@2.8.3) (2023-05-25) diff --git a/packages/amplify-nodejs-function-template-provider/package.json b/packages/amplify-nodejs-function-template-provider/package.json index 8c62f13ddc3..a0e5543e05f 100644 --- a/packages/amplify-nodejs-function-template-provider/package.json +++ b/packages/amplify-nodejs-function-template-provider/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-nodejs-function-template-provider", - "version": "2.8.3", + "version": "2.10.11", "description": "Node JS templates supplied by the Amplify Team", "repository": { "type": "git", @@ -25,10 +25,10 @@ "extract-api": "ts-node ../../scripts/extract-api.ts" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.0.8", - "@aws-amplify/amplify-function-plugin-interface": "1.10.2", - "@aws-amplify/amplify-prompts": "2.7.0", - "graphql-transformer-core": "^8.1.2", + "@aws-amplify/amplify-cli-core": "4.3.11", + "@aws-amplify/amplify-function-plugin-interface": "1.12.1", + "@aws-amplify/amplify-prompts": "2.8.6", + "graphql-transformer-core": "^8.2.13", "lodash": "^4.17.21" }, "devDependencies": { diff --git a/packages/amplify-nodejs-function-template-provider/resources/lambda/crud/app.js.ejs b/packages/amplify-nodejs-function-template-provider/resources/lambda/crud/app.js.ejs index c0a20579713..811d723c888 100644 --- a/packages/amplify-nodejs-function-template-provider/resources/lambda/crud/app.js.ejs +++ b/packages/amplify-nodejs-function-template-provider/resources/lambda/crud/app.js.ejs @@ -9,7 +9,7 @@ See the License for the specific language governing permissions and limitations <%= props.topLevelComment %> const { DynamoDBClient } = require('@aws-sdk/client-dynamodb'); -const { DeleteCommand, DynamoDBDocumentClient, GetCommand, PutCommand, QueryCommand, } = require('@aws-sdk/lib-dynamodb'); +const { DeleteCommand, DynamoDBDocumentClient, GetCommand, PutCommand, QueryCommand, ScanCommand } = require('@aws-sdk/lib-dynamodb'); const awsServerlessExpressMiddleware = require('aws-serverless-express/middleware') const bodyParser = require('body-parser') const express = require('express') @@ -55,9 +55,28 @@ const convertUrlType = (param, type) => { } } -/******************************** - * HTTP Get method for list objects * - ********************************/ +/************************************ +* HTTP Get method to list objects * +************************************/ + +app.get(path, async function(req, res) { + var params = { + TableName: tableName, + Select: 'ALL_ATTRIBUTES', + }; + + try { + const data = await ddbDocClient.send(new ScanCommand(params)); + res.json(data.Items); + } catch (err) { + res.statusCode = 500; + res.json({error: 'Could not load items: ' + err.message}); + } +}); + +/************************************ + * HTTP Get method to query objects * + ************************************/ app.get(path + hashKeyPath, async function(req, res) { const condition = {} diff --git a/packages/amplify-nodejs-function-template-provider/resources/lambda/lambda-auth/event.json b/packages/amplify-nodejs-function-template-provider/resources/lambda/lambda-auth/event.json index 16936b83271..df38bc29a97 100644 --- a/packages/amplify-nodejs-function-template-provider/resources/lambda/lambda-auth/event.json +++ b/packages/amplify-nodejs-function-template-provider/resources/lambda/lambda-auth/event.json @@ -1,3 +1,11 @@ { - "authorizedToken": "custom-authorized" + "authorizationToken": "ExampleAUTHtoken123123123", + "requestContext": { + "apiId": "aaaaaa123123123example123", + "accountId": "123456789012", + "requestId": "f4081827-1111-4444-5555-5cf4695f339f", + "queryString": "mutation CreateEvent {...}\n\nquery MyQuery {...}\n", + "operationName": "MyQuery", + "variables": {} + } } diff --git a/packages/amplify-opensearch-simulator/CHANGELOG.md b/packages/amplify-opensearch-simulator/CHANGELOG.md index 53ae1cb239a..c811ec31438 100644 --- a/packages/amplify-opensearch-simulator/CHANGELOG.md +++ b/packages/amplify-opensearch-simulator/CHANGELOG.md @@ -3,6 +3,239 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.7.16](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-opensearch-simulator@1.7.15...@aws-amplify/amplify-opensearch-simulator@1.7.16) (2025-01-30) + +**Note:** Version bump only for package @aws-amplify/amplify-opensearch-simulator + + + + + +## [1.7.15](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-opensearch-simulator@1.7.14...@aws-amplify/amplify-opensearch-simulator@1.7.15) (2024-08-02) + +**Note:** Version bump only for package @aws-amplify/amplify-opensearch-simulator + + + + + +## [1.7.14](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-opensearch-simulator@1.7.13...@aws-amplify/amplify-opensearch-simulator@1.7.14) (2024-06-27) + +**Note:** Version bump only for package @aws-amplify/amplify-opensearch-simulator + + + + + +## [1.7.13](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-opensearch-simulator@1.7.12...@aws-amplify/amplify-opensearch-simulator@1.7.13) (2024-06-20) + +**Note:** Version bump only for package @aws-amplify/amplify-opensearch-simulator + + + + + +## [1.7.12](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-opensearch-simulator@1.7.11...@aws-amplify/amplify-opensearch-simulator@1.7.12) (2024-06-06) + +**Note:** Version bump only for package @aws-amplify/amplify-opensearch-simulator + + + + + +## [1.7.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-opensearch-simulator@1.7.10...@aws-amplify/amplify-opensearch-simulator@1.7.11) (2024-05-24) + +**Note:** Version bump only for package @aws-amplify/amplify-opensearch-simulator + + + + + +## [1.7.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-opensearch-simulator@1.7.9...@aws-amplify/amplify-opensearch-simulator@1.7.10) (2024-05-07) + +**Note:** Version bump only for package @aws-amplify/amplify-opensearch-simulator + + + + + +## [1.7.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-opensearch-simulator@1.7.8...@aws-amplify/amplify-opensearch-simulator@1.7.9) (2024-04-18) + +**Note:** Version bump only for package @aws-amplify/amplify-opensearch-simulator + + + + + +## [1.7.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-opensearch-simulator@1.7.7...@aws-amplify/amplify-opensearch-simulator@1.7.8) (2024-04-15) + +**Note:** Version bump only for package @aws-amplify/amplify-opensearch-simulator + + + + + +## [1.7.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-opensearch-simulator@1.7.6...@aws-amplify/amplify-opensearch-simulator@1.7.7) (2024-03-29) + +**Note:** Version bump only for package @aws-amplify/amplify-opensearch-simulator + + + + + +## [1.7.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-opensearch-simulator@1.7.5...@aws-amplify/amplify-opensearch-simulator@1.7.6) (2024-03-06) + +**Note:** Version bump only for package @aws-amplify/amplify-opensearch-simulator + + + + + +## [1.7.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-opensearch-simulator@1.7.4...@aws-amplify/amplify-opensearch-simulator@1.7.5) (2023-12-11) + +**Note:** Version bump only for package @aws-amplify/amplify-opensearch-simulator + + + + + +## [1.7.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-opensearch-simulator@1.7.2...@aws-amplify/amplify-opensearch-simulator@1.7.4) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [1.7.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-opensearch-simulator@1.7.2...@aws-amplify/amplify-opensearch-simulator@1.7.3) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-opensearch-simulator + + + + + +## [1.7.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-opensearch-simulator@1.7.1...@aws-amplify/amplify-opensearch-simulator@1.7.2) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-opensearch-simulator + + + + + +## [1.7.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-opensearch-simulator@1.7.0...@aws-amplify/amplify-opensearch-simulator@1.7.1) (2023-10-12) + +**Note:** Version bump only for package @aws-amplify/amplify-opensearch-simulator + + + + + +# [1.7.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-opensearch-simulator@1.6.3...@aws-amplify/amplify-opensearch-simulator@1.7.0) (2023-10-05) + + +### Bug Fixes + +* dependabot alert for openpgp ([#13282](https://github.com/aws-amplify/amplify-cli/issues/13282)) ([49314ad](https://github.com/aws-amplify/amplify-cli/commit/49314ad063cfb3111af2a5406028c5c73958cd24)) + + +### Features + +* **amplify-util-uibuilder:** amplify js backwards compatibility ([#13288](https://github.com/aws-amplify/amplify-cli/issues/13288)) ([2db3e18](https://github.com/aws-amplify/amplify-cli/commit/2db3e181cf06954085eb8fade0b26162672327db)) + + + + + +## [1.6.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-opensearch-simulator@1.6.2...@aws-amplify/amplify-opensearch-simulator@1.6.3) (2023-10-03) + +**Note:** Version bump only for package @aws-amplify/amplify-opensearch-simulator + + + + + +## [1.6.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-opensearch-simulator@1.6.1...@aws-amplify/amplify-opensearch-simulator@1.6.2) (2023-09-22) + +**Note:** Version bump only for package @aws-amplify/amplify-opensearch-simulator + + + + + +## [1.6.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-opensearch-simulator@1.6.0...@aws-amplify/amplify-opensearch-simulator@1.6.1) (2023-08-31) + +**Note:** Version bump only for package @aws-amplify/amplify-opensearch-simulator + + + + + +# [1.6.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-opensearch-simulator@1.5.4...@aws-amplify/amplify-opensearch-simulator@1.6.0) (2023-08-17) + + +### Features + +* generate components using graphql ([1568581](https://github.com/aws-amplify/amplify-cli/commit/15685810460881aa71e88724398b9be05ba53781)) + + + + + +## [1.5.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-opensearch-simulator@1.5.3...@aws-amplify/amplify-opensearch-simulator@1.5.4) (2023-08-09) + +**Note:** Version bump only for package @aws-amplify/amplify-opensearch-simulator + + + + + +## [1.5.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-opensearch-simulator@1.5.2...@aws-amplify/amplify-opensearch-simulator@1.5.3) (2023-07-28) + +**Note:** Version bump only for package @aws-amplify/amplify-opensearch-simulator + + + + + +## [1.5.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-opensearch-simulator@1.5.1...@aws-amplify/amplify-opensearch-simulator@1.5.2) (2023-07-27) + +**Note:** Version bump only for package @aws-amplify/amplify-opensearch-simulator + + + + + +## [1.5.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-opensearch-simulator@1.5.0...@aws-amplify/amplify-opensearch-simulator@1.5.1) (2023-07-24) + +**Note:** Version bump only for package @aws-amplify/amplify-opensearch-simulator + + + + + +# [1.5.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-opensearch-simulator@1.4.4...@aws-amplify/amplify-opensearch-simulator@1.5.0) (2023-07-20) + + +### Features + +* uibuilder codegen service ([#12896](https://github.com/aws-amplify/amplify-cli/issues/12896)) ([3fe2f98](https://github.com/aws-amplify/amplify-cli/commit/3fe2f98a99a9daf22efccb23a031882ea2be899b)) + + + + + +## [1.4.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-opensearch-simulator@1.4.3...@aws-amplify/amplify-opensearch-simulator@1.4.4) (2023-06-13) + +**Note:** Version bump only for package @aws-amplify/amplify-opensearch-simulator + + + + + ## [1.4.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-opensearch-simulator@1.4.1...@aws-amplify/amplify-opensearch-simulator@1.4.3) (2023-05-25) diff --git a/packages/amplify-opensearch-simulator/package.json b/packages/amplify-opensearch-simulator/package.json index 4f1e3180323..e26cbbbc7f1 100644 --- a/packages/amplify-opensearch-simulator/package.json +++ b/packages/amplify-opensearch-simulator/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-opensearch-simulator", - "version": "1.4.3", + "version": "1.7.16", "description": "Opensearch local simulator", "repository": { "type": "git", @@ -25,23 +25,23 @@ "extract-api": "ts-node ../../scripts/extract-api.ts" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.0.8", - "@aws-amplify/amplify-prompts": "2.7.0", - "aws-sdk": "^2.1354.0", + "@aws-amplify/amplify-cli-core": "4.3.11", + "@aws-amplify/amplify-prompts": "2.8.6", + "aws-sdk": "^2.1464.0", "detect-port": "^1.3.0", "execa": "^5.1.1", "fs-extra": "^8.1.0", "get-port": "^5.1.1", "gunzip-maybe": "^1.4.2", "node-fetch": "^2.6.7", - "openpgp": "^4.10.10", + "openpgp": "^5.10.2", "promise-toolbox": "^0.20.0", "tar": "^6.1.11", "wait-port": "^0.2.7" }, "devDependencies": { "@types/node": "^12.12.6", - "@types/openpgp": "^4.4.18", + "@types/openpgp": "^4.4.19", "uuid": "^8.3.2" }, "berry": { diff --git a/packages/amplify-opensearch-simulator/src/index.ts b/packages/amplify-opensearch-simulator/src/index.ts index 95809ebb8f9..ad4679840e1 100644 --- a/packages/amplify-opensearch-simulator/src/index.ts +++ b/packages/amplify-opensearch-simulator/src/index.ts @@ -202,7 +202,7 @@ export const startOpensearchEmulator = async ( let prematureExit: $TSAny; let waiter: $TSAny; /* - This is a fairly complex set of logic, similar to the DynamoDB emulator, + This is a fairly complex set of logic, similar to the DynamoDB emulator, to retry starting the emulator if it fails to start. We need this logic due to possible race conditions between when we find an open port and bind to it. This situation is particularly common @@ -305,13 +305,13 @@ export const ensureOpenSearchLocalExists = async (pathToOpenSearchData: string) const latestPublicKey = await nodeFetch(publicKeyUrl).then((res) => res.text()); const opensearchSimulatorGunZippedTarball = await nodeFetch(opensearchMinLinuxArtifactUrl).then((res) => res.buffer()); - const signature = await openpgp.signature.read(latestSig); - const publickey = await openpgp.key.readArmored(latestPublicKey); - const message = await openpgp.message.fromBinary(new Uint8Array(opensearchSimulatorGunZippedTarball)); + const signature = await openpgp.readSignature({ binarySignature: latestSig }); + const publickey = await openpgp.readKey({ armoredKey: latestPublicKey }); + const message = await openpgp.createMessage({ binary: new Uint8Array(opensearchSimulatorGunZippedTarball) }); const verificationResult = await openpgp.verify({ message: message, signature: signature, - publicKeys: publickey.keys, + verificationKeys: publickey, }); const { verified } = verificationResult.signatures[0]; diff --git a/packages/amplify-prompts/.npmignore b/packages/amplify-prompts/.npmignore new file mode 100644 index 00000000000..2c166892c41 --- /dev/null +++ b/packages/amplify-prompts/.npmignore @@ -0,0 +1,4 @@ +**/__tests__/** +src +tsconfig.json +tsconfig.tsbuildinfo diff --git a/packages/amplify-prompts/CHANGELOG.md b/packages/amplify-prompts/CHANGELOG.md index 3e2f5686aba..c1e423f9774 100644 --- a/packages/amplify-prompts/CHANGELOG.md +++ b/packages/amplify-prompts/CHANGELOG.md @@ -3,6 +3,74 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.8.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-prompts@2.8.4...@aws-amplify/amplify-prompts@2.8.6) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [2.8.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-prompts@2.8.4...@aws-amplify/amplify-prompts@2.8.5) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-prompts + + + + + +## [2.8.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-prompts@2.8.3...@aws-amplify/amplify-prompts@2.8.4) (2023-09-22) + + +### Bug Fixes + +* don't render spinner in non-TTY terminal ([#13242](https://github.com/aws-amplify/amplify-cli/issues/13242)) ([d75d0b2](https://github.com/aws-amplify/amplify-cli/commit/d75d0b295d9fb3cd85b3e9cb0de177f60091def1)) + + + + + +## [2.8.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-prompts@2.8.2...@aws-amplify/amplify-prompts@2.8.3) (2023-08-31) + + +### Bug Fixes + +* exclude tests from publish ([#13153](https://github.com/aws-amplify/amplify-cli/issues/13153)) ([1b1fe09](https://github.com/aws-amplify/amplify-cli/commit/1b1fe09a1c08be0262a1013f71354abd7160722a)) + + + + + +## [2.8.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-prompts@2.8.1...@aws-amplify/amplify-prompts@2.8.2) (2023-08-17) + +**Note:** Version bump only for package @aws-amplify/amplify-prompts + + + + + +## [2.8.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-prompts@2.8.0...@aws-amplify/amplify-prompts@2.8.1) (2023-08-09) + +**Note:** Version bump only for package @aws-amplify/amplify-prompts + + + + + +# [2.8.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-prompts@2.7.0...@aws-amplify/amplify-prompts@2.8.0) (2023-06-13) + + +### Features + +* display error message instead of object ([#12636](https://github.com/aws-amplify/amplify-cli/issues/12636)) ([811e8fc](https://github.com/aws-amplify/amplify-cli/commit/811e8fcd48f15b37401643b9b13f628acb4708bd)) + + + + + # [2.7.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-prompts@2.6.8...@aws-amplify/amplify-prompts@2.7.0) (2023-05-11) diff --git a/packages/amplify-prompts/package.json b/packages/amplify-prompts/package.json index 19adeaccb86..5d4ede73600 100644 --- a/packages/amplify-prompts/package.json +++ b/packages/amplify-prompts/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-prompts", - "version": "2.7.0", + "version": "2.8.6", "description": "Utility functions for Amplify CLI terminal I/O", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -31,7 +31,7 @@ }, "homepage": "https://github.com/aws-amplify/amplify-cli#readme", "dependencies": { - "@aws-amplify/amplify-cli-shared-interfaces": "1.2.2", + "@aws-amplify/amplify-cli-shared-interfaces": "1.2.5", "chalk": "^4.1.1", "enquirer": "^2.3.6" }, diff --git a/packages/amplify-prompts/src/__tests__/multibar.test.ts b/packages/amplify-prompts/src/__tests__/multibar.test.ts index 2537480c51e..b8b03efc2b9 100644 --- a/packages/amplify-prompts/src/__tests__/multibar.test.ts +++ b/packages/amplify-prompts/src/__tests__/multibar.test.ts @@ -1,5 +1,3 @@ -/* eslint-disable jest/no-conditional-expect */ - import { MultiProgressBar as MultiBar } from '../progressbars/multibar'; import { BarOptions, ItemPayload, ProgressPayload } from '../progressbars/progressbar'; diff --git a/packages/amplify-prompts/src/__tests__/progressbar.test.ts b/packages/amplify-prompts/src/__tests__/progressbar.test.ts index 2e92f483e5c..4884aa7c548 100644 --- a/packages/amplify-prompts/src/__tests__/progressbar.test.ts +++ b/packages/amplify-prompts/src/__tests__/progressbar.test.ts @@ -1,5 +1,3 @@ -/* eslint-disable jest/no-conditional-expect */ - import { ProgressBar as Bar, BarOptions } from '../progressbars/progressbar'; const options: BarOptions = { diff --git a/packages/amplify-prompts/src/__tests__/prompter.test.ts b/packages/amplify-prompts/src/__tests__/prompter.test.ts index a9257056193..afce8b09c09 100644 --- a/packages/amplify-prompts/src/__tests__/prompter.test.ts +++ b/packages/amplify-prompts/src/__tests__/prompter.test.ts @@ -95,7 +95,7 @@ describe('input', () => { const promptResponse = 'this is the result'; const transformedValue = 'transformed value'; promptMock.mockResolvedValueOnce({ result: promptResponse }); - expect(await prompter.input('test message', { transform: (_) => transformedValue })).toEqual(transformedValue); + expect(await prompter.input('test message', { transform: () => transformedValue })).toEqual(transformedValue); }); it('transforms each input part separately when "many" specified', async () => { diff --git a/packages/amplify-prompts/src/__tests__/spinner.test.ts b/packages/amplify-prompts/src/__tests__/spinner.test.ts new file mode 100644 index 00000000000..cbf1ac2e8a1 --- /dev/null +++ b/packages/amplify-prompts/src/__tests__/spinner.test.ts @@ -0,0 +1,66 @@ +import { AmplifySpinner } from '../progressbars/spinner'; +import { AmplifyTerminal } from '../progressbars/terminal'; + +jest.mock('../progressbars/terminal'); +const amplifyTerminalMocked = jest.mocked(AmplifyTerminal); + +beforeEach(() => { + jest.resetAllMocks(); +}); + +describe('in non-TTY terminal', () => { + beforeEach(() => { + jest.spyOn(AmplifyTerminal.prototype, 'isTTY').mockReturnValue(false); + }); + + it('is noop', () => { + const spinner = new AmplifySpinner(); + + spinner.start('initial message'); + spinner.resetMessage('other message'); + spinner.stop('last message'); + + expect(amplifyTerminalMocked.mock.instances.length).toEqual(1); + expect(AmplifyTerminal).toHaveBeenCalledTimes(1); + expect(amplifyTerminalMocked.mock.instances[0].writeLines).toHaveBeenCalledTimes(0); + expect(amplifyTerminalMocked.mock.instances[0].cursor).toHaveBeenCalledTimes(0); + expect(amplifyTerminalMocked.mock.instances[0].getLastHeight).toHaveBeenCalledTimes(0); + expect(amplifyTerminalMocked.mock.instances[0].newLine).toHaveBeenCalledTimes(0); + }); +}); + +describe('in TTY terminal', () => { + let spinner: AmplifySpinner; + beforeEach(() => { + jest.spyOn(AmplifyTerminal.prototype, 'isTTY').mockReturnValue(true); + spinner = new AmplifySpinner(); + }); + + afterEach(() => { + // always stop the spinner to clear internal timer. + spinner.stop(); + }); + + it('starts spinner renders initial message, and stops spinner', async () => { + const initialMessage = 'initial message'; + const intermediateMessage = 'intermediate message'; + const lastMessage = 'last message'; + spinner.start(initialMessage); + spinner.resetMessage(intermediateMessage); + // wait for default rate of 50ms plus small delta to let spinner render new message. + await new Promise((resolve) => setTimeout(resolve, 50 + 10)); + spinner.stop(lastMessage); + expect(amplifyTerminalMocked.mock.instances.length).toEqual(1); + expect(AmplifyTerminal).toHaveBeenCalledTimes(1); + expect(amplifyTerminalMocked.mock.instances[0].writeLines).toHaveBeenCalledTimes(3); + expect(amplifyTerminalMocked.mock.instances[0].writeLines).toHaveBeenCalledWith([{ color: '', renderString: `⠋ ${initialMessage}` }]); + expect(amplifyTerminalMocked.mock.instances[0].writeLines).toHaveBeenCalledWith([ + { color: '', renderString: `⠙ ${intermediateMessage}` }, + ]); + expect(amplifyTerminalMocked.mock.instances[0].writeLines).toHaveBeenCalledWith([{ color: 'green', renderString: lastMessage }]); + expect(amplifyTerminalMocked.mock.instances[0].cursor).toHaveBeenCalledTimes(2); + expect(amplifyTerminalMocked.mock.instances[0].cursor).toHaveBeenCalledWith(false); + expect(amplifyTerminalMocked.mock.instances[0].getLastHeight).toHaveBeenCalledTimes(0); + expect(amplifyTerminalMocked.mock.instances[0].newLine).toHaveBeenCalledTimes(0); + }); +}); diff --git a/packages/amplify-prompts/src/__tests__/stopwatch.test.ts b/packages/amplify-prompts/src/__tests__/stopwatch.test.ts index ec39a69ecff..76b24ca4b3f 100644 --- a/packages/amplify-prompts/src/__tests__/stopwatch.test.ts +++ b/packages/amplify-prompts/src/__tests__/stopwatch.test.ts @@ -4,14 +4,14 @@ describe('stopwatch test', () => { it('test stopwatch start and pause', async () => { const stopwatch = new Stopwatch(); stopwatch.start(); - await new Promise((resolve, __reject) => { + await new Promise((resolve) => { setTimeout(resolve, 300); }); stopwatch.pause(); expect(stopwatch.getElapsedMilliseconds()).toBeGreaterThanOrEqual(295); expect(stopwatch.getElapsedMilliseconds()).toBeLessThan(350); stopwatch.start(); - await new Promise((resolve, __reject) => { + await new Promise((resolve) => { setTimeout(resolve, 300); }); stopwatch.pause(); diff --git a/packages/amplify-prompts/src/__tests__/validators.test.ts b/packages/amplify-prompts/src/__tests__/validators.test.ts index 415bad4e71d..8ad15b775ea 100644 --- a/packages/amplify-prompts/src/__tests__/validators.test.ts +++ b/packages/amplify-prompts/src/__tests__/validators.test.ts @@ -66,45 +66,41 @@ describe('minLength', () => { describe('and', () => { it('returns true if all validators return true', async () => { - expect(await and([(input) => true, (input) => true])('anything')).toBe(true); + expect(await and([() => true, () => true])('anything')).toBe(true); }); it('returns first error message', async () => { - expect(await and([(input) => true, (input) => 'first error', (input) => 'second error'])('anything')).toMatchInlineSnapshot( - `"first error"`, - ); + expect(await and([() => true, () => 'first error', () => 'second error'])('anything')).toMatchInlineSnapshot(`"first error"`); }); it('returns override message if any validators return error message', async () => { - expect( - await and([(input) => true, (input) => 'first error', (input) => 'second error'], 'custom error message')('anything'), - ).toMatchInlineSnapshot(`"custom error message"`); + expect(await and([() => true, () => 'first error', () => 'second error'], 'custom error message')('anything')).toMatchInlineSnapshot( + `"custom error message"`, + ); }); }); describe('or', () => { it('returns true if one validator returns true', async () => { - expect(await or([(input) => 'first error', (input) => true])('anything')).toBe(true); + expect(await or([() => 'first error', () => true])('anything')).toBe(true); }); it('returns last error message if all validators return error', async () => { - expect(await or([(input) => 'first error', (input) => 'second error'])('anything')).toMatchInlineSnapshot(`"second error"`); + expect(await or([() => 'first error', () => 'second error'])('anything')).toMatchInlineSnapshot(`"second error"`); }); it('returns override error mmessage if all validators return error', async () => { - expect(await or([(input) => 'first error', (input) => 'second error'], 'custom message')('anything')).toMatchInlineSnapshot( - `"custom message"`, - ); + expect(await or([() => 'first error', () => 'second error'], 'custom message')('anything')).toMatchInlineSnapshot(`"custom message"`); }); }); describe('not', () => { it('returns error message if validator returns true', async () => { - expect(await not((input) => true, 'custom error message')('anything')).toMatchInlineSnapshot(`"custom error message"`); + expect(await not(() => true, 'custom error message')('anything')).toMatchInlineSnapshot(`"custom error message"`); }); it('returns true when validator returns error message', async () => { - expect(await not((input) => 'error message', 'other message')('anything')).toBe(true); + expect(await not(() => 'error message', 'other message')('anything')).toBe(true); }); }); diff --git a/packages/amplify-prompts/src/progressbars/spinner.ts b/packages/amplify-prompts/src/progressbars/spinner.ts index eafdd57a75d..1efd4d06957 100644 --- a/packages/amplify-prompts/src/progressbars/spinner.ts +++ b/packages/amplify-prompts/src/progressbars/spinner.ts @@ -28,7 +28,7 @@ export class AmplifySpinner { * Render function */ private render(): void { - if (!this.terminal) { + if (!this.terminal || !this.terminal.isTTY()) { return; } if (this.timer) { @@ -52,6 +52,9 @@ export class AmplifySpinner { if (!this.terminal) { this.terminal = new AmplifyTerminal(); } + if (!this.terminal.isTTY()) { + return; + } this.prefixText = text ? text.replace('\n', '') : this.prefixText; this.terminal.cursor(false); this.render(); @@ -61,7 +64,7 @@ export class AmplifySpinner { * Reset spinner message */ resetMessage(text: string | null): void { - if (!this.terminal) { + if (!this.terminal || !this.terminal.isTTY()) { this.start(text); return; } @@ -75,16 +78,18 @@ export class AmplifySpinner { if (!this.terminal) { return; } - const lines: TerminalLine[] = [ - { - renderString: text || '', - color: success ? 'green' : 'red', - }, - ]; + if (this.terminal.isTTY()) { + const lines: TerminalLine[] = [ + { + renderString: text || '', + color: success ? 'green' : 'red', + }, + ]; - clearTimeout(this.timer); - this.terminal.writeLines(lines); - this.terminal.cursor(true); + clearTimeout(this.timer); + this.terminal.writeLines(lines); + this.terminal.cursor(true); + } this.terminal = null; } } diff --git a/packages/amplify-provider-awscloudformation/API.md b/packages/amplify-provider-awscloudformation/API.md index 73563b94faf..c87dd22534a 100644 --- a/packages/amplify-provider-awscloudformation/API.md +++ b/packages/amplify-provider-awscloudformation/API.md @@ -23,6 +23,11 @@ export type DownloadHandler = (keys: string[]) => Promise; // @public (undocumented) export function formUserAgentParam(context: any, userAgentAction: any): string; +// Warning: (ae-forgotten-export) The symbol "CognitoUserPoolClientProvider" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +export function getConfiguredCognitoIdentityProviderClient(context: any): Promise; + // Warning: (ae-forgotten-export) The symbol "LocationService" needs to be exported by the entry point index.d.ts // // @public (undocumented) diff --git a/packages/amplify-provider-awscloudformation/CHANGELOG.md b/packages/amplify-provider-awscloudformation/CHANGELOG.md index 605f95a233c..8ac3989b5bc 100644 --- a/packages/amplify-provider-awscloudformation/CHANGELOG.md +++ b/packages/amplify-provider-awscloudformation/CHANGELOG.md @@ -3,6 +3,383 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [8.11.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.11.2...@aws-amplify/amplify-provider-awscloudformation@8.11.3) (2025-01-30) + +**Note:** Version bump only for package @aws-amplify/amplify-provider-awscloudformation + + + + + +## [8.11.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.11.1...@aws-amplify/amplify-provider-awscloudformation@8.11.2) (2025-01-16) + + +### Reverts + +* Revert "chore: cateogry-api + codegen version bump (#14048)" (#14049) ([5a0cdbf](https://github.com/aws-amplify/amplify-cli/commit/5a0cdbfa46856da320323923a4336d6ba60d82b9)), closes [#14048](https://github.com/aws-amplify/amplify-cli/issues/14048) [#14049](https://github.com/aws-amplify/amplify-cli/issues/14049) + + + + + +## [8.11.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.11.0...@aws-amplify/amplify-provider-awscloudformation@8.11.1) (2024-11-18) + +**Note:** Version bump only for package @aws-amplify/amplify-provider-awscloudformation + + + + + +# [8.11.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.10.13...@aws-amplify/amplify-provider-awscloudformation@8.11.0) (2024-10-05) + + +### Features + +* add init prompts for Gen2 ([#13849](https://github.com/aws-amplify/amplify-cli/issues/13849)) ([7ab8fae](https://github.com/aws-amplify/amplify-cli/commit/7ab8faef1e2ce0c15db783d236aeee9d312ec135)) + + + + + +## [8.10.13](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.10.12...@aws-amplify/amplify-provider-awscloudformation@8.10.13) (2024-08-06) + + +### Bug Fixes + +* update awaiter s3 key ([#13872](https://github.com/aws-amplify/amplify-cli/issues/13872)) ([dacfab7](https://github.com/aws-amplify/amplify-cli/commit/dacfab73fcc53586b873f99e149d44c390b2d76f)) + + + + + +## [8.10.12](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.10.11...@aws-amplify/amplify-provider-awscloudformation@8.10.12) (2024-08-02) + + +### Bug Fixes + +* enforce ssl on s3 deployment bucket ([#13857](https://github.com/aws-amplify/amplify-cli/issues/13857)) ([5ec5d4d](https://github.com/aws-amplify/amplify-cli/commit/5ec5d4d6678a345346aad2f4a4fe5ba5b518b08c)) + + + + + +## [8.10.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.10.10...@aws-amplify/amplify-provider-awscloudformation@8.10.11) (2024-06-27) + +**Note:** Version bump only for package @aws-amplify/amplify-provider-awscloudformation + + + + + +## [8.10.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.10.9...@aws-amplify/amplify-provider-awscloudformation@8.10.10) (2024-06-20) + +**Note:** Version bump only for package @aws-amplify/amplify-provider-awscloudformation + + + + + +## [8.10.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.10.8...@aws-amplify/amplify-provider-awscloudformation@8.10.9) (2024-06-06) + + +### Bug Fixes + +* skip types in current cloud backend ([#13803](https://github.com/aws-amplify/amplify-cli/issues/13803)) ([81ce57a](https://github.com/aws-amplify/amplify-cli/commit/81ce57afdfe73ce951143e6b20607bb3c77b43ae)) + + + + + +## [8.10.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.10.7...@aws-amplify/amplify-provider-awscloudformation@8.10.8) (2024-05-24) + + +### Bug Fixes + +* don't create symlinks after extracting zip ([#13791](https://github.com/aws-amplify/amplify-cli/issues/13791)) ([08f358d](https://github.com/aws-amplify/amplify-cli/commit/08f358da33163fa70930ae6ef900e1d018672ef1)) + + + + + +## [8.10.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.10.6...@aws-amplify/amplify-provider-awscloudformation@8.10.7) (2024-05-07) + +**Note:** Version bump only for package @aws-amplify/amplify-provider-awscloudformation + + + + + +## [8.10.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.10.5...@aws-amplify/amplify-provider-awscloudformation@8.10.6) (2024-04-18) + + +### Bug Fixes + +* reduce memory pressure while uploading files ([#13718](https://github.com/aws-amplify/amplify-cli/issues/13718)) ([2691a0a](https://github.com/aws-amplify/amplify-cli/commit/2691a0a08cb23054197fdbc958a9104f4e7f12c5)) + + + + + +## [8.10.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.10.4...@aws-amplify/amplify-provider-awscloudformation@8.10.5) (2024-04-15) + + +### Bug Fixes + +* upgrade Go runtime and fix e2e ([#13671](https://github.com/aws-amplify/amplify-cli/issues/13671)) ([395f717](https://github.com/aws-amplify/amplify-cli/commit/395f717cf52e7beef76f00ee08d37877138b0c30)) + + + + + +## [8.10.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.10.3...@aws-amplify/amplify-provider-awscloudformation@8.10.4) (2024-03-29) + +**Note:** Version bump only for package @aws-amplify/amplify-provider-awscloudformation + + + + + +## [8.10.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.10.2...@aws-amplify/amplify-provider-awscloudformation@8.10.3) (2024-03-06) + + +### Bug Fixes + +* s3 bucket name randomizer ([#13510](https://github.com/aws-amplify/amplify-cli/issues/13510)) ([9034f86](https://github.com/aws-amplify/amplify-cli/commit/9034f865172fbc754a37c00783490ea972e02410)) +* use s3.upload instead of s3.putObject ([#13493](https://github.com/aws-amplify/amplify-cli/issues/13493)) ([413fcea](https://github.com/aws-amplify/amplify-cli/commit/413fcea115ab202096f69ffb1f58fe91ea242027)) + + + + + +## [8.10.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.10.1...@aws-amplify/amplify-provider-awscloudformation@8.10.2) (2024-01-10) + + +### Bug Fixes + +* set policy effect deny when removing auth ([#13523](https://github.com/aws-amplify/amplify-cli/issues/13523)) ([73b08dc](https://github.com/aws-amplify/amplify-cli/commit/73b08dc424db2fb60399c5343c314e02e849d4a1)) + + + + + +## [8.10.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.10.0...@aws-amplify/amplify-provider-awscloudformation@8.10.1) (2023-12-16) + +**Note:** Version bump only for package @aws-amplify/amplify-provider-awscloudformation + + + + + +# [8.10.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.9.2...@aws-amplify/amplify-provider-awscloudformation@8.10.0) (2023-12-11) + + +### Features + +* bump data dependencies to launch RDS feature ([#13409](https://github.com/aws-amplify/amplify-cli/issues/13409)) ([7fbf29f](https://github.com/aws-amplify/amplify-cli/commit/7fbf29f56eb7335d20de0b5526fbed7795a2af09)) + + + + + +## [8.9.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.9.0...@aws-amplify/amplify-provider-awscloudformation@8.9.2) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [8.9.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.9.0...@aws-amplify/amplify-provider-awscloudformation@8.9.1) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-provider-awscloudformation + + + + + +# [8.9.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.8.0...@aws-amplify/amplify-provider-awscloudformation@8.9.0) (2023-11-08) + + +### Bug Fixes + +* parse cognito pools with service role ([#13365](https://github.com/aws-amplify/amplify-cli/issues/13365)) ([1513938](https://github.com/aws-amplify/amplify-cli/commit/1513938ed2808c407853daf291912c0e644158c9)) + + +### Features + +* **cli:** ignore node_modules in glob to drastically increase performance in Node environments ([#13305](https://github.com/aws-amplify/amplify-cli/issues/13305)) ([5cc1b55](https://github.com/aws-amplify/amplify-cli/commit/5cc1b556d8081421dc68ee264dac02d5660ffee7)) + + + + + +# [8.8.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.7.0...@aws-amplify/amplify-provider-awscloudformation@8.8.0) (2023-10-12) + + +### Features + +* codegen support for Amplify Android Lazy loading and custom selection set ([8f9d855](https://github.com/aws-amplify/amplify-cli/commit/8f9d855a6eb74a8d0452b2878a65ff5222ac61ee)) + + + + + +# [8.7.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.6.2...@aws-amplify/amplify-provider-awscloudformation@8.7.0) (2023-10-05) + + +### Features + +* **amplify-util-uibuilder:** amplify js backwards compatibility ([#13288](https://github.com/aws-amplify/amplify-cli/issues/13288)) ([2db3e18](https://github.com/aws-amplify/amplify-cli/commit/2db3e181cf06954085eb8fade0b26162672327db)) + + + + + +## [8.6.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.6.1...@aws-amplify/amplify-provider-awscloudformation@8.6.2) (2023-10-03) + + +### Bug Fixes + +* update api category and codegen to capture high-priority bug-fixes ([3836b90](https://github.com/aws-amplify/amplify-cli/commit/3836b90b3f9ccd654d9c1b61a4b83c9c4712290c)) + + + + + +## [8.6.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.6.0...@aws-amplify/amplify-provider-awscloudformation@8.6.1) (2023-09-27) + +**Note:** Version bump only for package @aws-amplify/amplify-provider-awscloudformation + + + + + +# [8.6.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.5.1...@aws-amplify/amplify-provider-awscloudformation@8.6.0) (2023-09-22) + + +### Features + +* add flag to disable gsi limit check in iterative deployments ([#13172](https://github.com/aws-amplify/amplify-cli/issues/13172)) ([8b9951f](https://github.com/aws-amplify/amplify-cli/commit/8b9951f16f700a4f381aba5330ee0b4cffef1108)) +* support codegen and modelgen commands in non-amplify directories ([#13245](https://github.com/aws-amplify/amplify-cli/issues/13245)) ([85dd5cb](https://github.com/aws-amplify/amplify-cli/commit/85dd5cb6b33d8df41e35c2cbcf3b3b0e390b1af0)) + + + + + +## [8.5.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.5.0...@aws-amplify/amplify-provider-awscloudformation@8.5.1) (2023-08-31) + + +### Bug Fixes + +* handle profile load in cognito client factory ([#13143](https://github.com/aws-amplify/amplify-cli/issues/13143)) ([fb8a3cc](https://github.com/aws-amplify/amplify-cli/commit/fb8a3cc1a2a910575b957e47f2726a6c9134dfe9)) + + + + + +# [8.5.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.4.0...@aws-amplify/amplify-provider-awscloudformation@8.5.0) (2023-08-17) + + +### Features + +* generate components using graphql ([1568581](https://github.com/aws-amplify/amplify-cli/commit/15685810460881aa71e88724398b9be05ba53781)) + + + + + +# [8.4.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.3.3...@aws-amplify/amplify-provider-awscloudformation@8.4.0) (2023-08-09) + + +### Bug Fixes + +* remove vm2 ([#12989](https://github.com/aws-amplify/amplify-cli/issues/12989)) ([7bc0b56](https://github.com/aws-amplify/amplify-cli/commit/7bc0b5654a585104a537c1a3f9615bd672435b58)) +* surface override build error if scripting features are disabled ([#13013](https://github.com/aws-amplify/amplify-cli/issues/13013)) ([fa80249](https://github.com/aws-amplify/amplify-cli/commit/fa802491f8767f50dc3636e190fb70eb492fa969)) +* upgrade proxy-agent to ^6.3.0 to remove vm2 deps ([#13012](https://github.com/aws-amplify/amplify-cli/issues/13012)) ([989ec35](https://github.com/aws-amplify/amplify-cli/commit/989ec35be4dfd2bea19ea82bbe317f212729950f)) + + +### Features + +* replace oauth and userpoolclient lambdas with cfn and sdk calls ([#12935](https://github.com/aws-amplify/amplify-cli/issues/12935)) ([b3ab512](https://github.com/aws-amplify/amplify-cli/commit/b3ab5125f2ec405afd1af9d2f77b8683d5914010)) + + + + + +## [8.3.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.3.2...@aws-amplify/amplify-provider-awscloudformation@8.3.3) (2023-07-28) + + +### Bug Fixes + +* surface override build error if scripting features are disabled ([#13013](https://github.com/aws-amplify/amplify-cli/issues/13013)) ([#13023](https://github.com/aws-amplify/amplify-cli/issues/13023)) ([9e99800](https://github.com/aws-amplify/amplify-cli/commit/9e998008c6aef13ee50e6ce88cc78d8e9367b66a)) + + + + + +## [8.3.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.3.1...@aws-amplify/amplify-provider-awscloudformation@8.3.2) (2023-07-27) + + +### Bug Fixes + +* parsing arn with multiple slashes when importing auth ([#13009](https://github.com/aws-amplify/amplify-cli/issues/13009)) ([455c514](https://github.com/aws-amplify/amplify-cli/commit/455c514fd9d29fcec37bc9a4de9c96fef80883b5)) + + + + + +## [8.3.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.3.0...@aws-amplify/amplify-provider-awscloudformation@8.3.1) (2023-07-24) + +**Note:** Version bump only for package @aws-amplify/amplify-provider-awscloudformation + + + + + +# [8.3.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.2.5...@aws-amplify/amplify-provider-awscloudformation@8.3.0) (2023-07-20) + + +### Bug Fixes + +* avoid empty and string rejects ([#12818](https://github.com/aws-amplify/amplify-cli/issues/12818)) ([911faa7](https://github.com/aws-amplify/amplify-cli/commit/911faa767db594c516d1c3b65ee4369ad207f4f4)) +* fetch deployment key from current-cloud-backend ([#12687](https://github.com/aws-amplify/amplify-cli/issues/12687)) ([af0bf82](https://github.com/aws-amplify/amplify-cli/commit/af0bf82d18b3a30d4cdac2cdd14b8534e0ffff1d)) +* return login token error to studio ([#12726](https://github.com/aws-amplify/amplify-cli/issues/12726)) ([8e8f4a2](https://github.com/aws-amplify/amplify-cli/commit/8e8f4a283f11ee615fc021975c9f3db91ab0db66)) +* warn about multiple schema files in admin modelgen task ([#12673](https://github.com/aws-amplify/amplify-cli/issues/12673)) ([4bc01ea](https://github.com/aws-amplify/amplify-cli/commit/4bc01eaa650826985ced1e8830eb216f64b630df)) + + +### Features + +* lambda support for yarn2/3 and pnpm package managers ([#12750](https://github.com/aws-amplify/amplify-cli/issues/12750)) ([fd18195](https://github.com/aws-amplify/amplify-cli/commit/fd181952672efb0479ca6955c0c7a45fe248d1b1)) +* uibuilder codegen service ([#12896](https://github.com/aws-amplify/amplify-cli/issues/12896)) ([3fe2f98](https://github.com/aws-amplify/amplify-cli/commit/3fe2f98a99a9daf22efccb23a031882ea2be899b)) + + + + + +## [8.2.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.2.4...@aws-amplify/amplify-provider-awscloudformation@8.2.5) (2023-06-16) + +**Note:** Version bump only for package @aws-amplify/amplify-provider-awscloudformation + + + + + +## [8.2.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.2.3...@aws-amplify/amplify-provider-awscloudformation@8.2.4) (2023-06-13) + + +### Bug Fixes + +* deploy category resources when calling amplify push ([#12587](https://github.com/aws-amplify/amplify-cli/issues/12587)) ([260723c](https://github.com/aws-amplify/amplify-cli/commit/260723cb67432308dd35a4ddbedacfbbc69c6c81)) +* remove logs from update idp lambda ([#12749](https://github.com/aws-amplify/amplify-cli/issues/12749)) ([adc5b22](https://github.com/aws-amplify/amplify-cli/commit/adc5b227c9b03ea407472a258014839b2fd400e2)) +* remove parameters when resource is deleted or unlinked ([#12544](https://github.com/aws-amplify/amplify-cli/issues/12544)) ([f78fb68](https://github.com/aws-amplify/amplify-cli/commit/f78fb686f4719ef8a487251ded8bf01b9df29dbd)) + + + + + ## [8.2.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-provider-awscloudformation@8.2.1...@aws-amplify/amplify-provider-awscloudformation@8.2.3) (2023-05-25) diff --git a/packages/amplify-provider-awscloudformation/package.json b/packages/amplify-provider-awscloudformation/package.json index 05477cf6f1f..7f812be7ec6 100644 --- a/packages/amplify-provider-awscloudformation/package.json +++ b/packages/amplify-provider-awscloudformation/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-provider-awscloudformation", - "version": "8.2.3", + "version": "8.11.3", "description": "AWS CloudFormation Provider", "repository": { "type": "git", @@ -28,19 +28,19 @@ "extract-api": "ts-node ../../scripts/extract-api.ts" }, "dependencies": { - "@aws-amplify/amplify-category-custom": "3.0.8", - "@aws-amplify/amplify-cli-core": "4.0.8", - "@aws-amplify/amplify-cli-logger": "1.3.2", - "@aws-amplify/amplify-environment-parameters": "1.6.3", - "@aws-amplify/amplify-prompts": "2.7.0", - "@aws-amplify/amplify-util-import": "2.6.0", - "@aws-amplify/cli-extensibility-helper": "3.0.8", - "@aws-amplify/graphql-transformer-core": "^1.3.2", - "@aws-amplify/graphql-transformer-interfaces": "^2.2.1", - "amplify-codegen": "^4.1.1", + "@aws-amplify/amplify-category-custom": "3.1.25", + "@aws-amplify/amplify-cli-core": "4.3.11", + "@aws-amplify/amplify-cli-logger": "1.3.8", + "@aws-amplify/amplify-environment-parameters": "1.9.16", + "@aws-amplify/amplify-prompts": "2.8.6", + "@aws-amplify/amplify-util-import": "2.8.3", + "@aws-amplify/cli-extensibility-helper": "3.0.35", + "@aws-amplify/graphql-transformer-core": "^2.9.4", + "@aws-amplify/graphql-transformer-interfaces": "^3.10.2", + "amplify-codegen": "^4.10.2", "archiver": "^5.3.0", - "aws-cdk-lib": "~2.68.0", - "aws-sdk": "^2.1354.0", + "aws-cdk-lib": "~2.177.0", + "aws-sdk": "^2.1464.0", "bottleneck": "2.19.5", "chalk": "^4.1.1", "cloudform-types": "^4.2.0", @@ -48,38 +48,36 @@ "constructs": "^10.0.5", "cors": "^2.8.5", "deep-diff": "^1.0.2", - "extract-zip": "^2.0.1", "folder-hash": "^4.0.2", "fs-extra": "^8.1.0", "glob": "^7.2.0", "graphql": "^15.5.0", - "graphql-transformer-core": "^8.1.2", + "graphql-transformer-core": "^8.2.13", "ignore": "^5.2.0", "ini": "^1.3.5", "inquirer": "^7.3.3", "is-wsl": "^2.2.0", - "jose": "^4.3.7", + "jose": "^4.15.5", "lodash": "^4.17.21", "lodash.throttle": "^4.1.1", - "moment": "^2.24.0", "netmask": "^2.0.2", "node-fetch": "^2.6.7", "ora": "^4.0.3", "promise-sequential": "^1.1.1", - "proxy-agent": "^5.0.0", + "proxy-agent": "^6.3.0", "rimraf": "^3.0.0", - "vm2": "^3.9.19", "xstate": "^4.14.0" }, "devDependencies": { - "@aws-amplify/graphql-transformer-interfaces": "^2.2.1", + "@aws-amplify/graphql-transformer-interfaces": "^3.10.2", "@types/columnify": "^1.5.0", "@types/deep-diff": "^1.0.0", "@types/folder-hash": "^4.0.1", "@types/lodash.throttle": "^4.1.6", - "@types/node": "^12.12.6", + "@types/node": "^18.16.0", "@types/uuid": "^8.0.0", - "jest": "^29.5.0" + "jest": "^29.5.0", + "typescript": "^4.9.5" }, "jest": { "collectCoverageFrom": [ diff --git a/packages/amplify-provider-awscloudformation/resources/custom-resource-pipeline-awaiter-18.zip b/packages/amplify-provider-awscloudformation/resources/custom-resource-pipeline-awaiter-18.zip new file mode 100644 index 00000000000..ec69ecd0e06 Binary files /dev/null and b/packages/amplify-provider-awscloudformation/resources/custom-resource-pipeline-awaiter-18.zip differ diff --git a/packages/amplify-provider-awscloudformation/resources/custom-resource-pipeline-awaiter.zip b/packages/amplify-provider-awscloudformation/resources/custom-resource-pipeline-awaiter.zip deleted file mode 100644 index 69382092167..00000000000 Binary files a/packages/amplify-provider-awscloudformation/resources/custom-resource-pipeline-awaiter.zip and /dev/null differ diff --git a/packages/amplify-provider-awscloudformation/resources/rootStackTemplate.json b/packages/amplify-provider-awscloudformation/resources/rootStackTemplate.json index 9cffcbd2436..824e122dd48 100644 --- a/packages/amplify-provider-awscloudformation/resources/rootStackTemplate.json +++ b/packages/amplify-provider-awscloudformation/resources/rootStackTemplate.json @@ -26,6 +26,53 @@ } } }, + "DeploymentBucketBlockHTTP": { + "Type": "AWS::S3::BucketPolicy", + "Properties": { + "Bucket": { + "Ref": "DeploymentBucketName" + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Effect": "Deny", + "Principal": "*", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "DeploymentBucketName" + }, + "/*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "DeploymentBucketName" + } + ] + ] + } + ], + "Condition": { + "Bool": { + "aws:SecureTransport": false + } + } + } + ] + } + } + }, "AuthRole": { "Type": "AWS::IAM::Role", "Properties": { diff --git a/packages/amplify-provider-awscloudformation/resources/update-idp-roles-cfn.json b/packages/amplify-provider-awscloudformation/resources/update-idp-roles-cfn.json index a17c761bc52..ebe7d192dbf 100644 --- a/packages/amplify-provider-awscloudformation/resources/update-idp-roles-cfn.json +++ b/packages/amplify-provider-awscloudformation/resources/update-idp-roles-cfn.json @@ -47,6 +47,8 @@ " try {", " delete authParamsJson.Statement[0].Condition;", " delete unauthParamsJson.Statement[0].Condition;", + " authParamsJson.Statement[0].Effect = 'Deny'", + " unauthParamsJson.Statement[0].Effect = 'Deny'", " let authParams = {PolicyDocument: JSON.stringify(authParamsJson), RoleName: authRoleName};", " let unauthParams = {PolicyDocument: JSON.stringify(unauthParamsJson), RoleName: unauthRoleName};", " const iam = new IAMClient({region: event.ResourceProperties.region});", diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/admin-modelgen.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/admin-modelgen.test.ts index 7f16fee13a4..303c80de414 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/admin-modelgen.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/admin-modelgen.test.ts @@ -2,12 +2,13 @@ import { $TSContext, stateManager, pathManager } from '@aws-amplify/amplify-cli- import * as fs from 'fs-extra'; import { adminModelgen } from '../admin-modelgen'; import { S3 } from '../aws-utils/aws-s3'; +import { printer } from '@aws-amplify/amplify-prompts'; jest.mock('fs-extra'); jest.mock('../aws-utils/aws-s3'); jest.mock('@aws-amplify/amplify-cli-core'); jest.mock('graphql-transformer-core'); -jest.mock('../utils/admin-helpers'); +jest.mock('@aws-amplify/amplify-prompts'); const fsMock = fs as jest.Mocked; const stateManagerMock = stateManager as jest.Mocked; @@ -35,6 +36,10 @@ fsMock.createWriteStream.mockReturnValue({ }, } as unknown as fs.WriteStream); fsMock.createReadStream.mockImplementation((filePath) => `mock body of ${filePath}` as unknown as fs.ReadStream); +jest.mock('../utils/admin-helpers', () => ({ + ...jest.requireActual('../utils/admin-helpers'), + isAmplifyAdminApp: jest.fn().mockResolvedValue({ isAdminApp: true }), +})); const s3FactoryMock = S3 as jest.Mocked; @@ -60,65 +65,90 @@ const invokePluginMock = jest.fn(); let contextStub: $TSContext; -beforeEach(() => { - jest.clearAllMocks(); - contextStub = { - amplify: { - invokePluginMethod: invokePluginMock, - }, - } as unknown as $TSContext; -}); - -it('invokes codegen functions and writes assets to S3', async () => { - await adminModelgen(contextStub, resources); - - expect(invokePluginMock.mock.calls.length).toBe(2); - expect(invokePluginMock.mock.calls[0][3]).toBe('generateModels'); - expect(invokePluginMock.mock.calls[1][3]).toBe('generateModelIntrospection'); - expect(s3Mock.uploadFile.mock.calls).toMatchInlineSnapshot(` -[ - [ - { - "Body": "mock body of mock/resource/dir/path/schema.graphql", - "Key": "models/testApiName/schema.graphql", - }, - false, - ], - [ - { - "Body": "mock body of mock/project/root/amplify-codegen-temp/models/schema.js", - "Key": "models/testApiName/schema.js", - }, - false, - ], - [ - { - "Body": "mock body of mock/project/root/amplify-codegen-temp/model-introspection.json", - "Key": "models/testApiName/modelIntrospection.json", - }, - false, - ], -] -`); -}); - -it('resets js config on error', async () => { - invokePluginMock.mockRejectedValue(new Error('test error')); - await expect(() => adminModelgen(contextStub, resources)).rejects.toThrowErrorMatchingInlineSnapshot(`"test error"`); - expect(stateManagerMock.setProjectConfig.mock.calls.length).toBe(2); - expect(stateManagerMock.setProjectConfig.mock.calls[1][1]).toBe(originalProjectConfig); -}); - -it('resets stdout on error', async () => { - const initialStdoutWriter = process.stdout.write; - invokePluginMock.mockRejectedValue(new Error('test error')); - await expect(() => adminModelgen(contextStub, resources)).rejects.toThrowErrorMatchingInlineSnapshot(`"test error"`); - expect(process.stdout.write).toBe(initialStdoutWriter); +describe('project with single schema file that exists', () => { + beforeEach(() => { + jest.clearAllMocks(); + contextStub = { + amplify: { + invokePluginMethod: invokePluginMock, + }, + } as unknown as $TSContext; + fsMock.existsSync.mockReturnValue(true); + }); + + it('invokes codegen functions and writes assets to S3', async () => { + await adminModelgen(contextStub, resources); + + expect(invokePluginMock.mock.calls.length).toBe(2); + expect(invokePluginMock.mock.calls[0][3]).toBe('generateModels'); + expect(invokePluginMock.mock.calls[1][3]).toBe('generateModelIntrospection'); + expect(s3Mock.uploadFile.mock.calls).toMatchInlineSnapshot(` + [ + [ + { + "Body": "mock body of mock/resource/dir/path/schema.graphql", + "Key": "models/testApiName/schema.graphql", + }, + false, + ], + [ + { + "Body": "mock body of mock/project/root/amplify-codegen-temp/models/schema.js", + "Key": "models/testApiName/schema.js", + }, + false, + ], + [ + { + "Body": "mock body of mock/project/root/amplify-codegen-temp/model-introspection.json", + "Key": "models/testApiName/modelIntrospection.json", + }, + false, + ], + ] + `); + }); + + it('resets js config on error', async () => { + invokePluginMock.mockRejectedValue(new Error('test error')); + await expect(() => adminModelgen(contextStub, resources)).rejects.toThrowErrorMatchingInlineSnapshot(`"test error"`); + expect(stateManagerMock.setProjectConfig.mock.calls.length).toBe(2); + expect(stateManagerMock.setProjectConfig.mock.calls[1][1]).toBe(originalProjectConfig); + }); + + it('resets stdout on error', async () => { + const initialStdoutWriter = process.stdout.write; + invokePluginMock.mockRejectedValue(new Error('test error')); + await expect(() => adminModelgen(contextStub, resources)).rejects.toThrowErrorMatchingInlineSnapshot(`"test error"`); + expect(process.stdout.write).toBe(initialStdoutWriter); + }); + + it('removes temp dir on error', async () => { + invokePluginMock.mockRejectedValue(new Error('test error')); + await expect(adminModelgen(contextStub, resources)).rejects.toThrowErrorMatchingInlineSnapshot(`"test error"`); + expect(fsMock.remove.mock.calls.length).toBe(1); + expect(fsMock.remove.mock.calls[0][0]).toMatchInlineSnapshot(`"mock/project/root/amplify-codegen-temp"`); + }); }); -it('removes temp dir on error', async () => { - invokePluginMock.mockRejectedValue(new Error('test error')); - await expect(adminModelgen(contextStub, resources)).rejects.toThrowErrorMatchingInlineSnapshot(`"test error"`); - expect(fsMock.remove.mock.calls.length).toBe(1); - expect(fsMock.remove.mock.calls[0][0]).toMatchInlineSnapshot(`"mock/project/root/amplify-codegen-temp"`); +describe('studio enabled project with multiple schema files or non-existent single schema file', () => { + beforeEach(() => { + jest.clearAllMocks(); + contextStub = { + amplify: { + invokePluginMethod: invokePluginMock, + }, + } as unknown as $TSContext; + fsMock.existsSync.mockReturnValue(false); + }); + + it('early returns and throws appropriate warning for a studio app', async () => { + await adminModelgen(contextStub, resources); + + expect(invokePluginMock.mock.calls.length).toBe(0); + expect(s3Mock.uploadFile.mock.calls.length).toBe(0); + expect(printer.warn).toBeCalledWith( + `Could not find the GraphQL schema file at \"mock/resource/dir/path/schema.graphql\". Amplify Studio's schema editor might not work as intended if you're using multiple schema files.`, + ); + }); }); diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/aws-utils/IdentityPoolService.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/aws-utils/IdentityPoolService.test.ts new file mode 100644 index 00000000000..dc53d58abef --- /dev/null +++ b/packages/amplify-provider-awscloudformation/src/__tests__/aws-utils/IdentityPoolService.test.ts @@ -0,0 +1,84 @@ +import { $TSContext } from '@aws-amplify/amplify-cli-core'; +import { createIdentityPoolService } from '../../aws-utils/IdentityPoolService'; +import { loadConfiguration } from '../../configuration-manager'; + +let mockCognitoIdentityRoles = { + authenticated: 'arn:aws:iam::123456789012:role/service-role/my-auth-role', + unauthenticated: 'arn:aws:iam::123456789012:role/service-role/my-unauth-role', +}; + +const iamRoleNameRegex = /[\w+=,.@-]+/; + +jest.mock('aws-sdk', () => { + return { + CognitoIdentity: jest.fn(() => { + return { + config: {}, + getIdentityPoolRoles: jest.fn().mockImplementation(() => ({ + promise: async () => { + return { + Roles: mockCognitoIdentityRoles, + }; + }, + })), + }; + }), + }; +}); + +jest.mock('../../configuration-manager', () => { + return { + loadConfiguration: jest.fn().mockReturnValue({}) as jest.MockedFunction, + }; +}); + +describe('IdentityPoolService', () => { + it('should correctly parse arn if it contains multiple forward slashes', async () => { + const idpService = await createIdentityPoolService({} as unknown as $TSContext, {}); + const identityPoolRoles = await idpService.getIdentityPoolRoles('mockIdpId'); + + // ensure role names match regex for IAM + // see: https://docs.aws.amazon.com/IAM/latest/APIReference/API_Role.html + expect(identityPoolRoles.authRoleName).toMatch(iamRoleNameRegex); + expect(identityPoolRoles.unauthRoleName).toMatch(iamRoleNameRegex); + + expect(identityPoolRoles).toEqual({ + authRoleArn: 'arn:aws:iam::123456789012:role/service-role/my-auth-role', + authRoleName: 'my-auth-role', + unauthRoleArn: 'arn:aws:iam::123456789012:role/service-role/my-unauth-role', + unauthRoleName: 'my-unauth-role', + }); + }); + + it('should correctly parse arn if it contains a single forward slash', async () => { + const idpService = await createIdentityPoolService({} as unknown as $TSContext, {}); + mockCognitoIdentityRoles = { + authenticated: 'arn:aws:iam::123456789012:role/my-auth-role', + unauthenticated: 'arn:aws:iam::123456789012:role/my-unauth-role', + }; + + const identityPoolRoles = await idpService.getIdentityPoolRoles('mockIdpId'); + + // ensure role names match regex for IAM + // see: https://docs.aws.amazon.com/IAM/latest/APIReference/API_Role.html + expect(identityPoolRoles.authRoleName).toMatch(iamRoleNameRegex); + expect(identityPoolRoles.unauthRoleName).toMatch(iamRoleNameRegex); + + expect(identityPoolRoles).toEqual({ + authRoleArn: 'arn:aws:iam::123456789012:role/my-auth-role', + authRoleName: 'my-auth-role', + unauthRoleArn: 'arn:aws:iam::123456789012:role/my-unauth-role', + unauthRoleName: 'my-unauth-role', + }); + }); + + it('should fail to parse arn if it contains no forward slash', async () => { + const idpService = await createIdentityPoolService({} as unknown as $TSContext, {}); + mockCognitoIdentityRoles = { + authenticated: 'arn:aws:iam::123456789012:my-auth-role', + unauthenticated: 'arn:aws:iam::123456789012:my-unauth-role', + }; + + await expect(idpService.getIdentityPoolRoles('mockIdpId')).rejects.toBeDefined(); + }); +}); diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/aws-utils/aws-cfn.test.js b/packages/amplify-provider-awscloudformation/src/__tests__/aws-utils/aws-cfn.test.js index 30c16f267be..85ab43f1fc2 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/aws-utils/aws-cfn.test.js +++ b/packages/amplify-provider-awscloudformation/src/__tests__/aws-utils/aws-cfn.test.js @@ -3,7 +3,6 @@ jest.mock('columnify'); const columnify = require('columnify'); -const { times } = require('lodash'); const { initializeProgressBars } = require('../../aws-utils/aws-cfn-progress-formatter'); const CloudFormation = require('../../aws-utils/aws-cfn'); diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/display-helpful-urls.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/display-helpful-urls.test.ts index f182c25726e..92805736d2a 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/display-helpful-urls.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/display-helpful-urls.test.ts @@ -41,7 +41,6 @@ describe('showSMSSandBoxWarning', () => { isInSandboxMode: jest.fn(), }; - let mockedSNSClass; const context = { print: { warning: jest.fn(), @@ -50,7 +49,7 @@ describe('showSMSSandBoxWarning', () => { beforeEach(() => { jest.resetAllMocks(); - mockedSNSClass = jest.spyOn(SNS, 'getInstance').mockResolvedValue(mockedSNSClientInstance as unknown as SNS); + jest.spyOn(SNS, 'getInstance').mockResolvedValue(mockedSNSClientInstance as unknown as SNS); }); describe('when API is missing in SDK', () => { @@ -99,6 +98,7 @@ describe('showSMSSandBoxWarning', () => { case 'COGNITO_SMS_SANDBOX_UPDATE_WARNING': return 'enabled'; } + return undefined; }); await showSMSSandboxWarning(context); diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/graphql-resource-manager/dynamodb-gsi-utils.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/graphql-resource-manager/dynamodb-gsi-utils.test.ts index d3a1b03ed4e..df80d88b13d 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/graphql-resource-manager/dynamodb-gsi-utils.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/graphql-resource-manager/dynamodb-gsi-utils.test.ts @@ -1,3 +1,4 @@ +import { DISABLE_GSI_LIMIT_CHECK_OPTION } from '../../graphql-resource-manager/amplify-graphql-resource-manager'; import * as gsiUtils from '../../graphql-resource-manager/dynamodb-gsi-helpers'; import { makeTableWithGSI } from './gsi-test-helpers'; @@ -109,7 +110,7 @@ describe('DynamoDB GSI Utils', () => { const tableWithNoGSI = makeTableWithGSI({ gsis: [], }); - const updatedTable = gsiUtils.addGSI(gsiItem, tableWithNoGSI); + const updatedTable = gsiUtils.addGSI(gsiItem, tableWithNoGSI, false); expect(updatedTable).toBeDefined(); expect(updatedTable).not.toEqual(tableWithNoGSI); expect(updatedTable.Properties.AttributeDefinitions).toEqual([ @@ -136,7 +137,7 @@ describe('DynamoDB GSI Utils', () => { }, ], }); - const updatedTable = gsiUtils.addGSI(gsiItem, tableWithGSI); + const updatedTable = gsiUtils.addGSI(gsiItem, tableWithGSI, false); expect(updatedTable).toBeDefined(); expect(updatedTable).not.toEqual(tableWithGSI); expect(updatedTable.Properties.AttributeDefinitions).toEqual([ @@ -170,7 +171,9 @@ describe('DynamoDB GSI Utils', () => { }, ], }); - expect(() => gsiUtils.addGSI(gsiItem, tableWithGSI)).toThrowError(`An index with name ${gsiItem.gsi.IndexName} already exists`); + expect(() => gsiUtils.addGSI(gsiItem, tableWithGSI, false)).toThrowError( + `An index with name ${gsiItem.gsi.IndexName} already exists`, + ); }); it(`should throw error when adding new index to a table with ${gsiUtils.MAX_GSI_PER_TABLE} GSIs`, () => { @@ -187,11 +190,28 @@ describe('DynamoDB GSI Utils', () => { ]; }, []), }); - expect(() => gsiUtils.addGSI(gsiItem, tableWithMaxGSI)).toThrowError( - `DynamoDB ${tableWithMaxGSI.Properties.TableName} can have max of ${gsiUtils.MAX_GSI_PER_TABLE} GSIs`, + expect(() => gsiUtils.addGSI(gsiItem, tableWithMaxGSI, false)).toThrowError( + `DynamoDB ${tableWithMaxGSI.Properties.TableName} can have max of ${gsiUtils.MAX_GSI_PER_TABLE} GSIs. To disable this check, use the --${DISABLE_GSI_LIMIT_CHECK_OPTION} option.`, ); }); + it(`should not throw error when adding new index to a table with ${gsiUtils.MAX_GSI_PER_TABLE} GSIs if disableGsiLimitcheck is configured`, () => { + const tableWithMaxGSI = makeTableWithGSI({ + gsis: new Array(gsiUtils.MAX_GSI_PER_TABLE).fill(0).reduce((acc, i, idx) => { + return [ + ...acc, + { + indexName: `byTitile${idx}AndId`, + attributes: { + hash: { name: `title${idx}` }, + }, + }, + ]; + }, []), + }); + expect(() => gsiUtils.addGSI(gsiItem, tableWithMaxGSI, true)).not.toThrowError(); + }); + it('should not have duplicate AttributeDefinitions', () => { const tableWithGSI = makeTableWithGSI({ gsis: [ @@ -210,7 +230,7 @@ describe('DynamoDB GSI Utils', () => { }, ], }); - const updatedTable = gsiUtils.addGSI(gsiItem, tableWithGSI); + const updatedTable = gsiUtils.addGSI(gsiItem, tableWithGSI, false); expect(updatedTable).toBeDefined(); expect(updatedTable).not.toEqual(tableWithGSI); expect(updatedTable.Properties.AttributeDefinitions).toEqual([ diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/initialize-env.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/initialize-env.test.ts index d16165af91f..ca58f46ac0b 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/initialize-env.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/initialize-env.test.ts @@ -20,8 +20,8 @@ describe('initialize environment', () => { it('throws AmplifyError if the deployment bucket does not exist', async () => { downloadZipMock.mockRejectedValueOnce({ code: 'NoSuchBucket' }); const actual = await expect(run(contextStub, {})).rejects; - actual.toBeInstanceOf(AmplifyException); - actual.toMatchInlineSnapshot( + await actual.toBeInstanceOf(AmplifyException); + await actual.toMatchInlineSnapshot( `[EnvironmentNotInitializedError: Could not find a deployment bucket for the specified backend environment. This environment may have been deleted.]`, ); }); diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/iterative-deployment/deployment-state-manager.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/iterative-deployment/deployment-state-manager.test.ts index 51e63e43515..88c01d3fdca 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/iterative-deployment/deployment-state-manager.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/iterative-deployment/deployment-state-manager.test.ts @@ -41,18 +41,18 @@ describe('deployment state manager', () => { const getInstanceSpy = jest.spyOn(S3, 'getInstance'); getInstanceSpy.mockReturnValue( - new Promise((resolve, __) => { + new Promise((resolve) => { resolve({ // eslint-disable-next-line uploadFile: async (s3Params: any, showSpinner: boolean): Promise => - new Promise((resolve, _) => { + new Promise((resolve) => { s3Files[s3Params.Key] = s3Params.Body; resolve(''); }), // eslint-disable-next-line getStringObjectFromBucket: async (bucketName: string, objectKey: string): Promise => - new Promise((resolve, _) => { + new Promise((resolve) => { resolve(s3Files[objectKey]); }), } as unknown as S3); diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/iterative-deployment/helper.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/iterative-deployment/helper.test.ts index 402c3d7445a..3203a14d7c2 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/iterative-deployment/helper.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/iterative-deployment/helper.test.ts @@ -75,56 +75,56 @@ describe('deployment helpers', () => { deployFn = jest.fn(); }); describe('deploy', () => { - it('should extract deploy section when the deploying', () => { + it('should extract deploy section when the deploying', async () => { const context: DeployMachineContext = { ...deploymentContext, currentIndex: 0, }; - helper.getDeploymentOperationHandler(deployFn)(context); + await helper.getDeploymentOperationHandler(deployFn)(context); expect(deployFn).toHaveBeenCalledWith(context.stacks[0].deployment); }); - it('should be an no-op if the current index is greater than the number of stacks', () => { + it('should be an no-op if the current index is greater than the number of stacks', async () => { const context: DeployMachineContext = { ...deploymentContext, currentIndex: 2, }; - helper.getDeploymentOperationHandler(deployFn)(context); + await helper.getDeploymentOperationHandler(deployFn)(context); expect(deployFn).not.toHaveBeenCalled(); }); - it('should be an no-op if the current index is less than 0', () => { + it('should be an no-op if the current index is less than 0', async () => { const context: DeployMachineContext = { ...deploymentContext, currentIndex: -1, }; - helper.getDeploymentOperationHandler(deployFn)(context); + await helper.getDeploymentOperationHandler(deployFn)(context); expect(deployFn).not.toHaveBeenCalled(); }); }); describe('rollback', () => { - it('should extract deploy section when the deploying', () => { + it('should extract deploy section when the deploying', async () => { const context: DeployMachineContext = { ...deploymentContext, currentIndex: 0, }; - helper.getRollbackOperationHandler(deployFn)(context); + await helper.getRollbackOperationHandler(deployFn)(context); expect(deployFn).toHaveBeenCalledWith(context.stacks[0].rollback); }); - it('should be an no-op if the current index is greater than the number of stacks', () => { + it('should be an no-op if the current index is greater than the number of stacks', async () => { const context: DeployMachineContext = { ...deploymentContext, currentIndex: 2, }; - helper.getRollbackOperationHandler(deployFn)(context); + await helper.getRollbackOperationHandler(deployFn)(context); expect(deployFn).not.toHaveBeenCalled(); }); - it('should be an no-op if the current index is less than 0', () => { + it('should be an no-op if the current index is less than 0', async () => { const context: DeployMachineContext = { ...deploymentContext, currentIndex: -1, }; - helper.getRollbackOperationHandler(deployFn)(context); + await helper.getRollbackOperationHandler(deployFn)(context); expect(deployFn).not.toHaveBeenCalled(); }); }); diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/iterative-deployment/stack-event-monitor.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/iterative-deployment/stack-event-monitor.test.ts index 77a41bf6b84..3e6917d9cfe 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/iterative-deployment/stack-event-monitor.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/iterative-deployment/stack-event-monitor.test.ts @@ -39,8 +39,8 @@ describe('StackEventMonitor', () => { }); }); - test('stop StackEventMonitor', () => { - monitor.stop(); + test('stop StackEventMonitor', async () => { + await monitor.stop(); expect(stackProgressPrinterStub.printerFn).toBeCalled(); expect(clearTimeout).toBeCalledTimes(1); diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/pre-push-cfn-processor/cfn-pre-processor.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/pre-push-cfn-processor/cfn-pre-processor.test.ts index e768493aa55..c40c24a9c7f 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/pre-push-cfn-processor/cfn-pre-processor.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/pre-push-cfn-processor/cfn-pre-processor.test.ts @@ -58,28 +58,28 @@ describe('preProcessCFNTemplate', () => { expect(newPath).toMatchInlineSnapshot(`"/project/amplify/backend/awscloudformation/build/cfn-template-name.json"`); }); - it('test writeCustonPolicies with Lambda function', () => { - writeCustomPoliciesToCFNTemplate('testLambdaResourceName', 'Lambda', '../dummypath', 'function'); + it('test writeCustonPolicies with Lambda function', async () => { + await writeCustomPoliciesToCFNTemplate('testLambdaResourceName', 'Lambda', '../dummypath', 'function'); expect(pathManager_mock.getResourceDirectoryPath).toBeCalledWith(undefined, 'function', 'testLambdaResourceName'); expect(readCFNTemplate_mock).toBeCalled(); }); - it('test writeCustonPolicies with LambdaLayer function', () => { - writeCustomPoliciesToCFNTemplate('testLambdaResourceName', 'LambdaLayer', '../dummypath', 'function'); + it('test writeCustonPolicies with LambdaLayer function', async () => { + await writeCustomPoliciesToCFNTemplate('testLambdaResourceName', 'LambdaLayer', '../dummypath', 'function'); expect(pathManager_mock.getResourceDirectoryPath).not.toBeCalled(); expect(readCFNTemplate_mock).not.toBeCalled(); }); - it('test writeCustonPolicies with Containers Api', () => { - writeCustomPoliciesToCFNTemplate('testApiResourceName', 'ElasticContainer', '../dummypath', 'api'); + it('test writeCustonPolicies with Containers Api', async () => { + await writeCustomPoliciesToCFNTemplate('testApiResourceName', 'ElasticContainer', '../dummypath', 'api'); expect(pathManager_mock.getResourceDirectoryPath).toBeCalledWith(undefined, 'api', 'testApiResourceName'); expect(readCFNTemplate_mock).toBeCalled(); }); - it('test writeCustonPolicies with Appsync', () => { + it('test writeCustonPolicies with Appsync', async () => { pathManager_mock.getResourceDirectoryPath.mockClear(); readCFNTemplate_mock.mockClear(); - writeCustomPoliciesToCFNTemplate('testApiResourceName', 'AppSync', '../dummypath', 'api'); + await writeCustomPoliciesToCFNTemplate('testApiResourceName', 'AppSync', '../dummypath', 'api'); expect(pathManager_mock.getResourceDirectoryPath).not.toBeCalled(); expect(readCFNTemplate_mock).not.toBeCalled(); }); diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/push-resources.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/push-resources.test.ts index c4d02226ca1..5f89c5399c2 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/push-resources.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/push-resources.test.ts @@ -30,7 +30,7 @@ glob_mock.sync.mockImplementation((pattern) => { }); const fs_mock = jest.mocked(fs); -fs_mock.lstatSync.mockImplementation((_path, _options) => { +fs_mock.lstatSync.mockImplementation(() => { return { isDirectory: jest.fn().mockReturnValue(true), } as unknown as fs.Stats; diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/resource-package/resource-export.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/resource-package/resource-export.test.ts index e4d92f0fbbd..1a40489851b 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/resource-package/resource-export.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/resource-package/resource-export.test.ts @@ -36,7 +36,7 @@ pathManager_mock.findProjectRoot = jest.fn().mockReturnValue('projectpath'); pathManager_mock.getBackendDirPath = jest.fn().mockReturnValue('backend'); const JSONUtilitiesMock = JSONUtilities as jest.Mocked; -JSONUtilitiesMock.stringify.mockImplementation((data, __) => JSON.stringify(data, null, 2)); +JSONUtilitiesMock.stringify.mockImplementation((data) => JSON.stringify(data, null, 2)); JSONUtilitiesMock.parse.mockImplementation((data) => JSON.parse(data)); JSONUtilitiesMock.readJson.mockImplementation((pathToJson: string) => { if (pathToJson.includes('function') && pathToJson.includes('amplifyexportestlayer5f16d693')) { @@ -52,6 +52,7 @@ JSONUtilitiesMock.readJson.mockImplementation((pathToJson: string) => { Parameters: {}, } as unknown as Template; } + return undefined; }); const readCFNTemplate_mock = readCFNTemplate as jest.MockedFunction; readCFNTemplate_mock.mockImplementation((path) => { @@ -75,12 +76,12 @@ readCFNTemplate_mock.mockImplementation((path) => { }); const buildOverrideDir_mock = buildOverrideDir as jest.MockedFunction; -buildOverrideDir_mock.mockImplementation(async (cwd: string, dest: string) => false); +buildOverrideDir_mock.mockImplementation(async () => false); jest.mock('fs-extra'); const fs_mock = fs as jest.Mocked; fs_mock.existsSync.mockReturnValue(true); -fs_mock.lstatSync.mockImplementation((_path, _options) => { +fs_mock.lstatSync.mockImplementation(() => { return { isDirectory: jest.fn().mockReturnValue(true), } as unknown as fs.Stats; @@ -243,7 +244,7 @@ const lambdaTemplate = { }, }; -const invokePluginMethod = jest.fn((_context, _category, _service, functionName, _others) => { +const invokePluginMethod = jest.fn((_context, _category, _service, functionName) => { if (functionName === 'buildResource') { return 'mockbuildTimeStamp'; } @@ -259,6 +260,7 @@ const invokePluginMethod = jest.fn((_context, _category, _service, functionName, exposedContainer: 'mockExposedContainer', }; } + return undefined; }); jest.mock('../../resourceParams', () => ({ loadResourceParameters: jest.fn().mockReturnValue({}), @@ -430,8 +432,8 @@ describe('test resource export', () => { if (packagedResources.some((r) => r.service === 'ElasticContainer')) { expect(fs_mock.copy).nthCalledWith( copyCount++, - path.join(__dirname, '../../../', 'resources', 'custom-resource-pipeline-awaiter.zip'), - path.join(exportPath, 'amplify-auxiliary-files', 'custom-resource-pipeline-awaiter.zip'), + path.join(__dirname, '../../../', 'resources', 'custom-resource-pipeline-awaiter-18.zip'), + path.join(exportPath, 'amplify-auxiliary-files', 'custom-resource-pipeline-awaiter-18.zip'), { overwrite: true, preserveTimestamps: true, diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/root-stack-builder/__snapshots__/root-stack-builder.test.ts.snap b/packages/amplify-provider-awscloudformation/src/__tests__/root-stack-builder/__snapshots__/root-stack-builder.test.ts.snap index aae597fc838..f42389ce694 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/root-stack-builder/__snapshots__/root-stack-builder.test.ts.snap +++ b/packages/amplify-provider-awscloudformation/src/__tests__/root-stack-builder/__snapshots__/root-stack-builder.test.ts.snap @@ -104,6 +104,53 @@ exports[`Check RootStack Template generates root stack Template 1`] = ` "Type": "AWS::S3::Bucket", "UpdateReplacePolicy": "Retain", }, + "DeploymentBucketBlockHTTP": { + "Properties": { + "Bucket": { + "Ref": "DeploymentBucketName", + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Condition": { + "Bool": { + "aws:SecureTransport": false, + }, + }, + "Effect": "Deny", + "Principal": "*", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "DeploymentBucketName", + }, + "/*", + ], + ], + }, + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "DeploymentBucketName", + }, + ], + ], + }, + ], + }, + ], + }, + }, + "Type": "AWS::S3::BucketPolicy", + }, "UnauthRole": { "Properties": { "AssumeRolePolicyDocument": { diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/root-stack-builder/__snapshots__/root-stack-transform.test.ts.snap b/packages/amplify-provider-awscloudformation/src/__tests__/root-stack-builder/__snapshots__/root-stack-transform.test.ts.snap index 8ac23826971..9ce1d17b0c3 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/root-stack-builder/__snapshots__/root-stack-transform.test.ts.snap +++ b/packages/amplify-provider-awscloudformation/src/__tests__/root-stack-builder/__snapshots__/root-stack-transform.test.ts.snap @@ -125,6 +125,53 @@ exports[`Root stack template tests Generated root stack template during init 1`] "Type": "AWS::S3::Bucket", "UpdateReplacePolicy": "Retain", }, + "DeploymentBucketBlockHTTP": { + "Properties": { + "Bucket": { + "Ref": "DeploymentBucketName", + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Condition": { + "Bool": { + "aws:SecureTransport": false, + }, + }, + "Effect": "Deny", + "Principal": "*", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "DeploymentBucketName", + }, + "/*", + ], + ], + }, + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "DeploymentBucketName", + }, + ], + ], + }, + ], + }, + ], + }, + }, + "Type": "AWS::S3::BucketPolicy", + }, "UnauthRole": { "Properties": { "AssumeRolePolicyDocument": { diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/root-stack-builder/root-stack-transform.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/root-stack-builder/root-stack-transform.test.ts index e3c7463d8de..5a609d87723 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/root-stack-builder/root-stack-transform.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/root-stack-builder/root-stack-transform.test.ts @@ -4,7 +4,7 @@ import { AmplifyRootStackTransform } from '../../root-stack-builder/root-stack-t jest.mock('@aws-amplify/amplify-cli-core'); const JSONUtilitiesMock = JSONUtilities as jest.Mocked; -JSONUtilitiesMock.stringify.mockImplementation((data, __) => JSON.stringify(data, null, 2)); +JSONUtilitiesMock.stringify.mockImplementation((data) => JSON.stringify(data, null, 2)); JSONUtilitiesMock.parse.mockImplementation((data) => JSON.parse(data)); describe('Root stack template tests', () => { diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/utils/admin-login-server.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/utils/admin-login-server.test.ts index 8f501985f5c..41e96c27d94 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/utils/admin-login-server.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/utils/admin-login-server.test.ts @@ -18,10 +18,8 @@ describe('AdminLoginServer', () => { test('run server with 0.0.0.0', async () => { const adminLoginServer = new AdminLoginServer('appId', 'http://example.com', printer); - await new Promise((resolve) => { - adminLoginServer.startServer(() => {}); - resolve(); - }); + await adminLoginServer.startServer(() => {}); + expect(useMock).toBeCalled(); expect(postMock).toBeCalled(); expect(getMock).toBeCalled(); @@ -32,10 +30,7 @@ describe('AdminLoginServer', () => { const adminLoginServer = new AdminLoginServer('appId', 'http://example.com', printer); listenMock.mockReturnValue({ close: serverCloseMock }); - await new Promise((resolve) => { - adminLoginServer.startServer(() => {}); - resolve(); - }); + await adminLoginServer.startServer(() => {}); adminLoginServer.shutdown(); expect(serverCloseMock).toBeCalled(); }); diff --git a/packages/amplify-provider-awscloudformation/src/__tests__/utils/amplify-resource-state-utils.test.ts b/packages/amplify-provider-awscloudformation/src/__tests__/utils/amplify-resource-state-utils.test.ts index 2e2f11fc3c6..6e1f293f87a 100644 --- a/packages/amplify-provider-awscloudformation/src/__tests__/utils/amplify-resource-state-utils.test.ts +++ b/packages/amplify-provider-awscloudformation/src/__tests__/utils/amplify-resource-state-utils.test.ts @@ -2,7 +2,7 @@ import { getTableNames, getPreviousDeploymentRecord } from '../../utils/amplify- import { CloudFormation } from 'aws-sdk'; const cfnClientStub = { - describeStackResources: ({ StackName }) => ({ + describeStackResources: () => ({ promise: () => Promise.resolve({ StackResources: [ @@ -13,7 +13,7 @@ const cfnClientStub = { ], }), }), - describeStacks: ({ StackName }) => ({ + describeStacks: () => ({ promise: () => Promise.resolve({ Stacks: [ diff --git a/packages/amplify-provider-awscloudformation/src/admin-login.ts b/packages/amplify-provider-awscloudformation/src/admin-login.ts index 4e9efba8ff2..03039d9e231 100644 --- a/packages/amplify-provider-awscloudformation/src/admin-login.ts +++ b/packages/amplify-provider-awscloudformation/src/admin-login.ts @@ -61,7 +61,7 @@ export const adminLoginFlow = async (context: $TSContext, appId: string, envName } finished = true; adminLoginServer.shutdown(); - reject(); + resolve(); }; }); @@ -116,7 +116,7 @@ export const adminLoginFlow = async (context: $TSContext, appId: string, envName } finished = true; closeReadline(rl); - reject(); + resolve(); }; }); return [promise, cancel]; diff --git a/packages/amplify-provider-awscloudformation/src/admin-modelgen.ts b/packages/amplify-provider-awscloudformation/src/admin-modelgen.ts index cc5b853fb62..5321dd15857 100644 --- a/packages/amplify-provider-awscloudformation/src/admin-modelgen.ts +++ b/packages/amplify-provider-awscloudformation/src/admin-modelgen.ts @@ -4,6 +4,8 @@ import _ from 'lodash'; import * as path from 'path'; import { S3 } from './aws-utils/aws-s3'; import { ProviderName as providerName } from './constants'; +import { printer } from '@aws-amplify/amplify-prompts'; +import { isAmplifyAdminApp } from './utils/admin-helpers'; /** * Generates DataStore Models for Admin UI CMS to consume @@ -26,6 +28,18 @@ export const adminModelgen = async (context: $TSContext, resources: $TSAny[]): P return; } + const localSchemaPath = path.join(pathManager.getResourceDirectoryPath(undefined, 'api', resourceName), 'schema.graphql'); + // Early return with a warning if the schema file does not exist + if (!fs.existsSync(localSchemaPath)) { + const { isAdminApp } = await isAmplifyAdminApp(appId); + if (isAdminApp) { + printer.warn( + `Could not find the GraphQL schema file at "${localSchemaPath}". Amplify Studio's schema editor might not work as intended if you're using multiple schema files.`, + ); + } + return; + } + // the following is a hack to enable us to upload assets needed by studio CMS to the deployment bucket without // calling AmplifyBackend.generateBackendAPIModels. // Calling this API introduces a circular dependency because this API in turn executes the CLI to generate codegen assets @@ -65,7 +79,6 @@ export const adminModelgen = async (context: $TSContext, resources: $TSAny[]): P // invokes https://github.com/aws-amplify/amplify-codegen/blob/main/packages/amplify-codegen/src/commands/model-intropection.js#L8 await context.amplify.invokePluginMethod(context, 'codegen', undefined, 'generateModelIntrospection', [context]); - const localSchemaPath = path.join(pathManager.getResourceDirectoryPath(undefined, 'api', resourceName), 'schema.graphql'); const localSchemaJsPath = path.join(absoluteTempOutputDir, 'models', 'schema.js'); const localModelIntrospectionPath = path.join(absoluteTempOutputDir, 'model-introspection.json'); diff --git a/packages/amplify-provider-awscloudformation/src/attach-backend.ts b/packages/amplify-provider-awscloudformation/src/attach-backend.ts index fd56ab3586d..71751e0ee69 100644 --- a/packages/amplify-provider-awscloudformation/src/attach-backend.ts +++ b/packages/amplify-provider-awscloudformation/src/attach-backend.ts @@ -2,10 +2,9 @@ import aws from 'aws-sdk'; import fs from 'fs-extra'; import path from 'path'; import glob from 'glob'; -import extract from 'extract-zip'; import inquirer from 'inquirer'; import _ from 'lodash'; -import { exitOnNextTick, pathManager, PathConstants, AmplifyError } from '@aws-amplify/amplify-cli-core'; +import { exitOnNextTick, pathManager, PathConstants, AmplifyError, extract } from '@aws-amplify/amplify-cli-core'; import * as configurationManager from './configuration-manager'; import { getConfiguredAmplifyClient } from './aws-utils/aws-amplify'; import { checkAmplifyServiceIAMPermission } from './amplify-service-permission-check'; @@ -345,7 +344,7 @@ async function downloadBackend(context, backendEnv, awsConfigInfo) { const unzippedDirPath = path.join(tempDirPath, path.basename(zipFileName, '.zip')); - await extract(tempFilePath, { dir: unzippedDirPath }); + await extract(tempFilePath, { dir: unzippedDirPath, skipEntryPrefixes: ['types/'] }); // Move out cli.*json if exists in the temp directory into the amplify directory before copying backend and // current cloud backend directories. diff --git a/packages/amplify-provider-awscloudformation/src/aws-predictions-regions.js b/packages/amplify-provider-awscloudformation/src/aws-predictions-regions.js index 39830a7e5f4..48ff5946a4a 100644 --- a/packages/amplify-provider-awscloudformation/src/aws-predictions-regions.js +++ b/packages/amplify-provider-awscloudformation/src/aws-predictions-regions.js @@ -19,6 +19,7 @@ const Translate = { 'eu-south-1': 'eu-central-1', 'ap-northeast-1': 'ap-northeast-1', 'ap-northeast-2': 'ap-northeast-2', + 'ap-northeast-3': 'ap-northeast-1', 'ap-southeast-1': 'ap-southeast-1', 'ap-southeast-2': latestTranslateRegions >= 1 ? 'ap-southeast-2' : 'ap-southeast-1', 'ap-south-1': 'ap-south-1', @@ -40,6 +41,7 @@ const Polly = { 'eu-south-1': 'eu-central-1', 'ap-northeast-1': 'ap-northeast-1', 'ap-northeast-2': 'ap-northeast-2', + 'ap-northeast-3': 'ap-northeast-3', 'ap-southeast-1': 'ap-southeast-1', 'ap-southeast-2': 'ap-southeast-2', 'ap-south-1': 'ap-south-1', @@ -61,6 +63,7 @@ const Transcribe = { 'eu-south-1': 'eu-central-1', 'ap-northeast-1': latestTranscribeRegions >= 1 ? 'ap-northeast-1' : 'ap-northeast-2', 'ap-northeast-2': 'ap-northeast-2', + 'ap-northeast-3': 'ap-northeast-1', 'ap-southeast-1': 'ap-southeast-1', 'ap-southeast-2': 'ap-southeast-2', 'ap-south-1': 'ap-south-1', @@ -82,6 +85,7 @@ const Rekognition = { 'eu-south-1': 'eu-central-1', 'ap-northeast-1': 'ap-northeast-1', 'ap-northeast-2': 'ap-northeast-2', + 'ap-northeast-3': 'ap-northeast-1', 'ap-southeast-1': 'ap-southeast-1', 'ap-southeast-2': 'ap-southeast-2', 'ap-south-1': 'ap-south-1', @@ -103,6 +107,7 @@ const RekognitionAndTextract = { 'eu-south-1': 'eu-central-1', 'ap-northeast-1': 'us-east-1', 'ap-northeast-2': latestTextractRegions >= 1 ? 'ap-northeast-2' : 'us-east-1', + 'ap-northeast-3': 'ap-northeast-2', 'ap-southeast-1': latestTextractRegions >= 1 ? 'ap-southeast-1' : 'us-east-1', 'ap-southeast-2': latestTextractRegions >= 1 ? 'ap-southeast-2' : 'us-east-1', 'ap-south-1': latestTextractRegions >= 1 ? 'ap-south-1' : 'us-east-1', @@ -124,6 +129,7 @@ const Comprehend = { 'eu-south-1': 'eu-central-1', 'ap-northeast-1': latestComprehendRegions >= 1 ? 'ap-northeast-1' : 'us-east-1', 'ap-northeast-2': latestComprehendRegions >= 1 ? 'ap-northeast-2' : 'us-east-1', + 'ap-northeast-3': 'ap-northeast-1', 'ap-southeast-1': 'ap-southeast-1', 'ap-southeast-2': 'ap-southeast-2', 'ap-south-1': latestComprehendRegions >= 1 ? 'ap-south-1' : 'us-east-1', @@ -145,6 +151,7 @@ const SageMaker = { 'eu-south-1': 'eu-south-1', 'ap-northeast-1': 'ap-northeast-1', 'ap-northeast-2': 'ap-northeast-2', + 'ap-northeast-3': 'ap-northeast-3', 'ap-southeast-1': 'ap-southeast-1', 'ap-southeast-2': 'ap-southeast-2', 'ap-south-1': 'ap-south-1', diff --git a/packages/amplify-provider-awscloudformation/src/aws-regions.js b/packages/amplify-provider-awscloudformation/src/aws-regions.js index 1874dc2a1f5..988be8ada1c 100644 --- a/packages/amplify-provider-awscloudformation/src/aws-regions.js +++ b/packages/amplify-provider-awscloudformation/src/aws-regions.js @@ -14,6 +14,7 @@ const regionMappings = { 'eu-central-1': 'EU (Frankfurt)', 'ap-northeast-1': 'Asia Pacific (Tokyo)', 'ap-northeast-2': 'Asia Pacific (Seoul)', + 'ap-northeast-3': 'Asia Pacific (Osaka)', 'ap-southeast-1': 'Asia Pacific (Singapore)', 'ap-southeast-2': 'Asia Pacific (Sydney)', 'ap-south-1': 'Asia Pacific (Mumbai)', diff --git a/packages/amplify-provider-awscloudformation/src/aws-utils/IdentityPoolService.ts b/packages/amplify-provider-awscloudformation/src/aws-utils/IdentityPoolService.ts index 2209419e141..a277001ff8b 100644 --- a/packages/amplify-provider-awscloudformation/src/aws-utils/IdentityPoolService.ts +++ b/packages/amplify-provider-awscloudformation/src/aws-utils/IdentityPoolService.ts @@ -1,4 +1,4 @@ -import { $TSAny, $TSContext, AmplifyFault, AmplifyError } from '@aws-amplify/amplify-cli-core'; +import { $TSAny, $TSContext, AmplifyFault, AmplifyError, parseArn } from '@aws-amplify/amplify-cli-core'; import { IIdentityPoolService } from '@aws-amplify/amplify-util-import'; import { CognitoIdentity } from 'aws-sdk'; import { PaginationKey, IdentityPool, IdentityPoolShortDescription, ListIdentityPoolsResponse } from 'aws-sdk/clients/cognitoidentity'; @@ -101,10 +101,10 @@ export class IdentityPoolService implements IIdentityPoolService { let resourceName; if (arn) { - const parts = arn.split('/'); - - if (parts.length === 2) { - resourceName = parts[1]; + const fullRoleName = parseArn(arn).resource; + const parts = fullRoleName.split('/'); + if (parts.length >= 2) { + resourceName = [...parts].pop(); } } diff --git a/packages/amplify-provider-awscloudformation/src/aws-utils/aws-amplify.js b/packages/amplify-provider-awscloudformation/src/aws-utils/aws-amplify.js index 8a3deeba456..3e1be6ed115 100644 --- a/packages/amplify-provider-awscloudformation/src/aws-utils/aws-amplify.js +++ b/packages/amplify-provider-awscloudformation/src/aws-utils/aws-amplify.js @@ -1,5 +1,5 @@ const aws = require('aws-sdk'); -const proxyAgent = require('proxy-agent'); +const { ProxyAgent } = require('proxy-agent'); const configurationManager = require('../configuration-manager'); const { regions: amplifyServiceRegions } = require('../aws-regions'); @@ -24,7 +24,7 @@ async function getConfiguredAmplifyClient(context, options = {}) { if (httpProxy) { aws.config.update({ httpOptions: { - agent: proxyAgent(httpProxy), + agent: new ProxyAgent(), }, }); } diff --git a/packages/amplify-provider-awscloudformation/src/aws-utils/aws-cognito-client.ts b/packages/amplify-provider-awscloudformation/src/aws-utils/aws-cognito-client.ts new file mode 100644 index 00000000000..9ce601154ba --- /dev/null +++ b/packages/amplify-provider-awscloudformation/src/aws-utils/aws-cognito-client.ts @@ -0,0 +1,27 @@ +import { $TSContext } from '@aws-amplify/amplify-cli-core'; +import aws from './aws.js'; +import * as AWS from 'aws-sdk'; +import { AwsSecrets, loadConfiguration } from '../configuration-manager'; + +export class CognitoUserPoolClientProvider { + private static instance: CognitoUserPoolClientProvider; + readonly client: AWS.CognitoIdentityServiceProvider; + + static async getInstance(context: $TSContext, options = {}): Promise { + if (!CognitoUserPoolClientProvider.instance) { + let cred: AwsSecrets = {}; + try { + cred = await loadConfiguration(context); + } catch (e) { + // ignore missing config + } + + CognitoUserPoolClientProvider.instance = new CognitoUserPoolClientProvider(cred, options); + } + return CognitoUserPoolClientProvider.instance; + } + + constructor(creds: AwsSecrets, options = {}) { + this.client = new aws.CognitoIdentityServiceProvider({ ...creds, ...options }); + } +} diff --git a/packages/amplify-provider-awscloudformation/src/aws-utils/aws-s3.ts b/packages/amplify-provider-awscloudformation/src/aws-utils/aws-s3.ts index dccde92221b..b43af311007 100644 --- a/packages/amplify-provider-awscloudformation/src/aws-utils/aws-s3.ts +++ b/packages/amplify-provider-awscloudformation/src/aws-utils/aws-s3.ts @@ -18,8 +18,8 @@ import { loadConfiguration } from '../configuration-manager'; import aws from './aws'; const providerName = require('../constants').ProviderName; +const consumers = require('stream/consumers'); -const minChunkSize = 5 * 1024 * 1024; // 5 MB https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3/ManagedUpload.html#minPartSize-property const { fileLogger } = require('../utils/aws-logger'); const logger = fileLogger('aws-s3'); @@ -124,26 +124,32 @@ export class S3 { const { _Body, ...others } = augmentedS3Params; let uploadTask; try { - // eslint-disable-next-line no-unused-expressions - showSpinner && spinner.start('Uploading files.'); - if ( - (s3Params.Body instanceof fs.ReadStream && fs.statSync(s3Params.Body.path).size > minChunkSize) || - (Buffer.isBuffer(s3Params.Body) && s3Params.Body.length > minChunkSize) - ) { - logger('uploadFile.s3.upload', [others])(); - uploadTask = this.s3.upload(augmentedS3Params); + if (showSpinner) { + spinner.start('Uploading files.'); + } + logger('uploadFile.s3.upload', [others])(); + const minChunkSize = 5 * 1024 * 1024; // 5 MB + if (augmentedS3Params.Body instanceof fs.ReadStream && fs.statSync(augmentedS3Params.Body.path).size <= minChunkSize) { + // Buffer small files to avoid memory leak. + // Previous implementation used s3.putObject for small uploads, but it didn't have retries, see https://github.com/aws-amplify/amplify-cli/pull/13493. + // On the other hand uploading small streams leads to memory leak, see https://github.com/aws/aws-sdk-js/issues/2552. + // Therefore, buffering small files ourselves seems to be middle ground between memory leak and loosing retries. + // Buffering small files brings back balance between leaking and non-leaking uploads that is matching + // the ratio from before https://github.com/aws-amplify/amplify-cli/pull/13493. + augmentedS3Params.Body = await consumers.buffer(augmentedS3Params.Body); + } + uploadTask = this.s3.upload(augmentedS3Params); + if (showSpinner) { uploadTask.on('httpUploadProgress', (max) => { - if (showSpinner) spinner.text = `Uploading files...${Math.round((max.loaded / max.total) * 100)}%`; + spinner.text = `Uploading files...${Math.round((max.loaded / max.total) * 100)}%`; }); - } else { - logger('uploadFile.s3.putObject', [others])(); - uploadTask = this.s3.putObject(augmentedS3Params); } await uploadTask.promise(); return this.uploadState.s3Params.Bucket; } finally { - // eslint-disable-next-line no-unused-expressions - showSpinner && spinner.stop(); + if (showSpinner) { + spinner.stop(); + } } } diff --git a/packages/amplify-provider-awscloudformation/src/aws-utils/aws.js b/packages/amplify-provider-awscloudformation/src/aws-utils/aws.js index 9631b25c326..dd30c7f276a 100644 --- a/packages/amplify-provider-awscloudformation/src/aws-utils/aws.js +++ b/packages/amplify-provider-awscloudformation/src/aws-utils/aws.js @@ -22,7 +22,7 @@ try { aws = require('aws-sdk'); } -const proxyAgent = require('proxy-agent'); +const { ProxyAgent } = require('proxy-agent'); const configurationManager = require('../configuration-manager'); aws.configureWithCreds = async (context) => { @@ -35,7 +35,7 @@ aws.configureWithCreds = async (context) => { if (httpProxy) { aws.config.update({ httpOptions: { - agent: proxyAgent(httpProxy), + agent: new ProxyAgent(httpProxy), }, }); } diff --git a/packages/amplify-provider-awscloudformation/src/configuration-manager.ts b/packages/amplify-provider-awscloudformation/src/configuration-manager.ts index 784516d9f04..140e2287ead 100644 --- a/packages/amplify-provider-awscloudformation/src/configuration-manager.ts +++ b/packages/amplify-provider-awscloudformation/src/configuration-manager.ts @@ -13,7 +13,7 @@ import chalk from 'chalk'; import { prompt } from 'inquirer'; import _ from 'lodash'; import path from 'path'; -import proxyAgent from 'proxy-agent'; +import { ProxyAgent } from 'proxy-agent'; import { STS } from 'aws-sdk'; import awsRegions from './aws-regions'; import constants from './constants'; @@ -838,10 +838,11 @@ export async function getAwsConfig(context: $TSContext): Promise { } } + // HTTP_PROXY & HTTPS_PROXY env vars are read automatically by ProxyAgent, but we check to see if they are set before using the proxy if (httpProxy) { resultAWSConfigInfo = { ...resultAWSConfigInfo, - httpOptions: { agent: proxyAgent(httpProxy) }, + httpOptions: { agent: new ProxyAgent() }, }; } diff --git a/packages/amplify-provider-awscloudformation/src/display-helpful-urls.ts b/packages/amplify-provider-awscloudformation/src/display-helpful-urls.ts index 9d1253f2c96..fd27422fd7f 100644 --- a/packages/amplify-provider-awscloudformation/src/display-helpful-urls.ts +++ b/packages/amplify-provider-awscloudformation/src/display-helpful-urls.ts @@ -271,7 +271,7 @@ export const showSMSSandboxWarning = async (context): Promise => { const showGraphQLTransformerMigrationMessage = (): void => { const hasGraphqlApi = !!Object.entries(stateManager.getMeta().api || {}) - .filter(([__, apiResource]) => (apiResource as $TSAny).service === 'AppSync') + .filter(([, apiResource]) => (apiResource as $TSAny).service === 'AppSync') .map(([name]) => name).length; const suppressMessage = FeatureFlags.getBoolean('graphqltransformer.suppressSchemaMigrationPrompt'); const usingV2 = FeatureFlags.getNumber('graphqltransformer.transformerVersion') === 2; @@ -293,7 +293,7 @@ export const showGraphQLTransformerVersion = async (context): Promise => { const meta = stateManager.getMeta(); const apiObject = (meta && meta.api) || {}; const hasGraphqlApi = !!Object.entries(apiObject) - .filter(([__, apiResource]) => (apiResource as $TSAny).service === 'AppSync') + .filter(([, apiResource]) => (apiResource as $TSAny).service === 'AppSync') .map(([name]) => name).length; if (!hasGraphqlApi) { diff --git a/packages/amplify-provider-awscloudformation/src/download-api-models.ts b/packages/amplify-provider-awscloudformation/src/download-api-models.ts index 9f37bfaf6b4..aed23fc633e 100644 --- a/packages/amplify-provider-awscloudformation/src/download-api-models.ts +++ b/packages/amplify-provider-awscloudformation/src/download-api-models.ts @@ -1,6 +1,5 @@ -import { $TSAny, $TSContext, $TSObject, AmplifyError, AmplifyFrontend, pathManager } from '@aws-amplify/amplify-cli-core'; +import { $TSAny, $TSContext, $TSObject, AmplifyError, AmplifyFrontend, pathManager, extract } from '@aws-amplify/amplify-cli-core'; import { printer } from '@aws-amplify/amplify-prompts'; -import extract from 'extract-zip'; import * as fs from 'fs-extra'; import sequential from 'promise-sequential'; import { APIGateway } from './aws-utils/aws-apigw'; @@ -50,6 +49,14 @@ const extractAPIModel = async (context: $TSContext, resource: $TSObject, framewo fs.ensureDirSync(tempDir); + // After updating node types from 12.x to 18.x the objectResult + // became not directly assignable to Buffer.from parameter type. + // However, this code has been running fine since 2022 which means that + // runtime types are compatible. + // The alternative would require multiple logical branches to handle type mismatch + // that doesn't seem to exist in runtime. + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore const buff = Buffer.from(data.body); fs.writeFileSync(`${tempDir}/${apiName}.zip`, buff); await extract(`${tempDir}/${apiName}.zip`, { dir: tempDir }); diff --git a/packages/amplify-provider-awscloudformation/src/graphql-resource-manager/amplify-graphql-resource-manager.ts b/packages/amplify-provider-awscloudformation/src/graphql-resource-manager/amplify-graphql-resource-manager.ts index 1b49ceb3e1c..1e11b4be5f0 100644 --- a/packages/amplify-provider-awscloudformation/src/graphql-resource-manager/amplify-graphql-resource-manager.ts +++ b/packages/amplify-provider-awscloudformation/src/graphql-resource-manager/amplify-graphql-resource-manager.ts @@ -29,6 +29,8 @@ import { addGSI, getGSIDetails, removeGSI } from './dynamodb-gsi-helpers'; import { loadConfiguration } from '../configuration-manager'; +export const DISABLE_GSI_LIMIT_CHECK_OPTION = 'disable-gsi-limit-check'; + const ROOT_LEVEL = 'root'; const RESERVED_ROOT_STACK_TEMPLATE_STATE_KEY_NAME = '_root'; const CONNECTION_STACK_NAME = 'ConnectionStack'; @@ -43,6 +45,7 @@ export type GQLResourceManagerProps = { backendDir: string; cloudBackendDir: string; rebuildAllTables?: boolean; + disableGSILimitCheck?: boolean; }; /** @@ -76,6 +79,7 @@ export class GraphQLResourceManager { private backendApiProjectRoot: string; private templateState: TemplateState; private rebuildAllTables = false; // indicates that all underlying model tables should be rebuilt + private readonly disableGSILimitCheck; public static createInstance = async ( context: $TSContext, @@ -89,12 +93,14 @@ export class GraphQLResourceManager { const apiStack = await cfn .describeStackResources({ StackName: StackId, LogicalResourceId: gqlResource.providerMetadata.logicalId }) .promise(); + return new GraphQLResourceManager({ cfnClient: cfn, resourceMeta: { ...gqlResource, stackId: apiStack.StackResources[0].PhysicalResourceId }, backendDir: pathManager.getBackendDirPath(), cloudBackendDir: pathManager.getCurrentCloudBackendDirPath(), rebuildAllTables, + disableGSILimitCheck: context?.input?.options?.[DISABLE_GSI_LIMIT_CHECK_OPTION], }); }; @@ -113,6 +119,7 @@ export class GraphQLResourceManager { this.cloudBackendApiProjectRoot = path.join(props.cloudBackendDir, GraphQLResourceManager.categoryName, this.resourceMeta.resourceName); this.templateState = new TemplateState(); this.rebuildAllTables = props.rebuildAllTables || false; + this.disableGSILimitCheck = props.disableGSILimitCheck || false; } run = async (): Promise => { @@ -438,7 +445,7 @@ export class GraphQLResourceManager { private addGSI = (gsiRecord: GSIRecord, tableName: string, template: Template): void => { const table = template.Resources[tableName] as DynamoDB.Table; - template.Resources[tableName] = addGSI(gsiRecord, table); + template.Resources[tableName] = addGSI(gsiRecord, table, this.disableGSILimitCheck); }; private deleteGSI = (indexName: string, tableName: string, template: Template): void => { @@ -474,5 +481,5 @@ export class GraphQLResourceManager { }; private getTableNameFromTemplate = (template: Template): string | undefined => - Object.entries(template?.Resources || {}).find(([_, resource]) => resource.Type === 'AWS::DynamoDB::Table')?.[0]; + Object.entries(template?.Resources || {}).find(([, resource]) => resource.Type === 'AWS::DynamoDB::Table')?.[0]; } diff --git a/packages/amplify-provider-awscloudformation/src/graphql-resource-manager/dynamodb-gsi-helpers.ts b/packages/amplify-provider-awscloudformation/src/graphql-resource-manager/dynamodb-gsi-helpers.ts index 9f6132bed1c..5a2575503ae 100644 --- a/packages/amplify-provider-awscloudformation/src/graphql-resource-manager/dynamodb-gsi-helpers.ts +++ b/packages/amplify-provider-awscloudformation/src/graphql-resource-manager/dynamodb-gsi-helpers.ts @@ -4,6 +4,7 @@ import { DynamoDB, IntrinsicFunction } from 'cloudform-types'; import _ from 'lodash'; import { AmplifyError, AMPLIFY_SUPPORT_DOCS } from '@aws-amplify/amplify-cli-core'; import { GSIRecord } from '../utils/amplify-resource-state-utils'; +import { DISABLE_GSI_LIMIT_CHECK_OPTION } from './amplify-graphql-resource-manager'; export const MAX_GSI_PER_TABLE = 20; /** @@ -45,8 +46,9 @@ export const getGSIDetails = (indexName: string, table: DynamoDB.Table): GSIReco * Helper method to add new GSI and attribute definitions * @param index GSIRecord with the index and attribute definition * @param table DynamoDB table to which the new GSI is added + * @param disableGSILimitChecks if enabled, do not check for GSI limits during iteration. */ -export const addGSI = (index: GSIRecord, table: DynamoDB.Table): DynamoDB.Table => { +export const addGSI = (index: GSIRecord, table: DynamoDB.Table, disableGSILimitCheck: boolean): DynamoDB.Table => { const updatedTable = _.cloneDeep(table); const gsis = updatedTable.Properties.GlobalSecondaryIndexes ?? []; @@ -54,9 +56,11 @@ export const addGSI = (index: GSIRecord, table: DynamoDB.Table): DynamoDB.Table const existingIndices = getExistingIndexNames(table); - if (existingIndices.length + 1 > MAX_GSI_PER_TABLE) { + if (existingIndices.length + 1 > MAX_GSI_PER_TABLE && !disableGSILimitCheck) { + const tableName = table.Properties.TableName; + const tableNameString = tableName ? (typeof tableName === 'string' ? tableName : JSON.stringify(tableName)) : '{UnNamedTable}'; throw new AmplifyError('ConfigurationError', { - message: `DynamoDB ${table.Properties.TableName || '{UnNamedTable}'} can have max of ${MAX_GSI_PER_TABLE} GSIs`, + message: `DynamoDB ${tableNameString} can have max of ${MAX_GSI_PER_TABLE} GSIs. To disable this check, use the --${DISABLE_GSI_LIMIT_CHECK_OPTION} option.`, }); } diff --git a/packages/amplify-provider-awscloudformation/src/index.ts b/packages/amplify-provider-awscloudformation/src/index.ts index c6222e00a62..710e9430da7 100644 --- a/packages/amplify-provider-awscloudformation/src/index.ts +++ b/packages/amplify-provider-awscloudformation/src/index.ts @@ -29,6 +29,7 @@ import { loadConfigurationForEnv, loadConfiguration, resolveRegion } from './con export { loadConfigurationForEnv, loadConfiguration, resolveRegion } from './configuration-manager'; import { getLocationSupportedRegion, getLocationRegionMapping } from './aws-utils/aws-location'; import { SSM } from './aws-utils/aws-ssm'; +import { CognitoUserPoolClientProvider } from './aws-utils/aws-cognito-client'; import { Lambda } from './aws-utils/aws-lambda'; import CloudFormation from './aws-utils/aws-cfn'; import { $TSContext, ApiCategoryFacade } from '@aws-amplify/amplify-cli-core'; @@ -131,6 +132,10 @@ export async function getConfiguredSSMClient(context) { return await SSM.getInstance(context); } +export async function getConfiguredCognitoIdentityProviderClient(context) { + return await CognitoUserPoolClientProvider.getInstance(context); +} + export async function getConfiguredLocationServiceClient(context: $TSContext, options?: Record) { return await LocationService.getInstance(context, options); } @@ -182,6 +187,7 @@ module.exports = { createDynamoDBService, resolveAppId, loadConfigurationForEnv, + getConfiguredCognitoIdentityProviderClient, getConfiguredSSMClient, updateEnv, getLocationSupportedRegion, diff --git a/packages/amplify-provider-awscloudformation/src/initializer.ts b/packages/amplify-provider-awscloudformation/src/initializer.ts index 5baadb2282b..e0de58a176c 100644 --- a/packages/amplify-provider-awscloudformation/src/initializer.ts +++ b/packages/amplify-provider-awscloudformation/src/initializer.ts @@ -9,16 +9,15 @@ import { JSONUtilities, LocalEnvInfo, pathManager, + runOverride, stateManager, Tag, Template, } from '@aws-amplify/amplify-cli-core'; import _ from 'lodash'; import { v4 as uuid } from 'uuid'; -import * as vm from 'vm2'; import fs from 'fs-extra'; -import moment from 'moment'; import path from 'path'; import sequential from 'promise-sequential'; import { getDefaultTemplateDescription } from './template-description-utils'; @@ -56,10 +55,9 @@ export const run = async (context: $TSContext): Promise => { context.exeInfo ??= { inputParams: {}, localEnvInfo: {} as unknown as LocalEnvInfo }; const { projectName } = context.exeInfo.projectConfig; const initTemplateFilePath = path.join(__dirname, '..', 'resources', 'rootStackTemplate.json'); - /* eslint-disable-next-line spellcheck/spell-checker */ - const timeStamp = process.env.CIRCLECI ? uuid().substring(0, 5) : `${moment().format('Hmmss')}`; + const uuidStamp = uuid().substring(0, 5); const { envName = '' } = context.exeInfo.localEnvInfo; - let stackName = normalizeStackName(`amplify-${projectName}-${envName}-${timeStamp}`); + let stackName = normalizeStackName(`amplify-${projectName}-${envName}-${uuidStamp}`); const awsConfigInfo = await configurationManager.getAwsConfig(context); await configurePermissionsBoundaryForInit(context); @@ -92,31 +90,20 @@ export const run = async (context: $TSContext): Promise => { }; let projectInitialized = false; + let overrideDir = ''; let overrideFilePath = ''; try { const backendDir = pathManager.getBackendDirPath(); + overrideDir = path.join(backendDir, 'awscloudformation'); overrideFilePath = path.join(backendDir, 'awscloudformation', 'build', 'override.js'); projectInitialized = true; } catch (e) { // project not initialized } if (projectInitialized && fs.existsSync(overrideFilePath)) { + const projectInfo = getProjectInfo(); try { - const overrideCode: string = await fs.readFile(overrideFilePath, 'utf-8'); - if (overrideCode) { - const sandboxNode = new vm.NodeVM({ - console: 'inherit', - timeout: 5000, - sandbox: {}, - require: { - context: 'sandbox', - builtin: ['path'], - external: true, - }, - }); - const projectInfo = getProjectInfo(); - await sandboxNode.run(overrideCode).override(configuration, projectInfo); - } + await runOverride(overrideDir, configuration, projectInfo); } catch (err) { // absolutely want to throw if there is a compile or runtime error throw new AmplifyError( diff --git a/packages/amplify-provider-awscloudformation/src/override-manager/transform-resource.ts b/packages/amplify-provider-awscloudformation/src/override-manager/transform-resource.ts index 0f2d7c13903..269b3075e5f 100644 --- a/packages/amplify-provider-awscloudformation/src/override-manager/transform-resource.ts +++ b/packages/amplify-provider-awscloudformation/src/override-manager/transform-resource.ts @@ -72,6 +72,7 @@ export const transformResourceWithOverrides = async (context: $TSContext, resour 'MissingOverridesInstallationRequirementsError', 'InvalidOverrideError', 'InvalidCustomResourceError', + 'ScriptingFeaturesDisabledError', ]; if ( (err instanceof AmplifyException && overrideOrCustomStackErrorsList.find((v) => v === err.name)) || diff --git a/packages/amplify-provider-awscloudformation/src/push-resources.ts b/packages/amplify-provider-awscloudformation/src/push-resources.ts index 00207c80dbc..625ee58571f 100644 --- a/packages/amplify-provider-awscloudformation/src/push-resources.ts +++ b/packages/amplify-provider-awscloudformation/src/push-resources.ts @@ -360,6 +360,13 @@ export const run = async (context: $TSContext, resourceDefinition: $TSObject, re } await postPushGraphQLCodegen(context); + await context.amplify.invokePluginMethod( + context, + AmplifyCategories.AUTH, + AmplifySupportedService.COGNITO, + 'updateAppClientWithGeneratedSecret', + [context], + ); await postPushCheck(context); if (resources.concat(resourcesToBeDeleted).length > 0) { @@ -564,7 +571,10 @@ export const updateStackForAPIMigration = async (context: $TSContext, category: const prepareBuildableResources = async (context: $TSContext, resources: $TSAny[]): Promise => { // Only build and package resources which are required - await Promise.all(resources.filter((resource) => resource.build).map((resource) => prepareResource(context, resource))); + const resourcesToBuild = resources.filter((resource) => resource.build); + for (const resource of resourcesToBuild) { + await prepareResource(context, resource); + } }; const prepareResource = async (context: $TSContext, resource: $TSAny) => { diff --git a/packages/amplify-provider-awscloudformation/src/resource-package/resource-packager.ts b/packages/amplify-provider-awscloudformation/src/resource-package/resource-packager.ts index 135333e70e8..031dd2f1d0a 100644 --- a/packages/amplify-provider-awscloudformation/src/resource-package/resource-packager.ts +++ b/packages/amplify-provider-awscloudformation/src/resource-package/resource-packager.ts @@ -57,7 +57,7 @@ export abstract class ResourcePackager { constructor(context: $TSContext, deployType: ResourceDeployType) { this.context = context; - this.elasticContainerZipFiles = ['custom-resource-pipeline-awaiter.zip', 'codepipeline-action-buildspec-generator-lambda.zip']; + this.elasticContainerZipFiles = ['custom-resource-pipeline-awaiter-18.zip', 'codepipeline-action-buildspec-generator-lambda.zip']; const projectPath = pathManager.findProjectRoot(); this.amplifyMeta = stateManager.getMeta(projectPath); this.amplifyTeamProviderInfo = stateManager.getTeamProviderInfo(projectPath); diff --git a/packages/amplify-provider-awscloudformation/src/root-stack-builder/root-stack-builder.ts b/packages/amplify-provider-awscloudformation/src/root-stack-builder/root-stack-builder.ts index 12dec774474..2f97d295c9d 100644 --- a/packages/amplify-provider-awscloudformation/src/root-stack-builder/root-stack-builder.ts +++ b/packages/amplify-provider-awscloudformation/src/root-stack-builder/root-stack-builder.ts @@ -90,12 +90,32 @@ export class AmplifyRootStack extends cdk.Stack implements AmplifyRootStackTempl } generateRootStackResources = async (): Promise => { + const bucketName = this._cfnParameterMap.get('DeploymentBucketName').valueAsString; this.deploymentBucket = new s3.CfnBucket(this, 'DeploymentBucket', { - bucketName: this._cfnParameterMap.get('DeploymentBucketName').valueAsString, + bucketName: bucketName, }); this.deploymentBucket.applyRemovalPolicy(cdk.RemovalPolicy.RETAIN); + new s3.CfnBucketPolicy(this, 'DeploymentBucketBlockHTTP', { + bucket: bucketName, + policyDocument: { + Statement: [ + { + Action: 's3:*', + Effect: 'Deny', + Principal: '*', + Resource: [`arn:aws:s3:::${bucketName}/*`, `arn:aws:s3:::${bucketName}`], + Condition: { + Bool: { + 'aws:SecureTransport': false, + }, + }, + }, + ], + }, + }); + this.authRole = new iam.CfnRole(this, 'AuthRole', { roleName: this._cfnParameterMap.get('AuthRoleName').valueAsString, assumeRolePolicyDocument: { diff --git a/packages/amplify-provider-awscloudformation/src/root-stack-builder/root-stack-transform.ts b/packages/amplify-provider-awscloudformation/src/root-stack-builder/root-stack-transform.ts index 9a9f40762e2..dbec71bde8d 100644 --- a/packages/amplify-provider-awscloudformation/src/root-stack-builder/root-stack-transform.ts +++ b/packages/amplify-provider-awscloudformation/src/root-stack-builder/root-stack-transform.ts @@ -7,13 +7,11 @@ import { buildOverrideDir, CFNTemplateFormat, pathManager, + runOverride, Template, writeCFNTemplate, } from '@aws-amplify/amplify-cli-core'; -import { formatter } from '@aws-amplify/amplify-prompts'; -import * as fs from 'fs-extra'; import * as path from 'path'; -import * as vm from 'vm2'; import { AmplifyRootStack, AmplifyRootStackOutputs } from './root-stack-builder'; import { RootStackSynthesizer } from './stack-synthesizer'; @@ -60,28 +58,13 @@ export class AmplifyRootStackTransform { private applyOverride = async (): Promise => { const backendDir = pathManager.getBackendDirPath(); - const overrideFilePath = path.join(backendDir, this._resourceName); - const isBuild = await buildOverrideDir(backendDir, overrideFilePath); - + const overrideDir = path.join(backendDir, this._resourceName); + const isBuild = await buildOverrideDir(backendDir, overrideDir); // skip if packageManager or override.ts not found if (isBuild) { - const overrideCode: string = await fs.readFile(path.join(overrideFilePath, 'build', 'override.js'), 'utf-8').catch(() => { - formatter.list(['No override File Found', `To override ${this._resourceName} run amplify override auth`]); - return ''; - }); - const sandboxNode = new vm.NodeVM({ - console: 'inherit', - timeout: 5000, - sandbox: {}, - require: { - context: 'sandbox', - builtin: ['path'], - external: true, - }, - }); const projectInfo = getProjectInfo(); try { - await sandboxNode.run(overrideCode).override(this._rootTemplateObj as AmplifyRootStackTemplate, projectInfo); + await runOverride(overrideDir, this._rootTemplateObj, projectInfo); } catch (err) { throw new AmplifyError( 'InvalidOverrideError', diff --git a/packages/amplify-provider-awscloudformation/src/system-config-manager.ts b/packages/amplify-provider-awscloudformation/src/system-config-manager.ts index 7bde9f05f3b..4d1f2e7db87 100644 --- a/packages/amplify-provider-awscloudformation/src/system-config-manager.ts +++ b/packages/amplify-provider-awscloudformation/src/system-config-manager.ts @@ -5,7 +5,7 @@ import * as fs from 'fs-extra'; import * as path from 'path'; import * as ini from 'ini'; import * as inquirer from 'inquirer'; -import proxyAgent from 'proxy-agent'; +import { ProxyAgent } from 'proxy-agent'; import * as constants from './constants'; import { fileLogger } from './utils/aws-logger'; import { AwsSdkConfig } from './utils/auth-types'; @@ -123,10 +123,11 @@ export const getProfiledAwsConfig = async ( }); } + // HTTP_PROXY & HTTPS_PROXY env vars are read automatically by ProxyAgent, but we check to see if they are set before using the proxy if (httpProxy) { awsConfigInfo = { ...awsConfigInfo, - httpOptions: { agent: proxyAgent(httpProxy) }, + httpOptions: { agent: new ProxyAgent() }, }; } diff --git a/packages/amplify-provider-awscloudformation/src/template-description-utils.ts b/packages/amplify-provider-awscloudformation/src/template-description-utils.ts index a07a364048a..fa0f26a2d0f 100644 --- a/packages/amplify-provider-awscloudformation/src/template-description-utils.ts +++ b/packages/amplify-provider-awscloudformation/src/template-description-utils.ts @@ -88,7 +88,7 @@ export function getDefaultTemplateDescription(context: $TSContext, category: str createdBy: deploymentTypeDescription, createdWith: cliVersion, stackType: stackTypeDescription, - metadata: {}, + metadata: { whyContinueWithGen1: context?.exeInfo?.projectConfig?.whyContinueWithGen1 || '' }, }; return JSON.stringify(descriptionJson); diff --git a/packages/amplify-provider-awscloudformation/src/utils/admin-helpers.ts b/packages/amplify-provider-awscloudformation/src/utils/admin-helpers.ts index f78e7e115dd..d9341961464 100644 --- a/packages/amplify-provider-awscloudformation/src/utils/admin-helpers.ts +++ b/packages/amplify-provider-awscloudformation/src/utils/admin-helpers.ts @@ -2,7 +2,7 @@ import { stateManager, $TSContext, AmplifyError, AmplifyFault } from '@aws-ampli import aws from 'aws-sdk'; import _ from 'lodash'; import fetch from 'node-fetch'; -import proxyAgent from 'proxy-agent'; +import { ProxyAgent } from 'proxy-agent'; import { adminLoginFlow } from '../admin-login'; import { AdminAuthConfig, AwsSdkConfig, CognitoAccessToken, CognitoIdToken } from './auth-types'; import { printer, prompter } from '@aws-amplify/amplify-prompts'; @@ -89,8 +89,9 @@ type AppStateResponse = { async function getAdminAppState(appId: string, region: string): Promise { // environment variable AMPLIFY_CLI_APPSTATE_BASE_URL useful for development against beta/gamma appstate endpoints const appStateBaseUrl = process.env.AMPLIFY_CLI_APPSTATE_BASE_URL ?? adminBackendMap[region].appStateUrl; + // HTTP_PROXY & HTTPS_PROXY env vars are read automatically by ProxyAgent, but we check to see if they are set before using the proxy const httpProxy = process.env.HTTP_PROXY || process.env.HTTPS_PROXY; - const fetchOptions = httpProxy ? { agent: proxyAgent(httpProxy) } : {}; + const fetchOptions = httpProxy ? { agent: new ProxyAgent() } : {}; const res = await fetch(`${appStateBaseUrl}/AppState/?appId=${appId}`, fetchOptions); if (res.status >= 500) { throw new AmplifyFault('ServiceCallFault', { @@ -193,6 +194,10 @@ export const adminBackendMap: { amplifyAdminUrl: 'https://ap-northeast-2.admin.amplifyapp.com', appStateUrl: 'https://prod.ap-northeast-2.appstate.amplifyapp.com', }, + 'ap-northeast-3': { + amplifyAdminUrl: 'https://ap-northeast-3.admin.amplifyapp.com', + appStateUrl: 'https://prod.ap-northeast-3.appstate.amplifyapp.com', + }, 'ap-south-1': { amplifyAdminUrl: 'https://ap-south-1.admin.amplifyapp.com', appStateUrl: 'https://prod.ap-south-1.appstate.amplifyapp.com', diff --git a/packages/amplify-provider-awscloudformation/src/utils/admin-login-server.ts b/packages/amplify-provider-awscloudformation/src/utils/admin-login-server.ts index 6839303a23e..6eaf54a4630 100644 --- a/packages/amplify-provider-awscloudformation/src/utils/admin-login-server.ts +++ b/packages/amplify-provider-awscloudformation/src/utils/admin-login-server.ts @@ -98,7 +98,10 @@ export class AdminLoginServer { delete req.body; res.sendStatus(200); } catch (err) { - res.sendStatus(500); + res.sendStatus(500).send({ + errorName: 'AmplifyStudioLoginError', + errorMessage: `Failed to receive expected authentication tokens. Error: ${err}`, + }); throw new AmplifyError( 'AmplifyStudioLoginError', { diff --git a/packages/amplify-provider-awscloudformation/src/utils/archiver.js b/packages/amplify-provider-awscloudformation/src/utils/archiver.js index 6ac0ab71e2b..1ad062eeca4 100644 --- a/packages/amplify-provider-awscloudformation/src/utils/archiver.js +++ b/packages/amplify-provider-awscloudformation/src/utils/archiver.js @@ -2,7 +2,7 @@ const archiver = require('archiver'); const path = require('path'); const fs = require('fs-extra'); -const DEFAULT_IGNORE_PATTERN = ['*/*/build/**', '*/*/dist/**', 'function/*/src/node_modules/**']; +const DEFAULT_IGNORE_PATTERN = ['*/*/build/**', '*/*/dist/**', 'function/*/src/node_modules/**', 'types/**']; async function run(folder, zipFilePath, ignorePattern = DEFAULT_IGNORE_PATTERN, extraFiles) { const zipFileFolder = path.dirname(zipFilePath); diff --git a/packages/amplify-provider-awscloudformation/src/utils/env-level-constructs.ts b/packages/amplify-provider-awscloudformation/src/utils/env-level-constructs.ts index 50172778b52..24f9b0d3c7a 100644 --- a/packages/amplify-provider-awscloudformation/src/utils/env-level-constructs.ts +++ b/packages/amplify-provider-awscloudformation/src/utils/env-level-constructs.ts @@ -32,7 +32,7 @@ export const createEnvLevelConstructs = async (context: $TSContext): Promise { 'transform.conf.json', 'parameters.json', ] - .flatMap((baseName) => glob.sync(`**/${baseName}`, { cwd: amplifyDirPath })) + .flatMap((baseName) => glob.sync(`**/${baseName}`, { cwd: amplifyDirPath, ignore: ['**/node_modules/**'] })) .filter((filePath) => !filePath.startsWith('backend')) .map((filePath) => ({ Body: fs.createReadStream(path.join(amplifyDirPath, filePath)), diff --git a/packages/amplify-provider-awscloudformation/src/zip-util.ts b/packages/amplify-provider-awscloudformation/src/zip-util.ts index 0c15dcce7c5..83611f580eb 100644 --- a/packages/amplify-provider-awscloudformation/src/zip-util.ts +++ b/packages/amplify-provider-awscloudformation/src/zip-util.ts @@ -1,5 +1,4 @@ -import { AmplifyFault } from '@aws-amplify/amplify-cli-core'; -import extract from 'extract-zip'; +import { AmplifyFault, extract } from '@aws-amplify/amplify-cli-core'; import fs from 'fs-extra'; import path from 'path'; import { S3 } from './aws-utils/aws-s3'; @@ -15,6 +14,15 @@ export const downloadZip = async (s3: S3, tempDir: string, zipFileName: string, log(); const objectResult = await s3.getFile({ Key: zipFileName }, envName); fs.ensureDirSync(tempDir); + + // After updating node types from 12.x to 18.x the objectResult + // became not directly assignable to Buffer.from parameter type. + // However, this code has been running fine since 2022 which means that + // runtime types are compatible. + // The alternative would require multiple logical branches to handle type mismatch + // that doesn't seem to exist in runtime. + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore const buff = Buffer.from(objectResult); const tempFile = `${tempDir}/${zipFileName}`; await fs.writeFile(tempFile, buff); diff --git a/packages/amplify-python-function-runtime-provider/CHANGELOG.md b/packages/amplify-python-function-runtime-provider/CHANGELOG.md index effb1781da8..1780730bd36 100644 --- a/packages/amplify-python-function-runtime-provider/CHANGELOG.md +++ b/packages/amplify-python-function-runtime-provider/CHANGELOG.md @@ -3,6 +3,228 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.4.48](https://github.com/aws-amplify/amplify-cli/compare/amplify-python-function-runtime-provider@2.4.47...amplify-python-function-runtime-provider@2.4.48) (2025-01-30) + +**Note:** Version bump only for package amplify-python-function-runtime-provider + + + + + +## [2.4.47](https://github.com/aws-amplify/amplify-cli/compare/amplify-python-function-runtime-provider@2.4.46...amplify-python-function-runtime-provider@2.4.47) (2024-08-02) + +**Note:** Version bump only for package amplify-python-function-runtime-provider + + + + + +## [2.4.46](https://github.com/aws-amplify/amplify-cli/compare/amplify-python-function-runtime-provider@2.4.45...amplify-python-function-runtime-provider@2.4.46) (2024-06-27) + +**Note:** Version bump only for package amplify-python-function-runtime-provider + + + + + +## [2.4.45](https://github.com/aws-amplify/amplify-cli/compare/amplify-python-function-runtime-provider@2.4.44...amplify-python-function-runtime-provider@2.4.45) (2024-06-20) + +**Note:** Version bump only for package amplify-python-function-runtime-provider + + + + + +## [2.4.44](https://github.com/aws-amplify/amplify-cli/compare/amplify-python-function-runtime-provider@2.4.43...amplify-python-function-runtime-provider@2.4.44) (2024-06-06) + +**Note:** Version bump only for package amplify-python-function-runtime-provider + + + + + +## [2.4.43](https://github.com/aws-amplify/amplify-cli/compare/amplify-python-function-runtime-provider@2.4.42...amplify-python-function-runtime-provider@2.4.43) (2024-05-24) + +**Note:** Version bump only for package amplify-python-function-runtime-provider + + + + + +## [2.4.42](https://github.com/aws-amplify/amplify-cli/compare/amplify-python-function-runtime-provider@2.4.41...amplify-python-function-runtime-provider@2.4.42) (2024-05-07) + +**Note:** Version bump only for package amplify-python-function-runtime-provider + + + + + +## [2.4.41](https://github.com/aws-amplify/amplify-cli/compare/amplify-python-function-runtime-provider@2.4.40...amplify-python-function-runtime-provider@2.4.41) (2024-04-18) + +**Note:** Version bump only for package amplify-python-function-runtime-provider + + + + + +## [2.4.40](https://github.com/aws-amplify/amplify-cli/compare/amplify-python-function-runtime-provider@2.4.39...amplify-python-function-runtime-provider@2.4.40) (2024-04-15) + +**Note:** Version bump only for package amplify-python-function-runtime-provider + + + + + +## [2.4.39](https://github.com/aws-amplify/amplify-cli/compare/amplify-python-function-runtime-provider@2.4.38...amplify-python-function-runtime-provider@2.4.39) (2024-03-29) + +**Note:** Version bump only for package amplify-python-function-runtime-provider + + + + + +## [2.4.38](https://github.com/aws-amplify/amplify-cli/compare/amplify-python-function-runtime-provider@2.4.37...amplify-python-function-runtime-provider@2.4.38) (2024-03-06) + +**Note:** Version bump only for package amplify-python-function-runtime-provider + + + + + +## [2.4.37](https://github.com/aws-amplify/amplify-cli/compare/amplify-python-function-runtime-provider@2.4.36...amplify-python-function-runtime-provider@2.4.37) (2023-12-11) + +**Note:** Version bump only for package amplify-python-function-runtime-provider + + + + + +## [2.4.36](https://github.com/aws-amplify/amplify-cli/compare/amplify-python-function-runtime-provider@2.4.34...amplify-python-function-runtime-provider@2.4.36) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [2.4.35](https://github.com/aws-amplify/amplify-cli/compare/amplify-python-function-runtime-provider@2.4.34...amplify-python-function-runtime-provider@2.4.35) (2023-11-08) + +**Note:** Version bump only for package amplify-python-function-runtime-provider + + + + + +## [2.4.34](https://github.com/aws-amplify/amplify-cli/compare/amplify-python-function-runtime-provider@2.4.33...amplify-python-function-runtime-provider@2.4.34) (2023-11-08) + +**Note:** Version bump only for package amplify-python-function-runtime-provider + + + + + +## [2.4.33](https://github.com/aws-amplify/amplify-cli/compare/amplify-python-function-runtime-provider@2.4.32...amplify-python-function-runtime-provider@2.4.33) (2023-10-12) + +**Note:** Version bump only for package amplify-python-function-runtime-provider + + + + + +## [2.4.32](https://github.com/aws-amplify/amplify-cli/compare/amplify-python-function-runtime-provider@2.4.31...amplify-python-function-runtime-provider@2.4.32) (2023-10-05) + +**Note:** Version bump only for package amplify-python-function-runtime-provider + + + + + +## [2.4.31](https://github.com/aws-amplify/amplify-cli/compare/amplify-python-function-runtime-provider@2.4.30...amplify-python-function-runtime-provider@2.4.31) (2023-10-03) + +**Note:** Version bump only for package amplify-python-function-runtime-provider + + + + + +## [2.4.30](https://github.com/aws-amplify/amplify-cli/compare/amplify-python-function-runtime-provider@2.4.29...amplify-python-function-runtime-provider@2.4.30) (2023-09-22) + +**Note:** Version bump only for package amplify-python-function-runtime-provider + + + + + +## [2.4.29](https://github.com/aws-amplify/amplify-cli/compare/amplify-python-function-runtime-provider@2.4.28...amplify-python-function-runtime-provider@2.4.29) (2023-08-31) + +**Note:** Version bump only for package amplify-python-function-runtime-provider + + + + + +## [2.4.28](https://github.com/aws-amplify/amplify-cli/compare/amplify-python-function-runtime-provider@2.4.27...amplify-python-function-runtime-provider@2.4.28) (2023-08-17) + +**Note:** Version bump only for package amplify-python-function-runtime-provider + + + + + +## [2.4.27](https://github.com/aws-amplify/amplify-cli/compare/amplify-python-function-runtime-provider@2.4.26...amplify-python-function-runtime-provider@2.4.27) (2023-08-09) + + +### Bug Fixes + +* Dependabot alerts for semver, tough-cookie ([#12962](https://github.com/aws-amplify/amplify-cli/issues/12962)) ([175a86b](https://github.com/aws-amplify/amplify-cli/commit/175a86b89a54c65bb6e68c0609be503d61e39d63)) + + + + + +## [2.4.26](https://github.com/aws-amplify/amplify-cli/compare/amplify-python-function-runtime-provider@2.4.25...amplify-python-function-runtime-provider@2.4.26) (2023-07-28) + +**Note:** Version bump only for package amplify-python-function-runtime-provider + + + + + +## [2.4.25](https://github.com/aws-amplify/amplify-cli/compare/amplify-python-function-runtime-provider@2.4.24...amplify-python-function-runtime-provider@2.4.25) (2023-07-27) + +**Note:** Version bump only for package amplify-python-function-runtime-provider + + + + + +## [2.4.24](https://github.com/aws-amplify/amplify-cli/compare/amplify-python-function-runtime-provider@2.4.23...amplify-python-function-runtime-provider@2.4.24) (2023-07-24) + +**Note:** Version bump only for package amplify-python-function-runtime-provider + + + + + +## [2.4.23](https://github.com/aws-amplify/amplify-cli/compare/amplify-python-function-runtime-provider@2.4.22...amplify-python-function-runtime-provider@2.4.23) (2023-07-20) + +**Note:** Version bump only for package amplify-python-function-runtime-provider + + + + + +## [2.4.22](https://github.com/aws-amplify/amplify-cli/compare/amplify-python-function-runtime-provider@2.4.21...amplify-python-function-runtime-provider@2.4.22) (2023-06-13) + +**Note:** Version bump only for package amplify-python-function-runtime-provider + + + + + ## [2.4.21](https://github.com/aws-amplify/amplify-cli/compare/amplify-python-function-runtime-provider@2.4.19...amplify-python-function-runtime-provider@2.4.21) (2023-05-25) diff --git a/packages/amplify-python-function-runtime-provider/package.json b/packages/amplify-python-function-runtime-provider/package.json index bcc9f669f95..f0367130b84 100644 --- a/packages/amplify-python-function-runtime-provider/package.json +++ b/packages/amplify-python-function-runtime-provider/package.json @@ -1,6 +1,6 @@ { "name": "amplify-python-function-runtime-provider", - "version": "2.4.21", + "version": "2.4.48", "description": "Provides functionality related to functions in Python on AWS", "repository": { "type": "git", @@ -25,12 +25,12 @@ "extract-api": "ts-node ../../scripts/extract-api.ts" }, "dependencies": { - "@aws-amplify/amplify-cli-core": "4.0.8", - "@aws-amplify/amplify-function-plugin-interface": "1.10.2", + "@aws-amplify/amplify-cli-core": "4.3.11", + "@aws-amplify/amplify-function-plugin-interface": "1.12.1", "execa": "^5.1.1", "glob": "^7.2.0", "ini": "^1.3.5", - "semver": "^7.3.5", + "semver": "^7.5.4", "which": "^2.0.2" }, "devDependencies": { diff --git a/packages/amplify-python-function-template-provider/CHANGELOG.md b/packages/amplify-python-function-template-provider/CHANGELOG.md index ddacb4738d5..346b82de075 100644 --- a/packages/amplify-python-function-template-provider/CHANGELOG.md +++ b/packages/amplify-python-function-template-provider/CHANGELOG.md @@ -3,6 +3,41 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.4.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-python-function-template-provider@1.4.5...@aws-amplify/amplify-python-function-template-provider@1.4.7) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [1.4.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-python-function-template-provider@1.4.4...@aws-amplify/amplify-python-function-template-provider@1.4.6) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-python-function-template-provider + + + + + +## [1.4.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-python-function-template-provider@1.4.4...@aws-amplify/amplify-python-function-template-provider@1.4.5) (2023-07-20) + +**Note:** Version bump only for package @aws-amplify/amplify-python-function-template-provider + + + + + +## [1.4.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-python-function-template-provider@1.4.3...@aws-amplify/amplify-python-function-template-provider@1.4.4) (2023-06-13) + +**Note:** Version bump only for package @aws-amplify/amplify-python-function-template-provider + + + + + ## [1.4.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-python-function-template-provider@1.4.1...@aws-amplify/amplify-python-function-template-provider@1.4.3) (2023-04-14) **Note:** Version bump only for package @aws-amplify/amplify-python-function-template-provider diff --git a/packages/amplify-python-function-template-provider/package.json b/packages/amplify-python-function-template-provider/package.json index 9f162a437ee..a46679959d4 100644 --- a/packages/amplify-python-function-template-provider/package.json +++ b/packages/amplify-python-function-template-provider/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-python-function-template-provider", - "version": "1.4.3", + "version": "1.4.7", "description": "Python templates supplied by the Amplify Team", "repository": { "type": "git", @@ -25,7 +25,7 @@ "extract-api": "ts-node ../../scripts/extract-api.ts" }, "dependencies": { - "@aws-amplify/amplify-function-plugin-interface": "1.10.2" + "@aws-amplify/amplify-function-plugin-interface": "1.12.1" }, "devDependencies": { "@types/fs-extra": "^8.0.1", diff --git a/packages/amplify-storage-simulator/CHANGELOG.md b/packages/amplify-storage-simulator/CHANGELOG.md index aaa1d59c13c..9af056ef3e9 100644 --- a/packages/amplify-storage-simulator/CHANGELOG.md +++ b/packages/amplify-storage-simulator/CHANGELOG.md @@ -3,6 +3,87 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.11.6](https://github.com/aws-amplify/amplify-cli/compare/amplify-storage-simulator@1.11.5...amplify-storage-simulator@1.11.6) (2025-01-02) + +**Note:** Version bump only for package amplify-storage-simulator + + + + + +## [1.11.5](https://github.com/aws-amplify/amplify-cli/compare/amplify-storage-simulator@1.11.4...amplify-storage-simulator@1.11.5) (2024-11-18) + +**Note:** Version bump only for package amplify-storage-simulator + + + + + +## [1.11.4](https://github.com/aws-amplify/amplify-cli/compare/amplify-storage-simulator@1.11.3...amplify-storage-simulator@1.11.4) (2024-10-05) + +**Note:** Version bump only for package amplify-storage-simulator + + + + + +## [1.11.3](https://github.com/aws-amplify/amplify-cli/compare/amplify-storage-simulator@1.11.1...amplify-storage-simulator@1.11.3) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [1.11.2](https://github.com/aws-amplify/amplify-cli/compare/amplify-storage-simulator@1.11.1...amplify-storage-simulator@1.11.2) (2023-11-08) + +**Note:** Version bump only for package amplify-storage-simulator + + + + + +## [1.11.1](https://github.com/aws-amplify/amplify-cli/compare/amplify-storage-simulator@1.11.0...amplify-storage-simulator@1.11.1) (2023-10-05) + +**Note:** Version bump only for package amplify-storage-simulator + + + + + +# [1.11.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-storage-simulator@1.10.0...amplify-storage-simulator@1.11.0) (2023-08-17) + + +### Features + +* generate components using graphql ([1568581](https://github.com/aws-amplify/amplify-cli/commit/15685810460881aa71e88724398b9be05ba53781)) + + + + + +# [1.10.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-storage-simulator@1.9.1...amplify-storage-simulator@1.10.0) (2023-07-20) + + +### Features + +* uibuilder codegen service ([#12896](https://github.com/aws-amplify/amplify-cli/issues/12896)) ([3fe2f98](https://github.com/aws-amplify/amplify-cli/commit/3fe2f98a99a9daf22efccb23a031882ea2be899b)) + + + + + +## [1.9.1](https://github.com/aws-amplify/amplify-cli/compare/amplify-storage-simulator@1.9.0...amplify-storage-simulator@1.9.1) (2023-06-13) + +**Note:** Version bump only for package amplify-storage-simulator + + + + + # [1.9.0](https://github.com/aws-amplify/amplify-cli/compare/amplify-storage-simulator@1.8.0...amplify-storage-simulator@1.9.0) (2023-05-11) diff --git a/packages/amplify-storage-simulator/package.json b/packages/amplify-storage-simulator/package.json index 4a3f0fb2bad..36a731a3e9c 100644 --- a/packages/amplify-storage-simulator/package.json +++ b/packages/amplify-storage-simulator/package.json @@ -1,6 +1,6 @@ { "name": "amplify-storage-simulator", - "version": "1.9.0", + "version": "1.11.6", "description": "An S3 simulator to test S3 APIs", "repository": { "type": "git", @@ -26,7 +26,7 @@ "body-parser": "^1.19.2", "cors": "^2.8.5", "etag": "^1.8.1", - "express": "^4.17.3", + "express": "^4.21.2", "fs-extra": "^8.1.0", "glob": "^7.2.0", "object-to-xml": "^2.0.0", @@ -44,7 +44,7 @@ "@types/serve-static": "^1.13.3", "@types/uuid": "^8.3.1", "@types/xml": "^1.0.4", - "aws-sdk": "^2.1354.0" + "aws-sdk": "^2.1464.0" }, "berry": { "plugins": [ diff --git a/packages/amplify-util-headless-input/CHANGELOG.md b/packages/amplify-util-headless-input/CHANGELOG.md index e8f7633e4ad..2679133ccf3 100644 --- a/packages/amplify-util-headless-input/CHANGELOG.md +++ b/packages/amplify-util-headless-input/CHANGELOG.md @@ -3,6 +3,57 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.9.18](https://github.com/aws-amplify/amplify-cli/compare/amplify-util-headless-input@1.9.17...amplify-util-headless-input@1.9.18) (2024-05-07) + +**Note:** Version bump only for package amplify-util-headless-input + + + + + +## [1.9.17](https://github.com/aws-amplify/amplify-cli/compare/amplify-util-headless-input@1.9.15...amplify-util-headless-input@1.9.17) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [1.9.16](https://github.com/aws-amplify/amplify-cli/compare/amplify-util-headless-input@1.9.15...amplify-util-headless-input@1.9.16) (2023-11-08) + +**Note:** Version bump only for package amplify-util-headless-input + + + + + +## [1.9.15](https://github.com/aws-amplify/amplify-cli/compare/amplify-util-headless-input@1.9.14...amplify-util-headless-input@1.9.15) (2023-08-17) + +**Note:** Version bump only for package amplify-util-headless-input + + + + + +## [1.9.14](https://github.com/aws-amplify/amplify-cli/compare/amplify-util-headless-input@1.9.13...amplify-util-headless-input@1.9.14) (2023-08-09) + +**Note:** Version bump only for package amplify-util-headless-input + + + + + +## [1.9.13](https://github.com/aws-amplify/amplify-cli/compare/amplify-util-headless-input@1.9.12...amplify-util-headless-input@1.9.13) (2023-06-13) + +**Note:** Version bump only for package amplify-util-headless-input + + + + + ## [1.9.12](https://github.com/aws-amplify/amplify-cli/compare/amplify-util-headless-input@1.9.10...amplify-util-headless-input@1.9.12) (2023-04-14) **Note:** Version bump only for package amplify-util-headless-input diff --git a/packages/amplify-util-headless-input/package.json b/packages/amplify-util-headless-input/package.json index 7f0181f0d7d..816f340666a 100644 --- a/packages/amplify-util-headless-input/package.json +++ b/packages/amplify-util-headless-input/package.json @@ -1,6 +1,6 @@ { "name": "amplify-util-headless-input", - "version": "1.9.12", + "version": "1.9.18", "description": "Logic for validating objects against JSON-schema specs and performing version upgrades when necessary / possible", "main": "lib/index.js", "scripts": { @@ -17,7 +17,7 @@ "license": "Apache-2.0", "dependencies": { "ajv": "^6.12.6", - "amplify-headless-interface": "1.17.3" + "amplify-headless-interface": "1.17.7" }, "devDependencies": { "@types/json-schema": "^7.0.5", diff --git a/packages/amplify-util-headless-input/src/__tests__/auth/import/index.test.ts b/packages/amplify-util-headless-input/src/__tests__/auth/import/index.test.ts index 5b6a0e5b0be..054276aace7 100644 --- a/packages/amplify-util-headless-input/src/__tests__/auth/import/index.test.ts +++ b/packages/amplify-util-headless-input/src/__tests__/auth/import/index.test.ts @@ -16,7 +16,7 @@ describe('validates import auth headless request', () => { it('with a rejected promise when an invalid payload is supplied', async () => { const resultPromise = validateImportAuthRequest('garbage'); - expect(resultPromise).rejects.toBeTruthy(); + await expect(resultPromise).rejects.toBeTruthy(); }); test.each([ diff --git a/packages/amplify-util-headless-input/src/__tests__/geo/add/index.test.ts b/packages/amplify-util-headless-input/src/__tests__/geo/add/index.test.ts index 9964b665c00..3618b5c2a14 100644 --- a/packages/amplify-util-headless-input/src/__tests__/geo/add/index.test.ts +++ b/packages/amplify-util-headless-input/src/__tests__/geo/add/index.test.ts @@ -13,6 +13,6 @@ describe('validate add geo request', () => { it('rejects promise when invalid payload', async () => { const resultPromise = validateAddGeoRequest('garbage'); - expect(resultPromise).rejects.toBeTruthy(); + await expect(resultPromise).rejects.toBeTruthy(); }); }); diff --git a/packages/amplify-util-headless-input/src/__tests__/geo/update/index.test.ts b/packages/amplify-util-headless-input/src/__tests__/geo/update/index.test.ts index 1ec4f792395..2c4012c900e 100644 --- a/packages/amplify-util-headless-input/src/__tests__/geo/update/index.test.ts +++ b/packages/amplify-util-headless-input/src/__tests__/geo/update/index.test.ts @@ -1,6 +1,6 @@ import fs from 'fs-extra'; import path from 'path'; -import { validateAddGeoRequest, validateUpdateGeoRequest } from '../../../index'; +import { validateUpdateGeoRequest } from '../../../index'; const assetRoot = path.resolve(path.join(__dirname, '..', '..', 'assets')); @@ -13,6 +13,6 @@ describe('validate update geo request', () => { it('rejects promise when invalid payload', async () => { const resultPromise = validateUpdateGeoRequest('garbage'); - expect(resultPromise).rejects.toBeTruthy(); + await expect(resultPromise).rejects.toBeTruthy(); }); }); diff --git a/packages/amplify-util-headless-input/src/__tests__/storage/import/index.test.ts b/packages/amplify-util-headless-input/src/__tests__/storage/import/index.test.ts index 109f3ae052e..146cb00a57f 100644 --- a/packages/amplify-util-headless-input/src/__tests__/storage/import/index.test.ts +++ b/packages/amplify-util-headless-input/src/__tests__/storage/import/index.test.ts @@ -20,7 +20,7 @@ describe('validates import storage headless request', () => { it('non-json content rejects', async () => { const resultPromise = validateImportStorageRequest('garbage'); - expect(resultPromise).rejects.toBeTruthy(); + await expect(resultPromise).rejects.toBeTruthy(); }); test.each([ diff --git a/packages/amplify-util-import/CHANGELOG.md b/packages/amplify-util-import/CHANGELOG.md index e50af3d8cd3..b3dd9878205 100644 --- a/packages/amplify-util-import/CHANGELOG.md +++ b/packages/amplify-util-import/CHANGELOG.md @@ -3,6 +3,63 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.8.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-import@2.8.1...@aws-amplify/amplify-util-import@2.8.3) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [2.8.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-import@2.8.1...@aws-amplify/amplify-util-import@2.8.2) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-util-import + + + + + +## [2.8.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-import@2.8.0...@aws-amplify/amplify-util-import@2.8.1) (2023-10-05) + +**Note:** Version bump only for package @aws-amplify/amplify-util-import + + + + + +# [2.8.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-import@2.7.0...@aws-amplify/amplify-util-import@2.8.0) (2023-08-17) + + +### Features + +* generate components using graphql ([1568581](https://github.com/aws-amplify/amplify-cli/commit/15685810460881aa71e88724398b9be05ba53781)) + + + + + +# [2.7.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-import@2.6.1...@aws-amplify/amplify-util-import@2.7.0) (2023-07-20) + + +### Features + +* uibuilder codegen service ([#12896](https://github.com/aws-amplify/amplify-cli/issues/12896)) ([3fe2f98](https://github.com/aws-amplify/amplify-cli/commit/3fe2f98a99a9daf22efccb23a031882ea2be899b)) + + + + + +## [2.6.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-import@2.6.0...@aws-amplify/amplify-util-import@2.6.1) (2023-06-13) + +**Note:** Version bump only for package @aws-amplify/amplify-util-import + + + + + # [2.6.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-import@2.5.0...@aws-amplify/amplify-util-import@2.6.0) (2023-05-11) diff --git a/packages/amplify-util-import/package.json b/packages/amplify-util-import/package.json index 16b14fe6f25..ed3e3daa34a 100644 --- a/packages/amplify-util-import/package.json +++ b/packages/amplify-util-import/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-util-import", - "version": "2.6.0", + "version": "2.8.3", "description": "Resource import support package", "main": "lib/index.js", "scripts": { @@ -20,7 +20,7 @@ "author": "Amazon Web Services", "license": "Apache-2.0", "dependencies": { - "aws-sdk": "^2.1354.0" + "aws-sdk": "^2.1464.0" }, "devDependencies": { "@types/node": "^12.12.6" diff --git a/packages/amplify-util-mock/.npmignore b/packages/amplify-util-mock/.npmignore index d8a7ec01f9d..95466a5a573 100644 --- a/packages/amplify-util-mock/.npmignore +++ b/packages/amplify-util-mock/.npmignore @@ -1,6 +1,7 @@ **/__mocks__/** **/__tests__/** **/__e2e__/** +**/__e2e_v2__/** src tsconfig.json tsconfig.tsbuildinfo diff --git a/packages/amplify-util-mock/CHANGELOG.md b/packages/amplify-util-mock/CHANGELOG.md index 53f4d55b521..7446defda8f 100644 --- a/packages/amplify-util-mock/CHANGELOG.md +++ b/packages/amplify-util-mock/CHANGELOG.md @@ -3,6 +3,357 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.10.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.10.10...@aws-amplify/amplify-util-mock@5.10.11) (2025-01-30) + +**Note:** Version bump only for package @aws-amplify/amplify-util-mock + + + + + +## [5.10.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.10.9...@aws-amplify/amplify-util-mock@5.10.10) (2025-01-16) + +**Note:** Version bump only for package @aws-amplify/amplify-util-mock + + + + + +## [5.10.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.10.8...@aws-amplify/amplify-util-mock@5.10.9) (2025-01-02) + + +### Reverts + +* Revert "chore: cateogry-api + codegen version bump (#14048)" (#14049) ([5a0cdbf](https://github.com/aws-amplify/amplify-cli/commit/5a0cdbfa46856da320323923a4336d6ba60d82b9)), closes [#14048](https://github.com/aws-amplify/amplify-cli/issues/14048) [#14049](https://github.com/aws-amplify/amplify-cli/issues/14049) + + + + + +## [5.10.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.10.7...@aws-amplify/amplify-util-mock@5.10.8) (2024-11-18) + + +### Bug Fixes + +* bump versions ([#13985](https://github.com/aws-amplify/amplify-cli/issues/13985)) ([65c4d3a](https://github.com/aws-amplify/amplify-cli/commit/65c4d3af9ad17e48f99acf7ee904ee97d2dcfcb1)) + + + + + +## [5.10.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.10.6...@aws-amplify/amplify-util-mock@5.10.7) (2024-10-05) + +**Note:** Version bump only for package @aws-amplify/amplify-util-mock + + + + + +## [5.10.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.10.5...@aws-amplify/amplify-util-mock@5.10.6) (2024-08-06) + + +### Bug Fixes + +* update awaiter s3 key ([#13872](https://github.com/aws-amplify/amplify-cli/issues/13872)) ([dacfab7](https://github.com/aws-amplify/amplify-cli/commit/dacfab73fcc53586b873f99e149d44c390b2d76f)) + + + + + +## [5.10.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.10.4...@aws-amplify/amplify-util-mock@5.10.5) (2024-08-02) + +**Note:** Version bump only for package @aws-amplify/amplify-util-mock + + + + + +## [5.10.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.10.3...@aws-amplify/amplify-util-mock@5.10.4) (2024-06-27) + +**Note:** Version bump only for package @aws-amplify/amplify-util-mock + + + + + +## [5.10.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.10.2...@aws-amplify/amplify-util-mock@5.10.3) (2024-06-20) + +**Note:** Version bump only for package @aws-amplify/amplify-util-mock + + + + + +## [5.10.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.10.1...@aws-amplify/amplify-util-mock@5.10.2) (2024-06-06) + +**Note:** Version bump only for package @aws-amplify/amplify-util-mock + + + + + +## [5.10.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.10.0...@aws-amplify/amplify-util-mock@5.10.1) (2024-05-24) + +**Note:** Version bump only for package @aws-amplify/amplify-util-mock + + + + + +# [5.10.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.9.6...@aws-amplify/amplify-util-mock@5.10.0) (2024-05-07) + + +### Features + +* support https for mock util plugin ([#13700](https://github.com/aws-amplify/amplify-cli/issues/13700)) ([cf418f1](https://github.com/aws-amplify/amplify-cli/commit/cf418f1d9ebc46fff8e12abe7a61d9a5e4ccdfe7)) + + + + + +## [5.9.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.9.5...@aws-amplify/amplify-util-mock@5.9.6) (2024-04-18) + +**Note:** Version bump only for package @aws-amplify/amplify-util-mock + + + + + +## [5.9.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.9.4...@aws-amplify/amplify-util-mock@5.9.5) (2024-04-15) + + +### Bug Fixes + +* resolve issues with graphiql explorer ([#13691](https://github.com/aws-amplify/amplify-cli/issues/13691)) ([4d0677d](https://github.com/aws-amplify/amplify-cli/commit/4d0677def73fb0d1c2fb77e30ed8b7c0e34cfebd)) + + + + + +## [5.9.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.9.3...@aws-amplify/amplify-util-mock@5.9.4) (2024-03-29) + +**Note:** Version bump only for package @aws-amplify/amplify-util-mock + + + + + +## [5.9.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.9.2...@aws-amplify/amplify-util-mock@5.9.3) (2024-03-06) + +**Note:** Version bump only for package @aws-amplify/amplify-util-mock + + + + + +## [5.9.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.9.1...@aws-amplify/amplify-util-mock@5.9.2) (2024-01-10) + +**Note:** Version bump only for package @aws-amplify/amplify-util-mock + + + + + +## [5.9.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.9.0...@aws-amplify/amplify-util-mock@5.9.1) (2023-12-16) + +**Note:** Version bump only for package @aws-amplify/amplify-util-mock + + + + + +# [5.9.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.8.4...@aws-amplify/amplify-util-mock@5.9.0) (2023-12-11) + + +### Features + +* bump data dependencies to launch RDS feature ([#13409](https://github.com/aws-amplify/amplify-cli/issues/13409)) ([7fbf29f](https://github.com/aws-amplify/amplify-cli/commit/7fbf29f56eb7335d20de0b5526fbed7795a2af09)) + + + + + +## [5.8.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.8.2...@aws-amplify/amplify-util-mock@5.8.4) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [5.8.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.8.2...@aws-amplify/amplify-util-mock@5.8.3) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-util-mock + + + + + +## [5.8.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.8.1...@aws-amplify/amplify-util-mock@5.8.2) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-util-mock + + + + + +## [5.8.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.8.0...@aws-amplify/amplify-util-mock@5.8.1) (2023-10-21) + +**Note:** Version bump only for package @aws-amplify/amplify-util-mock + + + + + +# [5.8.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.7.0...@aws-amplify/amplify-util-mock@5.8.0) (2023-10-12) + + +### Features + +* codegen support for Amplify Android Lazy loading and custom selection set ([8f9d855](https://github.com/aws-amplify/amplify-cli/commit/8f9d855a6eb74a8d0452b2878a65ff5222ac61ee)) + + + + + +# [5.7.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.6.2...@aws-amplify/amplify-util-mock@5.7.0) (2023-10-05) + + +### Features + +* **amplify-util-uibuilder:** amplify js backwards compatibility ([#13288](https://github.com/aws-amplify/amplify-cli/issues/13288)) ([2db3e18](https://github.com/aws-amplify/amplify-cli/commit/2db3e181cf06954085eb8fade0b26162672327db)) + + + + + +## [5.6.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.6.1...@aws-amplify/amplify-util-mock@5.6.2) (2023-10-03) + + +### Bug Fixes + +* add missing config value for mock tests ([4445f8e](https://github.com/aws-amplify/amplify-cli/commit/4445f8e6eedc0e848de97365a6ee65eb6495aa33)) +* update api category and codegen to capture high-priority bug-fixes ([3836b90](https://github.com/aws-amplify/amplify-cli/commit/3836b90b3f9ccd654d9c1b61a4b83c9c4712290c)) + + + + + +## [5.6.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.6.0...@aws-amplify/amplify-util-mock@5.6.1) (2023-09-27) + +**Note:** Version bump only for package @aws-amplify/amplify-util-mock + + + + + +# [5.6.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.5.1...@aws-amplify/amplify-util-mock@5.6.0) (2023-09-22) + + +### Features + +* support codegen and modelgen commands in non-amplify directories ([#13245](https://github.com/aws-amplify/amplify-cli/issues/13245)) ([85dd5cb](https://github.com/aws-amplify/amplify-cli/commit/85dd5cb6b33d8df41e35c2cbcf3b3b0e390b1af0)) + + + + + +## [5.5.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.5.0...@aws-amplify/amplify-util-mock@5.5.1) (2023-08-31) + + +### Bug Fixes + +* exclude tests from publish ([#13153](https://github.com/aws-amplify/amplify-cli/issues/13153)) ([1b1fe09](https://github.com/aws-amplify/amplify-cli/commit/1b1fe09a1c08be0262a1013f71354abd7160722a)) + + + + + +# [5.5.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.4.4...@aws-amplify/amplify-util-mock@5.5.0) (2023-08-17) + + +### Features + +* generate components using graphql ([1568581](https://github.com/aws-amplify/amplify-cli/commit/15685810460881aa71e88724398b9be05ba53781)) + + + + + +## [5.4.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.4.3...@aws-amplify/amplify-util-mock@5.4.4) (2023-08-09) + + +### Bug Fixes + +* Dependabot alerts for semver, tough-cookie ([#12962](https://github.com/aws-amplify/amplify-cli/issues/12962)) ([175a86b](https://github.com/aws-amplify/amplify-cli/commit/175a86b89a54c65bb6e68c0609be503d61e39d63)) + + + + + +## [5.4.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.4.2...@aws-amplify/amplify-util-mock@5.4.3) (2023-07-28) + +**Note:** Version bump only for package @aws-amplify/amplify-util-mock + + + + + +## [5.4.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.4.1...@aws-amplify/amplify-util-mock@5.4.2) (2023-07-27) + +**Note:** Version bump only for package @aws-amplify/amplify-util-mock + + + + + +## [5.4.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.4.0...@aws-amplify/amplify-util-mock@5.4.1) (2023-07-24) + +**Note:** Version bump only for package @aws-amplify/amplify-util-mock + + + + + +# [5.4.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.3.1...@aws-amplify/amplify-util-mock@5.4.0) (2023-07-20) + + +### Features + +* **amplify-util-mock:** import custom port from mock.json ([#10978](https://github.com/aws-amplify/amplify-cli/issues/10978)) ([31f250c](https://github.com/aws-amplify/amplify-cli/commit/31f250c03b6aa8423f1c574142a663840c566cec)) +* uibuilder codegen service ([#12896](https://github.com/aws-amplify/amplify-cli/issues/12896)) ([3fe2f98](https://github.com/aws-amplify/amplify-cli/commit/3fe2f98a99a9daf22efccb23a031882ea2be899b)) + + + + + +## [5.3.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.3.0...@aws-amplify/amplify-util-mock@5.3.1) (2023-06-16) + +**Note:** Version bump only for package @aws-amplify/amplify-util-mock + + + + + +# [5.3.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.2.3...@aws-amplify/amplify-util-mock@5.3.0) (2023-06-13) + + +### Bug Fixes + +* lint warnings ([#12738](https://github.com/aws-amplify/amplify-cli/issues/12738)) ([99026e1](https://github.com/aws-amplify/amplify-cli/commit/99026e1a0282bd621eb579fdca8ec3653e8daff2)) + + +### Features + +* display error message instead of object ([#12636](https://github.com/aws-amplify/amplify-cli/issues/12636)) ([811e8fc](https://github.com/aws-amplify/amplify-cli/commit/811e8fcd48f15b37401643b9b13f628acb4708bd)) + + + + + ## [5.2.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-mock@5.2.1...@aws-amplify/amplify-util-mock@5.2.3) (2023-05-25) diff --git a/packages/amplify-util-mock/package.json b/packages/amplify-util-mock/package.json index 9913a216863..520ff4ef681 100644 --- a/packages/amplify-util-mock/package.json +++ b/packages/amplify-util-mock/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-util-mock", - "version": "5.2.3", + "version": "5.10.11", "description": "amplify cli plugin providing local testing", "repository": { "type": "git", @@ -31,17 +31,18 @@ "extract-api": "ts-node ../../scripts/extract-api.ts" }, "dependencies": { - "@aws-amplify/amplify-appsync-simulator": "2.12.3", - "@aws-amplify/amplify-category-function": "5.3.3", - "@aws-amplify/amplify-cli-core": "4.0.8", - "@aws-amplify/amplify-environment-parameters": "1.6.3", - "@aws-amplify/amplify-opensearch-simulator": "1.4.3", - "@aws-amplify/amplify-prompts": "2.7.0", - "@aws-amplify/amplify-provider-awscloudformation": "8.2.3", + "@aws-amplify/amplify-appsync-simulator": "2.16.9", + "@aws-amplify/amplify-category-function": "5.7.11", + "@aws-amplify/amplify-cli-core": "4.3.11", + "@aws-amplify/amplify-environment-parameters": "1.9.16", + "@aws-amplify/amplify-opensearch-simulator": "1.7.16", + "@aws-amplify/amplify-prompts": "2.8.6", + "@aws-amplify/amplify-provider-awscloudformation": "8.11.3", "@hapi/topo": "^5.0.0", - "amplify-codegen": "^4.1.1", - "amplify-dynamodb-simulator": "2.7.3", - "amplify-storage-simulator": "1.9.0", + "amplify-codegen": "^4.10.2", + "amplify-dynamodb-simulator": "2.9.20", + "amplify-storage-simulator": "1.11.6", + "axios": "^1.6.7", "chokidar": "^3.5.3", "detect-port": "^1.3.0", "dotenv": "^8.2.0", @@ -50,47 +51,50 @@ "inquirer": "^7.3.3", "lodash": "^4.17.21", "node-fetch": "^2.6.7", - "semver": "^7.3.5", + "semver": "^7.5.4", "which": "^2.0.2" }, "devDependencies": { - "@aws-amplify/amplify-function-plugin-interface": "1.10.2", - "@aws-amplify/graphql-auth-transformer": "^2.1.6", - "@aws-amplify/graphql-default-value-transformer": "^1.1.6", - "@aws-amplify/graphql-function-transformer": "^1.2.4", - "@aws-amplify/graphql-http-transformer": "1.2.4", - "@aws-amplify/graphql-index-transformer": "^1.2.2", - "@aws-amplify/graphql-maps-to-transformer": "^2.1.6", - "@aws-amplify/graphql-model-transformer": "^1.3.2", - "@aws-amplify/graphql-predictions-transformer": "^1.2.4", - "@aws-amplify/graphql-relational-transformer": "^1.2.2", - "@aws-amplify/graphql-searchable-transformer": "^1.2.4", - "@aws-amplify/graphql-transformer-core": "^1.3.2", - "@aws-amplify/graphql-transformer-interfaces": "^2.2.1", - "@aws-amplify/graphql-transformer-migrator": "^2.1.6", + "@aws-amplify/amplify-function-plugin-interface": "1.12.1", + "@aws-amplify/graphql-auth-transformer": "^3.6.8", + "@aws-amplify/graphql-default-value-transformer": "^2.3.16", + "@aws-amplify/graphql-function-transformer": "^2.1.28", + "@aws-amplify/graphql-http-transformer": "^2.1.28", + "@aws-amplify/graphql-index-transformer": "^2.4.12", + "@aws-amplify/graphql-maps-to-transformer": "^3.4.26", + "@aws-amplify/graphql-model-transformer": "^2.11.7", + "@aws-amplify/graphql-predictions-transformer": "^2.1.28", + "@aws-amplify/graphql-relational-transformer": "^2.5.14", + "@aws-amplify/graphql-searchable-transformer": "^2.7.12", + "@aws-amplify/graphql-transformer": "^1.1.0", + "@aws-amplify/graphql-transformer-core": "^2.9.4", + "@aws-amplify/graphql-transformer-interfaces": "^3.10.2", + "@aws-amplify/graphql-transformer-migrator": "^2.2.28", "@types/detect-port": "^1.3.0", "@types/jest": "^29.0.0", "@types/lodash": "^4.14.149", "@types/node": "^12.12.6", "@types/semver": "^7.1.0", "@types/which": "^1.3.2", - "amplify-nodejs-function-runtime-provider": "2.4.3", + "amplify-nodejs-function-runtime-provider": "2.5.25", "aws-appsync": "^4.1.4", - "aws-sdk": "^2.1354.0", - "aws-sdk-mock": "^5.8.0", - "axios": "^0.26.0", + "aws-cdk-lib": "~2.177.0", + "aws-sdk": "^2.1464.0", + "aws-sdk-mock": "^6.2.0", + "axios": "^1.6.7", + "constructs": "^10.0.5", "graphql": "^15.5.0", - "graphql-auth-transformer": "^7.2.56", - "graphql-connection-transformer": "^5.2.55", - "graphql-dynamodb-transformer": "^7.2.55", - "graphql-function-transformer": "^3.3.46", - "graphql-key-transformer": "^3.2.55", + "graphql-auth-transformer": "^7.2.82", + "graphql-connection-transformer": "^5.2.80", + "graphql-dynamodb-transformer": "^7.2.80", + "graphql-function-transformer": "^3.3.71", + "graphql-key-transformer": "^3.2.80", "graphql-tag": "^2.10.1", - "graphql-transformer-core": "^8.1.2", - "graphql-versioned-transformer": "^5.2.55", + "graphql-transformer-core": "^8.2.13", + "graphql-versioned-transformer": "^5.2.80", "isomorphic-fetch": "^3.0.0", "jest": "^29.0.0", - "jsonwebtoken": "^9.0.0", + "jose": "^5.2.0", "uuid": "^8.3.2", "ws": "^7.5.7" }, diff --git a/packages/amplify-util-mock/src/__e2e__/connections-with-auth-tests.e2e.test.ts b/packages/amplify-util-mock/src/__e2e__/connections-with-auth-tests.e2e.test.ts index 3bbed285125..b11295fe8dd 100644 --- a/packages/amplify-util-mock/src/__e2e__/connections-with-auth-tests.e2e.test.ts +++ b/packages/amplify-util-mock/src/__e2e__/connections-with-auth-tests.e2e.test.ts @@ -26,7 +26,7 @@ let GRAPHQL_CLIENT_2 = undefined; */ let GRAPHQL_CLIENT_3 = undefined; -let USER_POOL_ID = 'y9CqgkEJe'; +const USER_POOL_ID = 'y9CqgkEJe'; const USERNAME1 = 'user1@test.com'; const USERNAME2 = 'user2@test.com'; @@ -128,12 +128,10 @@ type Stage @model @auth(rules: [{ allow: groups, groups: ["Admin"]}]) { GRAPHQL_ENDPOINT = server.url + '/graphql'; logDebug(`Using graphql url: ${GRAPHQL_ENDPOINT}`); - const apiKey = result.config.appSync.apiKey; - // Verify we have all the details expect(GRAPHQL_ENDPOINT).toBeTruthy(); - const idToken = signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME1, USERNAME1, [ + const idToken = await signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME1, USERNAME1, [ ADMIN_GROUP_NAME, WATCHER_GROUP_NAME, PARTICIPANT_GROUP_NAME, @@ -142,12 +140,12 @@ type Stage @model @auth(rules: [{ allow: groups, groups: ["Admin"]}]) { Authorization: idToken, }); - const idToken2 = signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME2, USERNAME2, [DEVS_GROUP_NAME]); + const idToken2 = await signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME2, USERNAME2, [DEVS_GROUP_NAME]); GRAPHQL_CLIENT_2 = new GraphQLClient(GRAPHQL_ENDPOINT, { Authorization: idToken2, }); - const idToken3 = signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME3, USERNAME3, []); + const idToken3 = await signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME3, USERNAME3, []); GRAPHQL_CLIENT_3 = new GraphQLClient(GRAPHQL_ENDPOINT, { Authorization: idToken3, }); diff --git a/packages/amplify-util-mock/src/__e2e__/key-with-auth.e2e.test.ts b/packages/amplify-util-mock/src/__e2e__/key-with-auth.e2e.test.ts index 80b7e4c3b60..4aab1b8ff9d 100644 --- a/packages/amplify-util-mock/src/__e2e__/key-with-auth.e2e.test.ts +++ b/packages/amplify-util-mock/src/__e2e__/key-with-auth.e2e.test.ts @@ -28,7 +28,7 @@ let GRAPHQL_CLIENT_2 = undefined; */ let GRAPHQL_CLIENT_3 = undefined; -let USER_POOL_ID = 'fake_user_pool'; +const USER_POOL_ID = 'fake_user_pool'; const USERNAME1 = 'user1@test.com'; const USERNAME2 = 'user2@test.com'; @@ -86,7 +86,7 @@ beforeAll(async () => { // Verify we have all the details expect(GRAPHQL_ENDPOINT).toBeTruthy(); - const idToken = signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME1, USERNAME1, [ + const idToken = await signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME1, USERNAME1, [ ADMIN_GROUP_NAME, PARTICIPANT_GROUP_NAME, PARTICIPANT_GROUP_NAME, @@ -95,12 +95,12 @@ beforeAll(async () => { Authorization: idToken, }); - const idToken2 = signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME2, USERNAME2, [DEVS_GROUP_NAME]); + const idToken2 = await signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME2, USERNAME2, [DEVS_GROUP_NAME]); GRAPHQL_CLIENT_2 = new GraphQLClient(GRAPHQL_ENDPOINT, { Authorization: idToken2, }); - const idToken3 = signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME3, USERNAME3, []); + const idToken3 = await signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME3, USERNAME3, []); GRAPHQL_CLIENT_3 = new GraphQLClient(GRAPHQL_ENDPOINT, { Authorization: idToken3, }); @@ -209,40 +209,6 @@ async function createOrder(client: GraphQLClient, customerEmail: string, orderId return result; } -async function updateOrder(client: GraphQLClient, customerEmail: string, orderId: string) { - const result = await client.query( - `mutation UpdateOrder($input: UpdateOrderInput!) { - updateOrder(input: $input) { - customerEmail - orderId - createdAt - } - }`, - { - input: { customerEmail, orderId }, - }, - ); - logDebug(JSON.stringify(result, null, 4)); - return result; -} - -async function deleteOrder(client: GraphQLClient, customerEmail: string, orderId: string) { - const result = await client.query( - `mutation DeleteOrder($input: DeleteOrderInput!) { - deleteOrder(input: $input) { - customerEmail - orderId - createdAt - } - }`, - { - input: { customerEmail, orderId }, - }, - ); - logDebug(JSON.stringify(result, null, 4)); - return result; -} - async function getOrder(client: GraphQLClient, customerEmail: string, orderId: string) { const result = await client.query( `query GetOrder($customerEmail: String!, $orderId: String!) { diff --git a/packages/amplify-util-mock/src/__e2e__/model-auth-transformer.e2e.test.ts b/packages/amplify-util-mock/src/__e2e__/model-auth-transformer.e2e.test.ts index 1adae16b106..c142d4b7bd8 100644 --- a/packages/amplify-util-mock/src/__e2e__/model-auth-transformer.e2e.test.ts +++ b/packages/amplify-util-mock/src/__e2e__/model-auth-transformer.e2e.test.ts @@ -157,9 +157,7 @@ beforeAll(async () => { GRAPHQL_ENDPOINT = server.url + '/graphql'; logDebug(`Using graphql url: ${GRAPHQL_ENDPOINT}`); - const apiKey = result.config.appSync.apiKey; - - const idToken = signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME1, USERNAME1, [ + const idToken = await signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME1, USERNAME1, [ ADMIN_GROUP_NAME, PARTICIPANT_GROUP_NAME, WATCHER_GROUP_NAME, @@ -168,7 +166,7 @@ beforeAll(async () => { Authorization: idToken, }); - const accessToken = signUpAddToGroupAndGetJwtToken( + const accessToken = await signUpAddToGroupAndGetJwtToken( USER_POOL_ID, USERNAME1, USERNAME1, @@ -179,12 +177,12 @@ beforeAll(async () => { Authorization: accessToken, }); - const idToken2 = signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME2, USERNAME2, [DEVS_GROUP_NAME]); + const idToken2 = await signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME2, USERNAME2, [DEVS_GROUP_NAME]); GRAPHQL_CLIENT_2 = new GraphQLClient(GRAPHQL_ENDPOINT, { Authorization: idToken2, }); - const idToken3 = signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME2, USERNAME3, []); + const idToken3 = await signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME2, USERNAME3, []); GRAPHQL_CLIENT_3 = new GraphQLClient(GRAPHQL_ENDPOINT, { Authorization: idToken3, }); @@ -540,7 +538,7 @@ test('Test listPosts query when authorized', async () => { expect(firstPost.data.createPost.createdAt).toBeDefined(); expect(firstPost.data.createPost.updatedAt).toBeDefined(); expect(firstPost.data.createPost.owner).toEqual(USERNAME1); - const secondPost = await GRAPHQL_CLIENT_2.query( + await GRAPHQL_CLIENT_2.query( `mutation { createPost(input: { title: "testing list" }) { id diff --git a/packages/amplify-util-mock/src/__e2e__/model-connection-transformer.e2e.test.ts b/packages/amplify-util-mock/src/__e2e__/model-connection-transformer.e2e.test.ts index a43737b37cc..efef192122e 100644 --- a/packages/amplify-util-mock/src/__e2e__/model-connection-transformer.e2e.test.ts +++ b/packages/amplify-util-mock/src/__e2e__/model-connection-transformer.e2e.test.ts @@ -143,7 +143,6 @@ test('Test queryPost query', async () => { const title = 'Test Query with Sort Field'; const comment1 = 'a comment and a date! - 1'; const comment2 = 'a comment and a date! - 2'; -const whenpast = '2017-10-01T00:00:00.000Z'; const when1 = '2018-10-01T00:00:00.000Z'; const whenmid = '2018-12-01T00:00:00.000Z'; const when2 = '2019-10-01T00:00:01.000Z'; diff --git a/packages/amplify-util-mock/src/__e2e__/model-with-maps-to.e2e.test.ts b/packages/amplify-util-mock/src/__e2e__/model-with-maps-to.e2e.test.ts index 0694f410e43..76e558d9e24 100644 --- a/packages/amplify-util-mock/src/__e2e__/model-with-maps-to.e2e.test.ts +++ b/packages/amplify-util-mock/src/__e2e__/model-with-maps-to.e2e.test.ts @@ -1,8 +1,4 @@ -/* eslint-disable import/no-extraneous-dependencies */ -import { ModelTransformer } from '@aws-amplify/graphql-model-transformer'; -import { MapsToTransformer } from '@aws-amplify/graphql-maps-to-transformer'; -import { AuthTransformer } from '@aws-amplify/graphql-auth-transformer'; -import { GraphQLTransform } from '@aws-amplify/graphql-transformer-core'; +import { transformAndSynth, defaultTransformParams } from '../__e2e_v2__/test-synthesizer'; import { GraphQLClient } from './utils/graphql-client'; import { deploy, launchDDBLocal, logDebug, terminateDDB } from './utils/index'; @@ -21,30 +17,24 @@ beforeAll(async () => { } `; try { - const transformer = new GraphQLTransform({ - transformers: [new ModelTransformer(), new AuthTransformer(), new MapsToTransformer()], - featureFlags: { - getBoolean: (value: string, defaultValue?: boolean): boolean => { - if (value === 'userSubUsernameForDefaultIdentityClaim') { - return false; - } - return defaultValue; - }, - getNumber: jest.fn(), - getObject: jest.fn(), + const out = transformAndSynth({ + ...defaultTransformParams, + schema: validSchema, + transformParameters: { + ...defaultTransformParams.transformParameters, + useSubUsernameForDefaultIdentityClaim: false, }, }); - const out = transformer.transform(validSchema); let ddbClient; ({ dbPath, emulator: ddbEmulator, client: ddbClient } = await launchDDBLocal()); const result = await deploy(out, ddbClient); server = result.simulator; - const endpoint = `${server.url}/graphql`; + const endpoint = server.url + '/graphql'; logDebug(`Using graphql url: ${endpoint}`); - const { apiKey } = result.config.appSync; + const apiKey = result.config.appSync.apiKey; graphqlClient = new GraphQLClient(endpoint, { 'x-api-key': apiKey }); } catch (e) { logDebug(e); @@ -60,7 +50,6 @@ afterAll(async () => { await terminateDDB(ddbEmulator, dbPath); } catch (e) { console.error(e); - // eslint-disable-next-line jest/no-standalone-expect expect(true).toEqual(false); } }); diff --git a/packages/amplify-util-mock/src/__e2e__/multi-auth-model-auth-transformer.e2e.test.ts b/packages/amplify-util-mock/src/__e2e__/multi-auth-model-auth-transformer.e2e.test.ts index b8051d96b70..805b20ada37 100644 --- a/packages/amplify-util-mock/src/__e2e__/multi-auth-model-auth-transformer.e2e.test.ts +++ b/packages/amplify-util-mock/src/__e2e__/multi-auth-model-auth-transformer.e2e.test.ts @@ -19,7 +19,7 @@ let GRAPHQL_ENDPOINT = undefined; let APIKEY_GRAPHQL_CLIENT = undefined; let USER_POOL_AUTH_CLIENT = undefined; -let USER_POOL_ID = 'fake_user_pool'; +const USER_POOL_ID = 'fake_user_pool'; const USERNAME1 = 'user1@test.com'; @@ -149,7 +149,7 @@ beforeAll(async () => { expect(GRAPHQL_ENDPOINT).toBeTruthy(); expect(USER_POOL_ID).toBeTruthy(); - const idToken = signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME1, USERNAME1, []); + const idToken = await signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME1, USERNAME1, []); USER_POOL_AUTH_CLIENT = new GraphQLClient(GRAPHQL_ENDPOINT, { Authorization: idToken, diff --git a/packages/amplify-util-mock/src/__e2e__/per-field-auth-tests.e2e.test.ts b/packages/amplify-util-mock/src/__e2e__/per-field-auth-tests.e2e.test.ts index 77d71abf3ea..421d52cbca0 100644 --- a/packages/amplify-util-mock/src/__e2e__/per-field-auth-tests.e2e.test.ts +++ b/packages/amplify-util-mock/src/__e2e__/per-field-auth-tests.e2e.test.ts @@ -138,7 +138,7 @@ beforeAll(async () => { expect(GRAPHQL_ENDPOINT).toBeTruthy(); // Configure Amplify, create users, and sign in. - const idToken = signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME1, USERNAME1, [ + const idToken = await signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME1, USERNAME1, [ ADMIN_GROUP_NAME, PARTICIPANT_GROUP_NAME, WATCHER_GROUP_NAME, @@ -148,12 +148,12 @@ beforeAll(async () => { Authorization: idToken, }); - const idToken2 = signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME2, USERNAME2, [DEVS_GROUP_NAME, INSTRUCTOR_GROUP_NAME]); + const idToken2 = await signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME2, USERNAME2, [DEVS_GROUP_NAME, INSTRUCTOR_GROUP_NAME]); GRAPHQL_CLIENT_2 = new GraphQLClient(GRAPHQL_ENDPOINT, { Authorization: idToken2, }); - const idToken3 = signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME3, USERNAME3, []); + const idToken3 = await signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME3, USERNAME3, []); GRAPHQL_CLIENT_3 = new GraphQLClient(GRAPHQL_ENDPOINT, { Authorization: idToken3, }); diff --git a/packages/amplify-util-mock/src/__e2e__/subscriptions-with-auth.e2e.test.ts b/packages/amplify-util-mock/src/__e2e__/subscriptions-with-auth.e2e.test.ts index 0e138eb580d..c6581de21f5 100644 --- a/packages/amplify-util-mock/src/__e2e__/subscriptions-with-auth.e2e.test.ts +++ b/packages/amplify-util-mock/src/__e2e__/subscriptions-with-auth.e2e.test.ts @@ -34,11 +34,9 @@ const AWS_REGION = 'my-local-2'; let APPSYNC_CLIENT_1: AWSAppSyncClient = undefined; let APPSYNC_CLIENT_2: AWSAppSyncClient = undefined; -let APPSYNC_CLIENT_3: AWSAppSyncClient = undefined; let GRAPHQL_CLIENT_1: GraphQLClient = undefined; let GRAPHQL_CLIENT_2: GraphQLClient = undefined; -let GRAPHQL_CLIENT_3: GraphQLClient = undefined; const USER_POOL_ID = 'fake_user_pool'; @@ -148,7 +146,7 @@ beforeAll(async () => { // Verify we have all the details expect(GRAPHQL_ENDPOINT).toBeTruthy(); // Configure Amplify, create users, and sign in. - const idToken1 = signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME1, USERNAME1, [INSTRUCTOR_GROUP_NAME, ADMIN_GROUP_NAME]); + const idToken1 = await signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME1, USERNAME1, [INSTRUCTOR_GROUP_NAME, ADMIN_GROUP_NAME]); APPSYNC_CLIENT_1 = new AWSAppSyncClient({ url: GRAPHQL_ENDPOINT, region: AWS_REGION, @@ -164,7 +162,7 @@ beforeAll(async () => { GRAPHQL_CLIENT_1 = new GraphQLClient(GRAPHQL_ENDPOINT, { Authorization: idToken1, }); - const idToken2 = signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME2, USERNAME2, [INSTRUCTOR_GROUP_NAME, MEMBER_GROUP_NAME]); + const idToken2 = await signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME2, USERNAME2, [INSTRUCTOR_GROUP_NAME, MEMBER_GROUP_NAME]); APPSYNC_CLIENT_2 = new AWSAppSyncClient({ url: GRAPHQL_ENDPOINT, region: AWS_REGION, @@ -180,8 +178,8 @@ beforeAll(async () => { GRAPHQL_CLIENT_2 = new GraphQLClient(GRAPHQL_ENDPOINT, { Authorization: idToken2, }); - const idToken3 = signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME3, USERNAME3, []); - APPSYNC_CLIENT_3 = new AWSAppSyncClient({ + const idToken3 = await signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME3, USERNAME3, []); + new AWSAppSyncClient({ url: GRAPHQL_ENDPOINT, region: AWS_REGION, disableOffline: true, @@ -193,7 +191,7 @@ beforeAll(async () => { jwtToken: idToken3, }, }); - GRAPHQL_CLIENT_3 = new GraphQLClient(GRAPHQL_ENDPOINT, { + new GraphQLClient(GRAPHQL_ENDPOINT, { Authorization: idToken3, }); @@ -237,8 +235,8 @@ test('Test that only authorized members are allowed to view subscriptions', asyn `, }); - const subscriptionPromise = new Promise((resolve, _) => { - let subscription = observer.subscribe((event: any) => { + const subscriptionPromise = new Promise((resolve) => { + const subscription = observer.subscribe((event: any) => { const student = event.data.onCreateStudent; subscription.unsubscribe(); expect(student.name).toEqual('student1'); @@ -261,7 +259,7 @@ test('Test that only authorized members are allowed to view subscriptions', asyn test('Test a subscription on update', async () => { // susbcribe to update students as user 2 - const subscriptionPromise = new Promise((resolve, _) => { + const subscriptionPromise = new Promise((resolve) => { const observer = APPSYNC_CLIENT_2.subscribe({ query: gql` subscription OnUpdateStudent { @@ -275,7 +273,7 @@ test('Test a subscription on update', async () => { } `, }); - let subscription = observer.subscribe((event: any) => { + const subscription = observer.subscribe((event: any) => { const student = event.data.onUpdateStudent; subscription.unsubscribe(); expect(student.id).toEqual(student3ID); @@ -309,7 +307,7 @@ test('Test a subscription on update', async () => { test('Test a subscription on delete', async () => { // subscribe to onDelete as user 2 - const subscriptionPromise = new Promise((resolve, _) => { + const subscriptionPromise = new Promise((resolve) => { const observer = APPSYNC_CLIENT_2.subscribe({ query: gql` subscription OnDeleteStudent { @@ -323,7 +321,7 @@ test('Test a subscription on delete', async () => { } `, }); - let subscription = observer.subscribe((event: any) => { + const subscription = observer.subscribe((event: any) => { const student = event.data.onDeleteStudent; subscription.unsubscribe(); expect(student.id).toEqual(student4ID); @@ -359,7 +357,7 @@ test('test that group is only allowed to listen to subscriptions and listen to o expect(result.errors[0].message === 'Unauthorized'); // though they should see when a new member is created - const subscriptionPromise = new Promise((resolve, _) => { + const subscriptionPromise = new Promise((resolve) => { const observer = APPSYNC_CLIENT_2.subscribe({ query: gql` subscription OnCreateMember { @@ -393,7 +391,7 @@ test('authorized group is allowed to listen to onUpdate', async () => { const memberID = '001'; const memberName = 'newUsername'; - const subscriptionPromise = new Promise((resolve, _) => { + const subscriptionPromise = new Promise((resolve) => { const observer = APPSYNC_CLIENT_2.subscribe({ query: gql` subscription OnUpdateMember { @@ -427,7 +425,7 @@ test('authoirzed group is allowed to listen to onDelete', async () => { const memberID = '001'; const memberName = 'newUsername'; - const subscriptionPromise = new Promise((resolve, _) => { + const subscriptionPromise = new Promise((resolve) => { const observer = APPSYNC_CLIENT_2.subscribe({ query: gql` subscription OnDeleteMember { @@ -459,7 +457,7 @@ test('authoirzed group is allowed to listen to onDelete', async () => { // ownerField Tests test('Test subscription onCreatePost with ownerField', async () => { - const subscriptionPromise = new Promise((resolve, _) => { + const subscriptionPromise = new Promise((resolve) => { const observer = APPSYNC_CLIENT_1.subscribe({ query: gql` subscription OnCreatePost { @@ -470,7 +468,7 @@ test('Test subscription onCreatePost with ownerField', async () => { } }`, }); - let subscription = observer.subscribe((event: any) => { + const subscription = observer.subscribe((event: any) => { const post = event.data.onCreatePost; subscription.unsubscribe(); expect(post.title).toEqual('someTitle'); diff --git a/packages/amplify-util-mock/src/__e2e__/utils/cognito-utils.ts b/packages/amplify-util-mock/src/__e2e__/utils/cognito-utils.ts index 6f4ab8bdea3..97b8c90da36 100644 --- a/packages/amplify-util-mock/src/__e2e__/utils/cognito-utils.ts +++ b/packages/amplify-util-mock/src/__e2e__/utils/cognito-utils.ts @@ -1,7 +1,7 @@ -import { sign, verify } from 'jsonwebtoken'; +import { SignJWT, jwtVerify, JWTPayload } from 'jose'; import { v4 } from 'uuid'; -export function signUpAddToGroupAndGetJwtToken( +export async function signUpAddToGroupAndGetJwtToken( userPool: string, username: string, email: string, @@ -22,16 +22,17 @@ export function signUpAddToGroupAndGetJwtToken( iat: Math.floor(Date.now() / 1000), email, }; - return generateToken(token); + return await generateToken(token); } -function generateToken(decodedToken: string | object): string { +async function generateToken(decodedToken: string | object): Promise { try { if (typeof decodedToken === 'string') { decodedToken = JSON.parse(decodedToken); } - const token = sign(decodedToken, 'open-secrete'); - verify(token, 'open-secrete'); + const secret = new TextEncoder().encode('open-secrete'); + const token = await new SignJWT(decodedToken as JWTPayload).setProtectedHeader({ alg: 'HS256' }).sign(secret); + await jwtVerify(token, secret); return token; } catch (e) { const err = new Error('Error when generating OIDC token: ' + e.message); diff --git a/packages/amplify-util-mock/src/__e2e__/utils/index.ts b/packages/amplify-util-mock/src/__e2e__/utils/index.ts index a63a2c9499f..6dd6290796b 100644 --- a/packages/amplify-util-mock/src/__e2e__/utils/index.ts +++ b/packages/amplify-util-mock/src/__e2e__/utils/index.ts @@ -74,7 +74,7 @@ export async function reDeploy( await createAndUpdateTable(client, config); config = configureDDBDataSource(config, client.config); } - configureLambdaDataSource(config); + await configureLambdaDataSource(config); simulator?.reload(config); return { simulator, config }; } @@ -85,7 +85,7 @@ async function configureLambdaDataSource(config) { .forEach((d) => { const arn = d.LambdaFunctionArn; const arnParts = arn.split(':'); - let functionName = arnParts[arnParts.length - 1]; + const functionName = arnParts[arnParts.length - 1]; const lambdaConfig = getFunctionDetails(functionName); d.invoke = (payload) => { logDebug('Invoking lambda with config', lambdaConfig); diff --git a/packages/amplify-util-mock/src/__e2e_v2__/function-transformer.e2e.test.ts b/packages/amplify-util-mock/src/__e2e_v2__/function-transformer.e2e.test.ts index c7fae83581e..45fd1ba513a 100644 --- a/packages/amplify-util-mock/src/__e2e_v2__/function-transformer.e2e.test.ts +++ b/packages/amplify-util-mock/src/__e2e_v2__/function-transformer.e2e.test.ts @@ -1,9 +1,6 @@ -import { ModelTransformer } from '@aws-amplify/graphql-model-transformer'; -import { FunctionTransformer } from '@aws-amplify/graphql-function-transformer'; -import { GraphQLTransform } from '@aws-amplify/graphql-transformer-core'; -import { FeatureFlagProvider } from '@aws-amplify/graphql-transformer-interfaces'; import { deploy, logDebug, GraphQLClient } from '../__e2e__/utils'; import { AmplifyAppSyncSimulator } from '@aws-amplify/amplify-appsync-simulator'; +import { transformAndSynth, defaultTransformParams } from './test-synthesizer'; jest.setTimeout(2000000); @@ -33,13 +30,10 @@ describe('@function transformer', () => { msg: String! }`; try { - const transformer = new GraphQLTransform({ - transformers: [new ModelTransformer(), new FunctionTransformer()], - featureFlags: { - getBoolean: (name) => (name === 'improvePluralization' ? true : false), - } as FeatureFlagProvider, + const out = transformAndSynth({ + ...defaultTransformParams, + schema: validSchema, }); - const out = transformer.transform(validSchema); const result = await deploy(out); server = result.simulator; diff --git a/packages/amplify-util-mock/src/__e2e_v2__/index-transformer.e2e.test.ts b/packages/amplify-util-mock/src/__e2e_v2__/index-transformer.e2e.test.ts index ceb2fcb9a86..c89b302c152 100644 --- a/packages/amplify-util-mock/src/__e2e_v2__/index-transformer.e2e.test.ts +++ b/packages/amplify-util-mock/src/__e2e_v2__/index-transformer.e2e.test.ts @@ -1,10 +1,6 @@ import { deploy, launchDDBLocal, logDebug, terminateDDB, GraphQLClient } from '../__e2e__/utils'; -import { ModelTransformer } from '@aws-amplify/graphql-model-transformer'; -import { GraphQLTransform } from '@aws-amplify/graphql-transformer-core'; -import { FeatureFlagProvider } from '@aws-amplify/graphql-transformer-interfaces'; -import { PrimaryKeyTransformer, IndexTransformer } from '@aws-amplify/graphql-index-transformer'; import { AmplifyAppSyncSimulator } from '@aws-amplify/amplify-appsync-simulator'; -import { AuthTransformer } from '@aws-amplify/graphql-auth-transformer'; +import { transformAndSynth, defaultTransformParams } from './test-synthesizer'; jest.setTimeout(2000000); @@ -61,13 +57,10 @@ describe('@index transformer', () => { updatedAt: AWSDateTime! }`; - const transformer = new GraphQLTransform({ - transformers: [new ModelTransformer(), new PrimaryKeyTransformer(), new IndexTransformer(), new AuthTransformer()], - featureFlags: { - getBoolean: (name) => (name === 'improvePluralization' ? true : false), - } as FeatureFlagProvider, + const out = transformAndSynth({ + schema: validSchema, + ...defaultTransformParams, }); - const out = transformer.transform(validSchema); let ddbClient; ({ dbPath, emulator: ddbEmulator, client: ddbClient } = await launchDDBLocal()); const result = await deploy(out, ddbClient); diff --git a/packages/amplify-util-mock/src/__e2e_v2__/model-relational-transformer.e2e.test.ts b/packages/amplify-util-mock/src/__e2e_v2__/model-relational-transformer.e2e.test.ts index c42c16852c7..eb28ea3ff96 100644 --- a/packages/amplify-util-mock/src/__e2e_v2__/model-relational-transformer.e2e.test.ts +++ b/packages/amplify-util-mock/src/__e2e_v2__/model-relational-transformer.e2e.test.ts @@ -1,11 +1,6 @@ -import { IndexTransformer, PrimaryKeyTransformer } from '@aws-amplify/graphql-index-transformer'; -import { BelongsToTransformer, HasManyTransformer, HasOneTransformer } from '@aws-amplify/graphql-relational-transformer'; -import { ModelTransformer } from '@aws-amplify/graphql-model-transformer'; -import { GraphQLTransform } from '@aws-amplify/graphql-transformer-core'; -import { FeatureFlagProvider } from '@aws-amplify/graphql-transformer-interfaces'; import { deploy, launchDDBLocal, terminateDDB, logDebug, GraphQLClient } from '../__e2e__/utils'; -import { AuthTransformer } from '@aws-amplify/graphql-auth-transformer'; import { AmplifyAppSyncSimulator } from '@aws-amplify/amplify-appsync-simulator'; +import { transformAndSynth, defaultTransformParams } from './test-synthesizer'; let GRAPHQL_CLIENT: GraphQLClient; let GRAPHQL_ENDPOINT: string; @@ -43,21 +38,14 @@ describe('@model with relational transformer', () => { }`; try { - const transformer = new GraphQLTransform({ - transformers: [ - new ModelTransformer(), - new IndexTransformer(), - new PrimaryKeyTransformer(), - new HasOneTransformer(), - new HasManyTransformer(), - new BelongsToTransformer(), - new AuthTransformer(), - ], - featureFlags: { - getBoolean: (name) => (name === 'improvePluralization' ? true : false), - } as FeatureFlagProvider, + const out = transformAndSynth({ + ...defaultTransformParams, + schema: validSchema, + transformParameters: { + ...defaultTransformParams.transformParameters, + respectPrimaryKeyAttributesOnConnectionField: false, + }, }); - const out = transformer.transform(validSchema); let ddbClient; ({ dbPath, emulator: ddbEmulator, client: ddbClient } = await launchDDBLocal()); diff --git a/packages/amplify-util-mock/src/__e2e_v2__/model-relational-with-key-transformer.e2e.test.ts b/packages/amplify-util-mock/src/__e2e_v2__/model-relational-with-key-transformer.e2e.test.ts index 4e100a4567c..c47e2f57dec 100644 --- a/packages/amplify-util-mock/src/__e2e_v2__/model-relational-with-key-transformer.e2e.test.ts +++ b/packages/amplify-util-mock/src/__e2e_v2__/model-relational-with-key-transformer.e2e.test.ts @@ -1,11 +1,6 @@ -import { ModelTransformer } from '@aws-amplify/graphql-model-transformer'; -import { HasManyTransformer, BelongsToTransformer, HasOneTransformer } from '@aws-amplify/graphql-relational-transformer'; -import { PrimaryKeyTransformer, IndexTransformer } from '@aws-amplify/graphql-index-transformer'; -import { GraphQLTransform } from '@aws-amplify/graphql-transformer-core'; -import { FeatureFlagProvider } from '@aws-amplify/graphql-transformer-interfaces'; import { deploy, launchDDBLocal, terminateDDB, logDebug, GraphQLClient } from '../__e2e__/utils'; -import { AuthTransformer } from '@aws-amplify/graphql-auth-transformer'; import { AmplifyAppSyncSimulator } from '@aws-amplify/amplify-appsync-simulator'; +import { transformAndSynth, defaultTransformParams } from './test-synthesizer'; let GRAPHQL_CLIENT: GraphQLClient; let GRAPHQL_ENDPOINT: string; @@ -65,21 +60,14 @@ describe('@model with relational transformers', () => { project: DProject @belongsTo(fields: ["dTeamProjectId"]) }`; try { - const transformer = new GraphQLTransform({ - transformers: [ - new ModelTransformer(), - new IndexTransformer(), - new PrimaryKeyTransformer(), - new HasOneTransformer(), - new HasManyTransformer(), - new BelongsToTransformer(), - new AuthTransformer(), - ], - featureFlags: { - getBoolean: (name) => (name === 'improvePluralization' ? true : false), - } as FeatureFlagProvider, + const out = transformAndSynth({ + ...defaultTransformParams, + schema: validSchema, + transformParameters: { + ...defaultTransformParams.transformParameters, + respectPrimaryKeyAttributesOnConnectionField: false, + }, }); - const out = transformer.transform(validSchema); let ddbClient; ({ dbPath, emulator: ddbEmulator, client: ddbClient } = await launchDDBLocal()); diff --git a/packages/amplify-util-mock/src/__e2e_v2__/model-transformer.e2e.test.ts b/packages/amplify-util-mock/src/__e2e_v2__/model-transformer.e2e.test.ts index 64aca1372ec..c239179f8ec 100644 --- a/packages/amplify-util-mock/src/__e2e_v2__/model-transformer.e2e.test.ts +++ b/packages/amplify-util-mock/src/__e2e_v2__/model-transformer.e2e.test.ts @@ -1,9 +1,6 @@ -import { AuthTransformer } from '@aws-amplify/graphql-auth-transformer'; -import { ModelTransformer } from '@aws-amplify/graphql-model-transformer'; -import { GraphQLTransform } from '@aws-amplify/graphql-transformer-core'; -import { FeatureFlagProvider } from '@aws-amplify/graphql-transformer-interfaces'; import { AmplifyAppSyncSimulator } from '@aws-amplify/amplify-appsync-simulator'; import { deploy, launchDDBLocal, terminateDDB, logDebug, GraphQLClient } from '../__e2e__/utils'; +import { transformAndSynth, defaultTransformParams } from './test-synthesizer'; let GRAPHQL_ENDPOINT: string; let GRAPHQL_CLIENT: GraphQLClient; @@ -54,13 +51,10 @@ describe('@model transformer', () => { }`; try { - const transformer = new GraphQLTransform({ - transformers: [new ModelTransformer(), new AuthTransformer()], - featureFlags: { - getBoolean: (name) => (name === 'improvePluralization' ? true : false), - } as FeatureFlagProvider, + const out = transformAndSynth({ + ...defaultTransformParams, + schema: validSchema, }); - const out = await transformer.transform(validSchema); let ddbClient; ({ dbPath, emulator: ddbEmulator, client: ddbClient } = await launchDDBLocal()); const result = await deploy(out, ddbClient); diff --git a/packages/amplify-util-mock/src/__e2e_v2__/searchable-transformer.e2e.test.ts b/packages/amplify-util-mock/src/__e2e_v2__/searchable-transformer.e2e.test.ts index dfe45a43fa2..2b807e3e381 100644 --- a/packages/amplify-util-mock/src/__e2e_v2__/searchable-transformer.e2e.test.ts +++ b/packages/amplify-util-mock/src/__e2e_v2__/searchable-transformer.e2e.test.ts @@ -1,6 +1,3 @@ -import { ModelTransformer } from '@aws-amplify/graphql-model-transformer'; -import { SearchableModelTransformer } from '@aws-amplify/graphql-searchable-transformer'; -import { GraphQLTransform } from '@aws-amplify/graphql-transformer-core'; import { deploy, launchDDBLocal, logDebug, GraphQLClient, terminateDDB, setupSearchableMockResources } from '../__e2e__/utils'; import { AmplifyAppSyncSimulator } from '@aws-amplify/amplify-appsync-simulator'; import * as openSearchEmulator from '@aws-amplify/amplify-opensearch-simulator'; @@ -9,6 +6,7 @@ import * as fs from 'fs-extra'; import * as path from 'path'; import { v4 } from 'uuid'; import fetch from 'node-fetch'; +import { transformAndSynth, defaultTransformParams } from './test-synthesizer'; jest.setTimeout(2000000); @@ -57,11 +55,14 @@ describe('@searchable transformer', () => { }`; try { - const transformer = new GraphQLTransform({ - transformers: [new ModelTransformer(), new SearchableModelTransformer()], - sandboxModeEnabled: true, + const out = transformAndSynth({ + ...defaultTransformParams, + schema: validSchema, + transformParameters: { + ...defaultTransformParams.transformParameters, + sandboxModeEnabled: true, + }, }); - const out = await transformer.transform(validSchema); let ddbClient; ({ dbPath, emulator: ddbEmulator, client: ddbClient } = await launchDDBLocal()); diff --git a/packages/amplify-util-mock/src/__e2e_v2__/test-synthesizer/deployment-resources.ts b/packages/amplify-util-mock/src/__e2e_v2__/test-synthesizer/deployment-resources.ts new file mode 100644 index 00000000000..99967b8bfdb --- /dev/null +++ b/packages/amplify-util-mock/src/__e2e_v2__/test-synthesizer/deployment-resources.ts @@ -0,0 +1,51 @@ +import { $TSAny } from '@aws-amplify/amplify-cli-core'; + +export interface Template { + AWSTemplateFormatVersion?: string; + Description?: string; + Metadata?: Record; + Parameters?: Record; + Mappings?: { + [key: string]: { + [key: string]: Record; + }; + }; + Conditions?: Record; + Transform?: $TSAny; + Resources?: Record; + Outputs?: Record; +} + +export interface StackMapping { + [resourceId: string]: string; +} + +export interface ResolversFunctionsAndSchema { + // Resolver templates keyed by their filename. + resolvers: Record; + // Contains mapping templates for pipeline functions. + pipelineFunctions: Record; + // Code for any functions that need to be deployed. + functions: Record; + // The full GraphQL schema. + schema: string; + // List of the user overridden slots + userOverriddenSlots: string[]; +} + +export interface NestedStacks { + // The root stack template. + rootStack: Template; + // All the nested stack templates. + stacks: Record; + // The full stack mapping for the deployment. + stackMapping: Record; +} + +/** + * The full set of resources needed for the deployment. + */ +export interface DeploymentResources extends ResolversFunctionsAndSchema, NestedStacks { + // The full stack mapping for the deployment. + stackMapping: StackMapping; +} diff --git a/packages/amplify-util-mock/src/__e2e_v2__/test-synthesizer/file-asset.ts b/packages/amplify-util-mock/src/__e2e_v2__/test-synthesizer/file-asset.ts new file mode 100644 index 00000000000..a52e4f4a69e --- /dev/null +++ b/packages/amplify-util-mock/src/__e2e_v2__/test-synthesizer/file-asset.ts @@ -0,0 +1,62 @@ +import * as crypto from 'crypto'; +import * as cdk from 'aws-cdk-lib'; +import { FileAssetPackaging, Stack } from 'aws-cdk-lib'; +import { Construct } from 'constructs'; +import { TransformerStackSynthesizer } from './stack-synthesizer'; + +export interface TemplateProps { + readonly fileContent: string; + readonly fileName: string; +} + +export class FileAsset extends Construct implements cdk.IAsset { + public readonly assetHash: string; + + public readonly httpUrl: string; + + public readonly s3BucketName: string; + + public readonly s3ObjectKey: string; + + public readonly s3ObjectUrl: string; + + constructor(scope: Construct, id: string, props: TemplateProps) { + super(scope, id); + + const rootStack = findRootStack(scope); + const synthesizer = rootStack.synthesizer; + + // eslint-disable-next-line spellcheck/spell-checker + // Check the constructor name instead of using 'instanceof' because the latter does not work + // with copies of the class, which happens with custom transformers. + // See: https://github.com/aws-amplify/amplify-cli/issues/9362 + if (synthesizer.constructor.name === TransformerStackSynthesizer.name) { + (synthesizer as TransformerStackSynthesizer).setMappingTemplates(props.fileName, props.fileContent); + this.assetHash = crypto.createHash('sha256').update(props.fileContent).digest('hex'); + const asset = synthesizer.addFileAsset({ + fileName: props.fileName, + packaging: FileAssetPackaging.FILE, + sourceHash: this.assetHash, + }); + this.httpUrl = asset.httpUrl; + this.s3BucketName = asset.bucketName; + this.s3ObjectKey = asset.objectKey; + this.s3ObjectUrl = asset.s3ObjectUrl; + } else { + throw new Error('Template asset can be used only with TransformerStackSynthesizer'); + } + } +} + +function findRootStack(scope: Construct): Stack { + if (!scope) { + throw new Error('Nested stacks cannot be defined as a root construct'); + } + + const rootStack = scope.node.scopes.find((p) => Stack.isStack(p)); + if (!rootStack) { + throw new Error('Nested stacks must be defined within scope of another non-nested stack'); + } + + return rootStack as Stack; +} diff --git a/packages/amplify-util-mock/src/__e2e_v2__/test-synthesizer/index.ts b/packages/amplify-util-mock/src/__e2e_v2__/test-synthesizer/index.ts new file mode 100644 index 00000000000..59c342a7a7a --- /dev/null +++ b/packages/amplify-util-mock/src/__e2e_v2__/test-synthesizer/index.ts @@ -0,0 +1,3 @@ +export { defaultTransformParams, transformAndSynth } from './transform'; +export { TransformManager } from './transform-manager'; +export { DeploymentResources } from './deployment-resources'; diff --git a/packages/amplify-util-mock/src/__e2e_v2__/test-synthesizer/nested-stack.ts b/packages/amplify-util-mock/src/__e2e_v2__/test-synthesizer/nested-stack.ts new file mode 100644 index 00000000000..98cfb677adb --- /dev/null +++ b/packages/amplify-util-mock/src/__e2e_v2__/test-synthesizer/nested-stack.ts @@ -0,0 +1,176 @@ +import * as crypto from 'crypto'; +import { + Aws, + CfnResource, + CfnStack, + FileAssetPackaging, + Fn, + IResolveContext, + IStackSynthesizer, + Lazy, + NestedStackProps, + Stack, + Token, +} from 'aws-cdk-lib'; +import { Construct } from 'constructs'; +import { TransformerRootStack } from './root-stack'; +import { TransformerStackSynthesizer } from './stack-synthesizer'; +import { $TSAny } from '@aws-amplify/amplify-cli-core'; + +export type TransformerNestedStackProps = NestedStackProps & { + synthesizer?: IStackSynthesizer; +}; +export class TransformerNestedStack extends TransformerRootStack { + public readonly templateFile: string; + + public readonly nestedStackResource?: CfnResource; + + private readonly parameters: { [name: string]: string }; + + private readonly resource: CfnStack; + + private readonly _contextualStackId: string; + + private readonly _contextualStackName: string; + + private _templateUrl?: string; + + private _rootStack: Stack; + + constructor(scope: Construct, id: string, props: TransformerNestedStackProps = {}) { + const rootStack = findRootStack(scope); + const synthesizer = props.synthesizer || new TransformerStackSynthesizer(); + super(scope, id, { + env: { account: rootStack.account, region: rootStack.region }, + ...props, + synthesizer, + }); + + this._rootStack = rootStack; + + const parentScope = new Construct(scope, `${id}.NestedStack`); + // Transformer synthesizes the stack in memory and stack names are going to be unique + this.templateFile = `stacks/${id}.json`; + + this.parameters = props.parameters || {}; + + this.resource = new CfnStack(parentScope, `${id}.NestedStackResource`, { + // eslint-disable-next-line spellcheck/spell-checker + templateUrl: Lazy.uncachedString({ + produce: () => { + return this._templateUrl || ''; + }, + }), + parameters: Lazy.any({ + produce: () => (Object.keys(this.parameters).length > 0 ? this.parameters : undefined), + }), + notificationArns: props.notificationArns, + timeoutInMinutes: props.timeout ? props.timeout.toMinutes() : undefined, + }); + + this.nestedStackResource = this.resource; + + // context-aware stack name: if resolved from within this stack, return AWS::StackName + // if resolved from the outer stack, use the { Ref } of the AWS::CloudFormation::Stack resource + // which resolves the ARN of the stack. We need to extract the stack name, which is the second + // component after splitting by "/" + this._contextualStackName = this.contextualAttribute(Aws.STACK_NAME, Fn.select(1, Fn.split('/', this.resource.ref))); + this._contextualStackId = this.contextualAttribute(Aws.STACK_ID, this.resource.ref); + } + + // eslint-disable-next-line spellcheck/spell-checker + /** + * An attribute that represents the name of the nested stack. + * + * This is a context aware attribute: + * - If this is referenced from the parent stack, it will return a token that parses the name from the stack ID. + * - If this is referenced from the context of the nested stack, it will return `{ "Ref": "AWS::StackName" }` + * + * @attribute + * @example mystack-mynestedstack-sggfrhxhum7w + */ + public get stackName() { + return this._contextualStackName; + } + + // eslint-disable-next-line spellcheck/spell-checker + /** + * An attribute that represents the ID of the stack. + * + * This is a context aware attribute: + * - If this is referenced from the parent stack, it will return `{ "Ref": "LogicalIdOfNestedStackResource" }`. + * - If this is referenced from the context of the nested stack, it will return `{ "Ref": "AWS::StackId" }` + * + * @attribute + * @example "arn:aws:cloudformation:us-east-2:123456789012:stack/mystack-mynestedstack-sggfrhxhum7w/f449b250-b969-11e0-a185-5081d0136786" + */ + public get stackId() { + return this._contextualStackId; + } + + /** + * Assign a value to one of the nested stack parameters. + * @param name The parameter name (ID) + * @param value The value to assign + */ + public setParameter(name: string, value: string) { + this.parameters[name] = value; + } + + /** + * Defines an asset at the parent stack which represents the template of this + * nested stack. + * + * This private API is used by `App.prepare()` within a loop that rectifies + * references every time an asset is added. This is because (at the moment) + * assets are addressed using CloudFormation parameters. + * + * @returns `true` if a new asset was added or `false` if an asset was + * previously added. When this returns `true`, App will do another reference + * rectification cycle. + * + * @internal + */ + public _prepareTemplateAsset() { + if (this._templateUrl) { + return false; + } + + const cfn = JSON.stringify((this as $TSAny)._toCloudFormation()); + const templateHash = crypto.createHash('sha256').update(cfn).digest('hex'); + + const templateLocation = this._rootStack.synthesizer.addFileAsset({ + packaging: FileAssetPackaging.FILE, + sourceHash: templateHash, + fileName: this.templateFile, + }); + + this._templateUrl = templateLocation.httpUrl; + + return true; + } + + private contextualAttribute(innerValue: string, outerValue: string) { + return Token.asString({ + resolve: (context: IResolveContext) => { + if (Stack.of(context.scope) === this) { + return innerValue; + } else { + return outerValue; + } + }, + }); + } +} +function findRootStack(scope: Construct): Stack { + if (!scope) { + throw new Error('Nested stacks cannot be defined as a root construct'); + } + + const rootStack = scope.node.scopes.find((p) => Stack.isStack(p)); + if (!rootStack) { + throw new Error('Nested stacks must be defined within scope of another non-nested stack'); + } + + return rootStack as Stack; +} diff --git a/packages/amplify-util-mock/src/__e2e_v2__/test-synthesizer/root-stack.ts b/packages/amplify-util-mock/src/__e2e_v2__/test-synthesizer/root-stack.ts new file mode 100644 index 00000000000..2fe418c6d3e --- /dev/null +++ b/packages/amplify-util-mock/src/__e2e_v2__/test-synthesizer/root-stack.ts @@ -0,0 +1,44 @@ +import { $TSAny } from '@aws-amplify/amplify-cli-core'; +import { CfnElement, Stack, CfnResource, ISynthesisSession } from 'aws-cdk-lib'; + +export class TransformerRootStack extends Stack { + private readonly resourceTypeToPreserveLogicalName: string[] = [ + 'AWS::DynamoDB::Table', + 'AWS::Elasticsearch::Domain', + 'AWS::RDS::DBCluster', + 'AWS::CloudFormation::Stack', + 'AWS::AppSync::GraphQLApi', + ]; + + /** + * Allocate a logical id based on the resource presense in the stack mapping. If an resource is already + * created using older version of the transformer, then keep the name the same. Otherwiser use the CDK + * stack naming convention to avoid logical name collision + * @param cfnElement + */ + + protected allocateLogicalId = (cfnElement: CfnElement): string => { + const regExPattern = /[^A-Za-z0-9]/g; + if (cfnElement instanceof CfnResource && this.resourceTypeToPreserveLogicalName.includes(cfnElement.cfnResourceType)) { + // Each L2 Construct creates a lower level CFN scope with name Resource. We want to get the id of the parent scope + const scope = cfnElement.node.scopes.reverse().find((scope) => scope.node.id !== 'Resource'); + if (scope) { + const logicalId = scope.node.id.replace('.NestedStackResource', ''); + // if the id contains non alphanumeric char, fallback to CDK resource naming + if (!regExPattern.test(logicalId)) return logicalId; + } + } + + return super.allocateLogicalId(cfnElement); + }; + + /** + * GraphQL transformer keeps the generated resources in memory and passes it to Amplify CLI. Updating the logic + * of stack synthesize to support that. + * @param session + */ + // eslint-disable-next-line @typescript-eslint/no-unused-vars + public renderCloudFormationTemplate = (_: ISynthesisSession): string => { + return JSON.stringify((this as $TSAny)._toCloudFormation(), undefined, 2); + }; +} diff --git a/packages/amplify-util-mock/src/__e2e_v2__/test-synthesizer/stack-synthesizer.ts b/packages/amplify-util-mock/src/__e2e_v2__/test-synthesizer/stack-synthesizer.ts new file mode 100644 index 00000000000..5a0ea639ef7 --- /dev/null +++ b/packages/amplify-util-mock/src/__e2e_v2__/test-synthesizer/stack-synthesizer.ts @@ -0,0 +1,144 @@ +import * as crypto from 'crypto'; +import { ISynthesisSession, Stack, LegacyStackSynthesizer, FileAssetSource, FileAssetLocation, CfnParameter } from 'aws-cdk-lib'; +import { Template } from './deployment-resources'; +import { TransformerRootStack } from './root-stack'; + +/** + * TransformerStackSynthesizer + */ +export class TransformerStackSynthesizer extends LegacyStackSynthesizer { + private readonly stackAssets: Map = new Map(); + + private readonly mappingTemplateAssets: Map = new Map(); + + private _deploymentBucket?: CfnParameter; + + private _deploymentRootKey?: CfnParameter; + + /** + * synthesizeStackTemplate + * + * This method has been deprecated by cdk and is not used in runtime. + * @deprecated Replaced by synthesizeTemplate. + */ + protected synthesizeStackTemplate(stack: Stack, session: ISynthesisSession): void { + if (stack instanceof TransformerRootStack) { + const template = stack.renderCloudFormationTemplate(session) as string; + const templateName = stack.node.id; + this.setStackAsset(templateName, template); + return; + } + throw new Error( + 'Error synthesizing the template. Expected Stack to be either instance of TransformerRootStack or TransformerNestedStack', + ); + } + + // eslint-disable-next-line @typescript-eslint/no-unused-vars + protected synthesizeTemplate(session: ISynthesisSession, _?: string): FileAssetSource { + const stack = this.boundStack; + if (stack instanceof TransformerRootStack) { + const template = stack.renderCloudFormationTemplate(session) as string; + const templateName = stack.node.id; + this.setStackAsset(templateName, template); + const contentHash = crypto.createHash('sha256').update(template).digest('hex'); + return { + sourceHash: contentHash, + }; + } + throw new Error( + 'Error synthesizing the template. Expected Stack to be either instance of TransformerRootStack or TransformerNestedStack', + ); + } + + /** + * setStackAsset + */ + setStackAsset(templateName: string, template: string): void { + this.stackAssets.set(templateName, JSON.parse(template)); + } + + /** + * collectStacks + */ + collectStacks(): Map { + return new Map(this.stackAssets.entries()); + } + + /** + * setMappingTemplates + */ + setMappingTemplates(templateName: string, template: string): void { + this.mappingTemplateAssets.set(templateName, template); + } + + /** + * collectMappingTemplates + */ + collectMappingTemplates(): Map { + return new Map(this.mappingTemplateAssets.entries()); + } + + /** + * addFileAsset + */ + public addFileAsset(asset: FileAssetSource): FileAssetLocation { + const bucketName = this.deploymentBucket.valueAsString; + const rootKey = this.deploymentRootKey.valueAsString; + + const objectKey = `${rootKey}/${asset.fileName}`; + const httpUrl = `https://s3.${this.boundStack.region}.${this.boundStack.urlSuffix}/${bucketName}/${rootKey}/${asset.fileName}`; + const s3ObjectUrl = `s3://${bucketName}/${rootKey}/${asset.fileName}`; + + return { + bucketName, + objectKey, + httpUrl, + s3ObjectUrl, + }; + } + + /** + * ensureDeploymentParameters + */ + private ensureDeploymentParameters() { + if (!this._deploymentBucket) { + this._deploymentBucket = new CfnParameter(this.boundStack, 'S3DeploymentBucket', { + type: 'String', + description: 'An S3 Bucket name where assets are deployed', + }); + } + if (!this._deploymentRootKey) { + this._deploymentRootKey = new CfnParameter(this.boundStack, 'S3DeploymentRootKey', { + type: 'String', + description: 'An S3 key relative to the S3DeploymentBucket that points to the root of the deployment directory.', + }); + } + } + + /** + * deploymentBucket + */ + private get deploymentBucket(): CfnParameter { + this.ensureDeploymentParameters(); + assertNotNull(this._deploymentBucket); + return this._deploymentBucket; + } + + /** + * deploymentRootKey + */ + private get deploymentRootKey(): CfnParameter { + this.ensureDeploymentParameters(); + assertNotNull(this._deploymentRootKey); + return this._deploymentRootKey; + } +} + +/** + * assertNotNull + */ +export function assertNotNull(x: A | undefined): asserts x is NonNullable { + if (x === null && x === undefined) { + throw new Error('You must call bindStack() first'); + } +} diff --git a/packages/amplify-util-mock/src/__e2e_v2__/test-synthesizer/transform-manager.ts b/packages/amplify-util-mock/src/__e2e_v2__/test-synthesizer/transform-manager.ts new file mode 100644 index 00000000000..4959623207c --- /dev/null +++ b/packages/amplify-util-mock/src/__e2e_v2__/test-synthesizer/transform-manager.ts @@ -0,0 +1,123 @@ +import { App, CfnParameter, Stack } from 'aws-cdk-lib'; +import { Construct } from 'constructs'; +import type { AssetProvider, NestedStackProvider, S3Asset, AssetProps, SynthParameters } from '@aws-amplify/graphql-transformer-interfaces'; +import { DeploymentResources, Template } from './deployment-resources'; +import { TransformerStackSynthesizer } from './stack-synthesizer'; +import { TransformerNestedStack } from './nested-stack'; +import { TransformerRootStack } from './root-stack'; +import { FileAsset } from './file-asset'; + +/** + * Stack Manager plugin which supports the Amplify CLI transformer behavior today. Manages Transformer stacks, nested stacks, + * and synthesizers, then provides mechanisms for synthesis. + */ +export class TransformManager { + private readonly app: App = new App(); + public readonly rootStack: TransformerRootStack; + private readonly stackSynthesizer = new TransformerStackSynthesizer(); + private readonly childStackSynthesizers: Map = new Map(); + + constructor() { + this.rootStack = new TransformerRootStack(this.app, 'transformer-root-stack', { + synthesizer: this.stackSynthesizer, + }); + } + + getTransformScope(): Construct { + return this.rootStack; + } + + /** + * Retrieve the nestedStackProvider for a Transformer Managed Stack + */ + getNestedStackProvider(): NestedStackProvider { + return { + provide: (scope: Construct, name: string): Stack => { + const synthesizer = new TransformerStackSynthesizer(); + const newStack = new TransformerNestedStack(scope, name, { + synthesizer, + }); + this.childStackSynthesizers.set(name, synthesizer); + return newStack; + }, + }; + } + + getAssetProvider(): AssetProvider { + return { + provide: (scope: Construct, id: string, props: AssetProps): S3Asset => new FileAsset(scope, id, props), + }; + } + + getSynthParameters(hasIamAuth: boolean, hasUserPoolAuth: boolean): SynthParameters { + const envParameter = new CfnParameter(this.rootStack, 'env', { + default: 'NONE', + type: 'String', + }); + const apiNameParameter = new CfnParameter(this.rootStack, 'AppSyncApiName', { + default: 'AppSyncSimpleTransform', + type: 'String', + }); + const synthParameters: SynthParameters = { + amplifyEnvironmentName: envParameter.valueAsString, + apiName: apiNameParameter.valueAsString, + }; + if (hasIamAuth) { + synthParameters.authenticatedUserRoleName = new CfnParameter(this.rootStack, 'authRoleName', { type: 'String' }).valueAsString; + synthParameters.unauthenticatedUserRoleName = new CfnParameter(this.rootStack, 'unauthRoleName', { type: 'String' }).valueAsString; + } + if (hasUserPoolAuth) { + synthParameters.userPoolId = new CfnParameter(this.rootStack, 'AuthCognitoUserPoolId', { type: 'String' }).valueAsString; + } + return synthParameters; + } + + generateDeploymentResources(): DeploymentResources { + this.app.synth({ force: true, skipValidation: true }); + + const templates = this.getCloudFormationTemplates(); + const rootStackTemplate = templates.get('transformer-root-stack'); + const childStacks: Record = {}; + for (const [templateName, template] of templates.entries()) { + if (templateName !== 'transformer-root-stack') { + childStacks[templateName] = template; + } + } + + const fileAssets = this.getMappingTemplates(); + const pipelineFunctions: Record = {}; + const resolvers: Record = {}; + const functions: Record = {}; + for (const [templateName, template] of fileAssets) { + if (templateName.startsWith('pipelineFunctions/')) { + pipelineFunctions[templateName.replace('pipelineFunctions/', '')] = template; + } else if (templateName.startsWith('resolvers/')) { + resolvers[templateName.replace('resolvers/', '')] = template; + } else if (templateName.startsWith('functions/')) { + functions[templateName.replace('functions/', '')] = template; + } + } + const schema = fileAssets.get('schema.graphql') || ''; + + return { + functions, + pipelineFunctions, + resolvers, + schema, + stacks: childStacks, + rootStack: rootStackTemplate, + stackMapping: {}, + userOverriddenSlots: [], + }; + } + + private getCloudFormationTemplates = (): Map => { + let stacks = this.stackSynthesizer.collectStacks(); + this.childStackSynthesizers.forEach((synthesizer) => { + stacks = new Map([...stacks.entries(), ...synthesizer.collectStacks()]); + }); + return stacks; + }; + + private getMappingTemplates = (): Map => this.stackSynthesizer.collectMappingTemplates(); +} diff --git a/packages/amplify-util-mock/src/__e2e_v2__/test-synthesizer/transform.ts b/packages/amplify-util-mock/src/__e2e_v2__/test-synthesizer/transform.ts new file mode 100644 index 00000000000..3b0feaee92c --- /dev/null +++ b/packages/amplify-util-mock/src/__e2e_v2__/test-synthesizer/transform.ts @@ -0,0 +1,55 @@ +import { DDB_DEFAULT_DATASOURCE_STRATEGY, constructDataSourceStrategies } from '@aws-amplify/graphql-transformer-core'; +import { AppSyncAuthConfiguration, ModelDataSourceStrategy } from '@aws-amplify/graphql-transformer-interfaces'; +import { ExecuteTransformConfig, executeTransform } from '@aws-amplify/graphql-transformer'; +import { DeploymentResources } from './deployment-resources'; +import { TransformManager } from './transform-manager'; + +export const defaultTransformParams: Pick = { + transformersFactoryArgs: {}, + transformParameters: { + shouldDeepMergeDirectiveConfigDefaults: true, + // eslint-disable-next-line spellcheck/spell-checker + disableResolverDeduping: false, + sandboxModeEnabled: false, + useSubUsernameForDefaultIdentityClaim: true, + populateOwnerFieldForStaticGroupAuth: true, + suppressApiKeyGeneration: false, + secondaryKeyAsGSI: true, + enableAutoIndexQueryNames: true, + respectPrimaryKeyAttributesOnConnectionField: true, + enableSearchNodeToNodeEncryption: false, + enableTransformerCfnOutputs: true, + allowDestructiveGraphqlSchemaUpdates: false, + replaceTableUponGsiUpdate: false, + subscriptionsInheritPrimaryAuth: false, + allowGen1Patterns: true, + }, +}; + +const getAuthenticationTypesForAuthConfig = (authConfig?: AppSyncAuthConfiguration): (string | undefined)[] => + [authConfig?.defaultAuthentication, ...(authConfig?.additionalAuthenticationProviders ?? [])].map( + (authConfigEntry) => authConfigEntry?.authenticationType, + ); + +const hasIamAuth = (authConfig?: AppSyncAuthConfiguration): boolean => + getAuthenticationTypesForAuthConfig(authConfig).some((authType) => authType === 'AWS_IAM'); + +const hasUserPoolAuth = (authConfig?: AppSyncAuthConfiguration): boolean => + getAuthenticationTypesForAuthConfig(authConfig).some((authType) => authType === 'AMAZON_COGNITO_USER_POOLS'); + +export const transformAndSynth = ( + options: Omit & { + dataSourceStrategies?: Record; + }, +): DeploymentResources => { + const transformManager = new TransformManager(); + executeTransform({ + ...options, + scope: transformManager.rootStack, + nestedStackProvider: transformManager.getNestedStackProvider(), + assetProvider: transformManager.getAssetProvider(), + synthParameters: transformManager.getSynthParameters(hasIamAuth(options.authConfig), hasUserPoolAuth(options.authConfig)), + dataSourceStrategies: options.dataSourceStrategies ?? constructDataSourceStrategies(options.schema, DDB_DEFAULT_DATASOURCE_STRATEGY), + }); + return transformManager.generateDeploymentResources(); +}; diff --git a/packages/amplify-util-mock/src/__e2e_v2__/util-method.e2e.test.ts b/packages/amplify-util-mock/src/__e2e_v2__/util-method.e2e.test.ts index cd47041e6e7..de016057f41 100644 --- a/packages/amplify-util-mock/src/__e2e_v2__/util-method.e2e.test.ts +++ b/packages/amplify-util-mock/src/__e2e_v2__/util-method.e2e.test.ts @@ -1,8 +1,6 @@ import { AmplifyAppSyncSimulator } from '@aws-amplify/amplify-appsync-simulator'; -import { ModelTransformer } from '@aws-amplify/graphql-model-transformer'; -import { GraphQLTransform } from '@aws-amplify/graphql-transformer-core'; -import { FeatureFlagProvider } from '@aws-amplify/graphql-transformer-interfaces'; import { deploy, launchDDBLocal, terminateDDB, logDebug, reDeploy, GraphQLClient } from '../__e2e__/utils'; +import { transformAndSynth, defaultTransformParams } from './test-synthesizer'; let GRAPHQL_ENDPOINT: string; let GRAPHQL_CLIENT: GraphQLClient; @@ -12,17 +10,16 @@ let server: AmplifyAppSyncSimulator; jest.setTimeout(2000000); -const runTransformer = async (validSchema: string) => { - const transformer = new GraphQLTransform({ - transformers: [new ModelTransformer()], - featureFlags: { - getBoolean: (name) => (name === 'improvePluralization' ? true : false), - } as FeatureFlagProvider, - sandboxModeEnabled: true, +const runTransformer = async (validSchema: string) => + transformAndSynth({ + ...defaultTransformParams, + schema: validSchema, + transformParameters: { + ...defaultTransformParams.transformParameters, + sandboxModeEnabled: true, + }, }); - const out = await transformer.transform(validSchema); - return out; -}; + let ddbClient; const validSchema = /* GraphQL */ ` type Post @model { diff --git a/packages/amplify-util-mock/src/__tests__/CFNParser/intrinsic-functions.test.ts b/packages/amplify-util-mock/src/__tests__/CFNParser/intrinsic-functions.test.ts index 8e978e61822..300c5abf4ff 100644 --- a/packages/amplify-util-mock/src/__tests__/CFNParser/intrinsic-functions.test.ts +++ b/packages/amplify-util-mock/src/__tests__/CFNParser/intrinsic-functions.test.ts @@ -149,7 +149,7 @@ describe('intrinsic-functions', () => { it('should call parseValue if the ref is not a string', () => { const node = [{ 'Fn::Join': ['-', ['foo', 'bar']] }]; - const parseValue = jest.fn((val) => 'fromParam'); + const parseValue = jest.fn(() => 'fromParam'); expect(cfnRef(node, cfnContext, parseValue)).toEqual('foo'); }); diff --git a/packages/amplify-util-mock/src/__tests__/CFNParser/resource-processors/appsync.test.ts b/packages/amplify-util-mock/src/__tests__/CFNParser/resource-processors/appsync.test.ts index ff284fcc313..29b7d8a56ed 100644 --- a/packages/amplify-util-mock/src/__tests__/CFNParser/resource-processors/appsync.test.ts +++ b/packages/amplify-util-mock/src/__tests__/CFNParser/resource-processors/appsync.test.ts @@ -46,12 +46,6 @@ describe('dynamoDBResourceHandler', () => { ], }, }; - const cfnContext: CloudFormationParseContext = { - params: {}, - conditions: {}, - resources: {}, - exports: {}, - }; const processedResource = dynamoDBResourceHandler(resource.Properties.TableName, resource); expect(processedResource.Properties.AttributeDefinitions).toEqual(resource.Properties.AttributeDefinitions); expect(processedResource.Properties.KeySchema).toEqual(resource.Properties.KeySchema); diff --git a/packages/amplify-util-mock/src/__tests__/api/api.test.ts b/packages/amplify-util-mock/src/__tests__/api/api.test.ts index 06a042340ca..2af4ae8f935 100644 --- a/packages/amplify-util-mock/src/__tests__/api/api.test.ts +++ b/packages/amplify-util-mock/src/__tests__/api/api.test.ts @@ -1,11 +1,12 @@ import * as fs from 'fs-extra'; import * as path from 'path'; -import { $TSContext, AmplifyError, pathManager } from '@aws-amplify/amplify-cli-core'; +import { $TSContext, AmplifyError, JSONUtilities, pathManager } from '@aws-amplify/amplify-cli-core'; import { APITest } from '../../api/api'; import * as lambdaInvoke from '../../api/lambda-invoke'; import { getMockSearchableTriggerDirectory } from '../../utils'; import { ConfigOverrideManager } from '../../utils/config-override'; import { run } from '../../commands/mock/api'; +import { start } from '../../api'; jest.mock('@aws-amplify/amplify-cli-core', () => ({ ...(jest.requireActual('@aws-amplify/amplify-cli-core') as Record), @@ -26,12 +27,6 @@ jest.mock('amplify-dynamodb-simulator', () => jest.fn()); jest.mock('fs-extra'); const mockProjectRoot = 'mock-app'; -const mockContext = { - amplify: { - getEnvInfo: jest.fn().mockReturnValue({ projectPath: mockProjectRoot }), - loadRuntimePlugin: jest.fn().mockReturnValue({}), - }, -} as unknown as $TSContext; describe('Test Mock API methods', () => { beforeEach(() => { @@ -139,4 +134,49 @@ describe('Test Mock API methods', () => { await run(mockContext); await expect(mockContext.print.error).toHaveBeenCalledWith('Failed to start API Mocking.'); }); + + it('shows error message and resolution when https enabled if SSL key and certificate paths are not provided', async () => { + ConfigOverrideManager.getInstance = jest.fn().mockReturnValue(jest.fn); + const mockContext = { + print: { + red: jest.fn(), + green: jest.fn(), + error: jest.fn(), + }, + parameters: { + options: { + help: false, + }, + }, + input: { + argv: ['--https'], + }, + amplify: { + getEnvInfo: jest.fn().mockReturnValue({ projectPath: mockProjectRoot }), + pathManager: { + getGitIgnoreFilePath: jest.fn(), + }, + }, + } as unknown as $TSContext; + await run(mockContext); + await expect(mockContext.print.error).toHaveBeenCalledWith( + '\nThe --https option must be followed by the path to the SSL key and the path to the SSL certificate.\n', + ); + }); + + it('attempts to set custom port correctly', async () => { + const GRAPHQL_PORT = 8081; + const mockContext = { + amplify: { + getEnvInfo: jest.fn().mockReturnValue({ projectPath: mockProjectRoot }), + pathManager: { + getGitIgnoreFilePath: jest.fn(), + }, + }, + } as unknown as $TSContext; + const startMock = jest.spyOn(APITest.prototype, 'start').mockResolvedValueOnce(); + jest.spyOn(JSONUtilities, 'readJson').mockReturnValue({ graphqlPort: GRAPHQL_PORT }); + await start(mockContext); + expect(startMock.mock.calls[0][1]).toBe(GRAPHQL_PORT); + }); }); diff --git a/packages/amplify-util-mock/src/__tests__/api/lambda-arn-to-config.test.ts b/packages/amplify-util-mock/src/__tests__/api/lambda-arn-to-config.test.ts index a192b97a8cf..43a8ef18eca 100644 --- a/packages/amplify-util-mock/src/__tests__/api/lambda-arn-to-config.test.ts +++ b/packages/amplify-util-mock/src/__tests__/api/lambda-arn-to-config.test.ts @@ -66,15 +66,15 @@ describe('lambda arn to config', () => { }); it('throws on malformed arn refs', async () => { - expect(lambdaArnToConfig(context_stub, { 'Fn::Sub': { key: 'cant interpret this' } })).rejects.toThrowError(); + await expect(lambdaArnToConfig(context_stub, { 'Fn::Sub': { key: 'cant interpret this' } })).rejects.toThrowError(); }); it('throws on unknown arn formats', async () => { - expect(lambdaArnToConfig(context_stub, ['dont know', 'what this is'])).rejects.toThrowError(); + await expect(lambdaArnToConfig(context_stub, ['dont know', 'what this is'])).rejects.toThrowError(); }); it('throws when arn is valid but no matching lambda found in the project', async () => { - expect(lambdaArnToConfig(context_stub, 'validformat::but::no::matchinglambda')).rejects.toThrowError( + await expect(lambdaArnToConfig(context_stub, 'validformat::but::no::matchinglambda')).rejects.toThrowError( new AmplifyError('MockProcessError', { message: `Did not find a Lambda matching ARN [\"validformat::but::no::matchinglambda\"] in the project. Local mocking only supports Lambdas that are configured in the project.`, resolution: `Use 'amplify add function' in the root of your app directory to create a new Lambda Function. To connect an AWS Lambda resolver to the GraphQL API, add the @function directive to a field in your schema.`, diff --git a/packages/amplify-util-mock/src/__tests__/api/lambda-invoke.test.ts b/packages/amplify-util-mock/src/__tests__/api/lambda-invoke.test.ts index c5b31626102..5a710b2849c 100644 --- a/packages/amplify-util-mock/src/__tests__/api/lambda-invoke.test.ts +++ b/packages/amplify-util-mock/src/__tests__/api/lambda-invoke.test.ts @@ -53,6 +53,7 @@ describe('Invoke local lambda function', () => { expect(printer.info).toBeCalledWith(JSON.stringify(echoInput, undefined, 2)); expect(printer.error).toBeCalledTimes(0); expect(printer.info).toBeCalledWith('Finished execution.'); + expect(isBuilt).toBe(true); }); it('invoke the local lambda using trigger config with given data', async () => { @@ -69,11 +70,7 @@ describe('Invoke local lambda function', () => { }), } as $TSAny; - let isBuilt = false; getInvokerMock.mockResolvedValueOnce(() => new Promise((resolve) => setTimeout(() => resolve('lambda value'), 11000))); - getBuilderMock.mockReturnValueOnce(async () => { - isBuilt = true; - }); const echoInput = { key: 'value' }; timeConstrainedInvokerMock.mockResolvedValue(echoInput); const mockTriggerConfig = { diff --git a/packages/amplify-util-mock/src/__tests__/get-https-config.test.ts b/packages/amplify-util-mock/src/__tests__/get-https-config.test.ts new file mode 100644 index 00000000000..09c6f174ba4 --- /dev/null +++ b/packages/amplify-util-mock/src/__tests__/get-https-config.test.ts @@ -0,0 +1,36 @@ +import { getHttpsConfig } from '../utils/get-https-config'; + +describe('getHttpsConfig', () => { + let context; + + beforeEach(() => { + context = { + input: { + argv: [], + }, + print: { + error: jest.fn(), + }, + }; + }); + + it('returns paths when --https option is followed by key and cert paths', () => { + context.input.argv = ['--https', '/path/to/key', '/path/to/cert']; + + const config = getHttpsConfig(context); + + expect(config).toEqual({ + sslKeyPath: '/path/to/key', + sslCertPath: '/path/to/cert', + }); + }); + + it('returns null and prints error when --https option is not followed by key and cert paths', () => { + context.input.argv = ['--https']; + + const config = getHttpsConfig(context); + + expect(config).toEqual(null); + expect(context.print.error).toHaveBeenCalled(); + }); +}); diff --git a/packages/amplify-util-mock/src/__tests__/utils/dynamo-db/helper.test.ts b/packages/amplify-util-mock/src/__tests__/utils/dynamo-db/helper.test.ts index c7ec906e865..c3cb083e1d4 100644 --- a/packages/amplify-util-mock/src/__tests__/utils/dynamo-db/helper.test.ts +++ b/packages/amplify-util-mock/src/__tests__/utils/dynamo-db/helper.test.ts @@ -1,5 +1,5 @@ import { waitTillTableStateIsActive } from '../../../utils/dynamo-db/helpers'; -import * as AWSMock from 'aws-sdk-mock'; +import AWS_MOCK from 'aws-sdk-mock'; import * as AWS from 'aws-sdk'; import { DynamoDB } from 'aws-sdk'; @@ -8,7 +8,7 @@ describe('waitTillTableStateIsActive', () => { beforeEach(() => { jest.resetAllMocks(); jest.useFakeTimers(); - AWSMock.setSDKInstance(AWS); + AWS_MOCK.setSDKInstance(AWS); }); afterEach(() => { jest.useRealTimers(); diff --git a/packages/amplify-util-mock/src/__tests__/utils/dynamo-db/index.test.ts b/packages/amplify-util-mock/src/__tests__/utils/dynamo-db/index.test.ts index c32e9553092..4a77f76ea5e 100644 --- a/packages/amplify-util-mock/src/__tests__/utils/dynamo-db/index.test.ts +++ b/packages/amplify-util-mock/src/__tests__/utils/dynamo-db/index.test.ts @@ -1,5 +1,5 @@ import { createAndUpdateTable, MockDynamoDBConfig } from '../../../utils/dynamo-db'; -import * as AWSMock from 'aws-sdk-mock'; +import AWS_MOCK from 'aws-sdk-mock'; import * as AWS from 'aws-sdk'; import { DynamoDB } from 'aws-sdk'; @@ -73,7 +73,7 @@ describe('createAndUpdateTable', () => { beforeEach(() => { jest.resetAllMocks(); jest.useFakeTimers(); - AWSMock.setSDKInstance(AWS); + AWS_MOCK.setSDKInstance(AWS); }); it('should create new tables when they are missing', async () => { @@ -105,13 +105,13 @@ describe('createAndUpdateTable', () => { { ...table2Input, GlobalSecondaryUpdate: { - Create: [table2Input.GlobalSecondaryIndexes[0]], + Create: [table2Input.GlobalSecondaryIndexes![0]], }, }, { ...table2Input, GlobalSecondaryUpdate: { - Create: [table2Input.GlobalSecondaryIndexes[1]], + Create: [table2Input.GlobalSecondaryIndexes![1]], }, }, ]; diff --git a/packages/amplify-util-mock/src/__tests__/utils/dynamo-db/util.test.ts b/packages/amplify-util-mock/src/__tests__/utils/dynamo-db/util.test.ts index ae4d65cb0af..2aad9996300 100644 --- a/packages/amplify-util-mock/src/__tests__/utils/dynamo-db/util.test.ts +++ b/packages/amplify-util-mock/src/__tests__/utils/dynamo-db/util.test.ts @@ -1,7 +1,7 @@ import * as ddbUtils from '../../../utils/dynamo-db/utils'; -import * as AWSMock from 'aws-sdk-mock'; +import AWS_MOCK from 'aws-sdk-mock'; import * as AWS from 'aws-sdk'; -import { DescribeTableOutput, CreateTableInput, UpdateTableInput, UpdateTableOutput, TableDescription } from 'aws-sdk/clients/dynamodb'; +import { DescribeTableOutput, CreateTableInput, UpdateTableInput, TableDescription } from 'aws-sdk/clients/dynamodb'; import { waitTillTableStateIsActive } from '../../../utils/dynamo-db/helpers'; import { DynamoDB } from 'aws-sdk'; @@ -10,13 +10,13 @@ jest.mock('../../../utils/dynamo-db/helpers'); describe('DynamoDB Utils', () => { beforeEach(() => { jest.resetAllMocks(); - AWSMock.setSDKInstance(require('aws-sdk')); + AWS_MOCK.setSDKInstance(require('aws-sdk')); }); describe('describeTables', () => { const describeTableMock = jest.fn(); beforeEach(() => { - AWSMock.mock('DynamoDB', 'describeTable', describeTableMock); + AWS_MOCK.mock('DynamoDB', 'describeTable', describeTableMock); }); it('should call DynamoDB Clients describe table and collect the results', async () => { @@ -219,6 +219,7 @@ describe('DynamoDB Utils', () => { }; if (typeof callback === 'function') { callback(null, response); + return undefined; } else { return { promise: jest.fn().mockResolvedValue(response), diff --git a/packages/amplify-util-mock/src/__tests__/utils/index.test.ts b/packages/amplify-util-mock/src/__tests__/utils/index.test.ts index 3e6ba8fdf13..db5de7d4a0c 100644 --- a/packages/amplify-util-mock/src/__tests__/utils/index.test.ts +++ b/packages/amplify-util-mock/src/__tests__/utils/index.test.ts @@ -1,7 +1,4 @@ -import { describe } from 'jest-circus'; import { _isUnsupportedJavaVersion, checkJavaHome } from '../../utils'; -import semver = require('semver/preload'); -import * as fs from 'fs-extra'; jest.mock('fs-extra', () => ({ existsSync: jest.fn().mockReturnValue(true), diff --git a/packages/amplify-util-mock/src/__tests__/v2-test-synthesizer/test-transform.ts b/packages/amplify-util-mock/src/__tests__/v2-test-synthesizer/test-transform.ts new file mode 100644 index 00000000000..76fa09b53f0 --- /dev/null +++ b/packages/amplify-util-mock/src/__tests__/v2-test-synthesizer/test-transform.ts @@ -0,0 +1,109 @@ +import { AppSyncAuthConfiguration, TransformerPluginProvider, TransformerLogLevel } from '@aws-amplify/graphql-transformer-interfaces'; +import type { + ModelDataSourceStrategy, + RDSLayerMappingProvider, + SqlDirectiveDataSourceStrategy, + SynthParameters, + TransformParameters, +} from '@aws-amplify/graphql-transformer-interfaces'; +import { + DDB_DEFAULT_DATASOURCE_STRATEGY, + GraphQLTransform, + ResolverConfig, + UserDefinedSlot, + constructDataSourceStrategies, +} from '@aws-amplify/graphql-transformer-core'; +import { TransformManager, DeploymentResources } from '../../__e2e_v2__/test-synthesizer'; + +export type TestTransformParameters = RDSLayerMappingProvider & { + authConfig?: AppSyncAuthConfiguration; + // Making this optional so test code can simply use a default DDB strategy for each model in the schema. + dataSourceStrategies?: Record; + resolverConfig?: ResolverConfig; + schema: string; + sqlDirectiveDataSourceStrategies?: SqlDirectiveDataSourceStrategy[]; + stackMapping?: Record; + synthParameters?: Partial; + transformers: TransformerPluginProvider[]; + transformParameters?: Partial; + userDefinedSlots?: Record; +}; + +/** + * This mirrors the old behavior of the graphql transformer, where we fully synthesize internally, for the purposes of + * unit testing, and to introduce fewer changes during the refactor. + */ +export const testTransform = (params: TestTransformParameters): DeploymentResources & { logs: any[] } => { + const { + authConfig, + dataSourceStrategies, + resolverConfig, + schema, + rdsLayerMapping, + sqlDirectiveDataSourceStrategies, + stackMapping, + synthParameters: overrideSynthParameters, + transformers, + transformParameters, + userDefinedSlots, + } = params; + + const transform = new GraphQLTransform({ + transformers, + stackMapping, + authConfig, + transformParameters, + userDefinedSlots, + resolverConfig, + }); + + const transformManager = new TransformManager(); + + const authConfigTypes = [authConfig?.defaultAuthentication, ...(authConfig?.additionalAuthenticationProviders ?? [])].map( + (authConfigEntry) => authConfigEntry?.authenticationType, + ); + + transform.transform({ + scope: transformManager.getTransformScope(), + nestedStackProvider: transformManager.getNestedStackProvider(), + assetProvider: transformManager.getAssetProvider(), + synthParameters: { + ...transformManager.getSynthParameters( + authConfigTypes.some((type) => type === 'AWS_IAM'), + authConfigTypes.some((type) => type === 'AMAZON_COGNITO_USER_POOLS'), + ), + ...overrideSynthParameters, + }, + schema, + rdsLayerMapping, + dataSourceStrategies: dataSourceStrategies ?? constructDataSourceStrategies(schema, DDB_DEFAULT_DATASOURCE_STRATEGY), + sqlDirectiveDataSourceStrategies, + }); + + const logs: any[] = []; + + transform.getLogs().forEach((log) => { + logs.push(log); + switch (log.level) { + case TransformerLogLevel.ERROR: + console.error(log.message); + break; + case TransformerLogLevel.WARN: + console.warn(log.message); + break; + case TransformerLogLevel.INFO: + console.info(log.message); + break; + case TransformerLogLevel.DEBUG: + console.debug(log.message); + break; + default: + console.error(log.message); + } + }); + + return { + ...transformManager.generateDeploymentResources(), + logs, + }; +}; diff --git a/packages/amplify-util-mock/src/__tests__/velocity/admin-auth.test.ts b/packages/amplify-util-mock/src/__tests__/velocity/admin-auth.test.ts index c76908e4093..feff83bd789 100644 --- a/packages/amplify-util-mock/src/__tests__/velocity/admin-auth.test.ts +++ b/packages/amplify-util-mock/src/__tests__/velocity/admin-auth.test.ts @@ -1,17 +1,23 @@ import { AuthTransformer } from '@aws-amplify/graphql-auth-transformer'; import { ModelTransformer } from '@aws-amplify/graphql-model-transformer'; -import { GraphQLTransform } from '@aws-amplify/graphql-transformer-core'; import { AppSyncAuthConfiguration } from '@aws-amplify/graphql-transformer-interfaces'; import { AmplifyAppSyncSimulatorAuthenticationType, AppSyncGraphQLExecutionContext } from '@aws-amplify/amplify-appsync-simulator'; import { VelocityTemplateSimulator, AppSyncVTLContext, getIAMToken } from '../../velocity'; -import { featureFlags } from './test-helper'; +import { DeploymentResources } from '../../__e2e_v2__/test-synthesizer/deployment-resources'; +import { testTransform } from '../v2-test-synthesizer/test-transform'; + +type TestTransform = { + transform: (schema: string) => DeploymentResources; +}; jest.mock('@aws-amplify/amplify-prompts'); describe('admin roles query checks', () => { const ADMIN_UI_ROLE = 'us-fake-1_uuid_Full-access/CognitoIdentityCredentials'; + const MOCK_BEFORE_TEMPLATE = `$util.qr($ctx.stash.put("adminRoles", ["${ADMIN_UI_ROLE}"]))`; + let vtlTemplate: VelocityTemplateSimulator; - let transformer: GraphQLTransform; + let transformer: TestTransform; const adminFullAccessRequest: AppSyncGraphQLExecutionContext = { requestAuthorizationMode: AmplifyAppSyncSimulatorAuthenticationType.AWS_IAM, iamToken: getIAMToken('us-fake-1_uuid_Full-access'), @@ -29,16 +35,15 @@ describe('admin roles query checks', () => { }, ], }; - transformer = new GraphQLTransform({ - authConfig, - transformers: [ - new ModelTransformer(), - new AuthTransformer({ - adminRoles: [ADMIN_UI_ROLE], + transformer = { + transform: (schema: string) => + testTransform({ + schema, + authConfig, + synthParameters: { adminRoles: [ADMIN_UI_ROLE] }, + transformers: [new ModelTransformer(), new AuthTransformer()], }), - ], - featureFlags, - }); + }; vtlTemplate = new VelocityTemplateSimulator({ authConfig }); }); @@ -54,7 +59,7 @@ describe('admin roles query checks', () => { const out = transformer.transform(validSchema); // field resolver - const secretValueTemplate = out.resolvers['Student.secretValue.req.vtl']; + const secretValueTemplate = [MOCK_BEFORE_TEMPLATE, out.resolvers['Student.secretValue.req.vtl']].join('\n'); const iamFieldContext: AppSyncVTLContext = { source: { secretValue: 'secretValue001', @@ -69,7 +74,7 @@ describe('admin roles query checks', () => { expect(secretValueResponse.result).toEqual('secretValue001'); // mutation resolver - const createStudentTemplate = out.resolvers['Mutation.createStudent.auth.1.req.vtl']; + const createStudentTemplate = [MOCK_BEFORE_TEMPLATE, out.resolvers['Mutation.createStudent.auth.1.req.vtl']].join('\n'); const iamCreateContext: AppSyncVTLContext = { arguments: { input: { @@ -93,8 +98,10 @@ describe('admin roles query checks', () => { describe('identity claim feature flag disabled', () => { describe('admin roles query checks', () => { const ADMIN_UI_ROLE = 'us-fake-1_uuid_Full-access/CognitoIdentityCredentials'; + const MOCK_BEFORE_TEMPLATE = `$util.qr($ctx.stash.put("adminRoles", ["${ADMIN_UI_ROLE}"]))`; + let vtlTemplate: VelocityTemplateSimulator; - let transformer: GraphQLTransform; + let transformer: TestTransform; const adminFullAccessRequest: AppSyncGraphQLExecutionContext = { requestAuthorizationMode: AmplifyAppSyncSimulatorAuthenticationType.AWS_IAM, iamToken: getIAMToken('us-fake-1_uuid_Full-access'), @@ -112,19 +119,15 @@ describe('identity claim feature flag disabled', () => { }, ], }; - transformer = new GraphQLTransform({ - authConfig, - transformers: [ - new ModelTransformer(), - new AuthTransformer({ - adminRoles: [ADMIN_UI_ROLE], + transformer = { + transform: (schema: string) => + testTransform({ + schema, + authConfig, + synthParameters: { adminRoles: [ADMIN_UI_ROLE] }, + transformers: [new ModelTransformer(), new AuthTransformer()], }), - ], - featureFlags: { - ...featureFlags, - ...{ getBoolean: () => false }, - }, - }); + }; vtlTemplate = new VelocityTemplateSimulator({ authConfig }); }); @@ -140,7 +143,7 @@ describe('identity claim feature flag disabled', () => { const out = transformer.transform(validSchema); // field resolver - const secretValueTemplate = out.resolvers['Student.secretValue.req.vtl']; + const secretValueTemplate = [MOCK_BEFORE_TEMPLATE, out.resolvers['Student.secretValue.req.vtl']].join('\n'); const iamFieldContext: AppSyncVTLContext = { source: { secretValue: 'secretValue001', @@ -155,7 +158,7 @@ describe('identity claim feature flag disabled', () => { expect(secretValueResponse.result).toEqual('secretValue001'); // mutation resolver - const createStudentTemplate = out.resolvers['Mutation.createStudent.auth.1.req.vtl']; + const createStudentTemplate = [MOCK_BEFORE_TEMPLATE, out.resolvers['Mutation.createStudent.auth.1.req.vtl']].join('\n'); const iamCreateContext: AppSyncVTLContext = { arguments: { input: { diff --git a/packages/amplify-util-mock/src/__tests__/velocity/model-auth.test.ts b/packages/amplify-util-mock/src/__tests__/velocity/model-auth.test.ts index 87802a36f25..2e4d9ad92a3 100644 --- a/packages/amplify-util-mock/src/__tests__/velocity/model-auth.test.ts +++ b/packages/amplify-util-mock/src/__tests__/velocity/model-auth.test.ts @@ -1,12 +1,15 @@ -/* eslint-disable import/no-unresolved */ import { AuthTransformer } from '@aws-amplify/graphql-auth-transformer'; import { IndexTransformer, PrimaryKeyTransformer } from '@aws-amplify/graphql-index-transformer'; import { ModelTransformer } from '@aws-amplify/graphql-model-transformer'; -import { GraphQLTransform } from '@aws-amplify/graphql-transformer-core'; import { AppSyncAuthConfiguration } from '@aws-amplify/graphql-transformer-interfaces'; import { AmplifyAppSyncSimulatorAuthenticationType, AppSyncGraphQLExecutionContext } from '@aws-amplify/amplify-appsync-simulator'; +import { DeploymentResources } from '../../__e2e_v2__/test-synthesizer/deployment-resources'; +import { testTransform } from '../v2-test-synthesizer/test-transform'; import { VelocityTemplateSimulator, AppSyncVTLContext, getJWTToken } from '../../velocity'; -import { featureFlags } from './test-helper'; + +type TestTransform = { + transform: (schema: string) => DeploymentResources; +}; jest.mock('@aws-amplify/amplify-prompts'); @@ -14,7 +17,7 @@ const USER_POOL_ID = 'us-fake-1ID'; describe('@model owner mutation checks', () => { let vtlTemplate: VelocityTemplateSimulator; - let transformer: GraphQLTransform; + let transformer: TestTransform; const ownerRequest: AppSyncGraphQLExecutionContext = { requestAuthorizationMode: AmplifyAppSyncSimulatorAuthenticationType.AMAZON_COGNITO_USER_POOLS, jwt: getJWTToken(USER_POOL_ID, 'user1', 'user1@test.com'), @@ -29,11 +32,14 @@ describe('@model owner mutation checks', () => { }, additionalAuthenticationProviders: [], }; - transformer = new GraphQLTransform({ - authConfig, - transformers: [new ModelTransformer(), new AuthTransformer()], - featureFlags, - }); + transformer = { + transform: (schema: string) => + testTransform({ + schema, + authConfig, + transformers: [new ModelTransformer(), new AuthTransformer()], + }), + }; vtlTemplate = new VelocityTemplateSimulator({ authConfig }); }); @@ -250,7 +256,7 @@ describe('@model owner mutation checks', () => { describe('@model operations', () => { let vtlTemplate: VelocityTemplateSimulator; - let transformer: GraphQLTransform; + let transformer: TestTransform; const ownerRequest: AppSyncGraphQLExecutionContext = { requestAuthorizationMode: AmplifyAppSyncSimulatorAuthenticationType.AMAZON_COGNITO_USER_POOLS, jwt: getJWTToken(USER_POOL_ID, 'user1', 'user1@test.com'), @@ -286,11 +292,14 @@ describe('@model operations', () => { }, additionalAuthenticationProviders: [], }; - transformer = new GraphQLTransform({ - authConfig, - transformers: [new ModelTransformer(), new AuthTransformer()], - featureFlags, - }); + transformer = { + transform: (schema: string) => + testTransform({ + schema, + authConfig, + transformers: [new ModelTransformer(), new AuthTransformer()], + }), + }; vtlTemplate = new VelocityTemplateSimulator({ authConfig }); }); @@ -528,7 +537,7 @@ describe('@model operations', () => { describe('@model field auth', () => { let vtlTemplate: VelocityTemplateSimulator; - let transformer: GraphQLTransform; + let transformer: TestTransform; const ownerRequest: AppSyncGraphQLExecutionContext = { requestAuthorizationMode: AmplifyAppSyncSimulatorAuthenticationType.AMAZON_COGNITO_USER_POOLS, jwt: getJWTToken(USER_POOL_ID, 'user1', 'user1@test.com'), @@ -548,11 +557,14 @@ describe('@model field auth', () => { }, additionalAuthenticationProviders: [], }; - transformer = new GraphQLTransform({ - authConfig, - transformers: [new ModelTransformer(), new AuthTransformer()], - featureFlags, - }); + transformer = { + transform: (schema: string) => + testTransform({ + schema, + authConfig, + transformers: [new ModelTransformer(), new AuthTransformer()], + }), + }; vtlTemplate = new VelocityTemplateSimulator({ authConfig }); }); @@ -728,16 +740,7 @@ describe('@model field auth', () => { }); describe('@model @primaryIndex @index auth', () => { - let vtlTemplate: VelocityTemplateSimulator; - let transformer: GraphQLTransform; - - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const ownerRequest: AppSyncGraphQLExecutionContext = { - requestAuthorizationMode: AmplifyAppSyncSimulatorAuthenticationType.AMAZON_COGNITO_USER_POOLS, - jwt: getJWTToken(USER_POOL_ID, 'user1', 'user1@test.com'), - headers: {}, - sourceIp: '', - }; + let transformer: TestTransform; beforeEach(() => { const authConfig: AppSyncAuthConfiguration = { @@ -746,25 +749,14 @@ describe('@model @primaryIndex @index auth', () => { }, additionalAuthenticationProviders: [], }; - transformer = new GraphQLTransform({ - authConfig, - featureFlags: { - getBoolean: jest.fn().mockImplementation((name, defaultValue) => { - if (name === 'secondaryKeyAsGSI') { - return true; - } - if (name === 'useSubUsernameForDefaultIdentityClaim') { - return true; - } - return defaultValue; + transformer = { + transform: (schema: string) => + testTransform({ + schema, + authConfig, + transformers: [new ModelTransformer(), new PrimaryKeyTransformer(), new IndexTransformer(), new AuthTransformer()], }), - getNumber: jest.fn(), - getObject: jest.fn(), - }, - transformers: [new ModelTransformer(), new PrimaryKeyTransformer(), new IndexTransformer(), new AuthTransformer()], - }); - // eslint-disable-next-line @typescript-eslint/no-unused-vars - vtlTemplate = new VelocityTemplateSimulator({ authConfig }); + }; }); test('listX operations', () => { @@ -790,7 +782,7 @@ describe('@model @primaryIndex @index auth', () => { describe('with identity claim feature flag disabled', () => { describe('@model owner mutation checks', () => { let vtlTemplate: VelocityTemplateSimulator; - let transformer: GraphQLTransform; + let transformer: TestTransform; const ownerRequest: AppSyncGraphQLExecutionContext = { requestAuthorizationMode: AmplifyAppSyncSimulatorAuthenticationType.AMAZON_COGNITO_USER_POOLS, jwt: getJWTToken(USER_POOL_ID, 'user1', 'user1@test.com'), @@ -805,14 +797,17 @@ describe('with identity claim feature flag disabled', () => { }, additionalAuthenticationProviders: [], }; - transformer = new GraphQLTransform({ - authConfig, - transformers: [new ModelTransformer(), new AuthTransformer()], - featureFlags: { - ...featureFlags, - ...{ getBoolean: () => false }, - }, - }); + transformer = { + transform: (schema: string) => + testTransform({ + schema, + authConfig, + transformers: [new ModelTransformer(), new AuthTransformer()], + transformParameters: { + useSubUsernameForDefaultIdentityClaim: false, + }, + }), + }; vtlTemplate = new VelocityTemplateSimulator({ authConfig }); }); @@ -1028,7 +1023,7 @@ describe('with identity claim feature flag disabled', () => { describe('@model operations', () => { let vtlTemplate: VelocityTemplateSimulator; - let transformer: GraphQLTransform; + let transformer: { transform: (schema: string) => DeploymentResources }; const ownerRequest: AppSyncGraphQLExecutionContext = { requestAuthorizationMode: AmplifyAppSyncSimulatorAuthenticationType.AMAZON_COGNITO_USER_POOLS, jwt: getJWTToken(USER_POOL_ID, 'user1', 'user1@test.com'), @@ -1064,14 +1059,17 @@ describe('with identity claim feature flag disabled', () => { }, additionalAuthenticationProviders: [], }; - transformer = new GraphQLTransform({ - authConfig, - transformers: [new ModelTransformer(), new AuthTransformer()], - featureFlags: { - ...featureFlags, - ...{ getBoolean: () => false }, - }, - }); + transformer = { + transform: (schema: string) => + testTransform({ + schema, + authConfig, + transformers: [new ModelTransformer(), new AuthTransformer()], + transformParameters: { + useSubUsernameForDefaultIdentityClaim: false, + }, + }), + }; vtlTemplate = new VelocityTemplateSimulator({ authConfig }); }); @@ -1305,7 +1303,7 @@ describe('with identity claim feature flag disabled', () => { describe('@model field auth', () => { let vtlTemplate: VelocityTemplateSimulator; - let transformer: GraphQLTransform; + let transformer: TestTransform; const ownerRequest: AppSyncGraphQLExecutionContext = { requestAuthorizationMode: AmplifyAppSyncSimulatorAuthenticationType.AMAZON_COGNITO_USER_POOLS, jwt: getJWTToken(USER_POOL_ID, 'user1', 'user1@test.com'), @@ -1325,14 +1323,14 @@ describe('with identity claim feature flag disabled', () => { }, additionalAuthenticationProviders: [], }; - transformer = new GraphQLTransform({ - authConfig, - transformers: [new ModelTransformer(), new AuthTransformer()], - featureFlags: { - ...featureFlags, - ...{ getBoolean: () => false }, - }, - }); + transformer = { + transform: (schema: string) => + testTransform({ + schema, + authConfig, + transformers: [new ModelTransformer(), new AuthTransformer()], + }), + }; vtlTemplate = new VelocityTemplateSimulator({ authConfig }); }); @@ -1512,7 +1510,7 @@ describe('with identity claim feature flag disabled', () => { describe('@model @primaryIndex @index auth', () => { let vtlTemplate: VelocityTemplateSimulator; - let transformer: GraphQLTransform; + let transformer: TestTransform; const ownerRequest: AppSyncGraphQLExecutionContext = { requestAuthorizationMode: AmplifyAppSyncSimulatorAuthenticationType.AMAZON_COGNITO_USER_POOLS, @@ -1528,23 +1526,17 @@ describe('with identity claim feature flag disabled', () => { }, additionalAuthenticationProviders: [], }; - transformer = new GraphQLTransform({ - authConfig, - featureFlags: { - getBoolean: jest.fn().mockImplementation((name, defaultValue) => { - if (name === 'secondaryKeyAsGSI') { - return true; - } - if (name === 'useSubUsernameForDefaultIdentityClaim') { - return false; - } - return defaultValue; + transformer = { + transform: (schema: string) => + testTransform({ + schema, + authConfig, + transformParameters: { + useSubUsernameForDefaultIdentityClaim: false, + }, + transformers: [new ModelTransformer(), new PrimaryKeyTransformer(), new IndexTransformer(), new AuthTransformer()], }), - getNumber: jest.fn(), - getObject: jest.fn(), - }, - transformers: [new ModelTransformer(), new PrimaryKeyTransformer(), new IndexTransformer(), new AuthTransformer()], - }); + }; vtlTemplate = new VelocityTemplateSimulator({ authConfig }); }); diff --git a/packages/amplify-util-mock/src/__tests__/velocity/multi-auth.test.ts b/packages/amplify-util-mock/src/__tests__/velocity/multi-auth.test.ts index ab3c1cfe2d7..98ccac4e178 100644 --- a/packages/amplify-util-mock/src/__tests__/velocity/multi-auth.test.ts +++ b/packages/amplify-util-mock/src/__tests__/velocity/multi-auth.test.ts @@ -1,10 +1,14 @@ import { AuthTransformer } from '@aws-amplify/graphql-auth-transformer'; import { ModelTransformer } from '@aws-amplify/graphql-model-transformer'; -import { GraphQLTransform } from '@aws-amplify/graphql-transformer-core'; import { AppSyncAuthConfiguration } from '@aws-amplify/graphql-transformer-interfaces'; import { AmplifyAppSyncSimulatorAuthenticationType, AppSyncGraphQLExecutionContext } from '@aws-amplify/amplify-appsync-simulator'; +import { DeploymentResources } from '../../__e2e_v2__/test-synthesizer/deployment-resources'; +import { testTransform } from '../v2-test-synthesizer/test-transform'; import { VelocityTemplateSimulator, AppSyncVTLContext, getGenericToken } from '../../velocity'; -import { featureFlags } from './test-helper'; + +type TestTransform = { + transform: (schema: string) => DeploymentResources; +}; jest.mock('@aws-amplify/amplify-prompts'); @@ -13,7 +17,7 @@ jest.mock('@aws-amplify/amplify-prompts'); // - group: 'cognito:groups' -> default to null or empty list describe('@model + @auth with oidc provider', () => { let vtlTemplate: VelocityTemplateSimulator; - let transformer: GraphQLTransform; + let transformer: TestTransform; const subIdUser: AppSyncGraphQLExecutionContext = { requestAuthorizationMode: AmplifyAppSyncSimulatorAuthenticationType.OPENID_CONNECT, jwt: getGenericToken('randomIdUser', 'random@user.com'), @@ -37,11 +41,14 @@ describe('@model + @auth with oidc provider', () => { }, additionalAuthenticationProviders: [], }; - transformer = new GraphQLTransform({ - authConfig, - transformers: [new ModelTransformer(), new AuthTransformer()], - featureFlags, - }); + transformer = { + transform: (schema: string) => + testTransform({ + schema, + authConfig, + transformers: [new ModelTransformer(), new AuthTransformer()], + }), + }; vtlTemplate = new VelocityTemplateSimulator({ authConfig }); }); @@ -119,7 +126,7 @@ describe('@model + @auth with oidc provider', () => { describe('with identity claim feature flag disabled', () => { describe('@model + @auth with oidc provider', () => { let vtlTemplate: VelocityTemplateSimulator; - let transformer: GraphQLTransform; + let transformer: TestTransform; const subIdUser: AppSyncGraphQLExecutionContext = { requestAuthorizationMode: AmplifyAppSyncSimulatorAuthenticationType.OPENID_CONNECT, jwt: getGenericToken('randomIdUser', 'random@user.com'), @@ -143,14 +150,17 @@ describe('with identity claim feature flag disabled', () => { }, additionalAuthenticationProviders: [], }; - transformer = new GraphQLTransform({ - authConfig, - transformers: [new ModelTransformer(), new AuthTransformer()], - featureFlags: { - ...featureFlags, - ...{ getBoolean: () => false }, - }, - }); + transformer = { + transform: (schema: string) => + testTransform({ + schema, + authConfig, + transformers: [new ModelTransformer(), new AuthTransformer()], + transformParameters: { + useSubUsernameForDefaultIdentityClaim: false, + }, + }), + }; vtlTemplate = new VelocityTemplateSimulator({ authConfig }); }); diff --git a/packages/amplify-util-mock/src/__tests__/velocity/relational-auth.test.ts b/packages/amplify-util-mock/src/__tests__/velocity/relational-auth.test.ts index 1b2a7a801f7..718c29f0efc 100644 --- a/packages/amplify-util-mock/src/__tests__/velocity/relational-auth.test.ts +++ b/packages/amplify-util-mock/src/__tests__/velocity/relational-auth.test.ts @@ -2,21 +2,14 @@ import { AuthTransformer } from '@aws-amplify/graphql-auth-transformer'; import { ModelTransformer } from '@aws-amplify/graphql-model-transformer'; import { PrimaryKeyTransformer, IndexTransformer } from '@aws-amplify/graphql-index-transformer'; import { HasManyTransformer, HasOneTransformer, BelongsToTransformer } from '@aws-amplify/graphql-relational-transformer'; -import { GraphQLTransform } from '@aws-amplify/graphql-transformer-core'; -import { AppSyncAuthConfiguration, FeatureFlagProvider } from '@aws-amplify/graphql-transformer-interfaces'; -// eslint-disable-next-line import/no-unresolved +import { AppSyncAuthConfiguration } from '@aws-amplify/graphql-transformer-interfaces'; import { AmplifyAppSyncSimulatorAuthenticationType, AppSyncGraphQLExecutionContext } from '@aws-amplify/amplify-appsync-simulator'; +import { DeploymentResources } from '../../__e2e_v2__/test-synthesizer/deployment-resources'; +import { testTransform } from '../v2-test-synthesizer/test-transform'; import { VelocityTemplateSimulator, getJWTToken, getIAMToken } from '../../velocity'; -const mockFeatureFlags: FeatureFlagProvider = { - getBoolean: (value: string): boolean => { - if (value === 'useSubUsernameForDefaultIdentityClaim') { - return true; - } - return false; - }, - getNumber: jest.fn(), - getObject: jest.fn(), +type TestTransform = { + transform: (schema: string) => DeploymentResources; }; jest.mock('@aws-amplify/amplify-prompts'); @@ -25,7 +18,7 @@ const USER_POOL_ID = 'us-fake-1ID'; describe('relational tests', () => { let vtlTemplate: VelocityTemplateSimulator; - let transformer: GraphQLTransform; + let transformer: TestTransform; const ownerRequest: AppSyncGraphQLExecutionContext = { requestAuthorizationMode: AmplifyAppSyncSimulatorAuthenticationType.AMAZON_COGNITO_USER_POOLS, jwt: getJWTToken(USER_POOL_ID, 'user1', 'user1@test.com'), @@ -58,19 +51,22 @@ describe('relational tests', () => { }, ], }; - transformer = new GraphQLTransform({ - authConfig, - transformers: [ - new ModelTransformer(), - new AuthTransformer(), - new PrimaryKeyTransformer(), - new IndexTransformer(), - new HasManyTransformer(), - new HasOneTransformer(), - new BelongsToTransformer(), - ], - featureFlags: mockFeatureFlags, - }); + transformer = { + transform: (schema: string) => + testTransform({ + schema, + authConfig, + transformers: [ + new ModelTransformer(), + new AuthTransformer(), + new PrimaryKeyTransformer(), + new IndexTransformer(), + new HasManyTransformer(), + new HasOneTransformer(), + new BelongsToTransformer(), + ], + }), + }; vtlTemplate = new VelocityTemplateSimulator({ authConfig }); }); @@ -345,7 +341,7 @@ describe('relational tests', () => { describe('with identity claim feature flag disabled', () => { describe('relational tests', () => { let vtlTemplate: VelocityTemplateSimulator; - let transformer: GraphQLTransform; + let transformer: TestTransform; const ownerRequest: AppSyncGraphQLExecutionContext = { requestAuthorizationMode: AmplifyAppSyncSimulatorAuthenticationType.AMAZON_COGNITO_USER_POOLS, jwt: getJWTToken(USER_POOL_ID, 'user1', 'user1@test.com'), @@ -378,22 +374,25 @@ describe('with identity claim feature flag disabled', () => { }, ], }; - transformer = new GraphQLTransform({ - authConfig, - transformers: [ - new ModelTransformer(), - new AuthTransformer(), - new PrimaryKeyTransformer(), - new IndexTransformer(), - new HasManyTransformer(), - new HasOneTransformer(), - new BelongsToTransformer(), - ], - featureFlags: { - ...mockFeatureFlags, - ...{ getBoolean: () => false }, - }, - }); + transformer = { + transform: (schema: string) => + testTransform({ + schema, + authConfig, + transformers: [ + new ModelTransformer(), + new AuthTransformer(), + new PrimaryKeyTransformer(), + new IndexTransformer(), + new HasManyTransformer(), + new HasOneTransformer(), + new BelongsToTransformer(), + ], + transformParameters: { + useSubUsernameForDefaultIdentityClaim: false, + }, + }), + }; vtlTemplate = new VelocityTemplateSimulator({ authConfig }); }); diff --git a/packages/amplify-util-mock/src/__tests__/velocity/test-helper.ts b/packages/amplify-util-mock/src/__tests__/velocity/test-helper.ts deleted file mode 100644 index 668f20651fd..00000000000 --- a/packages/amplify-util-mock/src/__tests__/velocity/test-helper.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { FeatureFlagProvider } from '@aws-amplify/graphql-transformer-interfaces'; - -export const featureFlags: FeatureFlagProvider = { - getBoolean: (value: string, defaultValue?: boolean): boolean => { - if (value === 'useSubUsernameForDefaultIdentityClaim') { - return true; - } - return defaultValue; - }, - getNumber: jest.fn(), - getObject: jest.fn(), -}; diff --git a/packages/amplify-util-mock/src/api/api.ts b/packages/amplify-util-mock/src/api/api.ts index bd38e6b70a6..861e5627d47 100644 --- a/packages/amplify-util-mock/src/api/api.ts +++ b/packages/amplify-util-mock/src/api/api.ts @@ -55,7 +55,12 @@ export class APITest { private userOverriddenSlots: string[] = []; private searchableTables: string[] = []; - async start(context, port: number = MOCK_API_PORT, wsPort: number = MOCK_API_PORT) { + async start( + context, + port: number = MOCK_API_PORT, + wsPort: number = MOCK_API_PORT, + httpsConfig?: { sslKeyPath: string; sslCertPath: string }, + ) { try { context.amplify.addCleanUpTask(async (context) => { await this.stop(context); @@ -72,6 +77,7 @@ export class APITest { this.appSyncSimulator = new AmplifyAppSyncSimulator({ port, wsPort, + httpsConfig: httpsConfig, }); await this.appSyncSimulator.start(); await this.resolverOverrideManager.start(); @@ -88,6 +94,7 @@ export class APITest { await this.generateCode(context, appSyncConfig); context.print.info(`AppSync Mock endpoint is running at ${this.appSyncSimulator.url}`); + context.print.info(`GraphiQL IDE is available for local testing at ${this.appSyncSimulator.localhostUrl}`); await this.startDDBListeners(context, appSyncConfig, false); } catch (e) { const errMessage = 'Failed to start API Mocking.'; diff --git a/packages/amplify-util-mock/src/api/index.ts b/packages/amplify-util-mock/src/api/index.ts index 66fa710d022..66074e3cd2a 100644 --- a/packages/amplify-util-mock/src/api/index.ts +++ b/packages/amplify-util-mock/src/api/index.ts @@ -1,12 +1,17 @@ import { APITest } from './api'; import { addMockDataToGitIgnore, addMockAPIResourcesToGitIgnore } from '../utils'; +import { getMockConfig } from '../utils/mock-config-file'; +import { getHttpsConfig } from '../utils/get-https-config'; export async function start(context) { const testApi = new APITest(); try { addMockDataToGitIgnore(context); addMockAPIResourcesToGitIgnore(context); - await testApi.start(context); + const mockConfig = await getMockConfig(context); + const httpsConfig = getHttpsConfig(context); + + await testApi.start(context, mockConfig.graphqlPort, mockConfig.graphqlPort, httpsConfig); } catch (e) { console.log(e); // Sending term signal so we clean up after ourselves diff --git a/packages/amplify-util-mock/src/api/lambda-arn-to-config.ts b/packages/amplify-util-mock/src/api/lambda-arn-to-config.ts index 50871068c55..f2759587e0a 100644 --- a/packages/amplify-util-mock/src/api/lambda-arn-to-config.ts +++ b/packages/amplify-util-mock/src/api/lambda-arn-to-config.ts @@ -34,7 +34,7 @@ export const lambdaArnToConfig = async (context: $TSContext, arn: $TSAny): Promi throw new Error(`Cannot interpret Lambda ARN [${JSON.stringify(arn)}]${errorSuffix}`); } const lambdaNames = _.entries<{ service: string }>(_.get(stateManager.getMeta(), ['function'])) - .filter(([_, funcMeta]) => funcMeta.service === ServiceName.LambdaFunction) + .filter(([, funcMeta]) => funcMeta.service === ServiceName.LambdaFunction) .map(([key]) => key); const foundLambdaName = lambdaNames.find((name) => searchString.includes(name)); if (!foundLambdaName) { diff --git a/packages/amplify-util-mock/src/utils/get-https-config.ts b/packages/amplify-util-mock/src/utils/get-https-config.ts new file mode 100644 index 00000000000..539d8350abb --- /dev/null +++ b/packages/amplify-util-mock/src/utils/get-https-config.ts @@ -0,0 +1,29 @@ +export function getHttpsConfig(context): { sslKeyPath: string; sslCertPath: string } | null { + if (!context.input || !context.input.argv) { + return null; + } + + const argv = context.input.argv; + const httpsIndex = argv.indexOf('--https'); + + if (httpsIndex !== -1) { + if (httpsIndex < argv.length - 2) { + const keyPath = argv[httpsIndex + 1]; + const certPath = argv[httpsIndex + 2]; + if (typeof keyPath === 'string' && typeof certPath === 'string') { + return { sslKeyPath: keyPath, sslCertPath: certPath }; + } else { + context.print.error('\nThe provided paths for the SSL key and certificate are not valid.\n'); + context.print.error('Please ensure you have entered the correct paths.\n'); + } + } else { + context.print.error('\nThe --https option must be followed by the path to the SSL key and the path to the SSL certificate.\n'); + context.print.error('Example: amplify mock api --https /path/to/key /path/to/cert\n'); + context.print.error('In order to generate a key and certificate, you can use openssl:\n'); + context.print.error('openssl req -nodes -new -x509 -keyout server.key -out server.cert\n'); + context.print.error('Then, run the command again with the paths to the generated key and certificate.\n'); + } + } + + return null; +} diff --git a/packages/amplify-util-uibuilder/.npmignore b/packages/amplify-util-uibuilder/.npmignore new file mode 100644 index 00000000000..2c166892c41 --- /dev/null +++ b/packages/amplify-util-uibuilder/.npmignore @@ -0,0 +1,4 @@ +**/__tests__/** +src +tsconfig.json +tsconfig.tsbuildinfo diff --git a/packages/amplify-util-uibuilder/CHANGELOG.md b/packages/amplify-util-uibuilder/CHANGELOG.md index d21daef5762..06c1be04a9e 100644 --- a/packages/amplify-util-uibuilder/CHANGELOG.md +++ b/packages/amplify-util-uibuilder/CHANGELOG.md @@ -3,6 +3,306 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.14.16](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.14.15...@aws-amplify/amplify-util-uibuilder@1.14.16) (2025-01-30) + +**Note:** Version bump only for package @aws-amplify/amplify-util-uibuilder + + + + + +## [1.14.15](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.14.14...@aws-amplify/amplify-util-uibuilder@1.14.15) (2025-01-16) + + +### Reverts + +* Revert "chore: cateogry-api + codegen version bump (#14048)" (#14049) ([5a0cdbf](https://github.com/aws-amplify/amplify-cli/commit/5a0cdbfa46856da320323923a4336d6ba60d82b9)), closes [#14048](https://github.com/aws-amplify/amplify-cli/issues/14048) [#14049](https://github.com/aws-amplify/amplify-cli/issues/14049) + + + + + +## [1.14.14](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.14.13...@aws-amplify/amplify-util-uibuilder@1.14.14) (2024-11-18) + +**Note:** Version bump only for package @aws-amplify/amplify-util-uibuilder + + + + + +## [1.14.13](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.14.12...@aws-amplify/amplify-util-uibuilder@1.14.13) (2024-10-05) + +**Note:** Version bump only for package @aws-amplify/amplify-util-uibuilder + + + + + +## [1.14.12](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.14.11...@aws-amplify/amplify-util-uibuilder@1.14.12) (2024-08-06) + + +### Bug Fixes + +* update awaiter s3 key ([#13872](https://github.com/aws-amplify/amplify-cli/issues/13872)) ([dacfab7](https://github.com/aws-amplify/amplify-cli/commit/dacfab73fcc53586b873f99e149d44c390b2d76f)) + + + + + +## [1.14.11](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.14.10...@aws-amplify/amplify-util-uibuilder@1.14.11) (2024-08-02) + +**Note:** Version bump only for package @aws-amplify/amplify-util-uibuilder + + + + + +## [1.14.10](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.14.9...@aws-amplify/amplify-util-uibuilder@1.14.10) (2024-06-27) + +**Note:** Version bump only for package @aws-amplify/amplify-util-uibuilder + + + + + +## [1.14.9](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.14.8...@aws-amplify/amplify-util-uibuilder@1.14.9) (2024-06-20) + +**Note:** Version bump only for package @aws-amplify/amplify-util-uibuilder + + + + + +## [1.14.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.14.7...@aws-amplify/amplify-util-uibuilder@1.14.8) (2024-06-06) + +**Note:** Version bump only for package @aws-amplify/amplify-util-uibuilder + + + + + +## [1.14.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.14.6...@aws-amplify/amplify-util-uibuilder@1.14.7) (2024-05-24) + +**Note:** Version bump only for package @aws-amplify/amplify-util-uibuilder + + + + + +## [1.14.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.14.5...@aws-amplify/amplify-util-uibuilder@1.14.6) (2024-05-07) + +**Note:** Version bump only for package @aws-amplify/amplify-util-uibuilder + + + + + +## [1.14.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.14.4...@aws-amplify/amplify-util-uibuilder@1.14.5) (2024-04-18) + +**Note:** Version bump only for package @aws-amplify/amplify-util-uibuilder + + + + + +## [1.14.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.14.3...@aws-amplify/amplify-util-uibuilder@1.14.4) (2024-04-15) + +**Note:** Version bump only for package @aws-amplify/amplify-util-uibuilder + + + + + +## [1.14.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.14.2...@aws-amplify/amplify-util-uibuilder@1.14.3) (2024-03-29) + +**Note:** Version bump only for package @aws-amplify/amplify-util-uibuilder + + + + + +## [1.14.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.14.1...@aws-amplify/amplify-util-uibuilder@1.14.2) (2024-03-06) + +**Note:** Version bump only for package @aws-amplify/amplify-util-uibuilder + + + + + +## [1.14.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.14.0...@aws-amplify/amplify-util-uibuilder@1.14.1) (2023-12-16) + +**Note:** Version bump only for package @aws-amplify/amplify-util-uibuilder + + + + + +# [1.14.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.13.3...@aws-amplify/amplify-util-uibuilder@1.14.0) (2023-12-11) + + +### Features + +* bump data dependencies to launch RDS feature ([#13409](https://github.com/aws-amplify/amplify-cli/issues/13409)) ([7fbf29f](https://github.com/aws-amplify/amplify-cli/commit/7fbf29f56eb7335d20de0b5526fbed7795a2af09)) + + + + + +## [1.13.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.13.1...@aws-amplify/amplify-util-uibuilder@1.13.3) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [1.13.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.13.1...@aws-amplify/amplify-util-uibuilder@1.13.2) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-util-uibuilder + + + + + +## [1.13.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.13.0...@aws-amplify/amplify-util-uibuilder@1.13.1) (2023-11-08) + +**Note:** Version bump only for package @aws-amplify/amplify-util-uibuilder + + + + + +# [1.13.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.12.0...@aws-amplify/amplify-util-uibuilder@1.13.0) (2023-10-12) + + +### Features + +* codegen support for Amplify Android Lazy loading and custom selection set ([8f9d855](https://github.com/aws-amplify/amplify-cli/commit/8f9d855a6eb74a8d0452b2878a65ff5222ac61ee)) + + + + + +# [1.12.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.11.2...@aws-amplify/amplify-util-uibuilder@1.12.0) (2023-10-05) + + +### Features + +* **amplify-util-uibuilder:** amplify js backwards compatibility ([#13288](https://github.com/aws-amplify/amplify-cli/issues/13288)) ([2db3e18](https://github.com/aws-amplify/amplify-cli/commit/2db3e181cf06954085eb8fade0b26162672327db)) + + + + + +## [1.11.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.11.1...@aws-amplify/amplify-util-uibuilder@1.11.2) (2023-10-03) + + +### Bug Fixes + +* update api category and codegen to capture high-priority bug-fixes ([3836b90](https://github.com/aws-amplify/amplify-cli/commit/3836b90b3f9ccd654d9c1b61a4b83c9c4712290c)) + + + + + +## [1.11.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.11.0...@aws-amplify/amplify-util-uibuilder@1.11.1) (2023-09-27) + +**Note:** Version bump only for package @aws-amplify/amplify-util-uibuilder + + + + + +# [1.11.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.10.1...@aws-amplify/amplify-util-uibuilder@1.11.0) (2023-09-22) + + +### Features + +* support codegen and modelgen commands in non-amplify directories ([#13245](https://github.com/aws-amplify/amplify-cli/issues/13245)) ([85dd5cb](https://github.com/aws-amplify/amplify-cli/commit/85dd5cb6b33d8df41e35c2cbcf3b3b0e390b1af0)) + + + + + +## [1.10.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.10.0...@aws-amplify/amplify-util-uibuilder@1.10.1) (2023-08-31) + + +### Bug Fixes + +* exclude tests from publish ([#13153](https://github.com/aws-amplify/amplify-cli/issues/13153)) ([1b1fe09](https://github.com/aws-amplify/amplify-cli/commit/1b1fe09a1c08be0262a1013f71354abd7160722a)) + + + + + +# [1.10.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.9.4...@aws-amplify/amplify-util-uibuilder@1.10.0) (2023-08-17) + + +### Features + +* generate components using graphql ([1568581](https://github.com/aws-amplify/amplify-cli/commit/15685810460881aa71e88724398b9be05ba53781)) + + + + + +## [1.9.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.9.3...@aws-amplify/amplify-util-uibuilder@1.9.4) (2023-08-09) + +**Note:** Version bump only for package @aws-amplify/amplify-util-uibuilder + + + + + +## [1.9.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.9.2...@aws-amplify/amplify-util-uibuilder@1.9.3) (2023-07-28) + +**Note:** Version bump only for package @aws-amplify/amplify-util-uibuilder + + + + + +## [1.9.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.9.1...@aws-amplify/amplify-util-uibuilder@1.9.2) (2023-07-27) + +**Note:** Version bump only for package @aws-amplify/amplify-util-uibuilder + + + + + +## [1.9.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.9.0...@aws-amplify/amplify-util-uibuilder@1.9.1) (2023-07-24) + +**Note:** Version bump only for package @aws-amplify/amplify-util-uibuilder + + + + + +# [1.9.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.8.4...@aws-amplify/amplify-util-uibuilder@1.9.0) (2023-07-20) + + +### Features + +* uibuilder codegen service ([#12896](https://github.com/aws-amplify/amplify-cli/issues/12896)) ([3fe2f98](https://github.com/aws-amplify/amplify-cli/commit/3fe2f98a99a9daf22efccb23a031882ea2be899b)) + + + + + +## [1.8.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.8.3...@aws-amplify/amplify-util-uibuilder@1.8.4) (2023-06-13) + + +### Bug Fixes + +* skip automatic form generation when datastore is not enabled ([e45fcc1](https://github.com/aws-amplify/amplify-cli/commit/e45fcc1a9bdff3d20645fb18bf2e2be34e16beb1)) + + + + + ## [1.8.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/amplify-util-uibuilder@1.8.1...@aws-amplify/amplify-util-uibuilder@1.8.3) (2023-05-25) diff --git a/packages/amplify-util-uibuilder/package.json b/packages/amplify-util-uibuilder/package.json index ef11875d1d0..e2b51601625 100644 --- a/packages/amplify-util-uibuilder/package.json +++ b/packages/amplify-util-uibuilder/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/amplify-util-uibuilder", - "version": "1.8.3", + "version": "1.14.16", "description": "", "main": "lib/index.js", "scripts": { @@ -14,19 +14,20 @@ "access": "public" }, "dependencies": { - "@aws-amplify/amplify-category-api": "^5.4.1", - "@aws-amplify/amplify-cli-core": "4.0.8", - "@aws-amplify/amplify-prompts": "2.7.0", + "@aws-amplify/amplify-category-api": "^5.12.10", + "@aws-amplify/amplify-cli-core": "4.3.11", + "@aws-amplify/amplify-prompts": "2.8.6", "@aws-amplify/codegen-ui": "2.14.2", "@aws-amplify/codegen-ui-react": "2.14.2", - "amplify-codegen": "^4.1.1", - "aws-sdk": "^2.1354.0", + "amplify-codegen": "^4.10.2", + "aws-sdk": "^2.1464.0", "fs-extra": "^8.1.0", + "node-fetch": "^2.6.7", "ora": "^4.0.3", "tiny-async-pool": "^2.1.0" }, "devDependencies": { - "@aws-amplify/appsync-modelgen-plugin": "^2.4.4", + "@aws-amplify/appsync-modelgen-plugin": "^2.6.0", "@types/fs-extra": "^8.0.1", "@types/jest": "^29.5.1", "@types/semver": "^7.1.0", diff --git a/packages/amplify-util-uibuilder/src/__tests__/.eslintrc.js b/packages/amplify-util-uibuilder/src/__tests__/.eslintrc.js new file mode 100644 index 00000000000..35b566d0b57 --- /dev/null +++ b/packages/amplify-util-uibuilder/src/__tests__/.eslintrc.js @@ -0,0 +1,9 @@ +module.exports = { + rules: { + // Tests in this directory use an empty package.json file + // that triggers import/no-extraneous-dependencies rule + // as it looks for closest package.json. + // This is false positive. + 'import/no-extraneous-dependencies': 'off', + }, +}; diff --git a/packages/amplify-util-uibuilder/src/__tests__/__snapshots__/syncAmplifyUiComponents.test.ts.snap b/packages/amplify-util-uibuilder/src/__tests__/__snapshots__/syncAmplifyUiComponents.test.ts.snap new file mode 100644 index 00000000000..9ac2154fccf --- /dev/null +++ b/packages/amplify-util-uibuilder/src/__tests__/__snapshots__/syncAmplifyUiComponents.test.ts.snap @@ -0,0 +1,46 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`should sync amplify ui builder components can map generic data schema to start codegen job request 1`] = ` +{ + "dataSourceType": "DataStore", + "enums": { + "Status": { + "values": [ + "ENABLED", + "DISABLED", + "HIDDEN", + ], + }, + }, + "models": { + "Blog": { + "fields": { + "id": { + "dataType": "ID", + "dataTypeValue": "ID", + "isArray": false, + "readOnly": false, + "required": true, + }, + }, + "isJoinTable": undefined, + "primaryKeys": [ + "id", + ], + }, + }, + "nonModels": { + "Metadata": { + "fields": { + "name": { + "dataType": "String", + "dataTypeValue": "String", + "isArray": false, + "readOnly": false, + "required": false, + }, + }, + }, + }, +} +`; diff --git a/packages/amplify-util-uibuilder/src/__tests__/createUiBuilderComponent.test.ts b/packages/amplify-util-uibuilder/src/__tests__/createUiBuilderComponent.test.ts deleted file mode 100644 index 90b085b6ad8..00000000000 --- a/packages/amplify-util-uibuilder/src/__tests__/createUiBuilderComponent.test.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* eslint-disable spellcheck/spell-checker */ -import * as codegen from '@aws-amplify/codegen-ui'; // eslint-disable-line import/no-extraneous-dependencies -import { - generateAmplifyUiBuilderIndexFile, - createUiBuilderTheme, - createUiBuilderComponent, - createUiBuilderForm, - generateAmplifyUiBuilderUtilFile, -} from '../commands/utils/codegenResources'; - -jest.mock('@aws-amplify/codegen-ui'); -const codegenMock = codegen as any; - -describe('can create a ui builder component', () => { - let context: any; - let schema: any; - beforeEach(() => { - context = { - exeInfo: { - projectConfig: { - providers: ['awscloudformation'], - frontend: 'javascript', - javascript: { - framework: 'react', - config: { - SourceDir: 'src', - }, - }, - }, - }, - parameters: { - argv: [], - }, - input: {}, - }; - schema = { - appId: 'd37nrm8rzt3oek', - bindingProperties: {}, - componentType: 'Box', - environmentName: 'staging', - id: 's-s4mU579Ycf6JGHwhqT', - name: 'aawwdd', - overrides: {}, - properties: {}, - variants: [], - }; - const renderSchemaToTemplateMock = jest.fn(); - codegenMock.StudioTemplateRendererManager = jest.fn().mockReturnValue({ - renderSchemaToTemplate: renderSchemaToTemplateMock, - }); - }); - it('calls the renderManager', () => { - createUiBuilderComponent(context, schema); - expect(new codegenMock.StudioTemplateRendererManager().renderSchemaToTemplate).toBeCalled(); - }); - it('calls the renderManager for themes', () => { - createUiBuilderTheme(context, schema); - expect(new codegenMock.StudioTemplateRendererManager().renderSchemaToTemplate).toBeCalled(); - }); - it('calls the renderManager for default theme', () => { - createUiBuilderTheme(context, schema, { renderDefaultTheme: true }); - expect(new codegenMock.StudioTemplateRendererManager().renderSchemaToTemplate).toBeCalled(); - }); - it('calls the renderManager for forms', () => { - createUiBuilderForm(context, schema); - expect(new codegenMock.StudioTemplateRendererManager().renderSchemaToTemplate).toBeCalled(); - }); - it('calls the renderManager for index file', () => { - generateAmplifyUiBuilderIndexFile(context, [schema]); - expect(new codegenMock.StudioTemplateRendererManager().renderSchemaToTemplate).toBeCalled(); - }); - it('does not call renderSchemaToTemplate for index file if no schema', () => { - generateAmplifyUiBuilderIndexFile(context, []); - expect(new codegenMock.StudioTemplateRendererManager().renderSchemaToTemplate).not.toBeCalled(); - }); - it('calls the renderManager for utils file w/ validation, formatter, and fetchByPath helpers if there is a form', () => { - generateAmplifyUiBuilderUtilFile(context, { hasForms: true, hasViews: false }); - expect(new codegenMock.StudioTemplateRendererManager().renderSchemaToTemplate).toBeCalledWith( - expect.arrayContaining(['validation', 'formatter', 'fetchByPath', 'processFile']), - ); - }); - it('calls the renderManager for utils file w/ formatter helper if there is a view', () => { - generateAmplifyUiBuilderUtilFile(context, { hasForms: false, hasViews: true }); - expect(new codegenMock.StudioTemplateRendererManager().renderSchemaToTemplate).toBeCalledWith(['formatter']); - }); - it('should not call the renderManager for utils file if there is neither form nor views', () => { - generateAmplifyUiBuilderUtilFile(context, { hasForms: false, hasViews: false }); - expect(new codegenMock.StudioTemplateRendererManager().renderSchemaToTemplate).toBeCalledTimes(0); - }); -}); diff --git a/packages/amplify-util-uibuilder/src/__tests__/detachedFormCleanup.test.ts b/packages/amplify-util-uibuilder/src/__tests__/detachedFormCleanup.test.ts index cb1ae85b720..94ebad75386 100644 --- a/packages/amplify-util-uibuilder/src/__tests__/detachedFormCleanup.test.ts +++ b/packages/amplify-util-uibuilder/src/__tests__/detachedFormCleanup.test.ts @@ -1,12 +1,13 @@ -// @aws-amplify/codegen-ui is in project dependencies -import { StudioSchema } from '@aws-amplify/codegen-ui'; // eslint-disable-line import/no-extraneous-dependencies import { AmplifyStudioClient } from '../clients'; // eslint-disable-line import/no-extraneous-dependencies import { isFormDetachedFromModel, isFormSchemaCustomized, isStudioForm, deleteDetachedForms } from '../commands/utils'; +import { Form } from 'aws-sdk/clients/amplifyuibuilder'; const amplifyStudioClientMock = AmplifyStudioClient as any; -const formWithNoCustomization: StudioSchema = { +const formWithNoCustomization: Form = { id: 'f-123456', + appId: 'd1234', + environmentName: 'staging', name: 'BlogCreateForm', formActionType: 'create', dataType: { @@ -17,9 +18,10 @@ const formWithNoCustomization: StudioSchema = { sectionalElements: {}, style: {}, cta: {}, + schemaVersion: '1.0', }; -const formWithStyle: StudioSchema = { +const formWithStyle: Form = { ...formWithNoCustomization, dataType: { dataSourceType: 'Custom', dataTypeName: 'Blog' }, style: { @@ -27,7 +29,7 @@ const formWithStyle: StudioSchema = { }, }; -const formWithFields: StudioSchema = { +const formWithFields: Form = { ...formWithNoCustomization, dataType: { dataSourceType: 'Custom', dataTypeName: 'Blog' }, fields: { diff --git a/packages/amplify-util-uibuilder/src/__tests__/generateComponents.test.ts b/packages/amplify-util-uibuilder/src/__tests__/generateComponents.test.ts index 0e26f1abc9c..5b0fa5fe12e 100644 --- a/packages/amplify-util-uibuilder/src/__tests__/generateComponents.test.ts +++ b/packages/amplify-util-uibuilder/src/__tests__/generateComponents.test.ts @@ -1,8 +1,10 @@ import aws from 'aws-sdk'; // eslint-disable-line import/no-extraneous-dependencies +import { getCodegenConfig } from 'amplify-codegen'; +import { isDataStoreEnabled } from '@aws-amplify/amplify-category-api'; import * as utils from '../commands/utils'; import { run } from '../commands/generateComponents'; -import { isDataStoreEnabled } from '@aws-amplify/amplify-category-api'; import { getTransformerVersion } from '../commands/utils/featureFlags'; +import { getUiBuilderComponentsPath } from '../commands/utils/getUiBuilderComponentsPath'; jest.mock('../commands/utils'); jest.mock('@aws-amplify/amplify-cli-core'); @@ -14,34 +16,66 @@ jest.mock('../commands/utils/featureFlags', () => ({ ...jest.requireActual('../commands/utils/featureFlags'), getTransformerVersion: jest.fn(), })); +jest.mock('../commands/utils/getUiBuilderComponentsPath', () => ({ + ...jest.requireActual('../commands/utils/getUiBuilderComponentsPath'), + getUiBuilderComponentsPath: jest.fn(), +})); +jest.mock('amplify-codegen', () => ({ + ...jest.requireActual('amplify-codegen'), + getCodegenConfig: jest.fn(), +})); + const awsMock = aws as any; const utilsMock = utils as any; +const isDataStoreEnabledMocked = isDataStoreEnabled as any; +const getTransformerVersionMocked = getTransformerVersion as any; +const getCodegenConfigMocked = getCodegenConfig as any; +const getUiBuilderComponentsPathMocked = getUiBuilderComponentsPath as any; -const isDataStoreEnabledMocked = jest.mocked(isDataStoreEnabled); -const getTransformerVersionMocked = jest.mocked(getTransformerVersion); utilsMock.shouldRenderComponents = jest.fn().mockReturnValue(true); utilsMock.notifyMissingPackages = jest.fn().mockReturnValue(true); utilsMock.getAmplifyDataSchema = jest.fn().mockReturnValue({}); +utilsMock.isFormDetachedFromModel = jest.fn().mockReturnValue(false); +utilsMock.extractUIComponents = jest.fn().mockReturnValue(undefined); +utilsMock.waitForSucceededJob = jest + .fn() + .mockReturnValue({ asset: { downloadUrl: 'amazon.com' }, statusMessage: `{\"codegenErrors\": [{\"schemaName\": \"BlogUpdateForm\"}]}` }); +utilsMock.parsePackageJsonFile = jest.fn().mockReturnValue({ dependencies: {} }); +utilsMock.getStartCodegenJobDependencies = jest + .fn() + .mockReturnValue({ '@aws-amplify/ui-react': '4.6.0', 'aws-amplify': '^5.0.2', '@aws-amplify/ui-react-storage': '^1.2.0' }); jest.mock('../commands/utils/featureFlags', () => ({ getTransformerVersion: jest.fn().mockReturnValue(2), })); +const defaultStudioFeatureFlags = { + autoGenerateForms: 'true', + autoGenerateViews: 'true', + isRelationshipSupported: 'false', + isNonModelSupported: 'false', + isGraphQLEnabled: 'true', +}; + +const projectPath = '/usr/test/test-project'; + describe('can generate components', () => { let context: any; let schemas: any; let mockedExport: jest.Mock; const getMetadataPromise = jest.fn().mockReturnValue({ features: { - autoGenerateForms: 'true', - autoGenerateViews: 'true', - formFeatureFlags: { - isRelationshipSupported: 'false', - isNonModelSupported: 'false', - }, + ...defaultStudioFeatureFlags, }, }); + const startCodegenJobPromise = jest.fn().mockReturnValue({ + entity: { id: 'jobId123' }, + }); + const mockStartCodegenJob = jest.fn().mockReturnValue({ + promise: startCodegenJobPromise, + }); beforeEach(() => { + jest.clearAllMocks(); isDataStoreEnabledMocked.mockResolvedValue(true); getTransformerVersionMocked.mockResolvedValue(2); context = { @@ -54,17 +88,20 @@ describe('can generate components', () => { envName: 'testEnvName', }, }, + exeInfo: { + localEnvInfo: { + projectPath, + }, + }, }; schemas = { entities: [ { - resultType: 'SUCCESS', schemaName: 'testSchema', name: 'testSchema', schemaVersion: '1.0', }, { - resultType: 'FAILURE', schemaName: 'testSchema', name: 'testSchema', schemaVersion: '1.0', @@ -72,6 +109,16 @@ describe('can generate components', () => { }, ], }; + + getCodegenConfigMocked.mockReturnValue({ + getGeneratedTypesPath: jest.fn().mockReturnValue(undefined), + getGeneratedQueriesPath: jest.fn().mockReturnValue(projectPath + '/src/graphql/queries.js'), + getGeneratedMutationsPath: jest.fn().mockReturnValue(projectPath + '/src/graphql/mutations.js'), + getGeneratedSubscriptionsPath: jest.fn().mockReturnValue(projectPath + '/src/graphql/subscriptions.js'), + getGeneratedFragmentsPath: jest.fn().mockReturnValue(projectPath + '/src/graphql/fragments.js'), + getQueryMaxDepth: jest.fn().mockReturnValue(3), + }); + mockedExport = jest.fn().mockReturnValue({ entities: schemas.entities, }); @@ -91,22 +138,28 @@ describe('can generate components', () => { getMetadata: jest.fn().mockReturnValue({ promise: getMetadataPromise, }), + startCodegenJob: mockStartCodegenJob, + getCodegenJob: jest.fn().mockReturnValue({ + promise: jest.fn().mockReturnValue({ status: 'succeeded' }), + }), }); + getUiBuilderComponentsPathMocked.mockReturnValue(projectPath + '/src/ui-components'); utilsMock.generateUiBuilderComponents = jest.fn().mockReturnValue(schemas.entities); utilsMock.generateUiBuilderThemes = jest.fn().mockReturnValue(schemas.entities); utilsMock.generateUiBuilderForms = jest.fn().mockReturnValue(schemas.entities); - utilsMock.getAmplifyDataSchema = jest.fn().mockReturnValue(undefined); utilsMock.generateAmplifyUiBuilderIndexFile = jest.fn().mockReturnValue(true); utilsMock.generateAmplifyUiBuilderUtilFile = jest.fn().mockReturnValue(true); utilsMock.deleteDetachedForms = jest.fn(); }); it('runs generateComponents', async () => { + utilsMock.isFormDetachedFromModel = jest.fn().mockReturnValueOnce(true); await run(context, 'PostPull'); expect(mockedExport).toBeCalledTimes(3); - expect(utilsMock.generateUiBuilderComponents).toBeCalledTimes(1); - expect(utilsMock.generateUiBuilderThemes).toBeCalledTimes(1); - expect(utilsMock.generateUiBuilderForms).toBeCalledTimes(1); + expect(startCodegenJobPromise).toBeCalledTimes(1); + expect(utilsMock.waitForSucceededJob).toBeCalledTimes(1); + expect(getUiBuilderComponentsPathMocked).toBeCalledTimes(1); + expect(utilsMock.extractUIComponents).toBeCalledTimes(1); expect(utilsMock.deleteDetachedForms).toBeCalledTimes(1); }); @@ -115,16 +168,15 @@ describe('can generate components', () => { getTransformerVersionMocked.mockResolvedValue(2); getMetadataPromise.mockReturnValue({ features: { - autoGenerateForms: 'true', - autoGenerateViews: 'true', - formFeatureFlags: { - isRelationshipSupported: 'false', - isNonModelSupported: 'false', - }, + ...defaultStudioFeatureFlags, }, }); await run(context, 'PostPull'); - expect(utilsMock.generateUiBuilderForms).toHaveBeenCalledWith(expect.anything(), expect.anything(), undefined, true, expect.anything()); + expect(mockStartCodegenJob).toHaveBeenCalledWith({ + appId: 'testAppId', + environmentName: 'testEnvName', + codegenJobToCreate: expect.objectContaining({ autoGenerateForms: true }), + }); }); it('should not autogenerate forms if transformer v1', async () => { @@ -132,65 +184,185 @@ describe('can generate components', () => { getTransformerVersionMocked.mockResolvedValue(1); getMetadataPromise.mockReturnValue({ features: { - autoGenerateForms: 'true', - autoGenerateViews: 'true', - formFeatureFlags: { - isRelationshipSupported: 'false', - isNonModelSupported: 'false', - }, + ...defaultStudioFeatureFlags, }, }); await run(context, 'PostPull'); - expect(utilsMock.generateUiBuilderForms).toHaveBeenCalledWith( - expect.anything(), - expect.anything(), - undefined, - false, - expect.anything(), - ); + expect(mockStartCodegenJob).toHaveBeenCalledWith({ + appId: 'testAppId', + environmentName: 'testEnvName', + codegenJobToCreate: expect.objectContaining({ autoGenerateForms: false }), + }); }); - it('should not autogenerate forms if datastore is not enabled', async () => { + it('should not autogenerate forms if datastore is not enabled and GraphQL is not enabled', async () => { isDataStoreEnabledMocked.mockResolvedValue(false); getMetadataPromise.mockReturnValue({ features: { - autoGenerateForms: 'true', - autoGenerateViews: 'true', - formFeatureFlags: { - isRelationshipSupported: 'false', - isNonModelSupported: 'false', - }, + ...defaultStudioFeatureFlags, + isGraphQLEnabled: 'false', + }, + }); + await run(context, 'PostPull'); + expect(mockStartCodegenJob).toHaveBeenCalledWith({ + appId: 'testAppId', + environmentName: 'testEnvName', + codegenJobToCreate: expect.objectContaining({ autoGenerateForms: false }), + }); + }); + + it('should not autogenerate forms if datastore is not enabled and GraphQL is enabled with invalid config', async () => { + isDataStoreEnabledMocked.mockResolvedValue(false); + getMetadataPromise.mockReturnValue({ + features: { + ...defaultStudioFeatureFlags, + isGraphQLEnabled: 'true', + }, + }); + getCodegenConfigMocked.mockImplementation(() => { + throw new Error(); + }); + await run(context, 'PostPull'); + expect(mockStartCodegenJob).toHaveBeenCalledWith({ + appId: 'testAppId', + environmentName: 'testEnvName', + codegenJobToCreate: expect.objectContaining({ autoGenerateForms: false }), + }); + }); + + it('should autogenerate forms if datastore is not enabled and GraphQL is enabled with valid config', async () => { + isDataStoreEnabledMocked.mockResolvedValue(false); + getMetadataPromise.mockReturnValue({ + features: { + ...defaultStudioFeatureFlags, + isGraphQLEnabled: 'true', }, }); await run(context, 'PostPull'); - expect(utilsMock.generateUiBuilderForms).toHaveBeenCalledWith( - expect.anything(), - expect.anything(), - undefined, - false, - expect.anything(), - ); + expect(mockStartCodegenJob).toHaveBeenCalledWith({ + appId: 'testAppId', + environmentName: 'testEnvName', + codegenJobToCreate: expect.objectContaining({ autoGenerateForms: true }), + }); }); - it('should not autogenerate forms if feature flag isnot enabled', async () => { + it('should not autogenerate forms if feature flag is not enabled', async () => { isDataStoreEnabledMocked.mockResolvedValue(true); getMetadataPromise.mockReturnValue({ features: { + ...defaultStudioFeatureFlags, autoGenerateForms: 'false', - autoGenerateViews: 'true', - formFeatureFlags: { - isRelationshipSupported: 'false', - isNonModelSupported: 'false', - }, }, }); await run(context, 'PostPull'); - expect(utilsMock.generateUiBuilderForms).toHaveBeenCalledWith( - expect.anything(), - expect.anything(), - undefined, - false, - expect.anything(), - ); + expect(mockStartCodegenJob).toHaveBeenCalledWith({ + appId: 'testAppId', + environmentName: 'testEnvName', + codegenJobToCreate: expect.objectContaining({ autoGenerateForms: false }), + }); + }); + + describe('codegen job creation', () => { + it('should inclue dataStore configuration when dataStore is enabled', async () => { + isDataStoreEnabledMocked.mockResolvedValue(true); + getMetadataPromise.mockReturnValue({ + features: { + ...defaultStudioFeatureFlags, + }, + }); + await run(context, 'PostPull'); + expect(mockStartCodegenJob).toHaveBeenCalledWith({ + appId: 'testAppId', + environmentName: 'testEnvName', + codegenJobToCreate: expect.objectContaining({ + renderConfig: { + react: expect.objectContaining({ + apiConfiguration: { + dataStoreConfig: {}, + }, + }), + }, + }), + }); + }); + + it('should inclue GraphQL configuration when dataStore is disabled and valid api configuration is found', async () => { + isDataStoreEnabledMocked.mockResolvedValue(false); + getMetadataPromise.mockReturnValue({ + features: { + ...defaultStudioFeatureFlags, + isGraphQLEnabled: 'true', + }, + }); + await run(context, 'PostPull'); + expect(mockStartCodegenJob).toHaveBeenCalledWith({ + appId: 'testAppId', + environmentName: 'testEnvName', + codegenJobToCreate: expect.objectContaining({ + renderConfig: { + react: expect.objectContaining({ + apiConfiguration: { + graphQLConfig: { + fragmentsFilePath: '../graphql/fragments.js', + mutationsFilePath: '../graphql/mutations.js', + queriesFilePath: '../graphql/queries.js', + subscriptionsFilePath: '../graphql/subscriptions.js', + typesFilePath: '', + }, + }, + }), + }, + }), + }); + }); + + it('should include dependencies', async () => { + isDataStoreEnabledMocked.mockResolvedValue(false); + getMetadataPromise.mockReturnValue({ + features: { + ...defaultStudioFeatureFlags, + isGraphQLEnabled: 'true', + }, + }); + await run(context, 'PostPull'); + expect(mockStartCodegenJob).toHaveBeenCalledWith({ + appId: 'testAppId', + environmentName: 'testEnvName', + codegenJobToCreate: expect.objectContaining({ + renderConfig: { + react: expect.objectContaining({ + dependencies: { '@aws-amplify/ui-react': '4.6.0', 'aws-amplify': '^5.0.2', '@aws-amplify/ui-react-storage': '^1.2.0' }, + }), + }, + }), + }); + }); + + it('should inclue noApi configuration when dataStore is disabled and no valid GraphQL Api', async () => { + isDataStoreEnabledMocked.mockResolvedValue(false); + getMetadataPromise.mockReturnValue({ + features: { + ...defaultStudioFeatureFlags, + isGraphQLEnabled: 'true', + }, + }); + getCodegenConfigMocked.mockImplementation(() => { + throw new Error(); + }); + await run(context, 'PostPull'); + expect(mockStartCodegenJob).toHaveBeenCalledWith({ + appId: 'testAppId', + environmentName: 'testEnvName', + codegenJobToCreate: expect.objectContaining({ + renderConfig: { + react: expect.objectContaining({ + apiConfiguration: { + noApiConfig: {}, + }, + }), + }, + }), + }); + }); }); }); diff --git a/packages/amplify-util-uibuilder/src/__tests__/notifyMissingPackages.test.ts b/packages/amplify-util-uibuilder/src/__tests__/notifyMissingPackages.test.ts index 1cfe9861a9e..08275042b2a 100644 --- a/packages/amplify-util-uibuilder/src/__tests__/notifyMissingPackages.test.ts +++ b/packages/amplify-util-uibuilder/src/__tests__/notifyMissingPackages.test.ts @@ -1,6 +1,6 @@ import * as printerDependency from '@aws-amplify/amplify-prompts'; import * as JSONUtilitiesDependency from '@aws-amplify/amplify-cli-core'; -import { notifyMissingPackages } from '../commands/utils/notifyMissingPackages'; +import { getStartCodegenJobDependencies, notifyMissingPackages } from '../commands/utils/notifyMissingPackages'; import { $TSContext } from '@aws-amplify/amplify-cli-core'; jest.mock('@aws-amplify/amplify-prompts'); jest.mock('@aws-amplify/amplify-cli-core'); @@ -8,12 +8,30 @@ printerDependency.printer.info = jest.fn(); printerDependency.printer.debug = jest.fn(); printerDependency.printer.warn = jest.fn(); +const dependencies = [ + { + name: '@aws-amplify/ui-react', + supportedVersion: '>=4.6.0 <6.0.0', + reason: 'Required to leverage Amplify UI primitives, and Amplify Studio component functions.', + }, + { + name: 'aws-amplify', + supportedVersion: '^5.0.2', + reason: 'Required to leverage DataStore.', + }, + { + name: '@aws-amplify/ui-react-storage', + supportedVersion: '^1.1.0', + reason: 'Required to leverage StorageManager.', + }, +]; + describe('should notify when packages are missing', () => { beforeEach(() => { jest.resetAllMocks(); JSONUtilitiesDependency.JSONUtilities.readJson = jest.fn().mockImplementation(() => ({ projectPath: __dirname, - dependencies: [], + dependencies: {}, })); }); it('skips notification if localEnv path cannot be determined', async () => { @@ -25,13 +43,13 @@ describe('should notify when packages are missing', () => { }, }; notifyMissingPackages(context as unknown as $TSContext, false); - expect(printerDependency.printer.debug).toBeCalledTimes(1); + expect(printerDependency.printer.debug).toBeCalledTimes(2); }); it('skips notification if package.json cannot be determined', async () => { JSONUtilitiesDependency.JSONUtilities.readJson = jest.fn().mockImplementation(() => ({ projectPath: 'asdf', - dependencies: [], + dependencies: {}, })); const context = { input: { @@ -41,7 +59,7 @@ describe('should notify when packages are missing', () => { }, }; notifyMissingPackages(context as unknown as $TSContext, false); - expect(printerDependency.printer.debug).toBeCalledTimes(1); + expect(printerDependency.printer.debug).toBeCalledTimes(2); }); it('notifies for all missing dependencies', async () => { @@ -52,7 +70,7 @@ describe('should notify when packages are missing', () => { }, }, }; - notifyMissingPackages(context as unknown as $TSContext, true); + notifyMissingPackages(context as unknown as $TSContext, true, dependencies); expect(printerDependency.printer.warn).toBeCalledTimes(3); }); @@ -68,7 +86,7 @@ describe('should notify when packages are missing', () => { }, }, }; - notifyMissingPackages(context as unknown as $TSContext); + notifyMissingPackages(context as unknown as $TSContext, false, dependencies); expect(printerDependency.printer.warn).toBeCalledTimes(1); }); @@ -80,7 +98,17 @@ describe('should notify when packages are missing', () => { }, }, }; - notifyMissingPackages(context as unknown as $TSContext, false); + notifyMissingPackages(context as unknown as $TSContext, false, dependencies); expect(printerDependency.printer.warn).toBeCalledTimes(2); }); + + it('should return required dependencies from package.json', () => { + const packageJsonDependencies = { + '@aws-amplify/ui-react': '4.6.0', + 'aws-amplify': '^5.0.2', + '@aws-amplify/ui-react-storage': '^1.2.0', + }; + const deps = getStartCodegenJobDependencies({ dependencies: { ...packageJsonDependencies, 'random-dependency': '1.0.0' } }); + expect(deps).toMatchObject(packageJsonDependencies); + }); }); diff --git a/packages/amplify-util-uibuilder/src/__tests__/storageManager.test.ts b/packages/amplify-util-uibuilder/src/__tests__/storageManager.test.ts index deb189c1150..0a3ab09b4c0 100644 --- a/packages/amplify-util-uibuilder/src/__tests__/storageManager.test.ts +++ b/packages/amplify-util-uibuilder/src/__tests__/storageManager.test.ts @@ -1,8 +1,11 @@ -import { StudioSchema } from '@aws-amplify/codegen-ui'; import { hasStorageField } from '../commands/utils'; +import { Form } from 'aws-sdk/clients/amplifyuibuilder'; -const formWithNoCustomization: StudioSchema = { +const formWithNoCustomization: Form = { id: 'f-123456', + appId: '123', + environmentName: 'staging', + schemaVersion: '1.0', name: 'BlogCreateForm', formActionType: 'create', dataType: { @@ -15,7 +18,7 @@ const formWithNoCustomization: StudioSchema = { cta: {}, }; -const formWithNoStorageField: StudioSchema = { +const formWithNoStorageField: Form = { ...formWithNoCustomization, dataType: { dataSourceType: 'Custom', dataTypeName: 'Blog' }, fields: { @@ -23,7 +26,7 @@ const formWithNoStorageField: StudioSchema = { }, }; -const formWithStorageField: StudioSchema = { +const formWithStorageField: Form = { ...formWithNoCustomization, dataType: { dataSourceType: 'Custom', dataTypeName: 'Blog' }, fields: { diff --git a/packages/amplify-util-uibuilder/src/__tests__/syncAmplifyUiComponents.test.ts b/packages/amplify-util-uibuilder/src/__tests__/syncAmplifyUiComponents.test.ts index 434c8ea4a6e..0b65aa5fd9e 100644 --- a/packages/amplify-util-uibuilder/src/__tests__/syncAmplifyUiComponents.test.ts +++ b/packages/amplify-util-uibuilder/src/__tests__/syncAmplifyUiComponents.test.ts @@ -1,18 +1,19 @@ -/* eslint-disable spellcheck/spell-checker */ -import { AmplifyCategories, AmplifySupportedService, stateManager } from '@aws-amplify/amplify-cli-core'; // eslint-disable-line import/no-extraneous-dependencies -import aws from 'aws-sdk'; // eslint-disable-line import/no-extraneous-dependencies +import { AmplifyCategories, AmplifySupportedService, stateManager } from '@aws-amplify/amplify-cli-core'; +import aws from 'aws-sdk'; import { - generateUiBuilderComponents, - generateUiBuilderThemes, getEnvName, getAppId, resolveAppId, - generateUiBuilderForms, + mapGenericDataSchemaToCodegen, + waitForSucceededJob, + extractUIComponents, + fetchWithRetries, } from '../commands/utils'; import { AmplifyStudioClient } from '../clients'; -import * as createUiBuilderComponentDependency from '../commands/utils/codegenResources'; -import { exampleSchema } from './utils'; import { isDataStoreEnabled } from '@aws-amplify/amplify-category-api'; +import type { GenericDataSchema } from '@aws-amplify/codegen-ui'; +import fetch, { Response } from 'node-fetch'; +import { existsSync, writeFileSync } from 'fs'; jest.mock('@aws-amplify/amplify-cli-core', () => ({ ...jest.requireActual('@aws-amplify/amplify-cli-core'), @@ -24,21 +25,56 @@ jest.mock('@aws-amplify/amplify-cli-core', () => ({ jest.mock('../commands/utils/featureFlags', () => ({ getTransformerVersion: jest.fn().mockReturnValue(2), })); - jest.mock('@aws-amplify/amplify-category-api', () => ({ - ...jest.requireActual('@aws-amplify/amplify-category-api'), isDataStoreEnabled: jest.fn(), })); +jest.mock('fs'); +jest.mock('node-fetch'); const awsMock = aws as any; const stateManagerMock = stateManager as any; -const createUiBuilderComponentDependencyMock = createUiBuilderComponentDependency as any; const isDataStoreEnabledMocked = jest.mocked(isDataStoreEnabled); +const mockWriteFileSync = jest.mocked(writeFileSync); +const mockExistsSync = jest.mocked(existsSync); +const mockNodeFetch = jest.mocked(fetch); describe('should sync amplify ui builder components', () => { let context: any; + const env = process.env; + + const mockGenericDataSchema: GenericDataSchema = { + dataSourceType: 'DataStore', + models: { + Blog: { + fields: { + id: { dataType: 'ID', required: true, readOnly: false, isArray: false }, + }, + primaryKeys: ['id'], + }, + }, + enums: { + Status: { values: ['ENABLED', 'DISABLED', 'HIDDEN'] }, + }, + nonModels: { + Metadata: { + fields: { + name: { + dataType: 'String', + required: false, + readOnly: false, + isArray: false, + }, + }, + }, + }, + }; + beforeEach(() => { + mockNodeFetch.mockReset(); + process.env = { ...env }; + isDataStoreEnabledMocked.mockResolvedValue(true); + mockExistsSync.mockReturnValue(false); context = { exeInfo: { projectConfig: { @@ -156,29 +192,10 @@ describe('should sync amplify ui builder components', () => { })), })), })); - - createUiBuilderComponentDependencyMock.createUiBuilderComponent = jest.fn(); - createUiBuilderComponentDependencyMock.createUiBuilderTheme = jest.fn(); - createUiBuilderComponentDependencyMock.createUiBuilderForm = jest.fn(); - createUiBuilderComponentDependencyMock.createUiBuilderView = jest.fn(); - }); - - it('pulls components from aws-sdk and passes them to createUiBuilderComponent', () => { - generateUiBuilderComponents(context, []); - }); - - it('does not throw an error when createUiBuilderComponent fails', () => { - createUiBuilderComponentDependencyMock.createUiBuilderComponent = jest.fn(() => { - throw new Error('ahhh!'); // eslint-disable-line spellcheck/spell-checker - }); - expect(async () => generateUiBuilderComponents(context, [])).not.toThrow(); }); - it('does not throw an error when createUiBuilderThemes fails', () => { - createUiBuilderComponentDependencyMock.createUiBuilderComponent = jest.fn(() => { - throw new Error('ahhh!'); // eslint-disable-line spellcheck/spell-checker - }); - expect(async () => generateUiBuilderThemes(context, [])).not.toThrow(); + afterEach(() => { + process.env = env; }); it('can getAmplifyUIBuilderService', async () => { @@ -199,110 +216,94 @@ describe('should sync amplify ui builder components', () => { }), ); }); + it('can list components', async () => { const client = await AmplifyStudioClient.setClientInfo(context); const components = await client.listComponents(); expect(components.entities).toHaveLength(1); }); + it('can list themes', async () => { const client = await AmplifyStudioClient.setClientInfo(context); const themes = await client.listThemes(); expect(themes.entities).toHaveLength(1); }); + it('can list forms', async () => { const client = await AmplifyStudioClient.setClientInfo(context); const forms = await client.listForms(); expect(forms.entities).toHaveLength(1); }); + it('can getAppId', async () => { const appId = getAppId(context); expect(appId).toBe('testAppId'); }); + it('can getEnvName', () => { const envName = getEnvName(context); expect(envName).toBe('testEnvName'); }); + it('can resolveAppId', async () => { const appId = resolveAppId(); expect(appId).toBe('testAppId'); }); + it('can throw on getAppId', async () => { context.input.options.appId = null; context.amplify.invokePluginMethod = () => null; stateManagerMock.getMeta = () => ({}); expect(() => getAppId(context)).toThrowError(); }); - it('can generate ui builder components', async () => { - createUiBuilderComponentDependencyMock.createUiBuilderComponent = jest.fn().mockImplementation(() => ({})); - const components = generateUiBuilderComponents(context, [{}, {}]); - expect(components.every((component) => component.resultType === 'SUCCESS')).toBeTruthy(); - }); - it('can handle failed generation generate ui builder components', async () => { - createUiBuilderComponentDependencyMock.createUiBuilderComponent = jest.fn().mockImplementation(() => { - throw new Error('ahh!'); - }); - const components = generateUiBuilderComponents(context, [{}, {}]); - expect(components.every((component) => component.resultType === 'FAILURE')).toBeTruthy(); - }); - it('can generate ui builder themes', async () => { - createUiBuilderComponentDependencyMock.createUiBuilderTheme = jest.fn().mockImplementation(() => ({})); - const themes = generateUiBuilderThemes(context, [{}, {}]); - expect(themes.every((theme) => theme.resultType === 'SUCCESS')).toBeTruthy(); - }); - it('can handle failed generation generate ui builder themes', async () => { - createUiBuilderComponentDependencyMock.createUiBuilderTheme = jest.fn().mockImplementation(() => { - throw new Error('ahh!'); - }); - const themes = generateUiBuilderThemes(context, [{}, {}]); - expect(themes.every((theme) => theme.resultType === 'FAILURE')).toBeTruthy(); - }); - it('can generate ui builder default theme when no themes are passed', async () => { - createUiBuilderComponentDependencyMock.createUiBuilderTheme = jest.fn().mockImplementation(() => ({})); - const themes = generateUiBuilderThemes(context, []); - expect(themes.every((theme) => theme.resultType === 'SUCCESS')).toBeTruthy(); - }); - it('can handle failed generation generate ui builder default theme when no themes are passed', async () => { - createUiBuilderComponentDependencyMock.createUiBuilderTheme = jest.fn().mockImplementation(() => { - throw new Error('ahh!'); - }); - const themes = generateUiBuilderThemes(context, []); - expect(themes.every((theme) => theme.resultType === 'FAILURE')).toBeTruthy(); + + it('can map generic data schema to start codegen job request', () => { + expect(mapGenericDataSchemaToCodegen(mockGenericDataSchema)).toMatchSnapshot(); }); - it('can generate ui builder forms', async () => { - createUiBuilderComponentDependencyMock.createUiBuilderForm = jest.fn().mockImplementation(() => ({})); - const forms = generateUiBuilderForms(context, [{}, {}]); - expect(forms.every((form) => form.resultType === 'SUCCESS')).toBeTruthy(); + + it('can wait for a succeeded job', async () => { + const succeededJob = { status: 'succeeded' }; + const getJob = jest.fn().mockResolvedValueOnce({ status: 'in_progress' }).mockResolvedValueOnce(succeededJob); + const job = await waitForSucceededJob(getJob, { pollInterval: 1 }); + expect(job).toEqual(succeededJob); }); - it('can handle failed generation generate ui builder forms', async () => { - createUiBuilderComponentDependencyMock.createUiBuilderForm = jest.fn().mockImplementation(() => { - throw new Error('ahh!'); - }); - const forms = generateUiBuilderForms(context, [{}, {}]); - expect(forms.every((form) => form.resultType === 'FAILURE')).toBeTruthy(); + + it('can throw if job failed', async () => { + const statusMessage = 'failed status'; + const getJob = jest.fn().mockResolvedValueOnce({ status: 'in_progress' }).mockResolvedValueOnce({ status: 'failed', statusMessage }); + await expect(waitForSucceededJob(getJob, { pollInterval: 2 })).rejects.toThrow(statusMessage); }); - it('can generate uibuilder forms from data schema if autogenerate true', async () => { - createUiBuilderComponentDependencyMock.createUiBuilderForm = jest.fn().mockImplementation(() => ({})); - const forms = generateUiBuilderForms(context, [], exampleSchema, true); - expect(forms.every((form) => form.resultType === 'SUCCESS')).toBeTruthy(); - // create & update form for author model - expect(forms.length).toEqual(2); + + it('can throw after timeout when waiting for a succeeded job', async () => { + process.env.UI_BUILDER_CODEGENJOB_TIMEOUT = '1'; + const succeededJob = { status: 'succeeded' }; + const getJob = jest.fn().mockResolvedValueOnce({ status: 'in_progress' }).mockResolvedValueOnce(succeededJob); + await expect(waitForSucceededJob(getJob, { pollInterval: 2 })).rejects.toThrow('Failed to return codegen job'); }); - it('should not autogenerate forms for join tables or unsupported models', async () => { - expect(Object.keys(exampleSchema.models)).toStrictEqual(['Author', 'JoinTable', 'EmptyModel']); - createUiBuilderComponentDependencyMock.createUiBuilderForm = jest.fn().mockImplementation( - // eslint-disable-next-line @typescript-eslint/no-unused-vars - (_ctx, schema, _dataSchema) => ({ name: schema.dataType.dataTypeName }), - ); - const forms = generateUiBuilderForms(context, [], exampleSchema, true); - expect(forms.every((form) => form.resultType === 'SUCCESS')).toBeTruthy(); - // only create & update form for author model - expect(forms.map((f) => (f.schema as any).name)).toStrictEqual(['Author', 'Author']); + it('can extract ui components from archive', async () => { + const mockedFetchResponse = { + ok: true, + json: jest.fn().mockResolvedValue({ + Output: [ + { + downloadUrl: 'https://s3.com', + fileName: 'MyComponent.jsx', + schemaName: 'MyComponent', + }, + ], + }), + text: jest.fn().mockResolvedValue('source code'), + } as unknown as Response; + mockNodeFetch.mockResolvedValue(mockedFetchResponse); + mockExistsSync.mockReturnValue(true); + await extractUIComponents('https:://example.aws', 'tmp/ui-components'); + expect(mockWriteFileSync).toHaveBeenCalledWith('tmp/ui-components/MyComponent.jsx', 'source code'); }); - it('does not generate uibuilder forms from data schema if autogenerate false', async () => { - createUiBuilderComponentDependencyMock.createUiBuilderForm = jest.fn().mockImplementation(() => ({})); - const forms = generateUiBuilderForms(context, [], exampleSchema, false); - expect(forms.length).toEqual(0); + it('fetchWithRetries retries 3 times', async () => { + mockNodeFetch.mockRejectedValue(new Error('Server dropped the connection')); + await expect(fetchWithRetries('https://amazon.com')).rejects.toThrowError('Fetch reached max number of retries without succeeding'); + expect(mockNodeFetch).toHaveBeenCalledTimes(3); }); }); diff --git a/packages/amplify-util-uibuilder/src/__tests__/utils/getApiConfiguration.test.ts b/packages/amplify-util-uibuilder/src/__tests__/utils/getApiConfiguration.test.ts new file mode 100644 index 00000000000..68c51c134ab --- /dev/null +++ b/packages/amplify-util-uibuilder/src/__tests__/utils/getApiConfiguration.test.ts @@ -0,0 +1,41 @@ +import { $TSContext } from '@aws-amplify/amplify-cli-core'; +import { relativeToComponentsPath } from '../../commands/utils/getApiConfiguration'; +import { getUiBuilderComponentsPath } from '../../commands/utils/getUiBuilderComponentsPath'; +import path from 'path'; + +jest.mock('../../commands/utils/getUiBuilderComponentsPath', () => ({ + ...jest.requireActual('../../commands/utils/getUiBuilderComponentsPath'), + getUiBuilderComponentsPath: jest.fn(), +})); + +jest.mock('path', () => ({ + ...jest.requireActual('path'), +})); + +const pathMocked = path as any; + +const getUiBuilderComponentsPathMocked = getUiBuilderComponentsPath as any; + +describe('relativeToComponentsPath', () => { + it('should return posix relative path when run in a windows-like environment', () => { + pathMocked.relative = path.win32.relative; + pathMocked.sep = path.win32.sep; + const projectPath = 'c:\\dev\\test\\test-project'; + const toImport = projectPath + '\\src\\graphql\\queries.js'; + getUiBuilderComponentsPathMocked.mockReturnValue(projectPath + '\\src\\ui-components'); + + const response = relativeToComponentsPath(toImport, {} as $TSContext); + + expect(response).toBe('../graphql/queries.js'); + }); + + it('should return expected relative path', () => { + const projectPath = '/dev/test/test-project'; + const toImport = projectPath + '/src/graphql/queries.js'; + getUiBuilderComponentsPathMocked.mockReturnValue(projectPath + '/src/ui-components'); + + const response = relativeToComponentsPath(toImport, {} as $TSContext); + + expect(response).toBe('../graphql/queries.js'); + }); +}); diff --git a/packages/amplify-util-uibuilder/src/clients/amplify-studio-client.ts b/packages/amplify-util-uibuilder/src/clients/amplify-studio-client.ts index acab1390a54..ef68d228d8a 100644 --- a/packages/amplify-util-uibuilder/src/clients/amplify-studio-client.ts +++ b/packages/amplify-util-uibuilder/src/clients/amplify-studio-client.ts @@ -1,6 +1,6 @@ import { $TSContext, CloudformationProviderFacade } from '@aws-amplify/amplify-cli-core'; import type { ServiceConfigurationOptions } from 'aws-sdk/lib/service'; -import type { CreateComponentData, Component, Theme, Form } from 'aws-sdk/clients/amplifyuibuilder'; +import type { CreateComponentData, Component, Theme, Form, StartCodegenJobData } from 'aws-sdk/clients/amplifyuibuilder'; import { AmplifyUIBuilder, AmplifyBackend } from 'aws-sdk'; import { printer } from '@aws-amplify/amplify-prompts'; import { getAppId, getEnvName } from '../commands/utils/environmentHelpers'; @@ -17,6 +17,7 @@ export type StudioMetadata = { isRelationshipSupported: boolean; isNonModelSupported: boolean; }; + isGraphQLEnabled: boolean; }; /** @@ -122,6 +123,7 @@ export default class AmplifyStudioClient { isRelationshipSupported: false, isNonModelSupported: false, }, + isGraphQLEnabled: false, }; } @@ -145,6 +147,7 @@ export default class AmplifyStudioClient { isRelationshipSupported: response.features?.isRelationshipSupported === 'true', isNonModelSupported: response.features?.isNonModelSupported === 'true', }, + isGraphQLEnabled: response.features?.isGraphQLEnabled === 'true', }; } catch (err) { throw new Error(`Failed to load metadata: ${err.message}`); @@ -171,7 +174,6 @@ export default class AmplifyStudioClient { uiBuilderComponents.push(...response.entities); nextToken = response.nextToken; } while (nextToken); - printer.debug(JSON.stringify(uiBuilderComponents, null, 2)); return { entities: uiBuilderComponents }; } catch (err) { throw new Error(`Failed to list components: ${err.message}`); @@ -199,7 +201,6 @@ export default class AmplifyStudioClient { uiBuilderThemes.push(...response.entities); nextToken = response.nextToken; } while (nextToken); - printer.debug(JSON.stringify(uiBuilderThemes, null, 2)); return { entities: uiBuilderThemes }; } catch (err) { throw new Error(`Failed to list themes: ${err.message}`); @@ -223,7 +224,6 @@ export default class AmplifyStudioClient { uibuilderForms.push(...response.entities); nextToken = response.nextToken; } while (nextToken); - printer.debug(JSON.stringify(uibuilderForms, null, 2)); return { entities: uibuilderForms }; } catch (err) { throw new Error(`Failed to list forms: ${err.message}`); @@ -274,4 +274,47 @@ export default class AmplifyStudioClient { throw new Error(`Models not found in AmplifyBackend:GetBackendAPIModels response: ${err.message}`); } }; + + startCodegenJob = async (codegenJobToCreate: StartCodegenJobData, appId?: string, envName?: string) => { + const environmentName = envName || this.#envName; + const resolvedAppId = appId || this.#appId; + try { + const response = await this.#amplifyUiBuilder + .startCodegenJob({ + appId: resolvedAppId, + environmentName, + codegenJobToCreate, + }) + .promise(); + if (!response.entity || !response.entity.id) { + throw new Error('Error starting codegen job'); + } + return response.entity.id; + } catch (err) { + printer.debug('Failed to start job'); + printer.debug(err.stack); + throw err; + } + }; + + getCodegenJob = async (jobId: string, appId?: string, envName?: string) => { + const environmentName = envName || this.#envName; + const resolvedAppId = appId || this.#appId; + try { + const { job } = await this.#amplifyUiBuilder + .getCodegenJob({ + id: jobId, + appId: resolvedAppId, + environmentName, + }) + .promise(); + if (!job) { + throw new Error('Error getting codegen job'); + } + return job; + } catch (err) { + printer.debug(err.toString()); + throw err; + } + }; } diff --git a/packages/amplify-util-uibuilder/src/commands/generateComponents.ts b/packages/amplify-util-uibuilder/src/commands/generateComponents.ts index f29702b24ab..f30cd7b9baf 100644 --- a/packages/amplify-util-uibuilder/src/commands/generateComponents.ts +++ b/packages/amplify-util-uibuilder/src/commands/generateComponents.ts @@ -1,5 +1,4 @@ /* eslint-disable spellcheck/spell-checker */ -import { StudioSchema } from '@aws-amplify/codegen-ui'; import ora from 'ora'; import { printer } from '@aws-amplify/amplify-prompts'; import { $TSContext } from '@aws-amplify/amplify-cli-core'; @@ -7,18 +6,19 @@ import { AmplifyStudioClient } from '../clients'; import { notifyMissingPackages, shouldRenderComponents, - generateUiBuilderComponents, - generateUiBuilderThemes, getAmplifyDataSchema, - generateAmplifyUiBuilderIndexFile, - generateUiBuilderForms, - generateAmplifyUiBuilderUtilFile, - isStudioForm, isFormDetachedFromModel, deleteDetachedForms, hasStorageField, - isFormSchema, + mapGenericDataSchemaToCodegen, + waitForSucceededJob, + extractUIComponents, + parsePackageJsonFile, + getStartCodegenJobDependencies, } from './utils'; +import { getUiBuilderComponentsPath } from './utils/getUiBuilderComponentsPath'; +import { AmplifyUIBuilder } from 'aws-sdk'; +import { getApiConfiguration, hasDataStoreConfiguration, hasGraphQLConfiguration } from './utils/getApiConfiguration'; /** * Pulls ui components from Studio backend and generates the code in the user's file system @@ -37,70 +37,72 @@ export const run = async (context: $TSContext, eventType: 'PostPush' | 'PostPull studioClient.isGraphQLSupported ? getAmplifyDataSchema(context) : Promise.resolve(undefined), ]); - const nothingWouldAutogenerate = - !dataSchema || !studioClient.metadata.autoGenerateForms || !studioClient.isGraphQLSupported || !studioClient.isDataStoreEnabled; + const canGenerateDataComponents = dataSchema && studioClient.isGraphQLSupported; - if (nothingWouldAutogenerate && [componentSchemas, themeSchemas, formSchemas].every((group) => !group.entities.length)) { + const apiConfiguration: AmplifyUIBuilder.ApiConfiguration = canGenerateDataComponents + ? getApiConfiguration(studioClient, context) + : { noApiConfig: {} }; + const hasDataAPI = hasDataStoreConfiguration(apiConfiguration) || hasGraphQLConfiguration(apiConfiguration); + const willAutogenerateItems = canGenerateDataComponents && studioClient.metadata.autoGenerateForms && hasDataAPI; + + if (!willAutogenerateItems && [componentSchemas, themeSchemas, formSchemas].every((group) => !group.entities.length)) { printer.debug('Skipping UI component generation since none are found.'); return; } spinner.start('Generating UI components...'); - const generatedResults = { - component: generateUiBuilderComponents(context, componentSchemas.entities, dataSchema), - theme: generateUiBuilderThemes(context, themeSchemas.entities), - form: generateUiBuilderForms( - context, - formSchemas.entities, - dataSchema, - studioClient.metadata.autoGenerateForms && studioClient.isGraphQLSupported && studioClient.isDataStoreEnabled, - studioClient.metadata.formFeatureFlags, - ), + const genericDataSchema = dataSchema ? mapGenericDataSchemaToCodegen(dataSchema) : undefined; + + const packageJsonFile = parsePackageJsonFile(context); + let startCodegenJobDependencies: { [key: string]: string } = {}; + if (packageJsonFile) { + startCodegenJobDependencies = getStartCodegenJobDependencies(packageJsonFile); + } + const job: AmplifyUIBuilder.StartCodegenJobData = { + renderConfig: { + react: { + module: 'es2020', + target: 'es2020', + script: 'jsx', + renderTypeDeclarations: true, + apiConfiguration, + dependencies: startCodegenJobDependencies, + } as AmplifyUIBuilder.ReactStartCodegenJobData, + }, + autoGenerateForms: studioClient.metadata.autoGenerateForms && studioClient.isGraphQLSupported && hasDataAPI, + features: studioClient.metadata.formFeatureFlags, }; + // SDK will throw if this is undefined + // even though it's optional + if (genericDataSchema) { + job.genericDataSchema = genericDataSchema; + } + const jobId = await studioClient.startCodegenJob(job); + const finishedJob = await waitForSucceededJob(() => studioClient.getCodegenJob(jobId), { pollInterval: 2000 }); + if (!finishedJob.asset?.downloadUrl) { + throw new Error('No manifest file in codegen job'); + } + const uiBuilderComponentsPath = getUiBuilderComponentsPath(context); + await extractUIComponents(finishedJob.asset.downloadUrl, uiBuilderComponentsPath); - const successfulSchemas: StudioSchema[] = []; const detachedForms: { id: string; name: string }[] = []; - let hasSuccessfulForm = false; const failedResponseNames: string[] = []; const modelNames = dataSchema?.models ? new Set(Object.keys(dataSchema.models)) : new Set(); - let hasStorageManagerField = false; + const hasStorageManagerField = formSchemas.entities.some((formSchema) => hasStorageField(formSchema)); - Object.entries(generatedResults).forEach(([key, results]) => { - results.forEach((result) => { - if (result.resultType === 'SUCCESS') { - successfulSchemas.push(result.schema); - if (key === 'form') { - hasSuccessfulForm = true; - - if (!hasStorageManagerField && isFormSchema(result.schema) && hasStorageField(result.schema)) { - hasStorageManagerField = true; - } - } - } else { - const failedSchema = result.schema; - /** - * A form resource may fail to generate because it's DataStore model type - * no longer exists. - */ - if ( - isStudioForm(failedSchema) && - failedSchema.id && - dataSchema && - eventType === 'PostPush' && - isFormDetachedFromModel(failedSchema, modelNames) - ) { - // Don't need to add form to failedResponseNames if it is going to be deleted - detachedForms.push({ id: failedSchema.id, name: failedSchema.name }); - return; - } - failedResponseNames.push(result.schemaName); - } + if (dataSchema && eventType === 'PostPush') { + formSchemas.entities.forEach((formSchema) => { + isFormDetachedFromModel(formSchema, modelNames) && detachedForms.push({ id: formSchema.id, name: formSchema.name }); }); - }); - - generateAmplifyUiBuilderIndexFile(context, successfulSchemas); + } - generateAmplifyUiBuilderUtilFile(context, { hasForms: hasSuccessfulForm, hasViews: false }); + if (finishedJob.statusMessage) { + const errorStack = JSON.parse(finishedJob.statusMessage)?.codegenErrors as { + schemaName: string; + error: string; + }[]; + errorStack.forEach((e) => failedResponseNames.push(e.schemaName)); + } if (failedResponseNames.length > 0) { spinner.fail(`Failed to sync the following components: ${failedResponseNames.join(', ')}`); @@ -112,6 +114,7 @@ export const run = async (context: $TSContext, eventType: 'PostPush' | 'PostPull ...componentSchemas.entities.filter((component) => !component.schemaVersion).map((component) => component.name), ...formSchemas.entities.filter((form) => !form.schemaVersion).map((form) => form.name), ]; + if (invalidComponentNames.length) { printer.warn( `The components ${invalidComponentNames.join( @@ -120,7 +123,7 @@ export const run = async (context: $TSContext, eventType: 'PostPush' | 'PostPull ); } - notifyMissingPackages(context, hasStorageManagerField); + notifyMissingPackages(context, hasStorageManagerField, finishedJob.dependencies); await deleteDetachedForms(detachedForms, studioClient); } catch (e) { diff --git a/packages/amplify-util-uibuilder/src/commands/utils/codegenResources.ts b/packages/amplify-util-uibuilder/src/commands/utils/codegenResources.ts index b7351e2f2cd..5479ba179b7 100644 --- a/packages/amplify-util-uibuilder/src/commands/utils/codegenResources.ts +++ b/packages/amplify-util-uibuilder/src/commands/utils/codegenResources.ts @@ -1,211 +1,8 @@ -/* eslint-disable spellcheck/spell-checker*/ -// You have a misspelled word: Renderer on Identifier -import { - StudioTemplateRendererManager, - StudioComponent, - StudioTheme, - StudioTemplateRendererFactory, - StudioTemplateRenderer, - FrameworkOutputManager, - RenderTextComponentResponse, - GenericDataSchema, - getGenericFromDataStore, - StudioForm, - StudioSchema, - FormFeatureFlags, -} from '@aws-amplify/codegen-ui'; -import { - AmplifyRenderer, - AmplifyFormRenderer, - ReactThemeStudioTemplateRenderer, - ReactIndexStudioTemplateRenderer, - ModuleKind, - ScriptTarget, - ScriptKind, - UtilTemplateType, - ReactUtilsStudioTemplateRenderer, - ReactThemeStudioTemplateRendererOptions, -} from '@aws-amplify/codegen-ui-react'; +import { GenericDataSchema, getGenericFromDataStore } from '@aws-amplify/codegen-ui'; import { printer } from '@aws-amplify/amplify-prompts'; import { $TSContext } from '@aws-amplify/amplify-cli-core'; -import { getUiBuilderComponentsPath } from './getUiBuilderComponentsPath'; import { ModelIntrospectionSchema } from '@aws-amplify/appsync-modelgen-plugin'; -const config = { - module: ModuleKind.ES2020, - target: ScriptTarget.ES2020, - script: ScriptKind.JSX, - renderTypeDeclarations: true, -}; - -/** - * Writes component file to the work space - */ -export const createUiBuilderComponent = (context: $TSContext, schema: StudioComponent, dataSchema?: GenericDataSchema): StudioComponent => { - const uiBuilderComponentsPath = getUiBuilderComponentsPath(context); - const rendererFactory = new StudioTemplateRendererFactory( - (component: StudioComponent) => new AmplifyRenderer(component as StudioComponent, config, dataSchema), - ); - - const outputPathDir = uiBuilderComponentsPath; - - const rendererManager = new StudioTemplateRendererManager(rendererFactory, { - outputPathDir, - }); - - rendererManager.renderSchemaToTemplate(schema); - return schema; -}; - -/** - * Writes theme file to the work space - */ -export const createUiBuilderTheme = ( - context: $TSContext, - schema: StudioTheme, - options?: ReactThemeStudioTemplateRendererOptions, -): StudioTheme => { - const uiBuilderComponentsPath = getUiBuilderComponentsPath(context); - const rendererFactory = new StudioTemplateRendererFactory( - (component: StudioTheme) => - new ReactThemeStudioTemplateRenderer(component, config, options) as unknown as StudioTemplateRenderer< - unknown, - StudioTheme, - FrameworkOutputManager, - RenderTextComponentResponse - >, - ); - - const outputPathDir = uiBuilderComponentsPath; - - const rendererManager = new StudioTemplateRendererManager(rendererFactory, { - outputPathDir, - }); - - try { - rendererManager.renderSchemaToTemplate(schema); - return schema; - } catch (e) { - printer.debug(e); - printer.debug('Skipping invalid theme with schema'); - printer.debug(JSON.stringify(schema, null, 2)); - throw e; - } -}; - -/** - * Writes form file to the work space - */ -export const createUiBuilderForm = ( - context: $TSContext, - schema: StudioForm, - dataSchema?: GenericDataSchema, - formFeatureFlags?: FormFeatureFlags, -): StudioForm => { - const uiBuilderComponentsPath = getUiBuilderComponentsPath(context); - const rendererFactory = new StudioTemplateRendererFactory( - (form: StudioForm) => - new AmplifyFormRenderer(form, dataSchema, config, formFeatureFlags) as unknown as StudioTemplateRenderer< - unknown, - StudioForm, - FrameworkOutputManager, - RenderTextComponentResponse - >, - ); - - const outputPathDir = uiBuilderComponentsPath; - - const rendererManager = new StudioTemplateRendererManager(rendererFactory, { - outputPathDir, - }); - - try { - rendererManager.renderSchemaToTemplate(schema); - return schema; - } catch (e) { - printer.debug(e); - printer.debug('Skipping invalid form with schema'); - printer.debug(JSON.stringify(schema, null, 2)); - throw e; - } -}; - -/** - * Writes index file to the work space - */ -export const generateAmplifyUiBuilderIndexFile = (context: $TSContext, schemas: StudioSchema[]): void => { - const uiBuilderComponentsPath = getUiBuilderComponentsPath(context); - const rendererFactory = new StudioTemplateRendererFactory( - (schema: StudioSchema[]) => - new ReactIndexStudioTemplateRenderer(schema, config) as unknown as StudioTemplateRenderer< - unknown, - StudioSchema[], - FrameworkOutputManager, - RenderTextComponentResponse - >, - ); - - const outputPathDir = uiBuilderComponentsPath; - - const rendererManager = new StudioTemplateRendererManager(rendererFactory, { - outputPathDir, - }); - - try { - if (schemas.length) { - rendererManager.renderSchemaToTemplate(schemas); - } - } catch (e) { - printer.debug(e); - printer.debug('Failed to generate component index file'); - throw e; - } -}; - -type UtilFileChecks = { - hasForms: boolean; - hasViews: boolean; -}; - -/** - * Writes utils file to the work space - */ -export const generateAmplifyUiBuilderUtilFile = (context: $TSContext, { hasForms, hasViews }: UtilFileChecks): void => { - const uiBuilderComponentsPath = getUiBuilderComponentsPath(context); - const rendererFactory = new StudioTemplateRendererFactory( - (utils: UtilTemplateType[]) => new ReactUtilsStudioTemplateRenderer(utils, config), - ); - - const outputPathDir = uiBuilderComponentsPath; - - const rendererManager = new StudioTemplateRendererManager(rendererFactory, { - outputPathDir, - }); - - const utils = new Set(); - - if (hasForms) { - utils.add('validation'); - utils.add('formatter'); - utils.add('fetchByPath'); - utils.add('processFile'); - } - - if (hasViews) { - utils.add('formatter'); - } - - try { - if (utils.size) { - rendererManager.renderSchemaToTemplate([...utils]); - } - } catch (e) { - printer.debug(e); - printer.debug('Failed to generate component index file'); - throw e; - } -}; - /** * If models are available, they will be populated in the models field of the returned object. * If they're not available, it will return undefined @@ -224,25 +21,3 @@ export const getAmplifyDataSchema = async (context: $TSContext): Promise }): StudioForm[] => { - const getSchema = (name: string, type: 'create' | 'update'): StudioForm => ({ - name: `${name}${type === 'create' ? 'CreateForm' : 'UpdateForm'}`, - formActionType: type, - dataType: { dataSourceType: 'DataStore', dataTypeName: name }, - fields: {}, - sectionalElements: {}, - style: {}, - cta: {}, - }); - - const schemas: StudioForm[] = []; - - Object.entries(modelMap).forEach(([name, set]) => { - set.forEach((type) => schemas.push(getSchema(name, type))); - }); - return schemas; -}; diff --git a/packages/amplify-util-uibuilder/src/commands/utils/detachedFormCleanup.ts b/packages/amplify-util-uibuilder/src/commands/utils/detachedFormCleanup.ts index 659e39509f1..c2864ddb2e9 100644 --- a/packages/amplify-util-uibuilder/src/commands/utils/detachedFormCleanup.ts +++ b/packages/amplify-util-uibuilder/src/commands/utils/detachedFormCleanup.ts @@ -1,4 +1,3 @@ -import { StudioForm, StudioSchema } from '@aws-amplify/codegen-ui'; import { Form } from 'aws-sdk/clients/amplifyuibuilder'; import { AmplifyStudioClient } from '../../clients'; import { printer } from '@aws-amplify/amplify-prompts'; @@ -7,7 +6,7 @@ import asyncPool from 'tiny-async-pool'; /** * Does the form's reference DataStore type exist in the list of models */ -export const isFormDetachedFromModel = (formSchema: StudioForm | Form, modelNames: Set): boolean => { +export const isFormDetachedFromModel = (formSchema: Form, modelNames: Set): boolean => { return formSchema.dataType.dataSourceType === 'DataStore' && !modelNames.has(formSchema.dataType.dataTypeName); }; @@ -16,7 +15,7 @@ export const isFormDetachedFromModel = (formSchema: StudioForm | Form, modelName * @param schema The schema to test * @returns boolean */ -export const isFormSchemaCustomized = (formSchema: StudioForm | Form): boolean => { +export const isFormSchemaCustomized = (formSchema: Form): boolean => { const { fields, style, sectionalElements } = formSchema; // Fields and sectionalElements just need an empty check if (!isEmpty({ ...fields, ...sectionalElements })) { @@ -31,7 +30,7 @@ export const isFormSchemaCustomized = (formSchema: StudioForm | Form): boolean = /** * Is the schema a StudioForm */ -export const isStudioForm = (schema: StudioSchema | undefined): schema is StudioForm => { +export const isStudioForm = (schema: Form | undefined): schema is Form => { if (!schema) return false; return 'formActionType' in schema; }; diff --git a/packages/amplify-util-uibuilder/src/commands/utils/getApiConfiguration.ts b/packages/amplify-util-uibuilder/src/commands/utils/getApiConfiguration.ts new file mode 100644 index 00000000000..a9aae79d36d --- /dev/null +++ b/packages/amplify-util-uibuilder/src/commands/utils/getApiConfiguration.ts @@ -0,0 +1,73 @@ +import { printer } from '@aws-amplify/amplify-prompts'; +import { AmplifyStudioClient } from '../../clients'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; +import { getUiBuilderComponentsPath } from './getUiBuilderComponentsPath'; +import { getCodegenConfig } from 'amplify-codegen'; +import { ApiConfiguration } from 'aws-sdk/clients/amplifyuibuilder'; +import path from 'path'; + +//a posix formatted relative path must always be returned as the return values are used directly in jsx files as import paths +export function relativeToComponentsPath(importPath: string, context: $TSContext): string { + const componentsPath = getUiBuilderComponentsPath(context); + const segments = path.relative(componentsPath, importPath).split(path.sep); + return path.posix.join(...segments); +} + +export function getApiConfiguration(studioClient: AmplifyStudioClient, context: $TSContext): ApiConfiguration { + if (studioClient.isDataStoreEnabled) { + return { + dataStoreConfig: {}, + }; + } + + if (studioClient.metadata.isGraphQLEnabled) { + printer.debug('building graphql config'); + // attempt to get api codegen info + const projectPath = context.exeInfo.localEnvInfo.projectPath; + let promptForUpdateCodegen = false; + + try { + const codegenConfig = getCodegenConfig(projectPath); + const typesPath = codegenConfig.getGeneratedTypesPath(); + const apiConfiguration = { + graphQLConfig: { + typesFilePath: (typesPath && relativeToComponentsPath(typesPath, context)) || '', + queriesFilePath: relativeToComponentsPath(codegenConfig.getGeneratedQueriesPath(), context), + mutationsFilePath: relativeToComponentsPath(codegenConfig.getGeneratedMutationsPath(), context), + subscriptionsFilePath: relativeToComponentsPath(codegenConfig.getGeneratedSubscriptionsPath(), context), + fragmentsFilePath: relativeToComponentsPath(codegenConfig.getGeneratedFragmentsPath(), context), + }, + }; + + const minQueryDepth = 3; + const isQueryingTooShallow = (codegenConfig.getQueryMaxDepth() || 0) < minQueryDepth; + + if (studioClient.metadata.formFeatureFlags.isRelationshipSupported && isQueryingTooShallow) { + promptForUpdateCodegen = true; + printer.warn(`Forms with relationships require a maximum query depth of at least ${minQueryDepth}.`); + } + return apiConfiguration; + } catch { + promptForUpdateCodegen = true; + printer.warn( + 'Unable to successfully configure component generation for GraphQL. This will impact generating forms and components bound to your data models.', + ); + } finally { + if (promptForUpdateCodegen) { + printer.warn(`Run 'amplify update codegen' to ensure GraphQL configurations for your project are correct.`); + } + } + } + + return { + noApiConfig: {}, + }; +} + +export function hasDataStoreConfiguration(apiConfiguration: ApiConfiguration): boolean { + return apiConfiguration.dataStoreConfig !== undefined; +} + +export function hasGraphQLConfiguration(apiConfiguration: ApiConfiguration): boolean { + return apiConfiguration.graphQLConfig !== undefined; +} diff --git a/packages/amplify-util-uibuilder/src/commands/utils/notifyMissingPackages.ts b/packages/amplify-util-uibuilder/src/commands/utils/notifyMissingPackages.ts index 829e98eac8e..b7aed58ced8 100644 --- a/packages/amplify-util-uibuilder/src/commands/utils/notifyMissingPackages.ts +++ b/packages/amplify-util-uibuilder/src/commands/utils/notifyMissingPackages.ts @@ -3,44 +3,82 @@ import { printer } from '@aws-amplify/amplify-prompts'; import fs from 'fs-extra'; import path from 'path'; import rangeSubset from 'semver/ranges/subset'; -import { RequiredDependency } from '@aws-amplify/codegen-ui'; -import { ReactRequiredDependencyProvider } from '@aws-amplify/codegen-ui-react'; import { extractArgs } from './extractArgs'; +import { CodegenDependencies } from 'aws-sdk/clients/amplifyuibuilder'; -const getRequiredDependencies = (hasStorageManagerField?: boolean): RequiredDependency[] => - new ReactRequiredDependencyProvider().getRequiredDependencies(hasStorageManagerField); +type PackageJson = { dependencies: { [key: string]: string } }; /** - * Displays a warning to the user if they have npm dependencies - * they need to install in their application for UIBuilder components to work properly + * Returns a parsed package.json file if present + * @param context cli context object + * @returns A JSON object representing the package.json file in the local project or undefined if not found */ -export const notifyMissingPackages = (context: $TSContext, hasStorageManagerField?: boolean): void => { +export const parsePackageJsonFile = (context: $TSContext): PackageJson | undefined => { const args = extractArgs(context); const localEnvFilePath = args.localEnvFilePath ?? pathManager.getLocalEnvFilePath(); if (!fs.existsSync(localEnvFilePath)) { - printer.debug('localEnvFilePath could not be determined - skipping dependency notification.'); - return; + printer.debug('localEnvFilePath could not be determined - skipping parsing file.'); + return undefined; } const localEnvJson = JSONUtilities.readJson(localEnvFilePath); const packageJsonPath = path.join((localEnvJson as $TSAny).projectPath, 'package.json'); if (!fs.existsSync(packageJsonPath)) { - printer.debug('package.json file not found - skipping dependency notification.'); + printer.debug('package.json file not found'); + return undefined; + } + const packageJson = JSONUtilities.readJson(packageJsonPath) as PackageJson; + return packageJson; +}; + +/** + * Get the versions of the codegen dependencies from the package.json file + * @param packageJsonFile + * @returns codegen dependencies and versions + */ +export const getStartCodegenJobDependencies = (packageJsonFile: PackageJson) => { + const codegenDependencies: { [key: string]: string } = {}; + ['aws-amplify', '@aws-amplify/ui-react-storage', '@aws-amplify/ui-react'].forEach((dep) => { + if (packageJsonFile.dependencies[dep]) { + codegenDependencies[dep] = packageJsonFile.dependencies[dep]; + } else { + // use the latest available if there aren't any current dependencies in the project + codegenDependencies[dep] = 'latest'; + } + }); + return codegenDependencies; +}; + +/** + * Displays a warning to the user if they have npm dependencies + * they need to install in their application for UIBuilder components to work properly + */ +export const notifyMissingPackages = ( + context: $TSContext, + hasStorageManagerField?: boolean, + dependencies?: CodegenDependencies | undefined, +): void => { + const packageJson = parsePackageJsonFile(context); + if (!packageJson) { + printer.debug('skipping dependency notification.'); return; } - const packageJson = JSONUtilities.readJson(packageJsonPath) as { dependencies: { [key: string]: string } }; - getRequiredDependencies(hasStorageManagerField).forEach((dependency: $TSAny) => { - const packageIsInstalled = Object.keys(packageJson.dependencies).includes(dependency.dependencyName); + + // don't warn about the storage dependency if the project doesn't need it + const dependenciesToCheck = hasStorageManagerField + ? dependencies + : dependencies?.filter((dependency) => dependency.name !== '@aws-amplify/ui-react-storage'); + + dependenciesToCheck?.forEach((dependency) => { + const packageIsInstalled = Object.keys(packageJson.dependencies).includes(`${dependency.name}`); if (!packageIsInstalled) { printer.warn( - `UIBuilder components require "${dependency.dependencyName}" that is not in your package.json. Run \`npm install "${dependency.dependencyName}@${dependency.supportedSemVerPattern}"\`. ${dependency.reason}`, + `UIBuilder components require "${dependency.name}" that is not in your package.json. Run \`npm install "${dependency.name}@${dependency.supportedVersion}"\`. ${dependency.reason}`, ); - } else if (!rangeSubset(packageJson.dependencies[dependency.dependencyName], dependency.supportedSemVerPattern)) { + } else if (!rangeSubset(packageJson.dependencies[`${dependency.name}`], dependency.supportedVersion ?? '')) { printer.warn( - `UIBuilder components require version "${dependency.supportedSemVerPattern}" of "${ - dependency.dependencyName - }". You currently are on version "${packageJson.dependencies[dependency.dependencyName]}". Run \`npm install "${ - dependency.dependencyName - }@${dependency.supportedSemVerPattern}"\`. ${dependency.reason}`, + `UIBuilder components require version "${dependency.supportedVersion}" of "${dependency.name}". You currently are on version "${ + packageJson.dependencies[`${dependency.name}`] + }". Run \`npm install "${dependency.name}@${dependency.supportedVersion}"\`. ${dependency.reason}`, ); } }); diff --git a/packages/amplify-util-uibuilder/src/commands/utils/storageManager.ts b/packages/amplify-util-uibuilder/src/commands/utils/storageManager.ts index 19e889daf78..a4b27ae248b 100644 --- a/packages/amplify-util-uibuilder/src/commands/utils/storageManager.ts +++ b/packages/amplify-util-uibuilder/src/commands/utils/storageManager.ts @@ -1,6 +1,6 @@ -import { StudioForm, StudioFormFieldConfig, StudioGenericFieldConfig, StudioSchema } from '@aws-amplify/codegen-ui'; +import { FieldConfig, Form } from 'aws-sdk/clients/amplifyuibuilder'; -export const hasStorageField = (form: StudioForm): boolean => { +export const hasStorageField = (form: Form): boolean => { const result = Object.values(form.fields).some((field) => { return isGenericFieldConfig(field) && field.inputType?.type === 'StorageField'; }); @@ -8,10 +8,6 @@ export const hasStorageField = (form: StudioForm): boolean => { return result; }; -export const isFormSchema = (schema: StudioSchema): schema is StudioForm => { - return schema && Object.keys(schema).includes('fields'); -}; - -export const isGenericFieldConfig = (config: StudioFormFieldConfig): config is StudioGenericFieldConfig => { +export const isGenericFieldConfig = (config: FieldConfig) => { return !Object.keys(config).includes('excluded'); }; diff --git a/packages/amplify-util-uibuilder/src/commands/utils/syncAmplifyUiBuilderComponents.ts b/packages/amplify-util-uibuilder/src/commands/utils/syncAmplifyUiBuilderComponents.ts index 6adbdc0925e..87a9b4f01d9 100644 --- a/packages/amplify-util-uibuilder/src/commands/utils/syncAmplifyUiBuilderComponents.ts +++ b/packages/amplify-util-uibuilder/src/commands/utils/syncAmplifyUiBuilderComponents.ts @@ -1,145 +1,232 @@ import { printer } from '@aws-amplify/amplify-prompts'; -import { $TSContext } from '@aws-amplify/amplify-cli-core'; +import type { GenericDataSchema, GenericDataField, GenericDataRelationshipType } from '@aws-amplify/codegen-ui'; import { - StudioComponent, - StudioTheme, - GenericDataSchema, - StudioForm, - StudioSchema, - checkIsSupportedAsForm, - FormFeatureFlags, -} from '@aws-amplify/codegen-ui'; -import { createUiBuilderComponent, createUiBuilderForm, createUiBuilderTheme, generateBaseForms } from './codegenResources'; -import { getUiBuilderComponentsPath } from './getUiBuilderComponentsPath'; - -type CodegenResponse = - | { - resultType: 'SUCCESS'; - schema: T; - schemaName?: string; + CodegenGenericDataEnum, + CodegenGenericDataFieldDataType, + CodegenGenericDataFields, + CodegenGenericDataModel, + CodegenGenericDataNonModel, + CodegenGenericDataRelationshipType, + CodegenJob, + CodegenJobGenericDataSchema, +} from 'aws-sdk/clients/amplifyuibuilder'; +import fetch from 'node-fetch'; +import { performance } from 'perf_hooks'; +import path from 'path'; +import fs from 'fs'; +import asyncPool from 'tiny-async-pool'; + +const mapRelationshipTypeToCodegen = ( + relationship: GenericDataRelationshipType | undefined, +): CodegenGenericDataRelationshipType | undefined => { + if (!relationship) return undefined; + + switch (relationship.type) { + case 'HAS_MANY': + return { + type: 'HAS_MANY', + relatedModelFields: relationship.relatedModelFields, + canUnlinkAssociatedModel: !!relationship.canUnlinkAssociatedModel, + relatedJoinFieldName: relationship.relatedJoinFieldName, + relatedJoinTableName: relationship.relatedJoinTableName, + belongsToFieldOnRelatedModel: relationship.belongsToFieldOnRelatedModel, + relatedModelName: relationship.relatedModelName, + }; + case 'HAS_ONE': + return { + type: 'HAS_ONE', + associatedFields: relationship.associatedFields, + isHasManyIndex: !!relationship.isHasManyIndex, + relatedModelName: relationship.relatedModelName, + }; + case 'BELONGS_TO': + return { + type: 'BELONGS_TO', + associatedFields: relationship.associatedFields, + isHasManyIndex: !!relationship.isHasManyIndex, + relatedModelName: relationship.relatedModelName, + }; + default: + throw new Error('Invalid relationship type'); + } +}; + +const mapDataFieldsToCodegen = (fields: { [fieldName: string]: GenericDataField }): CodegenGenericDataFields => { + const codegenFields: CodegenGenericDataFields = {}; + + Object.entries(fields).forEach(([fieldName, dataField]) => { + let dataType: CodegenGenericDataFieldDataType = ''; + let dataTypeValue = ''; + if (typeof dataField.dataType === 'object' && dataField.dataType !== null) { + if ('enum' in dataField.dataType) { + dataType = 'Enum'; + dataTypeValue = dataField.dataType.enum; + } else if ('model' in dataField.dataType) { + dataType = 'Model'; + dataTypeValue = dataField.dataType.model; + } else if ('nonModel' in dataField.dataType) { + dataType = 'NonModel'; + dataTypeValue = dataField.dataType.nonModel; + } + } else { + dataType = dataField.dataType; + dataTypeValue = dataField.dataType; } - | { - resultType: 'FAILURE'; - schemaName: string; - error: Error; - schema?: T; + codegenFields[fieldName] = { + dataType: dataType, + dataTypeValue: dataTypeValue, + required: dataField.required, + readOnly: dataField.readOnly, + isArray: dataField.isArray, }; - -// TODO: when types are updated in codegen-ui reference mappers here so the arguments accepted are not any - -/** - * Returns instances of StudioComponent from the component schemas - */ -export const generateUiBuilderComponents = ( - context: $TSContext, - componentSchemas: any[], // eslint-disable-line @typescript-eslint/no-explicit-any - dataSchema?: GenericDataSchema, -): CodegenResponse[] => { - const componentResults = componentSchemas.map>((schema) => { - try { - const component = createUiBuilderComponent(context, schema, dataSchema); - return { resultType: 'SUCCESS', schema: component }; - } catch (e) { - printer.debug(`Failure caught processing ${schema.name}`); - printer.debug(e); - return { resultType: 'FAILURE', schemaName: schema.name, error: e }; + if (dataField.relationship) { + codegenFields[fieldName].relationship = mapRelationshipTypeToCodegen(dataField.relationship); } }); - printer.debug( - `Generated ${componentResults.filter((result) => result.resultType === 'SUCCESS').length} components in ${getUiBuilderComponentsPath( - context, - )}`, - ); - return componentResults; + return codegenFields; }; -/** - * Returns instances of StudioTheme from theme schemas - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export const generateUiBuilderThemes = (context: $TSContext, themeSchemas: any[]): CodegenResponse[] => { - if (themeSchemas.length === 0) { - return [generateDefaultTheme(context)]; - } - const themeResults = themeSchemas.map>((schema) => { - try { - const theme = createUiBuilderTheme(context, schema); - return { resultType: 'SUCCESS', schema: theme }; - } catch (e) { - printer.debug(`Failure caught processing ${schema.name}`); - printer.debug(e); - return { resultType: 'FAILURE', schemaName: schema.name, error: e }; - } +export const mapGenericDataSchemaToCodegen = (genericDataSchema: GenericDataSchema): CodegenJobGenericDataSchema => { + const { models, nonModels, enums, dataSourceType } = genericDataSchema; + const codegenModels: { [key: string]: CodegenGenericDataModel } = {}; + const codegenNonModels: { [key: string]: CodegenGenericDataNonModel } = {}; + const codegenEnums: { [key: string]: CodegenGenericDataEnum } = {}; + + Object.entries(models).forEach(([modelName, genericDataModel]) => { + const modelFields = mapDataFieldsToCodegen(genericDataModel.fields); + + codegenModels[modelName] = { + isJoinTable: genericDataModel.isJoinTable, + primaryKeys: genericDataModel.primaryKeys, + fields: modelFields, + }; }); - printer.debug( - `Generated ${themeResults.filter((result) => result.resultType === 'SUCCESS').length} themes in ${getUiBuilderComponentsPath(context)}`, - ); - return themeResults; + Object.entries(nonModels).forEach(([nonModelName, genericDataModel]) => { + const nonModelFields = mapDataFieldsToCodegen(genericDataModel.fields); + + codegenNonModels[nonModelName] = { + fields: nonModelFields, + }; + }); + + Object.entries(enums).forEach(([enumName, genericEnum]) => { + codegenEnums[enumName] = { + values: genericEnum.values, + }; + }); + + return { + models: codegenModels, + nonModels: codegenNonModels, + enums: codegenEnums, + dataSourceType, + }; }; -/** - * Generates the defaultTheme in the user's project that's exported from @aws-amplify/codegen-ui-react - */ -const generateDefaultTheme = (context: $TSContext): CodegenResponse => { - try { - const theme = createUiBuilderTheme(context, { name: 'studioTheme', values: [] }, { renderDefaultTheme: true }); - printer.debug(`Generated default theme in ${getUiBuilderComponentsPath(context)}`); - return { resultType: 'SUCCESS', schema: theme }; - } catch (e) { - printer.debug(`Failure caught rendering default theme`); - printer.debug(e); - return { resultType: 'FAILURE', schemaName: 'studioTheme', error: e }; +function delay(durationMs: number): Promise { + return new Promise((r) => setTimeout(() => r(), durationMs)); +} + +export const waitForSucceededJob = async (getJob: () => Promise, { pollInterval }: { pollInterval: number }) => { + const startTime = performance.now(); + // Adding env variable because if something happens and we need a longer timeout + // we will give the customer a chance to increase timeout as a workaround. + // Default timeout is 2 minutes for customers with thousands of components. + const waitTimeout = process.env.UI_BUILDER_CODEGENJOB_TIMEOUT ? parseInt(process.env.UI_BUILDER_CODEGENJOB_TIMEOUT) : 1000 * 60 * 2; + + const endTime = startTime + waitTimeout; + + while (performance.now() < endTime) { + const job = await getJob(); + + if (!job) { + printer.error('Codegen job not found'); + throw new Error('Codegen job not found'); + } + + if (job.status === 'failed') { + printer.error('Codegen job status is failed', { message: job.statusMessage }); + throw new Error(job.statusMessage); + } + + if (job.status === 'succeeded') { + printer.debug(`Polling time: ${performance.now() - startTime}`); + + return job; + } + + await delay(pollInterval); } -}; -/** - * Returns instances of StudioForm from form schemas - */ -export const generateUiBuilderForms = ( - context: $TSContext, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - formSchemas: any[], - dataSchema?: GenericDataSchema, - autoGenerateForms?: boolean, - formFeatureFlags?: FormFeatureFlags, -): CodegenResponse[] => { - const modelMap: { [model: string]: Set<'create' | 'update'> } = {}; - if (dataSchema?.dataSourceType === 'DataStore' && autoGenerateForms) { - Object.entries(dataSchema.models).forEach(([name, model]) => { - if (checkIsSupportedAsForm(model, formFeatureFlags) && !model.isJoinTable) { - modelMap[name] = new Set(['create', 'update']); - } - }); + if (performance.now() > endTime) { + printer.error(`Codegen job never succeeded before timeout`); } - const codegenForm = (schema: StudioForm): CodegenResponse => { + + throw new Error('Failed to return codegen job'); +}; + +export const fetchWithRetries = async (url: string, retries = 3, delay = 300) => { + let retryCount = 0; + let retryDelay = delay; + + while (retryCount < retries) { try { - const form = createUiBuilderForm(context, schema, dataSchema, formFeatureFlags); - return { resultType: 'SUCCESS', schema: form }; - } catch (e) { - printer.debug(`Failure caught processing ${schema.name}`); - printer.debug(e); - return { - resultType: 'FAILURE', - schemaName: schema.name, - schema, - error: e, - }; + const response = await fetch(url); + return response; + } catch (error) { + printer.debug(`Error fetching ${url}: ${error}`); + retryCount = retryCount + 1; + await new Promise((res) => setTimeout(res, delay)); + retryDelay = retryDelay * 2; } - }; - const formResults = formSchemas.map((schema: StudioForm) => { - if (schema?.dataType && schema.dataType?.dataSourceType === 'DataStore') { - modelMap[schema.dataType.dataTypeName]?.delete(schema.formActionType); + } + throw new Error('Fetch reached max number of retries without succeeding'); +}; + +export const extractUIComponents = async (url: string, uiBuilderComponentsPath: string) => { + try { + if (!fs.existsSync(uiBuilderComponentsPath)) { + fs.mkdirSync(uiBuilderComponentsPath, { recursive: true }); } - return codegenForm(schema); - }); - // append remaining models - formResults.push(...generateBaseForms(modelMap).map(codegenForm)); + const response = await fetchWithRetries(url); + if (!response.ok) { + throw new Error('Failed to download component manifest file'); + } + const manifestFile = await (< + Promise<{ Output: { downloadUrl: string | undefined; fileName: string; schemaName: string; error: string | undefined }[] }> + >response.json()); + + const downloadComponent = async (output: { fileName: string; downloadUrl: string | undefined; error: string | undefined }) => { + if (output.downloadUrl && !output.error) { + try { + const response = await fetchWithRetries(output.downloadUrl); + if (!response.ok) { + printer.debug(`Failed to download ${output.fileName}`); + throw new Error(`Failed to download ${output.fileName}`); + } + return { content: await response.text(), error: undefined, fileName: output.fileName }; + } catch (error) { + printer.debug(`Skipping ${output.fileName} because of an error downloading the component`); + return { error: `Failed to download ${output.fileName}`, content: undefined, fileName: output.fileName }; + } + } else { + printer.debug(`Skipping ${output.fileName} because of an error generating the component`); + return { error: output.error, content: undefined, fileName: output.fileName }; + } + }; - printer.debug( - `Generated ${formResults.filter((result) => result.resultType === 'SUCCESS').length} forms in ${getUiBuilderComponentsPath(context)}`, - ); - return formResults; + for await (const downloaded of asyncPool(5, manifestFile.Output, downloadComponent)) { + if (downloaded.content) { + fs.writeFileSync(path.join(uiBuilderComponentsPath, downloaded.fileName), downloaded.content); + printer.debug(`Downloaded ${downloaded.fileName}`); + } + } + printer.debug('ui-components downloaded successfully'); + } catch (error) { + printer.error('failed to download ui-components'); + throw error; + } }; diff --git a/packages/amplify-util-uibuilder/types/amplify-codegen.d.ts b/packages/amplify-util-uibuilder/types/amplify-codegen.d.ts new file mode 100644 index 00000000000..9301b96ea77 --- /dev/null +++ b/packages/amplify-util-uibuilder/types/amplify-codegen.d.ts @@ -0,0 +1,12 @@ +declare module 'amplify-codegen' { + export function getCodegenConfig(projectPath: string | undefined): CodegenConfigHelper; + + export type CodegenConfigHelper = { + getGeneratedTypesPath: () => string | undefined; + getGeneratedQueriesPath: () => string; + getGeneratedMutationsPath: () => string; + getGeneratedSubscriptionsPath: () => string; + getGeneratedFragmentsPath: () => string; + getQueryMaxDepth: () => number | undefined; + }; +} diff --git a/packages/amplify-velocity-template/CHANGELOG.md b/packages/amplify-velocity-template/CHANGELOG.md index 5a6721f7830..7daca97b0d9 100644 --- a/packages/amplify-velocity-template/CHANGELOG.md +++ b/packages/amplify-velocity-template/CHANGELOG.md @@ -3,6 +3,53 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.4.15](https://github.com/aws-amplify/amplify-cli/compare/amplify-velocity-template@1.4.12...amplify-velocity-template@1.4.15) (2025-01-02) + + +### Bug Fixes + +* bump versions ([#14044](https://github.com/aws-amplify/amplify-cli/issues/14044)) ([cce910e](https://github.com/aws-amplify/amplify-cli/commit/cce910e03b799014151c1ef8d7da3be05ba88851)) + + + +## 12.8.2 (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [1.4.14](https://github.com/aws-amplify/amplify-cli/compare/amplify-velocity-template@1.4.12...amplify-velocity-template@1.4.14) (2023-11-08) + + +### Bug Fixes + +* bump versions after unsuccessful release ([#13395](https://github.com/aws-amplify/amplify-cli/issues/13395)) ([7f43363](https://github.com/aws-amplify/amplify-cli/commit/7f433637b052d6dd33fcbf87f390a6b85e9de5b7)) + + + + + +## [1.4.13](https://github.com/aws-amplify/amplify-cli/compare/amplify-velocity-template@1.4.12...amplify-velocity-template@1.4.13) (2023-11-08) + +**Note:** Version bump only for package amplify-velocity-template + + + + + +## [1.4.12](https://github.com/aws-amplify/amplify-cli/compare/amplify-velocity-template@1.4.11...amplify-velocity-template@1.4.12) (2023-06-13) + +**Note:** Version bump only for package amplify-velocity-template + + + + + ## [1.4.11](https://github.com/aws-amplify/amplify-cli/compare/amplify-velocity-template@1.4.9...amplify-velocity-template@1.4.11) (2023-04-14) **Note:** Version bump only for package amplify-velocity-template diff --git a/packages/amplify-velocity-template/package.json b/packages/amplify-velocity-template/package.json index fb64063e85a..e39f9830c2e 100644 --- a/packages/amplify-velocity-template/package.json +++ b/packages/amplify-velocity-template/package.json @@ -1,6 +1,6 @@ { "name": "amplify-velocity-template", - "version": "1.4.11", + "version": "1.4.15", "description": "Velocity Template Language(VTL) for JavaScript", "repository": { "type": "git", @@ -33,7 +33,7 @@ "coveralls": "~3.0.9", "growl": "^1.10.5", "istanbul": "~0.4.5", - "mocha": ">=7.0.0", + "mocha": "^11.0.1", "mocha-lcov-reporter": "1.3.0", "should": "^13.2.3", "velocityjs": "^2.0.0" diff --git a/scripts/aws-configure-credentials.ts b/scripts/aws-configure-credentials.ts new file mode 100644 index 00000000000..c048698f311 --- /dev/null +++ b/scripts/aws-configure-credentials.ts @@ -0,0 +1,21 @@ +import { join } from 'path'; +import * as fs from 'fs'; + +const AWS_ACCESS_KEY_ID = process.env['AWS_ACCESS_KEY_ID']; +const AWS_SECRET_ACCESS_KEY = process.env['AWS_SECRET_ACCESS_KEY']; +const AWS_SESSION_TOKEN = process.env['AWS_SESSION_TOKEN']; + +const credentials_file_contents = `[default] +aws_access_key_id=${AWS_ACCESS_KEY_ID} +aws_secret_access_key=${AWS_SECRET_ACCESS_KEY} +aws_session_token=${AWS_SESSION_TOKEN} + +`; + +const config_file_contents = `[default] +region=us-west-2 + +`; + +fs.writeFileSync(join('/', 'root', '.aws', 'credentials'), credentials_file_contents); +fs.writeFileSync(join('/', 'root', '.aws', 'config'), config_file_contents); diff --git a/scripts/cci-extract-test-timings-from-job-metrics.ts b/scripts/cci-extract-test-timings-from-job-metrics.ts deleted file mode 100644 index c9c4c734de8..00000000000 --- a/scripts/cci-extract-test-timings-from-job-metrics.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { join } from 'path'; -import { getOldJobNameWithoutSuffixes, getTestFiles, getTimingsFromJobsData, REPO_ROOT, saveTestTimings } from './cci-utils'; - -/** - * In order to estimate the timing for a "test" file, we have to determine which - * job runs that "test" file. - * Job names are not consistent with "test" files, so we have to map from the old - * job name to find the job that ran it. - */ -function main(): void { - let testSuites = getTestFiles(join(REPO_ROOT, 'packages', 'amplify-e2e-tests')); - testSuites.push(...getTestFiles(join(REPO_ROOT, 'packages', 'amplify-migration-tests'))); - const jobTimings = getTimingsFromJobsData(); - const testRuntimes = testSuites.map((t) => { - const oldName = getOldJobNameWithoutSuffixes(t); - if (jobTimings.has(oldName)) { - return { - test: t, - medianRuntime: jobTimings.get(oldName) as number, - }; - } else { - console.log('Could not find timing for:', t); - return { - test: t, - medianRuntime: 10, // default for unknown - }; - } - }); - testRuntimes.sort((a, b) => { - return a.medianRuntime - b.medianRuntime; - }); - saveTestTimings({ - lastUpdated: new Date().toISOString(), - totalTestFiles: testRuntimes.length, - timingData: testRuntimes, - }); -} -main(); diff --git a/scripts/cci-get-job-metrics.ts b/scripts/cci-get-job-metrics.ts deleted file mode 100644 index 42368e10022..00000000000 --- a/scripts/cci-get-job-metrics.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { getCCIClient, saveJobMetrics } from './cci-utils'; - -const runIt = async () => { - const client = getCCIClient(); - console.log('Fetching job metrics...'); - const data = await client.getAllJobMetrics(); - saveJobMetrics(data); -}; - -function main(): void { - runIt(); -} -main(); diff --git a/scripts/cci-get-test-metrics.ts b/scripts/cci-get-test-metrics.ts deleted file mode 100644 index 052d13e76f9..00000000000 --- a/scripts/cci-get-test-metrics.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { getCCIClient, saveJobMetrics } from './cci-utils'; - -const runIt = async () => { - const client = getCCIClient(); - const data = await client.getAllTestMetrics(); - saveJobMetrics(data); -}; - -function main(): void { - runIt(); -} -main(); diff --git a/scripts/cci-test-timings.data.json b/scripts/cci-test-timings.data.json index cec3567e650..d39bfe816b5 100644 --- a/scripts/cci-test-timings.data.json +++ b/scripts/cci-test-timings.data.json @@ -743,7 +743,19 @@ "medianRuntime": 27 }, { - "test": "src/__tests__/function_3a.test.ts", + "test": "src/__tests__/function_3a_go.test.ts", + "medianRuntime": 27 + }, + { + "test": "src/__tests__/function_3a_python.test.ts", + "medianRuntime": 27 + }, + { + "test": "src/__tests__/function_3a_dotnet.test.ts", + "medianRuntime": 27 + }, + { + "test": "src/__tests__/function_3a_nodejs.test.ts", "medianRuntime": 27 }, { diff --git a/scripts/cci-types.ts b/scripts/cci-types.ts deleted file mode 100644 index 4aaf4d15e38..00000000000 --- a/scripts/cci-types.ts +++ /dev/null @@ -1,22 +0,0 @@ -export type WorkflowJob = - | { - [name: string]: { - requires?: string[]; - }; - } - | string; - -export type CircleCIConfig = { - jobs: { - [name: string]: { - steps: Record; - environment: Record; - parallelism: number; - }; - }; - workflows: { - [workflowName: string]: { - jobs: WorkflowJob[]; - }; - }; -}; diff --git a/scripts/cci-utils.ts b/scripts/cci-utils.ts index d651058c61a..391f69aa0cb 100644 --- a/scripts/cci-utils.ts +++ b/scripts/cci-utils.ts @@ -1,23 +1,5 @@ -import * as glob from 'glob'; import * as fs from 'fs-extra'; import { join } from 'path'; -import * as yaml from 'js-yaml'; -import { CircleCIConfig } from './cci-types'; -import { CircleCIAPIClient, CircleCIClientDefaults } from './cci.api'; - -export const ClientDefaults: CircleCIClientDefaults = { - defaultBranch: 'dev', - defaultWorkflow: 'build_test_deploy_v3', - vcs: 'github', - projectSlug: 'aws-amplify', - projectName: 'amplify-cli', -}; -export const getCCIClient = () => { - if (!process.env.CIRCLECI_TOKEN) { - throw new Error('CIRCLECI_TOKEN is not set. Export it to your terminal, then try again.'); - } - return new CircleCIAPIClient(process.env.CIRCLECI_TOKEN, ClientDefaults); -}; // Ensure to update packages/amplify-e2e-tests/src/cleanup-e2e-resources.ts is also updated this gets updated export const AWS_REGIONS_TO_RUN_TESTS = [ @@ -48,45 +30,7 @@ export const USE_PARENT_ACCOUNT = [ ]; export const REPO_ROOT = join(__dirname, '..'); -const CIRCLECI_BASE_CONFIG_PATH = join(REPO_ROOT, '.circleci', 'config.base.yml'); -const CIRCLECI_GENERATED_CONFIG_PATH = join(REPO_ROOT, '.circleci', 'generated_config.yml'); -const TEST_METRICS_PATH = join(REPO_ROOT, 'scripts', 'cci-test.data.json'); -const JOB_METRICS_PATH = join(REPO_ROOT, 'scripts', 'cci-job.data.json'); const TEST_TIMINGS_PATH = join(REPO_ROOT, 'scripts', 'cci-test-timings.data.json'); -const WORKFLOW_RESULTS_PATH = join(REPO_ROOT, 'artifacts', 'cci-workflow-results.json'); -const WORKFLOW_RESULTS_HTML_PATH = join(REPO_ROOT, 'artifacts', 'cci-workflow-results.html'); - -export function getTestFiles(dir: string, pattern = 'src/**/*.test.ts'): string[] { - return glob.sync(pattern, { cwd: dir }); -} - -/** - * CircleCI test data is different from job data; each job may have multiple test files, - * and each test file may contain multiple tests. - * CircleCI reports this data at the testfile + testname specificity. - * - * The data in this file is at the TEST level. - */ -export function loadTestMetrics(): any { - return JSON.parse(fs.readFileSync(TEST_METRICS_PATH, 'utf-8')); -} -export function saveTestMetrics(data: any): any { - console.log(`saving test metrics to ${TEST_METRICS_PATH}`); - fs.writeFileSync(TEST_METRICS_PATH, JSON.stringify(data, null, 2)); -} - -/** - * CircleCI job data contains data for each job. - * - * The data in this file is at the JOB level. - */ -export function loadJobMetrics(): any { - return JSON.parse(fs.readFileSync(JOB_METRICS_PATH, 'utf-8')); -} -export function saveJobMetrics(data: any): any { - console.log(`saving job metrics to ${JOB_METRICS_PATH}`); - fs.writeFileSync(JOB_METRICS_PATH, JSON.stringify(data, null, 2)); -} /** * CircleCI job data contains data for each job. @@ -96,63 +40,6 @@ export function saveJobMetrics(data: any): any { export function loadTestTimings(): { timingData: { test: string; medianRuntime: number }[] } { return JSON.parse(fs.readFileSync(TEST_TIMINGS_PATH, 'utf-8')); } -export function saveTestTimings(data: any): any { - console.log(`saving timing data to ${TEST_TIMINGS_PATH}`); - fs.writeFileSync(TEST_TIMINGS_PATH, JSON.stringify(data, null, 2)); -} - -/** - * Workflow results provide a summary of tests failures after a workflow has completed. - * @param data - */ -export function saveWorkflowResults(data: any): any { - fs.writeFileSync(WORKFLOW_RESULTS_PATH, JSON.stringify(data, null, 2)); -} -export function saveWorkflowResultsHTML(data: any): any { - fs.writeFileSync(WORKFLOW_RESULTS_HTML_PATH, data); -} - -/** - * Loads the configuration file that is used as a base for generated the final configuration. - */ -export function loadConfig(): CircleCIConfig { - return yaml.load(fs.readFileSync(CIRCLECI_BASE_CONFIG_PATH, 'utf8')); -} -/** - * Saves the generated configuration file that will be used by the continuation orb after the setup has completed. - * @param config - */ -export function saveConfig(config: CircleCIConfig): void { - const output = ['# auto generated file. Edit config.base.yaml if you want to change', yaml.dump(config, { noRefs: true })]; - fs.writeFileSync(CIRCLECI_GENERATED_CONFIG_PATH, output.join('\n')); -} - -/** - * Before split-e2e-tests-v2, this is how we generated job names when each file was assigned to a single job. - * - * @param baseJobName The root level folder (amplify-e2e-tests, amplify-migration-tests, etc...) - * @param testSuitePath The test file name (some-e2e-test.e2e.test.ts, some-test.test.ts) - * @returns - */ -export function getOldJobName(baseJobName: string, testSuitePath: string): string { - const startIndex = testSuitePath.lastIndexOf('/') + 1; - const endIndex = testSuitePath.lastIndexOf('.test'); - let name = testSuitePath.substring(startIndex, endIndex).split('.e2e').join('').split('.').join('-'); - - // additional suffixes are added depending on what the 'base job' is called - // for most tests, they belong to the 'amplify-e2e-tests-pkg' job - if (baseJobName.includes('pkg')) { - name = name + '_pkg'; - } - // some jobs belong to a migration test suite, and so the 'version' is appended to the job name - // for example: - // tests included in "amplify_migration_tests_v10" will be assigned to jobs with names like "migration-test-name_v10" - if (baseJobName.includes('amplify_migration_tests')) { - const startIndex = baseJobName.lastIndexOf('_'); - name = name + baseJobName.substring(startIndex); - } - return name; -} /** * Same as getOldJobName, but excludes the suffixes like "_pkg" or "_v6", etc @@ -164,80 +51,3 @@ export const getOldJobNameWithoutSuffixes = (testSuitePath: string): string => { const endIndex = testSuitePath.lastIndexOf('.test'); return testSuitePath.substring(startIndex, endIndex).split('.e2e').join('').split('.').join('-'); }; - -/** - * For jobs before split-e2e-tests-v2, this function allows you to - * work backwards from the job name to the test which ran inside of that job. - * - * It essentially trims the suffixes from the job name, so you can focus on the test name. - * - * A job would typically have a name like "my-test_pkg-l_medium", and the test name is just "my-test". - * Another example is "my-test_pkg-w_medium", which has a test name of just "my-test". - * @param jobName - * @returns - */ -function getTestNameFromOldJobName(jobName: string) { - // first, remove any _pkg- from the name - let name = jobName.split('_pkg-')[0]; - - // remove migration suffixes - name = name.split('_v10-')[0]; - name = name.split('_v5-')[0]; - name = name.split('_v6-')[0]; - return name; -} - -/** - * This method uses old job data (before split-e2e-tests-v2) and the timings for those jobs - * to determine how long a test file takes to run. - * - * @returns - */ -export function getTimingsFromJobsData() { - const jobData = loadJobMetrics(); - const jobTimings: Map = new Map(); - for (let job of jobData.items) { - const testName = getTestNameFromOldJobName(job.name); - const duration = Math.floor(job.metrics.duration_metrics.median / 60); - if (jobTimings.has(testName)) { - jobTimings.set(testName, Math.max(jobTimings.get(testName)!, duration)); - } else { - jobTimings.set(testName, duration); - } - } - return jobTimings; -} - -/** - * This method can be used to get the 'slowest' tests from all tests. - * Note: 'tests' do not mean 'test files' in this case. A 'test file' may contain multiple tests. - * Anywhere else, we treat a 'test file' as a single test. - * This is more specific, and looks at the sub-tests inside of each file. - * @param testSuites - * @returns - */ -export const getSlowestTestsRunTimes = (testSuites: string[]) => { - const testData = loadTestMetrics(); - // default sorted by slowest -> fastest - const slowestTests: any[] = testData.slowest_tests.map((t: any) => { - return { - file: t.file, - duration: Math.floor(t.p95_duration / 60), - }; - }); - - return testSuites.map((t) => { - let slowTest = slowestTests.find((slowTest) => slowTest.file === t); - if (slowTest) { - return { - test: t, - mins: slowTest.duration, - }; - } else { - return { - test: t, - mins: 10, // all "not slow" tests run in about 10 mins or less - }; - } - }); -}; diff --git a/scripts/cci-workflow-results.ts b/scripts/cci-workflow-results.ts deleted file mode 100644 index 58bea43f713..00000000000 --- a/scripts/cci-workflow-results.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { getCCIClient, saveWorkflowResults, saveWorkflowResultsHTML } from './cci-utils'; - -/** - * This function runs after a CircleCI workflow has completed (build_test_deploy) - * and aggretates the test results from the workflow into a single html/json file - * that is easier to read. It eliminates the need to have to scan each individual - * failed job. - * Links to the job are provided, so you can just view the html file and - * open failed jobs from there. - */ -const getWorkflowDataAndSummarizeResults = async () => { - const client = getCCIClient(); - const data = await client.getWorkflowJobs(process.env.CIRCLE_WORKFLOW_ID); - const failed = data.items.filter((i: any) => i.status === 'failed'); - const summary = []; - for (let f of failed) { - try { - const jobData = await client.getJobDetails(f.job_number); - // const artifacts = await getJobArtifacts(f.job_number); - const tests = await client.getJobTests(f.job_number); - summary.push({ - jobName: jobData.name, - jobUrl: jobData.web_url, - durationMins: Math.floor(jobData.duration / (60 * 1000)), - // artifacts: artifacts.items.map((i: any) => i.url), - failedTests: tests.items.filter((i: any) => i.result === 'failure'), - }); - } catch (e) { - console.log('Error fetching data for job:', f.name, e); - } - } - saveWorkflowResults(summary); - saveWorkflowResultsHTML(toHTML(summary)); -}; - -const toHTML = (summary: any) => { - const tableStart = ` - `; - const header = ` - - - - - - `; - let body = ''; - for (let r of summary) { - let jobLink = `${r.jobName} (${r.durationMins}mins)`; - for (let f of r.failedTests) { - let row = ` - - - - - `; - body = body + row; - } - } - return tableStart + header + body + '' + '
JobFailed Test NameFailed Test File
-

${jobLink}

-

${f.file}

-
${f.name}${f.message}
'; -}; - -function main(): void { - getWorkflowDataAndSummarizeResults(); -} -main(); diff --git a/scripts/cci.api.ts b/scripts/cci.api.ts deleted file mode 100644 index e3734b27642..00000000000 --- a/scripts/cci.api.ts +++ /dev/null @@ -1,117 +0,0 @@ -import axios from 'axios'; - -type ReportingWindow = 'last-7-days' | 'last-90-days' | 'last-24-hours' | 'last-30-days' | 'last-60-days'; -export type CircleCIClientDefaults = { - defaultBranch: string; - defaultWorkflow: string; - vcs: string; - projectSlug: string; - projectName: string; -}; -export class CircleCIAPIClient { - private headers; - private options: CircleCIClientDefaults; - private slug: string; - constructor(token: string, options: CircleCIClientDefaults) { - this.headers = { - 'Circle-Token': token, - }; - this.options = options; - this.slug = `${options.vcs}/${options.projectSlug}/${options.projectName}`; - } - - /** - * Returns a sequence of jobs for a workflow. - * - * https://circleci.com/docs/api/v2/index.html#operation/listWorkflowJobs - * @returns - */ - getWorkflowJobs = async (workflowId: string = this.options.defaultWorkflow) => { - const result = await axios.get(`https://circleci.com/api/v2/workflow/${workflowId}/job`, { - headers: this.headers, - }); - return result.data; - }; - /** - * Returns a job's details. - * - * https://circleci.com/docs/api/v2/index.html#operation/getJobDetails - * @param jobId - * @returns - */ - getJobDetails = async (jobId: string) => { - const result = await axios.get(`https://circleci.com/api/v2/project/${this.slug}/job/${jobId}`, { - headers: this.headers, - }); - return result.data; - }; - /** - * Returns a single job's artifacts. - * - * https://circleci.com/docs/api/v2/index.html#operation/getJobArtifacts - * @param jobId - * @returns - */ - getJobArtifacts = async (jobId: string) => { - const result = await axios.get(`https://circleci.com/api/v2/project/${this.slug}/${jobId}/artifacts`, { - headers: this.headers, - }); - return result.data; - }; - /** - * Get test metadata for a single job - * - * https://circleci.com/docs/api/v2/index.html#operation/getTests - * @param jobId - * @returns - */ - getJobTests = async (jobId: string) => { - const result = await axios.get(`https://circleci.com/api/v2/project/${this.slug}/${jobId}/tests`, { - headers: this.headers, - }); - return result.data; - }; - /** - * Get summary metrics for a project workflow's jobs. - * - * https://circleci.com/docs/api/v2/index.html#operation/getProjectWorkflowJobMetrics - * - * @param workflowName - * @param branch - * @param reportingWindow - * @returns - */ - getAllJobMetrics = async ( - workflowName: string = this.options.defaultWorkflow, - branch: string = this.options.defaultBranch, - reportingWindow: ReportingWindow = 'last-30-days', - ) => { - const result = await axios.get(`https://circleci.com/api/v2/insights/${this.slug}/workflows/${workflowName}/jobs`, { - headers: this.headers, - params: { - branch: branch, - 'reporting-window': reportingWindow, - }, - }); - return result.data; - }; - - /** - * Get test metrics for a project's workflows. - * - * https://circleci.com/docs/api/v2/index.html#operation/getProjectWorkflowTestMetrics - * @param workflowName - * @param branch - * @param reportingWindow - * @returns - */ - getAllTestMetrics = async (workflowName: string = this.options.defaultWorkflow, branch: string = this.options.defaultBranch) => { - const result = await axios.get(`https://circleci.com/api/v2/insights/${this.slug}/workflows/${workflowName}/test-metrics`, { - headers: this.headers, - params: { - branch: branch, - }, - }); - return result.data; - }; -} diff --git a/scripts/cloud-cli-utils.sh b/scripts/cloud-cli-utils.sh new file mode 100644 index 00000000000..d93c41a67cd --- /dev/null +++ b/scripts/cloud-cli-utils.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +# set exit on error to true +set -e +# load .env +set -o allexport +source ./scripts/.env set + +function authenticate { + account_number=$1 + role_name=$2 + profile_name=$3 + echo Authenticating terminal... + if [[ -n $USE_FIDO_KEY ]] ; then + mwinit -s -f + else + mwinit + fi + echo Loading account credentials for Account $account_number with Role: $role_name... + ada cred update --profile="${profile_name}" --account="${account_number}" --role=${role_name} --provider=isengard --once + aws configure set region us-east-1 --profile $profile_name +} +function triggerProjectBatch { + account_number=$1 + role_name=$2 + profile_name=$3 + project_name=$4 + target_branch=$5 + npm_tag=$6 + authenticate $account_number $role_name $profile_name + echo AWS Account: $account_number + echo Project: $project_name + echo Target Branch: $target_branch + if [[ "$npm_tag" != "" ]]; then + echo NPM tag: $npm_tag + npm_variable_override="name=NPM_TAG,value=$npm_tag,type=PLAINTEXT" + fi + RESULT=$(aws codebuild start-build-batch --profile="${profile_name}" --project-name $project_name --source-version=$target_branch \ + --environment-variables-override name=BRANCH_NAME,value=$target_branch,type=PLAINTEXT $npm_variable_override \ + --query 'buildBatch.id' --output text) + echo "https://us-east-1.console.aws.amazon.com/codesuite/codebuild/$account_number/projects/$project_name/batch/$RESULT?region=us-east-1" +} diff --git a/scripts/cloud-e2e.sh b/scripts/cloud-e2e.sh index 97bfb4b763e..7ec2d655235 100644 --- a/scripts/cloud-e2e.sh +++ b/scripts/cloud-e2e.sh @@ -1,49 +1,29 @@ -#!/bin/bash +#!/bin/bash -e -# this file is used to automate the process of triggering an e2e build for each environment type - -# set exit on error to true -set -e -# load .env -set -o allexport -source ./scripts/.env set +source ./scripts/cloud-cli-utils.sh export CURR_BRANCH=$(git branch --show-current) -function authenticate { - echo Authenticating terminal... - mwinit - echo Loading E2E account credentials... - ada cred update --profile="${CLOUD_E2E_PROFILE}" --account="${CLOUD_E2E_ACCOUNT}" --role=CodeBuildE2E --provider=isengard --once - aws configure set region us-east-1 --profile $CLOUD_E2E_PROFILE -} -function triggerBuild { - echo Submitting CodeBuild Request to AWS Account: $CLOUD_E2E_ACCOUNT - echo Current branch is: $CURR_BRANCH - echo E2E Target branch is: $TARGET_BRANCH - RESULT=$(aws codebuild start-build-batch --profile="${CLOUD_E2E_PROFILE}" --project-name AmplifyCLI-E2E-Testing --source-version=$TARGET_BRANCH --query 'buildBatch.id' --output text) - echo "https://us-east-1.console.aws.amazon.com/codesuite/codebuild/$CLOUD_E2E_ACCOUNT/projects/AmplifyCLI-E2E-Testing/batch/$RESULT?region=us-east-1" -} +export E2E_ROLE_NAME=CodeBuildE2E +export E2E_PROFILE_NAME=AmplifyCLIE2E +export E2E_PROJECT_NAME=AmplifyCLI-E2E-Testing + function cloudE2ELocal { echo Running Local E2E Test Suite - export CLOUD_E2E_PROFILE=AmplifyCLIE2ELocal - export CLOUD_E2E_ACCOUNT=$E2E_ACCOUNT_LOCAL - export TARGET_BRANCH=$CURR_BRANCH - authenticate - triggerBuild + triggerProjectBatch $E2E_ACCOUNT_LOCAL $E2E_ROLE_NAME "${E2E_PROFILE_NAME}Local" $E2E_PROJECT_NAME $CURR_BRANCH } function cloudE2EBeta { echo Running Beta E2E Test Suite - export CLOUD_E2E_PROFILE=AmplifyCLIE2EBeta - export CLOUD_E2E_ACCOUNT=$E2E_ACCOUNT_BETA - export TARGET_BRANCH=$CURR_BRANCH - authenticate - triggerBuild + triggerProjectBatch $E2E_ACCOUNT_BETA $E2E_ROLE_NAME "${E2E_PROFILE_NAME}Beta" $E2E_PROJECT_NAME $CURR_BRANCH } function cloudE2E { echo Running Prod E2E Test Suite - export CLOUD_E2E_PROFILE=AmplifyCLIE2E - export CLOUD_E2E_ACCOUNT=$E2E_ACCOUNT_PROD - export TARGET_BRANCH=run-cb-e2e/$USER/$CURR_BRANCH + if [[ -n "$USER" ]]; then + export TARGET_BRANCH=run-cb-e2e/$USER/$CURR_BRANCH + elif [[ -n "$USERNAME" ]]; then + export TARGET_BRANCH=run-cb-e2e/$USERNAME/$CURR_BRANCH + else + echo "Error: Both USER and USERNAME variables are not set." + exit 1 + fi git push $(git remote -v | grep aws-amplify/amplify-cli | head -n1 | awk '{print $1;}') $CURR_BRANCH:$TARGET_BRANCH --no-verify --force-with-lease - authenticate - triggerBuild + triggerProjectBatch $E2E_ACCOUNT_PROD $E2E_ROLE_NAME "${E2E_PROFILE_NAME}Prod" $E2E_PROJECT_NAME $TARGET_BRANCH } diff --git a/scripts/cloud-pr.sh b/scripts/cloud-pr.sh new file mode 100755 index 00000000000..cc1a316aefd --- /dev/null +++ b/scripts/cloud-pr.sh @@ -0,0 +1,27 @@ +#!/bin/bash -e + +scriptDir=$(dirname -- "$(readlink -f -- "$BASH_SOURCE")") +source $scriptDir/.env set + +printf 'What is your PR number ? ' +read PR_NUMBER + +if [[ -n $USE_FIDO_KEY ]] ; then + mwinit -s -f +else + mwinit +fi + +ada cred update --profile=cb-ci-account --account=$E2E_ACCOUNT_PROD --role=CodeBuildE2E --provider=isengard --once +RESULT=$(aws codebuild start-build-batch \ +--profile=cb-ci-account \ +--region us-east-1 \ +--project-name AmplifyCLI-PR-Testing \ +--build-timeout-in-minutes-override 180 \ +--source-version "pr/$PR_NUMBER" \ +--debug-session-enabled \ +--git-clone-depth-override=1000 \ +--environment-variables-override name=AMPLIFY_CI_MANUAL_PR_BUILD,value=true,type=PLAINTEXT \ +--query 'buildBatch.id' --output text) + +echo "https://us-east-1.console.aws.amazon.com/codesuite/codebuild/$E2E_ACCOUNT_PROD/projects/AmplifyCLI-PR-Testing/batch/$RESULT?region=us-east-1" diff --git a/scripts/cloud-release.sh b/scripts/cloud-release.sh new file mode 100644 index 00000000000..c575db20ba3 --- /dev/null +++ b/scripts/cloud-release.sh @@ -0,0 +1,121 @@ +#!/bin/bash +source ./scripts/cloud-cli-utils.sh +export RELEASE_ROLE_NAME=CodebuildRelease +export RELEASE_PROFILE_NAME=AmplifyCLIRelease +export RC_PROJECT_NAME=RC +export TAGGED_RC_PROJECT_NAME=TaggedReleaseWithoutE2E +export RELEASE_PROJECT_NAME=Release + +############################## RC ############################## +function RCLocal { + echo Running Local RC + if [[ $0 == 'bash' || -z $0 ]]; then + echo "Include the release candidate commit ref you wish to release as the first argument" + exit 1 + fi + rc_sha=$(git rev-parse --short=15 "$0") + branch_name="release_rc/$rc_sha" + git checkout -B "$branch_name" "$rc_sha" + git push "origin" "$branch_name" + triggerProjectBatch $RELEASE_ACCOUNT_LOCAL $RELEASE_ROLE_NAME "${RELEASE_PROFILE_NAME}Local" $RC_PROJECT_NAME $branch_name +} +function RCBeta { + echo Running Beta RC + echo You must be on the Beta repository to perform this action, or build will fail. + if [[ $0 == 'bash' || -z $0 ]]; then + echo "Include the release candidate commit ref you wish to release as the first argument" + exit 1 + fi + rc_sha=$(git rev-parse --short=15 "$0") + branch_name="release_rc/$rc_sha" + git checkout -B "$branch_name" "$rc_sha" + git push "origin" "$branch_name" + triggerProjectBatch $RELEASE_ACCOUNT_BETA $RELEASE_ROLE_NAME "${RELEASE_PROFILE_NAME}Beta" $RC_PROJECT_NAME $branch_name +} +function RCProd { + echo Running Prod RC + if [[ $0 == 'bash' || -z $0 ]]; then + echo "Include the release candidate commit ref you wish to release as the first argument" + exit 1 + fi + source ./scripts/release-rc-codebuild.sh $0 + branch_name=$(git branch --show-current) + triggerProjectBatch $RELEASE_ACCOUNT_PROD $RELEASE_ROLE_NAME "${RELEASE_PROFILE_NAME}Prod" $RC_PROJECT_NAME $branch_name +} +############################## Tagged RC ############################## +# Follow the steps here https://quip-amazon.com/RX9eASbegQzo/Tagged-release-steps +# and create an upstream branch (not in your fork, but in parent) +function TaggedRCLocal { + echo Running Local Tagged RC + printf 'From which branch do you want to release from? (must be pushed and available in main repo): ' + read branch_name + if [[ "$branch_name" == "main" ]] || [[ "$branch_name" == "dev" ]] || [[ "$branch_name" == "hotfix" ]] || [[ "$branch_name" == "release" ]]; then + echo "You can't use $branch_name for tagged release" + exit 1 + fi + printf 'What is your NPM tag ? ' + read npm_tag + triggerProjectBatch $RELEASE_ACCOUNT_LOCAL $RELEASE_ROLE_NAME "${RELEASE_PROFILE_NAME}Local" $TAGGED_RC_PROJECT_NAME $branch_name $npm_tag +} +function TaggedRCBeta { + echo Running Beta Tagged RC + printf 'From which branch do you want to release from? (must be pushed and available in main repo): ' + read branch_name + if [[ "$branch_name" == "main" ]] || [[ "$branch_name" == "dev" ]] || [[ "$branch_name" == "hotfix" ]] || [[ "$branch_name" == "release" ]]; then + echo "You can't use $branch_name for tagged release" + exit 1 + fi + printf 'What is your NPM tag ? ' + read npm_tag + triggerProjectBatch $RELEASE_ACCOUNT_BETA $RELEASE_ROLE_NAME "${RELEASE_PROFILE_NAME}Beta" $TAGGED_RC_PROJECT_NAME $branch_name $npm_tag +} +function TaggedRCProd { + echo Running Prod Tagged RC + printf 'From which branch do you want to release from? (must be pushed and available in main repo): ' + read branch_name + if [[ "$branch_name" == "main" ]] || [[ "$branch_name" == "dev" ]] || [[ "$branch_name" == "hotfix" ]] || [[ "$branch_name" == "release" ]]; then + echo "You can't use $branch_name for tagged release" + exit 1 + fi + printf 'What is your NPM tag ? ' + read npm_tag + triggerProjectBatch $RELEASE_ACCOUNT_PROD $RELEASE_ROLE_NAME "${RELEASE_PROFILE_NAME}Prod" $TAGGED_RC_PROJECT_NAME $branch_name $npm_tag +} +############################## RELEASE ############################## +function ReleaseLocal { + echo Running Local Release + if [[ $0 == 'bash' || -z $0 ]]; then + echo "Include the release candidate commit ref you wish to release as the first argument" + exit 1 + fi + rc_sha=$(git rev-parse --short=15 "$0") + rc_branch="release_rc/$rc_sha" + git checkout "$rc_branch" + git push "origin" "$rc_branch"~1:refs/heads/release + branch_name=release + triggerProjectBatch $RELEASE_ACCOUNT_LOCAL $RELEASE_ROLE_NAME "${RELEASE_PROFILE_NAME}Local" $RELEASE_PROJECT_NAME $branch_name +} +function ReleaseBeta { + echo Running Beta Release + echo You must be on the Beta repository to perform this action, or build will fail. + if [[ $0 == 'bash' || -z $0 ]]; then + echo "Include the release candidate commit ref you wish to release as the first argument" + exit 1 + fi + rc_sha=$(git rev-parse --short=15 "$0") + rc_branch="release_rc/$rc_sha" + git checkout "$rc_branch" + git push "origin" "$rc_branch"~1:refs/heads/release + branch_name=release + triggerProjectBatch $RELEASE_ACCOUNT_BETA $RELEASE_ROLE_NAME "${RELEASE_PROFILE_NAME}Beta" $RELEASE_PROJECT_NAME $branch_name +} +function ReleaseProd { + echo Running Prod Release + if [[ $0 == 'bash' || -z $0 ]]; then + echo "Include the release candidate commit ref you wish to release as the first argument" + exit 1 + fi + source ./scripts/promote-rc-codebuild.sh $0 + branch_name=release + triggerProjectBatch $RELEASE_ACCOUNT_PROD $RELEASE_ROLE_NAME "${RELEASE_PROFILE_NAME}Prod" $RELEASE_PROJECT_NAME $branch_name +} diff --git a/scripts/cloud-rollback.sh b/scripts/cloud-rollback.sh new file mode 100755 index 00000000000..fbd74ccc3e1 --- /dev/null +++ b/scripts/cloud-rollback.sh @@ -0,0 +1,27 @@ +#!/bin/bash -e + +scriptDir=$(dirname -- "$(readlink -f -- "$BASH_SOURCE")") +source $scriptDir/.env set + +printf 'What version should I rollback to ? ' +read ROLLBACK_TARGET_VERSION + +if [[ -n $USE_FIDO_KEY ]] ; then + mwinit -s -f +else + mwinit +fi + +ada cred update --profile=AmplifyCLIReleaseProd --account=$RELEASE_ACCOUNT_PROD --role=CodebuildRelease --provider=isengard --once +RESULT=$(aws codebuild start-build-batch \ +--profile=AmplifyCLIReleaseProd \ +--region us-east-1 \ +--project-name Rollback \ +--build-timeout-in-minutes-override 60 \ +--source-version "dev" \ +--debug-session-enabled \ +--git-clone-depth-override=1000 \ +--environment-variables-override name=ROLLBACK_TARGET_VERSION,value=$ROLLBACK_TARGET_VERSION,type=PLAINTEXT \ +--query 'buildBatch.id' --output text) + +echo "https://us-east-1.console.aws.amazon.com/codesuite/codebuild/$RELEASE_ACCOUNT_PROD/projects/Rollback/batch/$RESULT?region=us-east-1" diff --git a/scripts/finish-release.ts b/scripts/finish-release.ts index 467413496c6..a4b3e6108a1 100644 --- a/scripts/finish-release.ts +++ b/scripts/finish-release.ts @@ -32,7 +32,7 @@ export class Git { } getShortSha(ref: string = 'HEAD'): string { - const command = ['git', 'rev-parse', '--short', ref]; + const command = ['git', 'rev-parse', '--short=15', ref]; return execa.sync(command[0], command.slice(1)).stdout.trim(); } @@ -146,8 +146,8 @@ type Args = { devBranch: string; repository: string; }; -function getArgs(): Args { - const args = yargs(process.argv.slice(2)) +async function getArgs(): Promise { + const args = await yargs(process.argv.slice(2)) .string('release-branch') .default('release-branch', 'main') .string('dev-branch') @@ -167,7 +167,7 @@ function getArgs(): Args { } export async function main() { - const { continue: continueArg, releaseBranch, devBranch, repository, mergeBranch: mergeBranchArg } = getArgs(); + const { continue: continueArg, releaseBranch, devBranch, repository, mergeBranch: mergeBranchArg } = await getArgs(); const git = new Git(); const rlInterface = rl.createInterface({ input: stdin, diff --git a/scripts/generate_single_test_buildspec_codebuild.ts b/scripts/generate_single_test_buildspec_codebuild.ts new file mode 100644 index 00000000000..2ee8ab84181 --- /dev/null +++ b/scripts/generate_single_test_buildspec_codebuild.ts @@ -0,0 +1,85 @@ +import { loadConfigBase, saveConfig, getTestFiles } from './split-e2e-tests-codebuild'; +import { AWS_REGIONS_TO_RUN_TESTS as regions, REPO_ROOT } from './cci-utils'; +import { join } from 'path'; + +// usage: +// yarn split-e2e-tests-codebuild-single PATH_TO_TEST OS[l or w] REGION +// example: +// yarn split-e2e-tests-codebuild-single src/__tests__/auth_2d.ts w us-east-2 + +const main = () => { + let filePath: string = process.argv[2]; + const potentialPathPrefix = 'packages/amplify-e2e-tests/'; + if (filePath.startsWith(potentialPathPrefix)) { + filePath = filePath.replace(potentialPathPrefix, ''); + } + const potentialFilePaths = getTestFiles(join(REPO_ROOT, 'packages', 'amplify-e2e-tests')); + if (!potentialFilePaths.includes(filePath)) { + throw new Error('Invalid path to test file.'); + } + const os = process.argv[3]; + if (!(os === 'l' || os === 'w')) { + throw new Error('Invalid job type. Expected "l" for linux or "w" for windows.'); + } + const region = process.argv[4]; + if (!regions.includes(region)) { + throw new Error(`Invalid region. Region must be one of: ${regions}`); + } + + type jobBuildSpecType = { + identifier: string; + buildspec: string; + env: { + type?: string; + image?: string; + variables: { + TEST_SUITE: string; + CLI_REGION: string; + USE_PARENT_ACCOUNT?: string; + }; + }; + 'depend-on': string[]; + }; + + const necessaryIds = [ + 'build_linux', + 'publish_to_local_registry', + 'build_pkg_binaries_arm', + 'build_pkg_binaries_linux', + 'build_pkg_binaries_macos', + 'build_pkg_binaries_win', + 'upb', + ]; + + const jobBuildSpec: jobBuildSpecType = { + identifier: `${os}_${filePath + .replace(/src\/__tests__\//g, '') + .replace(/\.test/g, '') + .replace(/\.ts/g, '') + .replace(/\./g, '_') + .replace(/-/g, '_') + .replace(/\//g, '_')}`, + buildspec: os === 'l' ? 'codebuild_specs/run_e2e_tests_linux.yml' : 'codebuild_specs/run_e2e_tests_windows.yml', + env: { + variables: { + TEST_SUITE: filePath, + CLI_REGION: region, + }, + }, + 'depend-on': ['upb'], + }; + if (os === 'w') { + jobBuildSpec.env.type = 'WINDOWS_SERVER_2019_CONTAINER'; + jobBuildSpec.env.image = '$WINDOWS_IMAGE_2019'; + jobBuildSpec['depend-on'].push('build_windows'); + necessaryIds.push('build_windows'); + } + const configBase: any = loadConfigBase(); + let baseBuildGraph = configBase.batch['build-graph']; + baseBuildGraph = baseBuildGraph.filter((i: any) => necessaryIds.includes(i.identifier)); + const currentBatch = [...baseBuildGraph, jobBuildSpec]; + configBase.batch['build-graph'] = currentBatch; + saveConfig(configBase); +}; + +main(); diff --git a/scripts/github-common.ts b/scripts/github-common.ts index 1da7ddf37a3..c33bfc84628 100644 --- a/scripts/github-common.ts +++ b/scripts/github-common.ts @@ -5,7 +5,7 @@ import * as path from 'path'; /** * Some constants and utils shared by github-prerelease and github-release */ -const owner = 'aws-amplify'; +const owner = process.env.GITHUB_REPO_OWNER ?? 'aws-amplify'; const repo = 'amplify-cli'; const apiTemplate = (subdomain: string) => `${subdomain}.github.com/repos/${owner}/${repo}/releases`; const API_URL = apiTemplate('api'); diff --git a/scripts/github-release.ts b/scripts/github-release.ts index 89e79273bf1..767d5ab14d0 100644 --- a/scripts/github-release.ts +++ b/scripts/github-release.ts @@ -13,6 +13,7 @@ const publishRelease = async (version: string, commit: string) => { method: 'PATCH', body: JSON.stringify({ prerelease: false, + make_latest: 'true', target_commitish: commit, }), }); diff --git a/scripts/github-rollback.ts b/scripts/github-rollback.ts new file mode 100644 index 00000000000..18958780967 --- /dev/null +++ b/scripts/github-rollback.ts @@ -0,0 +1,26 @@ +import { releasesRequest, semverToGithubTag } from './github-common'; +import { join } from 'path'; + +/** + * This function expects a 'version' to already exist. + * The release with proved version is marked as latest. + */ +const markReleaseAsLatest = async (version: string) => { + const { id: releaseId } = await releasesRequest(join('tags', semverToGithubTag(version))); + const releaseIdStr = (releaseId as number).toString(); + console.log(`Marking release ${version} as latest`); + await releasesRequest(releaseIdStr, { + method: 'PATCH', + body: JSON.stringify({ + prerelease: false, + make_latest: 'true', + }), + }); +}; + +const main = async () => { + const version = process.argv[2].trim(); + await markReleaseAsLatest(version); +}; + +main(); diff --git a/scripts/package-json-check.sh b/scripts/package-json-check.sh index 5b205400598..d66f1325085 100755 --- a/scripts/package-json-check.sh +++ b/scripts/package-json-check.sh @@ -1,5 +1,5 @@ #!/bin/bash if [ ! -z "git diff --diff-filter=MRA --name-only | grep package.json" ]; then yarn lint-fix-package-json - echo "Changes made to package.json files. Please stage these changes before pushing." + git diff --diff-filter=MRA --name-only | grep package.json | xargs git add fi diff --git a/scripts/package.json b/scripts/package.json index 02b888a1a84..a623eef9b8f 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -3,9 +3,6 @@ "version": "1.0.0", "description": "", "main": "echo-current-cli-version.js", - "scripts": { - "split-e2e-tests": "yarn ts-node --transpile-only ./split-e2e-tests.ts" - }, "jest": { "transform": { "^.+\\.tsx?$": "ts-jest" @@ -19,7 +16,7 @@ "@types/js-yaml": "^4.0.4", "@types/node": "^16.11.5", "@yarnpkg/parsers": "^3.0.0-rc.44", - "axios": "^0.26.0", + "axios": "^1.6.7", "execa": "^5.1.1", "fs-extra": "^10.0.0", "glob": "^7.2.0", diff --git a/scripts/promote-rc.sh b/scripts/promote-rc-codebuild.sh similarity index 50% rename from scripts/promote-rc.sh rename to scripts/promote-rc-codebuild.sh index bc2d9f4764f..f4be84f4f1a 100755 --- a/scripts/promote-rc.sh +++ b/scripts/promote-rc-codebuild.sh @@ -1,17 +1,6 @@ #!/bin/bash set -e -# This script is for promoting a CLI release candidate to @latest -# Usage: ./scripts/promote-rc.sh where is the same hash previously used to run `release-rc`. -# It is the hash in the release candidate version 1.2.3-rc..0 - -# It will: -# pull the latest changes from the release candidate branch -# push HEAD~1 of the release candidate branch to the release branch. -# HEAD~1 is used instead of HEAD so that the prerelease version commit is dropped from the latest release - -# This will kick off a CCI workflow that will publish the @latest release - repo_name="aws-amplify/amplify-cli" git remote update @@ -21,7 +10,7 @@ if [[ -z ${1+x} ]]; then exit 1 fi -rc_sha=$(git rev-parse --short "$1") +rc_sha=$(git rev-parse --short=15 "$1") remote_name=$(git remote -v | grep "$repo_name" | head -n1 | awk '{print $1;}') if [[ -z ${remote_name+x} ]]; then diff --git a/scripts/release-rc.sh b/scripts/release-rc-codebuild.sh similarity index 55% rename from scripts/release-rc.sh rename to scripts/release-rc-codebuild.sh index 5589599a47e..1d9d769dca0 100755 --- a/scripts/release-rc.sh +++ b/scripts/release-rc-codebuild.sh @@ -1,15 +1,6 @@ #!/bin/bash set -e -# this script should be run locally when starting the CLI release process -# Usage: ./scripts/release-rc.sh where is the commit sha of the commit on dev to be released -# -# It will -# 1. Checkout a new branch release_rc/ pointing to the specified commit -# 2. Merge main into the rc branch (you may have to resolve merge conflicts) -# 3. Push the rc branch to the CLI repo -# This will then kick off a CCI workflow to publish the release candidate - repo_name="aws-amplify/amplify-cli" git remote update @@ -20,7 +11,7 @@ if [[ -z ${1+x} ]]; then exit 1 fi -rc_sha=$(git rev-parse --short "$1") +rc_sha=$(git rev-parse --short=15 "$1") remote_name=$(git remote -v | grep "$repo_name" | head -n1 | awk '{print $1;}') if [[ -z ${remote_name+x} ]]; then @@ -30,6 +21,7 @@ fi branch_name="release_rc/$rc_sha" +echo "Creating $branch_name branch" git checkout -B "$branch_name" "$rc_sha" git fetch "$remote_name" main set +e @@ -41,6 +33,15 @@ if [[ $merge_exit_code -gt 0 ]]; then echo "Resolve merge conflicts and resume release candidate publish by running 'kill -CONT $$'" kill -TSTP $$ fi + +# If merge resulted in extra commit rename branch to reflect that. Pipeline will use HEAD commit to name RC version. +rc_sha_head=$(git rev-parse --short=15 HEAD) +if [[ "$rc_sha_head" != "$rc_sha" ]]; then + branch_name="release_rc/$rc_sha_head" + echo "New commit was added to RC branch during merge, renaming branch to $branch_name" + # Create new branch from current branch, i.e. rename branch + git checkout -b "$branch_name" +fi + +echo "Pushing $branch_name to $remote_name" git push "$remote_name" "$branch_name" -echo "CircleCI is publishing the release candidate. Check progress at" -echo "https://app.circleci.com/pipelines/github/$repo_name?branch=$branch_name" diff --git a/scripts/remove-pkg-fetch-checksum.ts b/scripts/remove-pkg-fetch-checksum.ts deleted file mode 100644 index 891f34de4e7..00000000000 --- a/scripts/remove-pkg-fetch-checksum.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as path from 'path'; -import * as fs from 'fs-extra'; -import { parseSyml, stringifySyml } from '@yarnpkg/parsers'; - -const removePkgFetchChecksum = (yarnLockPath: string): void => { - const yarnLockFile = fs.readFileSync(yarnLockPath, 'utf8'); - const yarnLockData = parseSyml(yarnLockFile); - - const pkgFetchKey = Object.keys(yarnLockData).find((key) => key.startsWith('pkg-fetch@https://github.com/aws-amplify/pkg-fetch')); - - if (pkgFetchKey) { - delete yarnLockData[pkgFetchKey].checksum; - const header = - '# This file is generated by running "yarn install" inside your project.\n# Manual changes might be lost - proceed with caution!\n\n'; - fs.writeFileSync(yarnLockPath, `${header}${stringifySyml(yarnLockData)}`); - } -}; - -removePkgFetchChecksum(path.join(process.cwd(), '..', 'yarn.lock')); diff --git a/scripts/select-region-for-e2e-test.ts b/scripts/select-region-for-e2e-test.ts new file mode 100644 index 00000000000..2eb541992b6 --- /dev/null +++ b/scripts/select-region-for-e2e-test.ts @@ -0,0 +1,36 @@ +import { AWS_REGIONS_TO_RUN_TESTS } from './cci-utils'; +import * as fs from 'fs-extra'; +import path from 'path'; + +/** + * This script prints region assignment for an e2e test job. + * The algorithm takes input via environment variable - CODEBUILD_BATCH_BUILD_IDENTIFIER + * and computes deterministic region assignment by looking at position + * of build job in 'wait_for_ids.json' file. + * In order to reshuffle regions 'offset' constant below should be modified. + * + * If region is already assigned, i.e. CLI_REGION environment variable is set this script is pass-through. + */ + +// if region is specified by job honor it. +let selectedRegion = process.env.CLI_REGION; +if (!selectedRegion) { + const jobId = process.env.CODEBUILD_BATCH_BUILD_IDENTIFIER; + if (!jobId) { + throw Error('CODEBUILD_BATCH_BUILD_IDENTIFIER environment variable must be set'); + } + // Offset should be changed if we want re-shuffle regions. + const offset = 0; + const waitForIdsFilePath = path.join('.', 'codebuild_specs', 'wait_for_ids.json'); + const jobIds = JSON.parse(fs.readFileSync(waitForIdsFilePath, 'utf-8')) as Array; + let jobPosition = jobIds.indexOf(jobId); + if (jobPosition < 0) { + // this should never happen if PR checks pass, but just in case fall back to first region. + jobPosition = 0; + } + const regionIndex = (jobPosition + offset) % AWS_REGIONS_TO_RUN_TESTS.length; + + selectedRegion = AWS_REGIONS_TO_RUN_TESTS[regionIndex]; +} + +console.log(selectedRegion); diff --git a/scripts/split-e2e-test-filters.ts b/scripts/split-e2e-test-filters.ts index 8a917e83917..e69de29bb2d 100644 --- a/scripts/split-e2e-test-filters.ts +++ b/scripts/split-e2e-test-filters.ts @@ -1,24 +0,0 @@ -export const migrationFromV8Tests = [ - 'src/__tests__/migration_tests/notifications-migration/notifications-migration-2.test.ts', - 'src/__tests__/migration_tests/notifications-migration/notifications-migration-3.test.ts', - 'src/__tests__/migration_tests/notifications-migration/notifications-migration-4.test.ts', - 'src/__tests__/migration_tests/notifications-migration/notifications-migration.test.ts', - 'src/__tests__/migration_tests/transformer_migration/api.key.migration-2.test.ts', - 'src/__tests__/migration_tests/transformer_migration/api.key.migration.test.ts', - 'src/__tests__/update_tests/function_migration_update.test.ts', -]; - -export const migrationFromV10Tests = [ - 'src/__tests__/migration_tests_v10/api-graphql-v2.migration.test.ts', - 'src/__tests__/migration_tests_v10/api-rest-basic.migration.test.ts', - 'src/__tests__/migration_tests_v10/api-rest-lambda.migration.test.ts', - 'src/__tests__/migration_tests_v10/api-rest-serverless.migration.test.ts', - 'src/__tests__/migration_tests_v10/auth-add-all.migration.test.ts', - 'src/__tests__/migration_tests_v10/auth-override.migration.test.ts', - 'src/__tests__/migration_tests_v10/custom-stack.migration.test.ts', - 'src/__tests__/migration_tests_v10/git-clone-migration-tests.test.ts', - 'src/__tests__/migration_tests_v10/geo.migration.test.ts', - 'src/__tests__/migration_tests_v10/scaffold.test.ts', - 'src/__tests__/migration_tests_v10/storage.migration.test.ts', - 'src/__tests__/migration_tests_v10/pinpoint-region.migration.test.ts', -]; diff --git a/scripts/split-e2e-tests-codebuild.ts b/scripts/split-e2e-tests-codebuild.ts index 5ba7d8edcbe..8759de97b4d 100644 --- a/scripts/split-e2e-tests-codebuild.ts +++ b/scripts/split-e2e-tests-codebuild.ts @@ -2,15 +2,14 @@ import * as glob from 'glob'; import * as fs from 'fs-extra'; import { join } from 'path'; import * as yaml from 'js-yaml'; -import { AWS_REGIONS_TO_RUN_TESTS as regions } from './cci-utils'; import { REPO_ROOT } from './cci-utils'; import { FORCE_REGION_MAP, getOldJobNameWithoutSuffixes, loadTestTimings, USE_PARENT_ACCOUNT } from './cci-utils'; -import { migrationFromV10Tests, migrationFromV8Tests } from './split-e2e-test-filters'; const CODEBUILD_CONFIG_BASE_PATH = join(REPO_ROOT, 'codebuild_specs', 'e2e_workflow_base.yml'); const CODEBUILD_GENERATE_CONFIG_PATH = join(REPO_ROOT, 'codebuild_specs', 'e2e_workflow_generated'); const RUN_SOLO = [ 'src/__tests__/auth_2c.test.ts', 'src/__tests__/auth_2e.test.ts', + 'src/__tests__/aws-exports/js-frontend-config.test.ts', 'src/__tests__/containers-api-1.test.ts', 'src/__tests__/containers-api-2.test.ts', 'src/__tests__/env-3.test.ts', @@ -41,24 +40,43 @@ const RUN_SOLO = [ 'src/__tests__/schema-auth-15.test.ts', 'src/__tests__/schema-connection-1.test.ts', 'src/__tests__/transformer-migrations/searchable-migration.test.ts', + 'src/__tests__/uibuilder.test.ts', +]; +const DISABLE_COVERAGE = [ + 'src/__tests__/datastore-modelgen.test.ts', + 'src/__tests__/amplify-app.test.ts', + 'src/__tests__/smoke-tests/smoketest-amplify-app.test.ts', ]; const TEST_EXCLUSIONS: { l: string[]; w: string[] } = { l: [], w: [ + /* TEMPORARY-PR12830: Remove after we ship PR12830 */ + 'src/__tests__/custom_resources.test.ts', + 'src/__tests__/custom-resource-with-storage.test.ts', + /* END TEMPORARY */ + 'src/__tests__/smoketest.test.ts', 'src/__tests__/opensearch-simulator/opensearch-simulator.test.ts', 'src/__tests__/storage-simulator/S3server.test.ts', 'src/__tests__/amplify-app.test.ts', + 'src/__tests__/smoke-tests/smoketest-amplify-app.test.ts', + // failing in parsing JSON strings on powershell + 'src/__tests__/auth_2g.test.ts', 'src/__tests__/auth_12.test.ts', 'src/__tests__/datastore-modelgen.test.ts', 'src/__tests__/diagnose.test.ts', 'src/__tests__/env-2.test.ts', + 'src/__tests__/pr-previews-multi-env-1.test.ts', 'src/__tests__/export.test.ts', - 'src/__tests__/function_3a.test.ts', + 'src/__tests__/function_3a_dotnet.test.ts', + 'src/__tests__/function_3a_python.test.ts', + 'src/__tests__/function_3a_go.test.ts', + 'src/__tests__/function_3a_nodejs.test.ts', 'src/__tests__/function_3b.test.ts', 'src/__tests__/function_4.test.ts', 'src/__tests__/function_6.test.ts', 'src/__tests__/function_7.test.ts', 'src/__tests__/function_8.test.ts', + 'src/__tests__/function_15.test.ts', 'src/__tests__/geo-add-e.test.ts', 'src/__tests__/geo-add-f.test.ts', 'src/__tests__/geo-remove-2.test.ts', @@ -67,6 +85,7 @@ const TEST_EXCLUSIONS: { l: string[]; w: string[] } = { 'src/__tests__/geo-update-2.test.ts', 'src/__tests__/git-clone-attach.test.ts', 'src/__tests__/hooks-a.test.ts', + 'src/__tests__/hooks-c.test.ts', 'src/__tests__/import_auth_1a.test.ts', 'src/__tests__/import_auth_1b.test.ts', 'src/__tests__/import_auth_2a.test.ts', @@ -81,6 +100,7 @@ const TEST_EXCLUSIONS: { l: string[]; w: string[] } = { 'src/__tests__/layer-2.test.ts', 'src/__tests__/mock-api.test.ts', 'src/__tests__/pull.test.ts', + 'src/__tests__/pull-2.test.ts', 'src/__tests__/schema-iterative-rollback-1.test.ts', 'src/__tests__/schema-iterative-rollback-2.test.ts', 'src/__tests__/storage-5.test.ts', @@ -103,7 +123,7 @@ export function saveConfig(config: any): void { const output = ['# auto generated file. DO NOT EDIT manually', yaml.dump(config, { noRefs: true, lineWidth: -1 })]; fs.writeFileSync(`${CODEBUILD_GENERATE_CONFIG_PATH}.yml`, output.join('\n')); } -function getTestFiles(dir: string, pattern = 'src/**/*.test.ts'): string[] { +export function getTestFiles(dir: string, pattern = 'src/**/*.test.ts'): string[] { return glob.sync(pattern, { cwd: dir }); } type COMPUTE_TYPE = 'BUILD_GENERAL1_MEDIUM' | 'BUILD_GENERAL1_LARGE'; @@ -125,23 +145,24 @@ type ConfigBase = { variables: [string: string]; }; }; -const MAX_WORKERS = 4; +const MAX_WORKERS = 3; +const MAX_WORKERS_WINDOWS = 2; type OS_TYPE = 'w' | 'l'; type CandidateJob = { - region: string; + region?: string; os: OS_TYPE; executor: string; tests: string[]; useParentAccount: boolean; + disableCoverage: boolean; }; const createRandomJob = (os: OS_TYPE): CandidateJob => { - const region = regions[Math.floor(Math.random() * regions.length)]; return { - region, os, executor: os === 'l' ? 'l_large' : 'w_medium', tests: [], useParentAccount: false, + disableCoverage: false, }; }; const splitTestsV3 = ( @@ -182,8 +203,9 @@ const splitTestsV3 = ( } const FORCE_REGION = FORCE_REGION_MAP.get(test); const USE_PARENT = USE_PARENT_ACCOUNT.some((usesParent) => test.startsWith(usesParent)); + const NO_COVERAGE = DISABLE_COVERAGE.find((nocov) => test === nocov); - if (isMigration || RUN_SOLO.find((solo) => test === solo)) { + if (isMigration || RUN_SOLO.find((solo) => test === solo) || NO_COVERAGE) { const newSoloJob = createRandomJob(os); newSoloJob.tests.push(test); if (FORCE_REGION) { @@ -192,6 +214,9 @@ const splitTestsV3 = ( if (USE_PARENT) { newSoloJob.useParentAccount = true; } + if (NO_COVERAGE) { + newSoloJob.disableCoverage = true; + } soloJobs.push(newSoloJob); continue; } @@ -205,8 +230,9 @@ const splitTestsV3 = ( currentJob.useParentAccount = true; } + const maxWorkers = os === 'w' ? MAX_WORKERS_WINDOWS : MAX_WORKERS; // create a new job once the current job is full; - if (currentJob.tests.length >= MAX_WORKERS) { + if (currentJob.tests.length >= maxWorkers) { osJobs.push(createRandomJob(os)); } } @@ -224,38 +250,57 @@ const splitTestsV3 = ( }; const result: any[] = []; const dependeeIdentifiers: string[] = []; - linuxJobs.forEach((j) => { - if (j.tests.length !== 0) { - const names = j.tests.map((tn) => getOldJobNameWithoutSuffixes(tn)).join('_'); - const identifier = getIdentifier(j.os, names); + linuxJobs.forEach((job) => { + if (job.tests.length !== 0) { + const names = job.tests.map((tn) => getOldJobNameWithoutSuffixes(tn)).join('_'); + const identifier = getIdentifier(job.os, names); dependeeIdentifiers.push(identifier); - const tmp = { + const formattedJob = { ...JSON.parse(JSON.stringify(baseJobLinux)), // deep clone base job identifier, }; - tmp.env.variables = {}; - tmp.env.variables.TEST_SUITE = j.tests.join('|'); - tmp.env.variables.CLI_REGION = j.region; - if (j.useParentAccount) { - tmp.env.variables.USE_PARENT_ACCOUNT = 1; + formattedJob.env.variables = {}; + if (isMigration || job.tests.length === 1) { + formattedJob.env.variables['compute-type'] = 'BUILD_GENERAL1_SMALL'; + } + formattedJob.env.variables.TEST_SUITE = job.tests.join('|'); + if (job.region) { + // Jobs with forced region are assigned one explicitly. + // Otherwise, region is assigned at runtime by select-region-for-e2e-test.ts script. + formattedJob.env.variables.CLI_REGION = job.region; } - result.push(tmp); + if (job.useParentAccount) { + formattedJob.env.variables.USE_PARENT_ACCOUNT = 1; + } + if (job.disableCoverage) { + formattedJob.env.variables.DISABLE_COVERAGE = 1; + } + result.push(formattedJob); } }); - windowsJobs.forEach((j) => { - if (j.tests.length !== 0) { - const names = j.tests.map((tn) => getOldJobNameWithoutSuffixes(tn)).join('_'); - const identifier = getIdentifier(j.os, names); + windowsJobs.forEach((job) => { + if (job.tests.length !== 0) { + const names = job.tests.map((tn) => getOldJobNameWithoutSuffixes(tn)).join('_'); + const identifier = getIdentifier(job.os, names); dependeeIdentifiers.push(identifier); - const tmp = { + const formattedJob = { ...JSON.parse(JSON.stringify(baseJobWindows)), // deep clone base job identifier, }; - tmp.env.variables = {}; - tmp.env.variables.TEST_SUITE = j.tests.join('|'); - tmp.env.variables.CLI_REGION = j.region; - tmp.env.variables.USE_PARENT_ACCOUNT = j.useParentAccount; - result.push(tmp); + formattedJob.env.variables = {}; + formattedJob.env.variables.TEST_SUITE = job.tests.join('|'); + if (job.region) { + // Jobs with forced region are assigned one explicitly. + // Otherwise, region is assigned at runtime by select-region-for-e2e-test.ts script. + formattedJob.env.variables.CLI_REGION = job.region; + } + if (job.useParentAccount) { + formattedJob.env.variables.USE_PARENT_ACCOUNT = 1; + } + if (job.disableCoverage) { + formattedJob.env.variables.DISABLE_COVERAGE = 1; + } + result.push(formattedJob); } }); return result; @@ -283,37 +328,10 @@ function main(): void { false, undefined, ); - const splitMigrationV8Tests = splitTestsV3( - { - identifier: 'migration_tests_v8', - buildspec: 'codebuild_specs/migration_tests_v8.yml', - env: {}, - 'depend-on': ['upb'], - }, - undefined, - join(REPO_ROOT, 'packages', 'amplify-migration-tests'), - true, - (tests: string[]) => { - return tests.filter((testName) => migrationFromV8Tests.find((t: string) => t === testName)); - }, - ); - const splitMigrationV10Tests = splitTestsV3( - { - identifier: 'migration_tests_v10', - buildspec: 'codebuild_specs/migration_tests_v10.yml', - env: {}, - 'depend-on': ['upb'], - }, - undefined, - join(REPO_ROOT, 'packages', 'amplify-migration-tests'), - true, - (tests: string[]) => { - return tests.filter((testName) => migrationFromV10Tests.find((t) => t === testName)); - }, - ); - let allBuilds = [...splitE2ETests, ...splitMigrationV8Tests, ...splitMigrationV10Tests]; + + let allBuilds = [...splitE2ETests]; const dependeeIdentifiers: string[] = allBuilds.map((buildObject) => buildObject.identifier).sort(); - const dependeeIdentifiersFileContents = JSON.stringify(dependeeIdentifiers, null, 4); + const dependeeIdentifiersFileContents = `${JSON.stringify(dependeeIdentifiers, null, 2)}\n`; const waitForIdsFilePath = './codebuild_specs/wait_for_ids.json'; fs.writeFileSync(waitForIdsFilePath, dependeeIdentifiersFileContents); const reportsAggregator = { diff --git a/scripts/split-e2e-tests-v2.ts b/scripts/split-e2e-tests-v2.ts deleted file mode 100644 index ce59bf8a59d..00000000000 --- a/scripts/split-e2e-tests-v2.ts +++ /dev/null @@ -1,421 +0,0 @@ -import { CircleCIConfig, WorkflowJob } from './cci-types'; -import { FORCE_REGION_MAP, getOldJobNameWithoutSuffixes, loadTestTimings, USE_PARENT_ACCOUNT } from './cci-utils'; -import { AWS_REGIONS_TO_RUN_TESTS as regions, getTestFiles } from './cci-utils'; -const RUN_SOLO = [ - 'src/__tests__/auth_2c.test.ts', - 'src/__tests__/auth_2e.test.ts', - 'src/__tests__/containers-api-1.test.ts', - 'src/__tests__/containers-api-2.test.ts', - 'src/__tests__/env-3.test.ts', - 'src/__tests__/geo-add-e.test.ts', - 'src/__tests__/geo-add-f.test.ts', - 'src/__tests__/geo-remove-1.test.ts', - 'src/__tests__/geo-remove-2.test.ts', - 'src/__tests__/geo-remove-3.test.ts', - 'src/__tests__/geo-update-1.test.ts', - 'src/__tests__/geo-update-2.test.ts', - 'src/__tests__/hostingPROD.test.ts', - 'src/__tests__/import_auth_1a.test.ts', - 'src/__tests__/import_auth_1b.test.ts', - 'src/__tests__/import_auth_2a.test.ts', - 'src/__tests__/import_auth_2b.test.ts', - 'src/__tests__/import_auth_3.test.ts', - 'src/__tests__/import_dynamodb_1.test.ts', - 'src/__tests__/import_dynamodb_2a.test.ts', - 'src/__tests__/import_dynamodb_2b.test.ts', - 'src/__tests__/import_dynamodb_2c.test.ts', - 'src/__tests__/import_s3_1.test.ts', - 'src/__tests__/import_s3_2a.test.ts', - 'src/__tests__/import_s3_2b.test.ts', - 'src/__tests__/import_s3_2c.test.ts', - 'src/__tests__/import_s3_3.test.ts', - 'src/__tests__/notifications-in-app-messaging.test.ts', - 'src/__tests__/schema-auth-11-a.test.ts', - 'src/__tests__/schema-auth-15.test.ts', - 'src/__tests__/schema-connection-1.test.ts', - 'src/__tests__/transformer-migrations/searchable-migration.test.ts', -]; -/** - * Most Windows tests only run on 'dev', except for this list of smoke tests. - * This list should contain ~30 high quality tests that provide good overall coverage. - * - * All other tests will eventually run on 'dev'. - */ -const WINDOWS_SMOKE_TESTS = [ - // api, lambda, multi-env - 'src/__tests__/api_lambda_auth_1.test.ts', - // auth with api, trigger, and function that depends on api - 'src/__tests__/auth_2e.test.ts', - // js with with all auth options - 'src/__tests__/auth_3c.test.ts', - // headless auth with totp & sms - 'src/__tests__/auth_5b.test.ts', - // headless auth update resource - 'src/__tests__/auth_5e.test.ts', - // js with all auth options and front end config - 'src/__tests__/auth_6.test.ts', - // auth import - 'src/__tests__/auth_7b.test.ts', - // flutter with auth - 'src/__tests__/auth_8b.test.ts', - // android - 'src/__tests__/auth_11.test.ts', - // auth with multiple triggers - 'src/__tests__/auth-trigger.test.ts', - // configure - 'src/__tests__/congifure-project.test.ts', - // api with containers and secrets - 'src/__tests__/containers-api-secrets.test.ts', - // api with dynamodb & lambda, custom policies - 'src/__tests__/custom_policies_function.test.ts', - // env - 'src/__tests__/env-1.test.ts', - // export and pull - 'src/__tests__/export-pull-a.test.ts', - // feature flags - 'src/__tests__/feature-flags.test.ts', - // functions - 'src/__tests__/function_10.test.ts', - // notifications with function permissions - 'src/__tests__/function-permissions.test.ts', - // geo - 'src/__tests__/geo-add-a.test.ts', - // global sandbox - 'src/__tests__/global_sandbox-b.test.ts', - // hooks - 'src/__tests__/hooks-b.test.ts', - // hosting - 'src/__tests__/hostingPROD.test.ts', - // parameter store - 'src/__tests__/parameter-store-1.test.ts', - 'src/__tests__/parameter-store-2.test.ts', - // interactions - 'src/__tests__/interactions.test.ts', - // schema auth test - 'src/__tests__/schema-auth-1a.test.ts', - // schema model test - 'src/__tests__/schema-model-e.test.ts', - // iterative deployments - 'src/__tests__/schema-iterative-update-1.test.ts', -]; -const TEST_EXCLUSIONS: { l: string[]; w: string[] } = { - l: [], - w: [ - 'src/__tests__/smoketest.test.ts', - 'src/__tests__/opensearch-simulator/opensearch-simulator.test.ts', - 'src/__tests__/storage-simulator/S3server.test.ts', - 'src/__tests__/amplify-app.test.ts', - // failing in parsing JSON strings on powershell - 'src/__tests__/auth_2g.test.ts', - 'src/__tests__/auth_12.test.ts', - 'src/__tests__/datastore-modelgen.test.ts', - 'src/__tests__/diagnose.test.ts', - 'src/__tests__/env-2.test.ts', - 'src/__tests__/pr-previews-multi-env-1.test.ts', - 'src/__tests__/export.test.ts', - 'src/__tests__/function_3a.test.ts', - 'src/__tests__/function_3b.test.ts', - 'src/__tests__/function_4.test.ts', - 'src/__tests__/function_6.test.ts', - 'src/__tests__/function_7.test.ts', - 'src/__tests__/function_8.test.ts', - 'src/__tests__/geo-add-e.test.ts', - 'src/__tests__/geo-add-f.test.ts', - 'src/__tests__/geo-remove-2.test.ts', - 'src/__tests__/geo-remove-3.test.ts', - 'src/__tests__/geo-update-1.test.ts', - 'src/__tests__/geo-update-2.test.ts', - 'src/__tests__/git-clone-attach.test.ts', - 'src/__tests__/hooks-a.test.ts', - 'src/__tests__/hooks-c.test.ts', - 'src/__tests__/import_auth_1a.test.ts', - 'src/__tests__/import_auth_1b.test.ts', - 'src/__tests__/import_auth_2a.test.ts', - 'src/__tests__/import_auth_2b.test.ts', - 'src/__tests__/import_auth_3.test.ts', - 'src/__tests__/import_dynamodb_2a.test.ts', - 'src/__tests__/import_dynamodb_2b.test.ts', - 'src/__tests__/import_dynamodb_2c.test.ts', - 'src/__tests__/import_s3_2a.test.ts', - 'src/__tests__/import_s3_2b.test.ts', - 'src/__tests__/import_s3_2c.test.ts', - 'src/__tests__/layer-2.test.ts', - 'src/__tests__/mock-api.test.ts', - 'src/__tests__/pull.test.ts', - 'src/__tests__/schema-iterative-rollback-1.test.ts', - 'src/__tests__/schema-iterative-rollback-2.test.ts', - 'src/__tests__/storage-5.test.ts', - 'src/__tests__/uibuilder.test.ts', - 'src/__tests__/pinpoint/android-analytics-pinpoint-config.test.ts', - 'src/__tests__/pinpoint/android-notifications-pinpoint-config.test.ts', - 'src/__tests__/pinpoint/flutter-analytics-pinpoint-config.test.ts', - 'src/__tests__/pinpoint/flutter-notifications-pinpoint-config.test.ts', - 'src/__tests__/pinpoint/ios-analytics-pinpoint-config.test.ts', - 'src/__tests__/pinpoint/ios-notifications-pinpoint-config.test.ts', - 'src/__tests__/pinpoint/javascript-analytics-pinpoint-config.test.ts', - 'src/__tests__/pinpoint/javascript-notifications-pinpoint-config.test.ts', - 'src/__tests__/pinpoint/notifications-pinpoint-config-util.ts', - ], -}; -const MAX_WORKERS = 4; -type OS_TYPE = 'w' | 'l'; -type CandidateJob = { - region: string; - os: OS_TYPE; - executor: string; - tests: string[]; - useParentAccount: boolean; - // intentially leaving this here - accounts are randomly assigned to jobs - // by a via local_publish_helpers.sh script - // account: string, -}; - -const createRandomJob = (os: OS_TYPE): CandidateJob => { - const region = regions[Math.floor(Math.random() * regions.length)]; - return { - region, - os, - executor: os === 'l' ? 'l_large' : 'w_medium', - tests: [], - useParentAccount: false, - }; -}; - -export const splitTestsV2 = function splitTests( - config: Readonly, - counts: { w: number; l: number }, - baseJobName: string, - workflowName: string, - jobRootDir: string, - isMigration: boolean, - pickTests: ((testSuites: string[]) => string[]) | undefined, -): CircleCIConfig { - const output: CircleCIConfig = { ...config }; - const baseJobs = { ...config.jobs }; - const baseJob = baseJobs[baseJobName]; - - let testSuites = getTestFiles(jobRootDir); - if (pickTests && typeof pickTests === 'function') { - testSuites = pickTests(testSuites); - } - if (testSuites.length === 0) { - return output; - } - const testFileRunTimes = loadTestTimings().timingData; - - testSuites.sort((a, b) => { - const runtimeA = testFileRunTimes.find((t) => t.test === a)?.medianRuntime ?? 30; - const runtimeB = testFileRunTimes.find((t) => t.test === b)?.medianRuntime ?? 30; - return runtimeA - runtimeB; - }); - const generateJobsForOS = (os: OS_TYPE) => { - // migration tests are not supported for windows - if (isMigration && os === 'w') { - return []; - } - const soloJobs = []; - const osJobs = [createRandomJob(os)]; - for (let test of testSuites) { - const currentJob = osJobs[osJobs.length - 1]; - - // if the current test is excluded from this OS, skip it - if (TEST_EXCLUSIONS[os].find((excluded) => test === excluded)) { - continue; - } - // when we are not running E2E on 'dev', we only run a subset of tests on Windows - const isNotDevBranch = process.env.CIRCLE_BRANCH !== 'dev'; - const shouldForceAllTests = process.env.CIRCLE_BRANCH?.endsWith('/run-all-tests') ?? false; - const shouldFilterWindowsTests = isNotDevBranch && !shouldForceAllTests; - if (shouldFilterWindowsTests && os === 'w' && !WINDOWS_SMOKE_TESTS.includes(test)) { - continue; // skip this test - } - const FORCE_REGION = FORCE_REGION_MAP.get(test); - const USE_PARENT = USE_PARENT_ACCOUNT.some((usesParent) => test.startsWith(usesParent)); - - if (isMigration || RUN_SOLO.find((solo) => test === solo)) { - const newSoloJob = createRandomJob(os); - newSoloJob.tests.push(test); - if (FORCE_REGION) { - newSoloJob.region = FORCE_REGION; - } - if (USE_PARENT) { - newSoloJob.useParentAccount = true; - } - soloJobs.push(newSoloJob); - continue; - } - - // add the test - currentJob.tests.push(test); - if (FORCE_REGION) { - currentJob.region = FORCE_REGION; - } - if (USE_PARENT) { - currentJob.useParentAccount = true; - } - - // create a new job once the current job is full; - if (currentJob.tests.length >= MAX_WORKERS) { - osJobs.push(createRandomJob(os)); - } - } - return [...osJobs, ...soloJobs]; - }; - const linuxJobs = generateJobsForOS('l'); - const windowsJobs = generateJobsForOS('w'); - - // create the new job configurations, which will be added to the "jobs" - // section of the CircleCI config file - let newJobConfigurations = {}; - const generateJobConfigurations = (jobs: CandidateJob[]) => { - for (let j of jobs) { - if (j.tests.length === 0) { - continue; - } - const names = j.tests.map((tn) => getOldJobNameWithoutSuffixes(tn)).join('_'); - let jobName = `${j.os}_${names}`; - if (isMigration) { - const startIndex = baseJobName.lastIndexOf('_'); - jobName = jobName + baseJobName.substring(startIndex); - } - - newJobConfigurations = { - ...newJobConfigurations, - [jobName]: { - ...baseJob, - environment: { - ...(baseJob?.environment || {}), - TEST_SUITE: j.tests.join('|'), - CLI_REGION: j.region, - ...(j.useParentAccount ? { USE_PARENT_ACCOUNT: 1 } : {}), - }, - }, - }; - if (j.os === 'l') { - counts.l = counts.l + 1; - } else { - counts.w = counts.w + 1; - } - } - }; - generateJobConfigurations(linuxJobs); - generateJobConfigurations(windowsJobs); - - // Split jobs by region - const jobByRegion = Object.entries(newJobConfigurations).reduce((acc: Record, entry: [string, any]) => { - const [jobName, job] = entry; - const region = job?.environment?.CLI_REGION; - const regionJobs = { ...acc[region], [jobName]: job }; - return { ...acc, [region]: regionJobs }; - }, {}); - - const workflows = { ...config.workflows }; - - if (workflows[workflowName]) { - const workflow = workflows[workflowName]; - - const workflowJob = workflow.jobs.find((j) => { - if (typeof j === 'string') { - return j === baseJobName; - } else { - const name = Object.keys(j)[0]; - return name === baseJobName; - } - }); - - if (workflowJob) { - Object.values(jobByRegion).forEach((regionJobs: any) => { - const newJobNames = Object.keys(regionJobs as object); - const jobs = newJobNames.map((newJobName, index) => { - if (typeof workflowJob === 'string') { - return newJobName; - } else { - const isSingleTest = regionJobs[newJobName].environment.TEST_SUITE.split('|').length === 1; - let requiredJobs = workflowJob[baseJobName].requires || []; - // don't need to wait on windows if this is a linux test - if (newJobName.startsWith('l')) { - requiredJobs = requiredJobs.filter((j) => j !== 'build_windows_workspace_for_e2e'); - } - // we can downsize on linux - let runner = isMigration || isSingleTest ? 'l_medium' : 'l_large'; - if (!newJobName.startsWith('l')) { - runner = 'w_medium'; // w_medium is the smallest we can go for windows - } - return { - [newJobName]: { - ...Object.values(workflowJob)[0], - requires: requiredJobs, - matrix: { - parameters: { - os: [runner], - }, - }, - }, - }; - } - }); - workflow.jobs = [...workflow.jobs, ...jobs]; - }); - - const lastJobBatch = Object.values(jobByRegion) - .map((regionJobs) => getLastBatchJobs(Object.keys(regionJobs as Object), 50)) - .reduce((acc, val) => acc.concat(val), []); - const filteredJobs = replaceWorkflowDependency(removeWorkflowJob(workflow.jobs, baseJobName), baseJobName, lastJobBatch); - workflow.jobs = filteredJobs; - } - output.workflows = workflows; - } - output.jobs = { - ...output.jobs, - ...newJobConfigurations, - }; - return output; -}; - -/** - * CircleCI workflow can have multiple jobs. This helper function removes the jobName from the workflow - * @param jobs - All the jobs in workflow - * @param jobName - job that needs to be removed from workflow - */ -export function removeWorkflowJob(jobs: WorkflowJob[], jobName: string): WorkflowJob[] { - return jobs.filter((j) => { - if (typeof j === 'string') { - return j !== jobName; - } else { - const name = Object.keys(j)[0]; - return name !== jobName; - } - }); -} - -/** - * - * @param jobs array of job names - * @param concurrency number of concurrent jobs - */ -export function getLastBatchJobs(jobs: string[], concurrency: number): string[] { - const lastBatchJobLength = Math.min(concurrency, jobs.length); - const lastBatchJobNames = jobs.slice(jobs.length - lastBatchJobLength); - return lastBatchJobNames; -} - -/** - * A job in workflow can require some other job in the workflow to be finished before executing - * This helper method finds and replaces jobName with jobsToReplacesWith - * @param jobs - Workflow jobs - * @param jobName - job to remove from requires - * @param jobsToReplaceWith - jobs to add to requires - */ -export function replaceWorkflowDependency(jobs: WorkflowJob[], jobName: string, jobsToReplaceWith: string[]): WorkflowJob[] { - return jobs.map((j) => { - if (typeof j === 'string') return j; - const [currentJobName, jobObj] = Object.entries(j)[0]; - const requires = jobObj.requires || []; - if (requires.includes(jobName)) { - jobObj.requires = [...requires.filter((r) => r !== jobName), ...jobsToReplaceWith]; - } - return { - [currentJobName]: jobObj, - }; - }); -} diff --git a/scripts/split-e2e-tests.ts b/scripts/split-e2e-tests.ts deleted file mode 100644 index 13ba8d11c55..00000000000 --- a/scripts/split-e2e-tests.ts +++ /dev/null @@ -1,131 +0,0 @@ -import * as execa from 'execa'; -import { join } from 'path'; -import { ARTIFACT_STORAGE_PATH_ALLOW_LIST } from './artifact-storage-path-allow-list'; -import { CircleCIConfig } from './cci-types'; -import { loadConfig, REPO_ROOT, saveConfig } from './cci-utils'; -import { migrationFromV10Tests, migrationFromV8Tests } from './split-e2e-test-filters'; -import { splitTestsV2 } from './split-e2e-tests-v2'; - -function verifyConfig() { - if (process.env.CIRCLECI) { - console.log('Skipping config verification since this is already running in a CCI environment.'); - return; - } - try { - execa.commandSync('which circleci'); - } catch { - console.error( - 'Please install circleci cli to validate your circle config. Installation information can be found at https://circleci.com/docs/2.0/local-cli/', - ); - process.exit(1); - } - const cci_config_path = join(REPO_ROOT, '.circleci', 'config.yml'); - const cci_generated_config_path = join(REPO_ROOT, '.circleci', 'generated_config.yml'); - try { - execa.commandSync(`circleci config validate ${cci_config_path}`); - } catch { - console.error(`"circleci config validate" command failed. Please check your .circleci/config.yml validity`); - process.exit(1); - } - try { - execa.commandSync(`circleci config validate ${cci_generated_config_path}`); - } catch (e) { - console.log(e); - console.error(`"circleci config validate" command failed. Please check your .circleci/generated_config.yml validity`); - process.exit(1); - } -} - -function validateArtifactStoragePaths(config: CircleCIConfig) { - // make sure that only valid paths are used to store artifacts/results - const storagePathsUsedInConfig = new Set(); - const unregisteredPaths = new Set(); - const invalidPaths = new Set(); - for (let key of Object.keys(config.jobs)) { - const job = config.jobs[key]; - const steps = job.steps; - - for (let i = 0; i < steps.length; i++) { - const resultsPath = steps[i].store_test_results; - const artifactsPath = steps[i].store_artifacts; - if (resultsPath) { - storagePathsUsedInConfig.add(resultsPath.path); - if (ARTIFACT_STORAGE_PATH_ALLOW_LIST.indexOf(resultsPath.path) === -1) { - unregisteredPaths.add(resultsPath.path); - } - if (!resultsPath.path.startsWith('~/')) { - invalidPaths.add(resultsPath.path); - } - } - if (artifactsPath) { - storagePathsUsedInConfig.add(artifactsPath.path); - if (ARTIFACT_STORAGE_PATH_ALLOW_LIST.indexOf(artifactsPath.path) === -1) { - unregisteredPaths.add(artifactsPath.path); - } - if (!artifactsPath.path.startsWith('~/')) { - invalidPaths.add(artifactsPath.path); - } - } - } - } - if (unregisteredPaths.size > 0 || invalidPaths.size > 0) { - console.log('There are errors in your configuration.\n'); - - if (invalidPaths.size > 0) { - const errors = Array.from(invalidPaths); - console.log('Fix these paths. They must start with ~/', errors, '\n'); - } - if (unregisteredPaths.size > 0) { - const newList = Array.from(storagePathsUsedInConfig); - const unregisteredList = Array.from(unregisteredPaths); - console.log('You are storing artifacts in an unregistered location.'); - console.log('Please update artifact-storage-path-allow-list.ts to include the new storage paths.'); - console.log('Update the list to match this:', newList); - console.log('Doing so will register these unregistered paths:', unregisteredList); - } - process.exit(1); - } -} - -function main(): void { - const config = loadConfig(); - - validateArtifactStoragePaths(config); - - const counts = { w: 0, l: 0 }; - const splitPkgTests = splitTestsV2( - config, - counts, - 'amplify_e2e_tests_pkg', - 'build_test_deploy_v3', - join(REPO_ROOT, 'packages', 'amplify-e2e-tests'), - false, - undefined, - ); - const splitV8MigrationTests = splitTestsV2( - splitPkgTests, - counts, - 'amplify_migration_tests_v8', - 'build_test_deploy_v3', - join(REPO_ROOT, 'packages', 'amplify-migration-tests'), - true, - (tests: string[]) => { - return tests.filter((testName) => migrationFromV8Tests.find((t) => t === testName)); - }, - ); - const splitV10MigrationTests = splitTestsV2( - splitV8MigrationTests, - counts, - 'amplify_migration_tests_v10', - 'build_test_deploy_v3', - join(REPO_ROOT, 'packages', 'amplify-migration-tests'), - true, - (tests: string[]) => { - return tests.filter((testName) => migrationFromV10Tests.find((t) => t === testName)); - }, - ); - console.log(counts); - saveConfig(splitV10MigrationTests); - verifyConfig(); -} -main(); diff --git a/scripts/tag-rc.sh b/scripts/tag-rc.sh deleted file mode 100755 index f73fe1ab8db..00000000000 --- a/scripts/tag-rc.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# exit if branch name is not an rc branch -if ! { [[ "$CIRCLE_BRANCH" =~ ^run-e2e-with-rc\/.* ]] || [[ "$CIRCLE_BRANCH" =~ ^release_rc\/.* ]]; }; then - echo "Skipping because this branch is not deploying a release candidate" - exit 0 -fi - -rc_tag="v$(jq -r .version packages/amplify-cli/package.json)" -commit="$(git rev-parse HEAD~1)" -short_commit="$(git rev-parse --short HEAD~1)" -git tag $rc_tag $commit -# push the main release tag -git push origin $rc_tag -# push the release tags for all other packages -git tag | grep $short_commit | xargs git push origin diff --git a/scripts/update-data-dependencies.sh b/scripts/update-data-dependencies.sh index 977de61cfce..f05e7a8f9fc 100755 --- a/scripts/update-data-dependencies.sh +++ b/scripts/update-data-dependencies.sh @@ -13,6 +13,7 @@ if [ $# -eq 0 ] --deep \ --upgrade \ --dep "prod,dev,peer,bundle,optional" \ + --target minor \ --filter "$FILTER" else echo "Updating to $1 tag" diff --git a/scripts/verify-deployment.ts b/scripts/verify-deployment.ts new file mode 100644 index 00000000000..f4f8b442381 --- /dev/null +++ b/scripts/verify-deployment.ts @@ -0,0 +1,65 @@ +import { execSync } from 'child_process'; +import yargs from 'yargs'; + +type ProcessArgs = { + version: string; + excludeGithub: boolean; +}; +const githubBinaries = ['amplify-pkg-linux-arm64.tgz', 'amplify-pkg-linux.tgz', 'amplify-pkg-macos.tgz', 'amplify-pkg-win.exe.tgz']; +const parseArgs = async (): Promise => { + const args = yargs(process.argv.slice(2)) + .version(false) + .options({ + v: { alias: 'version', type: 'string', demandOption: true }, + 'exclude-github': { type: 'boolean', default: false }, + }) + .parseSync(); + + return { version: args.v, excludeGithub: args['exclude-github'] }; +}; + +const existsInNpm = (version: string): boolean => { + try { + execSync(`npm show @aws-amplify/cli@${version}`, { + stdio: 'ignore', + }); + return true; + } catch { + return false; + } +}; +const existsInGitHub = async (version: string): Promise => { + const buildUrl = (binary: string) => `https://github.com/aws-amplify/amplify-cli/releases/download/v${version}/${binary}`; + const responses = await Promise.all(githubBinaries.map((binary) => fetch(buildUrl(binary), { method: 'HEAD' }))); + const responseStatuses = responses.map((r) => r.status); + return responseStatuses.every((s) => s === 200); +}; + +const s3Binaries = ['amplify-pkg-linux-arm64.tgz', 'amplify-pkg-linux-x64.tgz', 'amplify-pkg-macos-x64.tgz', 'amplify-pkg-win-x64.tgz']; +const existsInS3 = async (version: string): Promise => { + const buildUrl = (binary: string) => `https://package.cli.amplify.aws/${version}/${binary}`; + const responses = await Promise.all(s3Binaries.map((b) => fetch(buildUrl(b)))); + const responseStatuses = responses.map((r) => r.status); + return responseStatuses.every((s) => s === 200); +}; + +const main = async () => { + const { version, excludeGithub } = await parseArgs(); + console.log(`#### Verifying version ${version} deployed correctly ####`); + const isGitHubSatisfied = excludeGithub || (await existsInGitHub(version)); + if (!isGitHubSatisfied) { + console.error('Release not found in GitHub'); + process.exit(1); + } + if (!existsInNpm(version)) { + console.error('Release not found in NPM'); + process.exit(1); + } + if (!(await existsInS3(version))) { + console.error('Release not found in S3'); + process.exit(1); + } + process.exit(0); +}; + +main(); diff --git a/scripts/wait-for-all-codebuild.ts b/scripts/wait-for-all-codebuild.ts index 910fd9e6ea1..ea104cc67c5 100644 --- a/scripts/wait-for-all-codebuild.ts +++ b/scripts/wait-for-all-codebuild.ts @@ -24,13 +24,42 @@ const getIncompleteJobIdsFromBatchId = async (cb: CodeBuild, batchId: string): P return ids ?? []; }; +const getFailedJobIdsFromBatchId = async (cb: CodeBuild, batchId: string): Promise => { + const retrievedBatchInfo = await cb.batchGetBuildBatches({ ids: [batchId] }).promise(); + const ids = retrievedBatchInfo.buildBatches?.[0].buildGroups + ?.filter( + (group) => + group.currentBuildSummary?.buildStatus === 'FAILED' || + group.currentBuildSummary?.buildStatus === 'FAULT' || + group.currentBuildSummary?.buildStatus === 'STOPPED' || + group.currentBuildSummary?.buildStatus === 'TIMED_OUT', + ) + .map((group) => group.identifier ?? ''); + return ids ?? []; +}; + const main = async () => { - const cb = new CodeBuild({ region: 'us-east-1' }); + const cb = new CodeBuild({ + region: 'us-east-1', + maxRetries: 10, + retryDelayOptions: { + base: 10 * 1000, + }, + }); const expectedSourceVersion = process.argv[2]; - const jobsDependedOnFilepath = process.argv[3]; + const jobsDependedOnFilepathOrId = process.argv[3]; const codeBuildProjectName = process.argv[4]; - const jobsDependedOnRaw = fs.readFileSync(jobsDependedOnFilepath, 'utf8'); - const jobsDependedOn = JSON.parse(jobsDependedOnRaw); + const codebuildWebhookTrigger = process.argv[5]; + const accountForFailures: boolean = process.argv.length >= 7 && process.argv[6] === 'requirePrevJobsToSucceed'; + + let jobsDependedOn: string[]; + if (fs.existsSync(jobsDependedOnFilepathOrId)) { + const jobsDependedOnRaw = fs.readFileSync(jobsDependedOnFilepathOrId, 'utf8'); + jobsDependedOn = JSON.parse(jobsDependedOnRaw); + } else { + jobsDependedOn = [jobsDependedOnFilepathOrId]; + } + console.log(`accountForFailures: ${accountForFailures}`); console.log(`Depending on these jobs: ${JSON.stringify(jobsDependedOn)}`); console.log(`Number of jobs depended on: ${jobsDependedOn.length}`); const allBatchBuildIds = await getBatchesInProject(cb, codeBuildProjectName); @@ -52,6 +81,19 @@ const main = async () => { let intersectingIncompleteJobs: string[]; do { await new Promise((resolve) => setTimeout(resolve, 180 * 1000)); // sleep for 180 seconds + const failedJobsInBatch = await getFailedJobIdsFromBatchId(cb, batchId); + const intersectingFailedJobs = failedJobsInBatch.filter((jobId) => jobsDependedOn.includes(jobId)); + const batchFailed = failedJobsInBatch.length || intersectingFailedJobs.length; + console.log(`Batch triggered by ${codebuildWebhookTrigger} ${batchFailed ? 'failed' : 'succeeded'}.`); + + if (accountForFailures) { + console.log(`failedJobsInBatch: ${JSON.stringify(failedJobsInBatch)}`); + console.log(`intersectingFailedJobs: ${JSON.stringify(intersectingFailedJobs)}`); + if (intersectingFailedJobs.length > 0) { + console.log(`${jobsDependedOn[0]} failed. Exiting.`); + process.exit(1); + } + } const incompleteJobsInBatch = await getIncompleteJobIdsFromBatchId(cb, batchId); console.log(`These are all of the incomplete jobs in the batch: ${JSON.stringify(incompleteJobsInBatch)}`); intersectingIncompleteJobs = incompleteJobsInBatch.filter((jobId) => jobsDependedOn.includes(jobId)); diff --git a/scripts/yarn.lock b/scripts/yarn.lock index 032425efab9..d90dfd327ef 100644 --- a/scripts/yarn.lock +++ b/scripts/yarn.lock @@ -155,12 +155,21 @@ __metadata: languageName: node linkType: hard -"axios@npm:^0.26.0": - version: 0.26.1 - resolution: "axios@npm:0.26.1" +"asynckit@npm:^0.4.0": + version: 0.4.0 + resolution: "asynckit@npm:0.4.0" + checksum: d73e2ddf20c4eb9337e1b3df1a0f6159481050a5de457c55b14ea2e5cb6d90bb69e004c9af54737a5ee0917fcf2c9e25de67777bbe58261847846066ba75bc9d + languageName: node + linkType: hard + +"axios@npm:^1.6.7": + version: 1.7.4 + resolution: "axios@npm:1.7.4" dependencies: - follow-redirects: ^1.14.8 - checksum: 77ad7f1e6ca04fcd3fa8af1795b09d8b7c005b71a31f28d99ba40cda0bdcc12a4627801d7fac5efa62b9f667a8402bd54c669039694373bc8d44f6be611f785c + follow-redirects: ^1.15.6 + form-data: ^4.0.0 + proxy-from-env: ^1.1.0 + checksum: 5ea1a93140ca1d49db25ef8e1bd8cfc59da6f9220159a944168860ad15a2743ea21c5df2967795acb15cbe81362f5b157fdebbea39d53117ca27658bab9f7f17 languageName: node linkType: hard @@ -181,6 +190,15 @@ __metadata: languageName: node linkType: hard +"combined-stream@npm:^1.0.8": + version: 1.0.8 + resolution: "combined-stream@npm:1.0.8" + dependencies: + delayed-stream: ~1.0.0 + checksum: 0dbb829577e1b1e839fa82b40c07ffaf7de8a09b935cadd355a73652ae70a88b4320db322f6634a4ad93424292fa80973ac6480986247f1734a1137debf271d5 + languageName: node + linkType: hard + "concat-map@npm:0.0.1": version: 0.0.1 resolution: "concat-map@npm:0.0.1" @@ -196,13 +214,20 @@ __metadata: linkType: hard "cross-spawn@npm:^7.0.3": - version: 7.0.3 - resolution: "cross-spawn@npm:7.0.3" + version: 7.0.6 + resolution: "cross-spawn@npm:7.0.6" dependencies: path-key: ^3.1.0 shebang-command: ^2.0.0 which: ^2.0.1 - checksum: 5738c312387081c98d69c98e105b6327b069197f864a60593245d64c8089c8a0a744e16349281210d56835bb9274130d825a78b2ad6853ca13cfbeffc0c31750 + checksum: 053ea8b2135caff68a9e81470e845613e374e7309a47731e81639de3eaeb90c3d01af0e0b44d2ab9d50b43467223b88567dfeb3262db942dc063b9976718ffc1 + languageName: node + linkType: hard + +"delayed-stream@npm:~1.0.0": + version: 1.0.0 + resolution: "delayed-stream@npm:1.0.0" + checksum: d758899da03392e6712f042bec80aa293bbe9e9ff1b2634baae6a360113e708b91326594c8a486d475c69d6259afb7efacdc3537bfcda1c6c648e390ce601b19 languageName: node linkType: hard @@ -240,13 +265,24 @@ __metadata: languageName: node linkType: hard -"follow-redirects@npm:^1.14.8": - version: 1.15.2 - resolution: "follow-redirects@npm:1.15.2" +"follow-redirects@npm:^1.15.6": + version: 1.15.6 + resolution: "follow-redirects@npm:1.15.6" peerDependenciesMeta: debug: optional: true - checksum: da5932b70e63944d38eecaa16954bac4347036f08303c913d166eda74809d8797d38386e3a0eb1d2fe37d2aaff2764cce8e9dbd99459d860cf2cdfa237923b5f + checksum: 9ff767f0d7be6aa6870c82ac79cf0368cd73e01bbc00e9eb1c2a16fbb198ec105e3c9b6628bb98e9f3ac66fe29a957b9645bcb9a490bb7aa0d35f908b6b85071 + languageName: node + linkType: hard + +"form-data@npm:^4.0.0": + version: 4.0.0 + resolution: "form-data@npm:4.0.0" + dependencies: + asynckit: ^0.4.0 + combined-stream: ^1.0.8 + mime-types: ^2.1.12 + checksum: cb6f3ac49180be03ff07ba3ff125f9eba2ff0b277fb33c7fc47569fc5e616882c5b1c69b9904c4c4187e97dd0419dd03b134174756f296dec62041e6527e2c6e languageName: node linkType: hard @@ -384,6 +420,22 @@ __metadata: languageName: node linkType: hard +"mime-db@npm:1.52.0": + version: 1.52.0 + resolution: "mime-db@npm:1.52.0" + checksum: 0557a01deebf45ac5f5777fe7740b2a5c309c6d62d40ceab4e23da9f821899ce7a900b7ac8157d4548ddbb7beffe9abc621250e6d182b0397ec7f10c7b91a5aa + languageName: node + linkType: hard + +"mime-types@npm:^2.1.12": + version: 2.1.35 + resolution: "mime-types@npm:2.1.35" + dependencies: + mime-db: 1.52.0 + checksum: 82fb07ec56d8ff1fc999a84f2f217aa46cb6ed1033fefaabd5785b9a974ed225c90dc72fff460259e66b95b73648596dbcc50d51ed69cdf464af2d237d3149b2 + languageName: node + linkType: hard + "mimic-fn@npm:^2.1.0": version: 2.1.0 resolution: "mimic-fn@npm:2.1.0" @@ -441,6 +493,13 @@ __metadata: languageName: node linkType: hard +"proxy-from-env@npm:^1.1.0": + version: 1.1.0 + resolution: "proxy-from-env@npm:1.1.0" + checksum: fe7dd8b1bdbbbea18d1459107729c3e4a2243ca870d26d34c2c1bcd3e4425b7bcc5112362df2d93cc7fb9746f6142b5e272fd1cc5c86ddf8580175186f6ad42b + languageName: node + linkType: hard + "scripts@workspace:.": version: 0.0.0-use.local resolution: "scripts@workspace:." @@ -450,7 +509,7 @@ __metadata: "@types/js-yaml": ^4.0.4 "@types/node": ^16.11.5 "@yarnpkg/parsers": ^3.0.0-rc.44 - axios: ^0.26.0 + axios: ^1.6.7 execa: ^5.1.1 fs-extra: ^10.0.0 glob: ^7.2.0 diff --git a/shared-scripts.sh b/shared-scripts.sh index 0b075f395df..77b63ba8448 100644 --- a/shared-scripts.sh +++ b/shared-scripts.sh @@ -40,7 +40,7 @@ function loadCache { # create directory if it doesn't exist yet mkdir -p $localPath # check if cache exists in s3 - if ! aws s3 ls $s3Path > /dev/null; then + if ! aws s3 ls $s3Path >/dev/null; then echo "Cache not found." exit 0 fi @@ -57,7 +57,7 @@ function loadCacheFile { s3Path="s3://$CACHE_BUCKET_NAME/$CODEBUILD_SOURCE_VERSION/$alias" echo loading cache file from $s3Path # check if cache file exists in s3 - if ! aws s3 ls $s3Path > /dev/null; then + if ! aws s3 ls $s3Path >/dev/null; then echo "Cache file not found." exit 0 fi @@ -82,14 +82,21 @@ function _loadTestAccountCredentials { export AWS_SESSION_TOKEN=$(echo $creds | jq -c -r ".Credentials.SessionToken") } - - +# Installs and caches dependencies +# Use this in workflows that do not require building from CLI sources +function _installAndCacheDependencies { + echo Install Dependencies + yarn --immutable + storeCache $CODEBUILD_SRC_DIR repo + storeCache $HOME/.cache .cache +} function _buildLinux { echo Linux Build yarn --immutable yarn production-build yarn build-tests + ./.circleci/cb-publish-step-1-set-versions.sh storeCache $CODEBUILD_SRC_DIR repo storeCache $HOME/.cache .cache } @@ -103,6 +110,17 @@ function _testLinux { # echo collecting coverage # yarn coverage } +function _validateRollbackTargetVersion { + echo Validate Rollback Target Version + # download [repo, .cache from s3] + loadCache repo $CODEBUILD_SRC_DIR + loadCache .cache $HOME/.cache + if [ -z "$ROLLBACK_TARGET_VERSION" ]; then + echo "Rollback target version is missing. Make sure CodeBuild workflow was started with ROLLBACK_TARGET_VERSION environment variable" + exit 1 + fi + yarn ts-node scripts/verify-deployment.ts -v $ROLLBACK_TARGET_VERSION +} function _validateCDKVersion { echo Validate CDK Version # download [repo, .cache from s3] @@ -116,6 +134,8 @@ function _lint { loadCache repo $CODEBUILD_SRC_DIR loadCache .cache $HOME/.cache + export NODE_OPTIONS=--max-old-space-size=8096 + yarn lint-check yarn lint-check-package-json yarn prettier-check @@ -125,8 +145,42 @@ function _verifyAPIExtract { # download [repo, .cache from s3] loadCache repo $CODEBUILD_SRC_DIR loadCache .cache $HOME/.cache + unset IS_AMPLIFY_CI yarn verify-api-extract } +function _verifyGeneratedE2EWorkflow { + echo "Verify Generated E2E Workflow" + # download [repo, .cache from s3] + loadCache repo $CODEBUILD_SRC_DIR + loadCache .cache $HOME/.cache + + # backup current file and remove regions, they are not deterministic + cat codebuild_specs/e2e_workflow_generated.yml | grep -v "CLI_REGION:" >codebuild_specs/e2e_workflow_generated.yml.old.trimmed + + # regenerate e2e workflow + yarn split-e2e-tests-codebuild + + # remove regions from generated file, they are not deterministic + cat codebuild_specs/e2e_workflow_generated.yml | grep -v "CLI_REGION:" >codebuild_specs/e2e_workflow_generated.yml.trimmed + + changed_lines_in_e2e_workflow_generated=$(diff codebuild_specs/e2e_workflow_generated.yml.old.trimmed codebuild_specs/e2e_workflow_generated.yml.trimmed | wc -l) + + if [[ changed_lines_in_e2e_workflow_generated -gt 0 ]]; then + echo "Fail! An uncommitted drift in E2E workflow has been detected - e2e_workflow_generated.yml. Please run 'yarn split-e2e-tests-codebuild' and commit the result." + diff codebuild_specs/e2e_workflow_generated.yml.old.trimmed codebuild_specs/e2e_workflow_generated.yml.trimmed + exit 1 + fi + + # check if wait_for_ids.json changed. + changed_wait_for_ids_manifest=$(git status | grep -F wait_for_ids.json | wc -l) + + if [[ changed_wait_for_ids_manifest -gt 0 ]]; then + echo "Fail! An uncommitted drift in E2E workflow has been detected - wait_for_ids.json. Please run 'yarn split-e2e-tests-codebuild' and commit the result." + exit 1 + fi + + echo "Success! No drift detected in E2E workflow." +} function _verifyYarnLock { echo "Verify Yarn Lock" # download [repo, .cache from s3] @@ -140,8 +194,8 @@ function _verifyVersionsMatch { loadCache repo $CODEBUILD_SRC_DIR loadCache .cache $HOME/.cache loadCache verdaccio-cache $CODEBUILD_SRC_DIR/../verdaccio-cache - - source .circleci/local_publish_helpers.sh && startLocalRegistry "$CODEBUILD_SRC_DIR/.circleci/verdaccio.yaml" + + source .circleci/local_publish_helpers_codebuild.sh && startLocalRegistry "$CODEBUILD_SRC_DIR/.circleci/verdaccio.yaml" setNpmRegistryUrlToLocal changeNpmGlobalPath checkPackageVersionsInLocalNpmRegistry @@ -151,9 +205,12 @@ function _mockE2ETests { loadCache repo $CODEBUILD_SRC_DIR loadCache .cache $HOME/.cache - source .circleci/local_publish_helpers.sh + # make repo directory accessible to codebuild-user + chown -R codebuild-user . + source .circleci/local_publish_helpers_codebuild.sh cd packages/amplify-util-mock/ - yarn e2e + # run mock e2e tests as codebuild-user, root can't run open search + sudo -u codebuild-user bash -c 'export NODE_OPTIONS=--max-old-space-size=4096 && yarn e2e' } function _publishToLocalRegistry { echo "Publish To Local Registry" @@ -161,23 +218,22 @@ function _publishToLocalRegistry { loadCache repo $CODEBUILD_SRC_DIR loadCache .cache $HOME/.cache - source ./.circleci/local_publish_helpers.sh && startLocalRegistry "$CODEBUILD_SRC_DIR/.circleci/verdaccio.yaml" + source ./.circleci/local_publish_helpers_codebuild.sh && startLocalRegistry "$CODEBUILD_SRC_DIR/.circleci/verdaccio.yaml" setNpmRegistryUrlToLocal - export LOCAL_PUBLISH_TO_LATEST=true - ./.circleci/publish-codebuild.sh + ./.circleci/cb-publish-step-2-verdaccio.sh unsetNpmRegistryUrl echo Generate Change Log # Leaving this breadcrumb here "git reset --soft HEAD~1" - # we commented this out because the publish script is now checking out the current branch, and this started to fail as a result + # we commented this out previously because the publish script is now checking out the current branch, and this started to fail as a result # if we run into problems in the future, we should revisit this - # git reset --soft HEAD~1 + git reset --soft HEAD~1 yarn ts-node scripts/unified-changelog.ts cat UNIFIED_CHANGELOG.md - + echo Save new amplify Github tag - node scripts/echo-current-cli-version.js > .amplify-pkg-version - + node scripts/echo-current-cli-version.js >.amplify-pkg-version + echo LS HOME ls $CODEBUILD_SRC_DIR/.. @@ -202,8 +258,8 @@ function _uploadPkgBinaries { echo Done loading binaries ls $CODEBUILD_SRC_DIR/out - # source .circleci/local_publish_helpers.sh - # uploadPkgCli + source .circleci/local_publish_helpers_codebuild.sh + uploadPkgCliCodeBuild storeCache $CODEBUILD_SRC_DIR/out all-binaries } @@ -218,7 +274,7 @@ function _buildBinaries { loadCacheFile .amplify-pkg-version $CODEBUILD_SRC_DIR/.amplify-pkg-version loadCacheFile UNIFIED_CHANGELOG.md $CODEBUILD_SRC_DIR/UNIFIED_CHANGELOG.md - source .circleci/local_publish_helpers.sh + source .circleci/local_publish_helpers_codebuild.sh startLocalRegistry "$CODEBUILD_SRC_DIR/.circleci/verdaccio.yaml" setNpmRegistryUrlToLocal generatePkgCli $binaryType @@ -232,13 +288,13 @@ function _install_packaged_cli_linux { cd $CODEBUILD_SRC_DIR/out ln -sf amplify-pkg-linux-x64 amplify - export PATH=$AMPLIFY_DIR:$PATH + export PATH=$AMPLIFY_DIR:$PATH:$CODEBUILD_SRC_DIR/node_modules/.bin/ cd $CODEBUILD_SRC_DIR } function _convertCoverage { echo Convert Coverage - - source .circleci/local_publish_helpers.sh && startLocalRegistry "$CODEBUILD_SRC_DIR/.circleci/verdaccio.yaml" + + source .circleci/local_publish_helpers_codebuild.sh && startLocalRegistry "$CODEBUILD_SRC_DIR/.circleci/verdaccio.yaml" setNpmRegistryUrlToLocal changeNpmGlobalPath @@ -251,8 +307,7 @@ function _convertCoverage { } # https://docs.codecov.com/docs/codecov-uploader#integrity-checking-the-uploader function _uploadCoverageLinux { - if [ -z ${CODECOV_TOKEN+x} ] - then + if [ -z ${CODECOV_TOKEN+x} ]; then echo "CODECOV_TOKEN not set: No coverage will be uploaded." else curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import # One-time step @@ -263,9 +318,10 @@ function _uploadCoverageLinux { shasum -a 256 -c codecov.SHA256SUM chmod +x codecov - ./codecov -t ${CODECOV_TOKEN} + ./codecov -t ${CODECOV_TOKEN} fi } + # END COVERAGE FUNCTIONS function _loadE2ECache { loadCache repo $CODEBUILD_SRC_DIR @@ -280,9 +336,13 @@ function _runE2ETestsLinux { echo RUN E2E Tests Linux _loadE2ECache _install_packaged_cli_linux + # select region + export CLI_REGION=$(yarn ts-node ./scripts/select-region-for-e2e-test.ts) + echo "Test will run in $CLI_REGION" # verify installation + which amplify amplify version - source .circleci/local_publish_helpers.sh && startLocalRegistry "$CODEBUILD_SRC_DIR/.circleci/verdaccio.yaml" + source .circleci/local_publish_helpers_codebuild.sh && startLocalRegistry "$CODEBUILD_SRC_DIR/.circleci/verdaccio.yaml" setNpmRegistryUrlToLocal changeNpmGlobalPath amplify version @@ -296,10 +356,28 @@ function _unassumeTestAccountCredentials { unset AWS_SECRET_ACCESS_KEY unset AWS_SESSION_TOKEN } +function _runMigrationMultiEnvLayersTest { + echo RUN E2E Tests Linux + _loadE2ECache + source .circleci/local_publish_helpers_codebuild.sh + changeNpmGlobalPath + cd packages/amplify-migration-tests + _loadTestAccountCredentials + retry yarn migration_v4.52.0_multienv_layers --no-cache --maxWorkers=4 --forceExit $TEST_SUITE +} +function _runMigrationNonMultiEnvLayersTest { + echo RUN E2E Tests Linux + _loadE2ECache + source .circleci/local_publish_helpers_codebuild.sh + changeNpmGlobalPath + cd packages/amplify-migration-tests + _loadTestAccountCredentials + retry yarn migration_v4.28.2_nonmultienv_layers --no-cache --maxWorkers=4 --forceExit $TEST_SUITE +} function _runMigrationV8Test { echo RUN E2E Tests Linux _loadE2ECache - source .circleci/local_publish_helpers.sh + source .circleci/local_publish_helpers_codebuild.sh changeNpmGlobalPath cd packages/amplify-migration-tests unset IS_AMPLIFY_CI @@ -310,7 +388,7 @@ function _runMigrationV8Test { function _runMigrationV10Test { echo RUN E2E Tests Linux _loadE2ECache - source .circleci/local_publish_helpers.sh + source .circleci/local_publish_helpers_codebuild.sh changeNpmGlobalPath cd packages/amplify-migration-tests unset IS_AMPLIFY_CI @@ -318,6 +396,17 @@ function _runMigrationV10Test { _loadTestAccountCredentials retry yarn run migration_v10.5.1 --no-cache --maxWorkers=4 --forceExit $TEST_SUITE } +function _runMigrationV12Test { + echo RUN E2E Tests Linux + _loadE2ECache + source .circleci/local_publish_helpers_codebuild.sh + changeNpmGlobalPath + cd packages/amplify-migration-tests + unset IS_AMPLIFY_CI + echo $IS_AMPLIFY_CI + _loadTestAccountCredentials + retry yarn run migration_v12.0.3 --no-cache --maxWorkers=4 --forceExit $TEST_SUITE +} function _scanArtifacts { if ! yarn ts-node .circleci/scan_artifacts_codebuild.ts; then @@ -329,8 +418,8 @@ function _scanArtifacts { function _putCredsInProfile { mkdir -p ~/.aws - touch ~/.aws/config ~/.aws/credentials - python3 codebuild_specs/sh-files/aws-configure-credentials.py + touch ~/.aws/config ~/.aws/credentials + ts-node scripts/aws-configure-credentials.ts } function _installIntegTestsDependencies { @@ -346,7 +435,7 @@ function _integTestAmplifyInit { export REACTCONFIG="{\"SourceDir\":\"src\",\"DistributionDir\":\"build\",\"BuildCommand\":\"npm run-script build\",\"StartCommand\":\"npm run-script start\"}" export FRONTEND="{\"frontend\":\"javascript\",\"framework\":\"react\",\"config\":$REACTCONFIG}" export AMPLIFY_INIT_CONFIG="{\"projectName\":\"unauth\",\"envName\":\"integtest\",\"defaultEditor\":\"code\"}" - export PROVIDERS="{\"awscloudformation\":$AWSCLOUDFORMATIONCONFIG}" + export PROVIDERS="{\"awscloudformation\":$AWSCLOUDFORMATIONCONFIG}" amplify-dev init --amplify $AMPLIFY_INIT_CONFIG --frontend $FRONTEND --providers $PROVIDERS --yes } @@ -390,7 +479,50 @@ function _runIntegApiTests { yarn cypress run --spec $(find . -type f -name 'api_spec*') } +function _amplifySudoInstallTestSetup { + loadCache repo $CODEBUILD_SRC_DIR + loadCache verdaccio-cache $CODEBUILD_SRC_DIR/../verdaccio-cache + loadCache all-binaries $CODEBUILD_SRC_DIR/out + source .circleci/local_publish_helpers_codebuild.sh && startLocalRegistry "$CODEBUILD_SRC_DIR/.circleci/verdaccio.yaml" + setSudoNpmRegistryUrlToLocal + changeSudoNpmGlobalPath + # sudo npm install -g @aws-amplify/cli + # unsetSudoNpmRegistryUrl + # amplify version +} +function _amplifyInstallTestSetup { + loadCache repo $CODEBUILD_SRC_DIR + loadCache verdaccio-cache $CODEBUILD_SRC_DIR/../verdaccio-cache + loadCache all-binaries $CODEBUILD_SRC_DIR/out + source .circleci/local_publish_helpers_codebuild.sh && startLocalRegistry "$CODEBUILD_SRC_DIR/.circleci/verdaccio.yaml" + setNpmRegistryUrlToLocal + changeNpmGlobalPath + # limit memory for new processes to 1GB + # this is to make sure that install can work on small VMs + # i.e. not buffer content in memory while installing binary + # ulimit -Sv 1000000 + # npm install -g @aws-amplify/cli + # unsetNpmRegistryUrl + # amplify version +} +function _amplifyConsoleIntegrationTests { + loadCache repo $CODEBUILD_SRC_DIR + loadCache verdaccio-cache $CODEBUILD_SRC_DIR/../verdaccio-cache + source .circleci/local_publish_helpers_codebuild.sh && startLocalRegistry "$CODEBUILD_SRC_DIR/.circleci/verdaccio.yaml" + setNpmRegistryUrlToLocal + changeNpmGlobalPath + npm install -g @aws-amplify/cli + npm install -g amplify-app + unsetNpmRegistryUrl + export PATH=$CODEBUILD_SRC_DIR/../.npm-global/bin:$PATH + amplify -v + cd packages/amplify-console-integration-tests + _loadTestAccountCredentials + retry yarn console-integration --no-cache --maxWorkers=4 --forceExit +} function _integrationTest { + npm install -g ts-node + echo "Restoring Cache" loadCache repo $CODEBUILD_SRC_DIR @@ -422,7 +554,7 @@ function _integrationTest { echo "Initializing new amplify project for auth" pwd _integTestAmplifyInit - + echo "Adding auth and pushing" _addAndPushAuth echo "end push" @@ -432,7 +564,8 @@ function _integrationTest { echo "running auth server in background" export NODE_OPTIONS=--openssl-legacy-provider - nohup yarn start > server_output.txt & disown $! + nohup yarn start >server_output.txt & + disown $! echo "Polling for server ready message" while ! grep -Fxq "You can now view aws-amplify-cypress-auth in the browser." server_output.txt; do echo "Waiting for server to start" && sleep 1; done echo "server started" @@ -452,7 +585,6 @@ function _integrationTest { expect ../amplify-cli/codebuild_specs/exp-files/delete.exp aws s3 rb "$DEPLOYMENT_BUCKET" --force - echo "Clone API test package" cd .. && pwd git clone $API_CLONE_URL @@ -473,7 +605,8 @@ function _integrationTest { echo "running api server in background" export NODE_OPTIONS=--openssl-legacy-provider - nohup yarn start > server_output.txt & disown $! + nohup yarn start >server_output.txt & + disown $! echo "Polling for server ready message" while ! grep -Fxq "You can now view aws-amplify-cypress-api in the browser." server_output.txt; do echo "Waiting for server to start" && sleep 1; done echo "server started" @@ -507,7 +640,7 @@ function _uploadReportsToS3 { source_version=$1 build_identifier=$2 test_package=$3 - reports_dir=$CODEBUILD_SRC_DIR/packages/$test_package/reports/junit + reports_dir=packages/$test_package/reports/junit cd $reports_dir for filename in $(ls); do aws s3 cp "$filename" "s3://$AGGREGATED_REPORTS_BUCKET_NAME/$source_version/$build_identifier-$filename"; done } @@ -522,3 +655,139 @@ function _downloadReportsFromS3 { aws s3 sync "s3://$AGGREGATED_REPORTS_BUCKET_NAME/$source_version" . for file in $(find . -mindepth 2 -type f); do mv $file ./$(dirname $file).xml; done #This line moves all files into the top level directory so that the reports can be consumed by CB } + +function _buildTestsStandalone { + echo "Running yarn install --immutable" + yarn install --immutable + echo "Running yarn build-tests" + yarn build-tests +} + +function _waitForJobs { + file_path=$1 + account_for_failures=$2 + echo "file_path" $file_path + cd ./scripts + npm install -g ts-node + npm install aws-sdk + ts-node ./wait-for-all-codebuild.ts $CODEBUILD_RESOLVED_SOURCE_VERSION $file_path $PROJECT_NAME ${CODEBUILD_WEBHOOK_TRIGGER:-empty} $account_for_failures + cd .. +} +function _verifyPkgCLI { + loadCache repo $CODEBUILD_SRC_DIR + loadCache repo-out-arm $CODEBUILD_SRC_DIR/out + loadCache repo-out-linux $CODEBUILD_SRC_DIR/out + loadCache repo-out-macos $CODEBUILD_SRC_DIR/out + loadCache repo-out-win $CODEBUILD_SRC_DIR/out + source .circleci/local_publish_helpers_codebuild.sh && verifyPkgCli +} +function _githubPrerelease { + loadCache repo $CODEBUILD_SRC_DIR + loadCache all-binaries $CODEBUILD_SRC_DIR/out + loadCacheFile .amplify-pkg-version $CODEBUILD_SRC_DIR/.amplify-pkg-version + loadCacheFile UNIFIED_CHANGELOG.md $CODEBUILD_SRC_DIR/UNIFIED_CHANGELOG.md + cd out + mv amplify-pkg-macos-x64 amplify-pkg-macos + mv amplify-pkg-linux-x64 amplify-pkg-linux + mv amplify-pkg-win-x64.exe amplify-pkg-win.exe + tar zcvf amplify-pkg-macos.tgz amplify-pkg-macos + tar zcvf amplify-pkg-linux.tgz amplify-pkg-linux + tar zcvf amplify-pkg-win.exe.tgz amplify-pkg-win.exe + cd $CODEBUILD_SRC_DIR + echo Publish Amplify CLI GitHub prerelease + commit=$(git rev-parse HEAD~1) + version=$(cat .amplify-pkg-version) + yarn ts-node scripts/github-prerelease.ts $version $commit +} +function _githubPrereleaseInstallSanityCheck { + loadCache repo $CODEBUILD_SRC_DIR + loadCacheFile .amplify-pkg-version $CODEBUILD_SRC_DIR/.amplify-pkg-version + echo Install packaged Amplify CLI + version=$(cat .amplify-pkg-version) + curl -sL https://aws-amplify.github.io/amplify-cli/install | version=v$version bash + export PATH=$PATH:$HOME/.amplify/bin + echo Sanity check install + amplify version +} +function _publishToNpm { + loadCache repo $CODEBUILD_SRC_DIR + loadCache all-binaries $CODEBUILD_SRC_DIR/out + + ./out/amplify-pkg-linux-x64 --version + echo Authenticate with npm + echo "//registry.npmjs.org/:_authToken=$NPM_PUBLISH_TOKEN" >~/.npmrc + + source ./.circleci/cb-publish-step-3-npm.sh +} +function _rollbackNpm { + loadCache repo $CODEBUILD_SRC_DIR + + if [ -z "$ROLLBACK_TARGET_VERSION" ]; then + echo "Rollback target version is missing. Make sure CodeBuild workflow was started with ROLLBACK_TARGET_VERSION environment variable" + exit 1 + fi + + echo Authenticate with npm + echo "//registry.npmjs.org/:_authToken=$NPM_PUBLISH_TOKEN" >~/.npmrc + + npm dist-tag add @aws-amplify/cli@$ROLLBACK_TARGET_VERSION "latest" +} +function _postPublishPushToGit { + loadCache repo $CODEBUILD_SRC_DIR + loadCache all-binaries $CODEBUILD_SRC_DIR/out + echo Push release commit and tags + source ./.circleci/cb-publish-step-4-push-to-git.sh +} +function _githubRelease { + loadCache repo $CODEBUILD_SRC_DIR + loadCache all-binaries $CODEBUILD_SRC_DIR/out + loadCacheFile .amplify-pkg-version $CODEBUILD_SRC_DIR/.amplify-pkg-version + echo Publish Amplify CLI GitHub release + commit=$(git rev-parse HEAD~1) + version=$(cat .amplify-pkg-version) + yarn ts-node scripts/github-release.ts $version $commit +} +function _githubRollback { + loadCache repo $CODEBUILD_SRC_DIR + echo Rollback Amplify CLI GitHub release + if [ -z "$ROLLBACK_TARGET_VERSION" ]; then + echo "Rollback target version is missing. Make sure CodeBuild workflow was started with ROLLBACK_TARGET_VERSION environment variable" + exit 1 + fi + yarn ts-node scripts/github-rollback.ts $ROLLBACK_TARGET_VERSION +} +function _amplifyGeneralConfigTests { + _loadE2ECache + _install_packaged_cli_linux + amplify version + source .circleci/local_publish_helpers_codebuild.sh && startLocalRegistry "$CODEBUILD_SRC_DIR/.circleci/verdaccio.yaml" + setNpmRegistryUrlToLocal + changeNpmGlobalPath + amplify version + cd packages/amplify-e2e-tests + _loadTestAccountCredentials + retry yarn general-config-e2e --no-cache --maxWorkers=3 --forceExit $TEST_SUITE +} + +function _cleanUpResources { + _loadTestAccountCredentials + echo "Executing resource cleanup" + cd packages/amplify-e2e-tests + yarn install + ts-node ./src/cleanup-codebuild-resources.ts + _unassumeTestAccountCredentials +} +function _deploymentVerificationPostRelease { + loadCache repo $CODEBUILD_SRC_DIR + loadCacheFile .amplify-pkg-version $CODEBUILD_SRC_DIR/.amplify-pkg-version + echo Verify Release Deployment + version=$(cat .amplify-pkg-version) + yarn ts-node scripts/verify-deployment.ts -v $version +} +function _deploymentVerificationRCOrTagged { + loadCache repo $CODEBUILD_SRC_DIR + loadCacheFile .amplify-pkg-version $CODEBUILD_SRC_DIR/.amplify-pkg-version + echo Verify Tagged or RC Deployment + version=$(cat .amplify-pkg-version) + yarn ts-node scripts/verify-deployment.ts --version $version --exclude-github +} diff --git a/tsconfig.tests.json b/tsconfig.tests.json new file mode 100644 index 00000000000..fdd51b94fac --- /dev/null +++ b/tsconfig.tests.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "outDir": "lib", + "rootDir": "./src", + "strict": false, + "lib": ["ESNext", "dom"] + }, + "exclude": [] +} diff --git a/yarn.lock b/yarn.lock index ce3fc5ec5c0..f13780f6380 100644 --- a/yarn.lock +++ b/yarn.lock @@ -66,14 +66,23 @@ __metadata: languageName: node linkType: hard -"@aws-amplify/amplify-app@5.0.8, @aws-amplify/amplify-app@workspace:packages/amplify-app": +"@ardatan/sync-fetch@npm:^0.0.1": + version: 0.0.1 + resolution: "@ardatan/sync-fetch@npm:0.0.1" + dependencies: + node-fetch: ^2.6.1 + checksum: cd69134005ef5ea570d55631c8be59b593e2dda2207f616d30618f948af6ee5d227b857aefd56c535e8f7f3ade47083e4e7795b5ee014a6732011c6e5f9eb08f + languageName: node + linkType: hard + +"@aws-amplify/amplify-app@5.0.38, @aws-amplify/amplify-app@workspace:packages/amplify-app": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-app@workspace:packages/amplify-app" dependencies: - "@aws-amplify/amplify-frontend-android": 3.5.4 - "@aws-amplify/amplify-frontend-flutter": 1.4.2 - "@aws-amplify/amplify-frontend-ios": 3.6.10 - "@aws-amplify/amplify-frontend-javascript": 3.9.8 + "@aws-amplify/amplify-frontend-android": 3.5.8 + "@aws-amplify/amplify-frontend-flutter": 1.4.7 + "@aws-amplify/amplify-frontend-ios": 3.7.9 + "@aws-amplify/amplify-frontend-javascript": 3.10.19 "@types/glob": ^7.1.1 chalk: ^4.1.1 execa: ^5.1.1 @@ -83,7 +92,7 @@ __metadata: node-emoji: ^1.10.0 ora: ^4.0.3 rimraf: ^3.0.0 - semver: ^7.3.5 + semver: ^7.5.4 xcode: ^2.1.0 yargs: ^15.1.0 bin: @@ -91,32 +100,31 @@ __metadata: languageName: unknown linkType: soft -"@aws-amplify/amplify-appsync-simulator@2.12.3, @aws-amplify/amplify-appsync-simulator@workspace:packages/amplify-appsync-simulator": +"@aws-amplify/amplify-appsync-simulator@2.16.9, @aws-amplify/amplify-appsync-simulator@workspace:packages/amplify-appsync-simulator": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-appsync-simulator@workspace:packages/amplify-appsync-simulator" dependencies: - "@aws-amplify/amplify-cli-core": 4.0.8 - "@aws-amplify/amplify-graphiql-explorer": 2.5.7 - "@aws-amplify/amplify-prompts": 2.7.0 + "@aws-amplify/amplify-cli-core": 4.3.11 + "@aws-amplify/amplify-graphiql-explorer": 2.6.0 + "@aws-amplify/amplify-prompts": 2.8.6 "@graphql-tools/schema": ^8.3.1 "@graphql-tools/utils": ^8.5.1 "@types/cors": ^2.8.6 "@types/express": ^4.17.3 "@types/node": ^12.12.6 "@types/ws": ^8.2.2 - amplify-velocity-template: 1.4.11 - aws-sdk: ^2.1354.0 + amplify-velocity-template: 1.4.15 + aws-sdk: ^2.1464.0 chalk: ^4.1.1 cors: ^2.8.5 dataloader: ^2.0.0 - express: ^4.17.3 + express: ^4.21.2 get-port: ^5.1.1 graphql: ^15.5.0 graphql-iso-date: ^3.6.1 graphql-subscriptions: ^1.1.0 - ip: ^1.1.5 + jose: ^5.2.0 js-string-escape: ^1.0.1 - jsonwebtoken: ^9.0.0 jwt-decode: ^2.2.0 libphonenumber-js: 1.9.47 lodash: ^4.17.21 @@ -131,94 +139,91 @@ __metadata: languageName: unknown linkType: soft -"@aws-amplify/amplify-category-analytics@5.0.10, @aws-amplify/amplify-category-analytics@workspace:packages/amplify-category-analytics": +"@aws-amplify/amplify-category-analytics@5.0.37, @aws-amplify/amplify-category-analytics@workspace:packages/amplify-category-analytics": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-category-analytics@workspace:packages/amplify-category-analytics" dependencies: - "@aws-amplify/amplify-cli-core": 4.0.8 - "@aws-amplify/amplify-environment-parameters": 1.6.3 - "@aws-amplify/amplify-prompts": 2.7.0 + "@aws-amplify/amplify-cli-core": 4.3.11 + "@aws-amplify/amplify-environment-parameters": 1.9.16 + "@aws-amplify/amplify-prompts": 2.8.6 fs-extra: ^8.1.0 uuid: ^8.3.2 languageName: unknown linkType: soft -"@aws-amplify/amplify-category-api@npm:^5.4.1": - version: 5.4.1 - resolution: "@aws-amplify/amplify-category-api@npm:5.4.1" - dependencies: - "@aws-amplify/graphql-auth-transformer": 2.1.6 - "@aws-amplify/graphql-default-value-transformer": 1.1.6 - "@aws-amplify/graphql-function-transformer": 1.2.4 - "@aws-amplify/graphql-http-transformer": 1.2.4 - "@aws-amplify/graphql-index-transformer": 1.2.2 - "@aws-amplify/graphql-maps-to-transformer": 2.1.6 - "@aws-amplify/graphql-model-transformer": 1.3.2 - "@aws-amplify/graphql-predictions-transformer": 1.2.4 - "@aws-amplify/graphql-relational-transformer": 1.2.2 - "@aws-amplify/graphql-schema-generator": 0.1.2 - "@aws-amplify/graphql-searchable-transformer": 1.2.4 - "@aws-amplify/graphql-transformer-core": 1.3.2 - "@aws-amplify/graphql-transformer-interfaces": 2.2.1 - "@aws-amplify/graphql-transformer-migrator": 2.1.6 - "@aws-cdk/aws-apigatewayv2-alpha": ~2.68.0-alpha.0 +"@aws-amplify/amplify-category-api@npm:^5.12.10": + version: 5.12.10 + resolution: "@aws-amplify/amplify-category-api@npm:5.12.10" + dependencies: + "@aws-amplify/graphql-auth-transformer": 3.6.8 + "@aws-amplify/graphql-schema-generator": ^0.9.4 + "@aws-amplify/graphql-transformer": 1.6.8 + "@aws-amplify/graphql-transformer-core": 2.9.4 + "@aws-amplify/graphql-transformer-interfaces": 3.10.2 + "@aws-amplify/graphql-transformer-migrator": 2.2.28 + "@aws-cdk/aws-apigatewayv2-alpha": ~2.114.1-alpha.0 + "@aws-sdk/client-ec2": 3.624.0 + "@aws-sdk/client-iam": 3.624.0 + "@aws-sdk/client-lambda": 3.624.0 "@graphql-tools/merge": ^6.0.18 "@octokit/rest": ^18.0.9 - aws-cdk-lib: ~2.68.0 aws-sdk: ^2.1113.0 chalk: ^4.1.1 cloudform-types: ^4.2.0 - constructs: ^10.0.5 fs-extra: ^8.1.0 graphql: ^15.5.0 - graphql-auth-transformer: 7.2.56 - graphql-connection-transformer: 5.2.55 - graphql-dynamodb-transformer: 7.2.55 - graphql-elasticsearch-transformer: 5.2.56 - graphql-function-transformer: 3.3.46 - graphql-http-transformer: 5.2.55 - graphql-key-transformer: 3.2.55 - graphql-predictions-transformer: 3.2.55 - graphql-relational-schema-transformer: 2.21.18 - graphql-transformer-common: 4.24.6 - graphql-transformer-core: 8.1.2 - graphql-versioned-transformer: 5.2.55 + graphql-auth-transformer: 7.2.82 + graphql-connection-transformer: 5.2.80 + graphql-dynamodb-transformer: 7.2.80 + graphql-elasticsearch-transformer: 5.2.81 + graphql-function-transformer: 3.3.71 + graphql-http-transformer: 5.2.80 + graphql-key-transformer: 3.2.80 + graphql-predictions-transformer: 3.2.80 + graphql-relational-schema-transformer: 2.21.34 + graphql-transformer-common: 4.31.1 + graphql-transformer-core: 8.2.13 + graphql-versioned-transformer: 5.2.80 import-from: ^3.0.0 import-global: ^0.1.0 inquirer: ^7.3.3 js-yaml: ^4.0.0 lodash: ^4.17.21 + node-fetch: ^2.6.7 ora: ^4.0.3 rimraf: ^3.0.0 uuid: ^8.3.2 peerDependencies: - "@aws-amplify/amplify-cli-core": 4.0.4 - "@aws-amplify/amplify-environment-parameters": ^1.5.0 - "@aws-amplify/amplify-prompts": ^2.6.8 - "@aws-amplify/amplify-provider-awscloudformation": ^8.1.0 - amplify-headless-interface: ^1.17.3 - amplify-util-headless-input: ^1.9.12 - checksum: b9a8becd4bb84f7fbfbc6a26d2ef0f13c6a19313fc655c11ab3b15f4e138b90d69e06642a6359fdbeb64fa3272e75de57b7859047080da7810838028bc79653b + "@aws-amplify/amplify-cli-core": ^4.3.9 + "@aws-amplify/amplify-environment-parameters": ^1.9.14 + "@aws-amplify/amplify-prompts": ^2.8.6 + "@aws-amplify/amplify-provider-awscloudformation": ^8.10.11 + amplify-headless-interface: ^1.17.7 + amplify-util-headless-input: ^1.9.18 + aws-cdk-lib: ^2.129.0 + constructs: ^10.3.0 + checksum: a89922ec94eb43e439de640cb1ce45f7d19fa0c786f18dc552ef0d4ccb3fb9795b6e188741434f61402a3021774f5d36242084257ee7b2a042458c1e65253ad4 languageName: node linkType: hard -"@aws-amplify/amplify-category-auth@3.2.3, @aws-amplify/amplify-category-auth@workspace:packages/amplify-category-auth": +"@aws-amplify/amplify-category-auth@3.7.17, @aws-amplify/amplify-category-auth@workspace:packages/amplify-category-auth": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-category-auth@workspace:packages/amplify-category-auth" dependencies: - "@aws-amplify/amplify-cli-core": 4.0.8 - "@aws-amplify/amplify-environment-parameters": 1.6.3 - "@aws-amplify/amplify-function-plugin-interface": 1.10.2 - "@aws-amplify/amplify-prompts": 2.7.0 - "@aws-amplify/amplify-util-import": 2.6.0 - "@aws-amplify/cli-extensibility-helper": 3.0.8 - "@aws-sdk/client-cognito-identity-provider": ^3.303.0 + "@aws-amplify/amplify-cli-core": 4.3.11 + "@aws-amplify/amplify-environment-parameters": 1.9.16 + "@aws-amplify/amplify-function-plugin-interface": 1.12.1 + "@aws-amplify/amplify-prompts": 2.8.6 + "@aws-amplify/amplify-util-import": 2.8.3 + "@aws-amplify/cli-extensibility-helper": 3.0.35 + "@aws-sdk/client-cognito-identity-provider": 3.624.0 + "@aws-sdk/client-iam": 3.624.0 "@types/mime-types": ^2.1.1 - amplify-headless-interface: 1.17.3 - amplify-util-headless-input: 1.9.12 - aws-cdk-lib: ~2.68.0 - aws-sdk: ^2.1354.0 - axios: ^0.26.0 + amplify-headless-interface: 1.17.7 + amplify-util-headless-input: 1.9.18 + aws-cdk-lib: ~2.177.0 + aws-sdk: ^2.1464.0 + axios: ^1.6.7 chalk: ^4.1.1 change-case: ^4.1.1 cloudform-types: ^4.2.0 @@ -233,47 +238,48 @@ __metadata: promise-sequential: ^1.1.1 rimraf: ^3.0.2 uuid: ^8.3.2 - vm2: ^3.9.19 languageName: unknown linkType: soft -"@aws-amplify/amplify-category-custom@3.0.8, @aws-amplify/amplify-category-custom@workspace:packages/amplify-category-custom": +"@aws-amplify/amplify-category-custom@3.1.25, @aws-amplify/amplify-category-custom@workspace:packages/amplify-category-custom": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-category-custom@workspace:packages/amplify-category-custom" dependencies: - "@aws-amplify/amplify-cli-core": 4.0.8 - "@aws-amplify/amplify-prompts": 2.7.0 + "@aws-amplify/amplify-cli-core": 4.3.11 + "@aws-amplify/amplify-prompts": 2.8.6 "@types/lodash": ^4.14.149 - aws-cdk-lib: ~2.68.0 + aws-cdk-lib: ~2.177.0 execa: ^5.1.1 fs-extra: ^8.1.0 glob: ^7.2.0 + jest: ^29.5.0 ora: ^4.0.3 rimraf: ^3.0.2 uuid: ^8.3.2 languageName: unknown linkType: soft -"@aws-amplify/amplify-category-function@5.3.3, @aws-amplify/amplify-category-function@workspace:packages/amplify-category-function": +"@aws-amplify/amplify-category-function@5.7.11, @aws-amplify/amplify-category-function@workspace:packages/amplify-category-function": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-category-function@workspace:packages/amplify-category-function" dependencies: - "@aws-amplify/amplify-cli-core": 4.0.8 - "@aws-amplify/amplify-environment-parameters": 1.6.3 - "@aws-amplify/amplify-function-plugin-interface": 1.10.2 - "@aws-amplify/amplify-prompts": 2.7.0 + "@aws-amplify/amplify-cli-core": 4.3.11 + "@aws-amplify/amplify-environment-parameters": 1.9.16 + "@aws-amplify/amplify-function-plugin-interface": 1.12.1 + "@aws-amplify/amplify-prompts": 2.8.6 "@types/folder-hash": ^4.0.1 archiver: ^5.3.0 - aws-sdk: ^2.1354.0 + aws-sdk: ^2.1464.0 chalk: ^4.1.1 cloudform-types: ^4.2.0 enquirer: ^2.3.6 folder-hash: ^4.0.2 fs-extra: ^8.1.0 globby: ^11.0.3 - graphql-transformer-core: ^8.1.2 + graphql-transformer-core: ^8.2.13 inquirer: ^7.3.3 inquirer-datepicker: ^2.0.0 + jest: ^29.5.0 jstreemap: ^1.28.2 lodash: ^4.17.21 promise-sequential: ^1.1.1 @@ -281,18 +287,18 @@ __metadata: languageName: unknown linkType: soft -"@aws-amplify/amplify-category-geo@3.2.3, @aws-amplify/amplify-category-geo@workspace:packages/amplify-category-geo": +"@aws-amplify/amplify-category-geo@3.5.17, @aws-amplify/amplify-category-geo@workspace:packages/amplify-category-geo": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-category-geo@workspace:packages/amplify-category-geo" dependencies: - "@aws-amplify/amplify-cli-core": 4.0.8 - "@aws-amplify/amplify-prompts": 2.7.0 - "@aws-sdk/client-location": ^3.303.0 + "@aws-amplify/amplify-cli-core": 4.3.11 + "@aws-amplify/amplify-prompts": 2.8.6 + "@aws-sdk/client-location": 3.624.0 ajv: ^6.12.6 - amplify-headless-interface: 1.17.3 - amplify-util-headless-input: 1.9.12 - aws-cdk-lib: ~2.68.0 - aws-sdk: ^2.1354.0 + amplify-headless-interface: 1.17.7 + amplify-util-headless-input: 1.9.18 + aws-cdk-lib: ~2.177.0 + aws-sdk: ^2.1464.0 constructs: ^10.0.5 fs-extra: ^8.1.0 lodash: ^4.17.21 @@ -300,12 +306,12 @@ __metadata: languageName: unknown linkType: soft -"@aws-amplify/amplify-category-hosting@3.5.11, @aws-amplify/amplify-category-hosting@workspace:packages/amplify-category-hosting": +"@aws-amplify/amplify-category-hosting@3.5.38, @aws-amplify/amplify-category-hosting@workspace:packages/amplify-category-hosting": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-category-hosting@workspace:packages/amplify-category-hosting" dependencies: - "@aws-amplify/amplify-cli-core": 4.0.8 - "@aws-amplify/amplify-prompts": 2.7.0 + "@aws-amplify/amplify-cli-core": 4.3.11 + "@aws-amplify/amplify-prompts": 2.8.6 chalk: ^4.1.1 fs-extra: ^8.1.0 mime-types: ^2.1.26 @@ -316,63 +322,63 @@ __metadata: languageName: unknown linkType: soft -"@aws-amplify/amplify-category-interactions@5.1.3, @aws-amplify/amplify-category-interactions@workspace:packages/amplify-category-interactions": +"@aws-amplify/amplify-category-interactions@5.1.30, @aws-amplify/amplify-category-interactions@workspace:packages/amplify-category-interactions": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-category-interactions@workspace:packages/amplify-category-interactions" dependencies: - "@aws-amplify/amplify-cli-core": 4.0.8 - "@aws-amplify/amplify-prompts": 2.7.0 + "@aws-amplify/amplify-cli-core": 4.3.11 + "@aws-amplify/amplify-prompts": 2.8.6 fs-extra: ^8.1.0 fuzzy: ^0.1.3 uuid: ^8.3.2 languageName: unknown linkType: soft -"@aws-amplify/amplify-category-notifications@2.24.10, @aws-amplify/amplify-category-notifications@workspace:packages/amplify-category-notifications": +"@aws-amplify/amplify-category-notifications@2.26.27, @aws-amplify/amplify-category-notifications@workspace:packages/amplify-category-notifications": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-category-notifications@workspace:packages/amplify-category-notifications" dependencies: - "@aws-amplify/amplify-cli-core": 4.0.8 - "@aws-amplify/amplify-environment-parameters": 1.6.3 - "@aws-amplify/amplify-prompts": 2.7.0 - "@aws-amplify/amplify-provider-awscloudformation": 8.2.3 - aws-sdk: ^2.1354.0 + "@aws-amplify/amplify-cli-core": 4.3.11 + "@aws-amplify/amplify-environment-parameters": 1.9.16 + "@aws-amplify/amplify-prompts": 2.8.6 + "@aws-amplify/amplify-provider-awscloudformation": 8.11.3 + aws-sdk: ^2.1464.0 chalk: ^4.1.1 fs-extra: ^8.1.0 lodash: ^4.17.21 ora: ^4.0.3 promise-sequential: ^1.1.1 - proxy-agent: ^5.0.0 + proxy-agent: ^6.3.0 languageName: unknown linkType: soft -"@aws-amplify/amplify-category-predictions@5.2.3, @aws-amplify/amplify-category-predictions@workspace:packages/amplify-category-predictions": +"@aws-amplify/amplify-category-predictions@5.5.17, @aws-amplify/amplify-category-predictions@workspace:packages/amplify-category-predictions": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-category-predictions@workspace:packages/amplify-category-predictions" dependencies: - "@aws-amplify/amplify-cli-core": 4.0.8 - "@aws-amplify/amplify-prompts": 2.7.0 - "@aws-sdk/client-rekognition": ^3.303.0 - aws-sdk: ^2.1354.0 + "@aws-amplify/amplify-cli-core": 4.3.11 + "@aws-amplify/amplify-prompts": 2.8.6 + "@aws-sdk/client-rekognition": 3.624.0 + aws-sdk: ^2.1464.0 chalk: ^4.1.1 fs-extra: ^8.1.0 uuid: ^8.3.2 languageName: unknown linkType: soft -"@aws-amplify/amplify-category-storage@5.2.3, @aws-amplify/amplify-category-storage@workspace:packages/amplify-category-storage": +"@aws-amplify/amplify-category-storage@5.5.16, @aws-amplify/amplify-category-storage@workspace:packages/amplify-category-storage": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-category-storage@workspace:packages/amplify-category-storage" dependencies: - "@aws-amplify/amplify-cli-core": 4.0.8 - "@aws-amplify/amplify-environment-parameters": 1.6.3 - "@aws-amplify/amplify-prompts": 2.7.0 - "@aws-amplify/amplify-util-import": 2.6.0 - "@aws-amplify/cli-extensibility-helper": 3.0.8 - amplify-headless-interface: 1.17.3 - amplify-util-headless-input: 1.9.12 - aws-cdk-lib: ~2.68.0 - aws-sdk: ^2.1354.0 + "@aws-amplify/amplify-cli-core": 4.3.11 + "@aws-amplify/amplify-environment-parameters": 1.9.16 + "@aws-amplify/amplify-prompts": 2.8.6 + "@aws-amplify/amplify-util-import": 2.8.3 + "@aws-amplify/cli-extensibility-helper": 3.0.35 + amplify-headless-interface: 1.17.7 + amplify-util-headless-input: 1.9.18 + aws-cdk-lib: ~2.177.0 + aws-sdk: ^2.1464.0 chalk: ^4.1.1 cloudform-types: ^4.2.0 constructs: ^10.0.5 @@ -382,18 +388,19 @@ __metadata: promise-sequential: ^1.1.1 rimraf: ^3.0.2 uuid: ^8.3.2 - vm2: ^3.9.19 languageName: unknown linkType: soft -"@aws-amplify/amplify-cli-core@4.0.8, @aws-amplify/amplify-cli-core@workspace:packages/amplify-cli-core": +"@aws-amplify/amplify-cli-core@4.3.11, @aws-amplify/amplify-cli-core@workspace:packages/amplify-cli-core": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-cli-core@workspace:packages/amplify-cli-core" dependencies: - "@aws-amplify/amplify-cli-logger": 1.3.2 - "@aws-amplify/amplify-function-plugin-interface": 1.10.2 - "@aws-amplify/amplify-prompts": 2.7.0 - "@aws-amplify/graphql-transformer-interfaces": ^2.2.1 + "@aws-amplify/amplify-cli-logger": 1.3.8 + "@aws-amplify/amplify-function-plugin-interface": 1.10.3 + "@aws-amplify/amplify-prompts": 2.8.6 + "@aws-amplify/graphql-transformer-interfaces": ^3.10.2 + "@aws-sdk/util-arn-parser": ^3.310.0 + "@types/archiver": ^5.3.1 "@types/ejs": ^3.1.1 "@types/fs-extra": ^8.0.1 "@types/hjson": ^2.4.2 @@ -405,9 +412,9 @@ __metadata: "@types/yarnpkg__lockfile": ^1.1.5 "@yarnpkg/lockfile": ^1.1.0 ajv: ^6.12.6 - aws-cdk-lib: ~2.68.0 + aws-cdk-lib: ~2.177.0 chalk: ^4.1.1 - ci-info: ^2.0.0 + ci-info: ^3.8.0 cli-table3: ^0.6.0 cloudform-types: ^4.2.0 colors: 1.4.0 @@ -421,22 +428,23 @@ __metadata: jest: ^29.5.0 js-yaml: ^4.0.0 lodash: ^4.17.21 - nock: ^13.0.11 + nock: ^13.5.0 node-fetch: ^2.6.7 open: ^8.4.0 ora: ^4.0.3 - proxy-agent: ^5.0.0 + proxy-agent: ^6.3.0 rimraf: ^3.0.0 - semver: ^7.3.5 + semver: ^7.5.4 strip-ansi: ^6.0.0 typescript-json-schema: ~0.52.0 uuid: ^8.3.2 which: ^2.0.2 yaml: ^2.2.2 + yauzl: ^3.1.3 languageName: unknown linkType: soft -"@aws-amplify/amplify-cli-logger@1.3.2, @aws-amplify/amplify-cli-logger@workspace:packages/amplify-cli-logger": +"@aws-amplify/amplify-cli-logger@1.3.8, @aws-amplify/amplify-cli-logger@workspace:packages/amplify-cli-logger": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-cli-logger@workspace:packages/amplify-cli-logger" dependencies: @@ -445,7 +453,7 @@ __metadata: languageName: unknown linkType: soft -"@aws-amplify/amplify-cli-shared-interfaces@1.2.2, @aws-amplify/amplify-cli-shared-interfaces@workspace:packages/amplify-cli-shared-interfaces": +"@aws-amplify/amplify-cli-shared-interfaces@1.2.5, @aws-amplify/amplify-cli-shared-interfaces@workspace:packages/amplify-cli-shared-interfaces": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-cli-shared-interfaces@workspace:packages/amplify-cli-shared-interfaces" dependencies: @@ -453,12 +461,12 @@ __metadata: languageName: unknown linkType: soft -"@aws-amplify/amplify-console-hosting@2.5.8, @aws-amplify/amplify-console-hosting@workspace:packages/amplify-console-hosting": +"@aws-amplify/amplify-console-hosting@2.5.35, @aws-amplify/amplify-console-hosting@workspace:packages/amplify-console-hosting": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-console-hosting@workspace:packages/amplify-console-hosting" dependencies: - "@aws-amplify/amplify-cli-core": 4.0.8 - "@aws-amplify/amplify-environment-parameters": 1.6.3 + "@aws-amplify/amplify-cli-core": 4.3.11 + "@aws-amplify/amplify-environment-parameters": 1.9.16 archiver: ^5.3.0 chalk: ^4.1.1 cli-table3: ^0.6.0 @@ -468,6 +476,7 @@ __metadata: inquirer: ^7.3.3 node-fetch: ^2.6.7 ora: ^4.0.3 + proxy-agent: ^6.3.0 languageName: unknown linkType: soft @@ -475,10 +484,10 @@ __metadata: version: 0.0.0-use.local resolution: "@aws-amplify/amplify-console-integration-tests@workspace:packages/amplify-console-integration-tests" dependencies: - "@aws-amplify/amplify-cli-core": 4.0.8 - "@aws-amplify/amplify-e2e-core": 5.0.3 + "@aws-amplify/amplify-cli-core": 4.3.11 + "@aws-amplify/amplify-e2e-core": 5.7.1 "@types/ini": ^1.3.30 - aws-sdk: ^2.1354.0 + aws-sdk: ^2.1464.0 dotenv: ^8.2.0 execa: ^5.1.1 fs-extra: ^8.1.0 @@ -491,13 +500,13 @@ __metadata: languageName: unknown linkType: soft -"@aws-amplify/amplify-container-hosting@2.6.8, @aws-amplify/amplify-container-hosting@workspace:packages/amplify-container-hosting": +"@aws-amplify/amplify-container-hosting@2.8.15, @aws-amplify/amplify-container-hosting@workspace:packages/amplify-container-hosting": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-container-hosting@workspace:packages/amplify-container-hosting" dependencies: - "@aws-amplify/amplify-category-api": ^5.4.1 - "@aws-amplify/amplify-cli-core": 4.0.8 - "@aws-amplify/amplify-environment-parameters": 1.6.3 + "@aws-amplify/amplify-category-api": ^5.12.10 + "@aws-amplify/amplify-cli-core": 4.3.11 + "@aws-amplify/amplify-environment-parameters": 1.9.16 fs-extra: ^8.1.0 inquirer: ^7.3.3 mime-types: ^2.1.26 @@ -505,61 +514,65 @@ __metadata: languageName: unknown linkType: soft -"@aws-amplify/amplify-dotnet-function-template-provider@2.5.8, @aws-amplify/amplify-dotnet-function-template-provider@workspace:packages/amplify-dotnet-function-template-provider": +"@aws-amplify/amplify-dotnet-function-template-provider@2.7.1, @aws-amplify/amplify-dotnet-function-template-provider@workspace:packages/amplify-dotnet-function-template-provider": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-dotnet-function-template-provider@workspace:packages/amplify-dotnet-function-template-provider" dependencies: - "@aws-amplify/amplify-cli-core": 4.0.8 - "@aws-amplify/amplify-function-plugin-interface": 1.10.2 + "@aws-amplify/amplify-cli-core": 4.3.11 + "@aws-amplify/amplify-function-plugin-interface": 1.12.1 "@types/inquirer": ^6.5.0 "@types/lodash": ^4.14.149 "@types/node": ^12.12.6 - graphql-transformer-core: ^8.1.2 + graphql-transformer-core: ^8.2.13 languageName: unknown linkType: soft -"@aws-amplify/amplify-e2e-core@5.0.3, @aws-amplify/amplify-e2e-core@workspace:packages/amplify-e2e-core": +"@aws-amplify/amplify-e2e-core@5.7.1, @aws-amplify/amplify-e2e-core@workspace:packages/amplify-e2e-core": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-e2e-core@workspace:packages/amplify-e2e-core" dependencies: - "@aws-amplify/amplify-cli-core": 4.0.8 + "@aws-amplify/amplify-cli-core": 4.3.11 + "@aws-sdk/client-sts": 3.624.0 + "@aws-sdk/credential-providers": 3.624.0 "@types/glob": ^7.1.1 - amplify-headless-interface: 1.17.3 - aws-sdk: ^2.1354.0 + amplify-headless-interface: 1.17.7 + aws-amplify: ^5.3.16 + aws-appsync: ^4.1.1 + aws-sdk: ^2.1464.0 chalk: ^4.1.1 dotenv: ^8.2.0 execa: ^5.1.1 fs-extra: ^8.1.0 - graphql-transformer-core: ^8.1.2 + graphql-transformer-core: ^8.2.13 ini: ^1.3.5 jest-circus: ^27.0.0 jest-environment-node: ^26.6.2 lodash: ^4.17.21 node-fetch: ^2.6.7 - node-pty: beta + node-pty: ^1.0.0 retimer: 2.0.0 rimraf: ^3.0.0 - semver: ^7.3.5 + semver: ^7.5.4 strip-ansi: ^6.0.0 throat: ^5.0.0 uuid: ^8.3.2 languageName: unknown linkType: soft -"@aws-amplify/amplify-environment-parameters@1.6.3, @aws-amplify/amplify-environment-parameters@workspace:packages/amplify-environment-parameters": +"@aws-amplify/amplify-environment-parameters@1.9.16, @aws-amplify/amplify-environment-parameters@workspace:packages/amplify-environment-parameters": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-environment-parameters@workspace:packages/amplify-environment-parameters" dependencies: - "@aws-amplify/amplify-cli-core": 4.0.8 + "@aws-amplify/amplify-cli-core": 4.3.11 ajv: ^6.12.6 - aws-sdk: ^2.1354.0 + aws-sdk: ^2.1464.0 lodash: ^4.17.21 mkdirp: ^1.0.4 ts-json-schema-generator: ~1.1.2 languageName: unknown linkType: soft -"@aws-amplify/amplify-frontend-android@3.5.4, @aws-amplify/amplify-frontend-android@workspace:packages/amplify-frontend-android": +"@aws-amplify/amplify-frontend-android@3.5.8, @aws-amplify/amplify-frontend-android@workspace:packages/amplify-frontend-android": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-frontend-android@workspace:packages/amplify-frontend-android" dependencies: @@ -569,7 +582,7 @@ __metadata: languageName: unknown linkType: soft -"@aws-amplify/amplify-frontend-flutter@1.4.2, @aws-amplify/amplify-frontend-flutter@workspace:packages/amplify-frontend-flutter": +"@aws-amplify/amplify-frontend-flutter@1.4.7, @aws-amplify/amplify-frontend-flutter@workspace:packages/amplify-frontend-flutter": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-frontend-flutter@workspace:packages/amplify-frontend-flutter" dependencies: @@ -579,11 +592,11 @@ __metadata: languageName: unknown linkType: soft -"@aws-amplify/amplify-frontend-ios@3.6.10, @aws-amplify/amplify-frontend-ios@workspace:packages/amplify-frontend-ios": +"@aws-amplify/amplify-frontend-ios@3.7.9, @aws-amplify/amplify-frontend-ios@workspace:packages/amplify-frontend-ios": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-frontend-ios@workspace:packages/amplify-frontend-ios" dependencies: - "@aws-amplify/amplify-cli-core": 4.0.8 + "@aws-amplify/amplify-cli-core": 4.3.11 execa: ^5.1.1 fs-extra: ^8.1.0 graphql-config: ^2.2.1 @@ -591,12 +604,12 @@ __metadata: languageName: unknown linkType: soft -"@aws-amplify/amplify-frontend-javascript@3.9.8, @aws-amplify/amplify-frontend-javascript@workspace:packages/amplify-frontend-javascript": +"@aws-amplify/amplify-frontend-javascript@3.10.19, @aws-amplify/amplify-frontend-javascript@workspace:packages/amplify-frontend-javascript": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-frontend-javascript@workspace:packages/amplify-frontend-javascript" dependencies: - "@aws-amplify/amplify-cli-core": 4.0.8 - "@babel/core": ^7.10.5 + "@aws-amplify/amplify-cli-core": 4.3.11 + "@babel/core": ^7.23.2 "@babel/plugin-transform-modules-commonjs": 7.10.4 chalk: ^4.1.1 execa: ^5.1.1 @@ -607,28 +620,35 @@ __metadata: languageName: unknown linkType: soft -"@aws-amplify/amplify-function-plugin-interface@1.10.2, @aws-amplify/amplify-function-plugin-interface@workspace:packages/amplify-function-plugin-interface": +"@aws-amplify/amplify-function-plugin-interface@1.12.1, @aws-amplify/amplify-function-plugin-interface@workspace:packages/amplify-function-plugin-interface": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-function-plugin-interface@workspace:packages/amplify-function-plugin-interface" languageName: unknown linkType: soft -"@aws-amplify/amplify-go-function-template-provider@1.4.3, @aws-amplify/amplify-go-function-template-provider@workspace:packages/amplify-go-function-template-provider": +"@aws-amplify/amplify-function-plugin-interface@npm:1.10.3": + version: 1.10.3 + resolution: "@aws-amplify/amplify-function-plugin-interface@npm:1.10.3" + checksum: 2448984fd2bfd92ab6cee844730f5393ec7c641d5ee06eb7a30d7de77a0095e8dde8389aa931120767041ed4ceb01d9819b95b7cdf918552c53cfd2eec1bb0d5 + languageName: node + linkType: hard + +"@aws-amplify/amplify-go-function-template-provider@1.4.8, @aws-amplify/amplify-go-function-template-provider@workspace:packages/amplify-go-function-template-provider": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-go-function-template-provider@workspace:packages/amplify-go-function-template-provider" dependencies: - "@aws-amplify/amplify-function-plugin-interface": 1.10.2 + "@aws-amplify/amplify-function-plugin-interface": 1.12.1 "@types/fs-extra": ^8.0.1 "@types/lodash": ^4.14.149 "@types/node": ^12.12.6 languageName: unknown linkType: soft -"@aws-amplify/amplify-graphiql-explorer@2.5.7, @aws-amplify/amplify-graphiql-explorer@workspace:packages/amplify-graphiql-explorer": +"@aws-amplify/amplify-graphiql-explorer@2.6.0, @aws-amplify/amplify-graphiql-explorer@workspace:packages/amplify-graphiql-explorer": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-graphiql-explorer@workspace:packages/amplify-graphiql-explorer" dependencies: - "@babel/core": ^7.16.0 + "@babel/core": ^7.23.2 "@pmmmwh/react-refresh-webpack-plugin": ^0.5.3 "@semantic-ui-react/css-patch": ^1.0.0 "@svgr/webpack": ^5.5.0 @@ -650,8 +670,8 @@ __metadata: case-sensitive-paths-webpack-plugin: ^2.4.0 cross-env: ^7.0.3 crypto-browserify: ^3.12.0 - css-loader: ^6.5.1 - css-minimizer-webpack-plugin: ^3.2.0 + css-loader: ^6.8.1 + css-minimizer-webpack-plugin: ^5.0.1 dotenv: ^10.0.0 dotenv-expand: ^5.1.0 eslint: ^8.3.0 @@ -659,17 +679,18 @@ __metadata: eslint-webpack-plugin: ^3.1.1 file-loader: ^6.2.0 fs-extra: ^10.0.0 - graphiql: ^1.5.16 + graphiql: ">=1.5.16 <=1.8.10" graphiql-explorer: ^0.6.2 graphql: ^15.5.0 + graphql-ws: ^5.14.3 html-webpack-plugin: ^5.5.0 identity-obj-proxy: ^3.0.0 jest: ^29.0.0 jest-resolve: ^26.0.2 jest-watch-typeahead: ^1.0.0 - jsonwebtoken: ^9.0.0 + jose: ^5.2.0 mini-css-extract-plugin: ^2.4.5 - postcss: ^8.4.4 + postcss: ^8.4.31 postcss-flexbugs-fixes: ^5.0.2 postcss-loader: ^6.2.1 postcss-normalize: ^10.0.1 @@ -682,11 +703,11 @@ __metadata: react-dom: ^17.0.2 react-refresh: ^0.11.0 resolve: ^1.20.0 - resolve-url-loader: ^4.0.0 + resolve-url-loader: ^5.0.0 sass-loader: ^12.3.0 semantic-ui-css: ^2.5.0 semantic-ui-react: ^2.1.3 - semver: ^7.3.5 + semver: ^7.5.4 source-map-loader: ^3.0.0 stream-browserify: ^3.0.0 style-loader: ^3.3.1 @@ -696,7 +717,7 @@ __metadata: util: ^0.12.4 web-vitals: ^0.2.4 webpack: ^5.64.4 - webpack-dev-server: ^4.6.0 + webpack-dev-server: ^4.15.2 webpack-manifest-plugin: ^4.0.2 workbox-webpack-plugin: ^6.4.1 languageName: unknown @@ -706,53 +727,56 @@ __metadata: version: 0.0.0-use.local resolution: "@aws-amplify/amplify-migration-tests@workspace:packages/amplify-migration-tests" dependencies: - "@aws-amplify/amplify-cli-core": 4.0.8 - "@aws-amplify/amplify-e2e-core": 5.0.3 + "@aws-amplify/amplify-cli-core": 4.3.11 + "@aws-amplify/amplify-e2e-core": 5.7.1 "@aws-cdk/cloudformation-diff": ~2.68.0 - aws-cdk-lib: ~2.68.0 + "@aws-sdk/client-s3": 3.624.0 + amplify-headless-interface: 1.17.7 + aws-amplify: ^5.3.16 + aws-cdk-lib: ~2.177.0 constructs: ^10.0.5 fs-extra: ^8.1.0 - graphql-transformer-core: ^8.1.2 + graphql-transformer-core: ^8.2.13 jest: ^29.5.0 lodash: ^4.17.21 - semver: ^7.3.5 + semver: ^7.5.4 strip-ansi: ^6.0.0 ts-node: ^10.9.1 uuid: ^8.3.2 languageName: unknown linkType: soft -"@aws-amplify/amplify-nodejs-function-template-provider@2.8.3, @aws-amplify/amplify-nodejs-function-template-provider@workspace:packages/amplify-nodejs-function-template-provider": +"@aws-amplify/amplify-nodejs-function-template-provider@2.10.11, @aws-amplify/amplify-nodejs-function-template-provider@workspace:packages/amplify-nodejs-function-template-provider": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-nodejs-function-template-provider@workspace:packages/amplify-nodejs-function-template-provider" dependencies: - "@aws-amplify/amplify-cli-core": 4.0.8 - "@aws-amplify/amplify-function-plugin-interface": 1.10.2 - "@aws-amplify/amplify-prompts": 2.7.0 + "@aws-amplify/amplify-cli-core": 4.3.11 + "@aws-amplify/amplify-function-plugin-interface": 1.12.1 + "@aws-amplify/amplify-prompts": 2.8.6 "@types/fs-extra": ^8.0.1 "@types/inquirer": ^6.5.0 "@types/node": ^12.12.6 - graphql-transformer-core: ^8.1.2 + graphql-transformer-core: ^8.2.13 lodash: ^4.17.21 languageName: unknown linkType: soft -"@aws-amplify/amplify-opensearch-simulator@1.4.3, @aws-amplify/amplify-opensearch-simulator@workspace:packages/amplify-opensearch-simulator": +"@aws-amplify/amplify-opensearch-simulator@1.7.16, @aws-amplify/amplify-opensearch-simulator@workspace:packages/amplify-opensearch-simulator": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-opensearch-simulator@workspace:packages/amplify-opensearch-simulator" dependencies: - "@aws-amplify/amplify-cli-core": 4.0.8 - "@aws-amplify/amplify-prompts": 2.7.0 + "@aws-amplify/amplify-cli-core": 4.3.11 + "@aws-amplify/amplify-prompts": 2.8.6 "@types/node": ^12.12.6 - "@types/openpgp": ^4.4.18 - aws-sdk: ^2.1354.0 + "@types/openpgp": ^4.4.19 + aws-sdk: ^2.1464.0 detect-port: ^1.3.0 execa: ^5.1.1 fs-extra: ^8.1.0 get-port: ^5.1.1 gunzip-maybe: ^1.4.2 node-fetch: ^2.6.7 - openpgp: ^4.10.10 + openpgp: ^5.10.2 promise-toolbox: ^0.20.0 tar: ^6.1.11 uuid: ^8.3.2 @@ -760,40 +784,40 @@ __metadata: languageName: unknown linkType: soft -"@aws-amplify/amplify-prompts@2.7.0, @aws-amplify/amplify-prompts@workspace:packages/amplify-prompts": +"@aws-amplify/amplify-prompts@2.8.6, @aws-amplify/amplify-prompts@workspace:packages/amplify-prompts": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-prompts@workspace:packages/amplify-prompts" dependencies: - "@aws-amplify/amplify-cli-shared-interfaces": 1.2.2 + "@aws-amplify/amplify-cli-shared-interfaces": 1.2.5 chalk: ^4.1.1 enquirer: ^2.3.6 rimraf: ^3.0.2 languageName: unknown linkType: soft -"@aws-amplify/amplify-provider-awscloudformation@8.2.3, @aws-amplify/amplify-provider-awscloudformation@workspace:packages/amplify-provider-awscloudformation": +"@aws-amplify/amplify-provider-awscloudformation@8.11.3, @aws-amplify/amplify-provider-awscloudformation@workspace:packages/amplify-provider-awscloudformation": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-provider-awscloudformation@workspace:packages/amplify-provider-awscloudformation" dependencies: - "@aws-amplify/amplify-category-custom": 3.0.8 - "@aws-amplify/amplify-cli-core": 4.0.8 - "@aws-amplify/amplify-cli-logger": 1.3.2 - "@aws-amplify/amplify-environment-parameters": 1.6.3 - "@aws-amplify/amplify-prompts": 2.7.0 - "@aws-amplify/amplify-util-import": 2.6.0 - "@aws-amplify/cli-extensibility-helper": 3.0.8 - "@aws-amplify/graphql-transformer-core": ^1.3.2 - "@aws-amplify/graphql-transformer-interfaces": ^2.2.1 + "@aws-amplify/amplify-category-custom": 3.1.25 + "@aws-amplify/amplify-cli-core": 4.3.11 + "@aws-amplify/amplify-cli-logger": 1.3.8 + "@aws-amplify/amplify-environment-parameters": 1.9.16 + "@aws-amplify/amplify-prompts": 2.8.6 + "@aws-amplify/amplify-util-import": 2.8.3 + "@aws-amplify/cli-extensibility-helper": 3.0.35 + "@aws-amplify/graphql-transformer-core": ^2.9.4 + "@aws-amplify/graphql-transformer-interfaces": ^3.10.2 "@types/columnify": ^1.5.0 "@types/deep-diff": ^1.0.0 "@types/folder-hash": ^4.0.1 "@types/lodash.throttle": ^4.1.6 - "@types/node": ^12.12.6 + "@types/node": ^18.16.0 "@types/uuid": ^8.0.0 - amplify-codegen: ^4.1.1 + amplify-codegen: ^4.10.2 archiver: ^5.3.0 - aws-cdk-lib: ~2.68.0 - aws-sdk: ^2.1354.0 + aws-cdk-lib: ~2.177.0 + aws-sdk: ^2.1464.0 bottleneck: 2.19.5 chalk: ^4.1.1 cloudform-types: ^4.2.0 @@ -801,76 +825,75 @@ __metadata: constructs: ^10.0.5 cors: ^2.8.5 deep-diff: ^1.0.2 - extract-zip: ^2.0.1 folder-hash: ^4.0.2 fs-extra: ^8.1.0 glob: ^7.2.0 graphql: ^15.5.0 - graphql-transformer-core: ^8.1.2 + graphql-transformer-core: ^8.2.13 ignore: ^5.2.0 ini: ^1.3.5 inquirer: ^7.3.3 is-wsl: ^2.2.0 jest: ^29.5.0 - jose: ^4.3.7 + jose: ^4.15.5 lodash: ^4.17.21 lodash.throttle: ^4.1.1 - moment: ^2.24.0 netmask: ^2.0.2 node-fetch: ^2.6.7 ora: ^4.0.3 promise-sequential: ^1.1.1 - proxy-agent: ^5.0.0 + proxy-agent: ^6.3.0 rimraf: ^3.0.0 - vm2: ^3.9.19 + typescript: ^4.9.5 xstate: ^4.14.0 languageName: unknown linkType: soft -"@aws-amplify/amplify-python-function-template-provider@1.4.3, @aws-amplify/amplify-python-function-template-provider@workspace:packages/amplify-python-function-template-provider": +"@aws-amplify/amplify-python-function-template-provider@1.4.7, @aws-amplify/amplify-python-function-template-provider@workspace:packages/amplify-python-function-template-provider": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-python-function-template-provider@workspace:packages/amplify-python-function-template-provider" dependencies: - "@aws-amplify/amplify-function-plugin-interface": 1.10.2 + "@aws-amplify/amplify-function-plugin-interface": 1.12.1 "@types/fs-extra": ^8.0.1 "@types/node": ^12.12.6 languageName: unknown linkType: soft -"@aws-amplify/amplify-util-import@2.6.0, @aws-amplify/amplify-util-import@workspace:packages/amplify-util-import": +"@aws-amplify/amplify-util-import@2.8.3, @aws-amplify/amplify-util-import@workspace:packages/amplify-util-import": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-util-import@workspace:packages/amplify-util-import" dependencies: "@types/node": ^12.12.6 - aws-sdk: ^2.1354.0 + aws-sdk: ^2.1464.0 languageName: unknown linkType: soft -"@aws-amplify/amplify-util-mock@5.2.3, @aws-amplify/amplify-util-mock@workspace:packages/amplify-util-mock": +"@aws-amplify/amplify-util-mock@5.10.11, @aws-amplify/amplify-util-mock@workspace:packages/amplify-util-mock": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-util-mock@workspace:packages/amplify-util-mock" dependencies: - "@aws-amplify/amplify-appsync-simulator": 2.12.3 - "@aws-amplify/amplify-category-function": 5.3.3 - "@aws-amplify/amplify-cli-core": 4.0.8 - "@aws-amplify/amplify-environment-parameters": 1.6.3 - "@aws-amplify/amplify-function-plugin-interface": 1.10.2 - "@aws-amplify/amplify-opensearch-simulator": 1.4.3 - "@aws-amplify/amplify-prompts": 2.7.0 - "@aws-amplify/amplify-provider-awscloudformation": 8.2.3 - "@aws-amplify/graphql-auth-transformer": ^2.1.6 - "@aws-amplify/graphql-default-value-transformer": ^1.1.6 - "@aws-amplify/graphql-function-transformer": ^1.2.4 - "@aws-amplify/graphql-http-transformer": 1.2.4 - "@aws-amplify/graphql-index-transformer": ^1.2.2 - "@aws-amplify/graphql-maps-to-transformer": ^2.1.6 - "@aws-amplify/graphql-model-transformer": ^1.3.2 - "@aws-amplify/graphql-predictions-transformer": ^1.2.4 - "@aws-amplify/graphql-relational-transformer": ^1.2.2 - "@aws-amplify/graphql-searchable-transformer": ^1.2.4 - "@aws-amplify/graphql-transformer-core": ^1.3.2 - "@aws-amplify/graphql-transformer-interfaces": ^2.2.1 - "@aws-amplify/graphql-transformer-migrator": ^2.1.6 + "@aws-amplify/amplify-appsync-simulator": 2.16.9 + "@aws-amplify/amplify-category-function": 5.7.11 + "@aws-amplify/amplify-cli-core": 4.3.11 + "@aws-amplify/amplify-environment-parameters": 1.9.16 + "@aws-amplify/amplify-function-plugin-interface": 1.12.1 + "@aws-amplify/amplify-opensearch-simulator": 1.7.16 + "@aws-amplify/amplify-prompts": 2.8.6 + "@aws-amplify/amplify-provider-awscloudformation": 8.11.3 + "@aws-amplify/graphql-auth-transformer": ^3.6.8 + "@aws-amplify/graphql-default-value-transformer": ^2.3.16 + "@aws-amplify/graphql-function-transformer": ^2.1.28 + "@aws-amplify/graphql-http-transformer": ^2.1.28 + "@aws-amplify/graphql-index-transformer": ^2.4.12 + "@aws-amplify/graphql-maps-to-transformer": ^3.4.26 + "@aws-amplify/graphql-model-transformer": ^2.11.7 + "@aws-amplify/graphql-predictions-transformer": ^2.1.28 + "@aws-amplify/graphql-relational-transformer": ^2.5.14 + "@aws-amplify/graphql-searchable-transformer": ^2.7.12 + "@aws-amplify/graphql-transformer": ^1.1.0 + "@aws-amplify/graphql-transformer-core": ^2.9.4 + "@aws-amplify/graphql-transformer-interfaces": ^3.10.2 + "@aws-amplify/graphql-transformer-migrator": ^2.2.28 "@hapi/topo": ^5.0.0 "@types/detect-port": ^1.3.0 "@types/jest": ^29.0.0 @@ -878,208 +901,215 @@ __metadata: "@types/node": ^12.12.6 "@types/semver": ^7.1.0 "@types/which": ^1.3.2 - amplify-codegen: ^4.1.1 - amplify-dynamodb-simulator: 2.7.3 - amplify-nodejs-function-runtime-provider: 2.4.3 - amplify-storage-simulator: 1.9.0 + amplify-codegen: ^4.10.2 + amplify-dynamodb-simulator: 2.9.20 + amplify-nodejs-function-runtime-provider: 2.5.25 + amplify-storage-simulator: 1.11.6 aws-appsync: ^4.1.4 - aws-sdk: ^2.1354.0 - aws-sdk-mock: ^5.8.0 - axios: ^0.26.0 + aws-cdk-lib: ~2.177.0 + aws-sdk: ^2.1464.0 + aws-sdk-mock: ^6.2.0 + axios: ^1.6.7 chokidar: ^3.5.3 + constructs: ^10.0.5 detect-port: ^1.3.0 dotenv: ^8.2.0 execa: ^5.1.1 fs-extra: ^8.1.0 graphql: ^15.5.0 - graphql-auth-transformer: ^7.2.56 - graphql-connection-transformer: ^5.2.55 - graphql-dynamodb-transformer: ^7.2.55 - graphql-function-transformer: ^3.3.46 - graphql-key-transformer: ^3.2.55 + graphql-auth-transformer: ^7.2.82 + graphql-connection-transformer: ^5.2.80 + graphql-dynamodb-transformer: ^7.2.80 + graphql-function-transformer: ^3.3.71 + graphql-key-transformer: ^3.2.80 graphql-tag: ^2.10.1 - graphql-transformer-core: ^8.1.2 - graphql-versioned-transformer: ^5.2.55 + graphql-transformer-core: ^8.2.13 + graphql-versioned-transformer: ^5.2.80 inquirer: ^7.3.3 isomorphic-fetch: ^3.0.0 jest: ^29.0.0 - jsonwebtoken: ^9.0.0 + jose: ^5.2.0 lodash: ^4.17.21 node-fetch: ^2.6.7 - semver: ^7.3.5 + semver: ^7.5.4 uuid: ^8.3.2 which: ^2.0.2 ws: ^7.5.7 languageName: unknown linkType: soft -"@aws-amplify/amplify-util-uibuilder@1.8.3, @aws-amplify/amplify-util-uibuilder@workspace:packages/amplify-util-uibuilder": +"@aws-amplify/amplify-util-uibuilder@1.14.16, @aws-amplify/amplify-util-uibuilder@workspace:packages/amplify-util-uibuilder": version: 0.0.0-use.local resolution: "@aws-amplify/amplify-util-uibuilder@workspace:packages/amplify-util-uibuilder" dependencies: - "@aws-amplify/amplify-category-api": ^5.4.1 - "@aws-amplify/amplify-cli-core": 4.0.8 - "@aws-amplify/amplify-prompts": 2.7.0 - "@aws-amplify/appsync-modelgen-plugin": ^2.4.4 + "@aws-amplify/amplify-category-api": ^5.12.10 + "@aws-amplify/amplify-cli-core": 4.3.11 + "@aws-amplify/amplify-prompts": 2.8.6 + "@aws-amplify/appsync-modelgen-plugin": ^2.6.0 "@aws-amplify/codegen-ui": 2.14.2 "@aws-amplify/codegen-ui-react": 2.14.2 "@types/fs-extra": ^8.0.1 "@types/jest": ^29.5.1 "@types/semver": ^7.1.0 "@types/tiny-async-pool": ^2.0.0 - amplify-codegen: ^4.1.1 - aws-sdk: ^2.1354.0 + amplify-codegen: ^4.10.2 + aws-sdk: ^2.1464.0 fs-extra: ^8.1.0 + node-fetch: ^2.6.7 ora: ^4.0.3 tiny-async-pool: ^2.1.0 ts-jest: ^29.1.0 languageName: unknown linkType: soft -"@aws-amplify/analytics@npm:5.1.9": - version: 5.1.9 - resolution: "@aws-amplify/analytics@npm:5.1.9" +"@aws-amplify/analytics@npm:6.5.10": + version: 6.5.10 + resolution: "@aws-amplify/analytics@npm:6.5.10" dependencies: - "@aws-amplify/cache": 4.0.31 - "@aws-amplify/core": 4.3.11 + "@aws-amplify/cache": 5.1.16 + "@aws-amplify/core": 5.8.10 "@aws-sdk/client-firehose": 3.6.1 "@aws-sdk/client-kinesis": 3.6.1 "@aws-sdk/client-personalize-events": 3.6.1 - "@aws-sdk/client-pinpoint": 3.6.1 "@aws-sdk/util-utf8-browser": 3.6.1 lodash: ^4.17.20 + tslib: ^1.8.0 uuid: ^3.2.1 - checksum: 93ddba60a777975e4239eb84afe27b0552f3fc7edff12fc4c6e2d945114c84cc175aac3179fb784fee651211aed5c4148ca44a8eda278ca87006884e88cebd5a + checksum: 526d507f058f4469c58b96e46ddc78e9591fe43d60718455c2f16a922afea57db698a703fab5ef9742104e2e90868973cc67b1601f2675da85f59e6c2d0e8f9e languageName: node linkType: hard -"@aws-amplify/api-graphql@npm:2.2.18": - version: 2.2.18 - resolution: "@aws-amplify/api-graphql@npm:2.2.18" +"@aws-amplify/api-graphql@npm:3.4.16": + version: 3.4.16 + resolution: "@aws-amplify/api-graphql@npm:3.4.16" dependencies: - "@aws-amplify/api-rest": 2.0.29 - "@aws-amplify/auth": 4.3.19 - "@aws-amplify/cache": 4.0.31 - "@aws-amplify/core": 4.3.11 - "@aws-amplify/pubsub": 4.2.5 + "@aws-amplify/api-rest": 3.5.10 + "@aws-amplify/auth": 5.6.10 + "@aws-amplify/cache": 5.1.16 + "@aws-amplify/core": 5.8.10 + "@aws-amplify/pubsub": 5.5.10 graphql: 15.8.0 + tslib: ^1.8.0 uuid: ^3.2.1 zen-observable-ts: 0.8.19 - checksum: dd5f95a1493c1b4ab0f669da7089dcd67c4711ab6f4f2b3e083558c2d620781847e8b0930c1d3c4a2888a8de1272de997ce187afc5fb77125dbe2d9ca1c926b9 + checksum: 8a817aaa3bc7941c738bb84d629dbbcd224b8860c2d52b06eeebe93a840e225a90f8959032dd285bd9f3d07bc2118e09340ec274694049127f6497afa864173e languageName: node linkType: hard -"@aws-amplify/api-rest@npm:2.0.29": - version: 2.0.29 - resolution: "@aws-amplify/api-rest@npm:2.0.29" +"@aws-amplify/api-rest@npm:3.5.10": + version: 3.5.10 + resolution: "@aws-amplify/api-rest@npm:3.5.10" dependencies: - "@aws-amplify/core": 4.3.11 - axios: 0.21.4 - checksum: 4641d9e69ac6837c80e69e7688890b6955aeda5303a7b9b672cbf610307a0b48ece325636bec6509269153bacd1fc4023b03c7b5873ea416bbabf77ef0b52db1 + "@aws-amplify/core": 5.8.10 + axios: ^1.6.5 + tslib: ^1.8.0 + url: 0.11.0 + checksum: b1a3105296f3eeb939f77e30ea574059595e5a026106cf48a223b4f94355c806c2aa3351acf2c0556eb3125b4bbfb2d8ee875d503337848b2d4c8a9dd6b3cf13 languageName: node linkType: hard -"@aws-amplify/api@npm:4.0.29": - version: 4.0.29 - resolution: "@aws-amplify/api@npm:4.0.29" +"@aws-amplify/api@npm:5.4.10": + version: 5.4.10 + resolution: "@aws-amplify/api@npm:5.4.10" dependencies: - "@aws-amplify/api-graphql": 2.2.18 - "@aws-amplify/api-rest": 2.0.29 - checksum: bb3a8b3a6edc765e0c5a37083832833291aed7edcc012f0d219d7450b93e98554414e21537d0ec84bad402b9ce7d3364d0328ff58e45ff6b8ca6a56250e18f39 + "@aws-amplify/api-graphql": 3.4.16 + "@aws-amplify/api-rest": 3.5.10 + tslib: ^1.8.0 + checksum: 8ae95d9dc45d8aacc0ef4c995c4d45b987a0ab16022a17946a91a9742b30244ecf82c0d8fda6349e3abb620056850288c5ff9900153f22d3ca1757b99a861a31 languageName: node linkType: hard -"@aws-amplify/appsync-modelgen-plugin@npm:2.4.5, @aws-amplify/appsync-modelgen-plugin@npm:^2.4.4": - version: 2.4.5 - resolution: "@aws-amplify/appsync-modelgen-plugin@npm:2.4.5" +"@aws-amplify/appsync-modelgen-plugin@npm:2.15.1, @aws-amplify/appsync-modelgen-plugin@npm:^2.6.0": + version: 2.15.1 + resolution: "@aws-amplify/appsync-modelgen-plugin@npm:2.15.1" dependencies: - "@graphql-codegen/plugin-helpers": ^1.18.8 + "@graphql-codegen/plugin-helpers": ^3.1.1 "@graphql-codegen/visitor-plugin-common": ^1.22.0 "@graphql-tools/utils": ^6.0.18 - "@types/node": ^12.12.6 - "@types/pluralize": 0.0.29 chalk: ^3.0.0 change-case: ^4.1.1 + graphql-transformer-common: ^4.25.1 lower-case-first: ^2.0.1 pluralize: ^8.0.0 strip-indent: ^3.0.0 ts-dedent: ^1.1.0 peerDependencies: graphql: ^15.5.0 - checksum: 96378a9d72468eabc4bbb1b09c5eafc2c58ef1b7f7b6fae679b66b8710ab05431906b15d26a4fde153851766b5007e30f6fbc7afbbe29818c955a728ba9a6f49 + checksum: 8786ee9ea708a6e07a6e8c6df56478b8b0be6af3e58eea1f40a8916005297be7c7eae435692c5cde240579131e2818b64d8caea8d78351a33e5e39d4c5a8b5f0 languageName: node linkType: hard -"@aws-amplify/auth@npm:4.3.19": - version: 4.3.19 - resolution: "@aws-amplify/auth@npm:4.3.19" +"@aws-amplify/auth@npm:5.6.10": + version: 5.6.10 + resolution: "@aws-amplify/auth@npm:5.6.10" dependencies: - "@aws-amplify/cache": 4.0.31 - "@aws-amplify/core": 4.3.11 - amazon-cognito-identity-js: 5.2.3 - crypto-js: ^4.1.1 - checksum: bd202241c639fec7c74f323689f1b8691946fc1907dacd1f5bdfb6a67fcb499fd426a6ca042f03ef7894764a5857b890b9763b9f817007772c2eecaa51915bfc + "@aws-amplify/core": 5.8.10 + amazon-cognito-identity-js: 6.3.11 + buffer: 4.9.2 + tslib: ^1.8.0 + url: 0.11.0 + checksum: 48ce6cacdd7813bc05d446c095e8860fe2f32bbc080c5351e59572ebee212d9fbb8b03ed21bfc04ca7fc56bbd48d700103c8c9ff4b170b7bc03f187b01e9bf68 languageName: node linkType: hard -"@aws-amplify/cache@npm:4.0.31": - version: 4.0.31 - resolution: "@aws-amplify/cache@npm:4.0.31" +"@aws-amplify/cache@npm:5.1.16": + version: 5.1.16 + resolution: "@aws-amplify/cache@npm:5.1.16" dependencies: - "@aws-amplify/core": 4.3.11 - checksum: 81c3add804bda06c44535d385d4ab0bdb7ae57f996fff8bc78c1e4b281382f3ba5f131f38bd6b0bfe9fc5d0284c31917e924f85d320785a6443fcca6c9a380d0 + "@aws-amplify/core": 5.8.10 + tslib: ^1.8.0 + checksum: 6218704353426cf172d4b309be1beed7f9219408179a36f46588c78c30c470bc7e27018d3b5a2336d09019cb16b3955826a0794ed17a9da28605987e695a74c0 languageName: node linkType: hard -"@aws-amplify/cli-extensibility-helper@3.0.8, @aws-amplify/cli-extensibility-helper@workspace:packages/amplify-cli-extensibility-helper": +"@aws-amplify/cli-extensibility-helper@3.0.35, @aws-amplify/cli-extensibility-helper@workspace:packages/amplify-cli-extensibility-helper": version: 0.0.0-use.local resolution: "@aws-amplify/cli-extensibility-helper@workspace:packages/amplify-cli-extensibility-helper" dependencies: - "@aws-amplify/amplify-category-custom": 3.0.8 - "@aws-amplify/amplify-cli-core": 4.0.8 - aws-cdk-lib: ~2.68.0 + "@aws-amplify/amplify-category-custom": 3.1.25 + "@aws-amplify/amplify-cli-core": 4.3.11 + aws-cdk-lib: ~2.177.0 languageName: unknown linkType: soft -"@aws-amplify/cli-internal@12.0.3, @aws-amplify/cli-internal@workspace:packages/amplify-cli": +"@aws-amplify/cli-internal@12.14.2, @aws-amplify/cli-internal@workspace:packages/amplify-cli": version: 0.0.0-use.local resolution: "@aws-amplify/cli-internal@workspace:packages/amplify-cli" dependencies: - "@aws-amplify/amplify-app": 5.0.8 - "@aws-amplify/amplify-category-analytics": 5.0.10 - "@aws-amplify/amplify-category-api": ^5.4.1 - "@aws-amplify/amplify-category-auth": 3.2.3 - "@aws-amplify/amplify-category-custom": 3.0.8 - "@aws-amplify/amplify-category-function": 5.3.3 - "@aws-amplify/amplify-category-geo": 3.2.3 - "@aws-amplify/amplify-category-hosting": 3.5.11 - "@aws-amplify/amplify-category-interactions": 5.1.3 - "@aws-amplify/amplify-category-notifications": 2.24.10 - "@aws-amplify/amplify-category-predictions": 5.2.3 - "@aws-amplify/amplify-category-storage": 5.2.3 - "@aws-amplify/amplify-cli-core": 4.0.8 - "@aws-amplify/amplify-cli-logger": 1.3.2 - "@aws-amplify/amplify-cli-shared-interfaces": 1.2.2 - "@aws-amplify/amplify-console-hosting": 2.5.8 - "@aws-amplify/amplify-container-hosting": 2.6.8 - "@aws-amplify/amplify-dotnet-function-template-provider": 2.5.8 - "@aws-amplify/amplify-environment-parameters": 1.6.3 - "@aws-amplify/amplify-frontend-android": 3.5.4 - "@aws-amplify/amplify-frontend-flutter": 1.4.2 - "@aws-amplify/amplify-frontend-ios": 3.6.10 - "@aws-amplify/amplify-frontend-javascript": 3.9.8 - "@aws-amplify/amplify-function-plugin-interface": 1.10.2 - "@aws-amplify/amplify-go-function-template-provider": 1.4.3 - "@aws-amplify/amplify-nodejs-function-template-provider": 2.8.3 - "@aws-amplify/amplify-prompts": 2.7.0 - "@aws-amplify/amplify-provider-awscloudformation": 8.2.3 - "@aws-amplify/amplify-python-function-template-provider": 1.4.3 - "@aws-amplify/amplify-util-import": 2.6.0 - "@aws-amplify/amplify-util-mock": 5.2.3 - "@aws-amplify/amplify-util-uibuilder": 1.8.3 + "@aws-amplify/amplify-app": 5.0.38 + "@aws-amplify/amplify-category-analytics": 5.0.37 + "@aws-amplify/amplify-category-api": ^5.12.10 + "@aws-amplify/amplify-category-auth": 3.7.17 + "@aws-amplify/amplify-category-custom": 3.1.25 + "@aws-amplify/amplify-category-function": 5.7.11 + "@aws-amplify/amplify-category-geo": 3.5.17 + "@aws-amplify/amplify-category-hosting": 3.5.38 + "@aws-amplify/amplify-category-interactions": 5.1.30 + "@aws-amplify/amplify-category-notifications": 2.26.27 + "@aws-amplify/amplify-category-predictions": 5.5.17 + "@aws-amplify/amplify-category-storage": 5.5.16 + "@aws-amplify/amplify-cli-core": 4.3.11 + "@aws-amplify/amplify-cli-logger": 1.3.8 + "@aws-amplify/amplify-cli-shared-interfaces": 1.2.5 + "@aws-amplify/amplify-console-hosting": 2.5.35 + "@aws-amplify/amplify-container-hosting": 2.8.15 + "@aws-amplify/amplify-dotnet-function-template-provider": 2.7.1 + "@aws-amplify/amplify-environment-parameters": 1.9.16 + "@aws-amplify/amplify-frontend-android": 3.5.8 + "@aws-amplify/amplify-frontend-flutter": 1.4.7 + "@aws-amplify/amplify-frontend-ios": 3.7.9 + "@aws-amplify/amplify-frontend-javascript": 3.10.19 + "@aws-amplify/amplify-function-plugin-interface": 1.12.1 + "@aws-amplify/amplify-go-function-template-provider": 1.4.8 + "@aws-amplify/amplify-nodejs-function-template-provider": 2.10.11 + "@aws-amplify/amplify-prompts": 2.8.6 + "@aws-amplify/amplify-provider-awscloudformation": 8.11.3 + "@aws-amplify/amplify-python-function-template-provider": 1.4.7 + "@aws-amplify/amplify-util-import": 2.8.3 + "@aws-amplify/amplify-util-mock": 5.10.11 + "@aws-amplify/amplify-util-uibuilder": 1.14.16 "@aws-cdk/cloudformation-diff": ~2.68.0 "@types/archiver": ^5.3.1 - "@types/ci-info": ^2.0.0 "@types/columnify": ^1.5.1 "@types/folder-hash": ^4.0.1 "@types/fs-extra": ^8.0.1 @@ -1092,17 +1122,18 @@ __metadata: "@types/tar-fs": ^2.0.0 "@types/treeify": ^1.0.0 "@types/update-notifier": ^5.1.0 - amplify-codegen: ^4.1.1 - amplify-dotnet-function-runtime-provider: 2.0.3 - amplify-go-function-runtime-provider: 2.3.21 - amplify-java-function-runtime-provider: 2.3.21 - amplify-java-function-template-provider: 1.5.20 - amplify-nodejs-function-runtime-provider: 2.4.3 - amplify-python-function-runtime-provider: 2.4.21 - aws-cdk-lib: ~2.68.0 - aws-sdk: ^2.1354.0 + amplify-codegen: ^4.10.2 + amplify-dotnet-function-runtime-provider: 2.1.1 + amplify-go-function-runtime-provider: 2.3.48 + amplify-headless-interface: 1.17.7 + amplify-java-function-runtime-provider: 2.3.48 + amplify-java-function-template-provider: 1.5.24 + amplify-nodejs-function-runtime-provider: 2.5.25 + amplify-python-function-runtime-provider: 2.4.48 + aws-cdk-lib: ~2.177.0 + aws-sdk: ^2.1464.0 chalk: ^4.1.1 - ci-info: ^2.0.0 + ci-info: ^3.8.0 cli-table3: ^0.6.0 cloudform-types: ^4.2.0 colors: 1.4.0 @@ -1113,18 +1144,19 @@ __metadata: fs-extra: ^8.1.0 glob: ^7.2.0 graphql: ^15.5.0 - graphql-transformer-core: ^8.1.2 + graphql-transformer-core: ^8.2.13 gunzip-maybe: ^1.4.2 hidefile: ^3.0.0 ini: ^1.3.5 inquirer: ^7.3.3 + jest: ^29.5.0 lodash: ^4.17.21 - nock: ^12.0.3 + nock: ^13.5.0 node-fetch: ^2.6.7 ora: ^4.0.3 progress: ^2.0.3 promise-sequential: ^1.1.1 - semver: ^7.3.5 + semver: ^7.5.4 tar-fs: ^2.1.1 treeify: ^1.1.0 typescript: ^4.9.5 @@ -1140,9 +1172,9 @@ __metadata: version: 0.0.0-use.local resolution: "@aws-amplify/cli@workspace:packages/amplify-cli-npm" dependencies: - "@aws-amplify/cli-internal": 12.0.3 + "@aws-amplify/cli-internal": 12.14.2 "@types/tar": ^6.1.1 - axios: ^0.26.0 + axios: ^1.6.7 rimraf: ^3.0.2 tar-stream: ^2.2.0 bin: @@ -1178,305 +1210,454 @@ __metadata: languageName: node linkType: hard -"@aws-amplify/core@npm:4.3.11": - version: 4.3.11 - resolution: "@aws-amplify/core@npm:4.3.11" +"@aws-amplify/core@npm:5.8.10": + version: 5.8.10 + resolution: "@aws-amplify/core@npm:5.8.10" dependencies: - "@aws-crypto/sha256-js": 1.0.0-alpha.0 + "@aws-crypto/sha256-js": 1.2.2 "@aws-sdk/client-cloudwatch-logs": 3.6.1 - "@aws-sdk/client-cognito-identity": 3.6.1 - "@aws-sdk/credential-provider-cognito-identity": 3.6.1 "@aws-sdk/types": 3.6.1 "@aws-sdk/util-hex-encoding": 3.6.1 + "@types/node-fetch": 2.6.4 + isomorphic-unfetch: ^3.0.0 + react-native-url-polyfill: ^1.3.0 + tslib: ^1.8.0 universal-cookie: ^4.0.4 zen-observable-ts: 0.8.19 - checksum: b749fdf7ee82ca988932651ec15a8e2096e96c8b17d896909f90cf1e2310eb528ee3f34364a3681f1ea28ed985b7d31704ee79dffe0c29004f281fea2192ea5f + checksum: 424c9e50caafc9733380d18a466a36e80706779e8f951f2f02e3c4b7529388a3a8ec6b25a9e3d4b2921a33a6d1de8ac0c2e6b40548c210252751be09e02e430d languageName: node linkType: hard -"@aws-amplify/datastore@npm:3.7.3": - version: 3.7.3 - resolution: "@aws-amplify/datastore@npm:3.7.3" +"@aws-amplify/datastore@npm:4.7.10": + version: 4.7.10 + resolution: "@aws-amplify/datastore@npm:4.7.10" dependencies: - "@aws-amplify/api": 4.0.29 - "@aws-amplify/auth": 4.3.19 - "@aws-amplify/core": 4.3.11 - "@aws-amplify/pubsub": 4.2.5 - amazon-cognito-identity-js: 5.2.3 + "@aws-amplify/api": 5.4.10 + "@aws-amplify/auth": 5.6.10 + "@aws-amplify/core": 5.8.10 + "@aws-amplify/pubsub": 5.5.10 + amazon-cognito-identity-js: 6.3.11 + buffer: 4.9.2 idb: 5.0.6 immer: 9.0.6 ulid: 2.3.0 - uuid: 3.3.2 + uuid: 3.4.0 zen-observable-ts: 0.8.19 zen-push: 0.2.1 - checksum: 6299c9034a3c33ebedea6602c712d57626e06019e8e7147e3d972378547f3a04a5ee20eea34c0055a46feb3838a0af783ff3dca89da5e17aacb8f94fa03cc98a + checksum: a647ec8198f9fe97cf3c163ed61afc4b6ce83900def3bc3f85d2c4d63ab57e0faf5772e245f431e3dcf8847839f264fdc203e07e5b5ca1f08186f1f83ebbb36f languageName: node linkType: hard -"@aws-amplify/geo@npm:1.1.11": - version: 1.1.11 - resolution: "@aws-amplify/geo@npm:1.1.11" +"@aws-amplify/geo@npm:2.3.10": + version: 2.3.10 + resolution: "@aws-amplify/geo@npm:2.3.10" dependencies: - "@aws-amplify/core": 4.3.11 - "@aws-sdk/client-location": 3.41.0 + "@aws-amplify/core": 5.8.10 + "@aws-sdk/client-location": 3.186.3 + "@turf/boolean-clockwise": 6.5.0 camelcase-keys: 6.2.2 - checksum: 4a8fd4d76938819d9698fa8e85056811296a69b825314be27a489cadb7ce0eef882171e53f92fa1ee750e42a1297b97830426d8814baef49caa28fe9ab400131 + tslib: ^1.8.0 + checksum: a7b78d3d0f13997200ff01e5fb24326ce22a0715321c8ccd3dc76c4bc0ee810425f6bf552ac6642617a4d1d2bdc02f540ed56c7883ecc50544291440c005d792 languageName: node linkType: hard -"@aws-amplify/graphql-auth-transformer@npm:2.1.6, @aws-amplify/graphql-auth-transformer@npm:^2.1.6": - version: 2.1.6 - resolution: "@aws-amplify/graphql-auth-transformer@npm:2.1.6" +"@aws-amplify/graphql-auth-transformer@npm:3.6.8, @aws-amplify/graphql-auth-transformer@npm:^3.6.8": + version: 3.6.8 + resolution: "@aws-amplify/graphql-auth-transformer@npm:3.6.8" dependencies: - "@aws-amplify/graphql-model-transformer": 1.3.2 - "@aws-amplify/graphql-relational-transformer": 1.2.2 - "@aws-amplify/graphql-transformer-core": 1.3.2 - "@aws-amplify/graphql-transformer-interfaces": 2.2.1 - aws-cdk-lib: ~2.68.0 - constructs: ^10.0.5 + "@aws-amplify/graphql-directives": 1.1.0 + "@aws-amplify/graphql-model-transformer": 2.11.7 + "@aws-amplify/graphql-relational-transformer": 2.5.14 + "@aws-amplify/graphql-transformer-core": 2.9.4 + "@aws-amplify/graphql-transformer-interfaces": 3.10.2 graphql: ^15.5.0 - graphql-mapping-template: 4.20.8 - graphql-transformer-common: 4.24.6 + graphql-mapping-template: 4.20.16 + graphql-transformer-common: 4.31.1 lodash: ^4.17.21 md5: ^2.3.0 - checksum: f05279e1ce3605a29b0d9dc7f4277193656b199c7daf0e98baac9375d36329bbc3ecdb239d815ae19cff289db088fd78d9dee4c525f2e56f24690427344b1fc8 + peerDependencies: + aws-cdk-lib: ^2.129.0 + constructs: ^10.3.0 + checksum: 85b534f9c084f8348537269670e9a303e35c10afd29465f68ee8331bc98862f925466a3aae10c90687941f6a548e0ea6420e6073a11fe861c25abafbd91876f8 languageName: node linkType: hard -"@aws-amplify/graphql-default-value-transformer@npm:1.1.6, @aws-amplify/graphql-default-value-transformer@npm:^1.1.6": - version: 1.1.6 - resolution: "@aws-amplify/graphql-default-value-transformer@npm:1.1.6" +"@aws-amplify/graphql-default-value-transformer@npm:2.3.16, @aws-amplify/graphql-default-value-transformer@npm:^2.3.16": + version: 2.3.16 + resolution: "@aws-amplify/graphql-default-value-transformer@npm:2.3.16" dependencies: - "@aws-amplify/graphql-transformer-core": 1.3.2 - "@aws-amplify/graphql-transformer-interfaces": 2.2.1 + "@aws-amplify/graphql-directives": 1.1.0 + "@aws-amplify/graphql-transformer-core": 2.9.4 + "@aws-amplify/graphql-transformer-interfaces": 3.10.2 graphql: ^15.5.0 - graphql-mapping-template: 4.20.8 - graphql-transformer-common: 4.24.6 + graphql-mapping-template: 4.20.16 + graphql-transformer-common: 4.31.1 libphonenumber-js: 1.9.47 - checksum: b974ab5452a117c4992242801f059d03782df9426d3e3a628b24222d18946a1f0c3f1a8d9a46a0361c2aea3c6e75385586c483ad2de8304d5c41de4469fa1abb + checksum: ab4898fd9e724f3c7fd4a6c3b4cfef24a8ad1be9fa0318bcb706674218139d530b0e9907c3949ac533497f7c1da1e9690b319e7c58c190aa37d2e411fee0d799 languageName: node linkType: hard -"@aws-amplify/graphql-docs-generator@npm:4.0.2": - version: 4.0.2 - resolution: "@aws-amplify/graphql-docs-generator@npm:4.0.2" +"@aws-amplify/graphql-directives@npm:1.1.0, @aws-amplify/graphql-directives@npm:^1.0.1": + version: 1.1.0 + resolution: "@aws-amplify/graphql-directives@npm:1.1.0" + checksum: ad1d22f2e48c2f9f32b59e539a60381e2e2c17e5ab719ca05bc57bbfc93302d3b9de5315b08fb376e04b11c3ab47d7f73893dc91e3d837703bcfbbd25505eb09 + languageName: node + linkType: hard + +"@aws-amplify/graphql-docs-generator@npm:4.2.1": + version: 4.2.1 + resolution: "@aws-amplify/graphql-docs-generator@npm:4.2.1" dependencies: graphql: ^15.5.0 handlebars: 4.7.7 yargs: ^15.1.0 bin: graphql-docs-generator: bin/cli - checksum: 7da943001200254ff04ee12cf263768293348a90b96735226dbeea3ddef6f29cd07129e54dad2d9b845c5bed3e7a147528dabbe69db6221b5fca8151b6548495 + checksum: 65b81a7cc385a9d44a2a9e13d024c7baea8f96b214438d2031ffe93378c57772e64de29c3c96ec13ea53e96a10bf05424bae5d23989e1ebca6669292dd0b79a3 languageName: node linkType: hard -"@aws-amplify/graphql-function-transformer@npm:1.2.4, @aws-amplify/graphql-function-transformer@npm:^1.2.4": - version: 1.2.4 - resolution: "@aws-amplify/graphql-function-transformer@npm:1.2.4" +"@aws-amplify/graphql-function-transformer@npm:2.1.28, @aws-amplify/graphql-function-transformer@npm:^2.1.28": + version: 2.1.28 + resolution: "@aws-amplify/graphql-function-transformer@npm:2.1.28" dependencies: - "@aws-amplify/graphql-transformer-core": 1.3.2 - "@aws-amplify/graphql-transformer-interfaces": 2.2.1 - aws-cdk-lib: ~2.68.0 - constructs: ^10.0.5 + "@aws-amplify/graphql-directives": 1.1.0 + "@aws-amplify/graphql-transformer-core": 2.9.4 + "@aws-amplify/graphql-transformer-interfaces": 3.10.2 graphql: ^15.5.0 - graphql-mapping-template: 4.20.8 - graphql-transformer-common: 4.24.6 - checksum: 65db72982927590dd7248ef975a0f48a7b9575aafbda6117a927328016efb591116787a7930aabc8e6c6c94206e176602e32a0cd544aef8e9c27c17bf2c0f8c9 + graphql-mapping-template: 4.20.16 + graphql-transformer-common: 4.31.1 + peerDependencies: + aws-cdk-lib: ^2.129.0 + constructs: ^10.3.0 + checksum: 107a52edc17d5a650e68b867aa99d40a4b365889a4f2019126369770f310c0314e189ff85599cbc401e310b6294d539e395ded64ad2f3dc86114bcbf1381e3d5 languageName: node linkType: hard -"@aws-amplify/graphql-http-transformer@npm:1.2.4, @aws-amplify/graphql-http-transformer@npm:^1.2.4": - version: 1.2.4 - resolution: "@aws-amplify/graphql-http-transformer@npm:1.2.4" +"@aws-amplify/graphql-generator@npm:0.5.2": + version: 0.5.2 + resolution: "@aws-amplify/graphql-generator@npm:0.5.2" + dependencies: + "@aws-amplify/appsync-modelgen-plugin": 2.15.1 + "@aws-amplify/graphql-directives": ^1.0.1 + "@aws-amplify/graphql-docs-generator": 4.2.1 + "@aws-amplify/graphql-types-generator": 3.6.0 + "@graphql-codegen/core": ^2.6.6 + "@graphql-codegen/plugin-helpers": ^3.1.1 + "@graphql-tools/apollo-engine-loader": ^8.0.0 + "@graphql-tools/schema": ^9.0.0 + "@graphql-tools/utils": ^9.2.1 + graphql: ^15.5.0 + prettier: ^1.19.1 + checksum: 475391318a578c95fbbca367a12fc9e0b12ad167cd1690b9a53b9dacde2368413a8913030cbb1515a925eb235f65351ca0a02fee9e165464d33878e006cd6ce4 + languageName: node + linkType: hard + +"@aws-amplify/graphql-http-transformer@npm:2.1.28, @aws-amplify/graphql-http-transformer@npm:^2.1.28": + version: 2.1.28 + resolution: "@aws-amplify/graphql-http-transformer@npm:2.1.28" dependencies: - "@aws-amplify/graphql-transformer-core": 1.3.2 - "@aws-amplify/graphql-transformer-interfaces": 2.2.1 - aws-cdk-lib: ~2.68.0 - constructs: ^10.0.5 + "@aws-amplify/graphql-directives": 1.1.0 + "@aws-amplify/graphql-transformer-core": 2.9.4 + "@aws-amplify/graphql-transformer-interfaces": 3.10.2 graphql: ^15.5.0 - graphql-mapping-template: 4.20.8 - graphql-transformer-common: 4.24.6 - checksum: 4629a971d7839724235b0ea6491fe24ed3501349de83841f927b6cd4c41b9a1fac16029ef94555f17bf505254eeb9becbac8343e2eae632413e654f14e0c843f + graphql-mapping-template: 4.20.16 + graphql-transformer-common: 4.31.1 + peerDependencies: + aws-cdk-lib: ^2.129.0 + constructs: ^10.3.0 + checksum: 1dba3ddb21fb5d4c8982816182720d569bb69d10eac7b3e898c31c94fb352c0c8ffc528a3c9782ac050fd9514d2701094fae3ebf974ff21fab16b5c64010419f languageName: node linkType: hard -"@aws-amplify/graphql-index-transformer@npm:1.2.2, @aws-amplify/graphql-index-transformer@npm:^1.2.2": - version: 1.2.2 - resolution: "@aws-amplify/graphql-index-transformer@npm:1.2.2" +"@aws-amplify/graphql-index-transformer@npm:2.4.12, @aws-amplify/graphql-index-transformer@npm:^2.4.12": + version: 2.4.12 + resolution: "@aws-amplify/graphql-index-transformer@npm:2.4.12" dependencies: - "@aws-amplify/graphql-model-transformer": 1.3.2 - "@aws-amplify/graphql-transformer-core": 1.3.2 - "@aws-amplify/graphql-transformer-interfaces": 2.2.1 - "@aws-cdk/assert": ~2.68.0 - aws-cdk-lib: ~2.68.0 - constructs: ^10.0.5 + "@aws-amplify/graphql-directives": 1.1.0 + "@aws-amplify/graphql-model-transformer": 2.11.7 + "@aws-amplify/graphql-transformer-core": 2.9.4 + "@aws-amplify/graphql-transformer-interfaces": 3.10.2 graphql: ^15.5.0 - graphql-mapping-template: 4.20.8 - graphql-transformer-common: 4.24.6 - checksum: 23e2d197a362d53e2e0eacdfc8c3ea083afaa32f40cbc56cf350cbc0f4c09844174f7aa5c05284d6dd7a56e0bc4e293b7f829216a6cff72f26d00948fc3308d8 + graphql-mapping-template: 4.20.16 + graphql-transformer-common: 4.31.1 + peerDependencies: + aws-cdk-lib: ^2.129.0 + constructs: ^10.3.0 + checksum: b20e4091e6cc39504d83bfdfa7b4bb3bfe6e78304d0ba8ac041e4cef00a0adff0257829f3ccad971860eb0b3e3dc08cb1e108297bc287540d5b81f63db355410 languageName: node linkType: hard -"@aws-amplify/graphql-maps-to-transformer@npm:2.1.6, @aws-amplify/graphql-maps-to-transformer@npm:^2.1.6": - version: 2.1.6 - resolution: "@aws-amplify/graphql-maps-to-transformer@npm:2.1.6" +"@aws-amplify/graphql-maps-to-transformer@npm:3.4.26, @aws-amplify/graphql-maps-to-transformer@npm:^3.4.26": + version: 3.4.26 + resolution: "@aws-amplify/graphql-maps-to-transformer@npm:3.4.26" dependencies: - "@aws-amplify/graphql-transformer-core": 1.3.2 - "@aws-amplify/graphql-transformer-interfaces": 2.2.1 - aws-cdk-lib: ~2.68.0 - constructs: ^10.0.5 - graphql-mapping-template: 4.20.8 - graphql-transformer-common: 4.24.6 - checksum: 0a8df810add14e4bab021db06e8dbf99a84c2677ca73b35d5bd37f6fbfc9d3deed0dacf8c0b6fb559b9e2adb1d286e49d19267067a9cf40ab1f972f60d587497 + "@aws-amplify/graphql-directives": 1.1.0 + "@aws-amplify/graphql-transformer-core": 2.9.4 + "@aws-amplify/graphql-transformer-interfaces": 3.10.2 + graphql-mapping-template: 4.20.16 + graphql-transformer-common: 4.31.1 + peerDependencies: + aws-cdk-lib: ^2.129.0 + constructs: ^10.3.0 + checksum: bc525af145fb82bd1b44d4230db0432998019e17eca6a7dea00f7e69b8ab957160b753f8f37316be3977b50ae5d460052c2822f051d4cfd4684652ef4fea5e02 languageName: node linkType: hard -"@aws-amplify/graphql-model-transformer@npm:1.3.2, @aws-amplify/graphql-model-transformer@npm:^1.3.2": - version: 1.3.2 - resolution: "@aws-amplify/graphql-model-transformer@npm:1.3.2" +"@aws-amplify/graphql-model-transformer@npm:2.11.4": + version: 2.11.4 + resolution: "@aws-amplify/graphql-model-transformer@npm:2.11.4" dependencies: - "@aws-amplify/graphql-transformer-core": 1.3.2 - "@aws-amplify/graphql-transformer-interfaces": 2.2.1 - aws-cdk-lib: ~2.68.0 - constructs: ^10.0.5 + "@aws-amplify/graphql-directives": 1.1.0 + "@aws-amplify/graphql-transformer-core": 2.9.3 + "@aws-amplify/graphql-transformer-interfaces": 3.10.1 graphql: ^15.5.0 - graphql-mapping-template: 4.20.8 - graphql-transformer-common: 4.24.6 - checksum: 3937d40329bada7cb035e3ae43059e7c983fcf45919c0f9c16d8c73c7e781a1073fe6c0bac7c71a60f2b43516b33e39fbb1018cd87c41c71b036a437fa4c3a01 + graphql-mapping-template: 4.20.16 + graphql-transformer-common: 4.31.1 + peerDependencies: + aws-cdk-lib: ^2.129.0 + constructs: ^10.3.0 + checksum: 7b31492132dfb4c2a2bd08256e2901b4648454497ffb8638891b0e034307a99d1139c5b181b5b5f9a2db7919e3e9977b01bf55d47932f9244bc291fd1895e5d9 languageName: node linkType: hard -"@aws-amplify/graphql-predictions-transformer@npm:1.2.4, @aws-amplify/graphql-predictions-transformer@npm:^1.2.4": - version: 1.2.4 - resolution: "@aws-amplify/graphql-predictions-transformer@npm:1.2.4" +"@aws-amplify/graphql-model-transformer@npm:2.11.7, @aws-amplify/graphql-model-transformer@npm:^2.11.7": + version: 2.11.7 + resolution: "@aws-amplify/graphql-model-transformer@npm:2.11.7" dependencies: - "@aws-amplify/graphql-transformer-core": 1.3.2 - "@aws-amplify/graphql-transformer-interfaces": 2.2.1 - aws-cdk-lib: ~2.68.0 - constructs: ^10.0.5 + "@aws-amplify/graphql-directives": 1.1.0 + "@aws-amplify/graphql-transformer-core": 2.9.4 + "@aws-amplify/graphql-transformer-interfaces": 3.10.2 graphql: ^15.5.0 - graphql-mapping-template: 4.20.8 - graphql-transformer-common: 4.24.6 - checksum: b6a1a86db7fbfa21778d25f51ab1c5fb95338ae9ad96bb1efc4e301e6ca316860fe11ef8c4d3e28395e10ec84cc369cb1573082e2cab4f77aa4aa9dc77914c70 + graphql-mapping-template: 4.20.16 + graphql-transformer-common: 4.31.1 + peerDependencies: + aws-cdk-lib: ^2.129.0 + constructs: ^10.3.0 + checksum: 1d29cea5ad5e90d162d72a20ba72297f5aebac2d8101da04cb9d28184e7fdcac6e8ca452d67883c38a65aa0099e4f8fdf2e7f47f42de315ffc1fe8660548e7a4 languageName: node linkType: hard -"@aws-amplify/graphql-relational-transformer@npm:1.2.2, @aws-amplify/graphql-relational-transformer@npm:^1.2.2": - version: 1.2.2 - resolution: "@aws-amplify/graphql-relational-transformer@npm:1.2.2" +"@aws-amplify/graphql-predictions-transformer@npm:2.1.28, @aws-amplify/graphql-predictions-transformer@npm:^2.1.28": + version: 2.1.28 + resolution: "@aws-amplify/graphql-predictions-transformer@npm:2.1.28" dependencies: - "@aws-amplify/graphql-index-transformer": 1.2.2 - "@aws-amplify/graphql-model-transformer": 1.3.2 - "@aws-amplify/graphql-transformer-core": 1.3.2 - "@aws-amplify/graphql-transformer-interfaces": 2.2.1 - aws-cdk-lib: ~2.68.0 - constructs: ^10.0.5 + "@aws-amplify/graphql-directives": 1.1.0 + "@aws-amplify/graphql-transformer-core": 2.9.4 + "@aws-amplify/graphql-transformer-interfaces": 3.10.2 + graphql: ^15.5.0 + graphql-mapping-template: 4.20.16 + graphql-transformer-common: 4.31.1 + peerDependencies: + aws-cdk-lib: ^2.129.0 + constructs: ^10.3.0 + checksum: 6d2742318fa4af8d03f7c9215deb9b11f808c3c979dd13385e1277ccc96f7b5165e26aab68f966422db1661bef8d1ed0859a9dc3552cfae2938ea535b3baaddb + languageName: node + linkType: hard + +"@aws-amplify/graphql-relational-transformer@npm:2.5.14, @aws-amplify/graphql-relational-transformer@npm:^2.5.14": + version: 2.5.14 + resolution: "@aws-amplify/graphql-relational-transformer@npm:2.5.14" + dependencies: + "@aws-amplify/graphql-directives": 1.1.0 + "@aws-amplify/graphql-index-transformer": 2.4.12 + "@aws-amplify/graphql-model-transformer": 2.11.7 + "@aws-amplify/graphql-transformer-core": 2.9.4 + "@aws-amplify/graphql-transformer-interfaces": 3.10.2 graphql: ^15.5.0 - graphql-mapping-template: 4.20.8 - graphql-transformer-common: 4.24.6 + graphql-mapping-template: 4.20.16 + graphql-transformer-common: 4.31.1 immer: ^9.0.12 - checksum: feb19ba3a17e6fcb02d8daa62edc751e13d5e59afb53c9dd572dd881b100a0d6b3eb7e669180d2d634a6cea193a3c881513604a5178992fd8be07af4cff72d17 + peerDependencies: + aws-cdk-lib: ^2.129.0 + constructs: ^10.3.0 + checksum: 1d746bbc17ebe9a264b4ee775ea3047d070c9b9f5d391d936b63666812f24ddc6274d8b23f1ec84588c97fa6376ead26f3bb47530fbc829b368fa57aff8664c8 languageName: node linkType: hard -"@aws-amplify/graphql-schema-generator@npm:0.1.2": - version: 0.1.2 - resolution: "@aws-amplify/graphql-schema-generator@npm:0.1.2" +"@aws-amplify/graphql-schema-generator@npm:^0.9.4": + version: 0.9.4 + resolution: "@aws-amplify/graphql-schema-generator@npm:0.9.4" dependencies: - "@aws-amplify/graphql-transformer-core": 1.3.2 + "@aws-amplify/graphql-transformer-core": 2.9.3 + "@aws-amplify/graphql-transformer-interfaces": 3.10.1 + "@aws-sdk/client-ec2": 3.624.0 + "@aws-sdk/client-iam": 3.624.0 + "@aws-sdk/client-lambda": 3.624.0 + "@aws-sdk/client-rds": 3.624.0 + csv-parse: ^5.5.2 + fs-extra: 11.1.1 graphql: ^15.5.0 + graphql-transformer-common: 4.31.1 knex: ~2.4.0 - mysql2: ~2.3.3 + mysql2: ~3.9.7 + ora: ^4.0.3 + pg: ~8.11.3 + pluralize: ^8.0.0 + typescript: ^4.8.4 + checksum: 3c3c6a97f4011c7051a89d9327c1cf02097c20f1e7e4180403e1a50e1be5bb7923b0732fe215e35ab145b40615ed33cef201dfe08103b19cc7ce7a81df1a6356 + languageName: node + linkType: hard + +"@aws-amplify/graphql-searchable-transformer@npm:2.7.12, @aws-amplify/graphql-searchable-transformer@npm:^2.7.12": + version: 2.7.12 + resolution: "@aws-amplify/graphql-searchable-transformer@npm:2.7.12" + dependencies: + "@aws-amplify/graphql-directives": 1.1.0 + "@aws-amplify/graphql-model-transformer": 2.11.7 + "@aws-amplify/graphql-transformer-core": 2.9.4 + "@aws-amplify/graphql-transformer-interfaces": 3.10.2 + graphql: ^15.5.0 + graphql-mapping-template: 4.20.16 + graphql-transformer-common: 4.31.1 peerDependencies: - "@aws-amplify/amplify-prompts": ^2.6.8 - checksum: 8fae9528cd95f9b0e6c0e82894139f75848f68b1a9b8e1c3de3102b3294ccd8010223466f8db999ef8f12ff6bf5171107c704632ff2b822dc9f2caa6b7da4fef + aws-cdk-lib: ^2.129.0 + constructs: ^10.3.0 + checksum: 531b96a3ab1b80fcc1137c9d66cb0e824bc413dfdf86a840ea78952a0131aab41b985f24c4f79535a45342c916c748012eae71c5ba88c2569f162c372446c5d1 languageName: node linkType: hard -"@aws-amplify/graphql-searchable-transformer@npm:1.2.4, @aws-amplify/graphql-searchable-transformer@npm:^1.2.4": - version: 1.2.4 - resolution: "@aws-amplify/graphql-searchable-transformer@npm:1.2.4" +"@aws-amplify/graphql-sql-transformer@npm:^0.3.9": + version: 0.3.9 + resolution: "@aws-amplify/graphql-sql-transformer@npm:0.3.9" dependencies: - "@aws-amplify/graphql-model-transformer": 1.3.2 - "@aws-amplify/graphql-transformer-core": 1.3.2 - "@aws-amplify/graphql-transformer-interfaces": 2.2.1 - aws-cdk-lib: ~2.68.0 - constructs: ^10.0.5 + "@aws-amplify/graphql-directives": 1.1.0 + "@aws-amplify/graphql-model-transformer": 2.11.4 + "@aws-amplify/graphql-transformer-core": 2.9.3 + "@aws-amplify/graphql-transformer-interfaces": 3.10.1 graphql: ^15.5.0 - graphql-mapping-template: 4.20.8 - graphql-transformer-common: 4.24.6 - checksum: be70a14330e99fe65f8ef9232cfe260535641f56a63943874fe55b12c6b910132d4db56c5dadbb4a7588be71b2db82677ee26313508bbfe011f84aad6df98404 + graphql-mapping-template: 4.20.16 + graphql-transformer-common: 4.31.1 + peerDependencies: + aws-cdk-lib: ^2.129.0 + constructs: ^10.3.0 + checksum: b67c567b26a390b31b8bbb6af2e4746ac981fd47a134fc7c4c833ba8778c5104c5f7a20d52d4454be40b8d1d07c12a497ca310f680026b1d440ea4b435695303 languageName: node linkType: hard -"@aws-amplify/graphql-transformer-core@npm:1.3.2, @aws-amplify/graphql-transformer-core@npm:^1.3.2": - version: 1.3.2 - resolution: "@aws-amplify/graphql-transformer-core@npm:1.3.2" +"@aws-amplify/graphql-transformer-core@npm:2.9.3": + version: 2.9.3 + resolution: "@aws-amplify/graphql-transformer-core@npm:2.9.3" dependencies: - "@aws-amplify/graphql-transformer-interfaces": 2.2.1 - aws-cdk-lib: ~2.68.0 - constructs: ^10.0.5 + "@aws-amplify/graphql-directives": 1.1.0 + "@aws-amplify/graphql-transformer-interfaces": 3.10.1 fs-extra: ^8.1.0 graphql: ^15.5.0 - graphql-transformer-common: 4.24.6 + graphql-mapping-template: 4.20.16 + graphql-transformer-common: 4.31.1 hjson: ^3.2.2 lodash: ^4.17.21 md5: ^2.3.0 object-hash: ^3.0.0 ts-dedent: ^2.0.0 - vm2: ^3.9.8 peerDependencies: - "@aws-amplify/amplify-cli-core": 4.0.4 - checksum: 2dc2074093d53b2dd41f565931596c7521df93110038987896f490dec3fe1b6b1f7aceed0887c5b4413d76ad50b9adc8a7839d963e6cd46bbf5f87394332f989 + aws-cdk-lib: ^2.129.0 + constructs: ^10.3.0 + checksum: 6fa37bd0126601b905d76e2d1f501431ab75928f901479f1c57ec4653ef02710108d1759ab56d2c4d66cc2127bf08183a1c2e5db74ad33559a17f28c20249a84 languageName: node linkType: hard -"@aws-amplify/graphql-transformer-interfaces@npm:2.2.1, @aws-amplify/graphql-transformer-interfaces@npm:^2.2.1": - version: 2.2.1 - resolution: "@aws-amplify/graphql-transformer-interfaces@npm:2.2.1" +"@aws-amplify/graphql-transformer-core@npm:2.9.4, @aws-amplify/graphql-transformer-core@npm:^2.9.4": + version: 2.9.4 + resolution: "@aws-amplify/graphql-transformer-core@npm:2.9.4" + dependencies: + "@aws-amplify/graphql-directives": 1.1.0 + "@aws-amplify/graphql-transformer-interfaces": 3.10.2 + fs-extra: ^8.1.0 + graphql: ^15.5.0 + graphql-mapping-template: 4.20.16 + graphql-transformer-common: 4.31.1 + hjson: ^3.2.2 + lodash: ^4.17.21 + md5: ^2.3.0 + object-hash: ^3.0.0 + ts-dedent: ^2.0.0 + peerDependencies: + aws-cdk-lib: ^2.129.0 + constructs: ^10.3.0 + checksum: a2e8e607b6c74bcd6317c3e77662cbf83a05a5e00b2f45fd376240e85844c3233d1f10c8c2bb1d58028390ae306f9b0a03847821675509bcfeeebc7ae06ad517 + languageName: node + linkType: hard + +"@aws-amplify/graphql-transformer-interfaces@npm:3.10.1": + version: 3.10.1 + resolution: "@aws-amplify/graphql-transformer-interfaces@npm:3.10.1" dependencies: - aws-cdk-lib: ~2.68.0 - constructs: ^10.0.5 graphql: ^15.5.0 - checksum: f2a6661f427eb74f138e821e4f326e23ef311ba7b705330f96aea79d2ee286c9b9fcaefc6695f4a3dd7e1f2d6cc824b0f9e60fc61af9468dca19ddc8a281ce80 + peerDependencies: + aws-cdk-lib: ^2.129.0 + constructs: ^10.3.0 + checksum: 5a28b3a8b69f3dffb57bdb7ac4baa52e02e927126f872d2dd2f032bb6dae6185da43d30361244dc90e58c993af97755d40f853cb948999e0dd6dd4a1c78f15a2 languageName: node linkType: hard -"@aws-amplify/graphql-transformer-migrator@npm:2.1.6, @aws-amplify/graphql-transformer-migrator@npm:^2.1.6": - version: 2.1.6 - resolution: "@aws-amplify/graphql-transformer-migrator@npm:2.1.6" +"@aws-amplify/graphql-transformer-interfaces@npm:3.10.2, @aws-amplify/graphql-transformer-interfaces@npm:^3.10.2": + version: 3.10.2 + resolution: "@aws-amplify/graphql-transformer-interfaces@npm:3.10.2" + dependencies: + graphql: ^15.5.0 + peerDependencies: + aws-cdk-lib: ^2.129.0 + constructs: ^10.3.0 + checksum: 5b8ec30a4c6ab2b423b08d887753e5cc6c1b9fe2cbb06976d772c890f9fcbf3d9ecbfeb8958ea6cdac13ecca4f79d817bbfa1d1c1a908644aa8ebb52b638cd7f + languageName: node + linkType: hard + +"@aws-amplify/graphql-transformer-migrator@npm:2.2.28, @aws-amplify/graphql-transformer-migrator@npm:^2.2.28": + version: 2.2.28 + resolution: "@aws-amplify/graphql-transformer-migrator@npm:2.2.28" dependencies: - "@aws-amplify/graphql-transformer-core": 1.3.2 + "@aws-amplify/graphql-transformer-core": 2.9.4 fs-extra: ^8.1.0 - glob: ^7.2.0 + glob: ^10.3.0 graphql: ^15.5.0 - graphql-transformer-common: 4.24.6 + graphql-transformer-common: 4.31.1 lodash: ^4.17.21 peerDependencies: - "@aws-amplify/amplify-cli-core": 4.0.4 - "@aws-amplify/amplify-environment-parameters": ^1.5.0 - "@aws-amplify/amplify-prompts": ^2.6.8 - checksum: f7c2dc7cb187a9521c0444bf406d1875c1d717b14d036b56690256d8c777ceb75a5f8abde90c180a033d9a14b515f8e03848693456419562bd52293047cb637b + "@aws-amplify/amplify-cli-core": ^4.3.9 + "@aws-amplify/amplify-environment-parameters": ^1.9.14 + "@aws-amplify/amplify-prompts": ^2.8.6 + checksum: 813e5dbbd464c6a9af921b2ddef4c6d177cc664cc422c0c8d724b6212a9361726be001e71a22309ce68dc71ea0efe7ee436ad541f8cdd7f48973b99981beb856 languageName: node linkType: hard -"@aws-amplify/graphql-types-generator@npm:3.0.2": - version: 3.0.2 - resolution: "@aws-amplify/graphql-types-generator@npm:3.0.2" +"@aws-amplify/graphql-transformer@npm:1.6.8, @aws-amplify/graphql-transformer@npm:^1.1.0": + version: 1.6.8 + resolution: "@aws-amplify/graphql-transformer@npm:1.6.8" + dependencies: + "@aws-amplify/graphql-auth-transformer": 3.6.8 + "@aws-amplify/graphql-default-value-transformer": 2.3.16 + "@aws-amplify/graphql-function-transformer": 2.1.28 + "@aws-amplify/graphql-http-transformer": 2.1.28 + "@aws-amplify/graphql-index-transformer": 2.4.12 + "@aws-amplify/graphql-maps-to-transformer": 3.4.26 + "@aws-amplify/graphql-model-transformer": 2.11.7 + "@aws-amplify/graphql-predictions-transformer": 2.1.28 + "@aws-amplify/graphql-relational-transformer": 2.5.14 + "@aws-amplify/graphql-searchable-transformer": 2.7.12 + "@aws-amplify/graphql-sql-transformer": ^0.3.9 + "@aws-amplify/graphql-transformer-core": 2.9.4 + "@aws-amplify/graphql-transformer-interfaces": 3.10.2 + peerDependencies: + aws-cdk-lib: ^2.129.0 + constructs: ^10.3.0 + checksum: 41e42e3bfa5730bcf34f57d6596c8f3b6244a6b7e32869ffb8a865896018f3d1cd410a4ef4ce8a1308b7cf63f3d4551739f0fe3931044829dff26efadeb5da7f + languageName: node + linkType: hard + +"@aws-amplify/graphql-types-generator@npm:3.6.0": + version: 3.6.0 + resolution: "@aws-amplify/graphql-types-generator@npm:3.6.0" dependencies: "@babel/generator": 7.0.0-beta.4 "@babel/types": 7.0.0-beta.4 - "@types/babel-generator": ^6.25.0 - "@types/fs-extra": ^8.1.0 - "@types/prettier": ^1.19.0 - "@types/rimraf": ^3.0.0 babel-generator: ^6.26.1 babel-types: ^6.26.0 change-case: ^4.1.1 common-tags: ^1.8.0 core-js: ^3.6.4 fs-extra: ^8.1.0 - glob: ^7.1.6 + globby: ^11.1.0 graphql: ^15.5.0 inflected: ^2.0.4 prettier: ^1.19.1 @@ -1485,26 +1666,44 @@ __metadata: yargs: ^15.1.0 bin: graphql-types-generator: lib/cli.js - checksum: fb1cbf6f02ea6ba1198ce78fcfbc16839203edbd9a51cee4cff0674d2edb95c29bac5d94600ff523109e2d9d755d305169007b2040da1e45ae9610adf731175c + checksum: 825f0bbf7ca4b0e0943ad4029075e14b4012ba97a912ced738006ef10df143db07f3126f5ef30da8202b9093494d91cbd69e04e4dc1a539694accfef941c5f5c + languageName: node + linkType: hard + +"@aws-amplify/interactions@npm:5.2.16": + version: 5.2.16 + resolution: "@aws-amplify/interactions@npm:5.2.16" + dependencies: + "@aws-amplify/core": 5.8.10 + "@aws-sdk/client-lex-runtime-service": 3.186.3 + "@aws-sdk/client-lex-runtime-v2": 3.186.3 + base-64: 1.0.0 + fflate: 0.7.3 + pako: 2.0.4 + tslib: ^1.8.0 + checksum: 136adc3e84f04006ffd5984ce464ba0506e613b0161e6864531527c3ed9a9bfeddc7a046ca28d8bfa07157c5b083a893a521447d6e18dbb9eb9c1ae34cf8e5bc languageName: node linkType: hard -"@aws-amplify/interactions@npm:4.0.29": - version: 4.0.29 - resolution: "@aws-amplify/interactions@npm:4.0.29" +"@aws-amplify/notifications@npm:1.6.10": + version: 1.6.10 + resolution: "@aws-amplify/notifications@npm:1.6.10" dependencies: - "@aws-amplify/core": 4.3.11 - "@aws-sdk/client-lex-runtime-service": 3.6.1 - checksum: 823716790ad22498d40fa055957736a18c474d116d298b2464967db74fffa53107ab4b1efee59ab94384d51f89711291576db32a8180020ce70637d944c576b4 + "@aws-amplify/cache": 5.1.16 + "@aws-amplify/core": 5.8.10 + "@aws-amplify/rtn-push-notification": 1.1.12 + lodash: ^4.17.21 + uuid: ^3.2.1 + checksum: 34b507d09cb260f8c91b136cc6a9b595e2ae0a4b78a7ec82b779dd42eae5e32eeaea044fc7dafb5402d70cc70b5f585f5e666c2592e59a173e1ee4d383c78fe6 languageName: node linkType: hard -"@aws-amplify/predictions@npm:4.0.29": - version: 4.0.29 - resolution: "@aws-amplify/predictions@npm:4.0.29" +"@aws-amplify/predictions@npm:5.5.10": + version: 5.5.10 + resolution: "@aws-amplify/predictions@npm:5.5.10" dependencies: - "@aws-amplify/core": 4.3.11 - "@aws-amplify/storage": 4.4.12 + "@aws-amplify/core": 5.8.10 + "@aws-amplify/storage": 5.9.10 "@aws-sdk/client-comprehend": 3.6.1 "@aws-sdk/client-polly": 3.6.1 "@aws-sdk/client-rekognition": 3.6.1 @@ -1512,99 +1711,80 @@ __metadata: "@aws-sdk/client-translate": 3.6.1 "@aws-sdk/eventstream-marshaller": 3.6.1 "@aws-sdk/util-utf8-node": 3.6.1 + buffer: 4.9.2 + tslib: ^1.8.0 uuid: ^3.2.1 - checksum: 8d0007677eea9372d395d9e41e663af6ddf0c524eb5be3016d773b34bcb4f7c716b34a8972b7fab2b6b9456ac2fae77ca11ccdbe1d64e523c101d65ffb7e4fe1 + checksum: e6da7cbd9f86095fd442c51b5988cf04492d542c7706e889ea5eb3230ae0bf47a64568c4ecf38d23d325cd34fd52447d4e1c6e0b76e1211a0b2ebe64901a8e5d languageName: node linkType: hard -"@aws-amplify/pubsub@npm:4.2.5": - version: 4.2.5 - resolution: "@aws-amplify/pubsub@npm:4.2.5" +"@aws-amplify/pubsub@npm:5.5.10": + version: 5.5.10 + resolution: "@aws-amplify/pubsub@npm:5.5.10" dependencies: - "@aws-amplify/auth": 4.3.19 - "@aws-amplify/cache": 4.0.31 - "@aws-amplify/core": 4.3.11 + "@aws-amplify/auth": 5.6.10 + "@aws-amplify/cache": 5.1.16 + "@aws-amplify/core": 5.8.10 + buffer: 4.9.2 graphql: 15.8.0 - paho-mqtt: ^1.1.0 + tslib: ^1.8.0 + url: 0.11.0 uuid: ^3.2.1 zen-observable-ts: 0.8.19 - checksum: edde4286082a22680442705d6e1defb67e80ee9bd82547cf20f56cb8c9419c606f283d27175919aa45f893b4c17c49158756668453ed84366742e8c34e4dfe55 - languageName: node - linkType: hard - -"@aws-amplify/storage@npm:4.4.12": - version: 4.4.12 - resolution: "@aws-amplify/storage@npm:4.4.12" - dependencies: - "@aws-amplify/core": 4.3.11 - "@aws-sdk/client-s3": 3.6.1 - "@aws-sdk/s3-request-presigner": 3.6.1 - "@aws-sdk/util-create-request": 3.6.1 - "@aws-sdk/util-format-url": 3.6.1 - axios: 0.21.4 - events: ^3.1.0 - sinon: ^7.5.0 - checksum: c5a4feb3099709595ac9f1de687647130be757b8c0ebda0dd0331d438120628572276023cfdcefd8f03ed0d84e0d457d0c66b5ddd3d97521a61ee3472805a318 - languageName: node - linkType: hard - -"@aws-amplify/ui@npm:2.0.5": - version: 2.0.5 - resolution: "@aws-amplify/ui@npm:2.0.5" - checksum: 5b08faf8f7fca6c0bb716573686ef15bdf0de5a621a815ca7b0accca5847d18f8118b136ffda0e09556ffb780aed424a33a1c6fefadd3c00d8e8429b6b4d49da + checksum: 7ea5a4569fc0d5c9ac98bc054ec1c86e65930484c1f657726e83732f6a32e5339b67f30865ca8bece4475977989716f0ea95c7c61241d5b8cf436c1692503c9a languageName: node linkType: hard -"@aws-amplify/xr@npm:3.0.29": - version: 3.0.29 - resolution: "@aws-amplify/xr@npm:3.0.29" - dependencies: - "@aws-amplify/core": 4.3.11 - checksum: 0e8d3a2c7c695874611b0ff5dccd9657639cffcac28495af1b114737e337ac098a3f042f94b9d68fc0291e13a8babbe924037c66e35881aa9cf01ef92c09f3e6 +"@aws-amplify/rtn-push-notification@npm:1.1.12": + version: 1.1.12 + resolution: "@aws-amplify/rtn-push-notification@npm:1.1.12" + checksum: 31aeab0b04f4234a63a5c46498a5c14fd3eab21a8f9b69a5b68a80178fb63198157065523472c3582edd521223ca199fd20316eca7fb337bcce91a984dc4070c languageName: node linkType: hard -"@aws-cdk/assert@npm:~2.68.0": - version: 2.68.0 - resolution: "@aws-cdk/assert@npm:2.68.0" +"@aws-amplify/storage@npm:5.9.10": + version: 5.9.10 + resolution: "@aws-amplify/storage@npm:5.9.10" dependencies: - "@aws-cdk/cloudformation-diff": 2.68.0 - peerDependencies: - aws-cdk-lib: ^2.68.0 - constructs: ^10.0.0 - jest: ">=26.6.3" - checksum: 4f5ed8b4ab45e32e014f698faf8298e3a1e73a7ad1ac19395efa7379b9c6f9bdb4bf6f747136341c420c870763ff1a566c4b08f72be49e9c3231778672bd0a85 + "@aws-amplify/core": 5.8.10 + "@aws-sdk/md5-js": 3.6.1 + "@aws-sdk/types": 3.6.1 + buffer: 4.9.2 + events: ^3.1.0 + fast-xml-parser: ^4.2.5 + tslib: ^1.8.0 + checksum: ce1981da81c9e70c8c1966a03bce9808102cfa0dd5a1b9fc169621ad1b5759a89d985711376effd0ea3db3ef12a217fcf81d4d74092ded9bc8dc9a875adfb581 languageName: node linkType: hard -"@aws-cdk/asset-awscli-v1@npm:^2.2.97": - version: 2.2.106 - resolution: "@aws-cdk/asset-awscli-v1@npm:2.2.106" - checksum: 3e442ce0b67d45c84666ff6e66dbfca24ccf65164afb901d2a7c5928cdd35203597a6b11cec67704b0955bf060d4ad2ababf759175e608aad1dd6104b3a7a8db +"@aws-cdk/asset-awscli-v1@npm:^2.2.208": + version: 2.2.221 + resolution: "@aws-cdk/asset-awscli-v1@npm:2.2.221" + checksum: 9afea8398060bf258ef39184a31236fca336e1143e24b88152dc5e9ba8e3a2277d654eff64a8155bf569bf81869a87a83e1a90773316a927e7c83d7605129c75 languageName: node linkType: hard -"@aws-cdk/asset-kubectl-v20@npm:^2.1.1": - version: 2.1.1 - resolution: "@aws-cdk/asset-kubectl-v20@npm:2.1.1" - checksum: d06893086e49e852e765dea48acd2dd1567820a014121804d4d88b66f6dc2bf84bbe5d11c1d91090a38f25fcf8ff994a5d172b0cc78d404146d85baeb79c3b13 +"@aws-cdk/asset-kubectl-v20@npm:^2.1.3": + version: 2.1.3 + resolution: "@aws-cdk/asset-kubectl-v20@npm:2.1.3" + checksum: 12be13eb04482055b9b00a65280e143b8459ba11b4cb168a344fdb227a672d2662d05fa28436975898fad2ea83e52b5a38eea6f88df636d564b43c37d0d63050 languageName: node linkType: hard -"@aws-cdk/asset-node-proxy-agent-v5@npm:^2.0.77": - version: 2.0.85 - resolution: "@aws-cdk/asset-node-proxy-agent-v5@npm:2.0.85" - checksum: 6ee209de6ebd3d7b518eb297285985543c48701e20488678503f2f888285662ad77b91f7c0bdd21e70252c7789040d27d242cbea59214ed7e164c3d631499aae +"@aws-cdk/asset-node-proxy-agent-v6@npm:^2.1.0": + version: 2.1.0 + resolution: "@aws-cdk/asset-node-proxy-agent-v6@npm:2.1.0" + checksum: 1ac7bccf82afee69c05241a5ad66345fbd468678ce633bb43c5921c7241a3186231b3b65f9ac6b9924933349c826a9470c79a3ddf14a03fbfce43f14c4d957f2 languageName: node linkType: hard -"@aws-cdk/aws-apigatewayv2-alpha@npm:~2.68.0-alpha.0": - version: 2.68.0-alpha.0 - resolution: "@aws-cdk/aws-apigatewayv2-alpha@npm:2.68.0-alpha.0" +"@aws-cdk/aws-apigatewayv2-alpha@npm:~2.114.1-alpha.0": + version: 2.114.1-alpha.0 + resolution: "@aws-cdk/aws-apigatewayv2-alpha@npm:2.114.1-alpha.0" peerDependencies: - aws-cdk-lib: ^2.68.0 + aws-cdk-lib: ^2.114.1 constructs: ^10.0.0 - checksum: f6b2fb8b6c3c9af257a7e4dd7b7ac9cf35c417fcbc3af778636265feb0de0818916ba033ea0c80933f9d2a7775b24a29662bb835b3fcd5afa4ba87afc8b7d4b7 + checksum: 1fd88ea674391ce3b01048949ca846d6b27ff3bf7beb5f6270ab950ac9d219752d8ebfa5fd6c6933704464ede3c7b012503d8fa9cd43cd06d08305d1f1a0383d languageName: node linkType: hard @@ -1618,7 +1798,17 @@ __metadata: languageName: node linkType: hard -"@aws-cdk/cloudformation-diff@npm:2.68.0, @aws-cdk/cloudformation-diff@npm:~2.68.0": +"@aws-cdk/cloud-assembly-schema@npm:^39.2.0": + version: 39.2.9 + resolution: "@aws-cdk/cloud-assembly-schema@npm:39.2.9" + dependencies: + jsonschema: ~1.4.1 + semver: ^7.7.0 + checksum: a2ec4897ff72ace245e60b181a4af7af8ef85b2a601a73583f3801626f6276a9294a394e63df50f604f3983353d187324fd508ac6f0c39b8c77c42d84ade2cca + languageName: node + linkType: hard + +"@aws-cdk/cloudformation-diff@npm:~2.68.0": version: 2.68.0 resolution: "@aws-cdk/cloudformation-diff@npm:2.68.0" dependencies: @@ -1643,6 +1833,17 @@ __metadata: languageName: node linkType: hard +"@aws-crypto/crc32@npm:5.2.0": + version: 5.2.0 + resolution: "@aws-crypto/crc32@npm:5.2.0" + dependencies: + "@aws-crypto/util": ^5.2.0 + "@aws-sdk/types": ^3.222.0 + tslib: ^2.6.2 + checksum: eab9581d3363af5ea498ae0e72de792f54d8890360e14a9d8261b7b5c55ebe080279fb2556e07994d785341cdaa99ab0b1ccf137832b53b5904cd6928f2b094b + languageName: node + linkType: hard + "@aws-crypto/crc32@npm:^1.0.0": version: 1.2.2 resolution: "@aws-crypto/crc32@npm:1.2.2" @@ -1654,6 +1855,17 @@ __metadata: languageName: node linkType: hard +"@aws-crypto/crc32c@npm:5.2.0": + version: 5.2.0 + resolution: "@aws-crypto/crc32c@npm:5.2.0" + dependencies: + "@aws-crypto/util": ^5.2.0 + "@aws-sdk/types": ^3.222.0 + tslib: ^2.6.2 + checksum: 223efac396cdebaf5645568fa9a38cd0c322c960ae1f4276bedfe2e1031d0112e49d7d39225d386354680ecefae29f39af469a84b2ddfa77cb6692036188af77 + languageName: node + linkType: hard + "@aws-crypto/ie11-detection@npm:^1.0.0": version: 1.0.0 resolution: "@aws-crypto/ie11-detection@npm:1.0.0" @@ -1672,12 +1884,17 @@ __metadata: languageName: node linkType: hard -"@aws-crypto/ie11-detection@npm:^3.0.0": - version: 3.0.0 - resolution: "@aws-crypto/ie11-detection@npm:3.0.0" +"@aws-crypto/sha1-browser@npm:5.2.0": + version: 5.2.0 + resolution: "@aws-crypto/sha1-browser@npm:5.2.0" dependencies: - tslib: ^1.11.1 - checksum: 388891b86d816adb658175afeedaa6c4b4c70e83a7e94050d0425788da7fd5c1d675c5bd1588700e5168325bb342cc1063aa1ee4e519bc7f9b028b3998b69c53 + "@aws-crypto/supports-web-crypto": ^5.2.0 + "@aws-crypto/util": ^5.2.0 + "@aws-sdk/types": ^3.222.0 + "@aws-sdk/util-locate-window": ^3.0.0 + "@smithy/util-utf8": ^2.0.0 + tslib: ^2.6.2 + checksum: 51fed0bf078c10322d910af179871b7d299dde5b5897873ffbeeb036f427e5d11d23db9794439226544b73901920fd19f4d86bbc103ed73cc0cfdea47a83c6ac languageName: node linkType: hard @@ -1697,19 +1914,18 @@ __metadata: languageName: node linkType: hard -"@aws-crypto/sha256-browser@npm:3.0.0": - version: 3.0.0 - resolution: "@aws-crypto/sha256-browser@npm:3.0.0" +"@aws-crypto/sha256-browser@npm:5.2.0": + version: 5.2.0 + resolution: "@aws-crypto/sha256-browser@npm:5.2.0" dependencies: - "@aws-crypto/ie11-detection": ^3.0.0 - "@aws-crypto/sha256-js": ^3.0.0 - "@aws-crypto/supports-web-crypto": ^3.0.0 - "@aws-crypto/util": ^3.0.0 + "@aws-crypto/sha256-js": ^5.2.0 + "@aws-crypto/supports-web-crypto": ^5.2.0 + "@aws-crypto/util": ^5.2.0 "@aws-sdk/types": ^3.222.0 "@aws-sdk/util-locate-window": ^3.0.0 - "@aws-sdk/util-utf8-browser": ^3.0.0 - tslib: ^1.11.1 - checksum: c6a2d6b8176f6ab34b86f7b8c81e2beeae9d41bd4f5f375b332fbe9cbb916b94adcd70676fc7a505ba5abd4232dec1ddfcfa55877f91696d4c65f166648f3026 + "@smithy/util-utf8": ^2.0.0 + tslib: ^2.6.2 + checksum: 05f6d256794df800fe9aef5f52f2ac7415f7f3117d461f85a6aecaa4e29e91527b6fd503681a17136fa89e9dd3d916e9c7e4cfb5eba222875cb6c077bdc1d00d languageName: node linkType: hard @@ -1728,14 +1944,14 @@ __metadata: languageName: node linkType: hard -"@aws-crypto/sha256-js@npm:1.0.0-alpha.0": - version: 1.0.0-alpha.0 - resolution: "@aws-crypto/sha256-js@npm:1.0.0-alpha.0" +"@aws-crypto/sha256-js@npm:1.2.2, @aws-crypto/sha256-js@npm:^1.0.0, @aws-crypto/sha256-js@npm:^1.2.0, @aws-crypto/sha256-js@npm:^1.2.2": + version: 1.2.2 + resolution: "@aws-crypto/sha256-js@npm:1.2.2" dependencies: - "@aws-sdk/types": ^1.0.0-alpha.0 - "@aws-sdk/util-utf8-browser": ^1.0.0-alpha.0 - tslib: ^1.9.3 - checksum: 9deca542ab32f38c0af526f2d786dcd92747e5a9ed643d3e02ed9561578740df8aabad8bf6221b8223a1781c87ab6793807b9ccaa079184be0038414af9d0835 + "@aws-crypto/util": ^1.2.2 + "@aws-sdk/types": ^3.1.0 + tslib: ^1.11.1 + checksum: f4e8593cfbc48591413f00c744569b21e5ed5fab0e27fa4b59c517f2024ca4f46fab7b3874f2a207ceeef8feefc22d143a82d6c6bfe5303ea717f579d8d7ad0a languageName: node linkType: hard @@ -1750,25 +1966,14 @@ __metadata: languageName: node linkType: hard -"@aws-crypto/sha256-js@npm:3.0.0, @aws-crypto/sha256-js@npm:^3.0.0": - version: 3.0.0 - resolution: "@aws-crypto/sha256-js@npm:3.0.0" +"@aws-crypto/sha256-js@npm:5.2.0, @aws-crypto/sha256-js@npm:^5.2.0": + version: 5.2.0 + resolution: "@aws-crypto/sha256-js@npm:5.2.0" dependencies: - "@aws-crypto/util": ^3.0.0 + "@aws-crypto/util": ^5.2.0 "@aws-sdk/types": ^3.222.0 - tslib: ^1.11.1 - checksum: fc013b25a5813c425d4fb77c9ffbc8b5f73d2c78b423df98a1b2575a26de5ff3775c8f62fcf8ef2cc39c8af1cc651013e2c670c1a605a2e16749e06920a2d68f - languageName: node - linkType: hard - -"@aws-crypto/sha256-js@npm:^1.0.0, @aws-crypto/sha256-js@npm:^1.2.0, @aws-crypto/sha256-js@npm:^1.2.2": - version: 1.2.2 - resolution: "@aws-crypto/sha256-js@npm:1.2.2" - dependencies: - "@aws-crypto/util": ^1.2.2 - "@aws-sdk/types": ^3.1.0 - tslib: ^1.11.1 - checksum: f4e8593cfbc48591413f00c744569b21e5ed5fab0e27fa4b59c517f2024ca4f46fab7b3874f2a207ceeef8feefc22d143a82d6c6bfe5303ea717f579d8d7ad0a + tslib: ^2.6.2 + checksum: 6c48701f8336341bb104dfde3d0050c89c288051f6b5e9bdfeb8091cf3ffc86efcd5c9e6ff2a4a134406b019c07aca9db608128f8d9267c952578a3108db9fd1 languageName: node linkType: hard @@ -1813,12 +2018,12 @@ __metadata: languageName: node linkType: hard -"@aws-crypto/supports-web-crypto@npm:^3.0.0": - version: 3.0.0 - resolution: "@aws-crypto/supports-web-crypto@npm:3.0.0" +"@aws-crypto/supports-web-crypto@npm:^5.2.0": + version: 5.2.0 + resolution: "@aws-crypto/supports-web-crypto@npm:5.2.0" dependencies: - tslib: ^1.11.1 - checksum: 67e5cbdebd9560244658ba4dd8610c8dc51022497780961fb5061c09618d4337e18b1ee6c71ac24b4aca175f2aa34d1390b95f8759dc293f197f2339dd5dd8c9 + tslib: ^2.6.2 + checksum: 4d2118e29d68ca3f5947f1e37ce1fbb3239a0c569cc938cdc8ab8390d595609b5caf51a07c9e0535105b17bf5c52ea256fed705a07e9681118120ab64ee73af2 languageName: node linkType: hard @@ -1844,34 +2049,24 @@ __metadata: languageName: node linkType: hard -"@aws-crypto/util@npm:^3.0.0": - version: 3.0.0 - resolution: "@aws-crypto/util@npm:3.0.0" +"@aws-crypto/util@npm:^5.2.0": + version: 5.2.0 + resolution: "@aws-crypto/util@npm:5.2.0" dependencies: "@aws-sdk/types": ^3.222.0 - "@aws-sdk/util-utf8-browser": ^3.0.0 - tslib: ^1.11.1 - checksum: 71ab6963daabbf080b274e24d160e4af6c8bbb6832bb885644018849ff53356bf82bb8000b8596cf296e7d6b14ad6201872b6b902f944e97e121eb2b2f692667 - languageName: node - linkType: hard - -"@aws-sdk/abort-controller@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/abort-controller@npm:3.310.0" - dependencies: - "@aws-sdk/types": 3.310.0 - tslib: ^2.5.0 - checksum: 8790f54278bacdcfd34bffbb28de73ab020d43973e61887f61eb6a4a759da86d155f9f1d14c6d9cebe09be65c2bef1e11780f4959a35f50c46c7f154079d89ce + "@smithy/util-utf8": ^2.0.0 + tslib: ^2.6.2 + checksum: 0362d4c197b1fd64b423966945130207d1fe23e1bb2878a18e361f7743c8d339dad3f8729895a29aa34fff6a86c65f281cf5167c4bf253f21627ae80b6dd2951 languageName: node linkType: hard -"@aws-sdk/abort-controller@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/abort-controller@npm:3.40.0" +"@aws-sdk/abort-controller@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/abort-controller@npm:3.186.0" dependencies: - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: c3d35d9e8f2e2e9395eea7809248bdc36e03f2784628c00ad7a6cc0f388a8101647cc9471a0e3c056429de1661423a289921c516ddf023cd1a79c3b07dbbb9ed + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 + checksum: 81766d2a943135060f9a5c29d99d772dbddb931d9e5556d34accd9d2e04d2334fe2786931c337f8c5653c9f9c18d1512e447b9846a28e92dc1cc55681a0f1bf1 languageName: node linkType: hard @@ -1885,84 +2080,53 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/chunked-blob-reader-native@npm:3.37.0": - version: 3.37.0 - resolution: "@aws-sdk/chunked-blob-reader-native@npm:3.37.0" - dependencies: - "@aws-sdk/util-base64-browser": 3.37.0 - tslib: ^2.3.0 - checksum: 9b7e51206dc4d4574326460cf46acf862add8285bc0de2d086a3c611cd040461f9b9641d0c5f490bbc9ca0ca3c26bdf405e048d3718f33dc58bdd6cc9e657e67 - languageName: node - linkType: hard - -"@aws-sdk/chunked-blob-reader-native@npm:3.6.1": - version: 3.6.1 - resolution: "@aws-sdk/chunked-blob-reader-native@npm:3.6.1" - dependencies: - "@aws-sdk/util-base64-browser": 3.6.1 - tslib: ^1.8.0 - checksum: 3675cb16d43f82cadb709ff1b7cf0610d4ef645887789b29cec7a0c17a100e89fb375843358532f17e7ca86c0fa6dffb6347a07e5d67cbf184cffd9a75636119 - languageName: node - linkType: hard - -"@aws-sdk/chunked-blob-reader@npm:3.37.0": - version: 3.37.0 - resolution: "@aws-sdk/chunked-blob-reader@npm:3.37.0" - dependencies: - tslib: ^2.3.0 - checksum: 0c2209d4a92532798768f0e52f4d10ce5d62b91fb060685313470165b9c06804761496034803ccee179991eac681df7f588e89c00a81749706d0eb2592df7db6 - languageName: node - linkType: hard - -"@aws-sdk/chunked-blob-reader@npm:3.6.1": - version: 3.6.1 - resolution: "@aws-sdk/chunked-blob-reader@npm:3.6.1" - dependencies: - tslib: ^1.8.0 - checksum: eaeab744e768c99b051837e844318ddb3d29f40657c5f53e1f343766c08ff9069c6c431edcfbe88e1ffce525da34714dc683302c3acc2ba54257434ff7eb4b9f - languageName: node - linkType: hard - -"@aws-sdk/client-appsync@npm:^3.303.0": - version: 3.319.0 - resolution: "@aws-sdk/client-appsync@npm:3.319.0" - dependencies: - "@aws-crypto/sha256-browser": 3.0.0 - "@aws-crypto/sha256-js": 3.0.0 - "@aws-sdk/client-sts": 3.319.0 - "@aws-sdk/config-resolver": 3.310.0 - "@aws-sdk/credential-provider-node": 3.319.0 - "@aws-sdk/fetch-http-handler": 3.310.0 - "@aws-sdk/hash-node": 3.310.0 - "@aws-sdk/invalid-dependency": 3.310.0 - "@aws-sdk/middleware-content-length": 3.310.0 - "@aws-sdk/middleware-endpoint": 3.310.0 - "@aws-sdk/middleware-host-header": 3.310.0 - "@aws-sdk/middleware-logger": 3.310.0 - "@aws-sdk/middleware-recursion-detection": 3.310.0 - "@aws-sdk/middleware-retry": 3.310.0 - "@aws-sdk/middleware-serde": 3.310.0 - "@aws-sdk/middleware-signing": 3.310.0 - "@aws-sdk/middleware-stack": 3.310.0 - "@aws-sdk/middleware-user-agent": 3.319.0 - "@aws-sdk/node-config-provider": 3.310.0 - "@aws-sdk/node-http-handler": 3.310.0 - "@aws-sdk/protocol-http": 3.310.0 - "@aws-sdk/smithy-client": 3.316.0 - "@aws-sdk/types": 3.310.0 - "@aws-sdk/url-parser": 3.310.0 - "@aws-sdk/util-base64": 3.310.0 - "@aws-sdk/util-body-length-browser": 3.310.0 - "@aws-sdk/util-body-length-node": 3.310.0 - "@aws-sdk/util-defaults-mode-browser": 3.316.0 - "@aws-sdk/util-defaults-mode-node": 3.316.0 - "@aws-sdk/util-endpoints": 3.319.0 - "@aws-sdk/util-retry": 3.310.0 - "@aws-sdk/util-user-agent-browser": 3.310.0 - "@aws-sdk/util-user-agent-node": 3.310.0 - "@aws-sdk/util-utf8": 3.310.0 - tslib: ^2.5.0 - checksum: ba242b7dbb214ea6150f7034334e7cc9bc3b0b6b6674e8e3e8c7b6a043b5996085a323541a206ccf1c6d1bbae071813aa91186362429fb6a9bd6718901f3a66b +"@aws-sdk/client-appsync@npm:3.624.0": + version: 3.624.0 + resolution: "@aws-sdk/client-appsync@npm:3.624.0" + dependencies: + "@aws-crypto/sha256-browser": 5.2.0 + "@aws-crypto/sha256-js": 5.2.0 + "@aws-sdk/client-sso-oidc": 3.624.0 + "@aws-sdk/client-sts": 3.624.0 + "@aws-sdk/core": 3.624.0 + "@aws-sdk/credential-provider-node": 3.624.0 + "@aws-sdk/middleware-host-header": 3.620.0 + "@aws-sdk/middleware-logger": 3.609.0 + "@aws-sdk/middleware-recursion-detection": 3.620.0 + "@aws-sdk/middleware-user-agent": 3.620.0 + "@aws-sdk/region-config-resolver": 3.614.0 + "@aws-sdk/types": 3.609.0 + "@aws-sdk/util-endpoints": 3.614.0 + "@aws-sdk/util-user-agent-browser": 3.609.0 + "@aws-sdk/util-user-agent-node": 3.614.0 + "@smithy/config-resolver": ^3.0.5 + "@smithy/core": ^2.3.2 + "@smithy/fetch-http-handler": ^3.2.4 + "@smithy/hash-node": ^3.0.3 + "@smithy/invalid-dependency": ^3.0.3 + "@smithy/middleware-content-length": ^3.0.5 + "@smithy/middleware-endpoint": ^3.1.0 + "@smithy/middleware-retry": ^3.0.14 + "@smithy/middleware-serde": ^3.0.3 + "@smithy/middleware-stack": ^3.0.3 + "@smithy/node-config-provider": ^3.1.4 + "@smithy/node-http-handler": ^3.1.4 + "@smithy/protocol-http": ^4.1.0 + "@smithy/smithy-client": ^3.1.12 + "@smithy/types": ^3.3.0 + "@smithy/url-parser": ^3.0.3 + "@smithy/util-base64": ^3.0.0 + "@smithy/util-body-length-browser": ^3.0.0 + "@smithy/util-body-length-node": ^3.0.0 + "@smithy/util-defaults-mode-browser": ^3.0.14 + "@smithy/util-defaults-mode-node": ^3.0.14 + "@smithy/util-endpoints": ^2.0.5 + "@smithy/util-middleware": ^3.0.3 + "@smithy/util-retry": ^3.0.3 + "@smithy/util-stream": ^3.1.3 + "@smithy/util-utf8": ^3.0.0 + tslib: ^2.6.2 + checksum: 68c3213f5e59f35036506fe1dc37d80e4092b3074048ba89b7604a961ee789fec332a4c80c6aa6880ffd38ffbbd036c1c6b6af488a3f1f22d47db001dadd8d9b languageName: node linkType: hard @@ -2005,85 +2169,101 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/client-cognito-identity-provider@npm:^3.303.0": - version: 3.319.0 - resolution: "@aws-sdk/client-cognito-identity-provider@npm:3.319.0" - dependencies: - "@aws-crypto/sha256-browser": 3.0.0 - "@aws-crypto/sha256-js": 3.0.0 - "@aws-sdk/client-sts": 3.319.0 - "@aws-sdk/config-resolver": 3.310.0 - "@aws-sdk/credential-provider-node": 3.319.0 - "@aws-sdk/fetch-http-handler": 3.310.0 - "@aws-sdk/hash-node": 3.310.0 - "@aws-sdk/invalid-dependency": 3.310.0 - "@aws-sdk/middleware-content-length": 3.310.0 - "@aws-sdk/middleware-endpoint": 3.310.0 - "@aws-sdk/middleware-host-header": 3.310.0 - "@aws-sdk/middleware-logger": 3.310.0 - "@aws-sdk/middleware-recursion-detection": 3.310.0 - "@aws-sdk/middleware-retry": 3.310.0 - "@aws-sdk/middleware-serde": 3.310.0 - "@aws-sdk/middleware-signing": 3.310.0 - "@aws-sdk/middleware-stack": 3.310.0 - "@aws-sdk/middleware-user-agent": 3.319.0 - "@aws-sdk/node-config-provider": 3.310.0 - "@aws-sdk/node-http-handler": 3.310.0 - "@aws-sdk/protocol-http": 3.310.0 - "@aws-sdk/smithy-client": 3.316.0 - "@aws-sdk/types": 3.310.0 - "@aws-sdk/url-parser": 3.310.0 - "@aws-sdk/util-base64": 3.310.0 - "@aws-sdk/util-body-length-browser": 3.310.0 - "@aws-sdk/util-body-length-node": 3.310.0 - "@aws-sdk/util-defaults-mode-browser": 3.316.0 - "@aws-sdk/util-defaults-mode-node": 3.316.0 - "@aws-sdk/util-endpoints": 3.319.0 - "@aws-sdk/util-retry": 3.310.0 - "@aws-sdk/util-user-agent-browser": 3.310.0 - "@aws-sdk/util-user-agent-node": 3.310.0 - "@aws-sdk/util-utf8": 3.310.0 - tslib: ^2.5.0 - checksum: 459a8d8385676e12eaff29812bfccd1d58b083b4facbf06261b5dda96ea62f5d766fb8ae12a43e7328ed9d79ea00cb09723e9f09b419e7a7129cad5544686149 - languageName: node - linkType: hard - -"@aws-sdk/client-cognito-identity@npm:3.6.1": - version: 3.6.1 - resolution: "@aws-sdk/client-cognito-identity@npm:3.6.1" - dependencies: - "@aws-crypto/sha256-browser": ^1.0.0 - "@aws-crypto/sha256-js": ^1.0.0 - "@aws-sdk/config-resolver": 3.6.1 - "@aws-sdk/credential-provider-node": 3.6.1 - "@aws-sdk/fetch-http-handler": 3.6.1 - "@aws-sdk/hash-node": 3.6.1 - "@aws-sdk/invalid-dependency": 3.6.1 - "@aws-sdk/middleware-content-length": 3.6.1 - "@aws-sdk/middleware-host-header": 3.6.1 - "@aws-sdk/middleware-logger": 3.6.1 - "@aws-sdk/middleware-retry": 3.6.1 - "@aws-sdk/middleware-serde": 3.6.1 - "@aws-sdk/middleware-signing": 3.6.1 - "@aws-sdk/middleware-stack": 3.6.1 - "@aws-sdk/middleware-user-agent": 3.6.1 - "@aws-sdk/node-config-provider": 3.6.1 - "@aws-sdk/node-http-handler": 3.6.1 - "@aws-sdk/protocol-http": 3.6.1 - "@aws-sdk/smithy-client": 3.6.1 - "@aws-sdk/types": 3.6.1 - "@aws-sdk/url-parser": 3.6.1 - "@aws-sdk/url-parser-native": 3.6.1 - "@aws-sdk/util-base64-browser": 3.6.1 - "@aws-sdk/util-base64-node": 3.6.1 - "@aws-sdk/util-body-length-browser": 3.6.1 - "@aws-sdk/util-body-length-node": 3.6.1 - "@aws-sdk/util-user-agent-browser": 3.6.1 - "@aws-sdk/util-user-agent-node": 3.6.1 - "@aws-sdk/util-utf8-browser": 3.6.1 - "@aws-sdk/util-utf8-node": 3.6.1 - tslib: ^2.0.0 - checksum: b11909a0f5bab378da90dc3e9fead6ba3fac75a2edbcbc1436da121434f6f256369180e410536f4a55b870fc3e52fd2860f844d78ee141092948d671d12f9c59 +"@aws-sdk/client-cognito-identity-provider@npm:3.624.0": + version: 3.624.0 + resolution: "@aws-sdk/client-cognito-identity-provider@npm:3.624.0" + dependencies: + "@aws-crypto/sha256-browser": 5.2.0 + "@aws-crypto/sha256-js": 5.2.0 + "@aws-sdk/client-sso-oidc": 3.624.0 + "@aws-sdk/client-sts": 3.624.0 + "@aws-sdk/core": 3.624.0 + "@aws-sdk/credential-provider-node": 3.624.0 + "@aws-sdk/middleware-host-header": 3.620.0 + "@aws-sdk/middleware-logger": 3.609.0 + "@aws-sdk/middleware-recursion-detection": 3.620.0 + "@aws-sdk/middleware-user-agent": 3.620.0 + "@aws-sdk/region-config-resolver": 3.614.0 + "@aws-sdk/types": 3.609.0 + "@aws-sdk/util-endpoints": 3.614.0 + "@aws-sdk/util-user-agent-browser": 3.609.0 + "@aws-sdk/util-user-agent-node": 3.614.0 + "@smithy/config-resolver": ^3.0.5 + "@smithy/core": ^2.3.2 + "@smithy/fetch-http-handler": ^3.2.4 + "@smithy/hash-node": ^3.0.3 + "@smithy/invalid-dependency": ^3.0.3 + "@smithy/middleware-content-length": ^3.0.5 + "@smithy/middleware-endpoint": ^3.1.0 + "@smithy/middleware-retry": ^3.0.14 + "@smithy/middleware-serde": ^3.0.3 + "@smithy/middleware-stack": ^3.0.3 + "@smithy/node-config-provider": ^3.1.4 + "@smithy/node-http-handler": ^3.1.4 + "@smithy/protocol-http": ^4.1.0 + "@smithy/smithy-client": ^3.1.12 + "@smithy/types": ^3.3.0 + "@smithy/url-parser": ^3.0.3 + "@smithy/util-base64": ^3.0.0 + "@smithy/util-body-length-browser": ^3.0.0 + "@smithy/util-body-length-node": ^3.0.0 + "@smithy/util-defaults-mode-browser": ^3.0.14 + "@smithy/util-defaults-mode-node": ^3.0.14 + "@smithy/util-endpoints": ^2.0.5 + "@smithy/util-middleware": ^3.0.3 + "@smithy/util-retry": ^3.0.3 + "@smithy/util-utf8": ^3.0.0 + tslib: ^2.6.2 + checksum: f92b720c3db55bfa631bdce9e834633605991f42c27d2ac27b46614d01e13304f4283b13ec7047c61db7e604a4f67b2aa394e5306e3638747401a6706ebdc227 + languageName: node + linkType: hard + +"@aws-sdk/client-cognito-identity@npm:3.624.0": + version: 3.624.0 + resolution: "@aws-sdk/client-cognito-identity@npm:3.624.0" + dependencies: + "@aws-crypto/sha256-browser": 5.2.0 + "@aws-crypto/sha256-js": 5.2.0 + "@aws-sdk/client-sso-oidc": 3.624.0 + "@aws-sdk/client-sts": 3.624.0 + "@aws-sdk/core": 3.624.0 + "@aws-sdk/credential-provider-node": 3.624.0 + "@aws-sdk/middleware-host-header": 3.620.0 + "@aws-sdk/middleware-logger": 3.609.0 + "@aws-sdk/middleware-recursion-detection": 3.620.0 + "@aws-sdk/middleware-user-agent": 3.620.0 + "@aws-sdk/region-config-resolver": 3.614.0 + "@aws-sdk/types": 3.609.0 + "@aws-sdk/util-endpoints": 3.614.0 + "@aws-sdk/util-user-agent-browser": 3.609.0 + "@aws-sdk/util-user-agent-node": 3.614.0 + "@smithy/config-resolver": ^3.0.5 + "@smithy/core": ^2.3.2 + "@smithy/fetch-http-handler": ^3.2.4 + "@smithy/hash-node": ^3.0.3 + "@smithy/invalid-dependency": ^3.0.3 + "@smithy/middleware-content-length": ^3.0.5 + "@smithy/middleware-endpoint": ^3.1.0 + "@smithy/middleware-retry": ^3.0.14 + "@smithy/middleware-serde": ^3.0.3 + "@smithy/middleware-stack": ^3.0.3 + "@smithy/node-config-provider": ^3.1.4 + "@smithy/node-http-handler": ^3.1.4 + "@smithy/protocol-http": ^4.1.0 + "@smithy/smithy-client": ^3.1.12 + "@smithy/types": ^3.3.0 + "@smithy/url-parser": ^3.0.3 + "@smithy/util-base64": ^3.0.0 + "@smithy/util-body-length-browser": ^3.0.0 + "@smithy/util-body-length-node": ^3.0.0 + "@smithy/util-defaults-mode-browser": ^3.0.14 + "@smithy/util-defaults-mode-node": ^3.0.14 + "@smithy/util-endpoints": ^2.0.5 + "@smithy/util-middleware": ^3.0.3 + "@smithy/util-retry": ^3.0.3 + "@smithy/util-utf8": ^3.0.0 + tslib: ^2.6.2 + checksum: 84a8f62f25db4637a85e87c364c6bdf91ef46b033a41d8131c07b218e8b6dc3e5c8685a3ef8bef064dc84e0aa3bff10f7dc2953b87041f4863288deaa9c4c6f5 languageName: node linkType: hard @@ -2127,49 +2307,107 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/client-dynamodb@npm:^3.303.0": - version: 3.319.0 - resolution: "@aws-sdk/client-dynamodb@npm:3.319.0" - dependencies: - "@aws-crypto/sha256-browser": 3.0.0 - "@aws-crypto/sha256-js": 3.0.0 - "@aws-sdk/client-sts": 3.319.0 - "@aws-sdk/config-resolver": 3.310.0 - "@aws-sdk/credential-provider-node": 3.319.0 - "@aws-sdk/fetch-http-handler": 3.310.0 - "@aws-sdk/hash-node": 3.310.0 - "@aws-sdk/invalid-dependency": 3.310.0 - "@aws-sdk/middleware-content-length": 3.310.0 - "@aws-sdk/middleware-endpoint": 3.310.0 - "@aws-sdk/middleware-endpoint-discovery": 3.310.0 - "@aws-sdk/middleware-host-header": 3.310.0 - "@aws-sdk/middleware-logger": 3.310.0 - "@aws-sdk/middleware-recursion-detection": 3.310.0 - "@aws-sdk/middleware-retry": 3.310.0 - "@aws-sdk/middleware-serde": 3.310.0 - "@aws-sdk/middleware-signing": 3.310.0 - "@aws-sdk/middleware-stack": 3.310.0 - "@aws-sdk/middleware-user-agent": 3.319.0 - "@aws-sdk/node-config-provider": 3.310.0 - "@aws-sdk/node-http-handler": 3.310.0 - "@aws-sdk/protocol-http": 3.310.0 - "@aws-sdk/smithy-client": 3.316.0 - "@aws-sdk/types": 3.310.0 - "@aws-sdk/url-parser": 3.310.0 - "@aws-sdk/util-base64": 3.310.0 - "@aws-sdk/util-body-length-browser": 3.310.0 - "@aws-sdk/util-body-length-node": 3.310.0 - "@aws-sdk/util-defaults-mode-browser": 3.316.0 - "@aws-sdk/util-defaults-mode-node": 3.316.0 - "@aws-sdk/util-endpoints": 3.319.0 - "@aws-sdk/util-retry": 3.310.0 - "@aws-sdk/util-user-agent-browser": 3.310.0 - "@aws-sdk/util-user-agent-node": 3.310.0 - "@aws-sdk/util-utf8": 3.310.0 - "@aws-sdk/util-waiter": 3.310.0 - tslib: ^2.5.0 - uuid: ^8.3.2 - checksum: 9de7272295521f056c5f9573a0081b4cd5e972d9ccda42317d16b6024e2b0f80e639a71cdea9b3b2aaae25c354b4bb037d3a936146a1d9add25393d58c2002b5 +"@aws-sdk/client-dynamodb@npm:3.624.0": + version: 3.624.0 + resolution: "@aws-sdk/client-dynamodb@npm:3.624.0" + dependencies: + "@aws-crypto/sha256-browser": 5.2.0 + "@aws-crypto/sha256-js": 5.2.0 + "@aws-sdk/client-sso-oidc": 3.624.0 + "@aws-sdk/client-sts": 3.624.0 + "@aws-sdk/core": 3.624.0 + "@aws-sdk/credential-provider-node": 3.624.0 + "@aws-sdk/middleware-endpoint-discovery": 3.620.0 + "@aws-sdk/middleware-host-header": 3.620.0 + "@aws-sdk/middleware-logger": 3.609.0 + "@aws-sdk/middleware-recursion-detection": 3.620.0 + "@aws-sdk/middleware-user-agent": 3.620.0 + "@aws-sdk/region-config-resolver": 3.614.0 + "@aws-sdk/types": 3.609.0 + "@aws-sdk/util-endpoints": 3.614.0 + "@aws-sdk/util-user-agent-browser": 3.609.0 + "@aws-sdk/util-user-agent-node": 3.614.0 + "@smithy/config-resolver": ^3.0.5 + "@smithy/core": ^2.3.2 + "@smithy/fetch-http-handler": ^3.2.4 + "@smithy/hash-node": ^3.0.3 + "@smithy/invalid-dependency": ^3.0.3 + "@smithy/middleware-content-length": ^3.0.5 + "@smithy/middleware-endpoint": ^3.1.0 + "@smithy/middleware-retry": ^3.0.14 + "@smithy/middleware-serde": ^3.0.3 + "@smithy/middleware-stack": ^3.0.3 + "@smithy/node-config-provider": ^3.1.4 + "@smithy/node-http-handler": ^3.1.4 + "@smithy/protocol-http": ^4.1.0 + "@smithy/smithy-client": ^3.1.12 + "@smithy/types": ^3.3.0 + "@smithy/url-parser": ^3.0.3 + "@smithy/util-base64": ^3.0.0 + "@smithy/util-body-length-browser": ^3.0.0 + "@smithy/util-body-length-node": ^3.0.0 + "@smithy/util-defaults-mode-browser": ^3.0.14 + "@smithy/util-defaults-mode-node": ^3.0.14 + "@smithy/util-endpoints": ^2.0.5 + "@smithy/util-middleware": ^3.0.3 + "@smithy/util-retry": ^3.0.3 + "@smithy/util-utf8": ^3.0.0 + "@smithy/util-waiter": ^3.1.2 + tslib: ^2.6.2 + uuid: ^9.0.1 + checksum: f7a3c2b6291098aebe5100f9b6b3a5b31b2e2715ee432ef8a37734795a7e8f9fb894d8bda1aa6ae408089ac21216778c3c5ddfbb8ccd2a190034c6bfb64e22b9 + languageName: node + linkType: hard + +"@aws-sdk/client-ec2@npm:3.624.0": + version: 3.624.0 + resolution: "@aws-sdk/client-ec2@npm:3.624.0" + dependencies: + "@aws-crypto/sha256-browser": 5.2.0 + "@aws-crypto/sha256-js": 5.2.0 + "@aws-sdk/client-sso-oidc": 3.624.0 + "@aws-sdk/client-sts": 3.624.0 + "@aws-sdk/core": 3.624.0 + "@aws-sdk/credential-provider-node": 3.624.0 + "@aws-sdk/middleware-host-header": 3.620.0 + "@aws-sdk/middleware-logger": 3.609.0 + "@aws-sdk/middleware-recursion-detection": 3.620.0 + "@aws-sdk/middleware-sdk-ec2": 3.622.0 + "@aws-sdk/middleware-user-agent": 3.620.0 + "@aws-sdk/region-config-resolver": 3.614.0 + "@aws-sdk/types": 3.609.0 + "@aws-sdk/util-endpoints": 3.614.0 + "@aws-sdk/util-user-agent-browser": 3.609.0 + "@aws-sdk/util-user-agent-node": 3.614.0 + "@smithy/config-resolver": ^3.0.5 + "@smithy/core": ^2.3.2 + "@smithy/fetch-http-handler": ^3.2.4 + "@smithy/hash-node": ^3.0.3 + "@smithy/invalid-dependency": ^3.0.3 + "@smithy/middleware-content-length": ^3.0.5 + "@smithy/middleware-endpoint": ^3.1.0 + "@smithy/middleware-retry": ^3.0.14 + "@smithy/middleware-serde": ^3.0.3 + "@smithy/middleware-stack": ^3.0.3 + "@smithy/node-config-provider": ^3.1.4 + "@smithy/node-http-handler": ^3.1.4 + "@smithy/protocol-http": ^4.1.0 + "@smithy/smithy-client": ^3.1.12 + "@smithy/types": ^3.3.0 + "@smithy/url-parser": ^3.0.3 + "@smithy/util-base64": ^3.0.0 + "@smithy/util-body-length-browser": ^3.0.0 + "@smithy/util-body-length-node": ^3.0.0 + "@smithy/util-defaults-mode-browser": ^3.0.14 + "@smithy/util-defaults-mode-node": ^3.0.14 + "@smithy/util-endpoints": ^2.0.5 + "@smithy/util-middleware": ^3.0.3 + "@smithy/util-retry": ^3.0.3 + "@smithy/util-utf8": ^3.0.0 + "@smithy/util-waiter": ^3.1.2 + tslib: ^2.6.2 + uuid: ^9.0.1 + checksum: 9f2ff60eafc8751a2459e27254d133078b3598cf61b12cedca4d6fd5dd4d66488ea332f8bf0293c0182ac42524d1b0bd03ce5dbefbdcd0515231ef877ca3e228 languageName: node linkType: hard @@ -2212,6 +2450,56 @@ __metadata: languageName: node linkType: hard +"@aws-sdk/client-iam@npm:3.624.0": + version: 3.624.0 + resolution: "@aws-sdk/client-iam@npm:3.624.0" + dependencies: + "@aws-crypto/sha256-browser": 5.2.0 + "@aws-crypto/sha256-js": 5.2.0 + "@aws-sdk/client-sso-oidc": 3.624.0 + "@aws-sdk/client-sts": 3.624.0 + "@aws-sdk/core": 3.624.0 + "@aws-sdk/credential-provider-node": 3.624.0 + "@aws-sdk/middleware-host-header": 3.620.0 + "@aws-sdk/middleware-logger": 3.609.0 + "@aws-sdk/middleware-recursion-detection": 3.620.0 + "@aws-sdk/middleware-user-agent": 3.620.0 + "@aws-sdk/region-config-resolver": 3.614.0 + "@aws-sdk/types": 3.609.0 + "@aws-sdk/util-endpoints": 3.614.0 + "@aws-sdk/util-user-agent-browser": 3.609.0 + "@aws-sdk/util-user-agent-node": 3.614.0 + "@smithy/config-resolver": ^3.0.5 + "@smithy/core": ^2.3.2 + "@smithy/fetch-http-handler": ^3.2.4 + "@smithy/hash-node": ^3.0.3 + "@smithy/invalid-dependency": ^3.0.3 + "@smithy/middleware-content-length": ^3.0.5 + "@smithy/middleware-endpoint": ^3.1.0 + "@smithy/middleware-retry": ^3.0.14 + "@smithy/middleware-serde": ^3.0.3 + "@smithy/middleware-stack": ^3.0.3 + "@smithy/node-config-provider": ^3.1.4 + "@smithy/node-http-handler": ^3.1.4 + "@smithy/protocol-http": ^4.1.0 + "@smithy/smithy-client": ^3.1.12 + "@smithy/types": ^3.3.0 + "@smithy/url-parser": ^3.0.3 + "@smithy/util-base64": ^3.0.0 + "@smithy/util-body-length-browser": ^3.0.0 + "@smithy/util-body-length-node": ^3.0.0 + "@smithy/util-defaults-mode-browser": ^3.0.14 + "@smithy/util-defaults-mode-node": ^3.0.14 + "@smithy/util-endpoints": ^2.0.5 + "@smithy/util-middleware": ^3.0.3 + "@smithy/util-retry": ^3.0.3 + "@smithy/util-utf8": ^3.0.0 + "@smithy/util-waiter": ^3.1.2 + tslib: ^2.6.2 + checksum: 7f24e4fb63b7d5c9d8c44a04b2984c678a6f59ffcfa85a125371cc96731550ff49279a1c30eb6214bfc55147d49fd8b9cc2d140c3cb8d6ef2abc7eaf96bfbaee + languageName: node + linkType: hard + "@aws-sdk/client-kinesis@npm:3.6.1": version: 3.6.1 resolution: "@aws-sdk/client-kinesis@npm:3.6.1" @@ -2255,124 +2543,238 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/client-lex-runtime-service@npm:3.6.1": - version: 3.6.1 - resolution: "@aws-sdk/client-lex-runtime-service@npm:3.6.1" +"@aws-sdk/client-lambda@npm:3.624.0": + version: 3.624.0 + resolution: "@aws-sdk/client-lambda@npm:3.624.0" + dependencies: + "@aws-crypto/sha256-browser": 5.2.0 + "@aws-crypto/sha256-js": 5.2.0 + "@aws-sdk/client-sso-oidc": 3.624.0 + "@aws-sdk/client-sts": 3.624.0 + "@aws-sdk/core": 3.624.0 + "@aws-sdk/credential-provider-node": 3.624.0 + "@aws-sdk/middleware-host-header": 3.620.0 + "@aws-sdk/middleware-logger": 3.609.0 + "@aws-sdk/middleware-recursion-detection": 3.620.0 + "@aws-sdk/middleware-user-agent": 3.620.0 + "@aws-sdk/region-config-resolver": 3.614.0 + "@aws-sdk/types": 3.609.0 + "@aws-sdk/util-endpoints": 3.614.0 + "@aws-sdk/util-user-agent-browser": 3.609.0 + "@aws-sdk/util-user-agent-node": 3.614.0 + "@smithy/config-resolver": ^3.0.5 + "@smithy/core": ^2.3.2 + "@smithy/eventstream-serde-browser": ^3.0.5 + "@smithy/eventstream-serde-config-resolver": ^3.0.3 + "@smithy/eventstream-serde-node": ^3.0.4 + "@smithy/fetch-http-handler": ^3.2.4 + "@smithy/hash-node": ^3.0.3 + "@smithy/invalid-dependency": ^3.0.3 + "@smithy/middleware-content-length": ^3.0.5 + "@smithy/middleware-endpoint": ^3.1.0 + "@smithy/middleware-retry": ^3.0.14 + "@smithy/middleware-serde": ^3.0.3 + "@smithy/middleware-stack": ^3.0.3 + "@smithy/node-config-provider": ^3.1.4 + "@smithy/node-http-handler": ^3.1.4 + "@smithy/protocol-http": ^4.1.0 + "@smithy/smithy-client": ^3.1.12 + "@smithy/types": ^3.3.0 + "@smithy/url-parser": ^3.0.3 + "@smithy/util-base64": ^3.0.0 + "@smithy/util-body-length-browser": ^3.0.0 + "@smithy/util-body-length-node": ^3.0.0 + "@smithy/util-defaults-mode-browser": ^3.0.14 + "@smithy/util-defaults-mode-node": ^3.0.14 + "@smithy/util-endpoints": ^2.0.5 + "@smithy/util-middleware": ^3.0.3 + "@smithy/util-retry": ^3.0.3 + "@smithy/util-stream": ^3.1.3 + "@smithy/util-utf8": ^3.0.0 + "@smithy/util-waiter": ^3.1.2 + tslib: ^2.6.2 + checksum: 5acd617f2eea753e94562315ad9ab2b022007395f8cb6f803e37ff42de7c52a251598975b65d3c10d9a646987fbbb1d5b7a88c3a849355419b308882a8d5a5e2 + languageName: node + linkType: hard + +"@aws-sdk/client-lex-runtime-service@npm:3.186.3": + version: 3.186.3 + resolution: "@aws-sdk/client-lex-runtime-service@npm:3.186.3" dependencies: - "@aws-crypto/sha256-browser": ^1.0.0 - "@aws-crypto/sha256-js": ^1.0.0 - "@aws-sdk/config-resolver": 3.6.1 - "@aws-sdk/credential-provider-node": 3.6.1 - "@aws-sdk/fetch-http-handler": 3.6.1 - "@aws-sdk/hash-node": 3.6.1 - "@aws-sdk/invalid-dependency": 3.6.1 - "@aws-sdk/middleware-content-length": 3.6.1 - "@aws-sdk/middleware-host-header": 3.6.1 - "@aws-sdk/middleware-logger": 3.6.1 - "@aws-sdk/middleware-retry": 3.6.1 - "@aws-sdk/middleware-serde": 3.6.1 - "@aws-sdk/middleware-signing": 3.6.1 - "@aws-sdk/middleware-stack": 3.6.1 - "@aws-sdk/middleware-user-agent": 3.6.1 - "@aws-sdk/node-config-provider": 3.6.1 - "@aws-sdk/node-http-handler": 3.6.1 - "@aws-sdk/protocol-http": 3.6.1 - "@aws-sdk/smithy-client": 3.6.1 - "@aws-sdk/types": 3.6.1 - "@aws-sdk/url-parser": 3.6.1 - "@aws-sdk/url-parser-native": 3.6.1 - "@aws-sdk/util-base64-browser": 3.6.1 - "@aws-sdk/util-base64-node": 3.6.1 - "@aws-sdk/util-body-length-browser": 3.6.1 - "@aws-sdk/util-body-length-node": 3.6.1 - "@aws-sdk/util-user-agent-browser": 3.6.1 - "@aws-sdk/util-user-agent-node": 3.6.1 - "@aws-sdk/util-utf8-browser": 3.6.1 - "@aws-sdk/util-utf8-node": 3.6.1 - tslib: ^2.0.0 - checksum: 731a2a0822722d11fb076acff70720cb610d8d105ae8679f42a194b7f701b07f8f0d811156470cb9988b5e2d12dbc67695aec80a4db1eff6de8e10130120dfcf - languageName: node - linkType: hard - -"@aws-sdk/client-location@npm:3.41.0": - version: 3.41.0 - resolution: "@aws-sdk/client-location@npm:3.41.0" + "@aws-crypto/sha256-browser": 2.0.0 + "@aws-crypto/sha256-js": 2.0.0 + "@aws-sdk/client-sts": 3.186.3 + "@aws-sdk/config-resolver": 3.186.0 + "@aws-sdk/credential-provider-node": 3.186.0 + "@aws-sdk/fetch-http-handler": 3.186.0 + "@aws-sdk/hash-node": 3.186.0 + "@aws-sdk/invalid-dependency": 3.186.0 + "@aws-sdk/middleware-content-length": 3.186.0 + "@aws-sdk/middleware-host-header": 3.186.0 + "@aws-sdk/middleware-logger": 3.186.0 + "@aws-sdk/middleware-recursion-detection": 3.186.0 + "@aws-sdk/middleware-retry": 3.186.0 + "@aws-sdk/middleware-serde": 3.186.0 + "@aws-sdk/middleware-signing": 3.186.0 + "@aws-sdk/middleware-stack": 3.186.0 + "@aws-sdk/middleware-user-agent": 3.186.0 + "@aws-sdk/node-config-provider": 3.186.0 + "@aws-sdk/node-http-handler": 3.186.0 + "@aws-sdk/protocol-http": 3.186.0 + "@aws-sdk/smithy-client": 3.186.0 + "@aws-sdk/types": 3.186.0 + "@aws-sdk/url-parser": 3.186.0 + "@aws-sdk/util-base64-browser": 3.186.0 + "@aws-sdk/util-base64-node": 3.186.0 + "@aws-sdk/util-body-length-browser": 3.186.0 + "@aws-sdk/util-body-length-node": 3.186.0 + "@aws-sdk/util-defaults-mode-browser": 3.186.0 + "@aws-sdk/util-defaults-mode-node": 3.186.0 + "@aws-sdk/util-user-agent-browser": 3.186.0 + "@aws-sdk/util-user-agent-node": 3.186.0 + "@aws-sdk/util-utf8-browser": 3.186.0 + "@aws-sdk/util-utf8-node": 3.186.0 + tslib: ^2.3.1 + checksum: 7c7900e3f9a9adc18cb6b95700f7db56a0850335ae568c29cd4662fc3f51bea093b3978236bdbdae217ec84cc9f9065cd6ad7bb8791294dba8af9687d47641ab + languageName: node + linkType: hard + +"@aws-sdk/client-lex-runtime-v2@npm:3.186.3": + version: 3.186.3 + resolution: "@aws-sdk/client-lex-runtime-v2@npm:3.186.3" dependencies: "@aws-crypto/sha256-browser": 2.0.0 "@aws-crypto/sha256-js": 2.0.0 - "@aws-sdk/client-sts": 3.41.0 - "@aws-sdk/config-resolver": 3.40.0 - "@aws-sdk/credential-provider-node": 3.41.0 - "@aws-sdk/fetch-http-handler": 3.40.0 - "@aws-sdk/hash-node": 3.40.0 - "@aws-sdk/invalid-dependency": 3.40.0 - "@aws-sdk/middleware-content-length": 3.40.0 - "@aws-sdk/middleware-host-header": 3.40.0 - "@aws-sdk/middleware-logger": 3.40.0 - "@aws-sdk/middleware-retry": 3.40.0 - "@aws-sdk/middleware-serde": 3.40.0 - "@aws-sdk/middleware-signing": 3.40.0 - "@aws-sdk/middleware-stack": 3.40.0 - "@aws-sdk/middleware-user-agent": 3.40.0 - "@aws-sdk/node-config-provider": 3.40.0 - "@aws-sdk/node-http-handler": 3.40.0 - "@aws-sdk/protocol-http": 3.40.0 - "@aws-sdk/smithy-client": 3.41.0 - "@aws-sdk/types": 3.40.0 - "@aws-sdk/url-parser": 3.40.0 - "@aws-sdk/util-base64-browser": 3.37.0 - "@aws-sdk/util-base64-node": 3.37.0 - "@aws-sdk/util-body-length-browser": 3.37.0 - "@aws-sdk/util-body-length-node": 3.37.0 - "@aws-sdk/util-user-agent-browser": 3.40.0 - "@aws-sdk/util-user-agent-node": 3.40.0 - "@aws-sdk/util-utf8-browser": 3.37.0 - "@aws-sdk/util-utf8-node": 3.37.0 - tslib: ^2.3.0 - checksum: 39f4904d23cc0f4fefa84ee2711265fa771b3fde592927ec1e244b32fce3c8c6f69fbd1fbf62cb0c11a769b5d0d00bbaebc11b841d57988d82a62f608c12c2c3 - languageName: node - linkType: hard - -"@aws-sdk/client-location@npm:^3.303.0": - version: 3.319.0 - resolution: "@aws-sdk/client-location@npm:3.319.0" - dependencies: - "@aws-crypto/sha256-browser": 3.0.0 - "@aws-crypto/sha256-js": 3.0.0 - "@aws-sdk/client-sts": 3.319.0 - "@aws-sdk/config-resolver": 3.310.0 - "@aws-sdk/credential-provider-node": 3.319.0 - "@aws-sdk/fetch-http-handler": 3.310.0 - "@aws-sdk/hash-node": 3.310.0 - "@aws-sdk/invalid-dependency": 3.310.0 - "@aws-sdk/middleware-content-length": 3.310.0 - "@aws-sdk/middleware-endpoint": 3.310.0 - "@aws-sdk/middleware-host-header": 3.310.0 - "@aws-sdk/middleware-logger": 3.310.0 - "@aws-sdk/middleware-recursion-detection": 3.310.0 - "@aws-sdk/middleware-retry": 3.310.0 - "@aws-sdk/middleware-serde": 3.310.0 - "@aws-sdk/middleware-signing": 3.310.0 - "@aws-sdk/middleware-stack": 3.310.0 - "@aws-sdk/middleware-user-agent": 3.319.0 - "@aws-sdk/node-config-provider": 3.310.0 - "@aws-sdk/node-http-handler": 3.310.0 - "@aws-sdk/protocol-http": 3.310.0 - "@aws-sdk/smithy-client": 3.316.0 - "@aws-sdk/types": 3.310.0 - "@aws-sdk/url-parser": 3.310.0 - "@aws-sdk/util-base64": 3.310.0 - "@aws-sdk/util-body-length-browser": 3.310.0 - "@aws-sdk/util-body-length-node": 3.310.0 - "@aws-sdk/util-defaults-mode-browser": 3.316.0 - "@aws-sdk/util-defaults-mode-node": 3.316.0 - "@aws-sdk/util-endpoints": 3.319.0 - "@aws-sdk/util-retry": 3.310.0 - "@aws-sdk/util-user-agent-browser": 3.310.0 - "@aws-sdk/util-user-agent-node": 3.310.0 - "@aws-sdk/util-utf8": 3.310.0 - tslib: ^2.5.0 - checksum: aca1e35c0ea4917840051598512442870fa86293f9ca141cc353b6a37124106d31d888ec45cb7bafea22a1c99e44299293cfb8d147fd4e9370a3363811e1c0f8 + "@aws-sdk/client-sts": 3.186.3 + "@aws-sdk/config-resolver": 3.186.0 + "@aws-sdk/credential-provider-node": 3.186.0 + "@aws-sdk/eventstream-handler-node": 3.186.0 + "@aws-sdk/eventstream-serde-browser": 3.186.0 + "@aws-sdk/eventstream-serde-config-resolver": 3.186.0 + "@aws-sdk/eventstream-serde-node": 3.186.0 + "@aws-sdk/fetch-http-handler": 3.186.0 + "@aws-sdk/hash-node": 3.186.0 + "@aws-sdk/invalid-dependency": 3.186.0 + "@aws-sdk/middleware-content-length": 3.186.0 + "@aws-sdk/middleware-eventstream": 3.186.0 + "@aws-sdk/middleware-host-header": 3.186.0 + "@aws-sdk/middleware-logger": 3.186.0 + "@aws-sdk/middleware-recursion-detection": 3.186.0 + "@aws-sdk/middleware-retry": 3.186.0 + "@aws-sdk/middleware-serde": 3.186.0 + "@aws-sdk/middleware-signing": 3.186.0 + "@aws-sdk/middleware-stack": 3.186.0 + "@aws-sdk/middleware-user-agent": 3.186.0 + "@aws-sdk/node-config-provider": 3.186.0 + "@aws-sdk/node-http-handler": 3.186.0 + "@aws-sdk/protocol-http": 3.186.0 + "@aws-sdk/smithy-client": 3.186.0 + "@aws-sdk/types": 3.186.0 + "@aws-sdk/url-parser": 3.186.0 + "@aws-sdk/util-base64-browser": 3.186.0 + "@aws-sdk/util-base64-node": 3.186.0 + "@aws-sdk/util-body-length-browser": 3.186.0 + "@aws-sdk/util-body-length-node": 3.186.0 + "@aws-sdk/util-defaults-mode-browser": 3.186.0 + "@aws-sdk/util-defaults-mode-node": 3.186.0 + "@aws-sdk/util-user-agent-browser": 3.186.0 + "@aws-sdk/util-user-agent-node": 3.186.0 + "@aws-sdk/util-utf8-browser": 3.186.0 + "@aws-sdk/util-utf8-node": 3.186.0 + tslib: ^2.3.1 + checksum: a09ca50f0c63658b7458d4e03d34d2ed721e89db69b3a521607c83bf7cc58166567dccb48bae82756d60ef2637b891341a2cbc76ba7df1b4a2b042fa0076a486 + languageName: node + linkType: hard + +"@aws-sdk/client-location@npm:3.186.3": + version: 3.186.3 + resolution: "@aws-sdk/client-location@npm:3.186.3" + dependencies: + "@aws-crypto/sha256-browser": 2.0.0 + "@aws-crypto/sha256-js": 2.0.0 + "@aws-sdk/client-sts": 3.186.3 + "@aws-sdk/config-resolver": 3.186.0 + "@aws-sdk/credential-provider-node": 3.186.0 + "@aws-sdk/fetch-http-handler": 3.186.0 + "@aws-sdk/hash-node": 3.186.0 + "@aws-sdk/invalid-dependency": 3.186.0 + "@aws-sdk/middleware-content-length": 3.186.0 + "@aws-sdk/middleware-host-header": 3.186.0 + "@aws-sdk/middleware-logger": 3.186.0 + "@aws-sdk/middleware-recursion-detection": 3.186.0 + "@aws-sdk/middleware-retry": 3.186.0 + "@aws-sdk/middleware-serde": 3.186.0 + "@aws-sdk/middleware-signing": 3.186.0 + "@aws-sdk/middleware-stack": 3.186.0 + "@aws-sdk/middleware-user-agent": 3.186.0 + "@aws-sdk/node-config-provider": 3.186.0 + "@aws-sdk/node-http-handler": 3.186.0 + "@aws-sdk/protocol-http": 3.186.0 + "@aws-sdk/smithy-client": 3.186.0 + "@aws-sdk/types": 3.186.0 + "@aws-sdk/url-parser": 3.186.0 + "@aws-sdk/util-base64-browser": 3.186.0 + "@aws-sdk/util-base64-node": 3.186.0 + "@aws-sdk/util-body-length-browser": 3.186.0 + "@aws-sdk/util-body-length-node": 3.186.0 + "@aws-sdk/util-defaults-mode-browser": 3.186.0 + "@aws-sdk/util-defaults-mode-node": 3.186.0 + "@aws-sdk/util-user-agent-browser": 3.186.0 + "@aws-sdk/util-user-agent-node": 3.186.0 + "@aws-sdk/util-utf8-browser": 3.186.0 + "@aws-sdk/util-utf8-node": 3.186.0 + tslib: ^2.3.1 + checksum: 0f36107d4abf74da4fc9443f2c33664a88ec198f63b793d01eaffe0cbedb758874922bfbb9e0b62c5f74da7a1277cace1b15f1e3064288f6d1ef7e3d5720bec1 + languageName: node + linkType: hard + +"@aws-sdk/client-location@npm:3.624.0": + version: 3.624.0 + resolution: "@aws-sdk/client-location@npm:3.624.0" + dependencies: + "@aws-crypto/sha256-browser": 5.2.0 + "@aws-crypto/sha256-js": 5.2.0 + "@aws-sdk/client-sso-oidc": 3.624.0 + "@aws-sdk/client-sts": 3.624.0 + "@aws-sdk/core": 3.624.0 + "@aws-sdk/credential-provider-node": 3.624.0 + "@aws-sdk/middleware-host-header": 3.620.0 + "@aws-sdk/middleware-logger": 3.609.0 + "@aws-sdk/middleware-recursion-detection": 3.620.0 + "@aws-sdk/middleware-user-agent": 3.620.0 + "@aws-sdk/region-config-resolver": 3.614.0 + "@aws-sdk/types": 3.609.0 + "@aws-sdk/util-endpoints": 3.614.0 + "@aws-sdk/util-user-agent-browser": 3.609.0 + "@aws-sdk/util-user-agent-node": 3.614.0 + "@smithy/config-resolver": ^3.0.5 + "@smithy/core": ^2.3.2 + "@smithy/fetch-http-handler": ^3.2.4 + "@smithy/hash-node": ^3.0.3 + "@smithy/invalid-dependency": ^3.0.3 + "@smithy/middleware-content-length": ^3.0.5 + "@smithy/middleware-endpoint": ^3.1.0 + "@smithy/middleware-retry": ^3.0.14 + "@smithy/middleware-serde": ^3.0.3 + "@smithy/middleware-stack": ^3.0.3 + "@smithy/node-config-provider": ^3.1.4 + "@smithy/node-http-handler": ^3.1.4 + "@smithy/protocol-http": ^4.1.0 + "@smithy/smithy-client": ^3.1.12 + "@smithy/types": ^3.3.0 + "@smithy/url-parser": ^3.0.3 + "@smithy/util-base64": ^3.0.0 + "@smithy/util-body-length-browser": ^3.0.0 + "@smithy/util-body-length-node": ^3.0.0 + "@smithy/util-defaults-mode-browser": ^3.0.14 + "@smithy/util-defaults-mode-node": ^3.0.14 + "@smithy/util-endpoints": ^2.0.5 + "@smithy/util-middleware": ^3.0.3 + "@smithy/util-retry": ^3.0.3 + "@smithy/util-stream": ^3.1.3 + "@smithy/util-utf8": ^3.0.0 + tslib: ^2.6.2 + checksum: 5eeb4954fbf4757eb5decde4a8269bab5f51ed3386d304cec7b0e09ad0860d384d5d9a556946969c1db3899d7ca17b8daabb2d341fea112d93d6b2b0ec2925da languageName: node linkType: hard @@ -2415,45 +2817,6 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/client-pinpoint@npm:3.6.1": - version: 3.6.1 - resolution: "@aws-sdk/client-pinpoint@npm:3.6.1" - dependencies: - "@aws-crypto/sha256-browser": ^1.0.0 - "@aws-crypto/sha256-js": ^1.0.0 - "@aws-sdk/config-resolver": 3.6.1 - "@aws-sdk/credential-provider-node": 3.6.1 - "@aws-sdk/fetch-http-handler": 3.6.1 - "@aws-sdk/hash-node": 3.6.1 - "@aws-sdk/invalid-dependency": 3.6.1 - "@aws-sdk/middleware-content-length": 3.6.1 - "@aws-sdk/middleware-host-header": 3.6.1 - "@aws-sdk/middleware-logger": 3.6.1 - "@aws-sdk/middleware-retry": 3.6.1 - "@aws-sdk/middleware-serde": 3.6.1 - "@aws-sdk/middleware-signing": 3.6.1 - "@aws-sdk/middleware-stack": 3.6.1 - "@aws-sdk/middleware-user-agent": 3.6.1 - "@aws-sdk/node-config-provider": 3.6.1 - "@aws-sdk/node-http-handler": 3.6.1 - "@aws-sdk/protocol-http": 3.6.1 - "@aws-sdk/smithy-client": 3.6.1 - "@aws-sdk/types": 3.6.1 - "@aws-sdk/url-parser": 3.6.1 - "@aws-sdk/url-parser-native": 3.6.1 - "@aws-sdk/util-base64-browser": 3.6.1 - "@aws-sdk/util-base64-node": 3.6.1 - "@aws-sdk/util-body-length-browser": 3.6.1 - "@aws-sdk/util-body-length-node": 3.6.1 - "@aws-sdk/util-user-agent-browser": 3.6.1 - "@aws-sdk/util-user-agent-node": 3.6.1 - "@aws-sdk/util-utf8-browser": 3.6.1 - "@aws-sdk/util-utf8-node": 3.6.1 - tslib: ^2.0.0 - checksum: ca5928a7f161b9b22727b92a3c2366c40726631cc4a2f2689149e36d8c2e39f37ca2bedba48d47d52f13bf3bb62e4692f0481c30bd0901522a9427e866e815ab - languageName: node - linkType: hard - "@aws-sdk/client-polly@npm:3.6.1": version: 3.6.1 resolution: "@aws-sdk/client-polly@npm:3.6.1" @@ -2493,119 +2856,74 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/client-rekognition@npm:3.6.1": - version: 3.6.1 - resolution: "@aws-sdk/client-rekognition@npm:3.6.1" - dependencies: - "@aws-crypto/sha256-browser": ^1.0.0 - "@aws-crypto/sha256-js": ^1.0.0 - "@aws-sdk/config-resolver": 3.6.1 - "@aws-sdk/credential-provider-node": 3.6.1 - "@aws-sdk/fetch-http-handler": 3.6.1 - "@aws-sdk/hash-node": 3.6.1 - "@aws-sdk/invalid-dependency": 3.6.1 - "@aws-sdk/middleware-content-length": 3.6.1 - "@aws-sdk/middleware-host-header": 3.6.1 - "@aws-sdk/middleware-logger": 3.6.1 - "@aws-sdk/middleware-retry": 3.6.1 - "@aws-sdk/middleware-serde": 3.6.1 - "@aws-sdk/middleware-signing": 3.6.1 - "@aws-sdk/middleware-stack": 3.6.1 - "@aws-sdk/middleware-user-agent": 3.6.1 - "@aws-sdk/node-config-provider": 3.6.1 - "@aws-sdk/node-http-handler": 3.6.1 - "@aws-sdk/protocol-http": 3.6.1 - "@aws-sdk/smithy-client": 3.6.1 - "@aws-sdk/types": 3.6.1 - "@aws-sdk/url-parser": 3.6.1 - "@aws-sdk/url-parser-native": 3.6.1 - "@aws-sdk/util-base64-browser": 3.6.1 - "@aws-sdk/util-base64-node": 3.6.1 - "@aws-sdk/util-body-length-browser": 3.6.1 - "@aws-sdk/util-body-length-node": 3.6.1 - "@aws-sdk/util-user-agent-browser": 3.6.1 - "@aws-sdk/util-user-agent-node": 3.6.1 - "@aws-sdk/util-utf8-browser": 3.6.1 - "@aws-sdk/util-utf8-node": 3.6.1 - "@aws-sdk/util-waiter": 3.6.1 - tslib: ^2.0.0 - checksum: 26b967261746a456d850c7d06ac2dbccd493f364a46d2b57b372ccb8cb8034f7e1bc1ae71330bdb7682b1ce259dd36592038b8f68a26342a7641b19437321903 - languageName: node - linkType: hard - -"@aws-sdk/client-rekognition@npm:^3.303.0": - version: 3.319.0 - resolution: "@aws-sdk/client-rekognition@npm:3.319.0" - dependencies: - "@aws-crypto/sha256-browser": 3.0.0 - "@aws-crypto/sha256-js": 3.0.0 - "@aws-sdk/client-sts": 3.319.0 - "@aws-sdk/config-resolver": 3.310.0 - "@aws-sdk/credential-provider-node": 3.319.0 - "@aws-sdk/fetch-http-handler": 3.310.0 - "@aws-sdk/hash-node": 3.310.0 - "@aws-sdk/invalid-dependency": 3.310.0 - "@aws-sdk/middleware-content-length": 3.310.0 - "@aws-sdk/middleware-endpoint": 3.310.0 - "@aws-sdk/middleware-host-header": 3.310.0 - "@aws-sdk/middleware-logger": 3.310.0 - "@aws-sdk/middleware-recursion-detection": 3.310.0 - "@aws-sdk/middleware-retry": 3.310.0 - "@aws-sdk/middleware-serde": 3.310.0 - "@aws-sdk/middleware-signing": 3.310.0 - "@aws-sdk/middleware-stack": 3.310.0 - "@aws-sdk/middleware-user-agent": 3.319.0 - "@aws-sdk/node-config-provider": 3.310.0 - "@aws-sdk/node-http-handler": 3.310.0 - "@aws-sdk/protocol-http": 3.310.0 - "@aws-sdk/smithy-client": 3.316.0 - "@aws-sdk/types": 3.310.0 - "@aws-sdk/url-parser": 3.310.0 - "@aws-sdk/util-base64": 3.310.0 - "@aws-sdk/util-body-length-browser": 3.310.0 - "@aws-sdk/util-body-length-node": 3.310.0 - "@aws-sdk/util-defaults-mode-browser": 3.316.0 - "@aws-sdk/util-defaults-mode-node": 3.316.0 - "@aws-sdk/util-endpoints": 3.319.0 - "@aws-sdk/util-retry": 3.310.0 - "@aws-sdk/util-user-agent-browser": 3.310.0 - "@aws-sdk/util-user-agent-node": 3.310.0 - "@aws-sdk/util-utf8": 3.310.0 - "@aws-sdk/util-waiter": 3.310.0 - tslib: ^2.5.0 - checksum: 6cc15cdab351235fff8a06ea1f86e0b68984694cd1e0841d587686fa9d4fe31d226e5fe0add85fdcd4e6d4746cf92272c89f3d9e3382782639b7bc37258f6994 +"@aws-sdk/client-rds@npm:3.624.0": + version: 3.624.0 + resolution: "@aws-sdk/client-rds@npm:3.624.0" + dependencies: + "@aws-crypto/sha256-browser": 5.2.0 + "@aws-crypto/sha256-js": 5.2.0 + "@aws-sdk/client-sso-oidc": 3.624.0 + "@aws-sdk/client-sts": 3.624.0 + "@aws-sdk/core": 3.624.0 + "@aws-sdk/credential-provider-node": 3.624.0 + "@aws-sdk/middleware-host-header": 3.620.0 + "@aws-sdk/middleware-logger": 3.609.0 + "@aws-sdk/middleware-recursion-detection": 3.620.0 + "@aws-sdk/middleware-sdk-rds": 3.620.0 + "@aws-sdk/middleware-user-agent": 3.620.0 + "@aws-sdk/region-config-resolver": 3.614.0 + "@aws-sdk/types": 3.609.0 + "@aws-sdk/util-endpoints": 3.614.0 + "@aws-sdk/util-user-agent-browser": 3.609.0 + "@aws-sdk/util-user-agent-node": 3.614.0 + "@smithy/config-resolver": ^3.0.5 + "@smithy/core": ^2.3.2 + "@smithy/fetch-http-handler": ^3.2.4 + "@smithy/hash-node": ^3.0.3 + "@smithy/invalid-dependency": ^3.0.3 + "@smithy/middleware-content-length": ^3.0.5 + "@smithy/middleware-endpoint": ^3.1.0 + "@smithy/middleware-retry": ^3.0.14 + "@smithy/middleware-serde": ^3.0.3 + "@smithy/middleware-stack": ^3.0.3 + "@smithy/node-config-provider": ^3.1.4 + "@smithy/node-http-handler": ^3.1.4 + "@smithy/protocol-http": ^4.1.0 + "@smithy/smithy-client": ^3.1.12 + "@smithy/types": ^3.3.0 + "@smithy/url-parser": ^3.0.3 + "@smithy/util-base64": ^3.0.0 + "@smithy/util-body-length-browser": ^3.0.0 + "@smithy/util-body-length-node": ^3.0.0 + "@smithy/util-defaults-mode-browser": ^3.0.14 + "@smithy/util-defaults-mode-node": ^3.0.14 + "@smithy/util-endpoints": ^2.0.5 + "@smithy/util-middleware": ^3.0.3 + "@smithy/util-retry": ^3.0.3 + "@smithy/util-utf8": ^3.0.0 + "@smithy/util-waiter": ^3.1.2 + tslib: ^2.6.2 + checksum: c627fa217abec6911c80b03fb33afff753480252f4dd1d9423bd04b0fe68bdbb1a3fad6e09eb453740604d261ab88701962d05a7d1f8c1f95899d096b4214ba3 languageName: node linkType: hard -"@aws-sdk/client-s3@npm:3.6.1": +"@aws-sdk/client-rekognition@npm:3.6.1": version: 3.6.1 - resolution: "@aws-sdk/client-s3@npm:3.6.1" + resolution: "@aws-sdk/client-rekognition@npm:3.6.1" dependencies: "@aws-crypto/sha256-browser": ^1.0.0 "@aws-crypto/sha256-js": ^1.0.0 "@aws-sdk/config-resolver": 3.6.1 "@aws-sdk/credential-provider-node": 3.6.1 - "@aws-sdk/eventstream-serde-browser": 3.6.1 - "@aws-sdk/eventstream-serde-config-resolver": 3.6.1 - "@aws-sdk/eventstream-serde-node": 3.6.1 "@aws-sdk/fetch-http-handler": 3.6.1 - "@aws-sdk/hash-blob-browser": 3.6.1 "@aws-sdk/hash-node": 3.6.1 - "@aws-sdk/hash-stream-node": 3.6.1 "@aws-sdk/invalid-dependency": 3.6.1 - "@aws-sdk/md5-js": 3.6.1 - "@aws-sdk/middleware-apply-body-checksum": 3.6.1 - "@aws-sdk/middleware-bucket-endpoint": 3.6.1 "@aws-sdk/middleware-content-length": 3.6.1 - "@aws-sdk/middleware-expect-continue": 3.6.1 "@aws-sdk/middleware-host-header": 3.6.1 - "@aws-sdk/middleware-location-constraint": 3.6.1 "@aws-sdk/middleware-logger": 3.6.1 "@aws-sdk/middleware-retry": 3.6.1 - "@aws-sdk/middleware-sdk-s3": 3.6.1 "@aws-sdk/middleware-serde": 3.6.1 "@aws-sdk/middleware-signing": 3.6.1 - "@aws-sdk/middleware-ssec": 3.6.1 "@aws-sdk/middleware-stack": 3.6.1 "@aws-sdk/middleware-user-agent": 3.6.1 "@aws-sdk/node-config-provider": 3.6.1 @@ -2624,352 +2942,402 @@ __metadata: "@aws-sdk/util-utf8-browser": 3.6.1 "@aws-sdk/util-utf8-node": 3.6.1 "@aws-sdk/util-waiter": 3.6.1 - "@aws-sdk/xml-builder": 3.6.1 - fast-xml-parser: ^3.16.0 tslib: ^2.0.0 - checksum: 948c59e999b5c85b24a7b275fc778a83019b207e85d4467d6dd88155869ba790c603f6ebee55807fbf6a05493708ba0e8a179380811efa401b4084fc5056cb77 - languageName: node - linkType: hard - -"@aws-sdk/client-s3@npm:^3.25.0": - version: 3.44.0 - resolution: "@aws-sdk/client-s3@npm:3.44.0" - dependencies: - "@aws-crypto/sha256-browser": 2.0.0 - "@aws-crypto/sha256-js": 2.0.0 - "@aws-sdk/client-sts": 3.43.0 - "@aws-sdk/config-resolver": 3.40.0 - "@aws-sdk/credential-provider-node": 3.41.0 - "@aws-sdk/eventstream-serde-browser": 3.40.0 - "@aws-sdk/eventstream-serde-config-resolver": 3.40.0 - "@aws-sdk/eventstream-serde-node": 3.40.0 - "@aws-sdk/fetch-http-handler": 3.40.0 - "@aws-sdk/hash-blob-browser": 3.40.0 - "@aws-sdk/hash-node": 3.40.0 - "@aws-sdk/hash-stream-node": 3.40.0 - "@aws-sdk/invalid-dependency": 3.40.0 - "@aws-sdk/md5-js": 3.40.0 - "@aws-sdk/middleware-apply-body-checksum": 3.40.0 - "@aws-sdk/middleware-bucket-endpoint": 3.41.0 - "@aws-sdk/middleware-content-length": 3.40.0 - "@aws-sdk/middleware-expect-continue": 3.40.0 - "@aws-sdk/middleware-host-header": 3.40.0 - "@aws-sdk/middleware-location-constraint": 3.40.0 - "@aws-sdk/middleware-logger": 3.40.0 - "@aws-sdk/middleware-retry": 3.40.0 - "@aws-sdk/middleware-sdk-s3": 3.41.0 - "@aws-sdk/middleware-serde": 3.40.0 - "@aws-sdk/middleware-signing": 3.40.0 - "@aws-sdk/middleware-ssec": 3.40.0 - "@aws-sdk/middleware-stack": 3.40.0 - "@aws-sdk/middleware-user-agent": 3.40.0 - "@aws-sdk/node-config-provider": 3.40.0 - "@aws-sdk/node-http-handler": 3.40.0 - "@aws-sdk/protocol-http": 3.40.0 - "@aws-sdk/smithy-client": 3.41.0 - "@aws-sdk/types": 3.40.0 - "@aws-sdk/url-parser": 3.40.0 - "@aws-sdk/util-base64-browser": 3.37.0 - "@aws-sdk/util-base64-node": 3.37.0 - "@aws-sdk/util-body-length-browser": 3.37.0 - "@aws-sdk/util-body-length-node": 3.37.0 - "@aws-sdk/util-user-agent-browser": 3.40.0 - "@aws-sdk/util-user-agent-node": 3.40.0 - "@aws-sdk/util-utf8-browser": 3.37.0 - "@aws-sdk/util-utf8-node": 3.37.0 - "@aws-sdk/util-waiter": 3.40.0 - "@aws-sdk/xml-builder": 3.37.0 - entities: 2.2.0 - fast-xml-parser: 3.19.0 - tslib: ^2.3.0 - checksum: 268681108a7c6b22faef80303742dbab61f584af4abc532c12ce55f3d555c54f68395f23d60f32514499b838447e2f5f6410a9d850730fb80409def4dd8cdca3 - languageName: node - linkType: hard - -"@aws-sdk/client-ssm@npm:^3.303.0": - version: 3.319.0 - resolution: "@aws-sdk/client-ssm@npm:3.319.0" - dependencies: - "@aws-crypto/sha256-browser": 3.0.0 - "@aws-crypto/sha256-js": 3.0.0 - "@aws-sdk/client-sts": 3.319.0 - "@aws-sdk/config-resolver": 3.310.0 - "@aws-sdk/credential-provider-node": 3.319.0 - "@aws-sdk/fetch-http-handler": 3.310.0 - "@aws-sdk/hash-node": 3.310.0 - "@aws-sdk/invalid-dependency": 3.310.0 - "@aws-sdk/middleware-content-length": 3.310.0 - "@aws-sdk/middleware-endpoint": 3.310.0 - "@aws-sdk/middleware-host-header": 3.310.0 - "@aws-sdk/middleware-logger": 3.310.0 - "@aws-sdk/middleware-recursion-detection": 3.310.0 - "@aws-sdk/middleware-retry": 3.310.0 - "@aws-sdk/middleware-serde": 3.310.0 - "@aws-sdk/middleware-signing": 3.310.0 - "@aws-sdk/middleware-stack": 3.310.0 - "@aws-sdk/middleware-user-agent": 3.319.0 - "@aws-sdk/node-config-provider": 3.310.0 - "@aws-sdk/node-http-handler": 3.310.0 - "@aws-sdk/protocol-http": 3.310.0 - "@aws-sdk/smithy-client": 3.316.0 - "@aws-sdk/types": 3.310.0 - "@aws-sdk/url-parser": 3.310.0 - "@aws-sdk/util-base64": 3.310.0 - "@aws-sdk/util-body-length-browser": 3.310.0 - "@aws-sdk/util-body-length-node": 3.310.0 - "@aws-sdk/util-defaults-mode-browser": 3.316.0 - "@aws-sdk/util-defaults-mode-node": 3.316.0 - "@aws-sdk/util-endpoints": 3.319.0 - "@aws-sdk/util-retry": 3.310.0 - "@aws-sdk/util-user-agent-browser": 3.310.0 - "@aws-sdk/util-user-agent-node": 3.310.0 - "@aws-sdk/util-utf8": 3.310.0 - "@aws-sdk/util-waiter": 3.310.0 - tslib: ^2.5.0 - uuid: ^8.3.2 - checksum: d878a77dfafddd386e019c64d16f3c9f0059e06c1cbb61020863ea1e15a0d0baeb6e76c6d5f128364820a98e59dd90ea7829cfb8efe43b946cd16ffd8d48a029 - languageName: node - linkType: hard - -"@aws-sdk/client-sso-oidc@npm:3.319.0": - version: 3.319.0 - resolution: "@aws-sdk/client-sso-oidc@npm:3.319.0" - dependencies: - "@aws-crypto/sha256-browser": 3.0.0 - "@aws-crypto/sha256-js": 3.0.0 - "@aws-sdk/config-resolver": 3.310.0 - "@aws-sdk/fetch-http-handler": 3.310.0 - "@aws-sdk/hash-node": 3.310.0 - "@aws-sdk/invalid-dependency": 3.310.0 - "@aws-sdk/middleware-content-length": 3.310.0 - "@aws-sdk/middleware-endpoint": 3.310.0 - "@aws-sdk/middleware-host-header": 3.310.0 - "@aws-sdk/middleware-logger": 3.310.0 - "@aws-sdk/middleware-recursion-detection": 3.310.0 - "@aws-sdk/middleware-retry": 3.310.0 - "@aws-sdk/middleware-serde": 3.310.0 - "@aws-sdk/middleware-stack": 3.310.0 - "@aws-sdk/middleware-user-agent": 3.319.0 - "@aws-sdk/node-config-provider": 3.310.0 - "@aws-sdk/node-http-handler": 3.310.0 - "@aws-sdk/protocol-http": 3.310.0 - "@aws-sdk/smithy-client": 3.316.0 - "@aws-sdk/types": 3.310.0 - "@aws-sdk/url-parser": 3.310.0 - "@aws-sdk/util-base64": 3.310.0 - "@aws-sdk/util-body-length-browser": 3.310.0 - "@aws-sdk/util-body-length-node": 3.310.0 - "@aws-sdk/util-defaults-mode-browser": 3.316.0 - "@aws-sdk/util-defaults-mode-node": 3.316.0 - "@aws-sdk/util-endpoints": 3.319.0 - "@aws-sdk/util-retry": 3.310.0 - "@aws-sdk/util-user-agent-browser": 3.310.0 - "@aws-sdk/util-user-agent-node": 3.310.0 - "@aws-sdk/util-utf8": 3.310.0 - tslib: ^2.5.0 - checksum: 0d9c7ff9508bea72a2d3206e54810503f1bde101cec49d2925ae249c042df65dc1de89ee4d411f15dda29f6f62ba23b72c030bc02df298e55d34af3a034f4cb8 - languageName: node - linkType: hard - -"@aws-sdk/client-sso@npm:3.319.0": - version: 3.319.0 - resolution: "@aws-sdk/client-sso@npm:3.319.0" - dependencies: - "@aws-crypto/sha256-browser": 3.0.0 - "@aws-crypto/sha256-js": 3.0.0 - "@aws-sdk/config-resolver": 3.310.0 - "@aws-sdk/fetch-http-handler": 3.310.0 - "@aws-sdk/hash-node": 3.310.0 - "@aws-sdk/invalid-dependency": 3.310.0 - "@aws-sdk/middleware-content-length": 3.310.0 - "@aws-sdk/middleware-endpoint": 3.310.0 - "@aws-sdk/middleware-host-header": 3.310.0 - "@aws-sdk/middleware-logger": 3.310.0 - "@aws-sdk/middleware-recursion-detection": 3.310.0 - "@aws-sdk/middleware-retry": 3.310.0 - "@aws-sdk/middleware-serde": 3.310.0 - "@aws-sdk/middleware-stack": 3.310.0 - "@aws-sdk/middleware-user-agent": 3.319.0 - "@aws-sdk/node-config-provider": 3.310.0 - "@aws-sdk/node-http-handler": 3.310.0 - "@aws-sdk/protocol-http": 3.310.0 - "@aws-sdk/smithy-client": 3.316.0 - "@aws-sdk/types": 3.310.0 - "@aws-sdk/url-parser": 3.310.0 - "@aws-sdk/util-base64": 3.310.0 - "@aws-sdk/util-body-length-browser": 3.310.0 - "@aws-sdk/util-body-length-node": 3.310.0 - "@aws-sdk/util-defaults-mode-browser": 3.316.0 - "@aws-sdk/util-defaults-mode-node": 3.316.0 - "@aws-sdk/util-endpoints": 3.319.0 - "@aws-sdk/util-retry": 3.310.0 - "@aws-sdk/util-user-agent-browser": 3.310.0 - "@aws-sdk/util-user-agent-node": 3.310.0 - "@aws-sdk/util-utf8": 3.310.0 - tslib: ^2.5.0 - checksum: 80049d13f474910471a3667a4dcf6507495d2c0c392b1140e9e4b6e9092ca24dbf39c76b407c2ce9e45911f60494acc14fc8b954960bed7f4ce47325ce1b7c23 - languageName: node - linkType: hard - -"@aws-sdk/client-sso@npm:3.41.0": - version: 3.41.0 - resolution: "@aws-sdk/client-sso@npm:3.41.0" - dependencies: - "@aws-crypto/sha256-browser": 2.0.0 - "@aws-crypto/sha256-js": 2.0.0 - "@aws-sdk/config-resolver": 3.40.0 - "@aws-sdk/fetch-http-handler": 3.40.0 - "@aws-sdk/hash-node": 3.40.0 - "@aws-sdk/invalid-dependency": 3.40.0 - "@aws-sdk/middleware-content-length": 3.40.0 - "@aws-sdk/middleware-host-header": 3.40.0 - "@aws-sdk/middleware-logger": 3.40.0 - "@aws-sdk/middleware-retry": 3.40.0 - "@aws-sdk/middleware-serde": 3.40.0 - "@aws-sdk/middleware-stack": 3.40.0 - "@aws-sdk/middleware-user-agent": 3.40.0 - "@aws-sdk/node-config-provider": 3.40.0 - "@aws-sdk/node-http-handler": 3.40.0 - "@aws-sdk/protocol-http": 3.40.0 - "@aws-sdk/smithy-client": 3.41.0 - "@aws-sdk/types": 3.40.0 - "@aws-sdk/url-parser": 3.40.0 - "@aws-sdk/util-base64-browser": 3.37.0 - "@aws-sdk/util-base64-node": 3.37.0 - "@aws-sdk/util-body-length-browser": 3.37.0 - "@aws-sdk/util-body-length-node": 3.37.0 - "@aws-sdk/util-user-agent-browser": 3.40.0 - "@aws-sdk/util-user-agent-node": 3.40.0 - "@aws-sdk/util-utf8-browser": 3.37.0 - "@aws-sdk/util-utf8-node": 3.37.0 - tslib: ^2.3.0 - checksum: 72a3f772ab467489f9772c84ab942b4c4b13c5ef51e6c5b7de53001edee540c9d2e2b9a36fe1ca6f3a92188c7053c8b3e7344c29003a5f91770e5a09dc16ae4a - languageName: node - linkType: hard - -"@aws-sdk/client-sts@npm:3.319.0": - version: 3.319.0 - resolution: "@aws-sdk/client-sts@npm:3.319.0" - dependencies: - "@aws-crypto/sha256-browser": 3.0.0 - "@aws-crypto/sha256-js": 3.0.0 - "@aws-sdk/config-resolver": 3.310.0 - "@aws-sdk/credential-provider-node": 3.319.0 - "@aws-sdk/fetch-http-handler": 3.310.0 - "@aws-sdk/hash-node": 3.310.0 - "@aws-sdk/invalid-dependency": 3.310.0 - "@aws-sdk/middleware-content-length": 3.310.0 - "@aws-sdk/middleware-endpoint": 3.310.0 - "@aws-sdk/middleware-host-header": 3.310.0 - "@aws-sdk/middleware-logger": 3.310.0 - "@aws-sdk/middleware-recursion-detection": 3.310.0 - "@aws-sdk/middleware-retry": 3.310.0 - "@aws-sdk/middleware-sdk-sts": 3.310.0 - "@aws-sdk/middleware-serde": 3.310.0 - "@aws-sdk/middleware-signing": 3.310.0 - "@aws-sdk/middleware-stack": 3.310.0 - "@aws-sdk/middleware-user-agent": 3.319.0 - "@aws-sdk/node-config-provider": 3.310.0 - "@aws-sdk/node-http-handler": 3.310.0 - "@aws-sdk/protocol-http": 3.310.0 - "@aws-sdk/smithy-client": 3.316.0 - "@aws-sdk/types": 3.310.0 - "@aws-sdk/url-parser": 3.310.0 - "@aws-sdk/util-base64": 3.310.0 - "@aws-sdk/util-body-length-browser": 3.310.0 - "@aws-sdk/util-body-length-node": 3.310.0 - "@aws-sdk/util-defaults-mode-browser": 3.316.0 - "@aws-sdk/util-defaults-mode-node": 3.316.0 - "@aws-sdk/util-endpoints": 3.319.0 - "@aws-sdk/util-retry": 3.310.0 - "@aws-sdk/util-user-agent-browser": 3.310.0 - "@aws-sdk/util-user-agent-node": 3.310.0 - "@aws-sdk/util-utf8": 3.310.0 - fast-xml-parser: 4.1.2 - tslib: ^2.5.0 - checksum: 5bc4c2613e75e250a14cf91980e141e1acdca60f67acffd6ac7cc0c6215ef388de6ceedc34574f37dc001204be5e05c6f6aade6bd9643002b10ad03d24397288 + checksum: 26b967261746a456d850c7d06ac2dbccd493f364a46d2b57b372ccb8cb8034f7e1bc1ae71330bdb7682b1ce259dd36592038b8f68a26342a7641b19437321903 languageName: node linkType: hard -"@aws-sdk/client-sts@npm:3.41.0": - version: 3.41.0 - resolution: "@aws-sdk/client-sts@npm:3.41.0" +"@aws-sdk/client-rekognition@npm:3.624.0": + version: 3.624.0 + resolution: "@aws-sdk/client-rekognition@npm:3.624.0" + dependencies: + "@aws-crypto/sha256-browser": 5.2.0 + "@aws-crypto/sha256-js": 5.2.0 + "@aws-sdk/client-sso-oidc": 3.624.0 + "@aws-sdk/client-sts": 3.624.0 + "@aws-sdk/core": 3.624.0 + "@aws-sdk/credential-provider-node": 3.624.0 + "@aws-sdk/middleware-host-header": 3.620.0 + "@aws-sdk/middleware-logger": 3.609.0 + "@aws-sdk/middleware-recursion-detection": 3.620.0 + "@aws-sdk/middleware-user-agent": 3.620.0 + "@aws-sdk/region-config-resolver": 3.614.0 + "@aws-sdk/types": 3.609.0 + "@aws-sdk/util-endpoints": 3.614.0 + "@aws-sdk/util-user-agent-browser": 3.609.0 + "@aws-sdk/util-user-agent-node": 3.614.0 + "@smithy/config-resolver": ^3.0.5 + "@smithy/core": ^2.3.2 + "@smithy/fetch-http-handler": ^3.2.4 + "@smithy/hash-node": ^3.0.3 + "@smithy/invalid-dependency": ^3.0.3 + "@smithy/middleware-content-length": ^3.0.5 + "@smithy/middleware-endpoint": ^3.1.0 + "@smithy/middleware-retry": ^3.0.14 + "@smithy/middleware-serde": ^3.0.3 + "@smithy/middleware-stack": ^3.0.3 + "@smithy/node-config-provider": ^3.1.4 + "@smithy/node-http-handler": ^3.1.4 + "@smithy/protocol-http": ^4.1.0 + "@smithy/smithy-client": ^3.1.12 + "@smithy/types": ^3.3.0 + "@smithy/url-parser": ^3.0.3 + "@smithy/util-base64": ^3.0.0 + "@smithy/util-body-length-browser": ^3.0.0 + "@smithy/util-body-length-node": ^3.0.0 + "@smithy/util-defaults-mode-browser": ^3.0.14 + "@smithy/util-defaults-mode-node": ^3.0.14 + "@smithy/util-endpoints": ^2.0.5 + "@smithy/util-middleware": ^3.0.3 + "@smithy/util-retry": ^3.0.3 + "@smithy/util-utf8": ^3.0.0 + "@smithy/util-waiter": ^3.1.2 + tslib: ^2.6.2 + uuid: ^9.0.1 + checksum: c2a88b3b77ab0403ee78482381bdf6ed14c677faba0250e81b024b5285083eb9ed8b6a4db6c7af648685cff8150e002e49261425188d3b01f3e5b1c02a53d3a3 + languageName: node + linkType: hard + +"@aws-sdk/client-s3@npm:3.624.0, @aws-sdk/client-s3@npm:^3.25.0": + version: 3.624.0 + resolution: "@aws-sdk/client-s3@npm:3.624.0" + dependencies: + "@aws-crypto/sha1-browser": 5.2.0 + "@aws-crypto/sha256-browser": 5.2.0 + "@aws-crypto/sha256-js": 5.2.0 + "@aws-sdk/client-sso-oidc": 3.624.0 + "@aws-sdk/client-sts": 3.624.0 + "@aws-sdk/core": 3.624.0 + "@aws-sdk/credential-provider-node": 3.624.0 + "@aws-sdk/middleware-bucket-endpoint": 3.620.0 + "@aws-sdk/middleware-expect-continue": 3.620.0 + "@aws-sdk/middleware-flexible-checksums": 3.620.0 + "@aws-sdk/middleware-host-header": 3.620.0 + "@aws-sdk/middleware-location-constraint": 3.609.0 + "@aws-sdk/middleware-logger": 3.609.0 + "@aws-sdk/middleware-recursion-detection": 3.620.0 + "@aws-sdk/middleware-sdk-s3": 3.624.0 + "@aws-sdk/middleware-ssec": 3.609.0 + "@aws-sdk/middleware-user-agent": 3.620.0 + "@aws-sdk/region-config-resolver": 3.614.0 + "@aws-sdk/signature-v4-multi-region": 3.624.0 + "@aws-sdk/types": 3.609.0 + "@aws-sdk/util-endpoints": 3.614.0 + "@aws-sdk/util-user-agent-browser": 3.609.0 + "@aws-sdk/util-user-agent-node": 3.614.0 + "@aws-sdk/xml-builder": 3.609.0 + "@smithy/config-resolver": ^3.0.5 + "@smithy/core": ^2.3.2 + "@smithy/eventstream-serde-browser": ^3.0.5 + "@smithy/eventstream-serde-config-resolver": ^3.0.3 + "@smithy/eventstream-serde-node": ^3.0.4 + "@smithy/fetch-http-handler": ^3.2.4 + "@smithy/hash-blob-browser": ^3.1.2 + "@smithy/hash-node": ^3.0.3 + "@smithy/hash-stream-node": ^3.1.2 + "@smithy/invalid-dependency": ^3.0.3 + "@smithy/md5-js": ^3.0.3 + "@smithy/middleware-content-length": ^3.0.5 + "@smithy/middleware-endpoint": ^3.1.0 + "@smithy/middleware-retry": ^3.0.14 + "@smithy/middleware-serde": ^3.0.3 + "@smithy/middleware-stack": ^3.0.3 + "@smithy/node-config-provider": ^3.1.4 + "@smithy/node-http-handler": ^3.1.4 + "@smithy/protocol-http": ^4.1.0 + "@smithy/smithy-client": ^3.1.12 + "@smithy/types": ^3.3.0 + "@smithy/url-parser": ^3.0.3 + "@smithy/util-base64": ^3.0.0 + "@smithy/util-body-length-browser": ^3.0.0 + "@smithy/util-body-length-node": ^3.0.0 + "@smithy/util-defaults-mode-browser": ^3.0.14 + "@smithy/util-defaults-mode-node": ^3.0.14 + "@smithy/util-endpoints": ^2.0.5 + "@smithy/util-middleware": ^3.0.3 + "@smithy/util-retry": ^3.0.3 + "@smithy/util-stream": ^3.1.3 + "@smithy/util-utf8": ^3.0.0 + "@smithy/util-waiter": ^3.1.2 + tslib: ^2.6.2 + checksum: f40bd6c9fb0d87f8e154824089f97665110b4789bfee788d7a7faa93f122add57b48eb0d2f8616b11e4501825b8040fe9ecf04929e0c75234290fc77dfa0887e + languageName: node + linkType: hard + +"@aws-sdk/client-ssm@npm:3.624.0": + version: 3.624.0 + resolution: "@aws-sdk/client-ssm@npm:3.624.0" + dependencies: + "@aws-crypto/sha256-browser": 5.2.0 + "@aws-crypto/sha256-js": 5.2.0 + "@aws-sdk/client-sso-oidc": 3.624.0 + "@aws-sdk/client-sts": 3.624.0 + "@aws-sdk/core": 3.624.0 + "@aws-sdk/credential-provider-node": 3.624.0 + "@aws-sdk/middleware-host-header": 3.620.0 + "@aws-sdk/middleware-logger": 3.609.0 + "@aws-sdk/middleware-recursion-detection": 3.620.0 + "@aws-sdk/middleware-user-agent": 3.620.0 + "@aws-sdk/region-config-resolver": 3.614.0 + "@aws-sdk/types": 3.609.0 + "@aws-sdk/util-endpoints": 3.614.0 + "@aws-sdk/util-user-agent-browser": 3.609.0 + "@aws-sdk/util-user-agent-node": 3.614.0 + "@smithy/config-resolver": ^3.0.5 + "@smithy/core": ^2.3.2 + "@smithy/fetch-http-handler": ^3.2.4 + "@smithy/hash-node": ^3.0.3 + "@smithy/invalid-dependency": ^3.0.3 + "@smithy/middleware-content-length": ^3.0.5 + "@smithy/middleware-endpoint": ^3.1.0 + "@smithy/middleware-retry": ^3.0.14 + "@smithy/middleware-serde": ^3.0.3 + "@smithy/middleware-stack": ^3.0.3 + "@smithy/node-config-provider": ^3.1.4 + "@smithy/node-http-handler": ^3.1.4 + "@smithy/protocol-http": ^4.1.0 + "@smithy/smithy-client": ^3.1.12 + "@smithy/types": ^3.3.0 + "@smithy/url-parser": ^3.0.3 + "@smithy/util-base64": ^3.0.0 + "@smithy/util-body-length-browser": ^3.0.0 + "@smithy/util-body-length-node": ^3.0.0 + "@smithy/util-defaults-mode-browser": ^3.0.14 + "@smithy/util-defaults-mode-node": ^3.0.14 + "@smithy/util-endpoints": ^2.0.5 + "@smithy/util-middleware": ^3.0.3 + "@smithy/util-retry": ^3.0.3 + "@smithy/util-utf8": ^3.0.0 + "@smithy/util-waiter": ^3.1.2 + tslib: ^2.6.2 + uuid: ^9.0.1 + checksum: da1df3ad37c99c867b308e5c0b857c6a9660362c2db79787e705ba4ce7daffda981a0707d31c1ae6dbf998c75505db7ac0e2c0308c33476f54b0ffdfcd316983 + languageName: node + linkType: hard + +"@aws-sdk/client-sso-oidc@npm:3.624.0": + version: 3.624.0 + resolution: "@aws-sdk/client-sso-oidc@npm:3.624.0" + dependencies: + "@aws-crypto/sha256-browser": 5.2.0 + "@aws-crypto/sha256-js": 5.2.0 + "@aws-sdk/core": 3.624.0 + "@aws-sdk/credential-provider-node": 3.624.0 + "@aws-sdk/middleware-host-header": 3.620.0 + "@aws-sdk/middleware-logger": 3.609.0 + "@aws-sdk/middleware-recursion-detection": 3.620.0 + "@aws-sdk/middleware-user-agent": 3.620.0 + "@aws-sdk/region-config-resolver": 3.614.0 + "@aws-sdk/types": 3.609.0 + "@aws-sdk/util-endpoints": 3.614.0 + "@aws-sdk/util-user-agent-browser": 3.609.0 + "@aws-sdk/util-user-agent-node": 3.614.0 + "@smithy/config-resolver": ^3.0.5 + "@smithy/core": ^2.3.2 + "@smithy/fetch-http-handler": ^3.2.4 + "@smithy/hash-node": ^3.0.3 + "@smithy/invalid-dependency": ^3.0.3 + "@smithy/middleware-content-length": ^3.0.5 + "@smithy/middleware-endpoint": ^3.1.0 + "@smithy/middleware-retry": ^3.0.14 + "@smithy/middleware-serde": ^3.0.3 + "@smithy/middleware-stack": ^3.0.3 + "@smithy/node-config-provider": ^3.1.4 + "@smithy/node-http-handler": ^3.1.4 + "@smithy/protocol-http": ^4.1.0 + "@smithy/smithy-client": ^3.1.12 + "@smithy/types": ^3.3.0 + "@smithy/url-parser": ^3.0.3 + "@smithy/util-base64": ^3.0.0 + "@smithy/util-body-length-browser": ^3.0.0 + "@smithy/util-body-length-node": ^3.0.0 + "@smithy/util-defaults-mode-browser": ^3.0.14 + "@smithy/util-defaults-mode-node": ^3.0.14 + "@smithy/util-endpoints": ^2.0.5 + "@smithy/util-middleware": ^3.0.3 + "@smithy/util-retry": ^3.0.3 + "@smithy/util-utf8": ^3.0.0 + tslib: ^2.6.2 + peerDependencies: + "@aws-sdk/client-sts": ^3.624.0 + checksum: cc7dc73b69025eabf5a0f9c7a924beaf393794c2477e4e8c508bfe59f5cca71b7ca7bb01288b90237f082f7e19f850e2d797b151182006f043118f4135c814b9 + languageName: node + linkType: hard + +"@aws-sdk/client-sso@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/client-sso@npm:3.186.0" dependencies: "@aws-crypto/sha256-browser": 2.0.0 "@aws-crypto/sha256-js": 2.0.0 - "@aws-sdk/config-resolver": 3.40.0 - "@aws-sdk/credential-provider-node": 3.41.0 - "@aws-sdk/fetch-http-handler": 3.40.0 - "@aws-sdk/hash-node": 3.40.0 - "@aws-sdk/invalid-dependency": 3.40.0 - "@aws-sdk/middleware-content-length": 3.40.0 - "@aws-sdk/middleware-host-header": 3.40.0 - "@aws-sdk/middleware-logger": 3.40.0 - "@aws-sdk/middleware-retry": 3.40.0 - "@aws-sdk/middleware-sdk-sts": 3.40.0 - "@aws-sdk/middleware-serde": 3.40.0 - "@aws-sdk/middleware-signing": 3.40.0 - "@aws-sdk/middleware-stack": 3.40.0 - "@aws-sdk/middleware-user-agent": 3.40.0 - "@aws-sdk/node-config-provider": 3.40.0 - "@aws-sdk/node-http-handler": 3.40.0 - "@aws-sdk/protocol-http": 3.40.0 - "@aws-sdk/smithy-client": 3.41.0 - "@aws-sdk/types": 3.40.0 - "@aws-sdk/url-parser": 3.40.0 - "@aws-sdk/util-base64-browser": 3.37.0 - "@aws-sdk/util-base64-node": 3.37.0 - "@aws-sdk/util-body-length-browser": 3.37.0 - "@aws-sdk/util-body-length-node": 3.37.0 - "@aws-sdk/util-user-agent-browser": 3.40.0 - "@aws-sdk/util-user-agent-node": 3.40.0 - "@aws-sdk/util-utf8-browser": 3.37.0 - "@aws-sdk/util-utf8-node": 3.37.0 - entities: 2.2.0 - fast-xml-parser: 3.19.0 - tslib: ^2.3.0 - checksum: 7b969e9067b09dffe2ed286af586faaa36fb25d3387e0c134b970c8f6a214e44bbb1167f17f9c5ec723e83e2540addc6a5e09313d27f8ddf283b6f4d34396814 - languageName: node - linkType: hard - -"@aws-sdk/client-sts@npm:3.43.0": - version: 3.43.0 - resolution: "@aws-sdk/client-sts@npm:3.43.0" + "@aws-sdk/config-resolver": 3.186.0 + "@aws-sdk/fetch-http-handler": 3.186.0 + "@aws-sdk/hash-node": 3.186.0 + "@aws-sdk/invalid-dependency": 3.186.0 + "@aws-sdk/middleware-content-length": 3.186.0 + "@aws-sdk/middleware-host-header": 3.186.0 + "@aws-sdk/middleware-logger": 3.186.0 + "@aws-sdk/middleware-recursion-detection": 3.186.0 + "@aws-sdk/middleware-retry": 3.186.0 + "@aws-sdk/middleware-serde": 3.186.0 + "@aws-sdk/middleware-stack": 3.186.0 + "@aws-sdk/middleware-user-agent": 3.186.0 + "@aws-sdk/node-config-provider": 3.186.0 + "@aws-sdk/node-http-handler": 3.186.0 + "@aws-sdk/protocol-http": 3.186.0 + "@aws-sdk/smithy-client": 3.186.0 + "@aws-sdk/types": 3.186.0 + "@aws-sdk/url-parser": 3.186.0 + "@aws-sdk/util-base64-browser": 3.186.0 + "@aws-sdk/util-base64-node": 3.186.0 + "@aws-sdk/util-body-length-browser": 3.186.0 + "@aws-sdk/util-body-length-node": 3.186.0 + "@aws-sdk/util-defaults-mode-browser": 3.186.0 + "@aws-sdk/util-defaults-mode-node": 3.186.0 + "@aws-sdk/util-user-agent-browser": 3.186.0 + "@aws-sdk/util-user-agent-node": 3.186.0 + "@aws-sdk/util-utf8-browser": 3.186.0 + "@aws-sdk/util-utf8-node": 3.186.0 + tslib: ^2.3.1 + checksum: f335aa887043b6fdf5bd1a9c3b082b3ab0951d0274d9bf699b9c45db18e272aca106726e5e0abf7d78d5da414780e678ff5d885f2dc0a9ad96c30c7e0ba472fa + languageName: node + linkType: hard + +"@aws-sdk/client-sso@npm:3.624.0": + version: 3.624.0 + resolution: "@aws-sdk/client-sso@npm:3.624.0" + dependencies: + "@aws-crypto/sha256-browser": 5.2.0 + "@aws-crypto/sha256-js": 5.2.0 + "@aws-sdk/core": 3.624.0 + "@aws-sdk/middleware-host-header": 3.620.0 + "@aws-sdk/middleware-logger": 3.609.0 + "@aws-sdk/middleware-recursion-detection": 3.620.0 + "@aws-sdk/middleware-user-agent": 3.620.0 + "@aws-sdk/region-config-resolver": 3.614.0 + "@aws-sdk/types": 3.609.0 + "@aws-sdk/util-endpoints": 3.614.0 + "@aws-sdk/util-user-agent-browser": 3.609.0 + "@aws-sdk/util-user-agent-node": 3.614.0 + "@smithy/config-resolver": ^3.0.5 + "@smithy/core": ^2.3.2 + "@smithy/fetch-http-handler": ^3.2.4 + "@smithy/hash-node": ^3.0.3 + "@smithy/invalid-dependency": ^3.0.3 + "@smithy/middleware-content-length": ^3.0.5 + "@smithy/middleware-endpoint": ^3.1.0 + "@smithy/middleware-retry": ^3.0.14 + "@smithy/middleware-serde": ^3.0.3 + "@smithy/middleware-stack": ^3.0.3 + "@smithy/node-config-provider": ^3.1.4 + "@smithy/node-http-handler": ^3.1.4 + "@smithy/protocol-http": ^4.1.0 + "@smithy/smithy-client": ^3.1.12 + "@smithy/types": ^3.3.0 + "@smithy/url-parser": ^3.0.3 + "@smithy/util-base64": ^3.0.0 + "@smithy/util-body-length-browser": ^3.0.0 + "@smithy/util-body-length-node": ^3.0.0 + "@smithy/util-defaults-mode-browser": ^3.0.14 + "@smithy/util-defaults-mode-node": ^3.0.14 + "@smithy/util-endpoints": ^2.0.5 + "@smithy/util-middleware": ^3.0.3 + "@smithy/util-retry": ^3.0.3 + "@smithy/util-utf8": ^3.0.0 + tslib: ^2.6.2 + checksum: 94ad5bc973407b024c2e66aafb360bac6c4056bb4ea868244bd2eddce1d2407ea66de894d14ce4211c471fe649c2a2a0315af6e4332fbea826098a0c769420da + languageName: node + linkType: hard + +"@aws-sdk/client-sts@npm:3.186.3": + version: 3.186.3 + resolution: "@aws-sdk/client-sts@npm:3.186.3" dependencies: "@aws-crypto/sha256-browser": 2.0.0 "@aws-crypto/sha256-js": 2.0.0 - "@aws-sdk/config-resolver": 3.40.0 - "@aws-sdk/credential-provider-node": 3.41.0 - "@aws-sdk/fetch-http-handler": 3.40.0 - "@aws-sdk/hash-node": 3.40.0 - "@aws-sdk/invalid-dependency": 3.40.0 - "@aws-sdk/middleware-content-length": 3.40.0 - "@aws-sdk/middleware-host-header": 3.40.0 - "@aws-sdk/middleware-logger": 3.40.0 - "@aws-sdk/middleware-retry": 3.40.0 - "@aws-sdk/middleware-sdk-sts": 3.40.0 - "@aws-sdk/middleware-serde": 3.40.0 - "@aws-sdk/middleware-signing": 3.40.0 - "@aws-sdk/middleware-stack": 3.40.0 - "@aws-sdk/middleware-user-agent": 3.40.0 - "@aws-sdk/node-config-provider": 3.40.0 - "@aws-sdk/node-http-handler": 3.40.0 - "@aws-sdk/protocol-http": 3.40.0 - "@aws-sdk/smithy-client": 3.41.0 - "@aws-sdk/types": 3.40.0 - "@aws-sdk/url-parser": 3.40.0 - "@aws-sdk/util-base64-browser": 3.37.0 - "@aws-sdk/util-base64-node": 3.37.0 - "@aws-sdk/util-body-length-browser": 3.37.0 - "@aws-sdk/util-body-length-node": 3.37.0 - "@aws-sdk/util-user-agent-browser": 3.40.0 - "@aws-sdk/util-user-agent-node": 3.40.0 - "@aws-sdk/util-utf8-browser": 3.37.0 - "@aws-sdk/util-utf8-node": 3.37.0 + "@aws-sdk/config-resolver": 3.186.0 + "@aws-sdk/credential-provider-node": 3.186.0 + "@aws-sdk/fetch-http-handler": 3.186.0 + "@aws-sdk/hash-node": 3.186.0 + "@aws-sdk/invalid-dependency": 3.186.0 + "@aws-sdk/middleware-content-length": 3.186.0 + "@aws-sdk/middleware-host-header": 3.186.0 + "@aws-sdk/middleware-logger": 3.186.0 + "@aws-sdk/middleware-recursion-detection": 3.186.0 + "@aws-sdk/middleware-retry": 3.186.0 + "@aws-sdk/middleware-sdk-sts": 3.186.0 + "@aws-sdk/middleware-serde": 3.186.0 + "@aws-sdk/middleware-signing": 3.186.0 + "@aws-sdk/middleware-stack": 3.186.0 + "@aws-sdk/middleware-user-agent": 3.186.0 + "@aws-sdk/node-config-provider": 3.186.0 + "@aws-sdk/node-http-handler": 3.186.0 + "@aws-sdk/protocol-http": 3.186.0 + "@aws-sdk/smithy-client": 3.186.0 + "@aws-sdk/types": 3.186.0 + "@aws-sdk/url-parser": 3.186.0 + "@aws-sdk/util-base64-browser": 3.186.0 + "@aws-sdk/util-base64-node": 3.186.0 + "@aws-sdk/util-body-length-browser": 3.186.0 + "@aws-sdk/util-body-length-node": 3.186.0 + "@aws-sdk/util-defaults-mode-browser": 3.186.0 + "@aws-sdk/util-defaults-mode-node": 3.186.0 + "@aws-sdk/util-user-agent-browser": 3.186.0 + "@aws-sdk/util-user-agent-node": 3.186.0 + "@aws-sdk/util-utf8-browser": 3.186.0 + "@aws-sdk/util-utf8-node": 3.186.0 entities: 2.2.0 - fast-xml-parser: 3.19.0 - tslib: ^2.3.0 - checksum: 8a409596a5a2e7d88fb45ae3034924f398a7f54ae328c4681a7b03a364b392b64ae407a94b4b651df9a094b68692cb184f898bc2908fa22f507c71d589443da0 + fast-xml-parser: 4.2.5 + tslib: ^2.3.1 + checksum: 7d13c5fc1c23fbb14976935d5da54c51a0b78012ca6f3f7bbe5631626eea6c006cc231270e9f069e9ba22347ae58b4e2f35bcf91eeb2825460d9e8e626cfec3c + languageName: node + linkType: hard + +"@aws-sdk/client-sts@npm:3.624.0": + version: 3.624.0 + resolution: "@aws-sdk/client-sts@npm:3.624.0" + dependencies: + "@aws-crypto/sha256-browser": 5.2.0 + "@aws-crypto/sha256-js": 5.2.0 + "@aws-sdk/client-sso-oidc": 3.624.0 + "@aws-sdk/core": 3.624.0 + "@aws-sdk/credential-provider-node": 3.624.0 + "@aws-sdk/middleware-host-header": 3.620.0 + "@aws-sdk/middleware-logger": 3.609.0 + "@aws-sdk/middleware-recursion-detection": 3.620.0 + "@aws-sdk/middleware-user-agent": 3.620.0 + "@aws-sdk/region-config-resolver": 3.614.0 + "@aws-sdk/types": 3.609.0 + "@aws-sdk/util-endpoints": 3.614.0 + "@aws-sdk/util-user-agent-browser": 3.609.0 + "@aws-sdk/util-user-agent-node": 3.614.0 + "@smithy/config-resolver": ^3.0.5 + "@smithy/core": ^2.3.2 + "@smithy/fetch-http-handler": ^3.2.4 + "@smithy/hash-node": ^3.0.3 + "@smithy/invalid-dependency": ^3.0.3 + "@smithy/middleware-content-length": ^3.0.5 + "@smithy/middleware-endpoint": ^3.1.0 + "@smithy/middleware-retry": ^3.0.14 + "@smithy/middleware-serde": ^3.0.3 + "@smithy/middleware-stack": ^3.0.3 + "@smithy/node-config-provider": ^3.1.4 + "@smithy/node-http-handler": ^3.1.4 + "@smithy/protocol-http": ^4.1.0 + "@smithy/smithy-client": ^3.1.12 + "@smithy/types": ^3.3.0 + "@smithy/url-parser": ^3.0.3 + "@smithy/util-base64": ^3.0.0 + "@smithy/util-body-length-browser": ^3.0.0 + "@smithy/util-body-length-node": ^3.0.0 + "@smithy/util-defaults-mode-browser": ^3.0.14 + "@smithy/util-defaults-mode-node": ^3.0.14 + "@smithy/util-endpoints": ^2.0.5 + "@smithy/util-middleware": ^3.0.3 + "@smithy/util-retry": ^3.0.3 + "@smithy/util-utf8": ^3.0.0 + tslib: ^2.6.2 + checksum: 4b7279bdc9fb8e90652d09322ffadf7897824dc69951030ea454c135c2e91f09bedd52249c39e66fa2751c8610fd0a0848693fec690e1868e7d848f08bcfa647 languageName: node linkType: hard @@ -3052,27 +3420,16 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/config-resolver@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/config-resolver@npm:3.310.0" - dependencies: - "@aws-sdk/types": 3.310.0 - "@aws-sdk/util-config-provider": 3.310.0 - "@aws-sdk/util-middleware": 3.310.0 - tslib: ^2.5.0 - checksum: b4454dfbf77712261eadf113f3d60c0063fc4f955d178c1e141bd6f5fe1227bd3e00ace6972b509a34b0e555792648a6f7a241e9aaa32dac44d6e823e7adcdf8 - languageName: node - linkType: hard - -"@aws-sdk/config-resolver@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/config-resolver@npm:3.40.0" +"@aws-sdk/config-resolver@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/config-resolver@npm:3.186.0" dependencies: - "@aws-sdk/signature-v4": 3.40.0 - "@aws-sdk/types": 3.40.0 - "@aws-sdk/util-config-provider": 3.40.0 - tslib: ^2.3.0 - checksum: d4e7cefa0d70e75ae1aa876f1ee668a7970b3227b1b9fead93955708e92baf21062302abbc1b210abcce878b224618fb6a7da668c3f44d08037af77788428bee + "@aws-sdk/signature-v4": 3.186.0 + "@aws-sdk/types": 3.186.0 + "@aws-sdk/util-config-provider": 3.186.0 + "@aws-sdk/util-middleware": 3.186.0 + tslib: ^2.3.1 + checksum: 453965a32e48f9d2441633bb0ba6cafaf33c0de55a73f40a74a1173e95baff0e38f66177590ecce542809f8b0155f188e324b4dd5f6778c31d4e81f7cf45b4be languageName: node linkType: hard @@ -3087,37 +3444,44 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/credential-provider-cognito-identity@npm:3.6.1": - version: 3.6.1 - resolution: "@aws-sdk/credential-provider-cognito-identity@npm:3.6.1" +"@aws-sdk/core@npm:3.624.0": + version: 3.624.0 + resolution: "@aws-sdk/core@npm:3.624.0" dependencies: - "@aws-sdk/client-cognito-identity": 3.6.1 - "@aws-sdk/property-provider": 3.6.1 - "@aws-sdk/types": 3.6.1 - tslib: ^1.8.0 - checksum: 5ab9b84be4904389fd14866e85fd60e60ab90f16a3cf5782a72b14baff4019a4f5399521b73af487775ac1c56d6f1a855916d23a94866b064d5b797daba47a72 + "@smithy/core": ^2.3.2 + "@smithy/node-config-provider": ^3.1.4 + "@smithy/protocol-http": ^4.1.0 + "@smithy/signature-v4": ^4.1.0 + "@smithy/smithy-client": ^3.1.12 + "@smithy/types": ^3.3.0 + "@smithy/util-middleware": ^3.0.3 + fast-xml-parser: 4.4.1 + tslib: ^2.6.2 + checksum: c0c915985ee8e52c9eb1484664d6dbfc81c815f25e0c78841a29cf90a4f165f685bae7455c6f285f282387670e97e81ff36132751a4b8fff4b40ecdcd0965d8b languageName: node linkType: hard -"@aws-sdk/credential-provider-env@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/credential-provider-env@npm:3.310.0" +"@aws-sdk/credential-provider-cognito-identity@npm:3.624.0": + version: 3.624.0 + resolution: "@aws-sdk/credential-provider-cognito-identity@npm:3.624.0" dependencies: - "@aws-sdk/property-provider": 3.310.0 - "@aws-sdk/types": 3.310.0 - tslib: ^2.5.0 - checksum: 724b357bef7f48288a0f4013507f0e752eeb1bde785c36821b2a59388682286d3adaa64933fdac9edf694616d330d3ec33204b801f20167a8eaf8aa499c5aded + "@aws-sdk/client-cognito-identity": 3.624.0 + "@aws-sdk/types": 3.609.0 + "@smithy/property-provider": ^3.1.3 + "@smithy/types": ^3.3.0 + tslib: ^2.6.2 + checksum: 086bf7d0a5ef5e9ed7f5979d68cb5591d46154e8cacbdbfabba94c281f819615f44eb15cd6d99c720382573d026c521ca6639cb29a7deac59f36ff6753ed7a28 languageName: node linkType: hard -"@aws-sdk/credential-provider-env@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/credential-provider-env@npm:3.40.0" +"@aws-sdk/credential-provider-env@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/credential-provider-env@npm:3.186.0" dependencies: - "@aws-sdk/property-provider": 3.40.0 - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: d20fdf95ef981e29e729a0224b4fd4102dcdf51b6286d6b60742cd7105dc274dc1e6a5c48eaf2241d95a0d01554ca37aba264b1234f8adf18bc1ec2cd8233bec + "@aws-sdk/property-provider": 3.186.0 + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 + checksum: fdf818891760ca48d0dca6dfad85a4f3ec11fd368ec9bba3643a7a860e5823e0709f1c6270be5474ebc92f201b538bb715a502d697a0e91893b6e053c535cd99 languageName: node linkType: hard @@ -3132,29 +3496,45 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/credential-provider-imds@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/credential-provider-imds@npm:3.310.0" +"@aws-sdk/credential-provider-env@npm:3.620.1": + version: 3.620.1 + resolution: "@aws-sdk/credential-provider-env@npm:3.620.1" dependencies: - "@aws-sdk/node-config-provider": 3.310.0 - "@aws-sdk/property-provider": 3.310.0 - "@aws-sdk/types": 3.310.0 - "@aws-sdk/url-parser": 3.310.0 - tslib: ^2.5.0 - checksum: 066ca7d9f36c940788650acd912fb9d41a8c43b32a19d8838eae49139c2ec1f508364ba394121d27058660ca04de0ba0084c103e66b0135aaecd3c70f86cdccb + "@aws-sdk/types": 3.609.0 + "@smithy/property-provider": ^3.1.3 + "@smithy/types": ^3.3.0 + tslib: ^2.6.2 + checksum: 25156df7c0e9a1423f261276506fc5766c9f43c41e811adaa0f9a6199b03ff4fd299e9dd94fd73942ab99283b30d8e127692ae371c16917f6709f655de401874 languageName: node linkType: hard -"@aws-sdk/credential-provider-imds@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/credential-provider-imds@npm:3.40.0" +"@aws-sdk/credential-provider-http@npm:3.622.0": + version: 3.622.0 + resolution: "@aws-sdk/credential-provider-http@npm:3.622.0" dependencies: - "@aws-sdk/node-config-provider": 3.40.0 - "@aws-sdk/property-provider": 3.40.0 - "@aws-sdk/types": 3.40.0 - "@aws-sdk/url-parser": 3.40.0 - tslib: ^2.3.0 - checksum: 1db102abd4cb9eca502069162a3eea90c38d45a71ba11aecbb0671f04905f138ab567dd59208877ef53a2e0ba5463850fec648d5f830128ec499c327a6232946 + "@aws-sdk/types": 3.609.0 + "@smithy/fetch-http-handler": ^3.2.4 + "@smithy/node-http-handler": ^3.1.4 + "@smithy/property-provider": ^3.1.3 + "@smithy/protocol-http": ^4.1.0 + "@smithy/smithy-client": ^3.1.12 + "@smithy/types": ^3.3.0 + "@smithy/util-stream": ^3.1.3 + tslib: ^2.6.2 + checksum: fa6b24991532dddcf1e688ab08fd831e5df189b4a5f2d560f41f3f870b9c940c00411a62e05f4a02e808edcab52f49b4255c8fba8fe07152224676e54eb6bbdb + languageName: node + linkType: hard + +"@aws-sdk/credential-provider-imds@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/credential-provider-imds@npm:3.186.0" + dependencies: + "@aws-sdk/node-config-provider": 3.186.0 + "@aws-sdk/property-provider": 3.186.0 + "@aws-sdk/types": 3.186.0 + "@aws-sdk/url-parser": 3.186.0 + tslib: ^2.3.1 + checksum: 8600cb7a856917ed0cd17e8e679f082d6b4b2bd88b01081e350d2d4f4640a3121f1ecdc10a51b1967ce13b8d9e96238e9c53610145ecb23a0d7bfa9ccb6b0c8b languageName: node linkType: hard @@ -3169,37 +3549,19 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/credential-provider-ini@npm:3.319.0": - version: 3.319.0 - resolution: "@aws-sdk/credential-provider-ini@npm:3.319.0" +"@aws-sdk/credential-provider-ini@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/credential-provider-ini@npm:3.186.0" dependencies: - "@aws-sdk/credential-provider-env": 3.310.0 - "@aws-sdk/credential-provider-imds": 3.310.0 - "@aws-sdk/credential-provider-process": 3.310.0 - "@aws-sdk/credential-provider-sso": 3.319.0 - "@aws-sdk/credential-provider-web-identity": 3.310.0 - "@aws-sdk/property-provider": 3.310.0 - "@aws-sdk/shared-ini-file-loader": 3.310.0 - "@aws-sdk/types": 3.310.0 - tslib: ^2.5.0 - checksum: 2d7a9f93444d0fab515e6282e80c9219c314a5bd5509436dce0be7579b74279b8b8e53b782897941f1990c17294fb93664c70ba6c8a0dd4c7e2edc7e601a5566 - languageName: node - linkType: hard - -"@aws-sdk/credential-provider-ini@npm:3.41.0": - version: 3.41.0 - resolution: "@aws-sdk/credential-provider-ini@npm:3.41.0" - dependencies: - "@aws-sdk/credential-provider-env": 3.40.0 - "@aws-sdk/credential-provider-imds": 3.40.0 - "@aws-sdk/credential-provider-sso": 3.41.0 - "@aws-sdk/credential-provider-web-identity": 3.41.0 - "@aws-sdk/property-provider": 3.40.0 - "@aws-sdk/shared-ini-file-loader": 3.37.0 - "@aws-sdk/types": 3.40.0 - "@aws-sdk/util-credentials": 3.37.0 - tslib: ^2.3.0 - checksum: 2bd118ef0998806aa66346f4db2291e117658245a181f35af715229985999c6da375f828b052f5f1b061c1a968dd572352cce343ea1c4770594189e464afad2a + "@aws-sdk/credential-provider-env": 3.186.0 + "@aws-sdk/credential-provider-imds": 3.186.0 + "@aws-sdk/credential-provider-sso": 3.186.0 + "@aws-sdk/credential-provider-web-identity": 3.186.0 + "@aws-sdk/property-provider": 3.186.0 + "@aws-sdk/shared-ini-file-loader": 3.186.0 + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 + checksum: 7dd42dee24959d6d6a48dedf9fed8a9f3873811ea4cf564859a93bafc384004d79fca4695bcc065a6f11ecf1616a9a4b61c514b8ae0718bcccf9c5102d9a5042 languageName: node linkType: hard @@ -3215,40 +3577,42 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/credential-provider-node@npm:3.319.0": - version: 3.319.0 - resolution: "@aws-sdk/credential-provider-node@npm:3.319.0" +"@aws-sdk/credential-provider-ini@npm:3.624.0": + version: 3.624.0 + resolution: "@aws-sdk/credential-provider-ini@npm:3.624.0" dependencies: - "@aws-sdk/credential-provider-env": 3.310.0 - "@aws-sdk/credential-provider-imds": 3.310.0 - "@aws-sdk/credential-provider-ini": 3.319.0 - "@aws-sdk/credential-provider-process": 3.310.0 - "@aws-sdk/credential-provider-sso": 3.319.0 - "@aws-sdk/credential-provider-web-identity": 3.310.0 - "@aws-sdk/property-provider": 3.310.0 - "@aws-sdk/shared-ini-file-loader": 3.310.0 - "@aws-sdk/types": 3.310.0 - tslib: ^2.5.0 - checksum: 5ca2e62d8b0b36de8b6300654a3c8115368ee8bfc98d5ce3625e71ee0c5c0a6cd528f998d14ee515135c46f1a7aa5c488636a2eab1feecf200243cab64b6f3be + "@aws-sdk/credential-provider-env": 3.620.1 + "@aws-sdk/credential-provider-http": 3.622.0 + "@aws-sdk/credential-provider-process": 3.620.1 + "@aws-sdk/credential-provider-sso": 3.624.0 + "@aws-sdk/credential-provider-web-identity": 3.621.0 + "@aws-sdk/types": 3.609.0 + "@smithy/credential-provider-imds": ^3.2.0 + "@smithy/property-provider": ^3.1.3 + "@smithy/shared-ini-file-loader": ^3.1.4 + "@smithy/types": ^3.3.0 + tslib: ^2.6.2 + peerDependencies: + "@aws-sdk/client-sts": ^3.624.0 + checksum: d21788b622fdb4b86403af10eaf22704b9e7cd520a4dbb18cc258da6dda2c032b3235ab76834ea08c959b0cf534962cf0b8baad813e1e73cfddfb1c243a4caca languageName: node linkType: hard -"@aws-sdk/credential-provider-node@npm:3.41.0": - version: 3.41.0 - resolution: "@aws-sdk/credential-provider-node@npm:3.41.0" +"@aws-sdk/credential-provider-node@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/credential-provider-node@npm:3.186.0" dependencies: - "@aws-sdk/credential-provider-env": 3.40.0 - "@aws-sdk/credential-provider-imds": 3.40.0 - "@aws-sdk/credential-provider-ini": 3.41.0 - "@aws-sdk/credential-provider-process": 3.40.0 - "@aws-sdk/credential-provider-sso": 3.41.0 - "@aws-sdk/credential-provider-web-identity": 3.41.0 - "@aws-sdk/property-provider": 3.40.0 - "@aws-sdk/shared-ini-file-loader": 3.37.0 - "@aws-sdk/types": 3.40.0 - "@aws-sdk/util-credentials": 3.37.0 - tslib: ^2.3.0 - checksum: 91e3b8d72ef2a064d8aaf6af3503591dd7fac7fe5b27b3b604c76eb9c2ff7d7de59c69f9d84f12f8f4990adadb310851e663d41e646c25a97aad6fe56604f8c5 + "@aws-sdk/credential-provider-env": 3.186.0 + "@aws-sdk/credential-provider-imds": 3.186.0 + "@aws-sdk/credential-provider-ini": 3.186.0 + "@aws-sdk/credential-provider-process": 3.186.0 + "@aws-sdk/credential-provider-sso": 3.186.0 + "@aws-sdk/credential-provider-web-identity": 3.186.0 + "@aws-sdk/property-provider": 3.186.0 + "@aws-sdk/shared-ini-file-loader": 3.186.0 + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 + checksum: bba27cbcef7957628f091186b4bca74185c9fb1eaf69adb94a64994dc9573264ef6bbe768367b9d6bda07bed14970a238e2565108bb6695f9d84338741830340 languageName: node linkType: hard @@ -3268,28 +3632,35 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/credential-provider-process@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/credential-provider-process@npm:3.310.0" +"@aws-sdk/credential-provider-node@npm:3.624.0": + version: 3.624.0 + resolution: "@aws-sdk/credential-provider-node@npm:3.624.0" dependencies: - "@aws-sdk/property-provider": 3.310.0 - "@aws-sdk/shared-ini-file-loader": 3.310.0 - "@aws-sdk/types": 3.310.0 - tslib: ^2.5.0 - checksum: 855033db3facbef35cda369a45f0fba6830386d57f906930fef327c58356ec496ddfe32374cc0f2c0664b3bc7748aa3d00b2592d4e35c188b2d7edb52c0d4dc5 + "@aws-sdk/credential-provider-env": 3.620.1 + "@aws-sdk/credential-provider-http": 3.622.0 + "@aws-sdk/credential-provider-ini": 3.624.0 + "@aws-sdk/credential-provider-process": 3.620.1 + "@aws-sdk/credential-provider-sso": 3.624.0 + "@aws-sdk/credential-provider-web-identity": 3.621.0 + "@aws-sdk/types": 3.609.0 + "@smithy/credential-provider-imds": ^3.2.0 + "@smithy/property-provider": ^3.1.3 + "@smithy/shared-ini-file-loader": ^3.1.4 + "@smithy/types": ^3.3.0 + tslib: ^2.6.2 + checksum: 1f1b9fd4bb28bb042bab07b892a94dcb78f2149e6e56b5bb3138e9da29269039cc6d61c27f1a3273b63db521bb4fc5352931cbe38207d4b18b64f43538f73591 languageName: node linkType: hard -"@aws-sdk/credential-provider-process@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/credential-provider-process@npm:3.40.0" +"@aws-sdk/credential-provider-process@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/credential-provider-process@npm:3.186.0" dependencies: - "@aws-sdk/property-provider": 3.40.0 - "@aws-sdk/shared-ini-file-loader": 3.37.0 - "@aws-sdk/types": 3.40.0 - "@aws-sdk/util-credentials": 3.37.0 - tslib: ^2.3.0 - checksum: eb802731bb52b1f949cadbe2bcede10c038c3be5975370905eb93f719aab393327b6dc2d0c96a2d518395c8b7f9dfa52d2ad4da1e4913028fc3817965780c4ca + "@aws-sdk/property-provider": 3.186.0 + "@aws-sdk/shared-ini-file-loader": 3.186.0 + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 + checksum: 4f1826c67c992d01b7bc746ee945097b216e8aa533ae70cceb8f324fa2f3de5124c3c55f36c9e4d6c349bb6140345ef644438a3300234d7baf13c7343a369f0b languageName: node linkType: hard @@ -3306,99 +3677,149 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/credential-provider-sso@npm:3.319.0": - version: 3.319.0 - resolution: "@aws-sdk/credential-provider-sso@npm:3.319.0" +"@aws-sdk/credential-provider-process@npm:3.620.1": + version: 3.620.1 + resolution: "@aws-sdk/credential-provider-process@npm:3.620.1" dependencies: - "@aws-sdk/client-sso": 3.319.0 - "@aws-sdk/property-provider": 3.310.0 - "@aws-sdk/shared-ini-file-loader": 3.310.0 - "@aws-sdk/token-providers": 3.319.0 - "@aws-sdk/types": 3.310.0 - tslib: ^2.5.0 - checksum: 482b1e10644c7256903ebcf57fbdc18d31d751cae8c7722610c0c42dfd31f1786f2ebbd46b950fa05669cc1ab21d7ed8d1c6cbedb523e004d042ae8e2e373b96 + "@aws-sdk/types": 3.609.0 + "@smithy/property-provider": ^3.1.3 + "@smithy/shared-ini-file-loader": ^3.1.4 + "@smithy/types": ^3.3.0 + tslib: ^2.6.2 + checksum: d33bf3e5e73f16c8e58dc71a738cdcbcf48b54610e464affc69c73f9bdcc2b287b6cb281c9a719f67298fb0cd795e67201e5d6704dcc24933e71e58653607992 languageName: node linkType: hard -"@aws-sdk/credential-provider-sso@npm:3.41.0": - version: 3.41.0 - resolution: "@aws-sdk/credential-provider-sso@npm:3.41.0" +"@aws-sdk/credential-provider-sso@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/credential-provider-sso@npm:3.186.0" dependencies: - "@aws-sdk/client-sso": 3.41.0 - "@aws-sdk/property-provider": 3.40.0 - "@aws-sdk/shared-ini-file-loader": 3.37.0 - "@aws-sdk/types": 3.40.0 - "@aws-sdk/util-credentials": 3.37.0 - tslib: ^2.3.0 - checksum: 1c24fef28719ad84eb2e48145dbf02b9ad5528c8c1c3e1adfd027a3a59064292013e1b5cdafbed577dbb61eaa3961ece41f2fdcbf8b2b3412644e4f8417699c1 + "@aws-sdk/client-sso": 3.186.0 + "@aws-sdk/property-provider": 3.186.0 + "@aws-sdk/shared-ini-file-loader": 3.186.0 + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 + checksum: 6972a828c8e6c6d0b7f8727dc626f232819ed2403198317b06fb237d414e91a529579568028bdb005e364b2a256a08178080dc02ea55a2325592d28f434464d4 languageName: node linkType: hard -"@aws-sdk/credential-provider-web-identity@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/credential-provider-web-identity@npm:3.310.0" +"@aws-sdk/credential-provider-sso@npm:3.624.0": + version: 3.624.0 + resolution: "@aws-sdk/credential-provider-sso@npm:3.624.0" dependencies: - "@aws-sdk/property-provider": 3.310.0 - "@aws-sdk/types": 3.310.0 - tslib: ^2.5.0 - checksum: a38d27813d80138c7e92dc63d60e39130ca032e623ec576d63142abf3e35fefaa5d6435dce99013a176ebeda380429f81d210bfc4479e97c8fa5ab04066ed4b1 + "@aws-sdk/client-sso": 3.624.0 + "@aws-sdk/token-providers": 3.614.0 + "@aws-sdk/types": 3.609.0 + "@smithy/property-provider": ^3.1.3 + "@smithy/shared-ini-file-loader": ^3.1.4 + "@smithy/types": ^3.3.0 + tslib: ^2.6.2 + checksum: 454e1e1817f8c9ca1b34f6370489520a4858a9e83c4e44ea75afff334a848fa0b9042e7cc13c701ddde114abc551da29f08d6319c76a87ddd3f1d85768d04f33 languageName: node linkType: hard -"@aws-sdk/credential-provider-web-identity@npm:3.41.0": - version: 3.41.0 - resolution: "@aws-sdk/credential-provider-web-identity@npm:3.41.0" +"@aws-sdk/credential-provider-web-identity@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/credential-provider-web-identity@npm:3.186.0" dependencies: - "@aws-sdk/property-provider": 3.40.0 - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: 5980a3bc21bad2e6ce9eb92f0c0a696f6b5879a37efa284a16398431a4d7647de31671d3a3dbec26a1eeb3b676164c8e1e6a7b764e7bd3a367a122c8ba36e5ec + "@aws-sdk/property-provider": 3.186.0 + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 + checksum: 05949a31041fd2db7ea28ae5d7298165e8df203429fbd37bd44b9a4a02d0a738deb76882b0d5964b1cd884355c110431062eaed64cecbb68f46a244a121d9958 languageName: node linkType: hard -"@aws-sdk/endpoint-cache@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/endpoint-cache@npm:3.310.0" +"@aws-sdk/credential-provider-web-identity@npm:3.621.0": + version: 3.621.0 + resolution: "@aws-sdk/credential-provider-web-identity@npm:3.621.0" dependencies: - mnemonist: 0.38.3 - tslib: ^2.5.0 - checksum: 8b3ba901ebac77be5bd73f7a8893b99e8617c38b4dccecf4a5894073107cc33f081fd96a4623e9b69ee50682c6bf041133517bd7f86688f5a4d1d6c275563f37 + "@aws-sdk/types": 3.609.0 + "@smithy/property-provider": ^3.1.3 + "@smithy/types": ^3.3.0 + tslib: ^2.6.2 + peerDependencies: + "@aws-sdk/client-sts": ^3.621.0 + checksum: c699a60e242cc3895b3536a0a4818560f167b6c0cc3e8858cf75cd0438020a070b2e5c84e59280ee81679d865516dcde5b31cf6af1ee35b0d28c94b68c63f742 languageName: node linkType: hard -"@aws-sdk/eventstream-marshaller@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/eventstream-marshaller@npm:3.40.0" +"@aws-sdk/credential-providers@npm:3.624.0": + version: 3.624.0 + resolution: "@aws-sdk/credential-providers@npm:3.624.0" dependencies: - "@aws-crypto/crc32": 2.0.0 - "@aws-sdk/types": 3.40.0 - "@aws-sdk/util-hex-encoding": 3.37.0 - tslib: ^2.3.0 - checksum: 0a77cbbdf015df252121922f70d71833c462ad0f6569636dc104846eb44fc8b5f279cf281b60e77385a9bdbcbbc6735fcf021af3c8de72ed0861037a610f39c0 + "@aws-sdk/client-cognito-identity": 3.624.0 + "@aws-sdk/client-sso": 3.624.0 + "@aws-sdk/client-sts": 3.624.0 + "@aws-sdk/credential-provider-cognito-identity": 3.624.0 + "@aws-sdk/credential-provider-env": 3.620.1 + "@aws-sdk/credential-provider-http": 3.622.0 + "@aws-sdk/credential-provider-ini": 3.624.0 + "@aws-sdk/credential-provider-node": 3.624.0 + "@aws-sdk/credential-provider-process": 3.620.1 + "@aws-sdk/credential-provider-sso": 3.624.0 + "@aws-sdk/credential-provider-web-identity": 3.621.0 + "@aws-sdk/types": 3.609.0 + "@smithy/credential-provider-imds": ^3.2.0 + "@smithy/property-provider": ^3.1.3 + "@smithy/types": ^3.3.0 + tslib: ^2.6.2 + checksum: eda53b1291f1c7f677bc8a6795f1cc721854fd53865805ec13b69a71cf1b12ebf379a82628e1a05c9d891c41b5a159c6930e3aa78fff3b925b6dadb34bd6fd3e languageName: node linkType: hard -"@aws-sdk/eventstream-marshaller@npm:3.6.1": - version: 3.6.1 - resolution: "@aws-sdk/eventstream-marshaller@npm:3.6.1" +"@aws-sdk/endpoint-cache@npm:3.572.0": + version: 3.572.0 + resolution: "@aws-sdk/endpoint-cache@npm:3.572.0" dependencies: - "@aws-crypto/crc32": ^1.0.0 - "@aws-sdk/types": 3.6.1 - "@aws-sdk/util-hex-encoding": 3.6.1 - tslib: ^1.8.0 - checksum: a1a2eaa7215298da18473494e5315f17dafeb933fd76c76772a20a964641e64822d359c259dd12f62fd8500b92c538e00be1a4eb117a89a88797ccf422eea40d + mnemonist: 0.38.3 + tslib: ^2.6.2 + checksum: 632b79b83f1b0a31568a06f8036c2694942b22c4e8450a2197f76a56276497a07c6003c9deac42908ad38e8ff51544fd3d06a36bee80ed421ad705791420b796 languageName: node linkType: hard -"@aws-sdk/eventstream-serde-browser@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/eventstream-serde-browser@npm:3.40.0" +"@aws-sdk/eventstream-codec@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/eventstream-codec@npm:3.186.0" dependencies: - "@aws-sdk/eventstream-marshaller": 3.40.0 - "@aws-sdk/eventstream-serde-universal": 3.40.0 - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: fa9271e19e4477e84769481ce2d6f6405fbe087c16394b7b73ccb56e4bf06c3ac8e380811cc358426a4710656263f304e524fedd281f94ece6e50b87bf198a85 + "@aws-crypto/crc32": 2.0.0 + "@aws-sdk/types": 3.186.0 + "@aws-sdk/util-hex-encoding": 3.186.0 + tslib: ^2.3.1 + checksum: 6f6124252905c53dcb0f5431204fb5b4b08d4192563b0f9652370254f268765de9fd6bebdcaea37dd9eda743ed9cd28e1b1bd80bda57bb032d5f6c1d29f6d7ae + languageName: node + linkType: hard + +"@aws-sdk/eventstream-handler-node@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/eventstream-handler-node@npm:3.186.0" + dependencies: + "@aws-sdk/eventstream-codec": 3.186.0 + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 + checksum: 54685665ec1fb5a46348991839bcda5070d94addda87e86524edf06d6af03ee4b5e1550a378f5373417ba5bb83bd2d990efd4544db5fd76b9cf4506048fb8c73 + languageName: node + linkType: hard + +"@aws-sdk/eventstream-marshaller@npm:3.6.1": + version: 3.6.1 + resolution: "@aws-sdk/eventstream-marshaller@npm:3.6.1" + dependencies: + "@aws-crypto/crc32": ^1.0.0 + "@aws-sdk/types": 3.6.1 + "@aws-sdk/util-hex-encoding": 3.6.1 + tslib: ^1.8.0 + checksum: a1a2eaa7215298da18473494e5315f17dafeb933fd76c76772a20a964641e64822d359c259dd12f62fd8500b92c538e00be1a4eb117a89a88797ccf422eea40d + languageName: node + linkType: hard + +"@aws-sdk/eventstream-serde-browser@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/eventstream-serde-browser@npm:3.186.0" + dependencies: + "@aws-sdk/eventstream-serde-universal": 3.186.0 + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 + checksum: 19127846f826d5cf63dbee607a7986adbe3cb1f404a27e37a87410e317ca803f1fd6dfb02c90e59d035099ea8b11631329b48c04f6b6093abf0b621bcaa4ec7c languageName: node linkType: hard @@ -3414,13 +3835,13 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/eventstream-serde-config-resolver@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/eventstream-serde-config-resolver@npm:3.40.0" +"@aws-sdk/eventstream-serde-config-resolver@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/eventstream-serde-config-resolver@npm:3.186.0" dependencies: - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: ccb4029e727a40f5b38f10c58662f0c54bd512886035527954d74ebca95c549385c8504c2a2b59737b97e7e49706966613687ea9a82e9d39314233a60670f58d + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 + checksum: ca4ec77d6331aa943c19edeaf955d420314b822dbcf9384ae33ecc36cb4681e4cbb2313d6d9f747bca078d9baf83af596b6084b7da27a8a896022fe072cbf4eb languageName: node linkType: hard @@ -3434,15 +3855,14 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/eventstream-serde-node@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/eventstream-serde-node@npm:3.40.0" +"@aws-sdk/eventstream-serde-node@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/eventstream-serde-node@npm:3.186.0" dependencies: - "@aws-sdk/eventstream-marshaller": 3.40.0 - "@aws-sdk/eventstream-serde-universal": 3.40.0 - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: e7cebb58bd6a3ceecf92b08204ca561231a1fcdd6924dd1b28e4a22505b113d0ccc263b4c38427e2b03a34d9f5a74fa6cfd5278ad2518ff14dbb9e5375f1e1eb + "@aws-sdk/eventstream-serde-universal": 3.186.0 + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 + checksum: 7550272b0de7c1d6874c043829567c8f62b82b49c3489a82c8b2b2286971f2b8851bf78fad73406beee3b136118a36e24d98c7909f7a0ee89115100d51881fea languageName: node linkType: hard @@ -3458,14 +3878,14 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/eventstream-serde-universal@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/eventstream-serde-universal@npm:3.40.0" +"@aws-sdk/eventstream-serde-universal@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/eventstream-serde-universal@npm:3.186.0" dependencies: - "@aws-sdk/eventstream-marshaller": 3.40.0 - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: d3b96286f1cea9dc3d1e9057a474ee14172f96850794ae785316dfa6f193e8ee4997c0cd0318095547e378c5b645f54de02ce549c14e14f9113342e4b2fb739a + "@aws-sdk/eventstream-codec": 3.186.0 + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 + checksum: 0ac610b2c42ccc02b11ed8b45fcfd8c95e5944a50e55b38e8a4ffe5371a342a941ce77cd32cd2abb88b3657dbc359c3bdaf5bf8ba68bb389981e6069ac4200c7 languageName: node linkType: hard @@ -3480,29 +3900,16 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/fetch-http-handler@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/fetch-http-handler@npm:3.310.0" - dependencies: - "@aws-sdk/protocol-http": 3.310.0 - "@aws-sdk/querystring-builder": 3.310.0 - "@aws-sdk/types": 3.310.0 - "@aws-sdk/util-base64": 3.310.0 - tslib: ^2.5.0 - checksum: b9c89793123717a546ae89b3df37dcc5606673787020f7510c7f4215c8b7bbb3fcd7dcbdb94e903f5b51e1396911883fec81300e728984c64602b1d860df762f - languageName: node - linkType: hard - -"@aws-sdk/fetch-http-handler@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/fetch-http-handler@npm:3.40.0" +"@aws-sdk/fetch-http-handler@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/fetch-http-handler@npm:3.186.0" dependencies: - "@aws-sdk/protocol-http": 3.40.0 - "@aws-sdk/querystring-builder": 3.40.0 - "@aws-sdk/types": 3.40.0 - "@aws-sdk/util-base64-browser": 3.37.0 - tslib: ^2.3.0 - checksum: 4c9610ac358249f6c163c9015b29fb5a4e22103766df5150cf9b88b4cd02e57371da26c53f96153579d50f1cc39832baee930b79125477469676a024f34e4579 + "@aws-sdk/protocol-http": 3.186.0 + "@aws-sdk/querystring-builder": 3.186.0 + "@aws-sdk/types": 3.186.0 + "@aws-sdk/util-base64-browser": 3.186.0 + tslib: ^2.3.1 + checksum: 92ef299d54841e43ba9e23f7ddc89db54be93f94772540f3b38832e04324aa9f4388084eb36ee8b587c1261089190675489426192f7a20b2b392048a04c6aee5 languageName: node linkType: hard @@ -3519,50 +3926,14 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/hash-blob-browser@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/hash-blob-browser@npm:3.40.0" +"@aws-sdk/hash-node@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/hash-node@npm:3.186.0" dependencies: - "@aws-sdk/chunked-blob-reader": 3.37.0 - "@aws-sdk/chunked-blob-reader-native": 3.37.0 - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: 9d0516737cc493aeb243a98dd64d262dc004762931d7821b71da8be1166dd379cb1af37c2d5bc8d973802b805cb4451689e560c5f5ba4ea34d10574aee8ddc7d - languageName: node - linkType: hard - -"@aws-sdk/hash-blob-browser@npm:3.6.1": - version: 3.6.1 - resolution: "@aws-sdk/hash-blob-browser@npm:3.6.1" - dependencies: - "@aws-sdk/chunked-blob-reader": 3.6.1 - "@aws-sdk/chunked-blob-reader-native": 3.6.1 - "@aws-sdk/types": 3.6.1 - tslib: ^1.8.0 - checksum: 07c96d158007c08385be00d30adfd33e68adbe1e95ad8b41f77cb70ee7b68cc6a5becd71d11e2be394d01bb1c109de4d02c260e0cbb33e5bbec6e1dd7801e3ef - languageName: node - linkType: hard - -"@aws-sdk/hash-node@npm:3.310.0, @aws-sdk/hash-node@npm:^3.0.0": - version: 3.310.0 - resolution: "@aws-sdk/hash-node@npm:3.310.0" - dependencies: - "@aws-sdk/types": 3.310.0 - "@aws-sdk/util-buffer-from": 3.310.0 - "@aws-sdk/util-utf8": 3.310.0 - tslib: ^2.5.0 - checksum: aa5f0553448cf0af2ca982a04f616ec063a679ff0ed3a7c7d15f4b8efda835f9b35c202e42af3d1774b79fb351fdb460641e83407bd8908f0c3e804f306fc3d7 - languageName: node - linkType: hard - -"@aws-sdk/hash-node@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/hash-node@npm:3.40.0" - dependencies: - "@aws-sdk/types": 3.40.0 - "@aws-sdk/util-buffer-from": 3.37.0 - tslib: ^2.3.0 - checksum: 9ac6c77d9774fb5721d2236da5f1cb3de61293f9a46ba53c554befac616cea6eaeca771a055eb81fbcd2bbbe1bacfbd29cb5732c898e2f08cab1a6042495117b + "@aws-sdk/types": 3.186.0 + "@aws-sdk/util-buffer-from": 3.186.0 + tslib: ^2.3.1 + checksum: b4ee93a62c64c7601f41a3efb1f2f29bdf4c2792a8cd137dd7af24735829f24711a1f8c29378d8b2a99a21e3af708c87cee448c8892e4ec674549d9e183fab39 languageName: node linkType: hard @@ -3577,43 +3948,25 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/hash-stream-node@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/hash-stream-node@npm:3.40.0" - dependencies: - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: 8f73457e533879afb804c2485ace35db39bf921ee1c262616d33767c1cf77097f32dc85a1079673453da309dee5585455c67d6c680d36eb7148c0e1b45ca3086 - languageName: node - linkType: hard - -"@aws-sdk/hash-stream-node@npm:3.6.1": - version: 3.6.1 - resolution: "@aws-sdk/hash-stream-node@npm:3.6.1" - dependencies: - "@aws-sdk/types": 3.6.1 - tslib: ^1.8.0 - checksum: 4bc254b8d6c934e05ddaead68bcdc272af5ded80c971497e79a2c84e0e6a0660a902ed5f7f15bd2891ef0bf57add174efffac65268eac6060fd1942ff4e1c5d8 - languageName: node - linkType: hard - -"@aws-sdk/invalid-dependency@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/invalid-dependency@npm:3.310.0" +"@aws-sdk/hash-node@npm:^3.0.0": + version: 3.338.0 + resolution: "@aws-sdk/hash-node@npm:3.338.0" dependencies: - "@aws-sdk/types": 3.310.0 + "@aws-sdk/types": 3.338.0 + "@aws-sdk/util-buffer-from": 3.310.0 + "@aws-sdk/util-utf8": 3.310.0 tslib: ^2.5.0 - checksum: 7aed5ef782a69fbbdc1d73ebe9f3ad265d2d87ecd3c75cf4cc502847cad201512de90d6896ade8964dc630a08f07af6a149b10218a6415516bf7d06f45753025 + checksum: c73efa2e7fe5958e0cd439e5589cc496229c2db9268c7651d300c4ec65c06607784fee26ad7d7b01c80937fff4378c836542cca04bbac347b5c5a12516f57970 languageName: node linkType: hard -"@aws-sdk/invalid-dependency@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/invalid-dependency@npm:3.40.0" +"@aws-sdk/invalid-dependency@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/invalid-dependency@npm:3.186.0" dependencies: - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: cf94a75e9e88a7e2c90ba53d2f4a1a6fa24e3074981f0025720ab9b8def217c71945da442c743346b87b474e45c5da47a084db0fd34b09c4493ba786bfcba2a5 + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 + checksum: 55515d46c28ff094530933206b586bf217dcd41419542bbe9daeb611c4c4bad69f94cb6d3f8846ae3dbc5c7ea69376afc82bb0d412c449f4e11126e0ad6aec40 languageName: node linkType: hard @@ -3627,6 +3980,15 @@ __metadata: languageName: node linkType: hard +"@aws-sdk/is-array-buffer@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/is-array-buffer@npm:3.186.0" + dependencies: + tslib: ^2.3.1 + checksum: d6e846dd14791b6549c79f933f09737fbfb68bb876621fb3b2332a701698be3a9f46000c34e40ed5a012db88726cd9f480aba1448b379ad5a1b3a85f6e0e4c7d + languageName: node + linkType: hard + "@aws-sdk/is-array-buffer@npm:3.310.0": version: 3.310.0 resolution: "@aws-sdk/is-array-buffer@npm:3.310.0" @@ -3636,15 +3998,6 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/is-array-buffer@npm:3.37.0": - version: 3.37.0 - resolution: "@aws-sdk/is-array-buffer@npm:3.37.0" - dependencies: - tslib: ^2.3.0 - checksum: 280114bfab30578022369b620119097ccfb395b36da9b138f3a04258e04b49a53b72c091660a81b587700eedb67736031d6c7cc54e42b3c33e89de123b5bebff - languageName: node - linkType: hard - "@aws-sdk/is-array-buffer@npm:3.6.1": version: 3.6.1 resolution: "@aws-sdk/is-array-buffer@npm:3.6.1" @@ -3669,18 +4022,6 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/md5-js@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/md5-js@npm:3.40.0" - dependencies: - "@aws-sdk/types": 3.40.0 - "@aws-sdk/util-utf8-browser": 3.37.0 - "@aws-sdk/util-utf8-node": 3.37.0 - tslib: ^2.3.0 - checksum: e0ed51340358f7cbc8d1902345437dd06b77b43ae867bb13d924a6ae9c768333bab153e42fe6c77b9ea62531a06a665901e6deefe481468f22b54b707d10b4c6 - languageName: node - linkType: hard - "@aws-sdk/md5-js@npm:3.6.1": version: 3.6.1 resolution: "@aws-sdk/md5-js@npm:3.6.1" @@ -3692,74 +4033,29 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/middleware-apply-body-checksum@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/middleware-apply-body-checksum@npm:3.40.0" - dependencies: - "@aws-sdk/is-array-buffer": 3.37.0 - "@aws-sdk/protocol-http": 3.40.0 - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: cd71018c70bcab0a1fcef27c04b86550d4861511bf9c385a3a99805f724af6c0515894dc459d3ee0e76c89f4474409f5da0ebd2b9106f11d478bd5722a7c1d96 - languageName: node - linkType: hard - -"@aws-sdk/middleware-apply-body-checksum@npm:3.6.1": - version: 3.6.1 - resolution: "@aws-sdk/middleware-apply-body-checksum@npm:3.6.1" - dependencies: - "@aws-sdk/is-array-buffer": 3.6.1 - "@aws-sdk/protocol-http": 3.6.1 - "@aws-sdk/types": 3.6.1 - tslib: ^1.8.0 - checksum: 2acaad4288812730a76c6efa24de5da86f3fd853260107bbdf0f9430d97205ca85bec5945eef318fd2985c6d03a444a02a58aaa2b8c9ac61b8cca74565793192 - languageName: node - linkType: hard - -"@aws-sdk/middleware-bucket-endpoint@npm:3.41.0": - version: 3.41.0 - resolution: "@aws-sdk/middleware-bucket-endpoint@npm:3.41.0" - dependencies: - "@aws-sdk/protocol-http": 3.40.0 - "@aws-sdk/types": 3.40.0 - "@aws-sdk/util-arn-parser": 3.37.0 - "@aws-sdk/util-config-provider": 3.40.0 - tslib: ^2.3.0 - checksum: f43802f2ae5a02afcc07a0c7bf5307817da84f329993bd7e8e72ec180c0f376c34755cb62a1707c79bd76f85533b4fb9db1c679f5f1c8eda20a8aa31ca3b68ea - languageName: node - linkType: hard - -"@aws-sdk/middleware-bucket-endpoint@npm:3.6.1": - version: 3.6.1 - resolution: "@aws-sdk/middleware-bucket-endpoint@npm:3.6.1" - dependencies: - "@aws-sdk/protocol-http": 3.6.1 - "@aws-sdk/types": 3.6.1 - "@aws-sdk/util-arn-parser": 3.6.1 - tslib: ^1.8.0 - checksum: ad807856e443099ca0dac15a4033d7b9a4a1682e297df805da586bc058f4248762ef0a6240e443cdadaf21f65b24fe6173b36f384735e588d2216bde19e5a298 - languageName: node - linkType: hard - -"@aws-sdk/middleware-content-length@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/middleware-content-length@npm:3.310.0" +"@aws-sdk/middleware-bucket-endpoint@npm:3.620.0": + version: 3.620.0 + resolution: "@aws-sdk/middleware-bucket-endpoint@npm:3.620.0" dependencies: - "@aws-sdk/protocol-http": 3.310.0 - "@aws-sdk/types": 3.310.0 - tslib: ^2.5.0 - checksum: fad0ba4172a66ec3add40e8eeb023830c7d4a60fce5cb9310bb20d974fe7c1d2e8d3022a65a2caefa5c42a954484605a7b3407e22d57858eb0ad865c9352d493 + "@aws-sdk/types": 3.609.0 + "@aws-sdk/util-arn-parser": 3.568.0 + "@smithy/node-config-provider": ^3.1.4 + "@smithy/protocol-http": ^4.1.0 + "@smithy/types": ^3.3.0 + "@smithy/util-config-provider": ^3.0.0 + tslib: ^2.6.2 + checksum: 5fec190026bac88554a2299d81565bb4f067600336045af5d4ec1e06a1a884386e324922f1de8d8d87954bd8dbdae279bf4e37401aaf8311db5fe70c1c44b483 languageName: node linkType: hard -"@aws-sdk/middleware-content-length@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/middleware-content-length@npm:3.40.0" +"@aws-sdk/middleware-content-length@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/middleware-content-length@npm:3.186.0" dependencies: - "@aws-sdk/protocol-http": 3.40.0 - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: 12ddfd6584a21fba448d6f8740011b0628197e5d81d04716a3832c1ca01d21cbde00f80ab8a017f1d7c24c6ac176314708bc8a2df1b69afd783de402c08ad0f8 + "@aws-sdk/protocol-http": 3.186.0 + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 + checksum: 79e8746184d985ad54f28f858234c57ad8f03414fbaec84885a6e6beaaf11945eaa4ee4403c43bf7f07fc126f948c37615ff7de1f7524bb37913fbc418f6ffa1 languageName: node linkType: hard @@ -3774,96 +4070,67 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/middleware-endpoint-discovery@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/middleware-endpoint-discovery@npm:3.310.0" - dependencies: - "@aws-sdk/endpoint-cache": 3.310.0 - "@aws-sdk/protocol-http": 3.310.0 - "@aws-sdk/types": 3.310.0 - tslib: ^2.5.0 - checksum: 048f3504a9461caa6077236e3ad64931ad4344eca2822de82e46835fb6ea028a7b813c648dedc2723777cdc983665a4b6676456209640721a94df9bdde3e8280 - languageName: node - linkType: hard - -"@aws-sdk/middleware-endpoint@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/middleware-endpoint@npm:3.310.0" - dependencies: - "@aws-sdk/middleware-serde": 3.310.0 - "@aws-sdk/types": 3.310.0 - "@aws-sdk/url-parser": 3.310.0 - "@aws-sdk/util-middleware": 3.310.0 - tslib: ^2.5.0 - checksum: 30ce86a755e921a181b6867cd4533689194993e281e8263e2df0685c3b6f6edff7e11b7e42af659c700e26f84ff70b07763f8ccb5b9fc70756685da06dcb6155 - languageName: node - linkType: hard - -"@aws-sdk/middleware-expect-continue@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/middleware-expect-continue@npm:3.40.0" - dependencies: - "@aws-sdk/middleware-header-default": 3.40.0 - "@aws-sdk/protocol-http": 3.40.0 - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: 19f86018acd3da8b3d888da52fa325de130824f4029d63e210c1e27a7b630f8055f95ee361bc48608f927730cda669f1e07d81921f4293350d8ccc7863ade01c - languageName: node - linkType: hard - -"@aws-sdk/middleware-expect-continue@npm:3.6.1": - version: 3.6.1 - resolution: "@aws-sdk/middleware-expect-continue@npm:3.6.1" +"@aws-sdk/middleware-endpoint-discovery@npm:3.620.0": + version: 3.620.0 + resolution: "@aws-sdk/middleware-endpoint-discovery@npm:3.620.0" dependencies: - "@aws-sdk/middleware-header-default": 3.6.1 - "@aws-sdk/protocol-http": 3.6.1 - "@aws-sdk/types": 3.6.1 - tslib: ^1.8.0 - checksum: dd9c1f15fd0b71928395ae1d794e55abcc677f65eee3425a10018a957a7b72a21c818b833ea62569d3f5de36afaef90ce2882c4b8d349edbc075426907cc7bec + "@aws-sdk/endpoint-cache": 3.572.0 + "@aws-sdk/types": 3.609.0 + "@smithy/node-config-provider": ^3.1.4 + "@smithy/protocol-http": ^4.1.0 + "@smithy/types": ^3.3.0 + tslib: ^2.6.2 + checksum: d8d9ce567c16ec836b16459711fa54cf29f585eae3ebdb9b7f60381ed0500fcf10b3d495f42cf8808186d7dce90862113f8ec88bb25a2efa592ac72d9ef13500 languageName: node linkType: hard -"@aws-sdk/middleware-header-default@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/middleware-header-default@npm:3.40.0" +"@aws-sdk/middleware-eventstream@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/middleware-eventstream@npm:3.186.0" dependencies: - "@aws-sdk/protocol-http": 3.40.0 - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: 1eb25feb7d9289c1966f3b81e43b38d1bc5078e0538f0188a9e16b58b6abe038c4229e6a59efd31583d1cf9229a0f92fa320921b843880946e9cd6dd1e4c4a85 + "@aws-sdk/protocol-http": 3.186.0 + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 + checksum: de04e17e09a4e13ee8e2b5007043005e9020063d808817336fb7a0c36c0e5e553572930b6cbace23fb98b6d5693fd4cb422246c7e27004d06594d172424b46b1 languageName: node linkType: hard -"@aws-sdk/middleware-header-default@npm:3.6.1": - version: 3.6.1 - resolution: "@aws-sdk/middleware-header-default@npm:3.6.1" +"@aws-sdk/middleware-expect-continue@npm:3.620.0": + version: 3.620.0 + resolution: "@aws-sdk/middleware-expect-continue@npm:3.620.0" dependencies: - "@aws-sdk/protocol-http": 3.6.1 - "@aws-sdk/types": 3.6.1 - tslib: ^1.8.0 - checksum: 701b302cae98adbed192f64800c2915413f427e7666cab9a0275d2c969fdeb560f5bf5c242e2e09ef756e4ed4dbeea38cb400a40fea54c90ba95afb2b1ff876f + "@aws-sdk/types": 3.609.0 + "@smithy/protocol-http": ^4.1.0 + "@smithy/types": ^3.3.0 + tslib: ^2.6.2 + checksum: 1204171772b3f141a19e68ede28b412c5bca68e4f5c493c38f41d278cbbaae0488d95e1161ed5b44aefcfbbb66f795f2aacfb24434d7fdd71695a1a3885c59bb languageName: node linkType: hard -"@aws-sdk/middleware-host-header@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/middleware-host-header@npm:3.310.0" +"@aws-sdk/middleware-flexible-checksums@npm:3.620.0": + version: 3.620.0 + resolution: "@aws-sdk/middleware-flexible-checksums@npm:3.620.0" dependencies: - "@aws-sdk/protocol-http": 3.310.0 - "@aws-sdk/types": 3.310.0 - tslib: ^2.5.0 - checksum: 5339cec94f5cd1610107985e1d9190d258ee0a46650d06d781213f2d4089e838efe9cccde80915c0c6b81e118f53a1e99ce618f80cc65db4b10fdf3069c44008 + "@aws-crypto/crc32": 5.2.0 + "@aws-crypto/crc32c": 5.2.0 + "@aws-sdk/types": 3.609.0 + "@smithy/is-array-buffer": ^3.0.0 + "@smithy/protocol-http": ^4.1.0 + "@smithy/types": ^3.3.0 + "@smithy/util-utf8": ^3.0.0 + tslib: ^2.6.2 + checksum: b6990776c98a19c57850ad623a61d45946741f75913cd71901d693ff71a840ea6fdbb7811d8849db6d149090bd2b61a6f3c706084a2d2b366c8e55c5f62e3186 languageName: node linkType: hard -"@aws-sdk/middleware-host-header@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/middleware-host-header@npm:3.40.0" +"@aws-sdk/middleware-host-header@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/middleware-host-header@npm:3.186.0" dependencies: - "@aws-sdk/protocol-http": 3.40.0 - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: 91449253be4ac9cd5844a57b3610f8b2ae115de6da22d5577ad2a8e5c1c0ea0f08a364fe56de649db38aa4fb37328172c6da2f2e79ee39042133b6bbdc55b823 + "@aws-sdk/protocol-http": 3.186.0 + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 + checksum: e9ce2390b68f0ae8a65329f3712361f072a5fd0d8ebb50302ed3221bfeb39ae1a34d6febbf129291064a2e0a9f2c770c25ab12565ad1429af1edc451cc04d16c languageName: node linkType: hard @@ -3878,43 +4145,36 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/middleware-location-constraint@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/middleware-location-constraint@npm:3.40.0" - dependencies: - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: 12dd01ec5ee376ebc946a677d190c7d2fd7f3148291b3d2538c835585ec561d57be9758bd8c76fe1c531e7a01b6cbb3573b2746e12d6a11f41d036f67b4318e6 - languageName: node - linkType: hard - -"@aws-sdk/middleware-location-constraint@npm:3.6.1": - version: 3.6.1 - resolution: "@aws-sdk/middleware-location-constraint@npm:3.6.1" +"@aws-sdk/middleware-host-header@npm:3.620.0": + version: 3.620.0 + resolution: "@aws-sdk/middleware-host-header@npm:3.620.0" dependencies: - "@aws-sdk/types": 3.6.1 - tslib: ^1.8.0 - checksum: 4da1f48924321b64a36f79fd39198d5100edf28863d5b517764bb064305f7bdad90a26a2b398bce8a4a40a00617689dddcb2932899998e8cdf642ac8fc9abaa6 + "@aws-sdk/types": 3.609.0 + "@smithy/protocol-http": ^4.1.0 + "@smithy/types": ^3.3.0 + tslib: ^2.6.2 + checksum: 221e8e440fc156bc0ef8d2186bc3b9c18c7874cb275ae714c3c7eeb934b846e1291c3cb9a3631c486a86189a4c446e61c64e8e7d737f209fe63808ad313bd779 languageName: node linkType: hard -"@aws-sdk/middleware-logger@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/middleware-logger@npm:3.310.0" +"@aws-sdk/middleware-location-constraint@npm:3.609.0": + version: 3.609.0 + resolution: "@aws-sdk/middleware-location-constraint@npm:3.609.0" dependencies: - "@aws-sdk/types": 3.310.0 - tslib: ^2.5.0 - checksum: 745c5c4b44e2a00ecf2f39593a41549531ece9485c7320121b083cc3d3623af5f7588d21392e1608736c06a64f11e06375d2b809c086c794a0b65656ddb0942d + "@aws-sdk/types": 3.609.0 + "@smithy/types": ^3.3.0 + tslib: ^2.6.2 + checksum: 1eba2a3a1a003855a69e56f1c54fb2283b30db50bf14130cd042e25805497b7a19539144052c4fa710952d754d1a9e5d680fce09536509cf796a16816c8d506f languageName: node linkType: hard -"@aws-sdk/middleware-logger@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/middleware-logger@npm:3.40.0" +"@aws-sdk/middleware-logger@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/middleware-logger@npm:3.186.0" dependencies: - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: a5c9c84ecf99768a7f470c742a060bf851802010cf8002d7362bca3067260f1e53d6986c3934273e846c2e83455d0f3d69ccce35fa6d8ff67036c4c69770c2ef + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 + checksum: e544b3c8ffcec2aeef73d60a5a6b71dd023824e02ee37ef6cd3d81c0756d7cebb822c3210a32b0f4a61e4ba249d782716a841405a740b6dd7833dd536e7ec070 languageName: node linkType: hard @@ -3928,42 +4188,51 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/middleware-recursion-detection@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/middleware-recursion-detection@npm:3.310.0" +"@aws-sdk/middleware-logger@npm:3.609.0": + version: 3.609.0 + resolution: "@aws-sdk/middleware-logger@npm:3.609.0" dependencies: - "@aws-sdk/protocol-http": 3.310.0 - "@aws-sdk/types": 3.310.0 - tslib: ^2.5.0 - checksum: 08e7f756a15532f2b0918fbbcc9210c10e84c99b833b9e08213114e24b52c4f0e8105c46f216ccfcc0ab32a577d92473efb8d3aa0c74f6620d7bb8ffbce7dd8b + "@aws-sdk/types": 3.609.0 + "@smithy/types": ^3.3.0 + tslib: ^2.6.2 + checksum: e8d110552fee03c5290f94be8da8bb6c07404c06c68971cf24c89a5a4e08b93f6039a2bf729b173855815dd13e382eda18c31e098e7a40db9c8163b74a7770e7 languageName: node linkType: hard -"@aws-sdk/middleware-retry@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/middleware-retry@npm:3.310.0" +"@aws-sdk/middleware-recursion-detection@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/middleware-recursion-detection@npm:3.186.0" dependencies: - "@aws-sdk/protocol-http": 3.310.0 - "@aws-sdk/service-error-classification": 3.310.0 - "@aws-sdk/types": 3.310.0 - "@aws-sdk/util-middleware": 3.310.0 - "@aws-sdk/util-retry": 3.310.0 - tslib: ^2.5.0 - uuid: ^8.3.2 - checksum: 5e98bd32978681a49acbb365f3b7a5c872c14a519701e07f9073d2e569e79128c9dad98ecbb428d2aacf3f0dfaa7c46542facfd15e38a4215e2971aaba661c02 + "@aws-sdk/protocol-http": 3.186.0 + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 + checksum: 0764fb2589053289c72d92472e245ccce20b71066c9f7cb50e0b93da576ab3bfa75dac06f6f810ae161d8bfeb3bd2934c3cd4e4d0100ee784d8a94ef5f196105 languageName: node linkType: hard -"@aws-sdk/middleware-retry@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/middleware-retry@npm:3.40.0" +"@aws-sdk/middleware-recursion-detection@npm:3.620.0": + version: 3.620.0 + resolution: "@aws-sdk/middleware-recursion-detection@npm:3.620.0" dependencies: - "@aws-sdk/protocol-http": 3.40.0 - "@aws-sdk/service-error-classification": 3.40.0 - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 + "@aws-sdk/types": 3.609.0 + "@smithy/protocol-http": ^4.1.0 + "@smithy/types": ^3.3.0 + tslib: ^2.6.2 + checksum: f859a777eb0441e8ec78054b478bb75c2debcf53680deb6731830a62ec2a45a5a9b1462028214c49bbc67acff2ca1a78cb35913f826ccc4118fa45b51220bcd4 + languageName: node + linkType: hard + +"@aws-sdk/middleware-retry@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/middleware-retry@npm:3.186.0" + dependencies: + "@aws-sdk/protocol-http": 3.186.0 + "@aws-sdk/service-error-classification": 3.186.0 + "@aws-sdk/types": 3.186.0 + "@aws-sdk/util-middleware": 3.186.0 + tslib: ^2.3.1 uuid: ^8.3.2 - checksum: 5f2728499b7ef09d90effaa3cfd2aea130c58afa8118246d074df81d1880bf9a91252fc74429a2f17ed714a2add50c5b52bae7a17d79bb2a64bba22ea7a8491d + checksum: 56e6b93e313d0519ea1d3de9ee5b0bb6f9a0557f0d47e17e44c78a334f5bdf995f4bdfb8f7e3c1e50407783d43da067367f69c7ccfbe3908d41e5533c8d5441d languageName: node linkType: hard @@ -3981,75 +4250,80 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/middleware-sdk-s3@npm:3.41.0": - version: 3.41.0 - resolution: "@aws-sdk/middleware-sdk-s3@npm:3.41.0" - dependencies: - "@aws-sdk/protocol-http": 3.40.0 - "@aws-sdk/signature-v4": 3.40.0 - "@aws-sdk/types": 3.40.0 - "@aws-sdk/util-arn-parser": 3.37.0 - tslib: ^2.3.0 - peerDependencies: - "@aws-sdk/signature-v4-crt": ^3.31.0 - checksum: 2a69e1844b1ef42ba21943910c33984834f52fea4b9795100c273a50cb080e14ac9d3a886c7415b5415af6f56b465a937857ec6410542120542a71dacd35e67c - languageName: node - linkType: hard - -"@aws-sdk/middleware-sdk-s3@npm:3.6.1": - version: 3.6.1 - resolution: "@aws-sdk/middleware-sdk-s3@npm:3.6.1" +"@aws-sdk/middleware-sdk-ec2@npm:3.622.0": + version: 3.622.0 + resolution: "@aws-sdk/middleware-sdk-ec2@npm:3.622.0" dependencies: - "@aws-sdk/protocol-http": 3.6.1 - "@aws-sdk/types": 3.6.1 - "@aws-sdk/util-arn-parser": 3.6.1 - tslib: ^1.8.0 - checksum: 066e0bc584cbc5412fbe284e2cceb1cd443ddf86b43092f0b645dd3b20dd0dbf192fa2cd17e2a51a90223c362625ef3f6f6f386eb018309abc5bc91d7d021666 + "@aws-sdk/types": 3.609.0 + "@aws-sdk/util-format-url": 3.609.0 + "@smithy/middleware-endpoint": ^3.1.0 + "@smithy/protocol-http": ^4.1.0 + "@smithy/signature-v4": ^4.1.0 + "@smithy/smithy-client": ^3.1.12 + "@smithy/types": ^3.3.0 + tslib: ^2.6.2 + checksum: a26118e329c2181267551aa5d7a9d32c191d2f05166ab6d15aa3f888c9da315b01ba34b59cbb383b0d356aa9b40d8fb6d40c7fc48a3b249490c81ee0becb1eed languageName: node linkType: hard -"@aws-sdk/middleware-sdk-sts@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/middleware-sdk-sts@npm:3.310.0" +"@aws-sdk/middleware-sdk-rds@npm:3.620.0": + version: 3.620.0 + resolution: "@aws-sdk/middleware-sdk-rds@npm:3.620.0" dependencies: - "@aws-sdk/middleware-signing": 3.310.0 - "@aws-sdk/types": 3.310.0 - tslib: ^2.5.0 - checksum: 38f50626aaba06ef33b9200339d1eb1e2fa32d7f962307cdf60fc9b64a73d41404a1131b55f7c2efcc8942152ca8577a6a9926245f12fec8852edaea817cafae + "@aws-sdk/types": 3.609.0 + "@aws-sdk/util-format-url": 3.609.0 + "@smithy/middleware-endpoint": ^3.1.0 + "@smithy/protocol-http": ^4.1.0 + "@smithy/signature-v4": ^4.1.0 + "@smithy/types": ^3.3.0 + tslib: ^2.6.2 + checksum: 9ffa8fbe4b0555ed0504ccb3c85c4c614d2f0d16f060621551d50a61a7a72a5ef2542cb7adf480a3c92b6da7dcf219f563fa4d51eb0a6b1fb6d7e796811e358f languageName: node linkType: hard -"@aws-sdk/middleware-sdk-sts@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/middleware-sdk-sts@npm:3.40.0" +"@aws-sdk/middleware-sdk-s3@npm:3.624.0": + version: 3.624.0 + resolution: "@aws-sdk/middleware-sdk-s3@npm:3.624.0" dependencies: - "@aws-sdk/middleware-signing": 3.40.0 - "@aws-sdk/property-provider": 3.40.0 - "@aws-sdk/protocol-http": 3.40.0 - "@aws-sdk/signature-v4": 3.40.0 - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: 119f816d9ab459fb9df88b85b235e83f3ad923c996df4389729b3575a73b29fe10ecbf297729a2ec9d848f58b14ba1089ad7fb4ef5ff53adb99f237938e3b0c3 + "@aws-sdk/core": 3.624.0 + "@aws-sdk/types": 3.609.0 + "@aws-sdk/util-arn-parser": 3.568.0 + "@smithy/core": ^2.3.2 + "@smithy/node-config-provider": ^3.1.4 + "@smithy/protocol-http": ^4.1.0 + "@smithy/signature-v4": ^4.1.0 + "@smithy/smithy-client": ^3.1.12 + "@smithy/types": ^3.3.0 + "@smithy/util-config-provider": ^3.0.0 + "@smithy/util-middleware": ^3.0.3 + "@smithy/util-stream": ^3.1.3 + "@smithy/util-utf8": ^3.0.0 + tslib: ^2.6.2 + checksum: b1301a583759b41c4385a893d2776a8fb1115fa41d070fae1673e7732d3d6b3e96785023a2006e78f0bb2b214a54e2c0a0aeee3165531336682f7c00a8f42645 languageName: node linkType: hard -"@aws-sdk/middleware-serde@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/middleware-serde@npm:3.310.0" +"@aws-sdk/middleware-sdk-sts@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/middleware-sdk-sts@npm:3.186.0" dependencies: - "@aws-sdk/types": 3.310.0 - tslib: ^2.5.0 - checksum: 474ba3dff4998f64a72f4f62b82df84af9a9f4e4141e2b99b1807b2467693fb71fc4fae645145e9b34f00373a98e8c8ca4205e69d7d3da06bf1a1b032a1ce858 + "@aws-sdk/middleware-signing": 3.186.0 + "@aws-sdk/property-provider": 3.186.0 + "@aws-sdk/protocol-http": 3.186.0 + "@aws-sdk/signature-v4": 3.186.0 + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 + checksum: a3c1f300715b04fd8d75b86112509b6a1f0b42fc86852eeaa758a6621fc827bc727cc9118204c7897633f040bbe1af967a7c05126ed01425d7c54eebf684f08a languageName: node linkType: hard -"@aws-sdk/middleware-serde@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/middleware-serde@npm:3.40.0" +"@aws-sdk/middleware-serde@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/middleware-serde@npm:3.186.0" dependencies: - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: a998c493e991b47f8c68e0dd88a915f45a01e9924755794b88f934a41fd8cd570ecee93c9ea33a13f404cecb707e2fc29061edada04727f3241804b8b2aa58ab + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 + checksum: fc105f84c54e31943ac82d90337791e99c10bb6bea5746efd4018d778c978ca07ddacd23d7b9ac83825818b379d6b4fb7c43ad7338e49096faba78a9f2968e28 languageName: node linkType: hard @@ -4063,30 +4337,17 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/middleware-signing@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/middleware-signing@npm:3.310.0" - dependencies: - "@aws-sdk/property-provider": 3.310.0 - "@aws-sdk/protocol-http": 3.310.0 - "@aws-sdk/signature-v4": 3.310.0 - "@aws-sdk/types": 3.310.0 - "@aws-sdk/util-middleware": 3.310.0 - tslib: ^2.5.0 - checksum: ad7e16200f8d615bfae772360f94887d28297397af64f87da46bd5fc4c42e85d6bf1fb067d4096a26e377a96dcce17c4a66d9873d78d9a9476e3afda8df73f4f - languageName: node - linkType: hard - -"@aws-sdk/middleware-signing@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/middleware-signing@npm:3.40.0" +"@aws-sdk/middleware-signing@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/middleware-signing@npm:3.186.0" dependencies: - "@aws-sdk/property-provider": 3.40.0 - "@aws-sdk/protocol-http": 3.40.0 - "@aws-sdk/signature-v4": 3.40.0 - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: 17694000ecf9575aa2a6263608125cab4f786dfec749d0cb247fe4717ce864bd40524b7864a5e7deda89451125bc92b302430a6229a45b6be959fd38fe626080 + "@aws-sdk/property-provider": 3.186.0 + "@aws-sdk/protocol-http": 3.186.0 + "@aws-sdk/signature-v4": 3.186.0 + "@aws-sdk/types": 3.186.0 + "@aws-sdk/util-middleware": 3.186.0 + tslib: ^2.3.1 + checksum: 63063981f233d78737a422d5fce03a66c5256d525529e23c9c5cae852dafc9199b9bf75540eb4a0b4bfb3398b6c25a446f35586ee4de504da3e07912187108d8 languageName: node linkType: hard @@ -4102,41 +4363,23 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/middleware-ssec@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/middleware-ssec@npm:3.40.0" - dependencies: - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: bbdde0a415c41ff0dd74268808bd185ff74435441ab806aac017aa743937803a8de7e783ba22b86b8f7d98c621731a866dbe782d699eead985259ef6aa57a250 - languageName: node - linkType: hard - -"@aws-sdk/middleware-ssec@npm:3.6.1": - version: 3.6.1 - resolution: "@aws-sdk/middleware-ssec@npm:3.6.1" - dependencies: - "@aws-sdk/types": 3.6.1 - tslib: ^1.8.0 - checksum: 8f5a0046ac205c2f5ee8bcaabc54c142693b67b46c75ab49b743719603fa7c34c93365a4d4d8f3307e73ef92a6fabda2455a53ee8970b3857559a7d77780bef7 - languageName: node - linkType: hard - -"@aws-sdk/middleware-stack@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/middleware-stack@npm:3.310.0" +"@aws-sdk/middleware-ssec@npm:3.609.0": + version: 3.609.0 + resolution: "@aws-sdk/middleware-ssec@npm:3.609.0" dependencies: - tslib: ^2.5.0 - checksum: 863e314ba36ec4f719d50454d0f747eaa4063fefe78ff2d0c84013afdd77c01ec356f5808c05bb0dc473145550b85829af6826fc13c75758bd6dff6c131e33f8 + "@aws-sdk/types": 3.609.0 + "@smithy/types": ^3.3.0 + tslib: ^2.6.2 + checksum: 7688628299c3d3352182634836d8a5ad89d69dfedd91d7386ffeaa8288160329eef7d399321b7841bb4c84c9741d7245ef218657a8df71248b5ce5f7273e303d languageName: node linkType: hard -"@aws-sdk/middleware-stack@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/middleware-stack@npm:3.40.0" +"@aws-sdk/middleware-stack@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/middleware-stack@npm:3.186.0" dependencies: - tslib: ^2.3.0 - checksum: 914d6c967abe94d0ce92541f45ca93d1bb9cbb52292d46741dad89ad66d49040c0670e06cb6cb5b1c9f3edc1858e81953539d488eb7f48e0dbc6e86110a45d47 + tslib: ^2.3.1 + checksum: ddf38440701ead4de993e8f3ec9ba19f0e5699e85cea1f57be82fbdfcaf2dcce7c8dc65a61d525bd94a9bccfd23f96f63439449c12c238d3aa228e3fabc85e39 languageName: node linkType: hard @@ -4149,26 +4392,14 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/middleware-user-agent@npm:3.319.0": - version: 3.319.0 - resolution: "@aws-sdk/middleware-user-agent@npm:3.319.0" - dependencies: - "@aws-sdk/protocol-http": 3.310.0 - "@aws-sdk/types": 3.310.0 - "@aws-sdk/util-endpoints": 3.319.0 - tslib: ^2.5.0 - checksum: 7f3b146f1e9f1c375a4c7cbd662eec95439cad87cf5da59765a40c8feb8eea080feecf17173479b2c0dff0bf7ae684b7f2c77cb7cc030673e4b0a1111fd6538e - languageName: node - linkType: hard - -"@aws-sdk/middleware-user-agent@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/middleware-user-agent@npm:3.40.0" +"@aws-sdk/middleware-user-agent@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/middleware-user-agent@npm:3.186.0" dependencies: - "@aws-sdk/protocol-http": 3.40.0 - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: 46fa61cde2a408b4b228bde33733b867e6ff1d29fea9a3addf3a832ca49acac431277c8a6199e43eb48b84cb58641126851f827b1acd13451339efc51521572c + "@aws-sdk/protocol-http": 3.186.0 + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 + checksum: ee6091259a215c9624a33b123d5712367e4c17642fcb44e7955765e372f36b5183a6f2b217fa644f18121ae928826152fbee4c245eb739b4524707d8d1489ed3 languageName: node linkType: hard @@ -4183,27 +4414,28 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/node-config-provider@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/node-config-provider@npm:3.310.0" +"@aws-sdk/middleware-user-agent@npm:3.620.0": + version: 3.620.0 + resolution: "@aws-sdk/middleware-user-agent@npm:3.620.0" dependencies: - "@aws-sdk/property-provider": 3.310.0 - "@aws-sdk/shared-ini-file-loader": 3.310.0 - "@aws-sdk/types": 3.310.0 - tslib: ^2.5.0 - checksum: fe62b819d31ade16677ef01827ead31b99dd17202eee76102e9670b17463f9daaeb5f349bf0b72656be9be5908ad2dda75a8fb43b5b304992a3bae2f9b3aae85 + "@aws-sdk/types": 3.609.0 + "@aws-sdk/util-endpoints": 3.614.0 + "@smithy/protocol-http": ^4.1.0 + "@smithy/types": ^3.3.0 + tslib: ^2.6.2 + checksum: c661d368c2fe12a925faa7f59509f507edf9cebc5a98650d5592eaf333cbb50a92dd3532e04de6e5b44686c7ab25fa5a6515df4e0790d1b6b0823e44efb3657c languageName: node linkType: hard -"@aws-sdk/node-config-provider@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/node-config-provider@npm:3.40.0" +"@aws-sdk/node-config-provider@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/node-config-provider@npm:3.186.0" dependencies: - "@aws-sdk/property-provider": 3.40.0 - "@aws-sdk/shared-ini-file-loader": 3.37.0 - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: fe76aa1bbafbee26a1e9cc334b2889c9b7d6f659233cdcdb4ab48d51e3eb81a508b3b2474e01b82f93ada4130a82957bb8416ffd79c9348c4e037fa7a0c08b71 + "@aws-sdk/property-provider": 3.186.0 + "@aws-sdk/shared-ini-file-loader": 3.186.0 + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 + checksum: 8cca9038a7f794032d704d8c2b052e39dbe39f32534b6838fc80d89a773ab047621055a6d028db1b19feebd359fb83866cedaded81a64f2cb2e35e68032b4b39 languageName: node linkType: hard @@ -4219,29 +4451,16 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/node-http-handler@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/node-http-handler@npm:3.310.0" - dependencies: - "@aws-sdk/abort-controller": 3.310.0 - "@aws-sdk/protocol-http": 3.310.0 - "@aws-sdk/querystring-builder": 3.310.0 - "@aws-sdk/types": 3.310.0 - tslib: ^2.5.0 - checksum: caeda616b1bb865a3829eeb29c72526a0a6a3f1fdb7730480854ab5ec540944b54736d879ef089ae1707f779584c24bb7d7e7e946ee431815ad0a0a98e6d9ab0 - languageName: node - linkType: hard - -"@aws-sdk/node-http-handler@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/node-http-handler@npm:3.40.0" +"@aws-sdk/node-http-handler@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/node-http-handler@npm:3.186.0" dependencies: - "@aws-sdk/abort-controller": 3.40.0 - "@aws-sdk/protocol-http": 3.40.0 - "@aws-sdk/querystring-builder": 3.40.0 - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: 5dfe1c1b8d22896add23301aa9c706fbca73bc3ba298636edb0483843ec23565992df2349b872e34ca91d1b8d7e0dd3b328413a93468b35880405c2e2bdcfd09 + "@aws-sdk/abort-controller": 3.186.0 + "@aws-sdk/protocol-http": 3.186.0 + "@aws-sdk/querystring-builder": 3.186.0 + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 + checksum: c8ad515d999f133e4c5d7625a7c7064252e90b3b75b02810b5f52da2041569ad807a4f93bbfc520f3758ed0b293231305c673b3263474ac2ea64a1c2863c30d6 languageName: node linkType: hard @@ -4258,23 +4477,13 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/property-provider@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/property-provider@npm:3.310.0" - dependencies: - "@aws-sdk/types": 3.310.0 - tslib: ^2.5.0 - checksum: b94be3fbcef3fe9234a1ada48c9e41c6e0cff02a904c2e302c601d031c6cf56cc3caa4aeb67c2c3e3ffb1d0d5dc8d56217091b8def688a49e94a301a64f63241 - languageName: node - linkType: hard - -"@aws-sdk/property-provider@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/property-provider@npm:3.40.0" +"@aws-sdk/property-provider@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/property-provider@npm:3.186.0" dependencies: - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: 8621397ffe9552e0640f9ad78e99f321c512d2d28fcb58147fff29a346b9f7b1456b416ba0fd4797247cc60ce911775b967fc5bad12bad9846f589c54873474e + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 + checksum: 2dc80021c42d3ff241c7c59549d9a40940bdee014d3c0719326848d1eb8394dd0599eb27e96c4bb932f447cbb705e88dd6bb5af522b470e91bc02fd93cb4e03a languageName: node linkType: hard @@ -4288,23 +4497,13 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/protocol-http@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/protocol-http@npm:3.310.0" - dependencies: - "@aws-sdk/types": 3.310.0 - tslib: ^2.5.0 - checksum: b67e980321b29408664df4db628eabf67432661882419b26aa060aeee2e00516c9c2ee6b38fd0aadfa191035f1f92ee132c338cf26109e6ebb083825c348398f - languageName: node - linkType: hard - -"@aws-sdk/protocol-http@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/protocol-http@npm:3.40.0" +"@aws-sdk/protocol-http@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/protocol-http@npm:3.186.0" dependencies: - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: 1206de92a643dc8664a0370093a110e88feb33a1e4ee6f6b0a1e8ba035f5e9c13caef12b6f24fabfe5478ecf76824225ddcac3fc059b5ff4d3bb3ebd8f88846f + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 + checksum: 09efaac4858756e5b7f87acaa0fc35bf698274a5cec162ff9d0052551389c92343e9d81a2a361d2c557746247e5c147b8e8cd40f5c74bd36fdc7788f3e641e1f languageName: node linkType: hard @@ -4318,25 +4517,14 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/querystring-builder@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/querystring-builder@npm:3.310.0" - dependencies: - "@aws-sdk/types": 3.310.0 - "@aws-sdk/util-uri-escape": 3.310.0 - tslib: ^2.5.0 - checksum: c6f83f8b3a8591ff5bc70866335cea662df01c8ac196cbd9ff34b1b6c6013b8780a47dc092c1128fc84274eca4b393d459226009845eea1d9b0e95eff75485fb - languageName: node - linkType: hard - -"@aws-sdk/querystring-builder@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/querystring-builder@npm:3.40.0" +"@aws-sdk/querystring-builder@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/querystring-builder@npm:3.186.0" dependencies: - "@aws-sdk/types": 3.40.0 - "@aws-sdk/util-uri-escape": 3.37.0 - tslib: ^2.3.0 - checksum: 43a847bb7633b4afd4173bdc724bea4d06ac912dbbcdf730efeeef89bae268e9477d5f5a88fbe7b01344551f46b6cd4a34d93ba24b0a79297f2ced68933fc8d2 + "@aws-sdk/types": 3.186.0 + "@aws-sdk/util-uri-escape": 3.186.0 + tslib: ^2.3.1 + checksum: 2be497c7fa30df58ae96a8339bff22392e42be77dc414d6b02c198bd485e36d1cb5c1d84eacaf5afcf4802e49507baf15c49bd65c2826842de722478e9b1138f languageName: node linkType: hard @@ -4351,23 +4539,13 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/querystring-parser@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/querystring-parser@npm:3.310.0" - dependencies: - "@aws-sdk/types": 3.310.0 - tslib: ^2.5.0 - checksum: 2a165262eb174e4fb61047d8d8021f39c141dc1405f216802bab0c8696d6511eef3d7ea54d0416de137798d4bde510c1b162c91b08aa0174e88efd1cd4378a96 - languageName: node - linkType: hard - -"@aws-sdk/querystring-parser@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/querystring-parser@npm:3.40.0" +"@aws-sdk/querystring-parser@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/querystring-parser@npm:3.186.0" dependencies: - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: f50d4779a79b0cc4e9b3e0c39fee97ef6c121ff1ccadfb7033e3c73efc317e0629f26f80217fb48d314aded84530d71deec4477037263666730454887cdde724 + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 + checksum: e2d3f442cbfd522e781598706037e4e621979e53fd0c1a28aef1cb0fdb773329a9ef47b0f6b172c682dd33ea546dff7e3933fd3ef759879fbb72da64e3cceaeb languageName: node linkType: hard @@ -4381,32 +4559,24 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/s3-request-presigner@npm:3.6.1": - version: 3.6.1 - resolution: "@aws-sdk/s3-request-presigner@npm:3.6.1" +"@aws-sdk/region-config-resolver@npm:3.614.0": + version: 3.614.0 + resolution: "@aws-sdk/region-config-resolver@npm:3.614.0" dependencies: - "@aws-sdk/protocol-http": 3.6.1 - "@aws-sdk/signature-v4": 3.6.1 - "@aws-sdk/smithy-client": 3.6.1 - "@aws-sdk/types": 3.6.1 - "@aws-sdk/util-create-request": 3.6.1 - "@aws-sdk/util-format-url": 3.6.1 - tslib: ^1.8.0 - checksum: 30cc0b81cecc9aac5d31228c8eba92bb171e3eae40a665351ec1faca8f871d0d15cad9ee06d7971d3e00ea7ff1c2f3bbbf230920d2e46168b4bb546ff01e5636 - languageName: node - linkType: hard - -"@aws-sdk/service-error-classification@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/service-error-classification@npm:3.310.0" - checksum: 5a8728ac0dfe6d9d1d4532c2805292cf77738aa4f0338c2fa830872c36398a21cedd4b9d0e8d5d4219bb744e653ef4f26519939aca9e59ac9d54bcfe59a8b2cf + "@aws-sdk/types": 3.609.0 + "@smithy/node-config-provider": ^3.1.4 + "@smithy/types": ^3.3.0 + "@smithy/util-config-provider": ^3.0.0 + "@smithy/util-middleware": ^3.0.3 + tslib: ^2.6.2 + checksum: 555842b34c26398741fa3a1f629d27d210270516b453b0a7237672a4472ff8e204c5979fe1823baddf4d695d4d95a631fadfa78d1d27089d9e9cba28e736346e languageName: node linkType: hard -"@aws-sdk/service-error-classification@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/service-error-classification@npm:3.40.0" - checksum: cd026b7ab7648319aa1e67fff3ff4bb20dd4e6eb17df8f4518bb65339c5816383ba70785256415db7e0e48db028ea594f9a9ad08e23cfb90f74a5ff6e8a51f8b +"@aws-sdk/service-error-classification@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/service-error-classification@npm:3.186.0" + checksum: 7e887cf2155b1cc6e35a63fbb3574971c51e9fb3c0a8c00ca9c172b1b10cf64b32ff5435e478f73f460de78ae1ebdea70ddf8bda63d1529dabac68d411bd3a6f languageName: node linkType: hard @@ -4417,22 +4587,13 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/shared-ini-file-loader@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/shared-ini-file-loader@npm:3.310.0" - dependencies: - "@aws-sdk/types": 3.310.0 - tslib: ^2.5.0 - checksum: ab9a5d7518d51525c00ef86cee669a69c579e4a7d17f8f3ed1db83dcb33d2f7f706778eaf07f15f03b4f7ab52dc7eed716a6a0a25fcd5625c3e751ff95718d91 - languageName: node - linkType: hard - -"@aws-sdk/shared-ini-file-loader@npm:3.37.0": - version: 3.37.0 - resolution: "@aws-sdk/shared-ini-file-loader@npm:3.37.0" +"@aws-sdk/shared-ini-file-loader@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/shared-ini-file-loader@npm:3.186.0" dependencies: - tslib: ^2.3.0 - checksum: 74e6be5252d5cf863e8eec37fd1667beef2b0159c590b228750ca3144355bbbda01b28b76cffe70c05287dd64f8bcaf92af3a1488afc8daa712244abbcfff610 + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 + checksum: 6567d2b98238b57b3451bf053090ff4dbdd6dc19fbf7680cd44f596ba2dc75036e8670ea65d863b79cf9635295352fe9e45a9a1bb64811b36fec6f1d9b4d0bbd languageName: node linkType: hard @@ -4445,31 +4606,31 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/signature-v4@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/signature-v4@npm:3.310.0" +"@aws-sdk/signature-v4-multi-region@npm:3.624.0": + version: 3.624.0 + resolution: "@aws-sdk/signature-v4-multi-region@npm:3.624.0" dependencies: - "@aws-sdk/is-array-buffer": 3.310.0 - "@aws-sdk/types": 3.310.0 - "@aws-sdk/util-hex-encoding": 3.310.0 - "@aws-sdk/util-middleware": 3.310.0 - "@aws-sdk/util-uri-escape": 3.310.0 - "@aws-sdk/util-utf8": 3.310.0 - tslib: ^2.5.0 - checksum: 8762ef3968256272589da4aabb6f6b4623ef58b034b16e18b242ccd8151ad684df6d3eb04005feadec3aa38d773fc2d6b1615672e627559f40f6d1d37896e88e + "@aws-sdk/middleware-sdk-s3": 3.624.0 + "@aws-sdk/types": 3.609.0 + "@smithy/protocol-http": ^4.1.0 + "@smithy/signature-v4": ^4.1.0 + "@smithy/types": ^3.3.0 + tslib: ^2.6.2 + checksum: cd6ee325bd7cafeab7aeb2c7bd65666d5f3137eac9164c2082e6776af2ce706be959d08e1244596a388b6ab13c9ab3448aa1c9e7b486ad00f07078e971f90b26 languageName: node linkType: hard -"@aws-sdk/signature-v4@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/signature-v4@npm:3.40.0" +"@aws-sdk/signature-v4@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/signature-v4@npm:3.186.0" dependencies: - "@aws-sdk/is-array-buffer": 3.37.0 - "@aws-sdk/types": 3.40.0 - "@aws-sdk/util-hex-encoding": 3.37.0 - "@aws-sdk/util-uri-escape": 3.37.0 - tslib: ^2.3.0 - checksum: c0fed0deb102c309b09a6e8c9ff01154c3e5b3caa3e9a6855e6ee7df01ec3f31f97621ee4c5bf785dc3106a75bc438953bbcdf550005858c60a8a94cc42f9f81 + "@aws-sdk/is-array-buffer": 3.186.0 + "@aws-sdk/types": 3.186.0 + "@aws-sdk/util-hex-encoding": 3.186.0 + "@aws-sdk/util-middleware": 3.186.0 + "@aws-sdk/util-uri-escape": 3.186.0 + tslib: ^2.3.1 + checksum: d78b8878191cf802c72fa4250f883d3c760c278019c44cf2b6206282f7758af35b8c5ff20a8d36508acdab21ffb0dc04dc5efb444b9382d440246c81c9df86e4 languageName: node linkType: hard @@ -4486,25 +4647,14 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/smithy-client@npm:3.316.0": - version: 3.316.0 - resolution: "@aws-sdk/smithy-client@npm:3.316.0" - dependencies: - "@aws-sdk/middleware-stack": 3.310.0 - "@aws-sdk/types": 3.310.0 - tslib: ^2.5.0 - checksum: 713ad6232e38b94723874cd6c9eaec4e20bdc6cea3435fa5fb9af7a1dae6321ece780d59985574d00d8eb8290ae03a8de15257be537b816a598494bddf66f517 - languageName: node - linkType: hard - -"@aws-sdk/smithy-client@npm:3.41.0": - version: 3.41.0 - resolution: "@aws-sdk/smithy-client@npm:3.41.0" +"@aws-sdk/smithy-client@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/smithy-client@npm:3.186.0" dependencies: - "@aws-sdk/middleware-stack": 3.40.0 - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: 39f45f324d9778a21f4a3926ee79af65eba2b7e4e91f4708ac3c964ff7360b76eb4a0043000ec35691f377ff0c76c3cc2190b3459df881e93ed0951e4a626461 + "@aws-sdk/middleware-stack": 3.186.0 + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 + checksum: 4a66ca8bc50e7973688de218be8744a9b706672939fa656c052f9120e8a27f0f571ffd4a807549e3e7a8a5040850284ffbbf33b09826e071d796c53a8462a324 languageName: node linkType: hard @@ -4519,32 +4669,34 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/token-providers@npm:3.319.0": - version: 3.319.0 - resolution: "@aws-sdk/token-providers@npm:3.319.0" +"@aws-sdk/token-providers@npm:3.614.0": + version: 3.614.0 + resolution: "@aws-sdk/token-providers@npm:3.614.0" dependencies: - "@aws-sdk/client-sso-oidc": 3.319.0 - "@aws-sdk/property-provider": 3.310.0 - "@aws-sdk/shared-ini-file-loader": 3.310.0 - "@aws-sdk/types": 3.310.0 - tslib: ^2.5.0 - checksum: 2533e9eac84d4cab6b8a8fee7d1f899cc849c4f33cabc5e47f9cf06bd8944b3b6aa214b208d35f2f65a0e73bdf775aa545f0a3ba4a7874509d25b9636a817c75 + "@aws-sdk/types": 3.609.0 + "@smithy/property-provider": ^3.1.3 + "@smithy/shared-ini-file-loader": ^3.1.4 + "@smithy/types": ^3.3.0 + tslib: ^2.6.2 + peerDependencies: + "@aws-sdk/client-sso-oidc": ^3.614.0 + checksum: b794bcb9ad05f57bfc415e9290d3ea177701bb3221a9c5e1d4529deb946bd418acb7ac7407adb8d2f3da7d3793a62c7c1b43a8c1a8fe7999e38485208811f59a languageName: node linkType: hard -"@aws-sdk/types@npm:3.310.0, @aws-sdk/types@npm:^3.1.0, @aws-sdk/types@npm:^3.222.0, @aws-sdk/types@npm:^3.25.0": - version: 3.310.0 - resolution: "@aws-sdk/types@npm:3.310.0" - dependencies: - tslib: ^2.5.0 - checksum: a978fc8ac63a34e75cbf6b74aae4b78db805e3452a33f85449cdcd77edf23bbdc27a9b0fb4edcd4ce97a37691eaa837058d64f0e20723b34da41cead900efc67 +"@aws-sdk/types@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/types@npm:3.186.0" + checksum: c77ab5e5ac6410f4a740981774f743c7ccdd1f5da152190703adc0eb7f808322495c5948c38bbc1c5adf41d8c036e95e2a5d9b5e4d1faaca7d85f4aed519ab5f languageName: node linkType: hard -"@aws-sdk/types@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/types@npm:3.40.0" - checksum: 4fd66137407f43532d5bb61859e491d86d67e674bbab1316ab2ef2702b6825b0f2ff354f124ebfc509b772ad11fa9f571f385cf088008f5d3f2dec7abf9484ec +"@aws-sdk/types@npm:3.338.0": + version: 3.338.0 + resolution: "@aws-sdk/types@npm:3.338.0" + dependencies: + tslib: ^2.5.0 + checksum: bd151ca80101c31f9b88d4ebb76c4080299fbf8ac9ff20ce3fb9f859f7b20eb5cd8a8dcce547c956ef8469c478b81fa6f786c2eb25c887232c3cff9884842b1d languageName: node linkType: hard @@ -4555,10 +4707,13 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/types@npm:^1.0.0-alpha.0": - version: 1.0.0-rc.10 - resolution: "@aws-sdk/types@npm:1.0.0-rc.10" - checksum: 1274a1c5c973be829975fd52e17ed1217c72232f744b60b20e7bd443f51cf3a777beb1c7dfb0841701d79556d45336775798c7dfc266ab7ce1ee94202cba4b53 +"@aws-sdk/types@npm:3.609.0, @aws-sdk/types@npm:^3.1.0, @aws-sdk/types@npm:^3.222.0, @aws-sdk/types@npm:^3.25.0": + version: 3.609.0 + resolution: "@aws-sdk/types@npm:3.609.0" + dependencies: + "@smithy/types": ^3.3.0 + tslib: ^2.6.2 + checksum: 293249118c2fc3cdc79ff9712e3a9f757a2f38e7d5d770507b3bb31d22b8c67ed6f9bdd83c1b6319236b8257d5cc7e2882c15e076200021e8bbf41e4780d430c languageName: node linkType: hard @@ -4574,25 +4729,14 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/url-parser@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/url-parser@npm:3.310.0" - dependencies: - "@aws-sdk/querystring-parser": 3.310.0 - "@aws-sdk/types": 3.310.0 - tslib: ^2.5.0 - checksum: 82d9bcc30f74b3f71dd499888e6469dd1238c5af89d0a2ab150f5204e0e81ffdba2dfb047cc903f43b41aad88bae846111f8acb0124b19da49ae4098e574b259 - languageName: node - linkType: hard - -"@aws-sdk/url-parser@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/url-parser@npm:3.40.0" +"@aws-sdk/url-parser@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/url-parser@npm:3.186.0" dependencies: - "@aws-sdk/querystring-parser": 3.40.0 - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: a2221055f899a0488a3714f7d22a8aee12f4c47f5df3b05eba0649a033e9fdf334e0515c93d4d49a84597825db21bfd95a77c5ae4709d4d9d624ef1c114f18c2 + "@aws-sdk/querystring-parser": 3.186.0 + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 + checksum: e9bd333ed2856cff3a9a8c9bce7adbb8dd3058c6f89505487814713262adfc7d9f0b5f969c175f6c4fb9a102c5de34a90f4b0ed05f0f6a5187201a737094ba8b languageName: node linkType: hard @@ -4607,30 +4751,21 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/util-arn-parser@npm:3.37.0": - version: 3.37.0 - resolution: "@aws-sdk/util-arn-parser@npm:3.37.0" - dependencies: - tslib: ^2.3.0 - checksum: 1797d346a6e20982ec56ef5e5c058f829f90d0da46504522bb436a87625631e0b3460ba7223e2dd7f3734eaa0fc1ed02d033132f6b6b5405898240212b8c1b3e - languageName: node - linkType: hard - -"@aws-sdk/util-arn-parser@npm:3.6.1": - version: 3.6.1 - resolution: "@aws-sdk/util-arn-parser@npm:3.6.1" +"@aws-sdk/util-arn-parser@npm:3.568.0, @aws-sdk/util-arn-parser@npm:^3.310.0": + version: 3.568.0 + resolution: "@aws-sdk/util-arn-parser@npm:3.568.0" dependencies: - tslib: ^1.8.0 - checksum: 94a2c489490b336761c1e8268a87b0bc5d390e32cf70d805a0984d3fe0800bad789909c3ca837427354ec5694ca68fa031804fdb5101dd3873460200b520110e + tslib: ^2.6.2 + checksum: 4e6168b86a1ff4509f25b56e473c95bdcc0ecbaedcded29cbbd500eb7c156de63f2426282cd50489ac7f321a990056349974730f9e27ac3fe872ba3573b09fb6 languageName: node linkType: hard -"@aws-sdk/util-base64-browser@npm:3.37.0": - version: 3.37.0 - resolution: "@aws-sdk/util-base64-browser@npm:3.37.0" +"@aws-sdk/util-base64-browser@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/util-base64-browser@npm:3.186.0" dependencies: - tslib: ^2.3.0 - checksum: 08af85efe7633e02f5216125df597342dcac745e1bad6d7165f71bcd03fdfa5cecaee2c402ee62b97b5caab7045f47e838e654ec7f272d871a571ee59b2b9dc6 + tslib: ^2.3.1 + checksum: 2cbf8ab466dd20f56d7976901c966243301de952998f011645c8714452f60de450eb6581418ec572a6179aad87d3e0ac1669f932ce9fc59dbc0b925d3cc19aad languageName: node linkType: hard @@ -4643,13 +4778,13 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/util-base64-node@npm:3.37.0": - version: 3.37.0 - resolution: "@aws-sdk/util-base64-node@npm:3.37.0" +"@aws-sdk/util-base64-node@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/util-base64-node@npm:3.186.0" dependencies: - "@aws-sdk/util-buffer-from": 3.37.0 - tslib: ^2.3.0 - checksum: 3f58c152a6770e81291ef3254f19da0b8370871b173d1edcb71fff0c6bd1e6703c72617f6f76dad783e1744f4a2a4288ef125b1e2dd613414aa0c0f4a1fb3b5d + "@aws-sdk/util-buffer-from": 3.186.0 + tslib: ^2.3.1 + checksum: a5ed4b77ad4682fb24fbb03d17ed0872f74cbd9f1feb44a5aa308e8e0f57013715a0b3fc7791417ad2d0e71b43ab39191a0454acbf12926ba21aa6fff28c3efd languageName: node linkType: hard @@ -4663,31 +4798,12 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/util-base64@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/util-base64@npm:3.310.0" - dependencies: - "@aws-sdk/util-buffer-from": 3.310.0 - tslib: ^2.5.0 - checksum: 99159de6d3fa23e7c07a9b329fe157201d23e9b872ecf5f6a2d0ae3b5720bb4466122642880e40a44e372292b68d861b8236f6c3d321fbdb83c68bca1b8c07c8 - languageName: node - linkType: hard - -"@aws-sdk/util-body-length-browser@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/util-body-length-browser@npm:3.310.0" - dependencies: - tslib: ^2.5.0 - checksum: f3f6b8a89d4f66eae8a90d92a61c0df57399dc7a442d2ae66feb7780ab7755bebdcec5749057bc6199174a450679879bfae8213c3539ae0a4f760e5708fda220 - languageName: node - linkType: hard - -"@aws-sdk/util-body-length-browser@npm:3.37.0": - version: 3.37.0 - resolution: "@aws-sdk/util-body-length-browser@npm:3.37.0" +"@aws-sdk/util-body-length-browser@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/util-body-length-browser@npm:3.186.0" dependencies: - tslib: ^2.3.0 - checksum: 52ba4d2cf532ca165b56a3a26cd8837f7e43de8f2865d678a545b084890e3db3f0e9b6c845e0dcdb913b79ec8e3d88b601512b8f5761d86469084bbdbc620acd + tslib: ^2.3.1 + checksum: 674b65be47d3190db1400fb442c87e414f3bf921e5515e86e46c525c42b23507561e6105f8431820205ba9a33776b15695824bfe5427fb15e33a5133a731d4a3 languageName: node linkType: hard @@ -4700,21 +4816,12 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/util-body-length-node@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/util-body-length-node@npm:3.310.0" - dependencies: - tslib: ^2.5.0 - checksum: 4b2b1f3bf25cf3d5e9b10f9c2004490f220986d8d7be5ccd63bbc9c42ee6e729e1403a4ea97c4e669315809517860e007bc15b27dd45c5d31c38d4a27b818660 - languageName: node - linkType: hard - -"@aws-sdk/util-body-length-node@npm:3.37.0": - version: 3.37.0 - resolution: "@aws-sdk/util-body-length-node@npm:3.37.0" +"@aws-sdk/util-body-length-node@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/util-body-length-node@npm:3.186.0" dependencies: - tslib: ^2.3.0 - checksum: 19def34b23ab5cea73d2b0dca52911fb043d00945f2982b2d023855976808451f4f9153e68edf09577620ed43e306ab59a11a6bb22866e5f2b1d6d8826873d73 + tslib: ^2.3.1 + checksum: d85b4297e5d760804df55a95e7ad01b8a123b80f7274918c48c5363d77e7cbdcdc4ebc815280b9eabe38666ca171794f8b098c8080ec29459228f67618fb5be9 languageName: node linkType: hard @@ -4727,6 +4834,16 @@ __metadata: languageName: node linkType: hard +"@aws-sdk/util-buffer-from@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/util-buffer-from@npm:3.186.0" + dependencies: + "@aws-sdk/is-array-buffer": 3.186.0 + tslib: ^2.3.1 + checksum: f73190973c75f710a3c3fe0fa087117d17c85bf28a9d4ad9d285d719adf8a9fa81700a09c4d57dbd12d08424eb1480341ecd1096a63271cd083895ea5682d966 + languageName: node + linkType: hard + "@aws-sdk/util-buffer-from@npm:3.310.0": version: 3.310.0 resolution: "@aws-sdk/util-buffer-from@npm:3.310.0" @@ -4737,16 +4854,6 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/util-buffer-from@npm:3.37.0": - version: 3.37.0 - resolution: "@aws-sdk/util-buffer-from@npm:3.37.0" - dependencies: - "@aws-sdk/is-array-buffer": 3.37.0 - tslib: ^2.3.0 - checksum: f6412b0aaff533fc9209bbe4e62c70cb92e2f9977cb0a4ad4210ed2d4a1442dbb297f7546ecff6077a955c281226cfb2bfd5c9eb9f4c3f75b5a4f69d2a6a89c8 - languageName: node - linkType: hard - "@aws-sdk/util-buffer-from@npm:3.6.1": version: 3.6.1 resolution: "@aws-sdk/util-buffer-from@npm:3.6.1" @@ -4757,94 +4864,84 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/util-config-provider@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/util-config-provider@npm:3.310.0" - dependencies: - tslib: ^2.5.0 - checksum: 9903264661ffa976b9944e5b33fbc31fac34a7c2d9dada8286d859a163432781f102452f7676ed057359ce3b1b2a30716034b3dfc6fa7e9e627997339bdc2b1b - languageName: node - linkType: hard - -"@aws-sdk/util-config-provider@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/util-config-provider@npm:3.40.0" +"@aws-sdk/util-config-provider@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/util-config-provider@npm:3.186.0" dependencies: - tslib: ^2.3.0 - checksum: 65f2da4f01f036fa3ee34f421945be2ec6dc4b273808b130b8fe317e5b0f63caed26877be135960769b7c14c1da9d36c2b1f17cb11f4f145e0915acb8bff2af1 + tslib: ^2.3.1 + checksum: 3f8f2844c43872d5bcb61f2595408881bad4a7ce55f7b95715da4cb5f047440d6f767dc0a47e27ce7c995545cb6f8c6e6c6404b48442425b8c661e8fdba60f80 languageName: node linkType: hard -"@aws-sdk/util-create-request@npm:3.6.1": - version: 3.6.1 - resolution: "@aws-sdk/util-create-request@npm:3.6.1" +"@aws-sdk/util-defaults-mode-browser@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/util-defaults-mode-browser@npm:3.186.0" dependencies: - "@aws-sdk/middleware-stack": 3.6.1 - "@aws-sdk/smithy-client": 3.6.1 - "@aws-sdk/types": 3.6.1 - tslib: ^1.8.0 - checksum: a6a1864f357327cb54ed1e0dbed8e604c6d0385f3f6527884f4fe5ce55659bb3e6f3d33a6f33222c36b142acc8bdac49ce76e360282827863849688a76fd620b + "@aws-sdk/property-provider": 3.186.0 + "@aws-sdk/types": 3.186.0 + bowser: ^2.11.0 + tslib: ^2.3.1 + checksum: 7437e14aec6ecb56949259a63616c598fb7b3dac392a909c46e21b007962f59c01155845ff770ec96ca4608be22b3da4cd1e7785e64c27adc2f94b683bb69547 languageName: node linkType: hard -"@aws-sdk/util-credentials@npm:3.37.0": - version: 3.37.0 - resolution: "@aws-sdk/util-credentials@npm:3.37.0" +"@aws-sdk/util-defaults-mode-node@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/util-defaults-mode-node@npm:3.186.0" dependencies: - "@aws-sdk/shared-ini-file-loader": 3.37.0 - tslib: ^2.3.0 - checksum: 6a1e55ee7201f2aef7ad43348fb2deee2f14432526af887aa776998e4d14d9e7af6e68247ba70584617c3278a512c23e73e848916c1b9c02f7724bb427df1223 + "@aws-sdk/config-resolver": 3.186.0 + "@aws-sdk/credential-provider-imds": 3.186.0 + "@aws-sdk/node-config-provider": 3.186.0 + "@aws-sdk/property-provider": 3.186.0 + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 + checksum: ebdcc3f918bf8291a00c2a72ce92f7672082c528f72cc4dedc4ec88ea41d50b7bff5e80bb06b4a2929a1cf2dcfab9a6b9edfe912f000250286610785d449f01a languageName: node linkType: hard -"@aws-sdk/util-defaults-mode-browser@npm:3.316.0": - version: 3.316.0 - resolution: "@aws-sdk/util-defaults-mode-browser@npm:3.316.0" +"@aws-sdk/util-endpoints@npm:3.614.0": + version: 3.614.0 + resolution: "@aws-sdk/util-endpoints@npm:3.614.0" dependencies: - "@aws-sdk/property-provider": 3.310.0 - "@aws-sdk/types": 3.310.0 - bowser: ^2.11.0 - tslib: ^2.5.0 - checksum: 5557c5d420e9b6f5f49aed282c76f0723ff35a5103457be169f848a5a5e259fd065402fe91916c2d97297abbc6979078f2820d3cd749790ad7f28fe4518cbe68 + "@aws-sdk/types": 3.609.0 + "@smithy/types": ^3.3.0 + "@smithy/util-endpoints": ^2.0.5 + tslib: ^2.6.2 + checksum: 95a893dc3cff00d2ad5b48c4ffd83e19e45da75de7dd112b93b09f9e2a8db200e3a9ea7116b0fa943b945fb100f678795cbca1fb7be07bddcaac2549f6533332 languageName: node linkType: hard -"@aws-sdk/util-defaults-mode-node@npm:3.316.0": - version: 3.316.0 - resolution: "@aws-sdk/util-defaults-mode-node@npm:3.316.0" +"@aws-sdk/util-format-url@npm:3.609.0": + version: 3.609.0 + resolution: "@aws-sdk/util-format-url@npm:3.609.0" dependencies: - "@aws-sdk/config-resolver": 3.310.0 - "@aws-sdk/credential-provider-imds": 3.310.0 - "@aws-sdk/node-config-provider": 3.310.0 - "@aws-sdk/property-provider": 3.310.0 - "@aws-sdk/types": 3.310.0 - tslib: ^2.5.0 - checksum: 3c61d4b58346242d21781b2826a0420ad230a91763f3d17c4fe244e520ba99e16cb87bf788784a0f1b6f84af51ac7ad2f193e10bb4aaf25a87ca62a471c88ba0 + "@aws-sdk/types": 3.609.0 + "@smithy/querystring-builder": ^3.0.3 + "@smithy/types": ^3.3.0 + tslib: ^2.6.2 + checksum: 983c72e2394fbdf47ca82c81d9a3892a82289b660998f26675d64709c19db1ccf88e951dd9a12e4867c618f51ba142f62f9613978ed5472837bfc69f6243534b languageName: node linkType: hard -"@aws-sdk/util-endpoints@npm:3.319.0": - version: 3.319.0 - resolution: "@aws-sdk/util-endpoints@npm:3.319.0" +"@aws-sdk/util-hex-encoding@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/util-hex-encoding@npm:3.186.0" dependencies: - "@aws-sdk/types": 3.310.0 - tslib: ^2.5.0 - checksum: 797c5f5de6415b3458a538e3b2ee8d268fb65252f804ec0ce0074aed21a1b07e246616349f65574e28f66e7bd566cde3f0f72456a93fc3a058088063b78799a5 + tslib: ^2.3.1 + checksum: 6ec4fa6e668dede3eba477cc1367b9033f4b7c57c766069d40205925b11e8859cbf49063c84e34f95f6d8f97ca002dc112c3501c557cd6aa33e17425d46b9a91 languageName: node linkType: hard -"@aws-sdk/util-format-url@npm:3.6.1": +"@aws-sdk/util-hex-encoding@npm:3.6.1": version: 3.6.1 - resolution: "@aws-sdk/util-format-url@npm:3.6.1" + resolution: "@aws-sdk/util-hex-encoding@npm:3.6.1" dependencies: - "@aws-sdk/querystring-builder": 3.6.1 - "@aws-sdk/types": 3.6.1 tslib: ^1.8.0 - checksum: 0909240999ac160a5bc1ca38f9e5937d27fdb31947addf07e2daf5c2d77c6541f62201b46ec3794485b7bbc8e6b1a70a9b7590c81093053d453753f5625bbab1 + checksum: 275629d93235c507a657bc19da83d392dd5ffef28db36ab7b1508920693040a47b9f58012e6cc4778ad86c0bb5166d0f3e943bbdb38b1491d8f8d190b73673da languageName: node linkType: hard -"@aws-sdk/util-hex-encoding@npm:3.310.0, @aws-sdk/util-hex-encoding@npm:^3.29.0": +"@aws-sdk/util-hex-encoding@npm:^3.29.0": version: 3.310.0 resolution: "@aws-sdk/util-hex-encoding@npm:3.310.0" dependencies: @@ -4853,24 +4950,6 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/util-hex-encoding@npm:3.37.0": - version: 3.37.0 - resolution: "@aws-sdk/util-hex-encoding@npm:3.37.0" - dependencies: - tslib: ^2.3.0 - checksum: 739ce869da7f3a6bf0cec72f7c1cf65501d7f1fd07811a56d4a65a1f69a2f360229c10f0356d8e779157e007f458119d1e179dfe1a0ac1101803d3a0da946443 - languageName: node - linkType: hard - -"@aws-sdk/util-hex-encoding@npm:3.6.1": - version: 3.6.1 - resolution: "@aws-sdk/util-hex-encoding@npm:3.6.1" - dependencies: - tslib: ^1.8.0 - checksum: 275629d93235c507a657bc19da83d392dd5ffef28db36ab7b1508920693040a47b9f58012e6cc4778ad86c0bb5166d0f3e943bbdb38b1491d8f8d190b73673da - languageName: node - linkType: hard - "@aws-sdk/util-locate-window@npm:^3.0.0": version: 3.37.0 resolution: "@aws-sdk/util-locate-window@npm:3.37.0" @@ -4880,40 +4959,21 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/util-middleware@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/util-middleware@npm:3.310.0" - dependencies: - tslib: ^2.5.0 - checksum: 5487c5a9722d845ff9a87b812b97cec8fda2a0a3e544807487df4152fe289e55c9eb421923fc7b42f7049e55b9cce7493d3990db7ec5ed20ed50b5df4362076a - languageName: node - linkType: hard - -"@aws-sdk/util-retry@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/util-retry@npm:3.310.0" - dependencies: - "@aws-sdk/service-error-classification": 3.310.0 - tslib: ^2.5.0 - checksum: d8b1ece9a05d15d484401acf89b7835791dba70c18fa36284ce1877ed575ecd9e2bb24c1ff2f7d0ced8a2f804d075ab4b2f29bb2a5e6ad71401f67afc156db0f - languageName: node - linkType: hard - -"@aws-sdk/util-uri-escape@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/util-uri-escape@npm:3.310.0" +"@aws-sdk/util-middleware@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/util-middleware@npm:3.186.0" dependencies: - tslib: ^2.5.0 - checksum: ce2eb2dcd0dc86629cfa5f36dd908e3a20915667d0abde4ceef602cc55238ed95d5fa02f19b4f7bf316c371860e957cd5ce67c0c6c16903a465cd52558ae69dd + tslib: ^2.3.1 + checksum: fedeadb578e31df36959d94fae8c9606c56fbaebedd4c46e502580f64b970cf83cb94a3ae917d4bb99eed187af510f8cd83b99318e26fbccc523ec9edc8dc40b languageName: node linkType: hard -"@aws-sdk/util-uri-escape@npm:3.37.0": - version: 3.37.0 - resolution: "@aws-sdk/util-uri-escape@npm:3.37.0" +"@aws-sdk/util-uri-escape@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/util-uri-escape@npm:3.186.0" dependencies: - tslib: ^2.3.0 - checksum: 3f9ad6f3fef3f327ec7edff1abb8f73b837fe253150006496378d577d9290a3caf4c6c25970931057b46b03a35aeb9af00d5aab8b7d7cf267cc67f5398e0e861 + tslib: ^2.3.1 + checksum: e14b10360cc33e625a99aadef63f17895f4aac31fff556b5f7ffffc58e3038f96880b1006481c6c65cc0901e0842697cb1caeaf8e6b55f27acf16eac652f3b37 languageName: node linkType: hard @@ -4926,25 +4986,14 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/util-user-agent-browser@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/util-user-agent-browser@npm:3.310.0" - dependencies: - "@aws-sdk/types": 3.310.0 - bowser: ^2.11.0 - tslib: ^2.5.0 - checksum: 8ec37d7b242734fd481cea58cd7696b95fdd71bc080147b1acbe3c0658dfaf057432f9f178498e469515e1d0b0c84fd082a6b4d15194cb09b2def7a18a9ec1b5 - languageName: node - linkType: hard - -"@aws-sdk/util-user-agent-browser@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/util-user-agent-browser@npm:3.40.0" +"@aws-sdk/util-user-agent-browser@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/util-user-agent-browser@npm:3.186.0" dependencies: - "@aws-sdk/types": 3.40.0 + "@aws-sdk/types": 3.186.0 bowser: ^2.11.0 - tslib: ^2.3.0 - checksum: e49539dfaa694fb7e44edd2539bb9fd6fd21ba8e1f58e6181faaadb3cf01f196e3b2ceef984594ddcf54a806a17f7ad8b842d17ef60516f069967eafd8a6d941 + tslib: ^2.3.1 + checksum: e79ced323c574a11693a402f35806b4cc91604e92b05843376897126f49c5c21f31128ab09eedf10b06045b6f11ff48fef0156a032593846dea0238dbc8ddf3c languageName: node linkType: hard @@ -4959,30 +5008,31 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/util-user-agent-node@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/util-user-agent-node@npm:3.310.0" +"@aws-sdk/util-user-agent-browser@npm:3.609.0": + version: 3.609.0 + resolution: "@aws-sdk/util-user-agent-browser@npm:3.609.0" dependencies: - "@aws-sdk/node-config-provider": 3.310.0 - "@aws-sdk/types": 3.310.0 - tslib: ^2.5.0 + "@aws-sdk/types": 3.609.0 + "@smithy/types": ^3.3.0 + bowser: ^2.11.0 + tslib: ^2.6.2 + checksum: ca2f2863d753521fd63e0c924ed6f9602cc9f5bb65f7d0111be140d037962cf6897f49929dde21e4d8e613895486d9053abd8965d34a9a6ecc4a81de401f0f16 + languageName: node + linkType: hard + +"@aws-sdk/util-user-agent-node@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/util-user-agent-node@npm:3.186.0" + dependencies: + "@aws-sdk/node-config-provider": 3.186.0 + "@aws-sdk/types": 3.186.0 + tslib: ^2.3.1 peerDependencies: aws-crt: ">=1.0.0" peerDependenciesMeta: aws-crt: optional: true - checksum: 90e791398d666581ca81b735157a96dac1dd39046c0b880bcdb01ab644cd41be627be7ea3130103fe76b678cfaa1e1114c7055f897deb6bb9b40b4f88840b127 - languageName: node - linkType: hard - -"@aws-sdk/util-user-agent-node@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/util-user-agent-node@npm:3.40.0" - dependencies: - "@aws-sdk/node-config-provider": 3.40.0 - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: aa681672fb96b765dd16920656fc5257199b85d11e8e8705399299eba54febb0302d918714a3753797e9686b9423ce8f85a413486edb374ea3c2f5aef7682b60 + checksum: 0f0e3299be79892ac67c553808f4b7e11d53108f4829b875bcbdf7ac09181e8e512fdc7056c8f68ed4540891afcdb218d861fa62fd7c29e72fb7055d452df55b languageName: node linkType: hard @@ -4997,40 +5047,48 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/util-utf8-browser@npm:3.37.0, @aws-sdk/util-utf8-browser@npm:^3.0.0": - version: 3.37.0 - resolution: "@aws-sdk/util-utf8-browser@npm:3.37.0" +"@aws-sdk/util-user-agent-node@npm:3.614.0": + version: 3.614.0 + resolution: "@aws-sdk/util-user-agent-node@npm:3.614.0" dependencies: - tslib: ^2.3.0 - checksum: 16e740f35be5816dff45e05171052e7566dae0454e9ba388ead39c7abf6750c7b468ed9e3a90cb6fbca07292b5f15fdf52c97d9eac20ba86664f3221e23db57b + "@aws-sdk/types": 3.609.0 + "@smithy/node-config-provider": ^3.1.4 + "@smithy/types": ^3.3.0 + tslib: ^2.6.2 + peerDependencies: + aws-crt: ">=1.0.0" + peerDependenciesMeta: + aws-crt: + optional: true + checksum: 1e7b4d572a2915d921db814efbf771603b605aea114399aa357208433746f4b2990c927bdedd8616a6e50c98588032449b8994ce9ffae1cce7976986dc40adc1 languageName: node linkType: hard -"@aws-sdk/util-utf8-browser@npm:3.6.1": - version: 3.6.1 - resolution: "@aws-sdk/util-utf8-browser@npm:3.6.1" +"@aws-sdk/util-utf8-browser@npm:3.186.0, @aws-sdk/util-utf8-browser@npm:^3.0.0": + version: 3.186.0 + resolution: "@aws-sdk/util-utf8-browser@npm:3.186.0" dependencies: - tslib: ^1.8.0 - checksum: bba9c1dc40081d9b55a01c222e1f1253c777f7e414d09dbfc31a8d33f43ab549a33c6838aa3fb73ad707e9386991e33a85911f96720f804c1fe952f0f8801940 + tslib: ^2.3.1 + checksum: 8f18e203133d0dec38d07c954916ab2c3a6861050bd2f14d9f149ef7012c0d9f27a36b02439d610ff51a0dfdea0c84f1e9a51ca3c3ee3516d8d8e48d7e0ea3d4 languageName: node linkType: hard -"@aws-sdk/util-utf8-browser@npm:^1.0.0-alpha.0": - version: 1.0.0-rc.8 - resolution: "@aws-sdk/util-utf8-browser@npm:1.0.0-rc.8" +"@aws-sdk/util-utf8-browser@npm:3.6.1": + version: 3.6.1 + resolution: "@aws-sdk/util-utf8-browser@npm:3.6.1" dependencies: tslib: ^1.8.0 - checksum: 4bb8788d14dd7739fe5a894dbca94521df52817eed1406eed45133ad249b8086b520922f2c38fdfd8d50c9bb850214139ac91fc2811eb57b92690a94e630922a + checksum: bba9c1dc40081d9b55a01c222e1f1253c777f7e414d09dbfc31a8d33f43ab549a33c6838aa3fb73ad707e9386991e33a85911f96720f804c1fe952f0f8801940 languageName: node linkType: hard -"@aws-sdk/util-utf8-node@npm:3.37.0": - version: 3.37.0 - resolution: "@aws-sdk/util-utf8-node@npm:3.37.0" +"@aws-sdk/util-utf8-node@npm:3.186.0": + version: 3.186.0 + resolution: "@aws-sdk/util-utf8-node@npm:3.186.0" dependencies: - "@aws-sdk/util-buffer-from": 3.37.0 - tslib: ^2.3.0 - checksum: 181ec7feb9089220d3ff3e84e3743a55fce87afceeedb8861623ff2e2e81f542f3556bf90d9bcd0f1c91ba3c2010dbc8a72251994498426132c9bc55142fd06c + "@aws-sdk/util-buffer-from": 3.186.0 + tslib: ^2.3.1 + checksum: 5f7a3697a57d1183d992d6693e375e6c2edaf056acd8a66e8d490b115f48a53184970c7f8733038d02596037307b734ef831030edf07aab5388f66b9e471d93f languageName: node linkType: hard @@ -5054,28 +5112,6 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/util-waiter@npm:3.310.0": - version: 3.310.0 - resolution: "@aws-sdk/util-waiter@npm:3.310.0" - dependencies: - "@aws-sdk/abort-controller": 3.310.0 - "@aws-sdk/types": 3.310.0 - tslib: ^2.5.0 - checksum: 15efefd8508ad23362545e12900b976adadf277bb62fc2ea1cb0d8594d996dfb59782094d672cb5339f604159a5a163fdb810db61a2843b10f28426d40dfa930 - languageName: node - linkType: hard - -"@aws-sdk/util-waiter@npm:3.40.0": - version: 3.40.0 - resolution: "@aws-sdk/util-waiter@npm:3.40.0" - dependencies: - "@aws-sdk/abort-controller": 3.40.0 - "@aws-sdk/types": 3.40.0 - tslib: ^2.3.0 - checksum: cece94f95ac30ae00ff8a9a8f8f5e78b9cb1e5f9a2e8a57b5ae16dcdc326917482f148e4be76149b763bce2aaa358246a8df53d6af0e70d639503381a7f9d659 - languageName: node - linkType: hard - "@aws-sdk/util-waiter@npm:3.6.1": version: 3.6.1 resolution: "@aws-sdk/util-waiter@npm:3.6.1" @@ -5087,21 +5123,13 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/xml-builder@npm:3.37.0": - version: 3.37.0 - resolution: "@aws-sdk/xml-builder@npm:3.37.0" - dependencies: - tslib: ^2.3.0 - checksum: 2a48c2efb4b3caa256ec3aa2a4a1f2c93974f9509f9f746b87d56d945a0bb8675dfc582bf289bf5f058b80bb1471193ec62aadd9416d00d668e738ab87b173f3 - languageName: node - linkType: hard - -"@aws-sdk/xml-builder@npm:3.6.1": - version: 3.6.1 - resolution: "@aws-sdk/xml-builder@npm:3.6.1" +"@aws-sdk/xml-builder@npm:3.609.0": + version: 3.609.0 + resolution: "@aws-sdk/xml-builder@npm:3.609.0" dependencies: - tslib: ^1.8.0 - checksum: 35a3ab5e7fb4a143a21e82114f44fe1a7ecad335c0ebedb6f359542d3de5cc14acf10238269ddf5457ae9cb78ba24d526776a22d12c3a36e42f87928e987ca3b + "@smithy/types": ^3.3.0 + tslib: ^2.6.2 + checksum: 1d75f2dc7ff35557a1c437f108656574c737f0a9f9d0c91773cbdadbf3c42892e9305e1e1fd5b0c8b73520a902b1513d1a7d07864b964d6a369540ee23ad0ddb languageName: node linkType: hard @@ -5141,42 +5169,43 @@ __metadata: languageName: node linkType: hard -"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.16.0, @babel/code-frame@npm:^7.18.6, @babel/code-frame@npm:^7.21.4, @babel/code-frame@npm:^7.8.3": - version: 7.21.4 - resolution: "@babel/code-frame@npm:7.21.4" +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.16.0, @babel/code-frame@npm:^7.22.13, @babel/code-frame@npm:^7.8.3": + version: 7.22.13 + resolution: "@babel/code-frame@npm:7.22.13" dependencies: - "@babel/highlight": ^7.18.6 - checksum: c357e4b3b7a56927cb26fcb057166fef3cc701a4e35b2fa8a87402c31be0fd41d0144c61c87bf7d3b2a8f1c4d9ef00592dc0c7e8b9500dae43340a1e9f1096de + "@babel/highlight": ^7.22.13 + chalk: ^2.4.2 + checksum: f4cc8ae1000265677daf4845083b72f88d00d311adb1a93c94eb4b07bf0ed6828a81ae4ac43ee7d476775000b93a28a9cddec18fbdc5796212d8dcccd5de72bd languageName: node linkType: hard -"@babel/compat-data@npm:^7.13.11, @babel/compat-data@npm:^7.16.8, @babel/compat-data@npm:^7.17.0, @babel/compat-data@npm:^7.21.5": - version: 7.21.7 - resolution: "@babel/compat-data@npm:7.21.7" - checksum: cd6bc85364a569cc74bcf0bfdc27161a1cb423c60c624e06f44b53c9e6fe7708bd0af3e389d376aec8ed9b2795907c43d01e4163dbc2a3a3142a2de55464a51d +"@babel/compat-data@npm:^7.13.11, @babel/compat-data@npm:^7.16.8, @babel/compat-data@npm:^7.17.0, @babel/compat-data@npm:^7.22.9": + version: 7.23.2 + resolution: "@babel/compat-data@npm:7.23.2" + checksum: 0397a08c3e491696cc1b12cf0879bf95fc550bfc6ef524d5a9452981aa0e192a958b2246debfb230fa22718fac473cc5a36616f89b1ad6e7e52055732cd374a1 languageName: node linkType: hard -"@babel/core@npm:^7.1.0, @babel/core@npm:^7.10.5, @babel/core@npm:^7.11.1, @babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.14.0, @babel/core@npm:^7.16.0, @babel/core@npm:^7.7.2": - version: 7.21.5 - resolution: "@babel/core@npm:7.21.5" +"@babel/core@npm:^7.1.0, @babel/core@npm:^7.11.1, @babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.14.0, @babel/core@npm:^7.16.0, @babel/core@npm:^7.23.2, @babel/core@npm:^7.7.2": + version: 7.23.2 + resolution: "@babel/core@npm:7.23.2" dependencies: "@ampproject/remapping": ^2.2.0 - "@babel/code-frame": ^7.21.4 - "@babel/generator": ^7.21.5 - "@babel/helper-compilation-targets": ^7.21.5 - "@babel/helper-module-transforms": ^7.21.5 - "@babel/helpers": ^7.21.5 - "@babel/parser": ^7.21.5 - "@babel/template": ^7.20.7 - "@babel/traverse": ^7.21.5 - "@babel/types": ^7.21.5 - convert-source-map: ^1.7.0 + "@babel/code-frame": ^7.22.13 + "@babel/generator": ^7.23.0 + "@babel/helper-compilation-targets": ^7.22.15 + "@babel/helper-module-transforms": ^7.23.0 + "@babel/helpers": ^7.23.2 + "@babel/parser": ^7.23.0 + "@babel/template": ^7.22.15 + "@babel/traverse": ^7.23.2 + "@babel/types": ^7.23.0 + convert-source-map: ^2.0.0 debug: ^4.1.0 gensync: ^1.0.0-beta.2 - json5: ^2.2.2 - semver: ^6.3.0 - checksum: e57e4347b459c89b0bcd141007ce4fb4dbf783d4bab68e59ceee463b2ffd6e8b6960e46bfee957518da2350d08d8f4fbfc7de63233d3a2d3520cc680f2674e6d + json5: ^2.2.3 + semver: ^6.3.1 + checksum: 14ad6e0a3ac0085dc008e7fb0c8513f0a3e39f2ab883a964a89ef1311338d49cf085c94cb6165c07fdec0fdcc6e865ce4811253c479f9f45ac375226dfe3ad3b languageName: node linkType: hard @@ -5218,15 +5247,15 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:^7.14.0, @babel/generator@npm:^7.21.5, @babel/generator@npm:^7.7.2": - version: 7.21.5 - resolution: "@babel/generator@npm:7.21.5" +"@babel/generator@npm:^7.14.0, @babel/generator@npm:^7.23.0, @babel/generator@npm:^7.7.2": + version: 7.23.0 + resolution: "@babel/generator@npm:7.23.0" dependencies: - "@babel/types": ^7.21.5 + "@babel/types": ^7.23.0 "@jridgewell/gen-mapping": ^0.3.2 "@jridgewell/trace-mapping": ^0.3.17 jsesc: ^2.5.1 - checksum: e98b51440cbbcee68e66c66684b5334f5929dba512067a6c3c1aecc77131b308bf61eca74a5ae1fb73028089d22a188ca2219c364596117f27695102afc18e95 + checksum: b7d8727c574119b5ef06e5d5d0d8d939527d51537db4b08273caebb18f3f2b1d4517b874776085e161fd47d28f26b22c08e7f270b64f43b2afd4a60c5936d6cd languageName: node linkType: hard @@ -5249,18 +5278,16 @@ __metadata: languageName: node linkType: hard -"@babel/helper-compilation-targets@npm:^7.13.0, @babel/helper-compilation-targets@npm:^7.16.7, @babel/helper-compilation-targets@npm:^7.21.5": - version: 7.21.5 - resolution: "@babel/helper-compilation-targets@npm:7.21.5" +"@babel/helper-compilation-targets@npm:^7.13.0, @babel/helper-compilation-targets@npm:^7.16.7, @babel/helper-compilation-targets@npm:^7.22.15": + version: 7.22.15 + resolution: "@babel/helper-compilation-targets@npm:7.22.15" dependencies: - "@babel/compat-data": ^7.21.5 - "@babel/helper-validator-option": ^7.21.0 - browserslist: ^4.21.3 + "@babel/compat-data": ^7.22.9 + "@babel/helper-validator-option": ^7.22.15 + browserslist: ^4.21.9 lru-cache: ^5.1.1 - semver: ^6.3.0 - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 36752452eb70d6a6f52f68846344a739089374a97619e5a4857e31e7d067bdad8270efd9dd0dd5dfc483dd2d98bf0c1c6f08e3315fe949e7bfffef67eaf669ad + semver: ^6.3.1 + checksum: 45b9286861296e890f674a3abb199efea14a962a27d9b8adeb44970a9fd5c54e73a9e342e8414d2851cf4f98d5994537352fbce7b05ade32e9849bbd327f9ff1 languageName: node linkType: hard @@ -5313,10 +5340,10 @@ __metadata: languageName: node linkType: hard -"@babel/helper-environment-visitor@npm:^7.16.7, @babel/helper-environment-visitor@npm:^7.21.5": - version: 7.21.5 - resolution: "@babel/helper-environment-visitor@npm:7.21.5" - checksum: d3f965d9691e3e2e11036d23ba9993a42d18f9be3d4589d3bb3d09d02e9d4d204026965633e36fb43b35fde905c2dfe753fb59b72ae0c3841f5a627fb1738d8a +"@babel/helper-environment-visitor@npm:^7.16.7, @babel/helper-environment-visitor@npm:^7.21.5, @babel/helper-environment-visitor@npm:^7.22.20": + version: 7.22.20 + resolution: "@babel/helper-environment-visitor@npm:7.22.20" + checksum: e762c2d8f5d423af89bd7ae9abe35bd4836d2eb401af868a63bbb63220c513c783e25ef001019418560b3fdc6d9a6fb67e6c0b650bcdeb3a2ac44b5c3d2bdd94 languageName: node linkType: hard @@ -5329,22 +5356,22 @@ __metadata: languageName: node linkType: hard -"@babel/helper-function-name@npm:^7.16.7, @babel/helper-function-name@npm:^7.21.0": - version: 7.21.0 - resolution: "@babel/helper-function-name@npm:7.21.0" +"@babel/helper-function-name@npm:^7.16.7, @babel/helper-function-name@npm:^7.21.0, @babel/helper-function-name@npm:^7.23.0": + version: 7.23.0 + resolution: "@babel/helper-function-name@npm:7.23.0" dependencies: - "@babel/template": ^7.20.7 - "@babel/types": ^7.21.0 - checksum: 5b4387afd34cd98a3a7f24f42250a5db6f7192a46e57bdbc151dc311b6299ceac151c5236018469af193dfb887b0b7ef8fe7ed89459cd05f00d69b3710c17498 + "@babel/template": ^7.22.15 + "@babel/types": ^7.23.0 + checksum: d771dd1f3222b120518176733c52b7cadac1c256ff49b1889dbbe5e3fed81db855b8cc4e40d949c9d3eae0e795e8229c1c8c24c0e83f27cfa6ee3766696c6428 languageName: node linkType: hard -"@babel/helper-hoist-variables@npm:^7.16.7, @babel/helper-hoist-variables@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-hoist-variables@npm:7.18.6" +"@babel/helper-hoist-variables@npm:^7.16.7, @babel/helper-hoist-variables@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-hoist-variables@npm:7.22.5" dependencies: - "@babel/types": ^7.18.6 - checksum: 830aa7ca663b0d2a025513ab50a9a10adb2a37d8cf3ba40bb74b8ac14d45fbc3d08c37b1889b10d36558edfbd34ff914909118ae156c2f0915f2057901b90eff + "@babel/types": ^7.22.5 + checksum: 60a3077f756a1cd9f14eb89f0037f487d81ede2b7cfe652ea6869cd4ec4c782b0fb1de01b8494b9a2d2050e3d154d7d5ad3be24806790acfb8cbe2073bf1e208 languageName: node linkType: hard @@ -5357,28 +5384,27 @@ __metadata: languageName: node linkType: hard -"@babel/helper-module-imports@npm:^7.10.4, @babel/helper-module-imports@npm:^7.12.13, @babel/helper-module-imports@npm:^7.16.0, @babel/helper-module-imports@npm:^7.16.7, @babel/helper-module-imports@npm:^7.21.4": - version: 7.21.4 - resolution: "@babel/helper-module-imports@npm:7.21.4" +"@babel/helper-module-imports@npm:^7.10.4, @babel/helper-module-imports@npm:^7.12.13, @babel/helper-module-imports@npm:^7.16.0, @babel/helper-module-imports@npm:^7.16.7, @babel/helper-module-imports@npm:^7.22.15": + version: 7.22.15 + resolution: "@babel/helper-module-imports@npm:7.22.15" dependencies: - "@babel/types": ^7.21.4 - checksum: ce62c86e8e1af9921fa2d7253a540fb5aaab424a79de47a626c4e8855950d6ac14c0d46a9ec117e8e2e256ea1062583533947202988be889a5ff2076c213be18 + "@babel/types": ^7.22.15 + checksum: 4e0d7fc36d02c1b8c8b3006dfbfeedf7a367d3334a04934255de5128115ea0bafdeb3e5736a2559917f0653e4e437400d54542da0468e08d3cbc86d3bbfa8f30 languageName: node linkType: hard -"@babel/helper-module-transforms@npm:^7.10.4, @babel/helper-module-transforms@npm:^7.16.7, @babel/helper-module-transforms@npm:^7.17.7, @babel/helper-module-transforms@npm:^7.21.5": - version: 7.21.5 - resolution: "@babel/helper-module-transforms@npm:7.21.5" +"@babel/helper-module-transforms@npm:^7.10.4, @babel/helper-module-transforms@npm:^7.16.7, @babel/helper-module-transforms@npm:^7.17.7, @babel/helper-module-transforms@npm:^7.23.0": + version: 7.23.0 + resolution: "@babel/helper-module-transforms@npm:7.23.0" dependencies: - "@babel/helper-environment-visitor": ^7.21.5 - "@babel/helper-module-imports": ^7.21.4 - "@babel/helper-simple-access": ^7.21.5 - "@babel/helper-split-export-declaration": ^7.18.6 - "@babel/helper-validator-identifier": ^7.19.1 - "@babel/template": ^7.20.7 - "@babel/traverse": ^7.21.5 - "@babel/types": ^7.21.5 - checksum: a3b6ceaa995bf35e7a072066c3c9ba9ee6983cf36605f0c6a0ffcaab94d6dc13eba21b00434a023bf99d66c080fec335cf464619b97f7af39e1a5269cf0d7169 + "@babel/helper-environment-visitor": ^7.22.20 + "@babel/helper-module-imports": ^7.22.15 + "@babel/helper-simple-access": ^7.22.5 + "@babel/helper-split-export-declaration": ^7.22.6 + "@babel/helper-validator-identifier": ^7.22.20 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 15a52e401bd17fe44ba9be51cca693a3e182dc93264dc28ede732081c43211741df81ce8eb15e82e81c8ad51beb8893301ecc31d5c77add0f7be78dff6815318 languageName: node linkType: hard @@ -5391,10 +5417,10 @@ __metadata: languageName: node linkType: hard -"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.13.0, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.16.5, @babel/helper-plugin-utils@npm:^7.16.7, @babel/helper-plugin-utils@npm:^7.19.0, @babel/helper-plugin-utils@npm:^7.20.2, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": - version: 7.21.5 - resolution: "@babel/helper-plugin-utils@npm:7.21.5" - checksum: 3d97ba406b32bd9ed0022d6ede2e07e98c130f4cbfffa044b3c5713d94e9b5f557242651713e2c79569cc13d6c67ef9fa749e87cb3da60a506a79bdc2a0c3d43 +"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.13.0, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.16.5, @babel/helper-plugin-utils@npm:^7.16.7, @babel/helper-plugin-utils@npm:^7.19.0, @babel/helper-plugin-utils@npm:^7.20.2, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": + version: 7.22.5 + resolution: "@babel/helper-plugin-utils@npm:7.22.5" + checksum: d2c4bfe2fa91058bcdee4f4e57a3f4933aed7af843acfd169cd6179fab8d13c1d636474ecabb2af107dc77462c7e893199aa26632bac1c6d7e025a17cbb9d20d languageName: node linkType: hard @@ -5423,12 +5449,12 @@ __metadata: languageName: node linkType: hard -"@babel/helper-simple-access@npm:^7.10.4, @babel/helper-simple-access@npm:^7.17.7, @babel/helper-simple-access@npm:^7.21.5": - version: 7.21.5 - resolution: "@babel/helper-simple-access@npm:7.21.5" +"@babel/helper-simple-access@npm:^7.10.4, @babel/helper-simple-access@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-simple-access@npm:7.22.5" dependencies: - "@babel/types": ^7.21.5 - checksum: 682cd80b47c2424c31afe70bcc8ad3e401c612f6923c432e4b8245c5b6bc5ccddf3e405ea41ba890ccab79c0b5b95da3db125944ac0decc8d31d48469e593a0e + "@babel/types": ^7.22.5 + checksum: f0cf81a30ba3d09a625fd50e5a9069e575c5b6719234e04ee74247057f8104beca89ed03e9217b6e9b0493434cedc18c5ecca4cea6244990836f1f893e140369 languageName: node linkType: hard @@ -5441,33 +5467,33 @@ __metadata: languageName: node linkType: hard -"@babel/helper-split-export-declaration@npm:^7.16.7, @babel/helper-split-export-declaration@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-split-export-declaration@npm:7.18.6" +"@babel/helper-split-export-declaration@npm:^7.16.7, @babel/helper-split-export-declaration@npm:^7.18.6, @babel/helper-split-export-declaration@npm:^7.22.6": + version: 7.22.6 + resolution: "@babel/helper-split-export-declaration@npm:7.22.6" dependencies: - "@babel/types": ^7.18.6 - checksum: 1335b510a9aefcbf60d89648e622715774e56040d72302dc5e176c8d837c9ab81414ccfa9ed771a9f98da7192579bb12ab7a95948bfdc69b03b4a882b3983e48 + "@babel/types": ^7.22.5 + checksum: d83e4b623eaa9622c267d3c83583b72f3aac567dc393dda18e559d79187961cb29ae9c57b2664137fc3d19508370b12ec6a81d28af73a50e0846819cb21c6e44 languageName: node linkType: hard -"@babel/helper-string-parser@npm:^7.18.10, @babel/helper-string-parser@npm:^7.21.5": - version: 7.21.5 - resolution: "@babel/helper-string-parser@npm:7.21.5" - checksum: 4d0834c4a67c283e9277f5e565551fede00b7d68007e368c95c776e13d05002e8f9861716e11613880889d6f3463329d2af687ceea5fc5263f8b3d25a53d31da +"@babel/helper-string-parser@npm:^7.18.10, @babel/helper-string-parser@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-string-parser@npm:7.22.5" + checksum: 6b0ff8af724377ec41e5587fffa7605198da74cb8e7d8d48a36826df0c0ba210eb9fedb3d9bef4d541156e0bd11040f021945a6cbb731ccec4aefb4affa17aa4 languageName: node linkType: hard -"@babel/helper-validator-identifier@npm:^7.16.7, @babel/helper-validator-identifier@npm:^7.18.6, @babel/helper-validator-identifier@npm:^7.19.1": - version: 7.19.1 - resolution: "@babel/helper-validator-identifier@npm:7.19.1" - checksum: f978ecfea840f65b64ab9e17fac380625a45f4fe1361eeb29867fcfd1c9eaa72abd7023f2f40ac3168587d7e5153660d16cfccb352a557be2efd347a051b4b20 +"@babel/helper-validator-identifier@npm:^7.16.7, @babel/helper-validator-identifier@npm:^7.18.6, @babel/helper-validator-identifier@npm:^7.22.20": + version: 7.22.20 + resolution: "@babel/helper-validator-identifier@npm:7.22.20" + checksum: dcad63db345fb110e032de46c3688384b0008a42a4845180ce7cd62b1a9c0507a1bed727c4d1060ed1a03ae57b4d918570259f81724aaac1a5b776056f37504e languageName: node linkType: hard -"@babel/helper-validator-option@npm:^7.14.5, @babel/helper-validator-option@npm:^7.16.7, @babel/helper-validator-option@npm:^7.21.0": - version: 7.21.0 - resolution: "@babel/helper-validator-option@npm:7.21.0" - checksum: a5efbf3f09f1514d1704f3f7bf0e5fac401fff48a9b84a9eb47a52a4c13beee9802c6cf212a82c5fb95f6cc6b5932cb32e756cf33075be17352f64827a8ec066 +"@babel/helper-validator-option@npm:^7.14.5, @babel/helper-validator-option@npm:^7.16.7, @babel/helper-validator-option@npm:^7.22.15": + version: 7.22.15 + resolution: "@babel/helper-validator-option@npm:7.22.15" + checksum: e9661bf80ba18e2dd978217b350fb07298e57ac417f4f1ab9fa011505e20e4857f2c3b4b538473516a9dc03af5ce3a831e5ed973311c28326f4c330b6be981c2 languageName: node linkType: hard @@ -5483,25 +5509,25 @@ __metadata: languageName: node linkType: hard -"@babel/helpers@npm:^7.21.5": - version: 7.21.5 - resolution: "@babel/helpers@npm:7.21.5" +"@babel/helpers@npm:^7.23.2": + version: 7.23.2 + resolution: "@babel/helpers@npm:7.23.2" dependencies: - "@babel/template": ^7.20.7 - "@babel/traverse": ^7.21.5 - "@babel/types": ^7.21.5 - checksum: 5e58854afa1d0896185dcb12a1b6feacefb7d913d52bafa84792274651af2d3172923bdc26d1320fd6b04a2e208dc0d6730951043f17d10c08ca87231e5b84ec + "@babel/template": ^7.22.15 + "@babel/traverse": ^7.23.2 + "@babel/types": ^7.23.0 + checksum: 3a6a939c5277a27486e7c626812f0643b35d1c053ac2eb66911f5ae6c0a4e4bcdd40750eba36b766b0ee8a753484287f50ae56232a5f8f2947116723e44b9e35 languageName: node linkType: hard -"@babel/highlight@npm:^7.10.4, @babel/highlight@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/highlight@npm:7.18.6" +"@babel/highlight@npm:^7.10.4, @babel/highlight@npm:^7.22.13": + version: 7.22.20 + resolution: "@babel/highlight@npm:7.22.20" dependencies: - "@babel/helper-validator-identifier": ^7.18.6 - chalk: ^2.0.0 + "@babel/helper-validator-identifier": ^7.22.20 + chalk: ^2.4.2 js-tokens: ^4.0.0 - checksum: a6a6928d25099ef04c337fcbb829fab8059bb67d31ac37212efd611bdbe247d0e71a5096c4524272cb56399f40251fac57c025e42d3bc924db0183a6435a60ac + checksum: f3c3a193afad23434297d88e81d1d6c0c2cf02423de2139ada7ce0a7fc62d8559abf4cc996533c1a9beca7fc990010eb8d544097f75e818ac113bf39ed810aa2 languageName: node linkType: hard @@ -5514,12 +5540,12 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.21.5, @babel/parser@npm:^7.7.0": - version: 7.21.5 - resolution: "@babel/parser@npm:7.21.5" +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.22.15, @babel/parser@npm:^7.23.0, @babel/parser@npm:^7.7.0": + version: 7.23.0 + resolution: "@babel/parser@npm:7.23.0" bin: parser: ./bin/babel-parser.js - checksum: f0604aacc72129028f54e08def563cf0cac63dae6f7c1dd8c1318b36bd10c4e85c055307178eee133a5566b3e1d0d78bef392c56225108a36ed51b40a90b85b8 + checksum: ab4ea9360ed4ba3c728c5a9bf33035103ebde20a7e943c4ae1d42becb02a313d731d12a93c795c5a19777031e4022e64b92a52262eda902522a1a18649826283 languageName: node linkType: hard @@ -6175,16 +6201,15 @@ __metadata: linkType: hard "@babel/plugin-transform-modules-commonjs@npm:^7.0.0, @babel/plugin-transform-modules-commonjs@npm:^7.16.8": - version: 7.17.9 - resolution: "@babel/plugin-transform-modules-commonjs@npm:7.17.9" + version: 7.23.0 + resolution: "@babel/plugin-transform-modules-commonjs@npm:7.23.0" dependencies: - "@babel/helper-module-transforms": ^7.17.7 - "@babel/helper-plugin-utils": ^7.16.7 - "@babel/helper-simple-access": ^7.17.7 - babel-plugin-dynamic-import-node: ^2.3.3 + "@babel/helper-module-transforms": ^7.23.0 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-simple-access": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: b68987281e8ff52afaa8a81ebf47a4837779ad26f54c2d403d5953d571aa38674e88b0424bbf6a670fafe0fc58104f05212f1027c6375d4840feaf7b0f430205 + checksum: 1f015764c2e63445d46660e7a2eb9002c20def04daf98fa93c9dadb5bd55adbefefd1ccdc11bcafa5e2f04275939d2414482703bc35bc60d6ca2bf1f67b720e3 languageName: node linkType: hard @@ -6621,32 +6646,32 @@ __metadata: languageName: node linkType: hard -"@babel/template@npm:^7.16.7, @babel/template@npm:^7.20.7, @babel/template@npm:^7.3.3": - version: 7.20.7 - resolution: "@babel/template@npm:7.20.7" +"@babel/template@npm:^7.16.7, @babel/template@npm:^7.20.7, @babel/template@npm:^7.22.15, @babel/template@npm:^7.3.3": + version: 7.22.15 + resolution: "@babel/template@npm:7.22.15" dependencies: - "@babel/code-frame": ^7.18.6 - "@babel/parser": ^7.20.7 - "@babel/types": ^7.20.7 - checksum: 1c6dcf9ac92769e6ab5e3d9048975537d26ab00b869646462ab4583d45e419c01db5144715ec0d70548835a3098c5d5416148c4a0b996a95e8e0b9dc8d042dd3 + "@babel/code-frame": ^7.22.13 + "@babel/parser": ^7.22.15 + "@babel/types": ^7.22.15 + checksum: 9312edd37cf1311d738907003f2aa321a88a42ba223c69209abe4d7111db019d321805504f606c7fd75f21c6cf9d24d0a8223104cd21ebd207e241b6c551f454 languageName: node linkType: hard -"@babel/traverse@npm:^7.13.0, @babel/traverse@npm:^7.14.0, @babel/traverse@npm:^7.16.8, @babel/traverse@npm:^7.21.5, @babel/traverse@npm:^7.7.0, @babel/traverse@npm:^7.7.2": - version: 7.21.5 - resolution: "@babel/traverse@npm:7.21.5" +"@babel/traverse@npm:^7.13.0, @babel/traverse@npm:^7.14.0, @babel/traverse@npm:^7.16.8, @babel/traverse@npm:^7.21.5, @babel/traverse@npm:^7.23.2, @babel/traverse@npm:^7.7.0, @babel/traverse@npm:^7.7.2": + version: 7.23.2 + resolution: "@babel/traverse@npm:7.23.2" dependencies: - "@babel/code-frame": ^7.21.4 - "@babel/generator": ^7.21.5 - "@babel/helper-environment-visitor": ^7.21.5 - "@babel/helper-function-name": ^7.21.0 - "@babel/helper-hoist-variables": ^7.18.6 - "@babel/helper-split-export-declaration": ^7.18.6 - "@babel/parser": ^7.21.5 - "@babel/types": ^7.21.5 + "@babel/code-frame": ^7.22.13 + "@babel/generator": ^7.23.0 + "@babel/helper-environment-visitor": ^7.22.20 + "@babel/helper-function-name": ^7.23.0 + "@babel/helper-hoist-variables": ^7.22.5 + "@babel/helper-split-export-declaration": ^7.22.6 + "@babel/parser": ^7.23.0 + "@babel/types": ^7.23.0 debug: ^4.1.0 globals: ^11.1.0 - checksum: 1b126b71b98aaff01ec1f0f0389d08beb6eda3d0b71878af4c6cf386686933a076d969240f270c6a01910d8036a1fb9013d53bd5c136b9b24025204a4dc48d03 + checksum: d096c7c4bab9262a2f658298a3c630ae4a15a10755bb257ae91d5ab3e3b2877438934859c8d34018b7727379fe6b26c4fa2efc81cf4c462a7fe00caf79fa02ff languageName: node linkType: hard @@ -6672,14 +6697,14 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.12.6, @babel/types@npm:^7.16.7, @babel/types@npm:^7.16.8, @babel/types@npm:^7.18.2, @babel/types@npm:^7.18.6, @babel/types@npm:^7.20.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.21.0, @babel/types@npm:^7.21.4, @babel/types@npm:^7.21.5, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.7.0, @babel/types@npm:^7.8.3": - version: 7.21.5 - resolution: "@babel/types@npm:7.21.5" +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.12.6, @babel/types@npm:^7.16.7, @babel/types@npm:^7.16.8, @babel/types@npm:^7.18.2, @babel/types@npm:^7.18.6, @babel/types@npm:^7.20.0, @babel/types@npm:^7.21.5, @babel/types@npm:^7.22.15, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.7.0, @babel/types@npm:^7.8.3": + version: 7.23.0 + resolution: "@babel/types@npm:7.23.0" dependencies: - "@babel/helper-string-parser": ^7.21.5 - "@babel/helper-validator-identifier": ^7.19.1 + "@babel/helper-string-parser": ^7.22.5 + "@babel/helper-validator-identifier": ^7.22.20 to-fast-properties: ^2.0.0 - checksum: 23c943aa2c0d11b798e9298b55b1993da8b386504aac2f781a49b4bbf2cf2ad5e1003409241578574e421c999ff7a3aab2cf30ad3581d33eb9053d82b9e20408 + checksum: 70e4db41acb6793d0eb8d81a2fa88f19ee661219b84bd5f703dbdb54eb3a4d3c0dfc55e69034c945b479df9f43fd4b1376480aaccfc19797ce5af1c5d2576b36 languageName: node linkType: hard @@ -6697,88 +6722,9 @@ __metadata: languageName: node linkType: hard -"@codemirror/highlight@npm:^0.19.0": - version: 0.19.6 - resolution: "@codemirror/highlight@npm:0.19.6" - dependencies: - "@codemirror/language": ^0.19.0 - "@codemirror/rangeset": ^0.19.0 - "@codemirror/state": ^0.19.0 - "@codemirror/view": ^0.19.0 - "@lezer/common": ^0.15.0 - style-mod: ^4.0.0 - checksum: 392344fec08df82d91aa1451d96673b32cbf6b1b22be8ad3faab059fbedad6994dd339b087610557d5aaa4f990be1289d81ce52e475a645766b293811ec82f1c - languageName: node - linkType: hard - -"@codemirror/language@npm:^0.19.0": - version: 0.19.7 - resolution: "@codemirror/language@npm:0.19.7" - dependencies: - "@codemirror/state": ^0.19.0 - "@codemirror/text": ^0.19.0 - "@codemirror/view": ^0.19.0 - "@lezer/common": ^0.15.5 - "@lezer/lr": ^0.15.0 - checksum: 6a1e14a03d310a3296a315d7be01177b96f61e0158bd6ee35b22c61b0715dcae83e0e71536e1b3f86dd879e75ebc10e01028261346e18bb355239db95025adc7 - languageName: node - linkType: hard - -"@codemirror/rangeset@npm:^0.19.0, @codemirror/rangeset@npm:^0.19.4": - version: 0.19.4 - resolution: "@codemirror/rangeset@npm:0.19.4" - dependencies: - "@codemirror/state": ^0.19.0 - checksum: 28611c4011488e388837c3358b799cfad58020f81d5220270345c576707925e36160b7ff137d5878a5a73314d3cd962242ec5c465b1abdaff0a924be01f5e0c4 - languageName: node - linkType: hard - -"@codemirror/state@npm:^0.19.0, @codemirror/state@npm:^0.19.3": - version: 0.19.6 - resolution: "@codemirror/state@npm:0.19.6" - dependencies: - "@codemirror/text": ^0.19.0 - checksum: 27c6a6645e5629bb522bee1cda0e9666fd272e1bece5c6dde4eb2bcb747e14e9160f71c902ebecca1b61c63b1c07f5e1a71be2d89e0bd6f6f8a4a493f69b565a - languageName: node - linkType: hard - -"@codemirror/stream-parser@npm:^0.19.2": - version: 0.19.3 - resolution: "@codemirror/stream-parser@npm:0.19.3" - dependencies: - "@codemirror/highlight": ^0.19.0 - "@codemirror/language": ^0.19.0 - "@codemirror/state": ^0.19.0 - "@codemirror/text": ^0.19.0 - "@lezer/common": ^0.15.0 - "@lezer/lr": ^0.15.0 - checksum: f839c516d9dc265cf08b7f91043fa520c51a1f3995ad8f775a9f30d6090c56cc189c908c402bf0b7f8b95581eedf14ea179749a64ab20890af08f3b898ba7f78 - languageName: node - linkType: hard - -"@codemirror/text@npm:^0.19.0": - version: 0.19.5 - resolution: "@codemirror/text@npm:0.19.5" - checksum: 461ebedda8b20076121295b54b55d60867eebfc76dfce9838b00278c77c093f5e189f36d4bc8731121c43af53bae3471865e5cb3a6a21acfbff1c0a7088f6c7e - languageName: node - linkType: hard - -"@codemirror/view@npm:^0.19.0": - version: 0.19.33 - resolution: "@codemirror/view@npm:0.19.33" - dependencies: - "@codemirror/rangeset": ^0.19.4 - "@codemirror/state": ^0.19.3 - "@codemirror/text": ^0.19.0 - style-mod: ^4.0.0 - w3c-keyname: ^2.2.4 - checksum: abdced429d453e40c66da71ccd9c02868f0cf3a3f4f27724f25dbc2fc1ef0d675fcc02c9f30e23bd98ec0c5d0e32fe5054ced2be1d91f695039f8315bf00661f - languageName: node - linkType: hard - -"@commitlint/cli@npm:^17.6.1": - version: 17.6.1 - resolution: "@commitlint/cli@npm:17.6.1" +"@commitlint/cli@npm:^17.6.1": + version: 17.6.1 + resolution: "@commitlint/cli@npm:17.6.1" dependencies: "@commitlint/format": ^17.4.4 "@commitlint/lint": ^17.6.1 @@ -7138,20 +7084,6 @@ __metadata: languageName: node linkType: hard -"@endemolshinegroup/cosmiconfig-typescript-loader@npm:3.0.2": - version: 3.0.2 - resolution: "@endemolshinegroup/cosmiconfig-typescript-loader@npm:3.0.2" - dependencies: - lodash.get: ^4 - make-error: ^1 - ts-node: ^9 - tslib: ^2 - peerDependencies: - cosmiconfig: ">=6" - checksum: 3f0411ac0395baf1e08b3ba4c5b42b13810469260598655da7e45bf6579554a5167fed176b297a93c0889d97d028a24c68333510c4103993b08de7a0c6bc9482 - languageName: node - linkType: hard - "@eslint/eslintrc@npm:^0.4.3": version: 0.4.3 resolution: "@eslint/eslintrc@npm:0.4.3" @@ -7218,30 +7150,30 @@ __metadata: languageName: node linkType: hard -"@graphiql/toolkit@npm:^0.4.2": - version: 0.4.2 - resolution: "@graphiql/toolkit@npm:0.4.2" +"@graphiql/toolkit@npm:^0.4.5": + version: 0.4.5 + resolution: "@graphiql/toolkit@npm:0.4.5" dependencies: "@n1ru4l/push-pull-async-iterable-iterator": ^3.1.0 meros: ^1.1.4 peerDependencies: graphql: ^15.5.0 || ^16.0.0 graphql-ws: ">= 4.5.0" - checksum: 3b900d46b17cfaa84ad7a20733c4d0ba976a99ab5e8a8c99d2b91ec893552eb14d699cdbc3db09aa01a6651ca613178394a5aa9ba7c1bf152b8f5616750ac57f + checksum: ac6cf8f237ce3ca49b00907d7ac6c67f77fad734a0455bdaa9a2ce2b9ada7f59ad3942e6fecd90354bf3a4fd28eb618c97e78b5a08b71c49f3fae28803622563 languageName: node linkType: hard -"@graphql-codegen/core@npm:2.6.6": - version: 2.6.6 - resolution: "@graphql-codegen/core@npm:2.6.6" +"@graphql-codegen/core@npm:^2.6.6": + version: 2.6.8 + resolution: "@graphql-codegen/core@npm:2.6.8" dependencies: - "@graphql-codegen/plugin-helpers": ^2.7.2 + "@graphql-codegen/plugin-helpers": ^3.1.1 "@graphql-tools/schema": ^9.0.0 "@graphql-tools/utils": ^9.1.1 tslib: ~2.4.0 peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 - checksum: 1240d871f1089986af78a46a1077b7ef8178ed7b2f26235474ebec94fc4c9bfa3cf73a79ecd380bf55a9cea34d3e91a884e98a54a2c0b12009b133e206244f97 + checksum: 230e88f4168469a87df39b28bb596fbaef65f0f7702e72757f4b45c5f1f372357e5c33f7838416473b660880b13accd46cf92ac6569348d4db6b7992c946b7bb languageName: node linkType: hard @@ -7260,19 +7192,19 @@ __metadata: languageName: node linkType: hard -"@graphql-codegen/plugin-helpers@npm:^2.7.2": - version: 2.7.2 - resolution: "@graphql-codegen/plugin-helpers@npm:2.7.2" +"@graphql-codegen/plugin-helpers@npm:^3.1.1": + version: 3.1.2 + resolution: "@graphql-codegen/plugin-helpers@npm:3.1.2" dependencies: - "@graphql-tools/utils": ^8.8.0 - change-case-all: 1.0.14 + "@graphql-tools/utils": ^9.0.0 + change-case-all: 1.0.15 common-tags: 1.8.2 import-from: 4.0.0 lodash: ~4.17.0 tslib: ~2.4.0 peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 - checksum: b4abce50a751d938a48b2b7ff57aa1671df1ae9d54196ccd60237077aef2e2b528b45244cb786d1b2eeb1f464c48eb7626553fdc5cf3a9013455ed27ef3ef7d2 + checksum: fbe326270aef17792b326ad8d8ae3e82acf1b60f3137a4d99eb605c0c8d709830537fec112705484b5fd2c9ee1d0588fbf4269f31c9a5852567c5d4c0c7057b7 languageName: node linkType: hard @@ -7296,89 +7228,17 @@ __metadata: languageName: node linkType: hard -"@graphql-tools/batch-execute@npm:^8.3.1": - version: 8.3.1 - resolution: "@graphql-tools/batch-execute@npm:8.3.1" - dependencies: - "@graphql-tools/utils": ^8.5.1 - dataloader: 2.0.0 - tslib: ~2.3.0 - value-or-promise: 1.0.11 - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 - checksum: 02524b26467a27e937924987ab636c769d6c72bfcca3b9070d7190cdd591e6429c7502d7e411179e04a81af252f8143c6cf686b1570f881dd24895dfef1db840 - languageName: node - linkType: hard - -"@graphql-tools/delegate@npm:^8.4.1, @graphql-tools/delegate@npm:^8.4.2": - version: 8.4.3 - resolution: "@graphql-tools/delegate@npm:8.4.3" - dependencies: - "@graphql-tools/batch-execute": ^8.3.1 - "@graphql-tools/schema": ^8.3.1 - "@graphql-tools/utils": ^8.5.4 - dataloader: 2.0.0 - tslib: ~2.3.0 - value-or-promise: 1.0.11 - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 - checksum: ab229f025bdd2f688e9f93292a9bd620b59517d4b51c656b0b5bf3636d5877e8674e9d3b25435ff05d2c425dbea3a740a6929ebf780b718b364bec40be9e5b8f - languageName: node - linkType: hard - -"@graphql-tools/graphql-file-loader@npm:^7.3.2": - version: 7.3.3 - resolution: "@graphql-tools/graphql-file-loader@npm:7.3.3" - dependencies: - "@graphql-tools/import": ^6.5.7 - "@graphql-tools/utils": ^8.5.1 - globby: ^11.0.3 - tslib: ~2.3.0 - unixify: ^1.0.0 - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 - checksum: b7d8a318ccd8c6b156785d89726c1d74706476155f72bb1b260a927614593b978f0defbe9c7e2a83ff3660441d35a9acc0f96eb300aaabccd55b9d341ce89fa4 - languageName: node - linkType: hard - -"@graphql-tools/import@npm:^6.5.7": - version: 6.6.3 - resolution: "@graphql-tools/import@npm:6.6.3" - dependencies: - "@graphql-tools/utils": 8.5.5 - resolve-from: 5.0.0 - tslib: ~2.3.0 - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 - checksum: a2a63e847e3f5564617018a2707558c36adcd9f80938f35ec4417f9257820c7cff74bf89968bdfc520938ab2d3276a4ca467274e9a10359eedb98a999432f318 - languageName: node - linkType: hard - -"@graphql-tools/json-file-loader@npm:^7.3.2": - version: 7.3.3 - resolution: "@graphql-tools/json-file-loader@npm:7.3.3" - dependencies: - "@graphql-tools/utils": ^8.5.1 - globby: ^11.0.3 - tslib: ~2.3.0 - unixify: ^1.0.0 - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 - checksum: 5efcc97d8c41d92b73572be712ee344f2ae9f6aa59982750ed60f5898213deed906b4c9d538d913f2fa3be7384bb6e925629d31d280f470cf96dd531e0c537c6 - languageName: node - linkType: hard - -"@graphql-tools/load@npm:^7.4.1": - version: 7.5.0 - resolution: "@graphql-tools/load@npm:7.5.0" +"@graphql-tools/apollo-engine-loader@npm:^8.0.0": + version: 8.0.0 + resolution: "@graphql-tools/apollo-engine-loader@npm:8.0.0" dependencies: - "@graphql-tools/schema": 8.3.1 - "@graphql-tools/utils": ^8.5.5 - p-limit: 3.1.0 - tslib: ~2.3.0 + "@ardatan/sync-fetch": ^0.0.1 + "@graphql-tools/utils": ^10.0.0 + "@whatwg-node/fetch": ^0.9.0 + tslib: ^2.4.0 peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 - checksum: 74c851b51ca720c1857cc52b60e377c9e7ffd2e50e80d3a5219c4c52f741438a2ee0a50438ec304c412efce334423eb2bb437377099aef96b667c316b12f0350 + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + checksum: 8221952eebb7dda6a1da409df396611df64694368b9c53a5bb2c9c9f1552ea836a9101491b68150b475d22dd9f5a52a0249290d7cf0f7cdd45149b8bddd9fa51 languageName: node linkType: hard @@ -7431,7 +7291,7 @@ __metadata: languageName: node linkType: hard -"@graphql-tools/schema@npm:8.3.1, @graphql-tools/schema@npm:^8.0.2, @graphql-tools/schema@npm:^8.3.1": +"@graphql-tools/schema@npm:^8.0.2, @graphql-tools/schema@npm:^8.3.1": version: 8.3.1 resolution: "@graphql-tools/schema@npm:8.3.1" dependencies: @@ -7459,35 +7319,6 @@ __metadata: languageName: node linkType: hard -"@graphql-tools/url-loader@npm:^7.4.2": - version: 7.7.0 - resolution: "@graphql-tools/url-loader@npm:7.7.0" - dependencies: - "@graphql-tools/delegate": ^8.4.1 - "@graphql-tools/utils": ^8.5.1 - "@graphql-tools/wrap": ^8.3.1 - "@n1ru4l/graphql-live-query": ^0.9.0 - "@types/websocket": ^1.0.4 - "@types/ws": ^8.0.0 - cross-undici-fetch: ^0.1.4 - dset: ^3.1.0 - extract-files: ^11.0.0 - graphql-sse: ^1.0.1 - graphql-ws: ^5.4.1 - isomorphic-ws: ^4.0.1 - meros: ^1.1.4 - subscriptions-transport-ws: ^0.11.0 - sync-fetch: ^0.3.1 - tslib: ^2.3.0 - valid-url: ^1.0.9 - value-or-promise: ^1.0.11 - ws: ^8.3.0 - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 - checksum: 12b3a3ffe9a6094abc7165ff3277872413c541e0993ec7bb81cc3338c0cbbca5a60bee611ae9d54296004559cd0501149243dc321863d822432df3746a9d1c49 - languageName: node - linkType: hard - "@graphql-tools/utils@npm:8.0.2": version: 8.0.2 resolution: "@graphql-tools/utils@npm:8.0.2" @@ -7499,17 +7330,6 @@ __metadata: languageName: node linkType: hard -"@graphql-tools/utils@npm:8.5.5": - version: 8.5.5 - resolution: "@graphql-tools/utils@npm:8.5.5" - dependencies: - tslib: ~2.3.0 - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 - checksum: 48b24b722c7fef3140e8d9d3609d1a53278b6c3c3e63013a4011add3719f1fcad32b314ec8c1ce265dbf0020eea83992b629f44d4f5fe71bb02c85d6fa8940e9 - languageName: node - linkType: hard - "@graphql-tools/utils@npm:8.8.0": version: 8.8.0 resolution: "@graphql-tools/utils@npm:8.8.0" @@ -7521,7 +7341,7 @@ __metadata: languageName: node linkType: hard -"@graphql-tools/utils@npm:9.2.1, @graphql-tools/utils@npm:^9.1.1": +"@graphql-tools/utils@npm:9.2.1, @graphql-tools/utils@npm:^9.0.0, @graphql-tools/utils@npm:^9.1.1, @graphql-tools/utils@npm:^9.2.1": version: 9.2.1 resolution: "@graphql-tools/utils@npm:9.2.1" dependencies: @@ -7533,6 +7353,19 @@ __metadata: languageName: node linkType: hard +"@graphql-tools/utils@npm:^10.0.0": + version: 10.0.6 + resolution: "@graphql-tools/utils@npm:10.0.6" + dependencies: + "@graphql-typed-document-node/core": ^3.1.1 + dset: ^3.1.2 + tslib: ^2.4.0 + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + checksum: 85fb8faa73bd548e0dafe1d52710f246c0cacecf0f315488e7530fd3474f9642fc1cb75bd83965de1933cefc5aa5d2e579e4fd703d9113c8d95c0a67f0f401d2 + languageName: node + linkType: hard + "@graphql-tools/utils@npm:^6.0.18": version: 6.2.4 resolution: "@graphql-tools/utils@npm:6.2.4" @@ -7559,7 +7392,7 @@ __metadata: languageName: node linkType: hard -"@graphql-tools/utils@npm:^8.5.1, @graphql-tools/utils@npm:^8.5.3, @graphql-tools/utils@npm:^8.5.4, @graphql-tools/utils@npm:^8.5.5, @graphql-tools/utils@npm:^8.8.0": +"@graphql-tools/utils@npm:^8.5.1": version: 8.13.1 resolution: "@graphql-tools/utils@npm:8.13.1" dependencies: @@ -7570,21 +7403,6 @@ __metadata: languageName: node linkType: hard -"@graphql-tools/wrap@npm:^8.3.1": - version: 8.3.2 - resolution: "@graphql-tools/wrap@npm:8.3.2" - dependencies: - "@graphql-tools/delegate": ^8.4.2 - "@graphql-tools/schema": ^8.3.1 - "@graphql-tools/utils": ^8.5.3 - tslib: ~2.3.0 - value-or-promise: 1.0.11 - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 - checksum: 494d370a411b9cf2e81ec2510a382d05157e5b944a28dbc598b52fcd9d757074d7174357088c44dd6c820cb866784b19e7f90e909d6639818a9c43494b65a516 - languageName: node - linkType: hard - "@graphql-typed-document-node/core@npm:^3.1.1": version: 3.1.1 resolution: "@graphql-typed-document-node/core@npm:3.1.1" @@ -7646,10 +7464,17 @@ __metadata: languageName: node linkType: hard -"@iarna/toml@npm:^2.2.5": - version: 2.2.5 - resolution: "@iarna/toml@npm:2.2.5" - checksum: d095381ad4554aca233b7cf5a91f243ef619e5e15efd3157bc640feac320545450d14b394aebbf6f02a2047437ced778ae598d5879a995441ab7b6c0b2c2f201 +"@isaacs/cliui@npm:^8.0.2": + version: 8.0.2 + resolution: "@isaacs/cliui@npm:8.0.2" + dependencies: + string-width: ^5.1.2 + string-width-cjs: "npm:string-width@^4.2.0" + strip-ansi: ^7.0.1 + strip-ansi-cjs: "npm:strip-ansi@^6.0.1" + wrap-ansi: ^8.1.0 + wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0" + checksum: b1bf42535d49f11dc137f18d5e4e63a28c5569de438a221c369483731e9dac9fb797af554e8bf02b6192d1e5eba6e6402cf93900c3d0ac86391d00d04876789e languageName: node linkType: hard @@ -7906,12 +7731,12 @@ __metadata: languageName: node linkType: hard -"@jest/schemas@npm:^29.4.3": - version: 29.4.3 - resolution: "@jest/schemas@npm:29.4.3" +"@jest/schemas@npm:^29.4.3, @jest/schemas@npm:^29.6.3": + version: 29.6.3 + resolution: "@jest/schemas@npm:29.6.3" dependencies: - "@sinclair/typebox": ^0.25.16 - checksum: 8a35967cec454d1de2d5a58ab99b49a0ff798d1dce2d817bdd9960bb2f070493f767fbbf419e6a263860d3b1ef1e50ab609a76ae21b5f8c09bb0859e8f51a098 + "@sinclair/typebox": ^0.27.8 + checksum: b329e89cd5f20b9278ae1233df74016ebf7b385e0d14b9f4c1ad18d096c4c19d1e687aa113a9c976b16ec07f021ae53dea811fb8c1248a50ac34fbe009fdf6be languageName: node linkType: hard @@ -8045,59 +7870,59 @@ __metadata: languageName: node linkType: hard -"@jest/types@npm:^29.5.0": - version: 29.5.0 - resolution: "@jest/types@npm:29.5.0" +"@jest/types@npm:^29.5.0, @jest/types@npm:^29.6.3": + version: 29.6.3 + resolution: "@jest/types@npm:29.6.3" dependencies: - "@jest/schemas": ^29.4.3 + "@jest/schemas": ^29.6.3 "@types/istanbul-lib-coverage": ^2.0.0 "@types/istanbul-reports": ^3.0.0 "@types/node": "*" "@types/yargs": ^17.0.8 chalk: ^4.0.0 - checksum: f1cccd2e9b00a985bfdac03517f906cdf7a481be3606c335f8ec08a7272b7cf700b23484ce323a912b374defb90d3ab88c643cf2a2f47635c1c4feacfa1c1b2d + checksum: ea4e493dd3fb47933b8ccab201ae573dcc451f951dc44ed2a86123cd8541b82aa9d2b1031caf9b1080d6673c517e2dcc25a44b2dc4f3fbc37bfc965d444888c0 languageName: node linkType: hard -"@jridgewell/gen-mapping@npm:^0.3.0, @jridgewell/gen-mapping@npm:^0.3.2": - version: 0.3.2 - resolution: "@jridgewell/gen-mapping@npm:0.3.2" +"@jridgewell/gen-mapping@npm:^0.3.0, @jridgewell/gen-mapping@npm:^0.3.2, @jridgewell/gen-mapping@npm:^0.3.5": + version: 0.3.5 + resolution: "@jridgewell/gen-mapping@npm:0.3.5" dependencies: - "@jridgewell/set-array": ^1.0.1 + "@jridgewell/set-array": ^1.2.1 "@jridgewell/sourcemap-codec": ^1.4.10 - "@jridgewell/trace-mapping": ^0.3.9 - checksum: 82685c8735c63fe388badee45e2970a6bc83eed1c84d46d8652863bafeca22a6c6cc15812f5999a4535366f4668ccc9ba6d5c67dfb72e846fa8a063806f10afd + "@jridgewell/trace-mapping": ^0.3.24 + checksum: 1be4fd4a6b0f41337c4f5fdf4afc3bd19e39c3691924817108b82ffcb9c9e609c273f936932b9fba4b3a298ce2eb06d9bff4eb1cc3bd81c4f4ee1b4917e25feb languageName: node linkType: hard -"@jridgewell/resolve-uri@npm:3.1.0, @jridgewell/resolve-uri@npm:^3.0.3": - version: 3.1.0 - resolution: "@jridgewell/resolve-uri@npm:3.1.0" - checksum: 78055e2526108331126366572045355051a930f017d1904a4f753d3f4acee8d92a14854948095626f6163cffc24ea4e3efa30637417bb866b84743dec7ef6fd9 +"@jridgewell/resolve-uri@npm:^3.0.3, @jridgewell/resolve-uri@npm:^3.1.0": + version: 3.1.1 + resolution: "@jridgewell/resolve-uri@npm:3.1.1" + checksum: 0dbc9e29bc640bbbdc5b9876d2859c69042bfcf1423c1e6421bcca53e826660bff4e41c7d4bcb8dbea696404231a6f902f76ba41835d049e20f2dd6cffb713bf languageName: node linkType: hard -"@jridgewell/set-array@npm:^1.0.1": - version: 1.1.2 - resolution: "@jridgewell/set-array@npm:1.1.2" - checksum: bc7ab4c4c00470de4e7562ecac3c0c84f53e7ee8a711e546d67c47da7febe7c45cd67d4d84ee3c9b2c05ae8e872656cdded8a707a283d30bd54fbc65aef821ab +"@jridgewell/set-array@npm:^1.2.1": + version: 1.2.1 + resolution: "@jridgewell/set-array@npm:1.2.1" + checksum: 2a5aa7b4b5c3464c895c802d8ae3f3d2b92fcbe84ad12f8d0bfbb1f5ad006717e7577ee1fd2eac00c088abe486c7adb27976f45d2941ff6b0b92b2c3302c60f4 languageName: node linkType: hard -"@jridgewell/source-map@npm:^0.3.2": - version: 0.3.2 - resolution: "@jridgewell/source-map@npm:0.3.2" +"@jridgewell/source-map@npm:^0.3.3": + version: 0.3.6 + resolution: "@jridgewell/source-map@npm:0.3.6" dependencies: - "@jridgewell/gen-mapping": ^0.3.0 - "@jridgewell/trace-mapping": ^0.3.9 - checksum: 1540da323456878281c8e03fc4edc444ea151aa441eb38a43d84d39df8fec9446e375202cd999b54637f4627e42e2a38b3ab07195e5e49616fc6b7eee1b7119f + "@jridgewell/gen-mapping": ^0.3.5 + "@jridgewell/trace-mapping": ^0.3.25 + checksum: 6a4ecc713ed246ff8e5bdcc1ef7c49aaa93f7463d948ba5054dda18b02dcc6a055e2828c577bcceee058f302ce1fc95595713d44f5c45e43d459f88d267f2f04 languageName: node linkType: hard -"@jridgewell/sourcemap-codec@npm:1.4.14, @jridgewell/sourcemap-codec@npm:^1.4.10": - version: 1.4.14 - resolution: "@jridgewell/sourcemap-codec@npm:1.4.14" - checksum: 3fbaff1387c1338b097eeb6ff92890d7838f7de0dde259e4983763b44540bfd5ca6a1f7644dc8ad003a57f7e80670d5b96a8402f1386ba9aee074743ae9bad51 +"@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14": + version: 1.4.15 + resolution: "@jridgewell/sourcemap-codec@npm:1.4.15" + checksum: 0c6b5ae663087558039052a626d2d7ed5208da36cfd707dcc5cea4a07cfc918248403dcb5989a8f7afaf245ce0573b7cc6fd94c4a30453bd10e44d9363940ba5 languageName: node linkType: hard @@ -8111,13 +7936,13 @@ __metadata: languageName: node linkType: hard -"@jridgewell/trace-mapping@npm:^0.3.12, @jridgewell/trace-mapping@npm:^0.3.15, @jridgewell/trace-mapping@npm:^0.3.17, @jridgewell/trace-mapping@npm:^0.3.9": - version: 0.3.18 - resolution: "@jridgewell/trace-mapping@npm:0.3.18" +"@jridgewell/trace-mapping@npm:^0.3.12, @jridgewell/trace-mapping@npm:^0.3.15, @jridgewell/trace-mapping@npm:^0.3.17, @jridgewell/trace-mapping@npm:^0.3.18, @jridgewell/trace-mapping@npm:^0.3.20, @jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25, @jridgewell/trace-mapping@npm:^0.3.9": + version: 0.3.25 + resolution: "@jridgewell/trace-mapping@npm:0.3.25" dependencies: - "@jridgewell/resolve-uri": 3.1.0 - "@jridgewell/sourcemap-codec": 1.4.14 - checksum: e5045775f076022b6c7cc64a7b55742faa5442301cb3389fd0e6712fafc46a2bb13c68fa1ffaf7b8bb665a91196f050b4115885fc802094ebc06a1cf665935ac + "@jridgewell/resolve-uri": ^3.1.0 + "@jridgewell/sourcemap-codec": ^1.4.14 + checksum: 3d1ce6ebc69df9682a5a8896b414c6537e428a1d68b02fcc8363b04284a8ca0df04d0ee3013132252ab14f2527bc13bea6526a912ecb5658f0e39fd2860b4df4 languageName: node linkType: hard @@ -8271,22 +8096,6 @@ __metadata: languageName: node linkType: hard -"@lezer/common@npm:^0.15.0, @lezer/common@npm:^0.15.5": - version: 0.15.11 - resolution: "@lezer/common@npm:0.15.11" - checksum: a245f9fd7b38f2ca02fc7575ba9035d066c90898e8610cc2b1d92f3d9a89887277b8541019d9bf8a9692875ea21bb1518fff9020b30a4f76a99fc9a99ecee8db - languageName: node - linkType: hard - -"@lezer/lr@npm:^0.15.0": - version: 0.15.5 - resolution: "@lezer/lr@npm:0.15.5" - dependencies: - "@lezer/common": ^0.15.0 - checksum: 01622ce4064d5df0a420c0462603beffc1681db8c48420ff9707aadd39535b8173a6a8b696bb5577c5718e3dea3c7f37bb3a129578e0b8fa37c269bcb280435b - languageName: node - linkType: hard - "@microsoft/api-extractor-model@npm:7.26.7": version: 7.26.7 resolution: "@microsoft/api-extractor-model@npm:7.26.7" @@ -8339,15 +8148,6 @@ __metadata: languageName: node linkType: hard -"@n1ru4l/graphql-live-query@npm:^0.9.0": - version: 0.9.0 - resolution: "@n1ru4l/graphql-live-query@npm:0.9.0" - peerDependencies: - graphql: ^15.4.0 || ^16.0.0 - checksum: 680383b0234b57f0237d35a78c5716821b67e2f2e8d9942b9f9cbcbca21b5d8390cb7e1b5f0b70cbc7820fd15225f922e8dbd9eac9906d7851cba6838fee44b8 - languageName: node - linkType: hard - "@n1ru4l/push-pull-async-iterable-iterator@npm:^3.1.0": version: 3.1.0 resolution: "@n1ru4l/push-pull-async-iterable-iterator@npm:3.1.0" @@ -9067,287 +8867,893 @@ __metadata: languageName: node linkType: hard -"@pnpm/network.ca-file@npm:^1.0.1": - version: 1.0.1 - resolution: "@pnpm/network.ca-file@npm:1.0.1" +"@pnpm/network.ca-file@npm:^1.0.1": + version: 1.0.1 + resolution: "@pnpm/network.ca-file@npm:1.0.1" + dependencies: + graceful-fs: 4.2.10 + checksum: 4f3ecff55585262709bb35590fc332ccfc6e0ec62ca53baff03e080661fa603d9b6b50e69151721bb3bb891383fc44e80792947d02cccef4647a1f91e3ed32b9 + languageName: node + linkType: hard + +"@pnpm/npm-conf@npm:^1.0.4": + version: 1.0.5 + resolution: "@pnpm/npm-conf@npm:1.0.5" + dependencies: + "@pnpm/network.ca-file": ^1.0.1 + config-chain: ^1.1.11 + checksum: b19ff4a1de7f8b6716e27fdf6ff11bf5bd7b8732d1acc22df26a6e274c321ba925bdec4d054241287f3e606475660c98bed09e7eec42846a82670d9533c9333c + languageName: node + linkType: hard + +"@popperjs/core@npm:^2.6.0": + version: 2.11.0 + resolution: "@popperjs/core@npm:2.11.0" + checksum: ebf363fb41625106e9f1f3e90a87fcac50bdc714f70a09dd0a87f1ac2a25bec7e9cfe681f66ec04229d1f5ec17d66a06e6e8e93eaa089eb79b005a51b779a58a + languageName: node + linkType: hard + +"@redux-offline/redux-offline@npm:2.6.0-native.1": + version: 2.6.0-native.1 + resolution: "@redux-offline/redux-offline@npm:2.6.0-native.1" + dependencies: + "@babel/runtime": ^7.9.6 + redux-persist: ^4.6.0 + peerDependencies: + redux: ">=3" + checksum: a5b7a16304f063b263de246fe25f5e2d917afe62483cec4390d40190b8011a1d1144ec3da8284226d147e205951a476203d749c36aedf559990b0a642e56d3ed + languageName: node + linkType: hard + +"@rollup/plugin-babel@npm:^5.2.0": + version: 5.3.1 + resolution: "@rollup/plugin-babel@npm:5.3.1" + dependencies: + "@babel/helper-module-imports": ^7.10.4 + "@rollup/pluginutils": ^3.1.0 + peerDependencies: + "@babel/core": ^7.0.0 + "@types/babel__core": ^7.1.9 + rollup: ^1.20.0||^2.0.0 + peerDependenciesMeta: + "@types/babel__core": + optional: true + checksum: 2766134dd5567c0d4fd6909d1f511ce9bf3bd9d727e1bc5ffdd6097a3606faca324107ae8e0961839ee4dbb45e5e579ae601efe472fc0a271259aea79920cafa + languageName: node + linkType: hard + +"@rollup/plugin-node-resolve@npm:^11.2.1": + version: 11.2.1 + resolution: "@rollup/plugin-node-resolve@npm:11.2.1" + dependencies: + "@rollup/pluginutils": ^3.1.0 + "@types/resolve": 1.17.1 + builtin-modules: ^3.1.0 + deepmerge: ^4.2.2 + is-module: ^1.0.0 + resolve: ^1.19.0 + peerDependencies: + rollup: ^1.20.0||^2.0.0 + checksum: a8226b01352ee1f7133b1b59b3906267e11c99020a55e3b7a313e03889f790d1cd94e7f7769d3963261e897c3265082533ba595976f8e3f08cf70aa88bf1ddd7 + languageName: node + linkType: hard + +"@rollup/plugin-replace@npm:^2.4.1": + version: 2.4.2 + resolution: "@rollup/plugin-replace@npm:2.4.2" + dependencies: + "@rollup/pluginutils": ^3.1.0 + magic-string: ^0.25.7 + peerDependencies: + rollup: ^1.20.0 || ^2.0.0 + checksum: ea3d27291c791661638b91809d0247dde1ee71be0b16fa7060078c2700db3669eada2c3978ea979b917b29ebe06f3fddc8797feae554da966264a22142b5771a + languageName: node + linkType: hard + +"@rollup/pluginutils@npm:^3.1.0": + version: 3.1.0 + resolution: "@rollup/pluginutils@npm:3.1.0" + dependencies: + "@types/estree": 0.0.39 + estree-walker: ^1.0.1 + picomatch: ^2.2.2 + peerDependencies: + rollup: ^1.20.0||^2.0.0 + checksum: 7151753160d15ba2b259461a6c25b3932150994ea52dba8fd3144f634c7647c2e56733d986e2c15de67c4d96a9ee7d6278efa6d2e626a7169898fd64adc0f90c + languageName: node + linkType: hard + +"@rushstack/eslint-patch@npm:^1.1.0": + version: 1.1.3 + resolution: "@rushstack/eslint-patch@npm:1.1.3" + checksum: edf2de575a66faa12c63630dc2e46bc523e637ce86d02e305ea5f66854839d3e0d77135f8418845eabbbf6a78da79ce79aa0015894792cde36269855598290c8 + languageName: node + linkType: hard + +"@rushstack/node-core-library@npm:3.58.0": + version: 3.58.0 + resolution: "@rushstack/node-core-library@npm:3.58.0" + dependencies: + colors: ~1.2.1 + fs-extra: ~7.0.1 + import-lazy: ~4.0.0 + jju: ~1.4.0 + resolve: ~1.22.1 + semver: ~7.3.0 + z-schema: ~5.0.2 + peerDependencies: + "@types/node": "*" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 159399e423b873bb13e37724bc857946749c6097fbde157b7bffa8c715db86eaa176d1844ff0a8e3cc18362740163273f5f3ef3aa5861b339f91f20251d079a1 + languageName: node + linkType: hard + +"@rushstack/rig-package@npm:0.3.18": + version: 0.3.18 + resolution: "@rushstack/rig-package@npm:0.3.18" + dependencies: + resolve: ~1.22.1 + strip-json-comments: ~3.1.1 + checksum: f0d5a4236d24d3b3d06b3183a2631f96ea2daed601cf59844f7409ee43895ef13d4df10fea3646ba16c4480b03dfdc47f2592dbdece7ddf9df0186fa98c7a3ad + languageName: node + linkType: hard + +"@rushstack/ts-command-line@npm:4.13.2": + version: 4.13.2 + resolution: "@rushstack/ts-command-line@npm:4.13.2" + dependencies: + "@types/argparse": 1.0.38 + argparse: ~1.0.9 + colors: ~1.2.1 + string-argv: ~0.3.1 + checksum: 77b2dd4eb0240695e324a4f31f83e20e5cb30666f355ef2be19f2562249e9364daa57c55c1a2abff9fc4e96033805b3f72af70c4ade92abadf3b1f0d69b35fb1 + languageName: node + linkType: hard + +"@semantic-ui-react/css-patch@npm:^1.0.0": + version: 1.0.0 + resolution: "@semantic-ui-react/css-patch@npm:1.0.0" + dependencies: + chalk: ^3.0.0 + log-symbols: ^3.0.0 + bin: + semantic-ui-css-patch: dist-node/index.bin.js + checksum: d0e724fbc27aa2c294a3706a8d4217274da7d5c5a48944b71514cebc75dc7b4093c92a7356ae6997a27d2969a54650a2f27d0a312e2dd87fd648bd3d6345e372 + languageName: node + linkType: hard + +"@semantic-ui-react/event-stack@npm:^3.1.3": + version: 3.1.3 + resolution: "@semantic-ui-react/event-stack@npm:3.1.3" + dependencies: + exenv: ^1.2.2 + prop-types: ^15.6.2 + peerDependencies: + react: ^16.0.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.0.0 || ^17.0.0 || ^18.0.0 + checksum: 9f96516c16c8e4d985e9d9ed02c92bc2857563c434ee8b2703b7dbd2fefe9f4e84d5b9e108e5d172ed6002db2978c46c6c6eeee6100552b743be4f3a51ed78e8 + languageName: node + linkType: hard + +"@sigstore/protobuf-specs@npm:^0.1.0": + version: 0.1.0 + resolution: "@sigstore/protobuf-specs@npm:0.1.0" + checksum: fa373952653d4ea32c593f754cf04c56a57287c7357e830c9ded10c47318fe8e9ec82900109e63f60380828145928ec67f4a6229fc73da45b9771a3139e82f8f + languageName: node + linkType: hard + +"@sinclair/typebox@npm:^0.27.8": + version: 0.27.8 + resolution: "@sinclair/typebox@npm:0.27.8" + checksum: ef6351ae073c45c2ac89494dbb3e1f87cc60a93ce4cde797b782812b6f97da0d620ae81973f104b43c9b7eaa789ad20ba4f6a1359f1cc62f63729a55a7d22d4e + languageName: node + linkType: hard + +"@sindresorhus/is@npm:^4.0.0": + version: 4.6.0 + resolution: "@sindresorhus/is@npm:4.6.0" + checksum: 33b6fb1d0834ec8dd7689ddc0e2781c2bfd8b9c4e4bacbcb14111e0ae00621f2c264b8a7d36541799d74888b5dccdf422a891a5cb5a709ace26325eedc81e22e + languageName: node + linkType: hard + +"@sinonjs/commons@npm:^1.7.0": + version: 1.8.3 + resolution: "@sinonjs/commons@npm:1.8.3" + dependencies: + type-detect: 4.0.8 + checksum: e4d2471feb19f735654f798fcdf389b90fab5913da609f566b04c4cdd9131a97e897d565251d35389aeebcca70a22ab4ed2291c7f7927706ead12e4f94841bf1 + languageName: node + linkType: hard + +"@sinonjs/commons@npm:^2.0.0": + version: 2.0.0 + resolution: "@sinonjs/commons@npm:2.0.0" + dependencies: + type-detect: 4.0.8 + checksum: babe3fdfc7dfb810f6918f2ae055032a1c7c18910595f1c6bfda87bb1737c1a57268d4ca78c3d8ad2fa4aae99ff79796fad76be735a5a38ab763c0b3cfad1ae7 + languageName: node + linkType: hard + +"@sinonjs/commons@npm:^3.0.0, @sinonjs/commons@npm:^3.0.1": + version: 3.0.1 + resolution: "@sinonjs/commons@npm:3.0.1" + dependencies: + type-detect: 4.0.8 + checksum: 1227a7b5bd6c6f9584274db996d7f8cee2c8c350534b9d0141fc662eaf1f292ea0ae3ed19e5e5271c8fd390d27e492ca2803acd31a1978be2cdc6be0da711403 + languageName: node + linkType: hard + +"@sinonjs/fake-timers@npm:11.2.2": + version: 11.2.2 + resolution: "@sinonjs/fake-timers@npm:11.2.2" + dependencies: + "@sinonjs/commons": ^3.0.0 + checksum: a4218efa6fdafda622d02d4c0a6ab7df3641cb038bb0b14f0a3ee56f50c95aab4f1ab2d7798ce928b40c6fc1839465a558c9393a77e4dca879e1b2f8d60d8136 + languageName: node + linkType: hard + +"@sinonjs/fake-timers@npm:^10.0.2": + version: 10.0.2 + resolution: "@sinonjs/fake-timers@npm:10.0.2" + dependencies: + "@sinonjs/commons": ^2.0.0 + checksum: 24555ed94053319fa18d4efa0923b295a445a00d2515d260b9e4e2b5943bd8b5b55fee85baabb2819a13ca1f57dbc1949265a350f592eef9e2535ec9de711ebc + languageName: node + linkType: hard + +"@sinonjs/fake-timers@npm:^13.0.1": + version: 13.0.3 + resolution: "@sinonjs/fake-timers@npm:13.0.3" + dependencies: + "@sinonjs/commons": ^3.0.1 + checksum: 4495b12def9117b93f72b6d5d6fc1a52f2efc059166bf791381e476f197d34bcf9061bd53dce1ce6cc9d858582011d29d1360f512f746ca78ff99217545b549e + languageName: node + linkType: hard + +"@sinonjs/fake-timers@npm:^6.0.1": + version: 6.0.1 + resolution: "@sinonjs/fake-timers@npm:6.0.1" + dependencies: + "@sinonjs/commons": ^1.7.0 + checksum: a77bead4d71b40d6f7f9a3ad66a00269aa2c078260f43f594b8aed4676c6c4e7c2b642d4b8e34df314e1c971589455f7b4267ab831bf44ffdccc0bda599850ad + languageName: node + linkType: hard + +"@sinonjs/fake-timers@npm:^8.0.1": + version: 8.1.0 + resolution: "@sinonjs/fake-timers@npm:8.1.0" + dependencies: + "@sinonjs/commons": ^1.7.0 + checksum: d6b795f9ddaf044daf184c151555ca557ccd23636f2ee3d2f76a9d128329f81fc1aac412f6f67239ab92cb9390aad9955b71df93cf4bd442c68b1f341e381ab6 + languageName: node + linkType: hard + +"@sinonjs/samsam@npm:^8.0.0": + version: 8.0.0 + resolution: "@sinonjs/samsam@npm:8.0.0" + dependencies: + "@sinonjs/commons": ^2.0.0 + lodash.get: ^4.4.2 + type-detect: ^4.0.8 + checksum: c1654ad72ecd9efd4a57d756c492c1c17a197c3138da57b75ba1729562001ed1b3b9c656cce1bd1d91640bc86eb4185a72eced528d176fff09a3a01de28cdcc6 + languageName: node + linkType: hard + +"@sinonjs/text-encoding@npm:^0.7.3": + version: 0.7.3 + resolution: "@sinonjs/text-encoding@npm:0.7.3" + checksum: b112d1e97af7f99fbdc63c7dbcd35d6a60764dfec85cfcfff532e55cce8ecd8453f9fa2139e70aea47142c940fd90cd201d19f370b9a0141700d8a6de3116815 + languageName: node + linkType: hard + +"@smithy/abort-controller@npm:^3.1.6": + version: 3.1.6 + resolution: "@smithy/abort-controller@npm:3.1.6" + dependencies: + "@smithy/types": ^3.6.0 + tslib: ^2.6.2 + checksum: 9933c69a81223e9a6a864c9d1f7cc00b0788ac6637b57eea8390d2b6cb39a0b87a406d32a5052441b3e9fdef9812870676464349abb5b19d3ee0ea348e2f7b1d + languageName: node + linkType: hard + +"@smithy/chunked-blob-reader-native@npm:^3.0.1": + version: 3.0.1 + resolution: "@smithy/chunked-blob-reader-native@npm:3.0.1" + dependencies: + "@smithy/util-base64": ^3.0.0 + tslib: ^2.6.2 + checksum: 26f7660d3cb5a257d1db70aaa4b0a109bf4412c3069d35b40645a045481e1633765c8a530ffdab4645bf640fdc957693fa84c6ebb15e864b7bd4be9d4e16b46c + languageName: node + linkType: hard + +"@smithy/chunked-blob-reader@npm:^4.0.0": + version: 4.0.0 + resolution: "@smithy/chunked-blob-reader@npm:4.0.0" + dependencies: + tslib: ^2.6.2 + checksum: 4d997cb3a828c9c76bb764586918944ba07262aed832827d2be8ba3556f436171613e80b9f35a005af8f2189fc43befdfe44e21d9bde668fb48d5443f509ae22 + languageName: node + linkType: hard + +"@smithy/config-resolver@npm:^3.0.10, @smithy/config-resolver@npm:^3.0.5": + version: 3.0.10 + resolution: "@smithy/config-resolver@npm:3.0.10" + dependencies: + "@smithy/node-config-provider": ^3.1.9 + "@smithy/types": ^3.6.0 + "@smithy/util-config-provider": ^3.0.0 + "@smithy/util-middleware": ^3.0.8 + tslib: ^2.6.2 + checksum: 0c15dcc4d1d603c19ce01c7f0dcf2aa112edccfaf38a925554fbe61102e1ded9009d2cc799068bfd187eabef7fde95343596b5b970ae5750540531e7018b1333 + languageName: node + linkType: hard + +"@smithy/core@npm:^2.3.2, @smithy/core@npm:^2.5.1": + version: 2.5.1 + resolution: "@smithy/core@npm:2.5.1" + dependencies: + "@smithy/middleware-serde": ^3.0.8 + "@smithy/protocol-http": ^4.1.5 + "@smithy/types": ^3.6.0 + "@smithy/util-body-length-browser": ^3.0.0 + "@smithy/util-middleware": ^3.0.8 + "@smithy/util-stream": ^3.2.1 + "@smithy/util-utf8": ^3.0.0 + tslib: ^2.6.2 + checksum: 26afd0bdcc15f493442cd86507c929aabfc4df6819a80707d3d57cfc46b72249e38725b33c44c161fe4194cca01613758838ebd198248fa0f0b711f3e6ac6406 + languageName: node + linkType: hard + +"@smithy/credential-provider-imds@npm:^3.2.0, @smithy/credential-provider-imds@npm:^3.2.5": + version: 3.2.5 + resolution: "@smithy/credential-provider-imds@npm:3.2.5" + dependencies: + "@smithy/node-config-provider": ^3.1.9 + "@smithy/property-provider": ^3.1.8 + "@smithy/types": ^3.6.0 + "@smithy/url-parser": ^3.0.8 + tslib: ^2.6.2 + checksum: b381167dec3cf3394ee36cd2ecf7c67e14f7b1eef2d5fd3ce57657682d2b1559d6750eec312bdc340d8a0064cc020ff575b344ff3f5eb2ea54dd7f1bed7b89c3 + languageName: node + linkType: hard + +"@smithy/eventstream-codec@npm:^3.1.7": + version: 3.1.7 + resolution: "@smithy/eventstream-codec@npm:3.1.7" + dependencies: + "@aws-crypto/crc32": 5.2.0 + "@smithy/types": ^3.6.0 + "@smithy/util-hex-encoding": ^3.0.0 + tslib: ^2.6.2 + checksum: 6d3e93f5906501ea278c447285a1807bf0a5f2aee4683f6f1b3340e8a11e3c929b2c6389efa470c77eb03eea17824507f03224421768928d4ac5141a5b98eeff + languageName: node + linkType: hard + +"@smithy/eventstream-serde-browser@npm:^3.0.5": + version: 3.0.11 + resolution: "@smithy/eventstream-serde-browser@npm:3.0.11" + dependencies: + "@smithy/eventstream-serde-universal": ^3.0.10 + "@smithy/types": ^3.6.0 + tslib: ^2.6.2 + checksum: d1e7007b5de4bff20f751d6751da74690c03dd4eb339055a5f4b0db6327f9d901f385f2ce100a8d3658df6714955b4403f013285294855c30dc78a50435fdf92 + languageName: node + linkType: hard + +"@smithy/eventstream-serde-config-resolver@npm:^3.0.3": + version: 3.0.8 + resolution: "@smithy/eventstream-serde-config-resolver@npm:3.0.8" + dependencies: + "@smithy/types": ^3.6.0 + tslib: ^2.6.2 + checksum: a18f5b7cfc6f9ab79d282138452b7475cafb354d2d6d9d6d8ae7815342537bd81f6e1423aa9cb77a6006d24d6a65ef7bdc47ea823f77d4b65f440e0eec708b7b + languageName: node + linkType: hard + +"@smithy/eventstream-serde-node@npm:^3.0.4": + version: 3.0.10 + resolution: "@smithy/eventstream-serde-node@npm:3.0.10" + dependencies: + "@smithy/eventstream-serde-universal": ^3.0.10 + "@smithy/types": ^3.6.0 + tslib: ^2.6.2 + checksum: d67feaa889473f85459061fda50ab4742cf25f8e93557a307d3c2990620a5c5893bce477ac1d747838672b7ae65d97856245f6bbe1379de9b90cd57cf6c83e2e + languageName: node + linkType: hard + +"@smithy/eventstream-serde-universal@npm:^3.0.10": + version: 3.0.10 + resolution: "@smithy/eventstream-serde-universal@npm:3.0.10" + dependencies: + "@smithy/eventstream-codec": ^3.1.7 + "@smithy/types": ^3.6.0 + tslib: ^2.6.2 + checksum: 5f3bd8751e6ed6c2c3ea6da54dd2ecd8906de8d2606e6fb9da5f0d0500c4b5d85a1a83837cc661bcc3a058b485459b12ddcc48810b12afd8d140cc76d2516346 + languageName: node + linkType: hard + +"@smithy/fetch-http-handler@npm:^3.2.4": + version: 3.2.9 + resolution: "@smithy/fetch-http-handler@npm:3.2.9" + dependencies: + "@smithy/protocol-http": ^4.1.4 + "@smithy/querystring-builder": ^3.0.7 + "@smithy/types": ^3.5.0 + "@smithy/util-base64": ^3.0.0 + tslib: ^2.6.2 + checksum: 0427d47a86d8250aa21fe4a9ec6639e2b611173e7516077ca634a0a398d902152993624766c5411a527a07db12b5c131a351770a9357a346d79811a4939ccbc6 + languageName: node + linkType: hard + +"@smithy/fetch-http-handler@npm:^4.0.0": + version: 4.0.0 + resolution: "@smithy/fetch-http-handler@npm:4.0.0" + dependencies: + "@smithy/protocol-http": ^4.1.5 + "@smithy/querystring-builder": ^3.0.8 + "@smithy/types": ^3.6.0 + "@smithy/util-base64": ^3.0.0 + tslib: ^2.6.2 + checksum: 82035ada9ca7cf40c897ac6e8ff0097fad46a857a46ccc2dbe353ec730dbbd1d5733c9e82a1b09f606c12c64add35a045d8c860e4fc780acbf06f9d3fae8d90c + languageName: node + linkType: hard + +"@smithy/hash-blob-browser@npm:^3.1.2": + version: 3.1.7 + resolution: "@smithy/hash-blob-browser@npm:3.1.7" + dependencies: + "@smithy/chunked-blob-reader": ^4.0.0 + "@smithy/chunked-blob-reader-native": ^3.0.1 + "@smithy/types": ^3.6.0 + tslib: ^2.6.2 + checksum: fda71b16b2ffdb47dd75c4568c28a712703ce987e35c646f89860668ffb0cc38c15410b6319ce077e5dc5c3e4427af9e4620281a0a491a163e2bc23c507fe610 + languageName: node + linkType: hard + +"@smithy/hash-node@npm:^3.0.3": + version: 3.0.8 + resolution: "@smithy/hash-node@npm:3.0.8" + dependencies: + "@smithy/types": ^3.6.0 + "@smithy/util-buffer-from": ^3.0.0 + "@smithy/util-utf8": ^3.0.0 + tslib: ^2.6.2 + checksum: fa8fa82b830550de01e981e0265dad3d42802208c128cdd1b970c513726d6f29f030a52d7087e1fbee751011b6dcec479e592941252a7e47004418c8d605e1a4 + languageName: node + linkType: hard + +"@smithy/hash-stream-node@npm:^3.1.2": + version: 3.1.7 + resolution: "@smithy/hash-stream-node@npm:3.1.7" + dependencies: + "@smithy/types": ^3.6.0 + "@smithy/util-utf8": ^3.0.0 + tslib: ^2.6.2 + checksum: 26f1a49f9fa5486fbca97034c171f36675cffdf2fe1039cfd918a83b63d9cbb1b0cdb7c399c21f1d914f3c4df5e16754b01a755b2eadaf51c519aa183ac71ea3 + languageName: node + linkType: hard + +"@smithy/invalid-dependency@npm:^3.0.3": + version: 3.0.8 + resolution: "@smithy/invalid-dependency@npm:3.0.8" + dependencies: + "@smithy/types": ^3.6.0 + tslib: ^2.6.2 + checksum: 7769ea3d6cc2530da1c6ecc6bcc90e7b6a2338d87465965f0845ad28be5d27c08516dc79ef77af2a002fe0329367fa8260399abb29676f3f37adf8c2cf2772c8 + languageName: node + linkType: hard + +"@smithy/is-array-buffer@npm:^2.0.0": + version: 2.0.0 + resolution: "@smithy/is-array-buffer@npm:2.0.0" + dependencies: + tslib: ^2.5.0 + checksum: c0f8983a402da853fd6ee33f60e70c561e44f83a7aae1af9675a40aeb57980d1a64ac7a9b892b69fdfcf282f54accc7e531619ba1ae5e447f17c27efd109802e + languageName: node + linkType: hard + +"@smithy/is-array-buffer@npm:^3.0.0": + version: 3.0.0 + resolution: "@smithy/is-array-buffer@npm:3.0.0" + dependencies: + tslib: ^2.6.2 + checksum: 44710d94b9e6655ebc02169c149ea2bc5d5b9e509b6b39511cfe61bac571412290f4b9c743d61e395822f014021fcb709dbb533f2f717c1ac2d5a356696c22fd + languageName: node + linkType: hard + +"@smithy/md5-js@npm:^3.0.3": + version: 3.0.8 + resolution: "@smithy/md5-js@npm:3.0.8" + dependencies: + "@smithy/types": ^3.6.0 + "@smithy/util-utf8": ^3.0.0 + tslib: ^2.6.2 + checksum: 83654b7c65be77d3e170f63a5dab4b3d19bb518ca69691b0a9c257de8101a02e005bc2136074d6ab18d0a50cef746ea610527e3530c6e843b6b9529ed9b488f1 + languageName: node + linkType: hard + +"@smithy/middleware-content-length@npm:^3.0.5": + version: 3.0.10 + resolution: "@smithy/middleware-content-length@npm:3.0.10" + dependencies: + "@smithy/protocol-http": ^4.1.5 + "@smithy/types": ^3.6.0 + tslib: ^2.6.2 + checksum: 2e7a6e36f39e1ce78ba3800979004a801fa93c7ef3b143e1c1b3ff64e4a2b92762e808ab75c2f7a1acc6133f4b301624dc08dc2354b37d5735e02ee4ccaddf78 + languageName: node + linkType: hard + +"@smithy/middleware-endpoint@npm:^3.1.0, @smithy/middleware-endpoint@npm:^3.2.1": + version: 3.2.1 + resolution: "@smithy/middleware-endpoint@npm:3.2.1" + dependencies: + "@smithy/core": ^2.5.1 + "@smithy/middleware-serde": ^3.0.8 + "@smithy/node-config-provider": ^3.1.9 + "@smithy/shared-ini-file-loader": ^3.1.9 + "@smithy/types": ^3.6.0 + "@smithy/url-parser": ^3.0.8 + "@smithy/util-middleware": ^3.0.8 + tslib: ^2.6.2 + checksum: d1d6406840262388a5845a29d9a2e956a2f3c42f0fb981cd34b95145a5a509bebd25b3e4fad73951b56ff71757d00f7e8ec23bc75c6362a97dacab114ecf9140 + languageName: node + linkType: hard + +"@smithy/middleware-retry@npm:^3.0.14": + version: 3.0.25 + resolution: "@smithy/middleware-retry@npm:3.0.25" + dependencies: + "@smithy/node-config-provider": ^3.1.9 + "@smithy/protocol-http": ^4.1.5 + "@smithy/service-error-classification": ^3.0.8 + "@smithy/smithy-client": ^3.4.2 + "@smithy/types": ^3.6.0 + "@smithy/util-middleware": ^3.0.8 + "@smithy/util-retry": ^3.0.8 + tslib: ^2.6.2 + uuid: ^9.0.1 + checksum: 5ebb8ed29be344ab92db28fbe62f1887b6a9cf7c5029450454c1a384844cd4e28a99c4c381ca2466d848d545ee885c35f6c5b965bc7a90a9a20b301433caed37 + languageName: node + linkType: hard + +"@smithy/middleware-serde@npm:^3.0.3, @smithy/middleware-serde@npm:^3.0.8": + version: 3.0.8 + resolution: "@smithy/middleware-serde@npm:3.0.8" dependencies: - graceful-fs: 4.2.10 - checksum: 4f3ecff55585262709bb35590fc332ccfc6e0ec62ca53baff03e080661fa603d9b6b50e69151721bb3bb891383fc44e80792947d02cccef4647a1f91e3ed32b9 + "@smithy/types": ^3.6.0 + tslib: ^2.6.2 + checksum: b7cbf57955ab82cd5ddb07fcceecdf1fbd6a3f9479179d1014d34e88f2dd32c0ffd4fb631cbb7a05ef4635efab34b32141ea5526b388138f71589ba993560fb2 languageName: node linkType: hard -"@pnpm/npm-conf@npm:^1.0.4": - version: 1.0.5 - resolution: "@pnpm/npm-conf@npm:1.0.5" +"@smithy/middleware-stack@npm:^3.0.3, @smithy/middleware-stack@npm:^3.0.8": + version: 3.0.8 + resolution: "@smithy/middleware-stack@npm:3.0.8" dependencies: - "@pnpm/network.ca-file": ^1.0.1 - config-chain: ^1.1.11 - checksum: b19ff4a1de7f8b6716e27fdf6ff11bf5bd7b8732d1acc22df26a6e274c321ba925bdec4d054241287f3e606475660c98bed09e7eec42846a82670d9533c9333c + "@smithy/types": ^3.6.0 + tslib: ^2.6.2 + checksum: 1a5248cdbe8d982e11fba679e9582cde8fa36093376d5076d2936e5be919866a7101089194087cda21a0b032857bf1ebca627d8e1c3e5d9519749fc5207692f5 languageName: node linkType: hard -"@popperjs/core@npm:^2.6.0": - version: 2.11.0 - resolution: "@popperjs/core@npm:2.11.0" - checksum: ebf363fb41625106e9f1f3e90a87fcac50bdc714f70a09dd0a87f1ac2a25bec7e9cfe681f66ec04229d1f5ec17d66a06e6e8e93eaa089eb79b005a51b779a58a +"@smithy/node-config-provider@npm:^3.1.4, @smithy/node-config-provider@npm:^3.1.9": + version: 3.1.9 + resolution: "@smithy/node-config-provider@npm:3.1.9" + dependencies: + "@smithy/property-provider": ^3.1.8 + "@smithy/shared-ini-file-loader": ^3.1.9 + "@smithy/types": ^3.6.0 + tslib: ^2.6.2 + checksum: 2ecd0385858f0ea818f7bef1e129e62fccd8a6ffa888f2f13286f8ffe1995f84e0e5040b7ed7b5235462ac795e9fc479ca5c5637b3bf30df2613baa6f4e718c9 languageName: node linkType: hard -"@redux-offline/redux-offline@npm:2.6.0-native.1": - version: 2.6.0-native.1 - resolution: "@redux-offline/redux-offline@npm:2.6.0-native.1" +"@smithy/node-http-handler@npm:^3.1.4, @smithy/node-http-handler@npm:^3.2.5": + version: 3.2.5 + resolution: "@smithy/node-http-handler@npm:3.2.5" dependencies: - "@babel/runtime": ^7.9.6 - redux-persist: ^4.6.0 - peerDependencies: - redux: ">=3" - checksum: a5b7a16304f063b263de246fe25f5e2d917afe62483cec4390d40190b8011a1d1144ec3da8284226d147e205951a476203d749c36aedf559990b0a642e56d3ed + "@smithy/abort-controller": ^3.1.6 + "@smithy/protocol-http": ^4.1.5 + "@smithy/querystring-builder": ^3.0.8 + "@smithy/types": ^3.6.0 + tslib: ^2.6.2 + checksum: 617b2f1c3fea4f8b549b481ec73ec2a7a404b8a8c8b47bfb8327626818f84ed94c1c5496084402a015705af715b5353a07d28ea0869ee6c877c4c8a9d29a10ab languageName: node linkType: hard -"@rollup/plugin-babel@npm:^5.2.0": - version: 5.3.1 - resolution: "@rollup/plugin-babel@npm:5.3.1" +"@smithy/property-provider@npm:^3.1.3, @smithy/property-provider@npm:^3.1.8": + version: 3.1.8 + resolution: "@smithy/property-provider@npm:3.1.8" dependencies: - "@babel/helper-module-imports": ^7.10.4 - "@rollup/pluginutils": ^3.1.0 - peerDependencies: - "@babel/core": ^7.0.0 - "@types/babel__core": ^7.1.9 - rollup: ^1.20.0||^2.0.0 - peerDependenciesMeta: - "@types/babel__core": - optional: true - checksum: 2766134dd5567c0d4fd6909d1f511ce9bf3bd9d727e1bc5ffdd6097a3606faca324107ae8e0961839ee4dbb45e5e579ae601efe472fc0a271259aea79920cafa + "@smithy/types": ^3.6.0 + tslib: ^2.6.2 + checksum: 383621a8cf8aafb4a30ecf105fb6d9546f75fac7134b9d9e91248ebacb035867047170cbe01d4ca8d60b62d1fb6287d4fb3a752a10fe9b33f9520a951d0bb72c languageName: node linkType: hard -"@rollup/plugin-node-resolve@npm:^11.2.1": - version: 11.2.1 - resolution: "@rollup/plugin-node-resolve@npm:11.2.1" +"@smithy/protocol-http@npm:^4.1.0, @smithy/protocol-http@npm:^4.1.4, @smithy/protocol-http@npm:^4.1.5": + version: 4.1.5 + resolution: "@smithy/protocol-http@npm:4.1.5" dependencies: - "@rollup/pluginutils": ^3.1.0 - "@types/resolve": 1.17.1 - builtin-modules: ^3.1.0 - deepmerge: ^4.2.2 - is-module: ^1.0.0 - resolve: ^1.19.0 - peerDependencies: - rollup: ^1.20.0||^2.0.0 - checksum: a8226b01352ee1f7133b1b59b3906267e11c99020a55e3b7a313e03889f790d1cd94e7f7769d3963261e897c3265082533ba595976f8e3f08cf70aa88bf1ddd7 + "@smithy/types": ^3.6.0 + tslib: ^2.6.2 + checksum: f70bd473e3c79cd33a5e1f02a30251f3e4bfa127615f6032d980a483f8abed76555f525e55f0eb8b5ac7d33dd5f359498a3e96b98c646a09d83e2d68b1fa949a languageName: node linkType: hard -"@rollup/plugin-replace@npm:^2.4.1": - version: 2.4.2 - resolution: "@rollup/plugin-replace@npm:2.4.2" +"@smithy/querystring-builder@npm:^3.0.3, @smithy/querystring-builder@npm:^3.0.7, @smithy/querystring-builder@npm:^3.0.8": + version: 3.0.8 + resolution: "@smithy/querystring-builder@npm:3.0.8" dependencies: - "@rollup/pluginutils": ^3.1.0 - magic-string: ^0.25.7 - peerDependencies: - rollup: ^1.20.0 || ^2.0.0 - checksum: ea3d27291c791661638b91809d0247dde1ee71be0b16fa7060078c2700db3669eada2c3978ea979b917b29ebe06f3fddc8797feae554da966264a22142b5771a + "@smithy/types": ^3.6.0 + "@smithy/util-uri-escape": ^3.0.0 + tslib: ^2.6.2 + checksum: d3bd7af1e291bca9ac7693f6d4bfd7ae196cb3c5b26895974029163b3b9a86c03b5533fd79f9dafca6250db80a1da7be33d7d2e87eb6bf7bcde61370ea612f7e languageName: node linkType: hard -"@rollup/pluginutils@npm:^3.1.0": - version: 3.1.0 - resolution: "@rollup/pluginutils@npm:3.1.0" +"@smithy/querystring-parser@npm:^3.0.8": + version: 3.0.8 + resolution: "@smithy/querystring-parser@npm:3.0.8" dependencies: - "@types/estree": 0.0.39 - estree-walker: ^1.0.1 - picomatch: ^2.2.2 - peerDependencies: - rollup: ^1.20.0||^2.0.0 - checksum: 7151753160d15ba2b259461a6c25b3932150994ea52dba8fd3144f634c7647c2e56733d986e2c15de67c4d96a9ee7d6278efa6d2e626a7169898fd64adc0f90c + "@smithy/types": ^3.6.0 + tslib: ^2.6.2 + checksum: 8f5643f80e6146e849f239b912e555a4f146b0239da9de5f67fc99e5e2b97460ff4c54395417b14874409f071667bb1149f3ef5d1b1cc6288bbe04e21fc9bb7a languageName: node linkType: hard -"@rushstack/eslint-patch@npm:^1.1.0": - version: 1.1.3 - resolution: "@rushstack/eslint-patch@npm:1.1.3" - checksum: edf2de575a66faa12c63630dc2e46bc523e637ce86d02e305ea5f66854839d3e0d77135f8418845eabbbf6a78da79ce79aa0015894792cde36269855598290c8 +"@smithy/service-error-classification@npm:^3.0.8": + version: 3.0.8 + resolution: "@smithy/service-error-classification@npm:3.0.8" + dependencies: + "@smithy/types": ^3.6.0 + checksum: 30256b7b1e4ff877a555ae778954e535bd43cc5da9189ad265b9596a6414774d8a6924da42f5c87e9dfe837d44027cb22d26037c3bb3e6c64ff486c9b8b5ee53 languageName: node linkType: hard -"@rushstack/node-core-library@npm:3.58.0": - version: 3.58.0 - resolution: "@rushstack/node-core-library@npm:3.58.0" +"@smithy/shared-ini-file-loader@npm:^3.1.4, @smithy/shared-ini-file-loader@npm:^3.1.9": + version: 3.1.9 + resolution: "@smithy/shared-ini-file-loader@npm:3.1.9" dependencies: - colors: ~1.2.1 - fs-extra: ~7.0.1 - import-lazy: ~4.0.0 - jju: ~1.4.0 - resolve: ~1.22.1 - semver: ~7.3.0 - z-schema: ~5.0.2 - peerDependencies: - "@types/node": "*" - peerDependenciesMeta: - "@types/node": - optional: true - checksum: 159399e423b873bb13e37724bc857946749c6097fbde157b7bffa8c715db86eaa176d1844ff0a8e3cc18362740163273f5f3ef3aa5861b339f91f20251d079a1 + "@smithy/types": ^3.6.0 + tslib: ^2.6.2 + checksum: 0ca909741d634fa2ea5c53dc828347181495be431d5018b8cea468e30e5d7066b91bf39b0e182148b787ecadb0509c95e41338829b6de87d03c0f072fa436d8c languageName: node linkType: hard -"@rushstack/rig-package@npm:0.3.18": - version: 0.3.18 - resolution: "@rushstack/rig-package@npm:0.3.18" +"@smithy/signature-v4@npm:^4.1.0": + version: 4.2.1 + resolution: "@smithy/signature-v4@npm:4.2.1" dependencies: - resolve: ~1.22.1 - strip-json-comments: ~3.1.1 - checksum: f0d5a4236d24d3b3d06b3183a2631f96ea2daed601cf59844f7409ee43895ef13d4df10fea3646ba16c4480b03dfdc47f2592dbdece7ddf9df0186fa98c7a3ad + "@smithy/is-array-buffer": ^3.0.0 + "@smithy/protocol-http": ^4.1.5 + "@smithy/types": ^3.6.0 + "@smithy/util-hex-encoding": ^3.0.0 + "@smithy/util-middleware": ^3.0.8 + "@smithy/util-uri-escape": ^3.0.0 + "@smithy/util-utf8": ^3.0.0 + tslib: ^2.6.2 + checksum: c1dc0c4adc65c6019321cc15ca1f8b185bc682c80d6f3b3034653d523dd5da197db4f2fe892cdb3d0152b967eeee97cba085e45e4deed8035bcec23adfd6ee24 languageName: node linkType: hard -"@rushstack/ts-command-line@npm:4.13.2": - version: 4.13.2 - resolution: "@rushstack/ts-command-line@npm:4.13.2" +"@smithy/smithy-client@npm:^3.1.12, @smithy/smithy-client@npm:^3.4.2": + version: 3.4.2 + resolution: "@smithy/smithy-client@npm:3.4.2" dependencies: - "@types/argparse": 1.0.38 - argparse: ~1.0.9 - colors: ~1.2.1 - string-argv: ~0.3.1 - checksum: 77b2dd4eb0240695e324a4f31f83e20e5cb30666f355ef2be19f2562249e9364daa57c55c1a2abff9fc4e96033805b3f72af70c4ade92abadf3b1f0d69b35fb1 + "@smithy/core": ^2.5.1 + "@smithy/middleware-endpoint": ^3.2.1 + "@smithy/middleware-stack": ^3.0.8 + "@smithy/protocol-http": ^4.1.5 + "@smithy/types": ^3.6.0 + "@smithy/util-stream": ^3.2.1 + tslib: ^2.6.2 + checksum: f405aba8f3c831a3b6d2b4b0799c8de2e3216aec7b6045d79c41a4cb577368b179d6214bb4abfa345d1dd7c100ffa9a5ad04c04d128dfced587aa54fc1647f50 languageName: node linkType: hard -"@semantic-ui-react/css-patch@npm:^1.0.0": - version: 1.0.0 - resolution: "@semantic-ui-react/css-patch@npm:1.0.0" +"@smithy/types@npm:^3.3.0, @smithy/types@npm:^3.5.0, @smithy/types@npm:^3.6.0": + version: 3.6.0 + resolution: "@smithy/types@npm:3.6.0" dependencies: - chalk: ^3.0.0 - log-symbols: ^3.0.0 - bin: - semantic-ui-css-patch: dist-node/index.bin.js - checksum: d0e724fbc27aa2c294a3706a8d4217274da7d5c5a48944b71514cebc75dc7b4093c92a7356ae6997a27d2969a54650a2f27d0a312e2dd87fd648bd3d6345e372 + tslib: ^2.6.2 + checksum: de16293da6cf6f1aa4b2ee604df245ef33688d985f27b5dae3aa69e18ed5b17baa1bc1a42412f1454c50d09a1817c8a54e7d6261c90fee230e103ff91e55174a languageName: node linkType: hard -"@semantic-ui-react/event-stack@npm:^3.1.3": - version: 3.1.3 - resolution: "@semantic-ui-react/event-stack@npm:3.1.3" +"@smithy/url-parser@npm:^3.0.3, @smithy/url-parser@npm:^3.0.8": + version: 3.0.8 + resolution: "@smithy/url-parser@npm:3.0.8" dependencies: - exenv: ^1.2.2 - prop-types: ^15.6.2 - peerDependencies: - react: ^16.0.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.0.0 || ^17.0.0 || ^18.0.0 - checksum: 9f96516c16c8e4d985e9d9ed02c92bc2857563c434ee8b2703b7dbd2fefe9f4e84d5b9e108e5d172ed6002db2978c46c6c6eeee6100552b743be4f3a51ed78e8 + "@smithy/querystring-parser": ^3.0.8 + "@smithy/types": ^3.6.0 + tslib: ^2.6.2 + checksum: da2abb72e58bf419a7f27f78a2f946a515dff363419056015a2fa5f62d18de9f51d355143c428d2411051264552ae4e0d746e943fcb0c6ae3758912294a6499d languageName: node linkType: hard -"@sigstore/protobuf-specs@npm:^0.1.0": - version: 0.1.0 - resolution: "@sigstore/protobuf-specs@npm:0.1.0" - checksum: fa373952653d4ea32c593f754cf04c56a57287c7357e830c9ded10c47318fe8e9ec82900109e63f60380828145928ec67f4a6229fc73da45b9771a3139e82f8f +"@smithy/util-base64@npm:^3.0.0": + version: 3.0.0 + resolution: "@smithy/util-base64@npm:3.0.0" + dependencies: + "@smithy/util-buffer-from": ^3.0.0 + "@smithy/util-utf8": ^3.0.0 + tslib: ^2.6.2 + checksum: 5c05c3505bd1ac4c1e04ec0e22ad1c9e0c61756945735861614f9e46146369a1a112dd0895602475822c18b8f1fe0cc3fb9e45c99a4e7fb03308969c673cf043 languageName: node linkType: hard -"@sinclair/typebox@npm:^0.25.16": - version: 0.25.24 - resolution: "@sinclair/typebox@npm:0.25.24" - checksum: 2faf9878f3a65a1f2855add80b0fe8c6fe83f084ea1ab432fa7506e7c85c55ae121c4af516d089b5737f5fad23b3628fcc83a6a5df29030c3f611185ce0388ac +"@smithy/util-body-length-browser@npm:^3.0.0": + version: 3.0.0 + resolution: "@smithy/util-body-length-browser@npm:3.0.0" + dependencies: + tslib: ^2.6.2 + checksum: cfb595e814334fe7bb78e8381141cc7364f66bff0c1d672680f4abb99361ef66fbdb9468fa1dbabcd5753254b2b05c59c907fa9d600b36e6e4b8423eccf412f7 languageName: node linkType: hard -"@sindresorhus/is@npm:^4.0.0": - version: 4.6.0 - resolution: "@sindresorhus/is@npm:4.6.0" - checksum: 33b6fb1d0834ec8dd7689ddc0e2781c2bfd8b9c4e4bacbcb14111e0ae00621f2c264b8a7d36541799d74888b5dccdf422a891a5cb5a709ace26325eedc81e22e +"@smithy/util-body-length-node@npm:^3.0.0": + version: 3.0.0 + resolution: "@smithy/util-body-length-node@npm:3.0.0" + dependencies: + tslib: ^2.6.2 + checksum: 6f779848e7c81051364cf6e40ed61034a06fa8df3480398528baae54d9b69622abc7d068869e33dbe51fef2bbc6fda3f548ac59644a0f10545a54c87bc3a4391 languageName: node linkType: hard -"@sinonjs/commons@npm:^1, @sinonjs/commons@npm:^1.3.0, @sinonjs/commons@npm:^1.4.0, @sinonjs/commons@npm:^1.6.0, @sinonjs/commons@npm:^1.7.0, @sinonjs/commons@npm:^1.8.3": - version: 1.8.3 - resolution: "@sinonjs/commons@npm:1.8.3" +"@smithy/util-buffer-from@npm:^2.0.0": + version: 2.0.0 + resolution: "@smithy/util-buffer-from@npm:2.0.0" dependencies: - type-detect: 4.0.8 - checksum: e4d2471feb19f735654f798fcdf389b90fab5913da609f566b04c4cdd9131a97e897d565251d35389aeebcca70a22ab4ed2291c7f7927706ead12e4f94841bf1 + "@smithy/is-array-buffer": ^2.0.0 + tslib: ^2.5.0 + checksum: 21bcfe8f9dc66775970cd5d0fb401bcda39715e558f3309d0a5c1d6dc2d2cb40ed0a259748346f282b40398707f222791e6e9637174d82a510bd5eaad69dd0ca languageName: node linkType: hard -"@sinonjs/commons@npm:^2.0.0": - version: 2.0.0 - resolution: "@sinonjs/commons@npm:2.0.0" +"@smithy/util-buffer-from@npm:^3.0.0": + version: 3.0.0 + resolution: "@smithy/util-buffer-from@npm:3.0.0" dependencies: - type-detect: 4.0.8 - checksum: babe3fdfc7dfb810f6918f2ae055032a1c7c18910595f1c6bfda87bb1737c1a57268d4ca78c3d8ad2fa4aae99ff79796fad76be735a5a38ab763c0b3cfad1ae7 + "@smithy/is-array-buffer": ^3.0.0 + tslib: ^2.6.2 + checksum: b10fb81ef34f95418f27c9123c2c1774e690dd447e8064184688c553156bdec46d2ba1b1ae3bad7edd2b58a5ef32ac569e1ad814b36e7ee05eba10526d329983 languageName: node linkType: hard -"@sinonjs/fake-timers@npm:>=5, @sinonjs/fake-timers@npm:^10.0.2": - version: 10.0.2 - resolution: "@sinonjs/fake-timers@npm:10.0.2" +"@smithy/util-config-provider@npm:^3.0.0": + version: 3.0.0 + resolution: "@smithy/util-config-provider@npm:3.0.0" dependencies: - "@sinonjs/commons": ^2.0.0 - checksum: 24555ed94053319fa18d4efa0923b295a445a00d2515d260b9e4e2b5943bd8b5b55fee85baabb2819a13ca1f57dbc1949265a350f592eef9e2535ec9de711ebc + tslib: ^2.6.2 + checksum: a2c25eac31223eddea306beff2bb3c32e8761f8cb50e8cb2a9d61417a5040e9565dc715a655787e99a37465fdd35bbd0668ff36e06043a5f6b7be48a76974792 languageName: node linkType: hard -"@sinonjs/fake-timers@npm:^6.0.1": - version: 6.0.1 - resolution: "@sinonjs/fake-timers@npm:6.0.1" +"@smithy/util-defaults-mode-browser@npm:^3.0.14": + version: 3.0.25 + resolution: "@smithy/util-defaults-mode-browser@npm:3.0.25" dependencies: - "@sinonjs/commons": ^1.7.0 - checksum: a77bead4d71b40d6f7f9a3ad66a00269aa2c078260f43f594b8aed4676c6c4e7c2b642d4b8e34df314e1c971589455f7b4267ab831bf44ffdccc0bda599850ad + "@smithy/property-provider": ^3.1.8 + "@smithy/smithy-client": ^3.4.2 + "@smithy/types": ^3.6.0 + bowser: ^2.11.0 + tslib: ^2.6.2 + checksum: 725f1ee8f726177dd299cb3360c6b12f817defef917b9229cd5a9201a69dd29e07e1df24d90c3559b07b75bc7b90fbce74677ec9ff2ee8845e2d76c4e8c1a4fb languageName: node linkType: hard -"@sinonjs/fake-timers@npm:^8.0.1": - version: 8.1.0 - resolution: "@sinonjs/fake-timers@npm:8.1.0" +"@smithy/util-defaults-mode-node@npm:^3.0.14": + version: 3.0.25 + resolution: "@smithy/util-defaults-mode-node@npm:3.0.25" dependencies: - "@sinonjs/commons": ^1.7.0 - checksum: d6b795f9ddaf044daf184c151555ca557ccd23636f2ee3d2f76a9d128329f81fc1aac412f6f67239ab92cb9390aad9955b71df93cf4bd442c68b1f341e381ab6 + "@smithy/config-resolver": ^3.0.10 + "@smithy/credential-provider-imds": ^3.2.5 + "@smithy/node-config-provider": ^3.1.9 + "@smithy/property-provider": ^3.1.8 + "@smithy/smithy-client": ^3.4.2 + "@smithy/types": ^3.6.0 + tslib: ^2.6.2 + checksum: 5fd1f18aafff469ff537e07568e2c329602fe99c31a45654c09a27bf4fa38b74652b3b4d43d3e3fd9c9dc8186f1401883b1d392bc71f2b0aa72479820edf0337 languageName: node linkType: hard -"@sinonjs/fake-timers@npm:^9.1.2": - version: 9.1.2 - resolution: "@sinonjs/fake-timers@npm:9.1.2" +"@smithy/util-endpoints@npm:^2.0.5": + version: 2.1.4 + resolution: "@smithy/util-endpoints@npm:2.1.4" dependencies: - "@sinonjs/commons": ^1.7.0 - checksum: d9187f9130f03272562ff9845867299c6f7cf15157bbb3e6aca4a1f06d885b0eef54259d0ad41e2f8043dc530b4db730b6c9415b169033e7ba8fed0ad449ceec + "@smithy/node-config-provider": ^3.1.9 + "@smithy/types": ^3.6.0 + tslib: ^2.6.2 + checksum: 8ef44b2ac241a5687c999f90e0aaf6f495cc46b0a604f82f44c927f7ce2f406dac53bb4030f4a83b5cf2fc5f1c73865f5ca9bea0db297e06d0fe089cb765ebae languageName: node linkType: hard -"@sinonjs/formatio@npm:^3.2.1": - version: 3.2.2 - resolution: "@sinonjs/formatio@npm:3.2.2" +"@smithy/util-hex-encoding@npm:^3.0.0": + version: 3.0.0 + resolution: "@smithy/util-hex-encoding@npm:3.0.0" dependencies: - "@sinonjs/commons": ^1 - "@sinonjs/samsam": ^3.1.0 - checksum: 13412a8cbcc5ea861745b27b18eb51ee4aacca59108c17690944d1f2d8cc8fa2e80420780f0e6c3b8bfbc8944b0af8715745db108df20d0aab13255f5c3b9883 + tslib: ^2.6.2 + checksum: d2fa7270853cc8f22c4f4635c72bf52e303731a68a3999e3ea9da1d38b6bf08c0f884e7d20b65741e3bc68bb3821e1abd1c3406d7a3dce8fc02df019aea59162 languageName: node linkType: hard -"@sinonjs/samsam@npm:^3.1.0, @sinonjs/samsam@npm:^3.3.3": - version: 3.3.3 - resolution: "@sinonjs/samsam@npm:3.3.3" +"@smithy/util-middleware@npm:^3.0.3, @smithy/util-middleware@npm:^3.0.8": + version: 3.0.8 + resolution: "@smithy/util-middleware@npm:3.0.8" dependencies: - "@sinonjs/commons": ^1.3.0 - array-from: ^2.1.1 - lodash: ^4.17.15 - checksum: 01b0f1eb28fa54dca2c544153f0ac2e8790a89e5031b8437d27524944f8cc1013d1cb77390533eaefb528e6349936ff96adc30886147ccbdd7daa24d907e83e0 + "@smithy/types": ^3.6.0 + tslib: ^2.6.2 + checksum: b7deae724fade93a00745e64081e7e2dba6a5d86cae9fcfb171cdc117d6574e5a63c1a599dddcc3f3175a8f8821d92052f4b9ab64b3839cdf035ac17e57eede1 languageName: node linkType: hard -"@sinonjs/samsam@npm:^6.1.1": - version: 6.1.1 - resolution: "@sinonjs/samsam@npm:6.1.1" +"@smithy/util-retry@npm:^3.0.3, @smithy/util-retry@npm:^3.0.8": + version: 3.0.8 + resolution: "@smithy/util-retry@npm:3.0.8" dependencies: - "@sinonjs/commons": ^1.6.0 - lodash.get: ^4.4.2 - type-detect: ^4.0.8 - checksum: 1eab31ec5d8d047bbdb2ba6c9680299efbee88663390949e7621e504545ffdd1d1eae4231c4e58b594ca7300033ba60332129c1c4d7c5c0f6d909e5d1327b991 + "@smithy/service-error-classification": ^3.0.8 + "@smithy/types": ^3.6.0 + tslib: ^2.6.2 + checksum: 1ca5fdf8f5827f7cb0dacd917ea2bd1d0a01fe54dc890654094867f6fc78f973f47f4e2e323f35e4951afa12924999527a386f5e271715ba86739dd8aabc72ce languageName: node linkType: hard -"@sinonjs/text-encoding@npm:^0.7.1": - version: 0.7.1 - resolution: "@sinonjs/text-encoding@npm:0.7.1" - checksum: a55d2aa35f30efcafc8ca57841ee9a6c963e969be3ace0a9576f772790fedd36c22be5687df0ad55e1c5ce1961e05c496f2981f5ad3491802bd9212d91ca03e2 +"@smithy/util-stream@npm:^3.1.3, @smithy/util-stream@npm:^3.2.1": + version: 3.2.1 + resolution: "@smithy/util-stream@npm:3.2.1" + dependencies: + "@smithy/fetch-http-handler": ^4.0.0 + "@smithy/node-http-handler": ^3.2.5 + "@smithy/types": ^3.6.0 + "@smithy/util-base64": ^3.0.0 + "@smithy/util-buffer-from": ^3.0.0 + "@smithy/util-hex-encoding": ^3.0.0 + "@smithy/util-utf8": ^3.0.0 + tslib: ^2.6.2 + checksum: 7e73a764ab6fbaef6b266d6a0ad540e04bcd9065d55ead0efc41153e3cd34576e28a944df9176bee8ba84345a59c36625aaa83fa0f8336d2e31c98530c4519a1 + languageName: node + linkType: hard + +"@smithy/util-uri-escape@npm:^3.0.0": + version: 3.0.0 + resolution: "@smithy/util-uri-escape@npm:3.0.0" + dependencies: + tslib: ^2.6.2 + checksum: b8d831348412cfafd9300069e74a12e0075b5e786d7ef6a210ba4ab576001c2525653eec68b71dfe6d7aef71c52f547404c4f0345c0fb476a67277f9d44b1156 + languageName: node + linkType: hard + +"@smithy/util-utf8@npm:^2.0.0": + version: 2.0.0 + resolution: "@smithy/util-utf8@npm:2.0.0" + dependencies: + "@smithy/util-buffer-from": ^2.0.0 + tslib: ^2.5.0 + checksum: 26ecfc2a3c022f9e71dd5ede5d9fe8f1c3ecae6d623fe7504c398bc8ca7387e6a94c9fee4370da543b83220e51ee57c1fea189798c03884cecef21216918c56a + languageName: node + linkType: hard + +"@smithy/util-utf8@npm:^3.0.0": + version: 3.0.0 + resolution: "@smithy/util-utf8@npm:3.0.0" + dependencies: + "@smithy/util-buffer-from": ^3.0.0 + tslib: ^2.6.2 + checksum: b568ed84b4770d2ae9b632eb85603765195a791f045af7f47df1369dc26b001056f4edf488b42ca1cd6d852d0155ad306a0d6531e912cb4e633c0d87abaa8899 + languageName: node + linkType: hard + +"@smithy/util-waiter@npm:^3.1.2": + version: 3.1.7 + resolution: "@smithy/util-waiter@npm:3.1.7" + dependencies: + "@smithy/abort-controller": ^3.1.6 + "@smithy/types": ^3.6.0 + tslib: ^2.6.2 + checksum: 5394b180145af2d6020965c0f58157b137f3fcf5357de4334373bcb143a58190cffb5cdbc39d08b79968fd51a96b88c75da3bfeb7898bb231db7225ea26efe69 languageName: node linkType: hard @@ -9574,6 +9980,13 @@ __metadata: languageName: node linkType: hard +"@tootallnate/quickjs-emscripten@npm:^0.23.0": + version: 0.23.0 + resolution: "@tootallnate/quickjs-emscripten@npm:0.23.0" + checksum: 2a939b781826fb5fd3edd0f2ec3b321d259d760464cf20611c9877205aaca3ccc0b7304dea68416baa0d568e82cd86b17d29548d1e5139fa3155a4a86a2b4b49 + languageName: node + linkType: hard + "@trysound/sax@npm:0.2.0": version: 0.2.0 resolution: "@trysound/sax@npm:0.2.0" @@ -9626,6 +10039,32 @@ __metadata: languageName: node linkType: hard +"@turf/boolean-clockwise@npm:6.5.0": + version: 6.5.0 + resolution: "@turf/boolean-clockwise@npm:6.5.0" + dependencies: + "@turf/helpers": ^6.5.0 + "@turf/invariant": ^6.5.0 + checksum: 2ff4ea1d40af092dc9741245cf0e1b5c92eae9c0e12f198d4799749d321f1483efc732132caf477aa8e88b583c968571870e02e0268d7c50bcb664bdb7bb7e7c + languageName: node + linkType: hard + +"@turf/helpers@npm:^6.5.0": + version: 6.5.0 + resolution: "@turf/helpers@npm:6.5.0" + checksum: 786cbe0c0027f85db286fb3a0b7be04bb29bd63ec07760a49735ef32e9c5b4a7c059a8f691fafa31c7e0e9be34c281e014dc24077438bae01a09b492a680fb6f + languageName: node + linkType: hard + +"@turf/invariant@npm:^6.5.0": + version: 6.5.0 + resolution: "@turf/invariant@npm:6.5.0" + dependencies: + "@turf/helpers": ^6.5.0 + checksum: 5ff9f2043d629cc5f6d3df78452632b2213f17931caa34698d9e8c651640508814b3522d4ab747f36a4b9dfaf6ff64eedc3a04ba62c39ddeb6706f052b621dc6 + languageName: node + linkType: hard + "@types/archiver@npm:^5.1.1, @types/archiver@npm:^5.3.1": version: 5.3.1 resolution: "@types/archiver@npm:5.3.1" @@ -9656,22 +10095,6 @@ __metadata: languageName: node linkType: hard -"@types/babel-generator@npm:^6.25.0": - version: 6.25.5 - resolution: "@types/babel-generator@npm:6.25.5" - dependencies: - "@types/babel-types": "*" - checksum: 7570d07c894b70967af3178ab6dea3fe42184bc65dba3f46752eb909d22cc5a2fb1ed2736b00f486f0994a9a54184684cfe8fd98012630472f3b6128fff7adef - languageName: node - linkType: hard - -"@types/babel-types@npm:*": - version: 7.0.11 - resolution: "@types/babel-types@npm:7.0.11" - checksum: 968415bf9997704d2dfd841ffdf9b80dc824a78fdc0640a48a2bd95d2c238097159af38bfd7d51486cb8c1fde353033d302bfc68a2deb1802d1d7846c0594d1e - languageName: node - linkType: hard - "@types/babel__core@npm:^7.0.0, @types/babel__core@npm:^7.1.14": version: 7.1.19 resolution: "@types/babel__core@npm:7.1.19" @@ -9753,13 +10176,6 @@ __metadata: languageName: node linkType: hard -"@types/ci-info@npm:^2.0.0": - version: 2.0.0 - resolution: "@types/ci-info@npm:2.0.0" - checksum: 5c717136b706de46527bffb73ca897b1c32de519b4ccc32ff9000cbb2993ea2cfe2f79d0bdf840a80deefef21169981d42af5c08446f749775f00c4bf49fbcd2 - languageName: node - linkType: hard - "@types/columnify@npm:^1.5.0, @types/columnify@npm:^1.5.1": version: 1.5.1 resolution: "@types/columnify@npm:1.5.1" @@ -9828,26 +10244,6 @@ __metadata: languageName: node linkType: hard -"@types/eslint-scope@npm:^3.7.3": - version: 3.7.3 - resolution: "@types/eslint-scope@npm:3.7.3" - dependencies: - "@types/eslint": "*" - "@types/estree": "*" - checksum: 3084e2619be57ca318dfddc2557fef855d63ea378d42b6b355216ea3e3aed82ce6adbfa6b620bff1d67aefa95245c5b41e998338bc307c948f8cbf08840b9bb2 - languageName: node - linkType: hard - -"@types/eslint@npm:*": - version: 8.4.1 - resolution: "@types/eslint@npm:8.4.1" - dependencies: - "@types/estree": "*" - "@types/json-schema": "*" - checksum: 3ba1ddb8d2362316bafe65f90aa41ce23f923f8ae6a131e382540a7c0d8ad5f04117e6aba788392717a616bd6e2589a1d954630c49edb364d28dc8eeb5214890 - languageName: node - linkType: hard - "@types/eslint@npm:^7.28.2": version: 7.29.0 resolution: "@types/eslint@npm:7.29.0" @@ -9858,10 +10254,10 @@ __metadata: languageName: node linkType: hard -"@types/estree@npm:*, @types/estree@npm:^0.0.51": - version: 0.0.51 - resolution: "@types/estree@npm:0.0.51" - checksum: a70c60d5e634e752fcd45b58c9c046ef22ad59ede4bc93ad5193c7e3b736ebd6bcd788ade59d9c3b7da6eeb0939235f011d4c59bb4fc04d8c346b76035099dd1 +"@types/estree@npm:*, @types/estree@npm:^1.0.5": + version: 1.0.5 + resolution: "@types/estree@npm:1.0.5" + checksum: b3b0e334288ddb407c7b3357ca67dbee75ee22db242ca7c56fe27db4e1a31989cb8af48a84dd401deb787fe10cc6b2ab1ee82dc4783be87ededbe3d53c79c70d languageName: node linkType: hard @@ -9920,7 +10316,7 @@ __metadata: languageName: node linkType: hard -"@types/fs-extra@npm:^8.0.1, @types/fs-extra@npm:^8.1.0": +"@types/fs-extra@npm:^8.0.1": version: 8.1.2 resolution: "@types/fs-extra@npm:8.1.2" dependencies: @@ -9978,6 +10374,13 @@ __metadata: languageName: node linkType: hard +"@types/http-errors@npm:*": + version: 2.0.4 + resolution: "@types/http-errors@npm:2.0.4" + checksum: 494670a57ad4062fee6c575047ad5782506dd35a6b9ed3894cea65830a94367bd84ba302eb3dde331871f6d70ca287bfedb1b2cf658e6132cd2cbd427ab56836 + languageName: node + linkType: hard + "@types/http-proxy@npm:^1.17.8": version: 1.17.8 resolution: "@types/http-proxy@npm:1.17.8" @@ -10053,13 +10456,6 @@ __metadata: languageName: node linkType: hard -"@types/json-schema@npm:7.0.9": - version: 7.0.9 - resolution: "@types/json-schema@npm:7.0.9" - checksum: 46a9e92b7922495a50f55632d802f7e7ab2dffd76b3f894baf7b28012e73983df832977bedd748aa9a2bc8400c6e8659ca39faf6ccd93d71d41d5b0293338a0e - languageName: node - linkType: hard - "@types/json5@npm:^0.0.29": version: 0.0.29 resolution: "@types/json5@npm:0.0.29" @@ -10099,10 +10495,10 @@ __metadata: languageName: node linkType: hard -"@types/mime@npm:^1": - version: 1.3.2 - resolution: "@types/mime@npm:1.3.2" - checksum: 61d144e5170c6cdf6de334ec0ee4bb499b1a0fb0233834a9e8cec6d289b0e3042bedf35cbc1c995d71a247635770dae3f13a9ddae69098bb54b933429bc08d35 +"@types/mime@npm:*": + version: 3.0.4 + resolution: "@types/mime@npm:3.0.4" + checksum: db478bc0f99e40f7b3e01d356a9bdf7817060808a294978111340317bcd80ca35382855578c5b60fbc84ae449674bd9bb38427b18417e1f8f19e4f72f8b242cd languageName: node linkType: hard @@ -10129,20 +10525,31 @@ __metadata: languageName: node linkType: hard -"@types/node-fetch@npm:^2.6.1": - version: 2.6.1 - resolution: "@types/node-fetch@npm:2.6.1" +"@types/node-fetch@npm:2.6.4, @types/node-fetch@npm:^2.6.1": + version: 2.6.4 + resolution: "@types/node-fetch@npm:2.6.4" dependencies: "@types/node": "*" form-data: ^3.0.0 - checksum: 033945215fa6b36d5597b21bbdd7d946a751dcd066f8fa71e5f5ab5698390bc2e76e38932ec6ac709def39b6371dfd61844e6804409c7ba812e24d1c820fbff8 + checksum: e43e4670ed8b7693dbf660ac1450b14fcfcdd8efca1eb0f501b6ad95af2d1fa06f8541db03e9511e82a5fee510a238fe0913330c9a58f8ac6892b985f6dd993e + languageName: node + linkType: hard + +"@types/node-forge@npm:^1.3.0": + version: 1.3.11 + resolution: "@types/node-forge@npm:1.3.11" + dependencies: + "@types/node": "*" + checksum: 3d7d23ca0ba38ac0cf74028393bd70f31169ab9aba43f21deb787840170d307d662644bac07287495effe2812ddd7ac8a14dbd43f16c2936bbb06312e96fc3b9 languageName: node linkType: hard -"@types/node@npm:*, @types/node@npm:^18.16.1": - version: 18.16.1 - resolution: "@types/node@npm:18.16.1" - checksum: bd43d9e1df253955d73348ae9c8bc73f328ad3bd5481a134743142a04b0d1b74e39b90369aa0d361fd0b86a6a5c98035a226c1e1a4f67ba98e71b06734cc4f7d +"@types/node@npm:*, @types/node@npm:^18.16.0, @types/node@npm:^18.16.1": + version: 18.19.31 + resolution: "@types/node@npm:18.19.31" + dependencies: + undici-types: ~5.26.4 + checksum: bfebae8389220c0188492c82eaf328f4ba15e6e9b4abee33d6bf36d3b13f188c2f53eb695d427feb882fff09834f467405e2ed9be6aeb6ad4705509822d2ea08 languageName: node linkType: hard @@ -10154,9 +10561,9 @@ __metadata: linkType: hard "@types/node@npm:^16.9.2": - version: 16.11.14 - resolution: "@types/node@npm:16.11.14" - checksum: 017037da8387c85ea92c4ecb06dfb1f511e398ec14504a9395bc92948d58840755066eba991e308b39cf1117648be20cd3c43d184f1ec1339bb60b836dd5e4e7 + version: 16.18.96 + resolution: "@types/node@npm:16.18.96" + checksum: 05ac1c80c8d075086863f7640fd3e75c3912c4ed067bb38bb8fd5377f4e64de7a81d5be3ceae5448dc90d9802a0c7b0d3376538759b91ea652d16cc6dc7de767 languageName: node linkType: hard @@ -10167,12 +10574,12 @@ __metadata: languageName: node linkType: hard -"@types/openpgp@npm:^4.4.18": - version: 4.4.18 - resolution: "@types/openpgp@npm:4.4.18" +"@types/openpgp@npm:^4.4.18, @types/openpgp@npm:^4.4.19": + version: 4.4.19 + resolution: "@types/openpgp@npm:4.4.19" dependencies: "@types/bn.js": "*" - checksum: 01e70eecc91a11878672da1c774babc33ca31e5822f541b32c8d9f6ec2f0c06acd0a679530294a0178d7152a940544053141f149e148fa166456421f351407b3 + checksum: 1d01f52cad3e3996c647467a31aa552b7acadfe6ed8df15088c7ef7d0aaffc49cf16d8cb87a30cbd96071098cc7e09e5f4a876c85430f08a27b7d8653f2e43a6 languageName: node linkType: hard @@ -10183,20 +10590,13 @@ __metadata: languageName: node linkType: hard -"@types/pluralize@npm:0.0.29, @types/pluralize@npm:^0.0.29": +"@types/pluralize@npm:^0.0.29": version: 0.0.29 resolution: "@types/pluralize@npm:0.0.29" checksum: 840796fa1db158eb4d9787758d134736e29d9a8035f5b0cbad06e3801fc64b79112ba944c83f9a1a5b94da08703f505b8315b7e0f28bfc0f8e9e1ccfead7b083 languageName: node linkType: hard -"@types/prettier@npm:^1.19.0": - version: 1.19.1 - resolution: "@types/prettier@npm:1.19.1" - checksum: 41b21f8cfcb3a6816e4a71b8899f7f69013ed1edcf1aa4729db392c97c5288fc293703fee228ce09331cff231294e76ad3aabf264527bc9f7b8aceac5f3a5ee8 - languageName: node - linkType: hard - "@types/prettier@npm:^2.1.5": version: 2.7.2 resolution: "@types/prettier@npm:2.7.2" @@ -10326,13 +10726,14 @@ __metadata: languageName: node linkType: hard -"@types/serve-static@npm:*, @types/serve-static@npm:^1.13.3": - version: 1.13.10 - resolution: "@types/serve-static@npm:1.13.10" +"@types/serve-static@npm:*, @types/serve-static@npm:^1.13.10, @types/serve-static@npm:^1.13.3": + version: 1.15.5 + resolution: "@types/serve-static@npm:1.15.5" dependencies: - "@types/mime": ^1 + "@types/http-errors": "*" + "@types/mime": "*" "@types/node": "*" - checksum: 7f3de245cbb11f3a9d7977b6e763585c6022ebfc079fa746f8d824411bb6b343521c1cff5407edc0d5196f4b7d6fea431fb36455843f4a6717d295c235065cf2 + checksum: 811d1a2f7e74a872195e7a013bcd87a2fb1edf07eaedcb9dcfd20c1eb4bc56ad4ea0d52141c13192c91ccda7c8aeb8a530d8a7e60b9c27f5990d7e62e0fecb03 languageName: node linkType: hard @@ -10437,15 +10838,6 @@ __metadata: languageName: node linkType: hard -"@types/websocket@npm:^1.0.4": - version: 1.0.4 - resolution: "@types/websocket@npm:1.0.4" - dependencies: - "@types/node": "*" - checksum: 007983ad4a2602eec1b8ef5c5152592a7c6b74598f2fca035e5e561c8d1dbc5df39cb462794dfa73ee957074d58d326eb7d5206f20e9fd40e65c58fd6e06d08b - languageName: node - linkType: hard - "@types/which@npm:^1.3.2": version: 1.3.2 resolution: "@types/which@npm:1.3.2" @@ -10462,12 +10854,12 @@ __metadata: languageName: node linkType: hard -"@types/ws@npm:^8.0.0, @types/ws@npm:^8.2.2, @types/ws@npm:^8.5.1": - version: 8.5.3 - resolution: "@types/ws@npm:8.5.3" +"@types/ws@npm:^8.2.2, @types/ws@npm:^8.5.5": + version: 8.5.10 + resolution: "@types/ws@npm:8.5.10" dependencies: "@types/node": "*" - checksum: af36857b804e6df615b401bacf34e9312f073ed9dbeda35be16ee3352d18a4449f27066169893166a6ec17ae51557c3adf8d232ac4a4a0226aafb3267e1f1b39 + checksum: e9af279b984c4a04ab53295a40aa95c3e9685f04888df5c6920860d1dd073fcc57c7bd33578a04b285b2c655a0b52258d34bee0a20569dca8defb8393e1e5d29 languageName: node linkType: hard @@ -10505,7 +10897,7 @@ __metadata: languageName: node linkType: hard -"@types/yargs@npm:^17.0.8": +"@types/yargs@npm:^17, @types/yargs@npm:^17.0.8": version: 17.0.24 resolution: "@types/yargs@npm:17.0.24" dependencies: @@ -10521,15 +10913,6 @@ __metadata: languageName: node linkType: hard -"@types/yauzl@npm:^2.9.1": - version: 2.9.2 - resolution: "@types/yauzl@npm:2.9.2" - dependencies: - "@types/node": "*" - checksum: 0b4a5db8b7b01e94d9c5f48b5043c22553313e9f31918a9755a4bc7875be92a99bf5f11aa260016f553410be517ce64f5a99b14226d878d65d6d1696869a08b1 - languageName: node - linkType: hard - "@types/zen-observable@npm:0.8.0": version: 0.8.0 resolution: "@types/zen-observable@npm:0.8.0" @@ -10742,161 +11125,184 @@ __metadata: languageName: node linkType: hard -"@ungap/promise-all-settled@npm:1.1.2": - version: 1.1.2 - resolution: "@ungap/promise-all-settled@npm:1.1.2" - checksum: 7f9862bae3b6ce30675783428933be1738dca278901a6bcb55c29b8f54c08863ec8e6a7c884119877d90336501c33b7cfda36355ec7af4d703f65f54cb768913 - languageName: node - linkType: hard - -"@webassemblyjs/ast@npm:1.11.1": - version: 1.11.1 - resolution: "@webassemblyjs/ast@npm:1.11.1" +"@webassemblyjs/ast@npm:1.12.1, @webassemblyjs/ast@npm:^1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/ast@npm:1.12.1" dependencies: - "@webassemblyjs/helper-numbers": 1.11.1 - "@webassemblyjs/helper-wasm-bytecode": 1.11.1 - checksum: 6f75b09f17a29e704d2343967c53128cda7c84af2d192a3146de1b53cafaedfe568eca0804bd6c1acc72e1269477ae22d772de1dcf605cdb0adf9768f31d88d7 + "@webassemblyjs/helper-numbers": 1.11.6 + "@webassemblyjs/helper-wasm-bytecode": 1.11.6 + checksum: ba7f2b96c6e67e249df6156d02c69eb5f1bd18d5005303cdc42accb053bebbbde673826e54db0437c9748e97abd218366a1d13fa46859b23cde611b6b409998c languageName: node linkType: hard -"@webassemblyjs/floating-point-hex-parser@npm:1.11.1": - version: 1.11.1 - resolution: "@webassemblyjs/floating-point-hex-parser@npm:1.11.1" - checksum: 9644d9f7163d25aa301cf3be246e35cca9c472b70feda0593b1a43f30525c68d70bfb4b7f24624cd8e259579f1dee32ef28670adaeb3ab1314ffb52a25b831d5 +"@webassemblyjs/floating-point-hex-parser@npm:1.11.6": + version: 1.11.6 + resolution: "@webassemblyjs/floating-point-hex-parser@npm:1.11.6" + checksum: 37fe26f89e18e4ca0e7d89cfe3b9f17cfa327d7daf906ae01400416dbb2e33c8a125b4dc55ad7ff405e5fcfb6cf0d764074c9bc532b9a31a71e762be57d2ea0a languageName: node linkType: hard -"@webassemblyjs/helper-api-error@npm:1.11.1": - version: 1.11.1 - resolution: "@webassemblyjs/helper-api-error@npm:1.11.1" - checksum: 23e6f24100eb21779cd4dcc7c4231fd511622545a7638b195098bcfee79decb54a7e2b3295a12056c3042af7a5d8d62d4023a9194c9cba0311acb304ea20a292 +"@webassemblyjs/helper-api-error@npm:1.11.6": + version: 1.11.6 + resolution: "@webassemblyjs/helper-api-error@npm:1.11.6" + checksum: a681ed51863e4ff18cf38d223429f414894e5f7496856854d9a886eeddcee32d7c9f66290f2919c9bb6d2fc2b2fae3f989b6a1e02a81e829359738ea0c4d371a languageName: node linkType: hard -"@webassemblyjs/helper-buffer@npm:1.11.1": - version: 1.11.1 - resolution: "@webassemblyjs/helper-buffer@npm:1.11.1" - checksum: ab662fc94a017538c538836387492567ed9f23fe4485a86de1834d61834e4327c24659830e1ecd2eea7690ce031a148b59c4724873dc5d3c0bdb71605c7d01af +"@webassemblyjs/helper-buffer@npm:1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/helper-buffer@npm:1.12.1" + checksum: 0270724afb4601237410f7fd845ab58ccda1d5456a8783aadfb16eaaf3f2c9610c28e4a5bcb6ad880cde5183c82f7f116d5ccfc2310502439d33f14b6888b48a languageName: node linkType: hard -"@webassemblyjs/helper-numbers@npm:1.11.1": - version: 1.11.1 - resolution: "@webassemblyjs/helper-numbers@npm:1.11.1" +"@webassemblyjs/helper-numbers@npm:1.11.6": + version: 1.11.6 + resolution: "@webassemblyjs/helper-numbers@npm:1.11.6" dependencies: - "@webassemblyjs/floating-point-hex-parser": 1.11.1 - "@webassemblyjs/helper-api-error": 1.11.1 + "@webassemblyjs/floating-point-hex-parser": 1.11.6 + "@webassemblyjs/helper-api-error": 1.11.6 "@xtuc/long": 4.2.2 - checksum: 8cc7ced66dad8f968a68fbad551ba50562993cefa1add67b31ca6462bb986f7b21b5d7c6444c05dd39312126e10ac48def025dec6277ce0734665191e05acde7 + checksum: c7d5afc0ff3bd748339b466d8d2f27b908208bf3ff26b2e8e72c39814479d486e0dca6f3d4d776fd9027c1efe05b5c0716c57a23041eb34473892b2731c33af3 languageName: node linkType: hard -"@webassemblyjs/helper-wasm-bytecode@npm:1.11.1": - version: 1.11.1 - resolution: "@webassemblyjs/helper-wasm-bytecode@npm:1.11.1" - checksum: f14e2bd836fed1420fe7507919767de16346a013bbac97b6b6794993594f37b5f0591d824866a7b32f47524cef8a4a300e5f914952ff2b0ff28659714400c793 +"@webassemblyjs/helper-wasm-bytecode@npm:1.11.6": + version: 1.11.6 + resolution: "@webassemblyjs/helper-wasm-bytecode@npm:1.11.6" + checksum: 79d2bebdd11383d142745efa32781249745213af8e022651847382685ca76709f83e1d97adc5f0d3c2b8546bf02864f8b43a531fdf5ca0748cb9e4e0ef2acaa5 languageName: node linkType: hard -"@webassemblyjs/helper-wasm-section@npm:1.11.1": - version: 1.11.1 - resolution: "@webassemblyjs/helper-wasm-section@npm:1.11.1" +"@webassemblyjs/helper-wasm-section@npm:1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/helper-wasm-section@npm:1.12.1" dependencies: - "@webassemblyjs/ast": 1.11.1 - "@webassemblyjs/helper-buffer": 1.11.1 - "@webassemblyjs/helper-wasm-bytecode": 1.11.1 - "@webassemblyjs/wasm-gen": 1.11.1 - checksum: e2da4192a843e96c8bf5156cea23193c9dbe12a1440c9c109d3393828f46753faab75fac78ecfe965aa7988723ad9b0b12f3ca0b9e4de75294980e67515460af + "@webassemblyjs/ast": 1.12.1 + "@webassemblyjs/helper-buffer": 1.12.1 + "@webassemblyjs/helper-wasm-bytecode": 1.11.6 + "@webassemblyjs/wasm-gen": 1.12.1 + checksum: 0546350724d285ae3c26e6fc444be4c3b5fb824f3be0ec8ceb474179dc3f4430336dd2e36a44b3e3a1a6815960e5eec98cd9b3a8ec66dc53d86daedd3296a6a2 languageName: node linkType: hard -"@webassemblyjs/ieee754@npm:1.11.1": - version: 1.11.1 - resolution: "@webassemblyjs/ieee754@npm:1.11.1" +"@webassemblyjs/ieee754@npm:1.11.6": + version: 1.11.6 + resolution: "@webassemblyjs/ieee754@npm:1.11.6" dependencies: "@xtuc/ieee754": ^1.2.0 - checksum: 13d6a6ca2e9f35265f10b549cb8354f31a307a7480bbf76c0f4bc8b02e13d5556fb29456cef3815db490effc602c59f98cb0505090ca9e29d7dc61539762a065 + checksum: 59de0365da450322c958deadade5ec2d300c70f75e17ae55de3c9ce564deff5b429e757d107c7ec69bd0ba169c6b6cc2ff66293ab7264a7053c829b50ffa732f languageName: node linkType: hard -"@webassemblyjs/leb128@npm:1.11.1": - version: 1.11.1 - resolution: "@webassemblyjs/leb128@npm:1.11.1" +"@webassemblyjs/leb128@npm:1.11.6": + version: 1.11.6 + resolution: "@webassemblyjs/leb128@npm:1.11.6" dependencies: "@xtuc/long": 4.2.2 - checksum: e505edb5de61f13c6c66c57380ae16e95db9d7c43a41ac132e298426bcead9c90622e3d3035fb63df09d0eeabafd471be35ba583fca72ac2e776ab537dda6883 + checksum: cb344fc04f1968209804de4da018679c5d4708a03b472a33e0fa75657bb024978f570d3ccf9263b7f341f77ecaa75d0e051b9cd4b7bb17a339032cfd1c37f96e languageName: node linkType: hard -"@webassemblyjs/utf8@npm:1.11.1": - version: 1.11.1 - resolution: "@webassemblyjs/utf8@npm:1.11.1" - checksum: a7c13c7c82d525fe774f51a4fc1da058b0e2c73345eed9e2d6fbeb96ba50c1942daf97e0ff394e7a4d0f26b705f9587cb14681870086d51f02abc78ff6ce3703 +"@webassemblyjs/utf8@npm:1.11.6": + version: 1.11.6 + resolution: "@webassemblyjs/utf8@npm:1.11.6" + checksum: 14d6c24751a89ad9d801180b0d770f30a853c39f035a15fbc96266d6ac46355227abd27a3fd2eeaa97b4294ced2440a6b012750ae17bafe1a7633029a87b6bee languageName: node linkType: hard -"@webassemblyjs/wasm-edit@npm:1.11.1": - version: 1.11.1 - resolution: "@webassemblyjs/wasm-edit@npm:1.11.1" +"@webassemblyjs/wasm-edit@npm:^1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/wasm-edit@npm:1.12.1" dependencies: - "@webassemblyjs/ast": 1.11.1 - "@webassemblyjs/helper-buffer": 1.11.1 - "@webassemblyjs/helper-wasm-bytecode": 1.11.1 - "@webassemblyjs/helper-wasm-section": 1.11.1 - "@webassemblyjs/wasm-gen": 1.11.1 - "@webassemblyjs/wasm-opt": 1.11.1 - "@webassemblyjs/wasm-parser": 1.11.1 - "@webassemblyjs/wast-printer": 1.11.1 - checksum: 10bef22579f96f8c0934aa9fbf6f0d9110563f9c1a510100a84fdfa3dbd9126fdc10bfc12e7ce3ace0ba081e6789eac533c81698faab75859b3a41e97b5ab3bc + "@webassemblyjs/ast": 1.12.1 + "@webassemblyjs/helper-buffer": 1.12.1 + "@webassemblyjs/helper-wasm-bytecode": 1.11.6 + "@webassemblyjs/helper-wasm-section": 1.12.1 + "@webassemblyjs/wasm-gen": 1.12.1 + "@webassemblyjs/wasm-opt": 1.12.1 + "@webassemblyjs/wasm-parser": 1.12.1 + "@webassemblyjs/wast-printer": 1.12.1 + checksum: 972f5e6c522890743999e0ed45260aae728098801c6128856b310dd21f1ee63435fc7b518e30e0ba1cdafd0d1e38275829c1e4451c3536a1d9e726e07a5bba0b languageName: node linkType: hard -"@webassemblyjs/wasm-gen@npm:1.11.1": - version: 1.11.1 - resolution: "@webassemblyjs/wasm-gen@npm:1.11.1" +"@webassemblyjs/wasm-gen@npm:1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/wasm-gen@npm:1.12.1" dependencies: - "@webassemblyjs/ast": 1.11.1 - "@webassemblyjs/helper-wasm-bytecode": 1.11.1 - "@webassemblyjs/ieee754": 1.11.1 - "@webassemblyjs/leb128": 1.11.1 - "@webassemblyjs/utf8": 1.11.1 - checksum: 4e49a19e302e19a2a2438e87ae85805acf39a7d93f9ac0ab65620ae395894937ceb762fa328acbe259d2e60d252cbb87a40ec2b4c088f3149be23fa69ddbf855 + "@webassemblyjs/ast": 1.12.1 + "@webassemblyjs/helper-wasm-bytecode": 1.11.6 + "@webassemblyjs/ieee754": 1.11.6 + "@webassemblyjs/leb128": 1.11.6 + "@webassemblyjs/utf8": 1.11.6 + checksum: 1e257288177af9fa34c69cab94f4d9036ebed611f77f3897c988874e75182eeeec759c79b89a7a49dd24624fc2d3d48d5580b62b67c4a1c9bfbdcd266b281c16 languageName: node linkType: hard -"@webassemblyjs/wasm-opt@npm:1.11.1": - version: 1.11.1 - resolution: "@webassemblyjs/wasm-opt@npm:1.11.1" +"@webassemblyjs/wasm-opt@npm:1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/wasm-opt@npm:1.12.1" dependencies: - "@webassemblyjs/ast": 1.11.1 - "@webassemblyjs/helper-buffer": 1.11.1 - "@webassemblyjs/wasm-gen": 1.11.1 - "@webassemblyjs/wasm-parser": 1.11.1 - checksum: af7fd6bcb942baafda3b8cc1e574062d01c582aaa12d4f0ea62ff8e83ce1317f06a79c16313a3bc98625e1226d0fc49ba90edac18c21a64c75e9cd114306f07a + "@webassemblyjs/ast": 1.12.1 + "@webassemblyjs/helper-buffer": 1.12.1 + "@webassemblyjs/wasm-gen": 1.12.1 + "@webassemblyjs/wasm-parser": 1.12.1 + checksum: 992a45e1f1871033c36987459436ab4e6430642ca49328e6e32a13de9106fe69ae6c0ac27d7050efd76851e502d11cd1ac0e06b55655dfa889ad82f11a2712fb languageName: node linkType: hard -"@webassemblyjs/wasm-parser@npm:1.11.1": - version: 1.11.1 - resolution: "@webassemblyjs/wasm-parser@npm:1.11.1" +"@webassemblyjs/wasm-parser@npm:1.12.1, @webassemblyjs/wasm-parser@npm:^1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/wasm-parser@npm:1.12.1" dependencies: - "@webassemblyjs/ast": 1.11.1 - "@webassemblyjs/helper-api-error": 1.11.1 - "@webassemblyjs/helper-wasm-bytecode": 1.11.1 - "@webassemblyjs/ieee754": 1.11.1 - "@webassemblyjs/leb128": 1.11.1 - "@webassemblyjs/utf8": 1.11.1 - checksum: 5a7e8ad36176347f3bc9aee15860a7002b608c181012128ea3e5a1199649d6722e05e029fdf2a73485f2ab3e2f7386b3e0dce46ff9cfd1918417a4ee1151f21e + "@webassemblyjs/ast": 1.12.1 + "@webassemblyjs/helper-api-error": 1.11.6 + "@webassemblyjs/helper-wasm-bytecode": 1.11.6 + "@webassemblyjs/ieee754": 1.11.6 + "@webassemblyjs/leb128": 1.11.6 + "@webassemblyjs/utf8": 1.11.6 + checksum: e85cec1acad07e5eb65b92d37c8e6ca09c6ca50d7ca58803a1532b452c7321050a0328c49810c337cc2dfd100c5326a54d5ebd1aa5c339ebe6ef10c250323a0e languageName: node linkType: hard -"@webassemblyjs/wast-printer@npm:1.11.1": - version: 1.11.1 - resolution: "@webassemblyjs/wast-printer@npm:1.11.1" +"@webassemblyjs/wast-printer@npm:1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/wast-printer@npm:1.12.1" dependencies: - "@webassemblyjs/ast": 1.11.1 + "@webassemblyjs/ast": 1.12.1 "@xtuc/long": 4.2.2 - checksum: cede13c53a176198f949e7f0edf921047c524472b2e4c99edfe829d20e168b4037395479325635b4a3662ea7b4b59be4555ea3bb6050c61b823c68abdb435c74 + checksum: 39bf746eb7a79aa69953f194943bbc43bebae98bd7cadd4d8bc8c0df470ca6bf9d2b789effaa180e900fab4e2691983c1f7d41571458bd2a26267f2f0c73705a + languageName: node + linkType: hard + +"@whatwg-node/events@npm:^0.1.0": + version: 0.1.1 + resolution: "@whatwg-node/events@npm:0.1.1" + checksum: 7e4678c8c092484dc248f4a229a398de30d21190b94ebebc333c2187180207a18e257c4588d0910e872251b3089007f4a2a3ff8b9a4d057fae94db8da28be467 + languageName: node + linkType: hard + +"@whatwg-node/fetch@npm:^0.9.0": + version: 0.9.13 + resolution: "@whatwg-node/fetch@npm:0.9.13" + dependencies: + "@whatwg-node/node-fetch": ^0.4.17 + urlpattern-polyfill: ^9.0.0 + checksum: cd65ac6f41b5f78103cb2b78a5594e871977aeb104adf177ddb89c07867b976b08d5160d97517c156a09a9d172ab40f54804693b10d665533e5a876491f3a09c + languageName: node + linkType: hard + +"@whatwg-node/node-fetch@npm:^0.4.17": + version: 0.4.19 + resolution: "@whatwg-node/node-fetch@npm:0.4.19" + dependencies: + "@whatwg-node/events": ^0.1.0 + busboy: ^1.6.0 + fast-querystring: ^1.1.1 + fast-url-parser: ^1.1.3 + tslib: ^2.3.1 + checksum: a89bb2b4bd6e3da7d4c884e3771532f83a307a123098a19d3ca03351ce8e2961717a51b76fcec6928b400a20989acd8590905a680c28c09057d540e25ceebc2d languageName: node linkType: hard @@ -11020,12 +11426,12 @@ __metadata: languageName: node linkType: hard -"acorn-import-assertions@npm:^1.7.6": - version: 1.8.0 - resolution: "acorn-import-assertions@npm:1.8.0" +"acorn-import-attributes@npm:^1.9.5": + version: 1.9.5 + resolution: "acorn-import-attributes@npm:1.9.5" peerDependencies: acorn: ^8 - checksum: ad8e177a177dcda35a91cca2dc54a7cf6958211c14af2b48e4685a5e752d4782779d367e1d5e275700ad5767834d0063edf2ba85aeafb98d7398f8ebf957e7f5 + checksum: 5926eaaead2326d5a86f322ff1b617b0f698aa61dc719a5baa0e9d955c9885cc71febac3fb5bacff71bbf2c4f9c12db2056883c68c53eb962c048b952e1e013d languageName: node linkType: hard @@ -11056,7 +11462,7 @@ __metadata: languageName: node linkType: hard -"acorn-walk@npm:^8.1.1, acorn-walk@npm:^8.2.0": +"acorn-walk@npm:^8.1.1": version: 8.2.0 resolution: "acorn-walk@npm:8.2.0" checksum: dbe92f5b2452c93e960c5594e666dd1fae141b965ff2cb4a1e1d0381e3e4db4274c5ce4ffa3d681a86ca2a8d4e29d5efc0670a08e23fd2800051ea387df56ca2 @@ -11072,12 +11478,12 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.4.1, acorn@npm:^8.5.0, acorn@npm:^8.7.0, acorn@npm:^8.7.1": - version: 8.8.2 - resolution: "acorn@npm:8.8.2" +"acorn@npm:^8.4.1, acorn@npm:^8.7.0, acorn@npm:^8.7.1, acorn@npm:^8.8.2": + version: 8.12.1 + resolution: "acorn@npm:8.12.1" bin: acorn: bin/acorn - checksum: b5c54e736af5ed753911c6752fafd02d0a74cf4d55be606bd81fe71faba4f986dc090952329931ac2aba165803fd0005c59eeef08f9c6c689e8dc420031f3df0 + checksum: 51fb26cd678f914e13287e886da2d7021f8c2bc0ccc95e03d3e0447ee278dd3b40b9c57dc222acd5881adcf26f3edc40901a4953403232129e3876793cd17386 languageName: node linkType: hard @@ -11105,7 +11511,7 @@ __metadata: languageName: node linkType: hard -"agent-base@npm:6, agent-base@npm:^6.0.0, agent-base@npm:^6.0.2": +"agent-base@npm:6, agent-base@npm:^6.0.2": version: 6.0.2 resolution: "agent-base@npm:6.0.2" dependencies: @@ -11114,6 +11520,15 @@ __metadata: languageName: node linkType: hard +"agent-base@npm:^7.0.1, agent-base@npm:^7.0.2, agent-base@npm:^7.1.0": + version: 7.1.0 + resolution: "agent-base@npm:7.1.0" + dependencies: + debug: ^4.3.4 + checksum: fc974ab57ffdd8421a2bc339644d312a9cca320c20c3393c9d8b1fd91731b9bbabdb985df5fc860f5b79d81c3e350daa3fcb31c5c07c0bb385aafc817df004ce + languageName: node + linkType: hard + "agentkeepalive@npm:^4.2.1": version: 4.2.1 resolution: "agentkeepalive@npm:4.2.1" @@ -11158,7 +11573,7 @@ __metadata: languageName: node linkType: hard -"ajv-keywords@npm:^5.0.0": +"ajv-keywords@npm:^5.1.0": version: 5.1.0 resolution: "ajv-keywords@npm:5.1.0" dependencies: @@ -11181,7 +11596,7 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^8.0.0, ajv@npm:^8.0.1, ajv@npm:^8.11.0, ajv@npm:^8.6.0, ajv@npm:^8.8.0": +"ajv@npm:^8.0.0, ajv@npm:^8.0.1, ajv@npm:^8.11.0, ajv@npm:^8.6.0, ajv@npm:^8.9.0": version: 8.12.0 resolution: "ajv@npm:8.12.0" dependencies: @@ -11193,16 +11608,16 @@ __metadata: languageName: node linkType: hard -"amazon-cognito-identity-js@npm:5.2.3": - version: 5.2.3 - resolution: "amazon-cognito-identity-js@npm:5.2.3" +"amazon-cognito-identity-js@npm:6.3.11": + version: 6.3.11 + resolution: "amazon-cognito-identity-js@npm:6.3.11" dependencies: + "@aws-crypto/sha256-js": 1.2.2 buffer: 4.9.2 - crypto-js: ^4.1.1 fast-base64-decode: ^1.0.0 isomorphic-unfetch: ^3.0.0 js-cookie: ^2.2.1 - checksum: 2210b65a0f87744ce017512fa13856e67fa3c7c0766a79ab991b67e8fe3776eeb763ce33061e6bba223090c9c8a85e9502ecf3c4e40c1f5c1aea4c43b72f31fa + checksum: 4619e4c19770722ac243c98fb7d4aff35eb0b8f5a2db9ea31a5765f5c54deb7245e316e7e9f633f07d70520f13be157fc90c6139c5f0f2ecc59e5e7d16ee76b1 languageName: node linkType: hard @@ -11218,7 +11633,7 @@ __metadata: resolution: "amplify-cli@workspace:." dependencies: "@babel/cli": ^7.10.5 - "@babel/core": ^7.10.5 + "@babel/core": ^7.23.2 "@babel/plugin-proposal-numeric-separator": ^7.10.4 "@babel/plugin-transform-modules-commonjs": 7.10.4 "@babel/plugin-transform-typescript": 7.10.5 @@ -11232,6 +11647,7 @@ __metadata: "@types/jest": ^29.0.0 "@types/js-yaml": ^4.0.0 "@types/node": ^18.16.1 + "@types/yargs": ^17 "@typescript-eslint/eslint-plugin": ^5.34.0 "@typescript-eslint/parser": ^5.34.0 "@zkochan/cmd-shim": ^5.1.0 @@ -11253,7 +11669,7 @@ __metadata: eslint-plugin-spellcheck: ^0.0.17 execa: ^5.1.1 glob: ^7.2.0 - husky: ^3.1.0 + husky: ^8.0.3 istanbul-lib-coverage: ^3.2.0 istanbul-lib-report: ^3.0.0 istanbul-reports: ^3.1.5 @@ -11273,21 +11689,23 @@ __metadata: ts-jest: ^29.0.0 ts-node: ^10.4.0 typescript: ^4.9.5 + yargs: ^17.7.2 languageName: unknown linkType: soft -"amplify-codegen@npm:^4.1.1": - version: 4.1.1 - resolution: "amplify-codegen@npm:4.1.1" +"amplify-codegen@npm:^4.10.2": + version: 4.10.2 + resolution: "amplify-codegen@npm:4.10.2" dependencies: - "@aws-amplify/appsync-modelgen-plugin": 2.4.5 - "@aws-amplify/graphql-docs-generator": 4.0.2 - "@aws-amplify/graphql-types-generator": 3.0.2 - "@graphql-codegen/core": 2.6.6 + "@aws-amplify/graphql-directives": ^1.0.1 + "@aws-amplify/graphql-docs-generator": 4.2.1 + "@aws-amplify/graphql-generator": 0.5.2 + "@aws-amplify/graphql-types-generator": 3.6.0 + "@graphql-codegen/core": ^2.6.6 chalk: ^3.0.0 fs-extra: ^8.1.0 - glob-all: ^3.1.0 glob-parent: ^6.0.2 + globby: ^11.1.0 graphql: ^15.5.0 graphql-config: ^2.2.1 inquirer: ^7.3.3 @@ -11297,19 +11715,19 @@ __metadata: semver: ^7.3.5 slash: ^3.0.0 peerDependencies: - "@aws-amplify/amplify-cli-core": ^4.0.0 + "@aws-amplify/amplify-cli-core": "*" graphql-transformer-core: ^8.0.0 - checksum: 85f5345d70746b1a66d864883d815c8dc3dea77630a60b7f332ec60dfcded4e37f528990bf8ccbf76cca689b6fde18795f069a81d9c63b3e63c0c26917fcf0a0 + checksum: b297c8ece7b5a2a17853cde69d5d620b42ecdd42515832f4edd03936ec9bcf6592f9f2d7a8b0dd86ad27b39b3404b1002559b28700ab5c218a199f42db768167 languageName: node linkType: hard -"amplify-dotnet-function-runtime-provider@2.0.3, amplify-dotnet-function-runtime-provider@workspace:packages/amplify-dotnet-function-runtime-provider": +"amplify-dotnet-function-runtime-provider@2.1.1, amplify-dotnet-function-runtime-provider@workspace:packages/amplify-dotnet-function-runtime-provider": version: 0.0.0-use.local resolution: "amplify-dotnet-function-runtime-provider@workspace:packages/amplify-dotnet-function-runtime-provider" dependencies: - "@aws-amplify/amplify-cli-core": 4.0.8 - "@aws-amplify/amplify-function-plugin-interface": 1.10.2 - "@aws-amplify/amplify-prompts": 2.7.0 + "@aws-amplify/amplify-cli-core": 4.3.11 + "@aws-amplify/amplify-function-plugin-interface": 1.12.1 + "@aws-amplify/amplify-prompts": 2.8.6 "@types/node": ^12.12.6 "@types/which": ^1.3.2 execa: ^5.1.1 @@ -11319,12 +11737,12 @@ __metadata: languageName: unknown linkType: soft -"amplify-dynamodb-simulator@2.7.3, amplify-dynamodb-simulator@workspace:packages/amplify-dynamodb-simulator": +"amplify-dynamodb-simulator@2.9.20, amplify-dynamodb-simulator@workspace:packages/amplify-dynamodb-simulator": version: 0.0.0-use.local resolution: "amplify-dynamodb-simulator@workspace:packages/amplify-dynamodb-simulator" dependencies: - "@aws-amplify/amplify-cli-core": 4.0.8 - aws-sdk: ^2.1354.0 + "@aws-amplify/amplify-cli-core": 4.3.11 + aws-sdk: ^2.1464.0 detect-port: ^1.3.0 execa: ^5.1.1 fs-extra: ^8.1.0 @@ -11344,41 +11762,47 @@ __metadata: version: 0.0.0-use.local resolution: "amplify-e2e-tests@workspace:packages/amplify-e2e-tests" dependencies: - "@aws-amplify/amplify-category-auth": 3.2.3 - "@aws-amplify/amplify-cli-core": 4.0.8 - "@aws-amplify/amplify-e2e-core": 5.0.3 - "@aws-amplify/amplify-opensearch-simulator": 1.4.3 - "@aws-amplify/graphql-transformer-core": ^1.3.2 - "@aws-sdk/client-appsync": ^3.303.0 - "@aws-sdk/client-dynamodb": ^3.303.0 - "@aws-sdk/client-ssm": ^3.303.0 + "@aws-amplify/amplify-category-auth": 3.7.17 + "@aws-amplify/amplify-cli-core": 4.3.11 + "@aws-amplify/amplify-e2e-core": 5.7.1 + "@aws-amplify/amplify-opensearch-simulator": 1.7.16 + "@aws-amplify/graphql-transformer-core": ^2.9.4 + "@aws-sdk/client-appsync": 3.624.0 + "@aws-sdk/client-dynamodb": 3.624.0 + "@aws-sdk/client-s3": 3.624.0 + "@aws-sdk/client-ssm": 3.624.0 + "@babel/core": ^7.23.2 + "@babel/plugin-transform-modules-commonjs": 7.10.4 "@types/body-parser": ^1.19.2 "@types/express": ^4.17.3 "@types/lodash": ^4.14.149 "@types/node": ^18.16.1 + "@types/openpgp": ^4.4.18 "@types/ws": ^7.4.4 - amplify-dynamodb-simulator: 2.7.3 - amplify-headless-interface: 1.17.3 - amplify-storage-simulator: 1.9.0 - aws-amplify: ^4.2.8 + amplify-dynamodb-simulator: 2.9.20 + amplify-headless-interface: 1.17.7 + amplify-storage-simulator: 1.11.6 + aws-amplify: ^5.3.16 aws-appsync: ^4.1.1 - aws-cdk-lib: ~2.68.0 - aws-sdk: ^2.1354.0 - axios: ^0.26.0 - circleci-api: ^4.1.4 + aws-cdk-lib: ~2.177.0 + aws-sdk: ^2.1464.0 + axios: ^1.6.7 constructs: ^10.0.5 dotenv: ^8.2.0 esm: ^3.2.25 execa: ^5.1.1 - extract-zip: ^2.0.1 fs-extra: ^8.1.0 + get-port: ^5.1.1 glob: ^8.0.3 graphql-tag: ^2.10.1 - graphql-transformer-core: ^8.1.2 + graphql-transformer-core: ^8.2.13 isomorphic-fetch: ^3.0.0 jest: ^29.5.0 lodash: ^4.17.21 + moment: ^2.24.0 node-fetch: ^2.6.7 + node-pty: ^1.0.0 + openpgp: ^5.10.2 rimraf: ^3.0.0 title-case: ^3.0.3 ts-jest: ^29.1.0 @@ -11390,12 +11814,12 @@ __metadata: languageName: unknown linkType: soft -"amplify-go-function-runtime-provider@2.3.21, amplify-go-function-runtime-provider@workspace:packages/amplify-go-function-runtime-provider": +"amplify-go-function-runtime-provider@2.3.48, amplify-go-function-runtime-provider@workspace:packages/amplify-go-function-runtime-provider": version: 0.0.0-use.local resolution: "amplify-go-function-runtime-provider@workspace:packages/amplify-go-function-runtime-provider" dependencies: - "@aws-amplify/amplify-cli-core": 4.0.8 - "@aws-amplify/amplify-function-plugin-interface": 1.10.2 + "@aws-amplify/amplify-cli-core": 4.3.11 + "@aws-amplify/amplify-function-plugin-interface": 1.12.1 "@types/archiver": ^5.1.1 "@types/node": ^12.12.6 "@types/semver": ^7.1.0 @@ -11405,44 +11829,12 @@ __metadata: fs-extra: ^8.1.0 get-port: ^5.1.1 glob: ^7.2.0 - semver: ^7.3.5 + semver: ^7.5.4 which: ^2.0.2 languageName: unknown linkType: soft -"amplify-graphql-migration-tests@workspace:packages/amplify-graphql-migration-tests": - version: 0.0.0-use.local - resolution: "amplify-graphql-migration-tests@workspace:packages/amplify-graphql-migration-tests" - dependencies: - "@aws-amplify/amplify-prompts": 2.7.0 - "@aws-amplify/graphql-auth-transformer": ^2.1.6 - "@aws-amplify/graphql-default-value-transformer": ^1.1.6 - "@aws-amplify/graphql-function-transformer": ^1.2.4 - "@aws-amplify/graphql-http-transformer": ^1.2.4 - "@aws-amplify/graphql-index-transformer": ^1.2.2 - "@aws-amplify/graphql-model-transformer": ^1.3.2 - "@aws-amplify/graphql-predictions-transformer": ^1.2.4 - "@aws-amplify/graphql-relational-transformer": ^1.2.2 - "@aws-amplify/graphql-searchable-transformer": ^1.2.4 - "@aws-amplify/graphql-transformer-core": ^1.3.2 - "@aws-amplify/graphql-transformer-interfaces": 2.2.1 - "@aws-amplify/graphql-transformer-migrator": ^2.1.6 - "@aws-cdk/cloudformation-diff": ~2.68.0 - fs-extra: ^8.1.0 - graphql-auth-transformer: ^7.2.56 - graphql-connection-transformer: ^5.2.55 - graphql-dynamodb-transformer: ^7.2.55 - graphql-elasticsearch-transformer: ^5.2.56 - graphql-function-transformer: ^3.3.46 - graphql-http-transformer: ^5.2.55 - graphql-key-transformer: ^3.2.55 - graphql-predictions-transformer: ^3.2.55 - graphql-transformer-core: ^8.1.2 - graphql-versioned-transformer: ^5.2.55 - languageName: unknown - linkType: soft - -"amplify-headless-interface@1.17.3, amplify-headless-interface@workspace:packages/amplify-headless-interface": +"amplify-headless-interface@1.17.7, amplify-headless-interface@workspace:packages/amplify-headless-interface": version: 0.0.0-use.local resolution: "amplify-headless-interface@workspace:packages/amplify-headless-interface" dependencies: @@ -11452,37 +11844,37 @@ __metadata: languageName: unknown linkType: soft -"amplify-java-function-runtime-provider@2.3.21, amplify-java-function-runtime-provider@workspace:packages/amplify-java-function-runtime-provider": +"amplify-java-function-runtime-provider@2.3.48, amplify-java-function-runtime-provider@workspace:packages/amplify-java-function-runtime-provider": version: 0.0.0-use.local resolution: "amplify-java-function-runtime-provider@workspace:packages/amplify-java-function-runtime-provider" dependencies: - "@aws-amplify/amplify-cli-core": 4.0.8 - "@aws-amplify/amplify-function-plugin-interface": 1.10.2 + "@aws-amplify/amplify-cli-core": 4.3.11 + "@aws-amplify/amplify-function-plugin-interface": 1.12.1 "@types/node": ^12.12.6 "@types/semver": ^7.1.0 "@types/which": ^1.3.2 execa: ^5.1.1 fs-extra: ^8.1.0 glob: ^7.2.0 - semver: ^7.3.5 + semver: ^7.5.4 which: ^2.0.2 languageName: unknown linkType: soft -"amplify-java-function-template-provider@1.5.20, amplify-java-function-template-provider@workspace:packages/amplify-java-function-template-provider": +"amplify-java-function-template-provider@1.5.24, amplify-java-function-template-provider@workspace:packages/amplify-java-function-template-provider": version: 0.0.0-use.local resolution: "amplify-java-function-template-provider@workspace:packages/amplify-java-function-template-provider" dependencies: - "@aws-amplify/amplify-function-plugin-interface": 1.10.2 + "@aws-amplify/amplify-function-plugin-interface": 1.12.1 languageName: unknown linkType: soft -"amplify-nodejs-function-runtime-provider@2.4.3, amplify-nodejs-function-runtime-provider@workspace:packages/amplify-nodejs-function-runtime-provider": +"amplify-nodejs-function-runtime-provider@2.5.25, amplify-nodejs-function-runtime-provider@workspace:packages/amplify-nodejs-function-runtime-provider": version: 0.0.0-use.local resolution: "amplify-nodejs-function-runtime-provider@workspace:packages/amplify-nodejs-function-runtime-provider" dependencies: - "@aws-amplify/amplify-cli-core": 4.0.8 - "@aws-amplify/amplify-function-plugin-interface": 1.10.2 + "@aws-amplify/amplify-cli-core": 4.3.11 + "@aws-amplify/amplify-function-plugin-interface": 1.12.1 "@types/exit": ^0.1.31 "@types/node": ^12.12.6 "@types/semver": ^7 @@ -11490,28 +11882,28 @@ __metadata: exit: ^0.1.2 fs-extra: ^8.1.0 glob: ^7.2.0 - semver: ^7.5.0 + semver: ^7.5.4 languageName: unknown linkType: soft -"amplify-python-function-runtime-provider@2.4.21, amplify-python-function-runtime-provider@workspace:packages/amplify-python-function-runtime-provider": +"amplify-python-function-runtime-provider@2.4.48, amplify-python-function-runtime-provider@workspace:packages/amplify-python-function-runtime-provider": version: 0.0.0-use.local resolution: "amplify-python-function-runtime-provider@workspace:packages/amplify-python-function-runtime-provider" dependencies: - "@aws-amplify/amplify-cli-core": 4.0.8 - "@aws-amplify/amplify-function-plugin-interface": 1.10.2 + "@aws-amplify/amplify-cli-core": 4.3.11 + "@aws-amplify/amplify-function-plugin-interface": 1.12.1 "@types/fs-extra": ^8.0.1 "@types/node": ^12.12.6 "@types/semver": ^7.1.0 execa: ^5.1.1 glob: ^7.2.0 ini: ^1.3.5 - semver: ^7.3.5 + semver: ^7.5.4 which: ^2.0.2 languageName: unknown linkType: soft -"amplify-storage-simulator@1.9.0, amplify-storage-simulator@workspace:packages/amplify-storage-simulator": +"amplify-storage-simulator@1.11.6, amplify-storage-simulator@workspace:packages/amplify-storage-simulator": version: 0.0.0-use.local resolution: "amplify-storage-simulator@workspace:packages/amplify-storage-simulator" dependencies: @@ -11522,11 +11914,11 @@ __metadata: "@types/serve-static": ^1.13.3 "@types/uuid": ^8.3.1 "@types/xml": ^1.0.4 - aws-sdk: ^2.1354.0 + aws-sdk: ^2.1464.0 body-parser: ^1.19.2 cors: ^2.8.5 etag: ^1.8.1 - express: ^4.17.3 + express: ^4.21.2 fs-extra: ^8.1.0 glob: ^7.2.0 object-to-xml: ^2.0.0 @@ -11538,18 +11930,18 @@ __metadata: languageName: unknown linkType: soft -"amplify-util-headless-input@1.9.12, amplify-util-headless-input@workspace:packages/amplify-util-headless-input": +"amplify-util-headless-input@1.9.18, amplify-util-headless-input@workspace:packages/amplify-util-headless-input": version: 0.0.0-use.local resolution: "amplify-util-headless-input@workspace:packages/amplify-util-headless-input" dependencies: "@types/json-schema": ^7.0.5 ajv: ^6.12.6 - amplify-headless-interface: 1.17.3 + amplify-headless-interface: 1.17.7 fs-extra: ^8.1.0 languageName: unknown linkType: soft -"amplify-velocity-template@1.4.11, amplify-velocity-template@workspace:packages/amplify-velocity-template": +"amplify-velocity-template@1.4.15, amplify-velocity-template@workspace:packages/amplify-velocity-template": version: 0.0.0-use.local resolution: "amplify-velocity-template@workspace:packages/amplify-velocity-template" dependencies: @@ -11557,7 +11949,7 @@ __metadata: growl: ^1.10.5 istanbul: ~0.4.5 lodash: ^4.17.21 - mocha: ">=7.0.0" + mocha: ^11.0.1 mocha-lcov-reporter: 1.3.0 should: ^13.2.3 velocityjs: ^2.0.0 @@ -11575,14 +11967,7 @@ __metadata: languageName: node linkType: hard -"ansi-colors@npm:4.1.1": - version: 4.1.1 - resolution: "ansi-colors@npm:4.1.1" - checksum: 6086ade4336b4250b6b25e144b83e5623bcaf654d3df0c3546ce09c9c5ff999cb6a6f00c87e802d05cf98aef79d92dc76ade2670a2493b8dcb80220bec457838 - languageName: node - linkType: hard - -"ansi-colors@npm:^4.1.1": +"ansi-colors@npm:^4.1.1, ansi-colors@npm:^4.1.3": version: 4.1.3 resolution: "ansi-colors@npm:4.1.3" checksum: ec87a2f59902f74e61eada7f6e6fe20094a628dab765cfdbd03c3477599368768cffccdb5d3bb19a1b6c99126783a143b1fee31aab729b31ffe5836c7e5e28b9 @@ -11668,9 +12053,9 @@ __metadata: linkType: hard "ansi-styles@npm:^6.1.0": - version: 6.1.0 - resolution: "ansi-styles@npm:6.1.0" - checksum: 39d4ffae6559b24716db7c84b5e750aef6b0b433651f7b4a789f40b41be24ee7ea532afe540cea9cedb518baf334f9d9029af47d851ae5dcbdb2ca5a4862b8b8 + version: 6.2.1 + resolution: "ansi-styles@npm:6.2.1" + checksum: 5d1ec38c123984bcedd996eac680d548f31828bd679a66db2bdf11844634dde55fec3efa9c6bb1d89056a5e79c1ac540c4c784d592ea1d25028a92227d2f2d5c languageName: node linkType: hard @@ -11956,6 +12341,16 @@ __metadata: languageName: node linkType: hard +"array-buffer-byte-length@npm:^1.0.1": + version: 1.0.1 + resolution: "array-buffer-byte-length@npm:1.0.1" + dependencies: + call-bind: ^1.0.5 + is-array-buffer: ^3.0.4 + checksum: f5cdf54527cd18a3d2852ddf73df79efec03829e7373a8322ef5df2b4ef546fb365c19c71d6b42d641cb6bfe0f1a2f19bc0ece5b533295f86d7c3d522f228917 + languageName: node + linkType: hard + "array-differ@npm:^3.0.0": version: 3.0.0 resolution: "array-differ@npm:3.0.0" @@ -11977,13 +12372,6 @@ __metadata: languageName: node linkType: hard -"array-from@npm:^2.1.1": - version: 2.1.1 - resolution: "array-from@npm:2.1.1" - checksum: 565fe078a3fb8be3d1b17d1b1a6b514d14d7f6c7349fb1de0b0f4cb7e0e4ffb6d35e03ff234ac978cffb67fc8f1e93e477271b70fe2f9e0ef76d10b0402d4d26 - languageName: node - linkType: hard - "array-ify@npm:^1.0.0": version: 1.0.0 resolution: "array-ify@npm:1.0.0" @@ -12041,6 +12429,22 @@ __metadata: languageName: node linkType: hard +"arraybuffer.prototype.slice@npm:^1.0.3": + version: 1.0.3 + resolution: "arraybuffer.prototype.slice@npm:1.0.3" + dependencies: + array-buffer-byte-length: ^1.0.1 + call-bind: ^1.0.5 + define-properties: ^1.2.1 + es-abstract: ^1.22.3 + es-errors: ^1.2.1 + get-intrinsic: ^1.2.3 + is-array-buffer: ^3.0.4 + is-shared-array-buffer: ^1.0.2 + checksum: d32754045bcb2294ade881d45140a5e52bda2321b9e98fa514797b7f0d252c4c5ab0d1edb34112652c62fa6a9398def568da63a4d7544672229afea283358c36 + languageName: node + linkType: hard + "arrify@npm:^1.0.1": version: 1.0.1 resolution: "arrify@npm:1.0.1" @@ -12097,7 +12501,7 @@ __metadata: languageName: node linkType: hard -"ast-types@npm:^0.13.2": +"ast-types@npm:^0.13.4": version: 0.13.4 resolution: "ast-types@npm:0.13.4" dependencies: @@ -12113,7 +12517,7 @@ __metadata: languageName: node linkType: hard -"async@npm:^2.6.2, async@npm:^2.6.4": +"async@npm:^2.6.4": version: 2.6.4 resolution: "async@npm:2.6.4" dependencies: @@ -12177,31 +12581,33 @@ __metadata: languageName: node linkType: hard -"available-typed-arrays@npm:^1.0.5": - version: 1.0.5 - resolution: "available-typed-arrays@npm:1.0.5" - checksum: c4df567ca72d2754a6cbad20088f5f98b1065b3360178169fa9b44ea101af62c0f423fc3854fa820fd6895b6b9171b8386e71558203103ff8fc2ad503fdcc660 +"available-typed-arrays@npm:^1.0.7": + version: 1.0.7 + resolution: "available-typed-arrays@npm:1.0.7" + dependencies: + possible-typed-array-names: ^1.0.0 + checksum: d07226ef4f87daa01bd0fe80f8f310982e345f372926da2e5296aecc25c41cab440916bbaa4c5e1034b453af3392f67df5961124e4b586df1e99793a1374bdb2 languageName: node linkType: hard -"aws-amplify@npm:^4.2.8": - version: 4.3.11 - resolution: "aws-amplify@npm:4.3.11" +"aws-amplify@npm:^5.3.16": + version: 5.3.16 + resolution: "aws-amplify@npm:5.3.16" dependencies: - "@aws-amplify/analytics": 5.1.9 - "@aws-amplify/api": 4.0.29 - "@aws-amplify/auth": 4.3.19 - "@aws-amplify/cache": 4.0.31 - "@aws-amplify/core": 4.3.11 - "@aws-amplify/datastore": 3.7.3 - "@aws-amplify/geo": 1.1.11 - "@aws-amplify/interactions": 4.0.29 - "@aws-amplify/predictions": 4.0.29 - "@aws-amplify/pubsub": 4.2.5 - "@aws-amplify/storage": 4.4.12 - "@aws-amplify/ui": 2.0.5 - "@aws-amplify/xr": 3.0.29 - checksum: f576c7f173442f64ec4eed9c564823f21386575a2714022bd9cb8ada361ae0966f54dc9528a01b2dd07a8b99da727e1af0645b2979e28fa76d9a2fe55647146c + "@aws-amplify/analytics": 6.5.10 + "@aws-amplify/api": 5.4.10 + "@aws-amplify/auth": 5.6.10 + "@aws-amplify/cache": 5.1.16 + "@aws-amplify/core": 5.8.10 + "@aws-amplify/datastore": 4.7.10 + "@aws-amplify/geo": 2.3.10 + "@aws-amplify/interactions": 5.2.16 + "@aws-amplify/notifications": 1.6.10 + "@aws-amplify/predictions": 5.5.10 + "@aws-amplify/pubsub": 5.5.10 + "@aws-amplify/storage": 5.9.10 + tslib: ^2.0.0 + checksum: 199a1f36b093a81ca3d79470eacf69f45c98201d1e0d03f2256a0e4e75872cb8b1ecabf01ba53cb3952ec0b220f82786953a9849e0ba9df82162698767fed614 languageName: node linkType: hard @@ -12264,42 +12670,45 @@ __metadata: languageName: node linkType: hard -"aws-cdk-lib@npm:~2.68.0": - version: 2.68.0 - resolution: "aws-cdk-lib@npm:2.68.0" +"aws-cdk-lib@npm:~2.177.0": + version: 2.177.0 + resolution: "aws-cdk-lib@npm:2.177.0" dependencies: - "@aws-cdk/asset-awscli-v1": ^2.2.97 - "@aws-cdk/asset-kubectl-v20": ^2.1.1 - "@aws-cdk/asset-node-proxy-agent-v5": ^2.0.77 + "@aws-cdk/asset-awscli-v1": ^2.2.208 + "@aws-cdk/asset-kubectl-v20": ^2.1.3 + "@aws-cdk/asset-node-proxy-agent-v6": ^2.1.0 + "@aws-cdk/cloud-assembly-schema": ^39.2.0 "@balena/dockerignore": ^1.0.2 case: 1.6.3 - fs-extra: ^9.1.0 - ignore: ^5.2.4 + fs-extra: ^11.2.0 + ignore: ^5.3.2 jsonschema: ^1.4.1 + mime-types: ^2.1.35 minimatch: ^3.1.2 - punycode: ^2.3.0 - semver: ^7.3.8 + punycode: ^2.3.1 + semver: ^7.6.3 + table: ^6.8.2 yaml: 1.10.2 peerDependencies: constructs: ^10.0.0 - checksum: cb1f3beb5c1aa9132b3dc792b724f03873c138e6623325002f13223adb490901589f0abd50098fe4ffd2d7872ce4ab4dcd0ea1cb0a79d19eb1223aafd3851832 + checksum: 5285957a8b62466490443219bbf6a93fe01d18713f19f2233808380a40fbeb54f1902a9b225803dabd3f74d30386a3c28ae996cb2e741534c6530ed2ff3907b3 languageName: node linkType: hard -"aws-sdk-mock@npm:^5.8.0": - version: 5.8.0 - resolution: "aws-sdk-mock@npm:5.8.0" +"aws-sdk-mock@npm:^6.2.0": + version: 6.2.0 + resolution: "aws-sdk-mock@npm:6.2.0" dependencies: aws-sdk: ^2.1231.0 - sinon: ^14.0.1 - traverse: ^0.6.6 - checksum: b6ce833d436ca53618da8e90a6c391c6983c9e61382e086f9448f8937a842ad38750d832d4b2a33e9e938ff8bab9d5141e08cd911ccdd28758d1dedc83b2ded9 + neotraverse: ^0.6.15 + sinon: ^18.0.1 + checksum: a8ef205ecc806225f5b7cc6a09864d73d23add434dc42213c2aa3bd9285741651cf56c8b9f6be5619c405cfd07c3caa64a2351ff597ace0c96b4ba30ac6c811a languageName: node linkType: hard -"aws-sdk@npm:^2.1354.0": - version: 2.1364.0 - resolution: "aws-sdk@npm:2.1364.0" +"aws-sdk@npm:^2.1464.0": + version: 2.1464.0 + resolution: "aws-sdk@npm:2.1464.0" dependencies: buffer: 4.9.2 events: 1.1.1 @@ -12311,7 +12720,7 @@ __metadata: util: ^0.12.4 uuid: 8.0.0 xml2js: 0.5.0 - checksum: 4aaec868389698b1af7bab920ebaf27cdf71a0a6fc7a2d7a79e76162a1e72d383d6b6a0631fce1c539718113ceccd46b0601398361c7cc06ef5c5acbc5a6efb5 + checksum: 042485e757a035fb0486a7010897073a2919e561e1f54da68dc2cc5d81fe710bf9c57a4914bbece554a42efc4170acbdc52f9308d5d845ae09b4b6e64b31455a languageName: node linkType: hard @@ -12336,32 +12745,14 @@ __metadata: languageName: node linkType: hard -"axios@npm:0.21.4, axios@npm:^0.21.1": - version: 0.21.4 - resolution: "axios@npm:0.21.4" - dependencies: - follow-redirects: ^1.14.0 - checksum: fbcff55ec68f71f02d3773d467db2fcecdf04e749826c82c2427a232f9eba63242150a05f15af9ef15818352b814257541155de0281f8fb2b7e8a5b79f7f2142 - languageName: node - linkType: hard - -"axios@npm:^0.26.0": - version: 0.26.0 - resolution: "axios@npm:0.26.0" - dependencies: - follow-redirects: ^1.14.8 - checksum: 22a8e41f1d2fc1a923fbb68b6b0025f27dbb0b51fba80124c0e432dfa347f8827d10820fa131233d222343d4790776d87b80081363c6623ad8a2e1d0586e5ee8 - languageName: node - linkType: hard - -"axios@npm:^1.0.0": - version: 1.3.2 - resolution: "axios@npm:1.3.2" +"axios@npm:^1.0.0, axios@npm:^1.6.5, axios@npm:^1.6.7": + version: 1.7.4 + resolution: "axios@npm:1.7.4" dependencies: - follow-redirects: ^1.15.0 + follow-redirects: ^1.15.6 form-data: ^4.0.0 proxy-from-env: ^1.1.0 - checksum: 163f4b41e7a447b17aa131cd915aea0cf35aa00eb62531292c66359436dc16eef82cab64a5dc2cafcb612744b34789fa84615031cd06a55ac982e7add14e4468 + checksum: 5ea1a93140ca1d49db25ef8e1bd8cfc59da6f9220159a944168860ad15a2743ea21c5df2967795acb15cbe81362f5b157fdebbea39d53117ca27658bab9f7f17 languageName: node linkType: hard @@ -12720,13 +13111,6 @@ __metadata: languageName: node linkType: hard -"backo2@npm:^1.0.2": - version: 1.0.2 - resolution: "backo2@npm:1.0.2" - checksum: a9e825a6a38a6d1c4a94476eabc13d6127dfaafb0967baf104affbb67806ae26abbb58dab8d572d2cd21ef06634ff57c3ad48dff14b904e18de1474cc2f22bf3 - languageName: node - linkType: hard - "balanced-match@npm:^1.0.0": version: 1.0.2 resolution: "balanced-match@npm:1.0.2" @@ -12734,6 +13118,13 @@ __metadata: languageName: node linkType: hard +"base-64@npm:1.0.0": + version: 1.0.0 + resolution: "base-64@npm:1.0.0" + checksum: d886cb3236cee0bed9f7075675748b59b32fad623ddb8ce1793c790306aa0f76a03238cad4b3fb398abda6527ce08a5588388533a4ccade0b97e82b9da660e28 + languageName: node + linkType: hard + "base64-js@npm:^1.0.2, base64-js@npm:^1.3.1, base64-js@npm:^1.5.1": version: 1.5.1 resolution: "base64-js@npm:1.5.1" @@ -12741,6 +13132,13 @@ __metadata: languageName: node linkType: hard +"basic-ftp@npm:^5.0.2": + version: 5.0.3 + resolution: "basic-ftp@npm:5.0.3" + checksum: 2b960ea976a4c16f420290063e6399894220e107653de3bc9a19d842bcfee49855d20f2449d27f0217af2e9bcfb6008a81461b59e43b9ef1fe21263513b107b4 + languageName: node + linkType: hard + "batch@npm:0.6.1": version: 0.6.1 resolution: "batch@npm:0.6.1" @@ -12834,28 +13232,30 @@ __metadata: languageName: node linkType: hard -"bn.js@npm:^5.0.0, bn.js@npm:^5.1.1": - version: 5.2.0 - resolution: "bn.js@npm:5.2.0" - checksum: 67e17b1934d9c7a73aed9b89222dc8c1c8e3aff46cca6609b8c2ab04fa22c6b8db42c7774b039d09fa63136d8866b777ab88af0d64d8ea3839a94e69193a6b13 +"bn.js@npm:^5.0.0, bn.js@npm:^5.2.1": + version: 5.2.1 + resolution: "bn.js@npm:5.2.1" + checksum: bed3d8bd34ec89dbcf9f20f88bd7d4a49c160fda3b561c7bb227501f974d3e435a48fb9b61bc3de304acab9215a3bda0803f7017ffb4d0016a0c3a740a283caa languageName: node linkType: hard -"body-parser@npm:1.19.2, body-parser@npm:^1.19.2": - version: 1.19.2 - resolution: "body-parser@npm:1.19.2" +"body-parser@npm:1.20.3, body-parser@npm:^1.19.2": + version: 1.20.3 + resolution: "body-parser@npm:1.20.3" dependencies: bytes: 3.1.2 - content-type: ~1.0.4 + content-type: ~1.0.5 debug: 2.6.9 - depd: ~1.1.2 - http-errors: 1.8.1 + depd: 2.0.0 + destroy: 1.2.0 + http-errors: 2.0.0 iconv-lite: 0.4.24 - on-finished: ~2.3.0 - qs: 6.9.7 - raw-body: 2.4.3 + on-finished: 2.4.1 + qs: 6.13.0 + raw-body: 2.5.2 type-is: ~1.6.18 - checksum: 02158280b090d0ad99dfdc795b7d580762601283e4bcbd29409c11b34d5cfd737f632447a073bc2e79492d303827bd155fef2d63a333cdec18a87846221cee5e + unpipe: 1.0.0 + checksum: 0a9a93b7518f222885498dcecaad528cf010dd109b071bf471c93def4bfe30958b83e03496eb9c1ad4896db543d999bb62be1a3087294162a88cfa1b42c16310 languageName: node linkType: hard @@ -12977,12 +13377,12 @@ __metadata: languageName: node linkType: hard -"braces@npm:^3.0.2, braces@npm:~3.0.2": - version: 3.0.2 - resolution: "braces@npm:3.0.2" +"braces@npm:^3.0.3, braces@npm:~3.0.2": + version: 3.0.3 + resolution: "braces@npm:3.0.3" dependencies: - fill-range: ^7.0.1 - checksum: 321b4d675791479293264019156ca322163f02dc06e3c4cab33bb15cd43d80b51efef69b0930cfde3acd63d126ebca24cd0544fa6f261e093a0fb41ab9dda381 + fill-range: ^7.1.1 + checksum: 7c6dfd30c338d2997ba77500539227b9d1f85e388a5f43220865201e407e076783d0881f2d297b9f80951b4c957fcf0b51c1d2d24227631643c3f7c284b0aa04 languageName: node linkType: hard @@ -12993,7 +13393,7 @@ __metadata: languageName: node linkType: hard -"browser-stdout@npm:1.3.1": +"browser-stdout@npm:^1.3.1": version: 1.3.1 resolution: "browser-stdout@npm:1.3.1" checksum: c40e482fd82be872b6ea7b9f7591beafbf6f5ba522fe3dade98ba1573a1c29a11101564993e4eb44e5488be8f44510af072df9a9637c739217eb155ceb639205 @@ -13037,7 +13437,7 @@ __metadata: languageName: node linkType: hard -"browserify-rsa@npm:^4.0.0, browserify-rsa@npm:^4.0.1": +"browserify-rsa@npm:^4.0.0, browserify-rsa@npm:^4.1.0": version: 4.1.0 resolution: "browserify-rsa@npm:4.1.0" dependencies: @@ -13048,19 +13448,19 @@ __metadata: linkType: hard "browserify-sign@npm:^4.0.0": - version: 4.2.1 - resolution: "browserify-sign@npm:4.2.1" + version: 4.2.2 + resolution: "browserify-sign@npm:4.2.2" dependencies: - bn.js: ^5.1.1 - browserify-rsa: ^4.0.1 + bn.js: ^5.2.1 + browserify-rsa: ^4.1.0 create-hash: ^1.2.0 create-hmac: ^1.1.7 - elliptic: ^6.5.3 + elliptic: ^6.5.4 inherits: ^2.0.4 - parse-asn1: ^5.1.5 - readable-stream: ^3.6.0 - safe-buffer: ^5.2.0 - checksum: 8f00a370e3e97060977dc58e51251d3ca398ee73523994a44430321e8de2c7d85395362d59014b2b07efe4190f369baee2ff28eb8f405ff4660b776651cf052d + parse-asn1: ^5.1.6 + readable-stream: ^3.6.2 + safe-buffer: ^5.2.1 + checksum: 4d1292e5c165d93455630515003f0e95eed9239c99e2d373920c5b56903d16296a3d23cd4bdc4d298f55ad9b83714a9e63bc4839f1166c303349a16e84e9b016 languageName: node linkType: hard @@ -13073,17 +13473,17 @@ __metadata: languageName: node linkType: hard -"browserslist@npm:^4.0.0, browserslist@npm:^4.14.5, browserslist@npm:^4.16.6, browserslist@npm:^4.18.1, browserslist@npm:^4.20.2, browserslist@npm:^4.21.3, browserslist@npm:^4.21.4": - version: 4.21.4 - resolution: "browserslist@npm:4.21.4" +"browserslist@npm:^4.0.0, browserslist@npm:^4.18.1, browserslist@npm:^4.20.2, browserslist@npm:^4.21.10, browserslist@npm:^4.21.4, browserslist@npm:^4.21.9": + version: 4.23.3 + resolution: "browserslist@npm:4.23.3" dependencies: - caniuse-lite: ^1.0.30001400 - electron-to-chromium: ^1.4.251 - node-releases: ^2.0.6 - update-browserslist-db: ^1.0.9 + caniuse-lite: ^1.0.30001646 + electron-to-chromium: ^1.5.4 + node-releases: ^2.0.18 + update-browserslist-db: ^1.1.0 bin: browserslist: cli.js - checksum: bbc5fe2b4280a590cb40b110cd282f18f4542d75ddb559dfe0a174fda0263d2a7dd5b1634d0f795d617d69cb5f9716479c4a90d9a954a7ef16bc0a2878965af8 + checksum: 3063bfdf812815346447f4796c8f04601bf5d62003374305fd323c2a463e42776475bcc5309264e39bcf9a8605851e53560695991a623be988138b3ff8c66642 languageName: node linkType: hard @@ -13112,13 +13512,6 @@ __metadata: languageName: node linkType: hard -"buffer-equal-constant-time@npm:1.0.1": - version: 1.0.1 - resolution: "buffer-equal-constant-time@npm:1.0.1" - checksum: fb2294e64d23c573d0dd1f1e7a466c3e978fe94a4e0f8183937912ca374619773bef8e2aceb854129d2efecbbc515bbd0cc78d2734a3e3031edb0888531bbc8e - languageName: node - linkType: hard - "buffer-from@npm:^1.0.0": version: 1.1.2 resolution: "buffer-from@npm:1.1.2" @@ -13126,6 +13519,13 @@ __metadata: languageName: node linkType: hard +"buffer-writer@npm:2.0.0": + version: 2.0.0 + resolution: "buffer-writer@npm:2.0.0" + checksum: c91b2ab09a200cf0862237e5a4dbd5077003b42d26d4f0c596ec7149f82ef83e0751d670bcdf379ed988d1a08c0fac7759a8cb928cf1a4710a1988a7618b1190 + languageName: node + linkType: hard + "buffer-xor@npm:^1.0.3": version: 1.0.3 resolution: "buffer-xor@npm:1.0.3" @@ -13154,7 +13554,7 @@ __metadata: languageName: node linkType: hard -"buffer@npm:^5.5.0, buffer@npm:^5.7.0": +"buffer@npm:^5.4.3, buffer@npm:^5.5.0": version: 5.7.1 resolution: "buffer@npm:5.7.1" dependencies: @@ -13296,38 +13696,16 @@ __metadata: languageName: node linkType: hard -"call-bind@npm:^1.0.0, call-bind@npm:^1.0.2": - version: 1.0.2 - resolution: "call-bind@npm:1.0.2" - dependencies: - function-bind: ^1.1.1 - get-intrinsic: ^1.0.2 - checksum: 74ba3f31e715456e22e451d8d098779b861eba3c7cac0d9b510049aced70d75c231ba05071f97e1812c98e34e2bee734c0c6126653e0088c2d9819ca047f4073 - languageName: node - linkType: hard - -"caller-callsite@npm:^2.0.0": - version: 2.0.0 - resolution: "caller-callsite@npm:2.0.0" - dependencies: - callsites: ^2.0.0 - checksum: a00ca91280e10ee2321de21dda6c168e427df7a63aeaca027ea45e3e466ac5e1a5054199f6547ba1d5a513d3b6b5933457266daaa47f8857fb532a343ee6b5e1 - languageName: node - linkType: hard - -"caller-path@npm:^2.0.0": - version: 2.0.0 - resolution: "caller-path@npm:2.0.0" +"call-bind@npm:^1.0.2, call-bind@npm:^1.0.5, call-bind@npm:^1.0.6, call-bind@npm:^1.0.7": + version: 1.0.7 + resolution: "call-bind@npm:1.0.7" dependencies: - caller-callsite: ^2.0.0 - checksum: 029b5b2c557d831216305c3218e9ff30fa668be31d58dd08088f74c8eabc8362c303e0908b3a93abb25ba10e3a5bfc9cff5eb7fab6ab9cf820e3b160ccb67581 - languageName: node - linkType: hard - -"callsites@npm:^2.0.0": - version: 2.0.0 - resolution: "callsites@npm:2.0.0" - checksum: 13bff4fee946e6020b37e76284e95e24aa239c9e34ac4f3451e4c5330fca6f2f962e1d1ab69e4da7940e1fce135107a2b2b98c01d62ea33144350fc89dc5494e + es-define-property: ^1.0.0 + es-errors: ^1.3.0 + function-bind: ^1.1.2 + get-intrinsic: ^1.2.4 + set-function-length: ^1.2.1 + checksum: a3ded2e423b8e2a265983dba81c27e125b48eefb2655e7dfab6be597088da3d47c47976c24bc51b8fd9af1061f8f87b4ab78a314f3c77784b2ae2ba535ad8b8d languageName: node linkType: hard @@ -13409,10 +13787,10 @@ __metadata: languageName: node linkType: hard -"caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001317, caniuse-lite@npm:^1.0.30001400": - version: 1.0.30001431 - resolution: "caniuse-lite@npm:1.0.30001431" - checksum: 720e53b7e4afbb91cc7683d64037da23b98a3199b4d34cecbba3e702646910873c21df8e3aa7cea1c37095a99ca9aff24deff610dbccd61c0436907234d77e90 +"caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001317, caniuse-lite@npm:^1.0.30001646": + version: 1.0.30001655 + resolution: "caniuse-lite@npm:1.0.30001655" + checksum: fff0c0c3ffcba89828bfa6b99f118e82c064f46f15bb8655b9f2a352a3f552ccac0b87a9fe9532f8c5a29e284aae5579791e196480ec717d11ef1d1a1c2e3ff9 languageName: node linkType: hard @@ -13458,7 +13836,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^2.0.0, chalk@npm:^2.3.0, chalk@npm:^2.4.1, chalk@npm:^2.4.2": +"chalk@npm:^2.3.0, chalk@npm:^2.4.1, chalk@npm:^2.4.2": version: 2.4.2 resolution: "chalk@npm:2.4.2" dependencies: @@ -13490,9 +13868,9 @@ __metadata: linkType: hard "chalk@npm:^5.0.1": - version: 5.0.1 - resolution: "chalk@npm:5.0.1" - checksum: 97898611ae40cfdeda9778901731df1404ea49fac0eb8253804e8d21b8064917df9823e29c0c9d766aab623da1a0b43d0e072d19a73d4f62d0d9115aef4c64e6 + version: 5.2.0 + resolution: "chalk@npm:5.2.0" + checksum: 8a519b35c239f96e041b7f1ed8fdd79d3ca2332a8366cb957378b8a1b8a4cdfb740d19628e8bf74654d4c0917aa10cf39c20752e177a1304eac29a1168a740e9 languageName: node linkType: hard @@ -13514,6 +13892,24 @@ __metadata: languageName: node linkType: hard +"change-case-all@npm:1.0.15": + version: 1.0.15 + resolution: "change-case-all@npm:1.0.15" + dependencies: + change-case: ^4.1.2 + is-lower-case: ^2.0.2 + is-upper-case: ^2.0.2 + lower-case: ^2.0.2 + lower-case-first: ^2.0.2 + sponge-case: ^1.0.1 + swap-case: ^2.0.2 + title-case: ^3.0.3 + upper-case: ^2.0.2 + upper-case-first: ^2.0.2 + checksum: 0de81690de866aa8c477f8b5b08c6f9dbce4a078cffa5f014858f49fda548a9a6524b61f62f2940acce9f1fdcfeef3a7124090684e86e731f55d26c22713e2d7 + languageName: node + linkType: hard + "change-case@npm:^4.1.1, change-case@npm:^4.1.2": version: 4.1.2 resolution: "change-case@npm:4.1.2" @@ -13569,25 +13965,6 @@ __metadata: languageName: node linkType: hard -"chokidar@npm:3.5.2": - version: 3.5.2 - resolution: "chokidar@npm:3.5.2" - dependencies: - anymatch: ~3.1.2 - braces: ~3.0.2 - fsevents: ~2.3.2 - glob-parent: ~5.1.2 - is-binary-path: ~2.1.0 - is-glob: ~4.0.1 - normalize-path: ~3.0.0 - readdirp: ~3.6.0 - dependenciesMeta: - fsevents: - optional: true - checksum: e7179a9dc4ce54c1ba660652319039b7ca0817a442dd05a45afcbdefcd4848b4276debfa9cf321798c2c567c6289da14dd48d9a1ee92056a7b526c554cffe129 - languageName: node - linkType: hard - "chokidar@npm:^3.4.0, chokidar@npm:^3.4.2, chokidar@npm:^3.5.3": version: 3.5.3 resolution: "chokidar@npm:3.5.3" @@ -13635,10 +14012,10 @@ __metadata: languageName: node linkType: hard -"ci-info@npm:^3.2.0": - version: 3.3.0 - resolution: "ci-info@npm:3.3.0" - checksum: f23ec1b3c4717abb5fb9934fe0ab6db621cf767abd3832f07af2803e4809d21908d8b87321de4b79861dfe8105c08dba1803a9fb6346d5586b0c57db2bfbce3b +"ci-info@npm:^3.2.0, ci-info@npm:^3.8.0": + version: 3.8.0 + resolution: "ci-info@npm:3.8.0" + checksum: 0d3052193b58356372b34ab40d2668c3e62f1006d5ca33726d1d3c423853b19a85508eadde7f5908496fb41448f465263bf61c1ee58b7832cb6a924537e3863a languageName: node linkType: hard @@ -13652,15 +14029,6 @@ __metadata: languageName: node linkType: hard -"circleci-api@npm:^4.1.4": - version: 4.1.4 - resolution: "circleci-api@npm:4.1.4" - dependencies: - axios: ^0.21.1 - checksum: 0421655b39055aa73bbe1338fc80f35da46cb35bbee298edda50202e98e4a7ccf04992eef234309cc84d87f98939f66d97b32b68c20f848127785d90cfd1cb6e - languageName: node - linkType: hard - "cjs-module-lexer@npm:^1.0.0": version: 1.2.2 resolution: "cjs-module-lexer@npm:1.2.2" @@ -13897,23 +14265,23 @@ __metadata: languageName: node linkType: hard -"codemirror-graphql@npm:^1.2.11": - version: 1.2.11 - resolution: "codemirror-graphql@npm:1.2.11" +"codemirror-graphql@npm:^1.3.0": + version: 1.3.2 + resolution: "codemirror-graphql@npm:1.3.2" dependencies: - "@codemirror/stream-parser": ^0.19.2 - graphql-language-service: ^4.1.4 + graphql-language-service: ^5.0.6 peerDependencies: - codemirror: ^5.58.2 + "@codemirror/language": ^0.20.0 + codemirror: ^5.65.3 graphql: ^15.5.0 || ^16.0.0 - checksum: d479022b39a6551351b262a95293cc0ba6cd662e6ffe5d76d5a37f492ae880275c171fbdf689f43323b251a8945cb175d73858c72478f343a7a9e35d69a39059 + checksum: 0e1b0490625110bd7aee148073562141a2df00356c77ecee3aa726cc7ab4b08e1a1b0b1d1f91992f2ee0338b009707b31c8eaa9dc90af915431c656290e91fec languageName: node linkType: hard -"codemirror@npm:^5.58.2": - version: 5.64.0 - resolution: "codemirror@npm:5.64.0" - checksum: 17734e87c0f0bec622414118b049b3023ae28760145b195f597cbb0a12ef472b210feea5e15027fe42aa57cc3446e1cc918767dc7049363e440a96dde8269fdd +"codemirror@npm:^5.65.3": + version: 5.65.16 + resolution: "codemirror@npm:5.65.16" + checksum: 72ab3aae5ee0511b33348761da43585a0368f2845016f1fe177e1aa9bf3d7beee7f98550ffd82908726bf731df2376dc371e383bf4c0c91a66e3f18d0b7c4f3b languageName: node linkType: hard @@ -13986,19 +14354,26 @@ __metadata: linkType: hard "colord@npm:^2.9.1": - version: 2.9.2 - resolution: "colord@npm:2.9.2" - checksum: ff2de0fa956526abfc6d08ddb5696b09659fac26dc40917e7eed006689cc5181447fad819ccef3b8e73cbe1be056074b1422a2a84831515678022cbc49cc699c + version: 2.9.3 + resolution: "colord@npm:2.9.3" + checksum: 9699e956894d8996b28c686afe8988720785f476f59335c80ce852ded76ab3ebe252703aec53d9bef54f6219aea6b960fb3d9a8300058a1d0c0d4026460cd110 languageName: node linkType: hard -"colorette@npm:2.0.19, colorette@npm:^2.0.10": +"colorette@npm:2.0.19": version: 2.0.19 resolution: "colorette@npm:2.0.19" checksum: 2bcc9134095750fece6e88167011499b964b78bf0ea953469130ddb1dba3c8fe6c03debb0ae181e710e2be10900d117460f980483a7df4ba4a1bac3b182ecb64 languageName: node linkType: hard +"colorette@npm:^2.0.10": + version: 2.0.20 + resolution: "colorette@npm:2.0.20" + checksum: e94116ff33b0ff56f3b83b9ace895e5bf87c2a7a47b3401b8c3f3226e050d5ef76cf4072fb3325f9dc24d1698f9b730baf4e05eeaf861d74a1883073f4c98a40 + languageName: node + linkType: hard + "colors@npm:1.0.3": version: 1.0.3 resolution: "colors@npm:1.0.3" @@ -14258,10 +14633,10 @@ __metadata: languageName: node linkType: hard -"connect-history-api-fallback@npm:^1.6.0": - version: 1.6.0 - resolution: "connect-history-api-fallback@npm:1.6.0" - checksum: 6d59c68070fcb2f6d981992f88d050d7544e8e1af6600c23ad680d955e316216794a742a1669d1f14ed5171fc628b916f8a4e15c5a1e55bffc8ccc60bfeb0b2c +"connect-history-api-fallback@npm:^2.0.0": + version: 2.0.0 + resolution: "connect-history-api-fallback@npm:2.0.0" + checksum: 90fa8b16ab76e9531646cc70b010b1dbd078153730c510d3142f6cf07479ae8a812c5a3c0e40a28528dd1681a62395d0cfdef67da9e914c4772ac85d69a3ed87 languageName: node linkType: hard @@ -14299,10 +14674,10 @@ __metadata: languageName: node linkType: hard -"content-type@npm:~1.0.4": - version: 1.0.4 - resolution: "content-type@npm:1.0.4" - checksum: 19e08f406f9ae3f80fb4607c75fbde1f22546647877e8047c9fa0b1c61e38f3ede853f51e915c95fd499c2e1c7478cb23c35cfb804d0e8e0495e8db88cfaed75 +"content-type@npm:~1.0.4, content-type@npm:~1.0.5": + version: 1.0.5 + resolution: "content-type@npm:1.0.5" + checksum: b76ebed15c000aee4678c3707e0860cb6abd4e680a598c0a26e17f0bfae723ec9cc2802f0ff1bc6e4d80603719010431d2231018373d4dde10f9ccff9dadf5af languageName: node linkType: hard @@ -14430,11 +14805,9 @@ __metadata: linkType: hard "convert-source-map@npm:^1.1.0, convert-source-map@npm:^1.4.0, convert-source-map@npm:^1.6.0, convert-source-map@npm:^1.7.0": - version: 1.8.0 - resolution: "convert-source-map@npm:1.8.0" - dependencies: - safe-buffer: ~5.1.1 - checksum: da4649990b633c070c0dab1680b89a67b9315dd2b1168d143536f667214c97e4eb4a49e5b7ff912f0196fe303e31fc16a529457436d25b2b5a89613eaf4f27fa + version: 1.9.0 + resolution: "convert-source-map@npm:1.9.0" + checksum: 281da55454bf8126cbc6625385928c43479f2060984180c42f3a86c8b8c12720a24eac260624a7d1e090004028d2dee78602330578ceec1a08e27cb8bb0a8a5b languageName: node linkType: hard @@ -14452,7 +14825,14 @@ __metadata: languageName: node linkType: hard -"cookie@npm:0.4.2, cookie@npm:^0.4.0": +"cookie@npm:0.7.1": + version: 0.7.1 + resolution: "cookie@npm:0.7.1" + checksum: 5de60c67a410e7c8dc8a46a4b72eb0fe925871d057c9a5d2c0e8145c4270a4f81076de83410c4d397179744b478e33cd80ccbcc457abf40a9409ad27dcd21dde + languageName: node + linkType: hard + +"cookie@npm:^0.4.0": version: 0.4.2 resolution: "cookie@npm:0.4.2" checksum: beab41fbd7c20175e3a2799ba948c1dcc71ef69f23fe14eeeff59fc09f50c517b0f77098db87dbb4c55da802f9d86ee86cdc1cd3efd87760341551838d53fca2 @@ -14541,15 +14921,6 @@ __metadata: languageName: node linkType: hard -"cosmiconfig-toml-loader@npm:1.0.0": - version: 1.0.0 - resolution: "cosmiconfig-toml-loader@npm:1.0.0" - dependencies: - "@iarna/toml": ^2.2.5 - checksum: 7ce90666174306a463cd8de8cf49b058d1492e7b1428d34aa9d5701465957d85f09724cfde2cce04424f442d3df6fe04eac54e9317b3f161e74d72bf3ee6f017 - languageName: node - linkType: hard - "cosmiconfig-typescript-loader@npm:^4.0.0": version: 4.3.0 resolution: "cosmiconfig-typescript-loader@npm:4.3.0" @@ -14575,41 +14946,29 @@ __metadata: languageName: node linkType: hard -"cosmiconfig@npm:7.0.1, cosmiconfig@npm:^7.0.0": - version: 7.0.1 - resolution: "cosmiconfig@npm:7.0.1" +"cosmiconfig@npm:^6.0.0": + version: 6.0.0 + resolution: "cosmiconfig@npm:6.0.0" dependencies: "@types/parse-json": ^4.0.0 - import-fresh: ^3.2.1 + import-fresh: ^3.1.0 parse-json: ^5.0.0 path-type: ^4.0.0 - yaml: ^1.10.0 - checksum: 3cd38525ba22e13da0ef9f4be131df226c94f5b96fb50f6297eb17baeedefe15cf5819f8c73cde69f71cc5034e712c86bd20c7756883dd8094087680ecc25932 - languageName: node - linkType: hard - -"cosmiconfig@npm:^5.2.1": - version: 5.2.1 - resolution: "cosmiconfig@npm:5.2.1" - dependencies: - import-fresh: ^2.0.0 - is-directory: ^0.3.1 - js-yaml: ^3.13.1 - parse-json: ^4.0.0 - checksum: ae9ba309cdbb42d0c9d63dad5c1dfa1c56bb8f818cb8633eea14fd2dbdc9f33393b77658ba96fdabda497bc943afed8c3371d1222afe613c518ba676fa624645 + yaml: ^1.7.2 + checksum: 666ed8732d0bf7d7fe6f8516c8ee6041e0622032e8fa26201577b883d2767ad105d03f38b34b93d1f02f26b22a89e7bab4443b9d2e7f931f48d0e944ffa038b5 languageName: node linkType: hard -"cosmiconfig@npm:^6.0.0": - version: 6.0.0 - resolution: "cosmiconfig@npm:6.0.0" +"cosmiconfig@npm:^7.0.0": + version: 7.0.1 + resolution: "cosmiconfig@npm:7.0.1" dependencies: "@types/parse-json": ^4.0.0 - import-fresh: ^3.1.0 + import-fresh: ^3.2.1 parse-json: ^5.0.0 path-type: ^4.0.0 - yaml: ^1.7.2 - checksum: 666ed8732d0bf7d7fe6f8516c8ee6041e0622032e8fa26201577b883d2767ad105d03f38b34b93d1f02f26b22a89e7bab4443b9d2e7f931f48d0e944ffa038b5 + yaml: ^1.10.0 + checksum: 3cd38525ba22e13da0ef9f4be131df226c94f5b96fb50f6297eb17baeedefe15cf5819f8c73cde69f71cc5034e712c86bd20c7756883dd8094087680ecc25932 languageName: node linkType: hard @@ -14728,40 +15087,14 @@ __metadata: languageName: node linkType: hard -"cross-spawn@npm:^6.0.0": - version: 6.0.5 - resolution: "cross-spawn@npm:6.0.5" - dependencies: - nice-try: ^1.0.4 - path-key: ^2.0.1 - semver: ^5.5.0 - shebang-command: ^1.2.0 - which: ^1.2.9 - checksum: e05544722e9d7189b4292c66e42b7abeb21db0d07c91b785f4ae5fefceb1f89e626da2703744657b287e86dcd4af57b54567cef75159957ff7a8a761d9055012 - languageName: node - linkType: hard - "cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": - version: 7.0.3 - resolution: "cross-spawn@npm:7.0.3" + version: 7.0.6 + resolution: "cross-spawn@npm:7.0.6" dependencies: path-key: ^3.1.0 shebang-command: ^2.0.0 which: ^2.0.1 - checksum: 5738c312387081c98d69c98e105b6327b069197f864a60593245d64c8089c8a0a744e16349281210d56835bb9274130d825a78b2ad6853ca13cfbeffc0c31750 - languageName: node - linkType: hard - -"cross-undici-fetch@npm:^0.1.4": - version: 0.1.4 - resolution: "cross-undici-fetch@npm:0.1.4" - dependencies: - abort-controller: ^3.0.0 - form-data-encoder: ^1.7.1 - formdata-node: ^4.3.1 - node-fetch: ^2.6.5 - undici: ^4.9.3 - checksum: 479209bc4bdac65f21dc180541168b3bd186e3a9bb99675ab57b344451eb2445b2510e67419e25b8647bec17aa82f1d3c4f8ad05686ef5cae46c6224f9b2c053 + checksum: 053ea8b2135caff68a9e81470e845613e374e7309a47731e81639de3eaeb90c3d01af0e0b44d2ab9d50b43467223b88567dfeb3262db942dc063b9976718ffc1 languageName: node linkType: hard @@ -14791,13 +15124,6 @@ __metadata: languageName: node linkType: hard -"crypto-js@npm:^4.1.1": - version: 4.1.1 - resolution: "crypto-js@npm:4.1.1" - checksum: 50cc66a35f2738171d9a6d80c85ba7d00cb6440b756db035ba9ccd03032c0a803029a62969ecd4c844106c980af87687c64b204dd967989379c4f354fb482d37 - languageName: node - linkType: hard - "crypto-random-string@npm:^2.0.0": version: 2.0.0 resolution: "crypto-random-string@npm:2.0.0" @@ -14827,12 +15153,12 @@ __metadata: languageName: node linkType: hard -"css-declaration-sorter@npm:^6.2.2": - version: 6.2.2 - resolution: "css-declaration-sorter@npm:6.2.2" +"css-declaration-sorter@npm:^6.3.1": + version: 6.4.1 + resolution: "css-declaration-sorter@npm:6.4.1" peerDependencies: postcss: ^8.0.9 - checksum: 108f97dc86ee59141d41a8adda75bd64be269ccf58f008c6b9cbbfac25c99d87ba064480a69ddd08e6ee15b2955a3d4790f7e80f8839cc70d31e51e641232649 + checksum: b8b664338dac528266a1ed9b27927ac51a907fb16bc1954fa9038b5286c442603bd494cc920c6a3616111309d18ee6b5a85b6d9927938efc942af452a5145160 languageName: node linkType: hard @@ -14849,46 +15175,50 @@ __metadata: languageName: node linkType: hard -"css-loader@npm:^6.5.1": - version: 6.7.1 - resolution: "css-loader@npm:6.7.1" +"css-loader@npm:^6.8.1": + version: 6.8.1 + resolution: "css-loader@npm:6.8.1" dependencies: icss-utils: ^5.1.0 - postcss: ^8.4.7 + postcss: ^8.4.21 postcss-modules-extract-imports: ^3.0.0 - postcss-modules-local-by-default: ^4.0.0 + postcss-modules-local-by-default: ^4.0.3 postcss-modules-scope: ^3.0.0 postcss-modules-values: ^4.0.0 postcss-value-parser: ^4.2.0 - semver: ^7.3.5 + semver: ^7.3.8 peerDependencies: webpack: ^5.0.0 - checksum: c9e900e2a6012a988ab36cf87598fa1e74cd570ab25dbcc8a5d7f10a91a0f9549ff3656b9bbb2bf26b9f5a39f76b9b4b148513c4085c23b73c9c1d5cc2f7de12 + checksum: a6e23de4ec1d2832f10b8ca3cfec6b6097a97ca3c73f64338ae5cd110ac270f1b218ff0273d39f677a7a561f1a9d9b0d332274664d0991bcfafaae162c2669c4 languageName: node linkType: hard -"css-minimizer-webpack-plugin@npm:^3.2.0": - version: 3.4.1 - resolution: "css-minimizer-webpack-plugin@npm:3.4.1" +"css-minimizer-webpack-plugin@npm:^5.0.1": + version: 5.0.1 + resolution: "css-minimizer-webpack-plugin@npm:5.0.1" dependencies: - cssnano: ^5.0.6 - jest-worker: ^27.0.2 - postcss: ^8.3.5 - schema-utils: ^4.0.0 - serialize-javascript: ^6.0.0 - source-map: ^0.6.1 + "@jridgewell/trace-mapping": ^0.3.18 + cssnano: ^6.0.1 + jest-worker: ^29.4.3 + postcss: ^8.4.24 + schema-utils: ^4.0.1 + serialize-javascript: ^6.0.1 peerDependencies: webpack: ^5.0.0 peerDependenciesMeta: "@parcel/css": optional: true + "@swc/css": + optional: true clean-css: optional: true csso: optional: true esbuild: optional: true - checksum: a6b749a136f7a62a173e576a10c8f2ada18013800a2698ede08dfdf6df6761b9ad24cabfce153ef4958ffcf8509e7b6a40c6ddffa6eb06f3624a97c17b825e06 + lightningcss: + optional: true + checksum: 1792259e18f7c5ee25b6bbf60b38b64201747add83d1f751c8c654159b46ebacd0d1103d35f17d97197033e21e02d2ba4a4e9aa14c9c0d067b7c7653c721814e languageName: node linkType: hard @@ -14935,6 +15265,19 @@ __metadata: languageName: node linkType: hard +"css-select@npm:^5.1.0": + version: 5.1.0 + resolution: "css-select@npm:5.1.0" + dependencies: + boolbase: ^1.0.0 + css-what: ^6.1.0 + domhandler: ^5.0.2 + domutils: ^3.0.1 + nth-check: ^2.0.1 + checksum: 551c60dba5b54054741032c1793b5734f6ba45e23ae9e82761a3c0ed1acbb8cfedfa443aaba3a3c1a54cac12b456d2012a09d2cd5f0e82e430454c1b9d84d500 + languageName: node + linkType: hard + "css-tree@npm:1.0.0-alpha.37": version: 1.0.0-alpha.37 resolution: "css-tree@npm:1.0.0-alpha.37" @@ -14945,7 +15288,7 @@ __metadata: languageName: node linkType: hard -"css-tree@npm:^1.1.2, css-tree@npm:^1.1.3": +"css-tree@npm:^1.1.2": version: 1.1.3 resolution: "css-tree@npm:1.1.3" dependencies: @@ -14955,6 +15298,26 @@ __metadata: languageName: node linkType: hard +"css-tree@npm:^2.2.1": + version: 2.3.1 + resolution: "css-tree@npm:2.3.1" + dependencies: + mdn-data: 2.0.30 + source-map-js: ^1.0.1 + checksum: 6f8c1a11d5e9b14bf02d10717fc0351b66ba12594166f65abfbd8eb8b5b490dd367f5c7721db241a3c792d935fc6751fbc09f7e1598d421477ad9fadc30f4f24 + languageName: node + linkType: hard + +"css-tree@npm:~2.2.0": + version: 2.2.1 + resolution: "css-tree@npm:2.2.1" + dependencies: + mdn-data: 2.0.28 + source-map-js: ^1.0.1 + checksum: 47e87b0f02f8ac22f57eceb65c58011dd142d2158128882a0bf963cf2eabb81a4ebbc2e3790c8289be7919fa8b83750c7b69272bd66772c708143b772ba3c186 + languageName: node + linkType: hard + "css-what@npm:^3.2.1": version: 3.4.2 resolution: "css-what@npm:3.4.2" @@ -14969,6 +15332,13 @@ __metadata: languageName: node linkType: hard +"css-what@npm:^6.1.0": + version: 6.1.0 + resolution: "css-what@npm:6.1.0" + checksum: a09f5a6b14ba8dcf57ae9a59474722e80f20406c53a61e9aedb0eedc693b135113ffe2983f4efc4b5065ae639442e9ae88df24941ef159c218b231011d733746 + languageName: node + linkType: hard + "css.escape@npm:^1.5.1": version: 1.5.1 resolution: "css.escape@npm:1.5.1" @@ -15003,68 +15373,76 @@ __metadata: languageName: node linkType: hard -"cssnano-preset-default@npm:^5.2.7": - version: 5.2.7 - resolution: "cssnano-preset-default@npm:5.2.7" - dependencies: - css-declaration-sorter: ^6.2.2 - cssnano-utils: ^3.1.0 - postcss-calc: ^8.2.3 - postcss-colormin: ^5.3.0 - postcss-convert-values: ^5.1.0 - postcss-discard-comments: ^5.1.1 - postcss-discard-duplicates: ^5.1.0 - postcss-discard-empty: ^5.1.1 - postcss-discard-overridden: ^5.1.0 - postcss-merge-longhand: ^5.1.4 - postcss-merge-rules: ^5.1.1 - postcss-minify-font-values: ^5.1.0 - postcss-minify-gradients: ^5.1.1 - postcss-minify-params: ^5.1.2 - postcss-minify-selectors: ^5.2.0 - postcss-normalize-charset: ^5.1.0 - postcss-normalize-display-values: ^5.1.0 - postcss-normalize-positions: ^5.1.0 - postcss-normalize-repeat-style: ^5.1.0 - postcss-normalize-string: ^5.1.0 - postcss-normalize-timing-functions: ^5.1.0 - postcss-normalize-unicode: ^5.1.0 - postcss-normalize-url: ^5.1.0 - postcss-normalize-whitespace: ^5.1.1 - postcss-ordered-values: ^5.1.1 - postcss-reduce-initial: ^5.1.0 - postcss-reduce-transforms: ^5.1.0 - postcss-svgo: ^5.1.0 - postcss-unique-selectors: ^5.1.1 +"cssnano-preset-default@npm:^6.0.1": + version: 6.0.1 + resolution: "cssnano-preset-default@npm:6.0.1" + dependencies: + css-declaration-sorter: ^6.3.1 + cssnano-utils: ^4.0.0 + postcss-calc: ^9.0.0 + postcss-colormin: ^6.0.0 + postcss-convert-values: ^6.0.0 + postcss-discard-comments: ^6.0.0 + postcss-discard-duplicates: ^6.0.0 + postcss-discard-empty: ^6.0.0 + postcss-discard-overridden: ^6.0.0 + postcss-merge-longhand: ^6.0.0 + postcss-merge-rules: ^6.0.1 + postcss-minify-font-values: ^6.0.0 + postcss-minify-gradients: ^6.0.0 + postcss-minify-params: ^6.0.0 + postcss-minify-selectors: ^6.0.0 + postcss-normalize-charset: ^6.0.0 + postcss-normalize-display-values: ^6.0.0 + postcss-normalize-positions: ^6.0.0 + postcss-normalize-repeat-style: ^6.0.0 + postcss-normalize-string: ^6.0.0 + postcss-normalize-timing-functions: ^6.0.0 + postcss-normalize-unicode: ^6.0.0 + postcss-normalize-url: ^6.0.0 + postcss-normalize-whitespace: ^6.0.0 + postcss-ordered-values: ^6.0.0 + postcss-reduce-initial: ^6.0.0 + postcss-reduce-transforms: ^6.0.0 + postcss-svgo: ^6.0.0 + postcss-unique-selectors: ^6.0.0 peerDependencies: postcss: ^8.2.15 - checksum: dab35dcbb94d0d2708ee8d04ed518783ac7b9975b8f82adcfca601754a3bba95de41a1b16c1b5aadd87fb083cf47554c9abd76fce3da30dc5365c2305751e72f + checksum: 401a8d0712cca6577df52cf4aac234ff4a946f0f51c0d09e7c518fff389706cff54d702ff22762e834b23401a89b836aef113e69cc66fa5dfa1f361bdd932495 languageName: node linkType: hard -"cssnano-utils@npm:^3.1.0": - version: 3.1.0 - resolution: "cssnano-utils@npm:3.1.0" +"cssnano-utils@npm:^4.0.0": + version: 4.0.0 + resolution: "cssnano-utils@npm:4.0.0" peerDependencies: postcss: ^8.2.15 - checksum: 057508645a3e7584decede1045daa5b362dbfa2f5df96c3527c7d52e41e787a3442a56a8ea0c0af6a757f518e79a459ee580a35c323ad0d0eec912afd67d7630 + checksum: ca5cb2be5ec8ea624c28f5f54c00a440557afd3c2b25cb568517db44d230833743f3db30729126efe4d7fc616a42718dd76255bbefcb7d3cc7e3ff5989d907b3 languageName: node linkType: hard -"cssnano@npm:^5.0.6": - version: 5.1.7 - resolution: "cssnano@npm:5.1.7" +"cssnano@npm:^6.0.1": + version: 6.0.1 + resolution: "cssnano@npm:6.0.1" dependencies: - cssnano-preset-default: ^5.2.7 - lilconfig: ^2.0.3 - yaml: ^1.10.2 + cssnano-preset-default: ^6.0.1 + lilconfig: ^2.1.0 peerDependencies: postcss: ^8.2.15 - checksum: d786ec104ec4b19dd11a1403c74a79e37f4985de4336e5498c59e96de830343bda1548a6961dbcb6e4267ef1d76cf38568f72bb96b797f468eca930490490be3 + checksum: b73a3a257dd32201ce504cb34b08f1259c8a260b063f58d33e03283149d94ee2ba938d7f9beae1413f0f34e06828759575ade6ae95fa01d199f291e1d4f6d2c2 + languageName: node + linkType: hard + +"csso@npm:5.0.5": + version: 5.0.5 + resolution: "csso@npm:5.0.5" + dependencies: + css-tree: ~2.2.0 + checksum: ab4beb1e97dd7e207c10e9925405b45f15a6cd1b4880a8686ad573aa6d476aed28b4121a666cffd26c37a26179f7b54741f7c257543003bfb244d06a62ad569b languageName: node linkType: hard -"csso@npm:^4.0.2, csso@npm:^4.2.0": +"csso@npm:^4.0.2": version: 4.2.0 resolution: "csso@npm:4.2.0" dependencies: @@ -15080,6 +15458,13 @@ __metadata: languageName: node linkType: hard +"csv-parse@npm:^5.5.2": + version: 5.5.2 + resolution: "csv-parse@npm:5.5.2" + checksum: 96e2f0afd4f74a43908d197379cbbc59b73d144fc54208763e838614e1b98f5be23c4c3e707ead1ed4dd838b9f515f40ea6d2c98dbd3a50becb4663e982d1f78 + languageName: node + linkType: hard + "damerau-levenshtein@npm:^1.0.7": version: 1.0.7 resolution: "damerau-levenshtein@npm:1.0.7" @@ -15117,14 +15502,47 @@ __metadata: languageName: node linkType: hard -"data-uri-to-buffer@npm:3": - version: 3.0.1 - resolution: "data-uri-to-buffer@npm:3.0.1" - checksum: 01fa28525402582fbb972c91822533f5528156e9e7241512b903467acbe2e0505760504e22c548bb707c7a56b5459194ee4fa6434e5995fa1a658744c2ce0cff +"data-uri-to-buffer@npm:^5.0.1": + version: 5.0.1 + resolution: "data-uri-to-buffer@npm:5.0.1" + checksum: 08ad2f2cd5cb8f37258fcd94ccaa549948bf3b0f921f29bb58840ae64c968c06efb60edf3dd51f803084765e5d3ab11896a98fd33a7729a7eb23e83d5ba5223c + languageName: node + linkType: hard + +"data-view-buffer@npm:^1.0.1": + version: 1.0.1 + resolution: "data-view-buffer@npm:1.0.1" + dependencies: + call-bind: ^1.0.6 + es-errors: ^1.3.0 + is-data-view: ^1.0.1 + checksum: 8984119e59dbed906a11fcfb417d7d861936f16697a0e7216fe2c6c810f6b5e8f4a5281e73f2c28e8e9259027190ac4a33e2a65fdd7fa86ac06b76e838918583 + languageName: node + linkType: hard + +"data-view-byte-length@npm:^1.0.1": + version: 1.0.1 + resolution: "data-view-byte-length@npm:1.0.1" + dependencies: + call-bind: ^1.0.7 + es-errors: ^1.3.0 + is-data-view: ^1.0.1 + checksum: b7d9e48a0cf5aefed9ab7d123559917b2d7e0d65531f43b2fd95b9d3a6b46042dd3fca597c42bba384e66b70d7ad66ff23932f8367b241f53d93af42cfe04ec2 + languageName: node + linkType: hard + +"data-view-byte-offset@npm:^1.0.0": + version: 1.0.0 + resolution: "data-view-byte-offset@npm:1.0.0" + dependencies: + call-bind: ^1.0.6 + es-errors: ^1.3.0 + is-data-view: ^1.0.1 + checksum: 21b0d2e53fd6e20cc4257c873bf6d36d77bd6185624b84076c0a1ddaa757b49aaf076254006341d35568e89f52eecd1ccb1a502cfb620f2beca04f48a6a62a8f languageName: node linkType: hard -"dataloader@npm:2.0.0, dataloader@npm:^2.0.0": +"dataloader@npm:^2.0.0": version: 2.0.0 resolution: "dataloader@npm:2.0.0" checksum: af2c080fc29dd8286d87df63bbe69e09b1ddf4e88b2959f603e82969d3a58d04ba8a98286f9e5767a22a859009d024f002757a9f82adbc931d8a58e63f8dc8ce @@ -15147,31 +15565,31 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:4.3.4, debug@npm:^4.0.1, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4": - version: 4.3.4 - resolution: "debug@npm:4.3.4" +"debug@npm:4, debug@npm:^4.0.1, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4, debug@npm:^4.3.5": + version: 4.4.0 + resolution: "debug@npm:4.4.0" dependencies: - ms: 2.1.2 + ms: ^2.1.3 peerDependenciesMeta: supports-color: optional: true - checksum: cedbec45298dd5c501d01b92b119cd3faebe5438c3917ff11ae1bff86a6c722930ac9c8659792824013168ba6db7c4668225d845c633fbdafbbf902a6389f736 + checksum: db94f1a182bf886f57b4755f85b3a74c39b5114b9377b7ab375dc2cfa3454f09490cc6c30f829df3fc8042bc8b8995f6567ce5cd96f3bc3688bd24027197d9de languageName: node linkType: hard -"debug@npm:4.3.2": - version: 4.3.2 - resolution: "debug@npm:4.3.2" +"debug@npm:4.3.4": + version: 4.3.4 + resolution: "debug@npm:4.3.4" dependencies: ms: 2.1.2 peerDependenciesMeta: supports-color: optional: true - checksum: 3cc408070bcee066ee9b2a4f3a9c40f53728919ec7c7ff568f7c3a75b0723cb5a8407191a63495be4e10669e99b0ff7f26ec70e10b025da1898cdce4876d96ca + checksum: cedbec45298dd5c501d01b92b119cd3faebe5438c3917ff11ae1bff86a6c722930ac9c8659792824013168ba6db7c4668225d845c633fbdafbbf902a6389f736 languageName: node linkType: hard -"debug@npm:^3.1.1, debug@npm:^3.2.7": +"debug@npm:^3.2.7": version: 3.2.7 resolution: "debug@npm:3.2.7" dependencies: @@ -15280,6 +15698,17 @@ __metadata: languageName: node linkType: hard +"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.4": + version: 1.1.4 + resolution: "define-data-property@npm:1.1.4" + dependencies: + es-define-property: ^1.0.0 + es-errors: ^1.3.0 + gopd: ^1.0.1 + checksum: dea0606d1483eb9db8d930d4eac62ca0fa16738b0b3e07046cddfacf7d8c868bbe13fa0cb263eb91c7d0d527960dc3f2f2471a69ed7816210307f6744fe62e37 + languageName: node + linkType: hard + "define-lazy-prop@npm:^2.0.0": version: 2.0.0 resolution: "define-lazy-prop@npm:2.0.0" @@ -15287,13 +15716,14 @@ __metadata: languageName: node linkType: hard -"define-properties@npm:^1.1.3, define-properties@npm:^1.1.4": - version: 1.1.4 - resolution: "define-properties@npm:1.1.4" +"define-properties@npm:^1.1.3, define-properties@npm:^1.2.0, define-properties@npm:^1.2.1": + version: 1.2.1 + resolution: "define-properties@npm:1.2.1" dependencies: + define-data-property: ^1.0.1 has-property-descriptors: ^1.0.0 object-keys: ^1.1.1 - checksum: 1e09acd814c3761f2355d9c8a18fbc2b5d2e1073e1302245c134e96aacbff51b152e2a6f5f5db23af3c43e26f4e3a0d42f569aa4135f49046246c934bfb8e1dc + checksum: 88a152319ffe1396ccc6ded510a3896e77efac7a1bfbaa174a7b00414a1747377e0bb525d303794a47cf30e805c2ec84e575758512c6e44a993076d29fd4e6c3 languageName: node linkType: hard @@ -15304,15 +15734,14 @@ __metadata: languageName: node linkType: hard -"degenerator@npm:^3.0.1": - version: 3.0.1 - resolution: "degenerator@npm:3.0.1" +"degenerator@npm:^5.0.0": + version: 5.0.1 + resolution: "degenerator@npm:5.0.1" dependencies: - ast-types: ^0.13.2 - escodegen: ^1.8.1 - esprima: ^4.0.0 - vm2: ^3.9.3 - checksum: b4c714597450899878ff79cfd37e8032940d4efb093c066f74c5c4c0b8daab0245bf2d44342b554da0f17864cac0cfe4a5c786f0dae55c74541534b929f1f76f + ast-types: ^0.13.4 + escodegen: ^2.1.0 + esprima: ^4.0.1 + checksum: e48d8a651edeb512a648711a09afec269aac6de97d442a4bb9cf121a66877e0eec11b9727100a10252335c0666ae1c84a8bc1e3a3f47788742c975064d2c7b1c languageName: node linkType: hard @@ -15346,13 +15775,20 @@ __metadata: languageName: node linkType: hard -"denque@npm:^2.0.1": +"denque@npm:^2.1.0": version: 2.1.0 resolution: "denque@npm:2.1.0" checksum: f9ef81aa0af9c6c614a727cb3bd13c5d7db2af1abf9e6352045b86e85873e629690f6222f4edd49d10e4ccf8f078bbeec0794fafaf61b659c0589d0c511ec363 languageName: node linkType: hard +"depd@npm:2.0.0": + version: 2.0.0 + resolution: "depd@npm:2.0.0" + checksum: 58bd06ec20e19529b06f7ad07ddab60e504d9e0faca4bd23079fac2d279c3594334d736508dc350e06e510aba5e22e4594483b3a6562ce7c17dd797f4cc4ad2c + languageName: node + linkType: hard + "depd@npm:^1.1.2, depd@npm:~1.1.2": version: 1.1.2 resolution: "depd@npm:1.1.2" @@ -15384,10 +15820,10 @@ __metadata: languageName: node linkType: hard -"destroy@npm:~1.0.4": - version: 1.0.4 - resolution: "destroy@npm:1.0.4" - checksum: eab493808ba17a1fa22c71ef1a4e68d2c4c5222a38040606c966d2ab09117f3a7f3e05c39bffbe41a697f9de552039e43c30e46f0c3eab3faa9f82e800e172a0 +"destroy@npm:1.2.0": + version: 1.2.0 + resolution: "destroy@npm:1.2.0" + checksum: bd7633942f57418f5a3b80d5cb53898127bcf53e24cdf5d5f4396be471417671f0fee48a4ebe9a1e9defbde2a31280011af58a57e090ff822f589b443ed4e643 languageName: node linkType: hard @@ -15495,20 +15931,6 @@ __metadata: languageName: node linkType: hard -"diff@npm:5.0.0": - version: 5.0.0 - resolution: "diff@npm:5.0.0" - checksum: 08c5904779bbababcd31f1707657b1ad57f8a9b65e6f88d3fb501d09a965d5f8d73066898a7d3f35981f9e4101892c61d99175d421f3b759533213c253d91134 - languageName: node - linkType: hard - -"diff@npm:^3.5.0": - version: 3.5.0 - resolution: "diff@npm:3.5.0" - checksum: fc62d5ba9f6d1b8b5833380969037007913d4886997838c247c54ec6934f09ae5a07e17ae28b1f016018149d81df8ad89306f52eac1afa899e0bed49015a64d1 - languageName: node - linkType: hard - "diff@npm:^4.0.1": version: 4.0.2 resolution: "diff@npm:4.0.2" @@ -15516,10 +15938,10 @@ __metadata: languageName: node linkType: hard -"diff@npm:^5.0.0, diff@npm:^5.1.0": - version: 5.1.0 - resolution: "diff@npm:5.1.0" - checksum: 77a0d9beb9ed54796154ac2511872288432124ac90a1cabb1878783c9b4d81f1847f3b746a0630b1e836181461d2c76e1e6b95559bef86ed16294d114862e364 +"diff@npm:^5.1.0, diff@npm:^5.2.0": + version: 5.2.0 + resolution: "diff@npm:5.2.0" + checksum: aed0941f206fe261ecb258dc8d0ceea8abbde3ace5827518ff8d302f0fc9cc81ce116c4d8f379151171336caf0516b79e01abdc1ed1201b6440d895a66689eb4 languageName: node linkType: hard @@ -15621,6 +16043,17 @@ __metadata: languageName: node linkType: hard +"dom-serializer@npm:^2.0.0": + version: 2.0.0 + resolution: "dom-serializer@npm:2.0.0" + dependencies: + domelementtype: ^2.3.0 + domhandler: ^5.0.2 + entities: ^4.2.0 + checksum: d5ae2b7110ca3746b3643d3ef60ef823f5f078667baf530cec096433f1627ec4b6fa8c072f09d079d7cda915fd2c7bc1b7b935681e9b09e591e1e15f4040b8e2 + languageName: node + linkType: hard + "domelementtype@npm:1": version: 1.3.1 resolution: "domelementtype@npm:1.3.1" @@ -15628,10 +16061,10 @@ __metadata: languageName: node linkType: hard -"domelementtype@npm:^2.0.1, domelementtype@npm:^2.2.0": - version: 2.2.0 - resolution: "domelementtype@npm:2.2.0" - checksum: 0e3824e21fb9ff2cda9579ad04ef0068c58cc1746cf723560e1b4cb73ccae324062d468b25a576948459df7dd99e42d8a100b7fcfc6e05c8eefa2e6fed3f8f7d +"domelementtype@npm:^2.0.1, domelementtype@npm:^2.2.0, domelementtype@npm:^2.3.0": + version: 2.3.0 + resolution: "domelementtype@npm:2.3.0" + checksum: 686f5a9ef0fff078c1412c05db73a0dce096190036f33e400a07e2a4518e9f56b1e324f5c576a0a747ef0e75b5d985c040b0d51945ce780c0dd3c625a18cd8c9 languageName: node linkType: hard @@ -15644,6 +16077,15 @@ __metadata: languageName: node linkType: hard +"domhandler@npm:^5.0.2, domhandler@npm:^5.0.3": + version: 5.0.3 + resolution: "domhandler@npm:5.0.3" + dependencies: + domelementtype: ^2.3.0 + checksum: bba1e5932b3e196ad6862286d76adc89a0dbf0c773e5ced1eb01f9af930c50093a084eff14b8de5ea60b895c56a04d5de8bbc4930c5543d029091916770b2d2a + languageName: node + linkType: hard + "domutils@npm:^1.7.0": version: 1.7.0 resolution: "domutils@npm:1.7.0" @@ -15665,6 +16107,17 @@ __metadata: languageName: node linkType: hard +"domutils@npm:^3.0.1": + version: 3.1.0 + resolution: "domutils@npm:3.1.0" + dependencies: + dom-serializer: ^2.0.0 + domelementtype: ^2.3.0 + domhandler: ^5.0.3 + checksum: 342d64cf4d07b8a0573fb51e0a6312a88fb520c7fefd751870bf72fa5fc0f2e0cb9a3958a573610b1d608c6e2a69b8e9b4b40f0bfb8f87a71bce4f180cca1887 + languageName: node + linkType: hard + "dot-case@npm:^3.0.4": version: 3.0.4 resolution: "dot-case@npm:3.0.4" @@ -15714,10 +16167,10 @@ __metadata: languageName: node linkType: hard -"dset@npm:^3.1.0": - version: 3.1.2 - resolution: "dset@npm:3.1.2" - checksum: a10d5f214ccd53e7d2e79215473256b74cb98fd3f20ad4f4684ab575b19bac71e5dda524d6febcf42854062e3f575a2dbfca4d53d2ffb9ae238eecdcc97a095b +"dset@npm:^3.1.2": + version: 3.1.4 + resolution: "dset@npm:3.1.4" + checksum: b67bbd28dd8a539e90c15ffb61100eb64ef995c5270a124d4f99bbb53f4d82f55a051b731ba81f3215dd9dce2b4c8d69927dc20b3be1c5fc88bab159467aa438 languageName: node linkType: hard @@ -15757,15 +16210,6 @@ __metadata: languageName: node linkType: hard -"ecdsa-sig-formatter@npm:1.0.11": - version: 1.0.11 - resolution: "ecdsa-sig-formatter@npm:1.0.11" - dependencies: - safe-buffer: ^5.0.1 - checksum: ebfbf19d4b8be938f4dd4a83b8788385da353d63307ede301a9252f9f7f88672e76f2191618fd8edfc2f24679236064176fab0b78131b161ee73daa37125408c - languageName: node - linkType: hard - "ee-first@npm:1.1.1": version: 1.1.1 resolution: "ee-first@npm:1.1.1" @@ -15773,27 +16217,27 @@ __metadata: languageName: node linkType: hard -"ejs@npm:^3.1.6, ejs@npm:^3.1.7": - version: 3.1.7 - resolution: "ejs@npm:3.1.7" +"ejs@npm:^3.1.10": + version: 3.1.10 + resolution: "ejs@npm:3.1.10" dependencies: jake: ^10.8.5 bin: ejs: bin/cli.js - checksum: 7b7ddc9d4f574d57e6b3e7f9049ddf0af33f38995886fb4dd8b335f56839cc04b1cdd983d1b5b9cfcaa5c1372b643e6d68d2fcecdc1b5fdbdeab55b24245135e + checksum: 52eade9e68416ed04f7f92c492183340582a36482836b11eab97b159fcdcfdedc62233a1bf0bf5e5e1851c501f2dca0e2e9afd111db2599e4e7f53ee29429ae1 languageName: node linkType: hard -"electron-to-chromium@npm:^1.4.251": - version: 1.4.284 - resolution: "electron-to-chromium@npm:1.4.284" - checksum: 33a7509755efbc0e13e81cdf0486ed37ea354857213b92a987a81e229083c1b2ee5f663c1103db9e5ec142a611e0daeeee02f757f7184833866f8aecb7046c2b +"electron-to-chromium@npm:^1.5.4": + version: 1.5.13 + resolution: "electron-to-chromium@npm:1.5.13" + checksum: 1d88ac39447e1d718c4296f92fe89836df4688daf2d362d6c49108136795f05a56dd9c950f1c6715e0395fa037c3b5f5ea686c543fdc90e6d74a005877c45022 languageName: node linkType: hard -"elliptic@npm:^6.5.3": - version: 6.5.4 - resolution: "elliptic@npm:6.5.4" +"elliptic@npm:^6.5.3, elliptic@npm:^6.5.4": + version: 6.6.0 + resolution: "elliptic@npm:6.6.0" dependencies: bn.js: ^4.11.9 brorand: ^1.1.0 @@ -15802,7 +16246,7 @@ __metadata: inherits: ^2.0.4 minimalistic-assert: ^1.0.1 minimalistic-crypto-utils: ^1.0.1 - checksum: 5f361270292c3b27cf0843e84526d11dec31652f03c2763c6c2b8178548175ff5eba95341dd62baff92b2265d1af076526915d8af6cc9cb7559c44a62f8ca6e2 + checksum: 42eb3492e218017bf8923a5d14a86f414952f2f771361805b3ae9f380923b5da53e203d0d92be95cb0a248858a78db7db5934a346e268abb757e6fe561d401c9 languageName: node linkType: hard @@ -15848,6 +16292,13 @@ __metadata: languageName: node linkType: hard +"encodeurl@npm:~2.0.0": + version: 2.0.0 + resolution: "encodeurl@npm:2.0.0" + checksum: 5d317306acb13e6590e28e27924c754163946a2480de11865c991a3a7eed4315cd3fba378b543ca145829569eefe9b899f3d84bb09870f675ae60bc924b01ceb + languageName: node + linkType: hard + "encoding@npm:^0.1.13": version: 0.1.13 resolution: "encoding@npm:0.1.13" @@ -15866,13 +16317,13 @@ __metadata: languageName: node linkType: hard -"enhanced-resolve@npm:^5.10.0, enhanced-resolve@npm:^5.12.0": - version: 5.13.0 - resolution: "enhanced-resolve@npm:5.13.0" +"enhanced-resolve@npm:^5.12.0, enhanced-resolve@npm:^5.17.1": + version: 5.17.1 + resolution: "enhanced-resolve@npm:5.17.1" dependencies: graceful-fs: ^4.2.4 tapable: ^2.2.0 - checksum: 9aa28d0aeb5b6a5bc2340884ac9f90a3fa96e5514ad3f5fb318089843668581a96bdeddfd743fbd8b9407d16e82dd60cf6151fc1af8dd17a43490e0f9093950c + checksum: 81a0515675eca17efdba2cf5bad87abc91a528fc1191aad50e275e74f045b41506167d420099022da7181c8d787170ea41e4a11a0b10b7a16f6237daecb15370 languageName: node linkType: hard @@ -15892,6 +16343,13 @@ __metadata: languageName: node linkType: hard +"entities@npm:^4.2.0": + version: 4.5.0 + resolution: "entities@npm:4.5.0" + checksum: 5b039739f7621f5d1ad996715e53d964035f75ad3b9a4d38c6b3804bb226e282ffeae2443624d8fdd9c47d8e926ae9ac009c54671243f0c3294c26af7cc85250 + languageName: node + linkType: hard + "entities@npm:~2.1.0": version: 2.1.0 resolution: "entities@npm:2.1.0" @@ -15947,41 +16405,100 @@ __metadata: languageName: node linkType: hard -"es-abstract@npm:^1.17.2, es-abstract@npm:^1.18.5, es-abstract@npm:^1.19.0, es-abstract@npm:^1.19.1, es-abstract@npm:^1.19.2, es-abstract@npm:^1.19.5": - version: 1.20.1 - resolution: "es-abstract@npm:1.20.1" +"es-abstract@npm:^1.17.2, es-abstract@npm:^1.19.0, es-abstract@npm:^1.19.1, es-abstract@npm:^1.19.2, es-abstract@npm:^1.22.1, es-abstract@npm:^1.22.3, es-abstract@npm:^1.23.0": + version: 1.23.3 + resolution: "es-abstract@npm:1.23.3" dependencies: - call-bind: ^1.0.2 + array-buffer-byte-length: ^1.0.1 + arraybuffer.prototype.slice: ^1.0.3 + available-typed-arrays: ^1.0.7 + call-bind: ^1.0.7 + data-view-buffer: ^1.0.1 + data-view-byte-length: ^1.0.1 + data-view-byte-offset: ^1.0.0 + es-define-property: ^1.0.0 + es-errors: ^1.3.0 + es-object-atoms: ^1.0.0 + es-set-tostringtag: ^2.0.3 es-to-primitive: ^1.2.1 - function-bind: ^1.1.1 - function.prototype.name: ^1.1.5 - get-intrinsic: ^1.1.1 - get-symbol-description: ^1.0.0 - has: ^1.0.3 - has-property-descriptors: ^1.0.0 + function.prototype.name: ^1.1.6 + get-intrinsic: ^1.2.4 + get-symbol-description: ^1.0.2 + globalthis: ^1.0.3 + gopd: ^1.0.1 + has-property-descriptors: ^1.0.2 + has-proto: ^1.0.3 has-symbols: ^1.0.3 - internal-slot: ^1.0.3 - is-callable: ^1.2.4 - is-negative-zero: ^2.0.2 + hasown: ^2.0.2 + internal-slot: ^1.0.7 + is-array-buffer: ^3.0.4 + is-callable: ^1.2.7 + is-data-view: ^1.0.1 + is-negative-zero: ^2.0.3 is-regex: ^1.1.4 - is-shared-array-buffer: ^1.0.2 + is-shared-array-buffer: ^1.0.3 is-string: ^1.0.7 + is-typed-array: ^1.1.13 is-weakref: ^1.0.2 - object-inspect: ^1.12.0 + object-inspect: ^1.13.1 object-keys: ^1.1.1 - object.assign: ^4.1.2 - regexp.prototype.flags: ^1.4.3 - string.prototype.trimend: ^1.0.5 - string.prototype.trimstart: ^1.0.5 + object.assign: ^4.1.5 + regexp.prototype.flags: ^1.5.2 + safe-array-concat: ^1.1.2 + safe-regex-test: ^1.0.3 + string.prototype.trim: ^1.2.9 + string.prototype.trimend: ^1.0.8 + string.prototype.trimstart: ^1.0.8 + typed-array-buffer: ^1.0.2 + typed-array-byte-length: ^1.0.1 + typed-array-byte-offset: ^1.0.2 + typed-array-length: ^1.0.6 unbox-primitive: ^1.0.2 - checksum: 1598f86d4e778032ef2be6ca573202689e08f8262121aff7fdb54682d9170465d49a10197db0704d4b71249ab95a1804f1666a19ac839f271c120d4662889060 + which-typed-array: ^1.1.15 + checksum: d27e9afafb225c6924bee9971a7f25f20c314f2d6cb93a63cada4ac11dcf42040896a6c22e5fb8f2a10767055ed4ddf400be3b1eb12297d281726de470b75666 + languageName: node + linkType: hard + +"es-define-property@npm:^1.0.0": + version: 1.0.0 + resolution: "es-define-property@npm:1.0.0" + dependencies: + get-intrinsic: ^1.2.4 + checksum: 6bf3191feb7ea2ebda48b577f69bdfac7a2b3c9bcf97307f55fd6ef1bbca0b49f0c219a935aca506c993d8c5d8bddd937766cb760cd5e5a1071351f2df9f9aa4 + languageName: node + linkType: hard + +"es-errors@npm:^1.2.1, es-errors@npm:^1.3.0": + version: 1.3.0 + resolution: "es-errors@npm:1.3.0" + checksum: 0a61325670072f98d8ae3b914edab3559b6caa980f08054a3b872052640d91da01d38df55df797fcc916389d77fc92b8d5906cf028f4db46d7e3003abecbca85 + languageName: node + linkType: hard + +"es-module-lexer@npm:^1.2.1": + version: 1.5.4 + resolution: "es-module-lexer@npm:1.5.4" + checksum: 300a469488c2f22081df1e4c8398c78db92358496e639b0df7f89ac6455462aaf5d8893939087c1a1cbcbf20eed4610c70e0bcb8f3e4b0d80a5d2611c539408c languageName: node linkType: hard -"es-module-lexer@npm:^0.9.0": - version: 0.9.3 - resolution: "es-module-lexer@npm:0.9.3" - checksum: be77d73aee709fdc68d22b9938da81dfee3bc45e8d601629258643fe5bfdab253d6e2540035e035cfa8cf52a96366c1c19b46bcc23b4507b1d44e5907d2e7f6c +"es-object-atoms@npm:^1.0.0": + version: 1.0.0 + resolution: "es-object-atoms@npm:1.0.0" + dependencies: + es-errors: ^1.3.0 + checksum: 1fed3d102eb27ab8d983337bb7c8b159dd2a1e63ff833ec54eea1311c96d5b08223b433060ba240541ca8adba9eee6b0a60cdbf2f80634b784febc9cc8b687b4 + languageName: node + linkType: hard + +"es-set-tostringtag@npm:^2.0.3": + version: 2.0.3 + resolution: "es-set-tostringtag@npm:2.0.3" + dependencies: + get-intrinsic: ^1.2.4 + has-tostringtag: ^1.0.2 + hasown: ^2.0.1 + checksum: f22aff1585eb33569c326323f0b0d175844a1f11618b86e193b386f8be0ea9474cfbe46df39c45d959f7aa8f6c06985dc51dd6bce5401645ec5a74c4ceaa836a languageName: node linkType: hard @@ -16005,10 +16522,10 @@ __metadata: languageName: node linkType: hard -"escalade@npm:^3.1.1": - version: 3.1.1 - resolution: "escalade@npm:3.1.1" - checksum: afd02e6ca91ffa813e1108b5e7756566173d6bc0d1eb951cb44d6b21702ec17c1cf116cfe75d4a2b02e05acb0b808a7a9387d0d1ca5cf9c04ad03a8445c3e46d +"escalade@npm:^3.1.1, escalade@npm:^3.1.2": + version: 3.2.0 + resolution: "escalade@npm:3.2.0" + checksum: ced4dd3a78e15897ed3be74e635110bbf3b08877b0a41be50dcb325ee0e0b5f65fc2d50e9845194d7c4633f327e2e1c6cce00a71b617c5673df0374201d67f65 languageName: node linkType: hard @@ -16033,13 +16550,6 @@ __metadata: languageName: node linkType: hard -"escape-string-regexp@npm:4.0.0, escape-string-regexp@npm:^4.0.0": - version: 4.0.0 - resolution: "escape-string-regexp@npm:4.0.0" - checksum: 9497d4dd307d845bd7f75180d8188bb17ea8c151c1edbf6b6717c100e104d629dc2dfb687686181b0f4b7d732c7dfdc4d5e7a8ff72de1b0ca283a75bbb3a9cd9 - languageName: node - linkType: hard - "escape-string-regexp@npm:^1.0.5": version: 1.0.5 resolution: "escape-string-regexp@npm:1.0.5" @@ -16054,6 +16564,13 @@ __metadata: languageName: node linkType: hard +"escape-string-regexp@npm:^4.0.0": + version: 4.0.0 + resolution: "escape-string-regexp@npm:4.0.0" + checksum: 9497d4dd307d845bd7f75180d8188bb17ea8c151c1edbf6b6717c100e104d629dc2dfb687686181b0f4b7d732c7dfdc4d5e7a8ff72de1b0ca283a75bbb3a9cd9 + languageName: node + linkType: hard + "escodegen@npm:1.8.x": version: 1.8.1 resolution: "escodegen@npm:1.8.1" @@ -16073,14 +16590,13 @@ __metadata: languageName: node linkType: hard -"escodegen@npm:^1.8.1": - version: 1.14.3 - resolution: "escodegen@npm:1.14.3" +"escodegen@npm:^2.1.0": + version: 2.1.0 + resolution: "escodegen@npm:2.1.0" dependencies: esprima: ^4.0.1 - estraverse: ^4.2.0 + estraverse: ^5.2.0 esutils: ^2.0.2 - optionator: ^0.8.1 source-map: ~0.6.1 dependenciesMeta: source-map: @@ -16088,7 +16604,7 @@ __metadata: bin: escodegen: bin/escodegen.js esgenerate: bin/esgenerate.js - checksum: 30d337803e8f44308c90267bf6192399e4b44792497c77a7506b68ab802ba6a48ebbe1ce77b219aba13dfd2de5f5e1c267e35be1ed87b2a9c3315e8b283e302a + checksum: e1450a1f75f67d35c061bf0d60888b15f62ab63aef9df1901cffc81cffbbb9e8b3de237c5502cf8613a017c1df3a3003881307c78835a1ab54d8c8d2206e01d3 languageName: node linkType: hard @@ -16628,7 +17144,7 @@ __metadata: languageName: node linkType: hard -"estraverse@npm:^4.1.1, estraverse@npm:^4.2.0": +"estraverse@npm:^4.1.1": version: 4.3.0 resolution: "estraverse@npm:4.3.0" checksum: 9cb46463ef8a8a4905d3708a652d60122a0c20bb58dec7e0e12ab0e7235123d74214fc0141d743c381813e1b992767e2708194f6f6e0f9fd00c1b4e0887b8b6d @@ -16670,13 +17186,6 @@ __metadata: languageName: node linkType: hard -"eventemitter3@npm:^3.1.0": - version: 3.1.2 - resolution: "eventemitter3@npm:3.1.2" - checksum: c67262eccbf85848b7cc6d4abb6c6e34155e15686db2a01c57669fd0d44441a574a19d44d25948b442929e065774cbe5003d8e77eed47674fbf876ac77887793 - languageName: node - linkType: hard - "eventemitter3@npm:^4.0.0, eventemitter3@npm:^4.0.4": version: 4.0.7 resolution: "eventemitter3@npm:4.0.7" @@ -16726,21 +17235,6 @@ __metadata: languageName: node linkType: hard -"execa@npm:^1.0.0": - version: 1.0.0 - resolution: "execa@npm:1.0.0" - dependencies: - cross-spawn: ^6.0.0 - get-stream: ^4.0.0 - is-stream: ^1.1.0 - npm-run-path: ^2.0.0 - p-finally: ^1.0.0 - signal-exit: ^3.0.0 - strip-eof: ^1.0.0 - checksum: cc71707c9aa4a2552346893ee63198bf70a04b5a1bc4f8a0ef40f1d03c319eae80932c59191f037990d7d102193e83a38ec72115fff814ec2fb3099f3661a590 - languageName: node - linkType: hard - "execa@npm:^5.0.0, execa@npm:^5.1.1": version: 5.1.1 resolution: "execa@npm:5.1.1" @@ -16811,41 +17305,42 @@ __metadata: languageName: node linkType: hard -"express@npm:^4.17.3": - version: 4.17.3 - resolution: "express@npm:4.17.3" +"express@npm:^4.17.3, express@npm:^4.21.2": + version: 4.21.2 + resolution: "express@npm:4.21.2" dependencies: accepts: ~1.3.8 array-flatten: 1.1.1 - body-parser: 1.19.2 + body-parser: 1.20.3 content-disposition: 0.5.4 content-type: ~1.0.4 - cookie: 0.4.2 + cookie: 0.7.1 cookie-signature: 1.0.6 debug: 2.6.9 - depd: ~1.1.2 - encodeurl: ~1.0.2 + depd: 2.0.0 + encodeurl: ~2.0.0 escape-html: ~1.0.3 etag: ~1.8.1 - finalhandler: ~1.1.2 + finalhandler: 1.3.1 fresh: 0.5.2 - merge-descriptors: 1.0.1 + http-errors: 2.0.0 + merge-descriptors: 1.0.3 methods: ~1.1.2 - on-finished: ~2.3.0 + on-finished: 2.4.1 parseurl: ~1.3.3 - path-to-regexp: 0.1.7 + path-to-regexp: 0.1.12 proxy-addr: ~2.0.7 - qs: 6.9.7 + qs: 6.13.0 range-parser: ~1.2.1 safe-buffer: 5.2.1 - send: 0.17.2 - serve-static: 1.14.2 + send: 0.19.0 + serve-static: 1.16.2 setprototypeof: 1.2.0 - statuses: ~1.5.0 + statuses: 2.0.1 type-is: ~1.6.18 utils-merge: 1.0.1 vary: ~1.1.2 - checksum: 8fa8a8ae26bd11082b575ddfecdfe51ca535e048ebcf58455e3f813aacc1712e09a297a511efb0e4843e2d2a413cb8c1cd6b81f79371e50d7b8efb1aa6b8d5af + checksum: 38168fd0a32756600b56e6214afecf4fc79ec28eca7f7a91c2ab8d50df4f47562ca3f9dee412da7f5cea6b1a1544b33b40f9f8586dbacfbdada0fe90dbb10a1f languageName: node linkType: hard @@ -16867,30 +17362,6 @@ __metadata: languageName: node linkType: hard -"extract-files@npm:^11.0.0": - version: 11.0.0 - resolution: "extract-files@npm:11.0.0" - checksum: 7ac1cd693d081099d7c29f2b36aad199f92c5ea234c2016eb37ba213dddaefe74d54566f0675de5917d35cf98670183c2c9a0d96094727eb2c6dae02be7fc308 - languageName: node - linkType: hard - -"extract-zip@npm:^2.0.1": - version: 2.0.1 - resolution: "extract-zip@npm:2.0.1" - dependencies: - "@types/yauzl": ^2.9.1 - debug: ^4.1.1 - get-stream: ^5.1.0 - yauzl: ^2.10.0 - dependenciesMeta: - "@types/yauzl": - optional: true - bin: - extract-zip: cli.js - checksum: 9afbd46854aa15a857ae0341a63a92743a7b89c8779102c3b4ffc207516b2019337353962309f85c66ee3d9092202a83cdc26dbf449a11981272038443974aee - languageName: node - linkType: hard - "extsprintf@npm:1.3.0": version: 1.3.0 resolution: "extsprintf@npm:1.3.0" @@ -16912,6 +17383,13 @@ __metadata: languageName: node linkType: hard +"fast-decode-uri-component@npm:^1.0.1": + version: 1.0.1 + resolution: "fast-decode-uri-component@npm:1.0.1" + checksum: 039d50c2e99d64f999c3f2126c23fbf75a04a4117e218a149ca0b1d2aeb8c834b7b19d643b9d35d4eabce357189a6a94085f78cf48869e6e26cc59b036284bc3 + languageName: node + linkType: hard + "fast-deep-equal@npm:^3.1.1, fast-deep-equal@npm:^3.1.3": version: 3.1.3 resolution: "fast-deep-equal@npm:3.1.3" @@ -16966,6 +17444,15 @@ __metadata: languageName: node linkType: hard +"fast-querystring@npm:^1.1.1": + version: 1.1.2 + resolution: "fast-querystring@npm:1.1.2" + dependencies: + fast-decode-uri-component: ^1.0.1 + checksum: e8223273a9b199722f760f5a047a77ad049a14bd444b821502cb8218f5925e3a5fffb56b64389bca73ab2ac6f1aa7aebbe4e203e5f6e53ff5978de97c0fde4e3 + languageName: node + linkType: hard + "fast-url-parser@npm:^1.1.3": version: 1.1.3 resolution: "fast-url-parser@npm:1.1.3" @@ -16975,34 +17462,14 @@ __metadata: languageName: node linkType: hard -"fast-xml-parser@npm:3.19.0": - version: 3.19.0 - resolution: "fast-xml-parser@npm:3.19.0" - bin: - xml2js: cli.js - checksum: b8e11f45c6e0763cbeb13bf7f1294a0c6924b3b3737cc89015b3d827fa20a847670fff523aed04f24350d9787efc1de05ad942184e184a4af06cb9834608e9bd - languageName: node - linkType: hard - -"fast-xml-parser@npm:4.1.2": - version: 4.1.2 - resolution: "fast-xml-parser@npm:4.1.2" +"fast-xml-parser@npm:^4.4.1": + version: 4.4.1 + resolution: "fast-xml-parser@npm:4.4.1" dependencies: strnum: ^1.0.5 bin: fxparser: src/cli/cli.js - checksum: fdc599b28d6ff64ee3727209387cfbcfaa2c696bc8dca5e218876a6098b8df52c56fa899cc33b3ffc5ffa36de2ebbb308fe6794930b217e80dd5985fcab432bd - languageName: node - linkType: hard - -"fast-xml-parser@npm:^3.16.0": - version: 3.21.1 - resolution: "fast-xml-parser@npm:3.21.1" - dependencies: - strnum: ^1.0.4 - bin: - xml2js: cli.js - checksum: 26ed57fd3cb86434959cffa6852ab63231850ff5be6836aef7744b1abc8013fa5696c05179e422965677e116606611242d91ceebf246d91a5247e262d8b59996 + checksum: 7f334841fe41bfb0bf5d920904ccad09cefc4b5e61eaf4c225bf1e1bb69ee77ef2147d8942f783ee8249e154d1ca8a858e10bda78a5d78b8bed3f48dcee9bf33 languageName: node linkType: hard @@ -17055,15 +17522,6 @@ __metadata: languageName: node linkType: hard -"fd-slicer@npm:~1.1.0": - version: 1.1.0 - resolution: "fd-slicer@npm:1.1.0" - dependencies: - pend: ~1.2.0 - checksum: 304dd70270298e3ffe3bcc05e6f7ade2511acc278bc52d025f8918b48b6aa3b77f10361bddfadfe2a28163f7af7adbdce96f4d22c31b2f648ba2901f0c5fc20e - languageName: node - linkType: hard - "fecha@npm:^4.2.0": version: 4.2.1 resolution: "fecha@npm:4.2.1" @@ -17071,6 +17529,13 @@ __metadata: languageName: node linkType: hard +"fflate@npm:0.7.3": + version: 0.7.3 + resolution: "fflate@npm:0.7.3" + checksum: d116debcc828ca8860f78753e9472c3e0f14bc52cd2aab8bbcb01fd86577147993127317b8271d5f6eaaa821680e21adfa1e163211863300abfed6e006fc1d95 + languageName: node + linkType: hard + "figures@npm:3.2.0, figures@npm:^3.0.0": version: 3.2.0 resolution: "figures@npm:3.2.0" @@ -17119,13 +17584,6 @@ __metadata: languageName: node linkType: hard -"file-uri-to-path@npm:2": - version: 2.0.0 - resolution: "file-uri-to-path@npm:2.0.0" - checksum: 78fad70e5ce84b11d9590998e4a3c3f87765c18bfa7edfcfd71eab1968c99d4448d24712911479aacf2a870578769f0b4e4fcc093654462a88823d8d134aed48 - languageName: node - linkType: hard - "file-url@npm:3.0.0": version: 3.0.0 resolution: "file-url@npm:3.0.0" @@ -17149,27 +17607,27 @@ __metadata: languageName: node linkType: hard -"fill-range@npm:^7.0.1": - version: 7.0.1 - resolution: "fill-range@npm:7.0.1" +"fill-range@npm:^7.1.1": + version: 7.1.1 + resolution: "fill-range@npm:7.1.1" dependencies: to-regex-range: ^5.0.1 - checksum: 7cdad7d426ffbaadf45aeb5d15ec675bbd77f7597ad5399e3d2766987ed20bda24d5fac64b3ee79d93276f5865608bb22344a26b9b1ae6c4d00bd94bf611623f + checksum: b75b691bbe065472f38824f694c2f7449d7f5004aa950426a2c28f0306c60db9b880c0b0e4ed819997ffb882d1da02cfcfc819bddc94d71627f5269682edf018 languageName: node linkType: hard -"finalhandler@npm:~1.1.2": - version: 1.1.2 - resolution: "finalhandler@npm:1.1.2" +"finalhandler@npm:1.3.1": + version: 1.3.1 + resolution: "finalhandler@npm:1.3.1" dependencies: debug: 2.6.9 - encodeurl: ~1.0.2 + encodeurl: ~2.0.0 escape-html: ~1.0.3 - on-finished: ~2.3.0 + on-finished: 2.4.1 parseurl: ~1.3.3 - statuses: ~1.5.0 + statuses: 2.0.1 unpipe: ~1.0.0 - checksum: 6a96e1f5caab085628c11d9fdceb82ba608d5e426c6913d4d918409baa271037a47f28fbba73279e8ad614f0b8fa71ea791d265e408d760793829edd8c2f4584 + checksum: d38035831865a49b5610206a3a9a9aae4e8523cbbcd01175d0480ffbf1278c47f11d89be3ca7f617ae6d94f29cf797546a4619cd84dd109009ef33f12f69019f languageName: node linkType: hard @@ -17268,20 +17726,22 @@ __metadata: languageName: node linkType: hard -"follow-redirects@npm:^1.0.0, follow-redirects@npm:^1.14.0, follow-redirects@npm:^1.14.8, follow-redirects@npm:^1.15.0": - version: 1.15.2 - resolution: "follow-redirects@npm:1.15.2" +"follow-redirects@npm:^1.15.6": + version: 1.15.6 + resolution: "follow-redirects@npm:1.15.6" peerDependenciesMeta: debug: optional: true - checksum: da5932b70e63944d38eecaa16954bac4347036f08303c913d166eda74809d8797d38386e3a0eb1d2fe37d2aaff2764cce8e9dbd99459d860cf2cdfa237923b5f + checksum: 9ff767f0d7be6aa6870c82ac79cf0368cd73e01bbc00e9eb1c2a16fbb198ec105e3c9b6628bb98e9f3ac66fe29a957b9645bcb9a490bb7aa0d35f908b6b85071 languageName: node linkType: hard -"foreach@npm:^2.0.5": - version: 2.0.5 - resolution: "foreach@npm:2.0.5" - checksum: 63a99bf2528dd709e243f99865221eee8e94f19e0d996673363b954f0555a6eb1f5bac253e53644b1f6d7d05c118e46eda9e9528a3520a37b75164c8138f5207 +"for-each@npm:^0.3.3": + version: 0.3.3 + resolution: "for-each@npm:0.3.3" + dependencies: + is-callable: ^1.1.3 + checksum: 22330d8a2db728dbf003ec9182c2d421fbcd2969b02b4f97ec288721cda63eb28f2c08585ddccd0f77cb2930af8d958005c9e72f47141dc51816127a118f39aa languageName: node linkType: hard @@ -17333,13 +17793,6 @@ __metadata: languageName: node linkType: hard -"form-data-encoder@npm:^1.7.1": - version: 1.7.1 - resolution: "form-data-encoder@npm:1.7.1" - checksum: 15383b6f328450489d1b5fdf7afc3f3b9a0f40dd7fdbc395128b8088867b62b5048fbcfbcd84d464a95dd1a592ebec73c9571b8eb1b47d27776e90168038cbe9 - languageName: node - linkType: hard - "form-data@npm:^3.0.0": version: 3.0.1 resolution: "form-data@npm:3.0.1" @@ -17373,16 +17826,6 @@ __metadata: languageName: node linkType: hard -"formdata-node@npm:^4.3.1": - version: 4.3.1 - resolution: "formdata-node@npm:4.3.1" - dependencies: - node-domexception: 1.0.0 - web-streams-polyfill: 4.0.0-beta.1 - checksum: e7e431f73b68fff82f6ebca0dc48d9a600bb16b75520c6f47001959bac16b44d5ddd05857004be1982af4957fde5782af0b588a3fd422956997e4b51e980e580 - languageName: node - linkType: hard - "forwarded@npm:0.2.0": version: 0.2.0 resolution: "forwarded@npm:0.2.0" @@ -17428,6 +17871,17 @@ __metadata: languageName: node linkType: hard +"fs-extra@npm:11.1.1": + version: 11.1.1 + resolution: "fs-extra@npm:11.1.1" + dependencies: + graceful-fs: ^4.2.0 + jsonfile: ^6.0.1 + universalify: ^2.0.0 + checksum: a2480243d7dcfa7d723c5f5b24cf4eba02a6ccece208f1524a2fbde1c629492cfb9a59e4b6d04faff6fbdf71db9fdc8ef7f396417a02884195a625f5d8dc9427 + languageName: node + linkType: hard + "fs-extra@npm:9.1.0, fs-extra@npm:^9.0.0, fs-extra@npm:^9.0.1, fs-extra@npm:^9.1.0": version: 9.1.0 resolution: "fs-extra@npm:9.1.0" @@ -17451,14 +17905,14 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:^11.0.0, fs-extra@npm:^11.1.0": - version: 11.1.1 - resolution: "fs-extra@npm:11.1.1" +"fs-extra@npm:^11.0.0, fs-extra@npm:^11.1.0, fs-extra@npm:^11.2.0": + version: 11.2.0 + resolution: "fs-extra@npm:11.2.0" dependencies: graceful-fs: ^4.2.0 jsonfile: ^6.0.1 universalify: ^2.0.0 - checksum: a2480243d7dcfa7d723c5f5b24cf4eba02a6ccece208f1524a2fbde1c629492cfb9a59e4b6d04faff6fbdf71db9fdc8ef7f396417a02884195a625f5d8dc9427 + checksum: d77a9a9efe60532d2e790e938c81a02c1b24904ef7a3efb3990b835514465ba720e99a6ea56fd5e2db53b4695319b644d76d5a0e9988a2beef80aa7b1da63398 languageName: node linkType: hard @@ -17502,10 +17956,10 @@ __metadata: languageName: node linkType: hard -"fs-monkey@npm:^1.0.3": - version: 1.0.3 - resolution: "fs-monkey@npm:1.0.3" - checksum: 197fd276d224d54a27c6267c69887ec29ccd4bedd83d72b5050abf3b6c6ef83d7b86a85a87f615c24a4e6f9a4888fd151c9f16a37ffb23e37c4c2d14c1da6275 +"fs-monkey@npm:^1.0.4": + version: 1.0.5 + resolution: "fs-monkey@npm:1.0.5" + checksum: 815025e75549fb1ac6c403413b82fd631eded862ae27694a515c0f666069e95874ab34e79c33d1b3b8c87d1e54350d5e4262090d0aa5bd7130143cbc627537e4 languageName: node linkType: hard @@ -17549,32 +18003,22 @@ __metadata: languageName: node linkType: hard -"ftp@npm:^0.3.10": - version: 0.3.10 - resolution: "ftp@npm:0.3.10" - dependencies: - readable-stream: 1.1.x - xregexp: 2.0.0 - checksum: bd541fc3e34796cb6fd9749312d4336779ded1edc4b4b82441c211a998da19b8f22a80101685ca128e40ccd33faa9429c22bfd638e2ae1c3b8f1b2f91c2ed719 - languageName: node - linkType: hard - -"function-bind@npm:^1.1.1": - version: 1.1.1 - resolution: "function-bind@npm:1.1.1" - checksum: 60b74b2407e1942e1ed7f8c284f8ef714d0689dcfce5319985a5b7da3fc727f40b4a59ec72dc55aa83365ad7b8fa4fac3a30d93c850a2b452f29ae03dbc10a1e +"function-bind@npm:^1.1.1, function-bind@npm:^1.1.2": + version: 1.1.2 + resolution: "function-bind@npm:1.1.2" + checksum: d8680ee1e5fcd4c197e4ac33b2b4dce03c71f4d91717292785703db200f5c21f977c568d28061226f9b5900cbcd2c84463646134fd5337e7925e0942bc3f46d5 languageName: node linkType: hard -"function.prototype.name@npm:^1.1.5": - version: 1.1.5 - resolution: "function.prototype.name@npm:1.1.5" +"function.prototype.name@npm:^1.1.6": + version: 1.1.6 + resolution: "function.prototype.name@npm:1.1.6" dependencies: call-bind: ^1.0.2 - define-properties: ^1.1.3 - es-abstract: ^1.19.0 - functions-have-names: ^1.2.2 - checksum: b75fb8c5261f03a54f7cb53a8c99e0c40297efc3cf750c51d3a2e56f6741701c14eda51986d30c24063136a4c32d1643df9d1dd2f2a14b64fa011edd3e7117ae + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + functions-have-names: ^1.2.3 + checksum: 9eae11294905b62cb16874adb4fc687927cda3162285e0ad9612e6a1d04934005d46907362ea9cdb7428edce05a2f2c3dabc3b2d21e9fd343e9bb278230ad94b languageName: node linkType: hard @@ -17585,7 +18029,7 @@ __metadata: languageName: node linkType: hard -"functions-have-names@npm:^1.2.2": +"functions-have-names@npm:^1.2.3": version: 1.2.3 resolution: "functions-have-names@npm:1.2.3" checksum: 33e77fd29bddc2d9bb78ab3eb854c165909201f88c75faa8272e35899e2d35a8a642a15e7420ef945e1f64a9670d6aa3ec744106b2aa42be68ca5114025954ca @@ -17654,14 +18098,16 @@ __metadata: languageName: node linkType: hard -"get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.0, get-intrinsic@npm:^1.1.1": - version: 1.1.2 - resolution: "get-intrinsic@npm:1.1.2" +"get-intrinsic@npm:^1.1.1, get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4": + version: 1.2.4 + resolution: "get-intrinsic@npm:1.2.4" dependencies: - function-bind: ^1.1.1 - has: ^1.0.3 + es-errors: ^1.3.0 + function-bind: ^1.1.2 + has-proto: ^1.0.1 has-symbols: ^1.0.3 - checksum: f69a8e8758bab0a1a53853c347a6f4e22618352100339e6aa8f4cef46731a50e848d23dfe47c03c08beeed870b8777663e5dbfa9d53ebb2541754238118d81ad + hasown: ^2.0.0 + checksum: 0a9b82c16696ed6da5e39b1267104475c47e3a9bdbe8b509dfe1710946e38a87be70d759f4bb3cda042d76a41ef47fe769660f3b7c0d1f68750299344ffb15b7 languageName: node linkType: hard @@ -17700,13 +18146,6 @@ __metadata: languageName: node linkType: hard -"get-stdin@npm:^7.0.0": - version: 7.0.0 - resolution: "get-stdin@npm:7.0.0" - checksum: 84d7850d17727f14d582670c4222b167317da43b296b88717abca989b6192eb80f66ca62833d63e749b3c984f3f9113cb6794dc9ecccb29969b8162565162033 - languageName: node - linkType: hard - "get-stdin@npm:^8.0.0": version: 8.0.0 resolution: "get-stdin@npm:8.0.0" @@ -17721,15 +18160,6 @@ __metadata: languageName: node linkType: hard -"get-stream@npm:^4.0.0": - version: 4.1.0 - resolution: "get-stream@npm:4.1.0" - dependencies: - pump: ^3.0.0 - checksum: 294d876f667694a5ca23f0ca2156de67da950433b6fb53024833733975d32582896dbc7f257842d331809979efccf04d5e0b6b75ad4d45744c45f193fd497539 - languageName: node - linkType: hard - "get-stream@npm:^5.1.0": version: 5.2.0 resolution: "get-stream@npm:5.2.0" @@ -17746,13 +18176,14 @@ __metadata: languageName: node linkType: hard -"get-symbol-description@npm:^1.0.0": - version: 1.0.0 - resolution: "get-symbol-description@npm:1.0.0" +"get-symbol-description@npm:^1.0.2": + version: 1.0.2 + resolution: "get-symbol-description@npm:1.0.2" dependencies: - call-bind: ^1.0.2 - get-intrinsic: ^1.1.1 - checksum: 23bc3b44c221cdf7669a88230c62f4b9e30393b61eb21ba4400cb3e346801bd8f95fe4330ee78dbae37aecd874646d53e3e76a17a654d0c84c77f6690526d6bb + call-bind: ^1.0.5 + es-errors: ^1.3.0 + get-intrinsic: ^1.2.4 + checksum: 867be6d63f5e0eb026cb3b0ef695ec9ecf9310febb041072d2e142f260bd91ced9eeb426b3af98791d1064e324e653424afa6fd1af17dee373bea48ae03162bc languageName: node linkType: hard @@ -17763,17 +18194,15 @@ __metadata: languageName: node linkType: hard -"get-uri@npm:3": - version: 3.0.2 - resolution: "get-uri@npm:3.0.2" +"get-uri@npm:^6.0.1": + version: 6.0.1 + resolution: "get-uri@npm:6.0.1" dependencies: - "@tootallnate/once": 1 - data-uri-to-buffer: 3 - debug: 4 - file-uri-to-path: 2 + basic-ftp: ^5.0.2 + data-uri-to-buffer: ^5.0.1 + debug: ^4.3.4 fs-extra: ^8.1.0 - ftp: ^0.3.10 - checksum: f0e20ce416448af5f90e5b0df2e2df3198a8b7ac80d9c9cb90ab3427ebff3119304d5acc1aba33646464f7529daba33e1961c093d06cd6ca729ac92dda51a21a + checksum: dde1cd2fa74561e603fd114de360bbe7e2c9b4f7c942257cd176bf508528ba7e7f31ae25b5c09b75cda7a09b4cabcc2f8bce9eb061e5709b680d67a544ae9bb9 languageName: node linkType: hard @@ -17865,18 +18294,6 @@ __metadata: languageName: node linkType: hard -"glob-all@npm:^3.1.0": - version: 3.2.1 - resolution: "glob-all@npm:3.2.1" - dependencies: - glob: ^7.1.2 - yargs: ^15.3.1 - bin: - glob-all: ./bin/glob-all - checksum: 5ae0b3bba4d815758400a7b56b037011935699477cec8fd786c8eb37224bc53382a4f47bb9bdc20335a7ec172bcb15ddffd97f4e676cafc6b3bdafb8450ba23b - languageName: node - linkType: hard - "glob-parent@npm:^6.0.2": version: 6.0.2 resolution: "glob-parent@npm:6.0.2" @@ -17907,32 +18324,19 @@ __metadata: languageName: node linkType: hard -"glob@npm:7.1.7": - version: 7.1.7 - resolution: "glob@npm:7.1.7" - dependencies: - fs.realpath: ^1.0.0 - inflight: ^1.0.4 - inherits: 2 - minimatch: ^3.0.4 - once: ^1.3.0 - path-is-absolute: ^1.0.0 - checksum: 173245e6f9ccf904309eb7ef4a44a11f3bf68e9e341dff5a28b5db0dd7123b7506daf41497f3437a0710f57198187b758c2351eeaabce4d16935e956920da6a4 - languageName: node - linkType: hard - -"glob@npm:^10.2.2": - version: 10.2.2 - resolution: "glob@npm:10.2.2" +"glob@npm:^10.2.2, glob@npm:^10.3.0, glob@npm:^10.4.5": + version: 10.4.5 + resolution: "glob@npm:10.4.5" dependencies: foreground-child: ^3.1.0 - jackspeak: ^2.0.3 - minimatch: ^9.0.0 - minipass: ^5.0.0 - path-scurry: ^1.7.0 + jackspeak: ^3.1.2 + minimatch: ^9.0.4 + minipass: ^7.1.2 + package-json-from-dist: ^1.0.0 + path-scurry: ^1.11.1 bin: - glob: dist/cjs/src/bin.js - checksum: 24238fc36ea34f4874e858eeda7d94ae2de6dbdd40d8a75dc707dc20853357394a12e9340b3e46f9e50231bf904b15e5dec15d2de63631bb1d2e8d4920c04996 + glob: dist/esm/bin.mjs + checksum: 19a9759ea77b8e3ca0a43c2f07ecddc2ad46216b786bb8f993c445aee80d345925a21e5280c7b7c6c59e860a0154b84e4b2b60321fea92cd3c56b4a7489f160e languageName: node linkType: hard @@ -17949,7 +18353,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^7.0.0, glob@npm:^7.0.5, glob@npm:^7.1.1, glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6, glob@npm:^7.1.7, glob@npm:^7.2.0": +"glob@npm:^7.0.0, glob@npm:^7.0.5, glob@npm:^7.1.1, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6, glob@npm:^7.1.7, glob@npm:^7.2.0": version: 7.2.3 resolution: "glob@npm:7.2.3" dependencies: @@ -18042,6 +18446,16 @@ __metadata: languageName: node linkType: hard +"globalthis@npm:^1.0.3": + version: 1.0.4 + resolution: "globalthis@npm:1.0.4" + dependencies: + define-properties: ^1.2.1 + gopd: ^1.0.1 + checksum: 9d156f313af79d80b1566b93e19285f481c591ad6d0d319b4be5e03750d004dde40a39a0f26f7e635f9007a3600802f53ecd85a759b86f109e80a5f705e01846 + languageName: node + linkType: hard + "globalyzer@npm:0.1.0": version: 0.1.0 resolution: "globalyzer@npm:0.1.0" @@ -18083,6 +18497,15 @@ __metadata: languageName: node linkType: hard +"gopd@npm:^1.0.1": + version: 1.0.1 + resolution: "gopd@npm:1.0.1" + dependencies: + get-intrinsic: ^1.1.3 + checksum: 505c05487f7944c552cee72087bf1567debb470d4355b1335f2c262d218ebbff805cd3715448fe29b4b380bae6912561d0467233e4165830efd28da241418c63 + languageName: node + linkType: hard + "got@npm:^11.8.5": version: 11.8.6 resolution: "got@npm:11.8.6" @@ -18102,13 +18525,20 @@ __metadata: languageName: node linkType: hard -"graceful-fs@npm:4.2.10, graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.15, graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9, graceful-fs@npm:~4.2.9": +"graceful-fs@npm:4.2.10": version: 4.2.10 resolution: "graceful-fs@npm:4.2.10" checksum: 4223a833e38e1d0d2aea630c2433cfb94ddc07dfc11d511dbd6be1d16688c5be848acc31f9a5d0d0ddbfb56d2ee5a6ae0278aceeb0ca6a13f27e06b9956fb952 languageName: node linkType: hard +"graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.15, graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.11, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9, graceful-fs@npm:~4.2.9": + version: 4.2.11 + resolution: "graceful-fs@npm:4.2.11" + checksum: 386d011a553e02bc594ac2ca0bd6d9e4c22d7fa8cfbfc448a6d148c59ea881b092db9dbe3547ae4b88e55f1b01f7c4a2ecc53b310c042793e63aa44cf6c257f2 + languageName: node + linkType: hard + "graphiql-explorer@npm:^0.6.2": version: 0.6.3 resolution: "graphiql-explorer@npm:0.6.3" @@ -18120,37 +18550,37 @@ __metadata: languageName: node linkType: hard -"graphiql@npm:^1.5.16": - version: 1.5.16 - resolution: "graphiql@npm:1.5.16" +"graphiql@npm:>=1.5.16 <=1.8.10": + version: 1.8.10 + resolution: "graphiql@npm:1.8.10" dependencies: - "@graphiql/toolkit": ^0.4.2 - codemirror: ^5.58.2 - codemirror-graphql: ^1.2.11 + "@graphiql/toolkit": ^0.4.5 + codemirror: ^5.65.3 + codemirror-graphql: ^1.3.0 copy-to-clipboard: ^3.2.0 - dset: ^3.1.0 entities: ^2.0.0 escape-html: ^1.0.3 - graphql-language-service: ^4.1.4 + graphql-language-service: ^5.0.4 markdown-it: ^12.2.0 + set-value: ^4.1.0 peerDependencies: graphql: ^15.5.0 || ^16.0.0 react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - checksum: 30e33cc1007d0cac54d77b41176c915438c4039266beac37f9abebefdf9c8ac6a9c456d3e07f6e238c8c5be4f6068ed393c0d57ed6ddb310374590adf70294f5 + checksum: e91d68720165f2e0bac8bc3508c8853ef9cc1deba6babecb55b068ff13b065f6d1073f5dce3940a382d68d8050c4cbf83c1f6e754defa63cf672307f7cc8e293 languageName: node linkType: hard -"graphql-auth-transformer@npm:7.2.56, graphql-auth-transformer@npm:^7.2.56": - version: 7.2.56 - resolution: "graphql-auth-transformer@npm:7.2.56" +"graphql-auth-transformer@npm:7.2.82, graphql-auth-transformer@npm:^7.2.82": + version: 7.2.82 + resolution: "graphql-auth-transformer@npm:7.2.82" dependencies: graphql: ^15.5.0 - graphql-connection-transformer: 5.2.55 - graphql-mapping-template: 4.20.8 - graphql-transformer-common: 4.24.6 - graphql-transformer-core: 8.1.2 - checksum: a56ae7742c24b3c2fe5ff15a4f3c50687f8ad97f5d32b977f5afd2b870478ca893fbd2db5b2b5b397e37db50d5ea7126ebf5a792b6b377df6189998bffe0140b + graphql-connection-transformer: 5.2.80 + graphql-mapping-template: 4.20.16 + graphql-transformer-common: 4.31.1 + graphql-transformer-core: 8.2.13 + checksum: 92b10bb20e9c82974b4738176e04693b8eab29e11328911e156ee41e3290984ef8768aa18e8db18b1d6902d34667522edc4a6f54688177ca3a3f2bf7ea049b2d languageName: node linkType: hard @@ -18169,94 +18599,73 @@ __metadata: languageName: node linkType: hard -"graphql-config@npm:^4.1.0": - version: 4.1.0 - resolution: "graphql-config@npm:4.1.0" - dependencies: - "@endemolshinegroup/cosmiconfig-typescript-loader": 3.0.2 - "@graphql-tools/graphql-file-loader": ^7.3.2 - "@graphql-tools/json-file-loader": ^7.3.2 - "@graphql-tools/load": ^7.4.1 - "@graphql-tools/merge": ^8.2.1 - "@graphql-tools/url-loader": ^7.4.2 - "@graphql-tools/utils": ^8.5.1 - cosmiconfig: 7.0.1 - cosmiconfig-toml-loader: 1.0.0 - minimatch: 3.0.4 - string-env-interpolation: 1.0.1 - peerDependencies: - graphql: ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 - checksum: fe9f4e3aa2985cd181ce8b7065ac46a69ca2cb1c83f31549c9fd8144bd5bb187366304a9439940175eb1f18a98802bba13ba4eb0b8edfb4311fba64ac7bae71b - languageName: node - linkType: hard - -"graphql-connection-transformer@npm:5.2.55, graphql-connection-transformer@npm:^5.2.55": - version: 5.2.55 - resolution: "graphql-connection-transformer@npm:5.2.55" +"graphql-connection-transformer@npm:5.2.80, graphql-connection-transformer@npm:^5.2.80": + version: 5.2.80 + resolution: "graphql-connection-transformer@npm:5.2.80" dependencies: cloudform-types: ^4.2.0 graphql: ^15.5.0 - graphql-dynamodb-transformer: 7.2.55 - graphql-key-transformer: 3.2.55 - graphql-mapping-template: 4.20.8 - graphql-transformer-common: 4.24.6 - graphql-transformer-core: 8.1.2 - checksum: 40067fa435515f02c5773fd9144adf2ea0339330e9ebcd079098fcb87f1adffaa003a6c921346aeb9d1acc2e07c5feaac11c4ff0c5d26fe7f496e1d6eafd2392 + graphql-dynamodb-transformer: 7.2.80 + graphql-key-transformer: 3.2.80 + graphql-mapping-template: 4.20.16 + graphql-transformer-common: 4.31.1 + graphql-transformer-core: 8.2.13 + checksum: 9b716a1c6f3fce8e8a6acdad2161e3faecaa5c05a09c38d1365c51376d315bcc57114dc16e51c958639c57fc736a5fe6087b9057d9b210aca58406fb0a14e464 languageName: node linkType: hard -"graphql-dynamodb-transformer@npm:7.2.55, graphql-dynamodb-transformer@npm:^7.2.55": - version: 7.2.55 - resolution: "graphql-dynamodb-transformer@npm:7.2.55" +"graphql-dynamodb-transformer@npm:7.2.80, graphql-dynamodb-transformer@npm:^7.2.80": + version: 7.2.80 + resolution: "graphql-dynamodb-transformer@npm:7.2.80" dependencies: "@types/pluralize": ^0.0.29 cloudform-types: ^4.2.0 graphql: ^15.5.0 - graphql-mapping-template: 4.20.8 - graphql-transformer-common: 4.24.6 - graphql-transformer-core: 8.1.2 + graphql-mapping-template: 4.20.16 + graphql-transformer-common: 4.31.1 + graphql-transformer-core: 8.2.13 md5: ^2.2.1 pluralize: ^8.0.0 - checksum: 8a6d29b346fa295a73b49148af3c4b6bb79831009fdcfb72b7a7e4302a5889e062e4a1eb6031f9e2705efb3c147b844e5f0c3e20dcec7f653eeee53c5b547cc2 + checksum: d2922b4013ae1dc60f9a9338abd7801d721ff721bfb0bdc27e1b8bd9ea7b7b9eafef05700027539318984701e8dbda3b380db501fee96e55da915fe5fad247b7 languageName: node linkType: hard -"graphql-elasticsearch-transformer@npm:5.2.56, graphql-elasticsearch-transformer@npm:^5.2.56": - version: 5.2.56 - resolution: "graphql-elasticsearch-transformer@npm:5.2.56" +"graphql-elasticsearch-transformer@npm:5.2.81": + version: 5.2.81 + resolution: "graphql-elasticsearch-transformer@npm:5.2.81" dependencies: cloudform-types: ^4.2.0 graphql: ^15.5.0 - graphql-mapping-template: 4.20.8 - graphql-transformer-common: 4.24.6 - graphql-transformer-core: 8.1.2 - checksum: ecccf7afc1ddb2e809b3fd1186c2b16e798d28f3b3dce5b431835a11cc3ecd7d529c2503bdfdcb986ccf69349220a6fd78937a527e4f06c05b927a0c7917e06e + graphql-mapping-template: 4.20.16 + graphql-transformer-common: 4.31.1 + graphql-transformer-core: 8.2.13 + checksum: d48a3e26b2214e0eefba9c2efa31cba6d6031f6d9b424fd9ff29eb1b89f66d7d1e9461a1b23bb3f66731df6b8e59a35aeb017f22412e96b7785dcbbb1fea43bd languageName: node linkType: hard -"graphql-function-transformer@npm:3.3.46, graphql-function-transformer@npm:^3.3.46": - version: 3.3.46 - resolution: "graphql-function-transformer@npm:3.3.46" +"graphql-function-transformer@npm:3.3.71, graphql-function-transformer@npm:^3.3.71": + version: 3.3.71 + resolution: "graphql-function-transformer@npm:3.3.71" dependencies: cloudform-types: ^4.2.0 graphql: ^15.5.0 - graphql-mapping-template: 4.20.8 - graphql-transformer-common: 4.24.6 - graphql-transformer-core: 8.1.2 - checksum: 48621d1aa566a5f8f2b6f1c3b159dae8ea1dfc97a13d2b3e459d0b57e40013f93738cf04ad0015c3879f4848f95b26c0e0a308d5a5270586752286307c562ff8 + graphql-mapping-template: 4.20.16 + graphql-transformer-common: 4.31.1 + graphql-transformer-core: 8.2.13 + checksum: 787bf7d711dde4c65138f6dcfa80d2a5b1532c159947d1e0e59d2ea552edea0952fce00da42dec59482d6da32374e193d346172a5147686714fdfc148aa26ea4 languageName: node linkType: hard -"graphql-http-transformer@npm:5.2.55, graphql-http-transformer@npm:^5.2.55": - version: 5.2.55 - resolution: "graphql-http-transformer@npm:5.2.55" +"graphql-http-transformer@npm:5.2.80": + version: 5.2.80 + resolution: "graphql-http-transformer@npm:5.2.80" dependencies: cloudform-types: ^4.2.0 graphql: ^15.5.0 - graphql-mapping-template: 4.20.8 - graphql-transformer-common: 4.24.6 - graphql-transformer-core: 8.1.2 - checksum: 6386d281193640e4da848986edb3a34df2d7e7741f45605447d163a2223583f242b076a39a76bb1fbc75bb670d100fc9d73d6f0c619d3bccbe87a3ac14d9d5e3 + graphql-mapping-template: 4.20.16 + graphql-transformer-common: 4.31.1 + graphql-transformer-core: 8.2.13 + checksum: 072bf9c3751c3b32e95b6c7689d225ba301bd6c5c30003aa7dd85fec870ee213a398e6cf52ba20092039c33d858b309313dc050ab574f1ff8fa197e32b1f34ac languageName: node linkType: hard @@ -18281,118 +18690,65 @@ __metadata: languageName: node linkType: hard -"graphql-key-transformer@npm:3.2.55, graphql-key-transformer@npm:^3.2.55": - version: 3.2.55 - resolution: "graphql-key-transformer@npm:3.2.55" +"graphql-key-transformer@npm:3.2.80, graphql-key-transformer@npm:^3.2.80": + version: 3.2.80 + resolution: "graphql-key-transformer@npm:3.2.80" dependencies: cloudform-types: ^4.2.0 graphql: ^15.5.0 - graphql-dynamodb-transformer: 7.2.55 - graphql-mapping-template: 4.20.8 - graphql-transformer-common: 4.24.6 - graphql-transformer-core: 8.1.2 + graphql-dynamodb-transformer: 7.2.80 + graphql-mapping-template: 4.20.16 + graphql-transformer-common: 4.31.1 + graphql-transformer-core: 8.2.13 lodash: ^4.17.21 - checksum: c20ae5ec6a7fc2a8e0f0ea27fd3807b3ac44528bb7a87ed78ed376874f38ebc4eef0ccee0dc6c0c0dea700e474694ea2be8f4805b50d82413234cd567bbcae99 - languageName: node - linkType: hard - -"graphql-language-service-interface@npm:^2.10.2": - version: 2.10.2 - resolution: "graphql-language-service-interface@npm:2.10.2" - dependencies: - graphql-config: ^4.1.0 - graphql-language-service-parser: ^1.10.4 - graphql-language-service-types: ^1.8.7 - graphql-language-service-utils: ^2.7.1 - vscode-languageserver-types: ^3.15.1 - peerDependencies: - graphql: ^15.5.0 || ^16.0.0 - checksum: 4ee0de207d332e45f4f4108ab83ee8ad0d5714a83f6fa54d3dd88db09513bbfd10c2e2a0e46972706c854c7b23d15eb0b62acaf54c4f3bc23b2bebad67013f4d - languageName: node - linkType: hard - -"graphql-language-service-parser@npm:^1.10.4": - version: 1.10.4 - resolution: "graphql-language-service-parser@npm:1.10.4" - dependencies: - graphql-language-service-types: ^1.8.7 - peerDependencies: - graphql: ^15.5.0 || ^16.0.0 - checksum: 0d2b9b0e50915f794c7efaa84fe9a2589b4de18281eec65de7d7e74a3fd32fc2c2a7408aef6b67bc5cd60a10a4905c8481544cf3bc7068bb64912b6c671e97e5 - languageName: node - linkType: hard - -"graphql-language-service-types@npm:^1.8.7": - version: 1.8.7 - resolution: "graphql-language-service-types@npm:1.8.7" - dependencies: - graphql-config: ^4.1.0 - vscode-languageserver-types: ^3.15.1 - peerDependencies: - graphql: ^15.5.0 || ^16.0.0 - checksum: b07cbd05bc3ae0ed28e082d567a1343699bbc781e43711b365bdeb9461b7b5d654a42c937977fac55234fd3dcfb425138a0cae83b3ea1c0b85745376232c1e8b + checksum: 119f3b4ae2387168e427270f464ddcf5af61732b5c4cf7d2f1dce53a2f495f8f905b018676d2456c332cd4a3a979156f776f4e76dea00a48a388ea70c98764e5 languageName: node linkType: hard -"graphql-language-service-utils@npm:^2.7.1": - version: 2.7.1 - resolution: "graphql-language-service-utils@npm:2.7.1" +"graphql-language-service@npm:^5.0.4, graphql-language-service@npm:^5.0.6": + version: 5.2.0 + resolution: "graphql-language-service@npm:5.2.0" dependencies: - "@types/json-schema": 7.0.9 - graphql-language-service-types: ^1.8.7 nullthrows: ^1.0.0 - peerDependencies: - graphql: ^15.5.0 || ^16.0.0 - checksum: af845bfc79e544ea269603462fbe4e460fb9b5ef13f1927b9a7a54c03332a657debe949a3f910eb6805372a96770447890309762a42b5bd9d9496c6858fdd357 - languageName: node - linkType: hard - -"graphql-language-service@npm:^4.1.4": - version: 4.1.4 - resolution: "graphql-language-service@npm:4.1.4" - dependencies: - graphql-language-service-interface: ^2.10.2 - graphql-language-service-parser: ^1.10.4 - graphql-language-service-types: ^1.8.7 - graphql-language-service-utils: ^2.7.1 + vscode-languageserver-types: ^3.17.1 peerDependencies: graphql: ^15.5.0 || ^16.0.0 bin: graphql: dist/temp-bin.js - checksum: a0311fbf24c992d4509d42093a4f285e2e1a38b43e08b033e5a487700626d9125810f3e44eb85ff412cb299d96009780ea482c50a1b02b1f6abb2fc0d52a7056 + checksum: 2a865d6a7a7fa44bdce12768f7f3b2840a295f9cd684f30bb54db1f3def5f44ea8719c9605b6334fa76798d664f58ed025f17d78199f6c5bc431a67af50190fc languageName: node linkType: hard -"graphql-mapping-template@npm:4.20.8": - version: 4.20.8 - resolution: "graphql-mapping-template@npm:4.20.8" - checksum: 348da7e4b1a8996af124a23a66e6a4f6e6b07e9b6d7259df8deae6f05888ff2aab5534bd230d37d60bb6dc7e53b20f6305f319ecfd474c2c22a98dc0fcfc607a +"graphql-mapping-template@npm:4.20.16": + version: 4.20.16 + resolution: "graphql-mapping-template@npm:4.20.16" + checksum: 5c29c25f3b715eb5a1140eb5fdefaaa93a476108724746e084b7104b81ee8e9f3a9aa5e3f3476bcf31532b04c41d2949b9af1582202b8ac1ab3857abbcc04399 languageName: node linkType: hard -"graphql-predictions-transformer@npm:3.2.55, graphql-predictions-transformer@npm:^3.2.55": - version: 3.2.55 - resolution: "graphql-predictions-transformer@npm:3.2.55" +"graphql-predictions-transformer@npm:3.2.80": + version: 3.2.80 + resolution: "graphql-predictions-transformer@npm:3.2.80" dependencies: cloudform-types: ^4.2.0 graphql: ^15.5.0 - graphql-mapping-template: 4.20.8 - graphql-transformer-common: 4.24.6 - graphql-transformer-core: 8.1.2 - checksum: 822b45107b0a6213017c82d3d4deb3a689bf1f90127d3d6fb5b7782fc75979d15b711ea82045966407daae93677411819164e69cccaa0e82cc7986c04e95ac19 + graphql-mapping-template: 4.20.16 + graphql-transformer-common: 4.31.1 + graphql-transformer-core: 8.2.13 + checksum: ecde317cad832d51c960744bf141ed39431f02408a1dea598e656922c6e1b16a379b62107ac34ac19e863d6f06511dd1e6c261aacd067a8948c3e9e0c543c879 languageName: node linkType: hard -"graphql-relational-schema-transformer@npm:2.21.18": - version: 2.21.18 - resolution: "graphql-relational-schema-transformer@npm:2.21.18" +"graphql-relational-schema-transformer@npm:2.21.34": + version: 2.21.34 + resolution: "graphql-relational-schema-transformer@npm:2.21.34" dependencies: cloudform-types: ^4.2.0 fs-extra: ^8.1.0 graphql: ^15.5.0 - graphql-mapping-template: 4.20.8 - graphql-transformer-common: 4.24.6 - checksum: ac6e0e465215ac250cae3369aa96e09b10d5d710d46f25bba5c2f2a7aa3bc0c64a41d9d03741be51876854e34cca4ac02e1147748b4d5484f2cde14db0e1c9b4 + graphql-mapping-template: 4.20.16 + graphql-transformer-common: 4.31.1 + checksum: 8613e4541149cac8508e88664edc4587b1beb77ef6706f70927e6e216c634b136abed9bbb33cb3e86f41904db685e2b5165995da2d1707ff45b262a1acce0f51 languageName: node linkType: hard @@ -18405,15 +18761,6 @@ __metadata: languageName: node linkType: hard -"graphql-sse@npm:^1.0.1": - version: 1.0.6 - resolution: "graphql-sse@npm:1.0.6" - peerDependencies: - graphql: ">=0.11 <=16" - checksum: fb034bfbbdc4f5ab607792c1542eb4a8152a17d79b68041a2e95974a90590d690eeaab7084c4d9169c9848d15d40c43ab7bd107d8d367b30e27b64ee0b114ef8 - languageName: node - linkType: hard - "graphql-subscriptions@npm:^1.1.0": version: 1.2.1 resolution: "graphql-subscriptions@npm:1.2.1" @@ -18436,53 +18783,51 @@ __metadata: languageName: node linkType: hard -"graphql-transformer-common@npm:4.24.6": - version: 4.24.6 - resolution: "graphql-transformer-common@npm:4.24.6" +"graphql-transformer-common@npm:4.31.1, graphql-transformer-common@npm:^4.25.1": + version: 4.31.1 + resolution: "graphql-transformer-common@npm:4.31.1" dependencies: graphql: ^15.5.0 - graphql-mapping-template: 4.20.8 + graphql-mapping-template: 4.20.16 md5: ^2.2.1 pluralize: 8.0.0 - checksum: a72f47dbac63bad5fe1c448b5629a3fb91f287edff9340a9666c2165cdf28f0385552be3f78153da454ef20add99d5b0bcea971b73e01af2af5fcf6ab423ceae + checksum: 8b2399792f54b6bbd3062bc59a9f43b4c3d1b32ac459c384e94b389cc7eb5119e56533c3350cbb95f4e6fdb168d71a02beb5c1dfc8a049571a481037d6f76d21 languageName: node linkType: hard -"graphql-transformer-core@npm:8.1.2, graphql-transformer-core@npm:^8.1.2": - version: 8.1.2 - resolution: "graphql-transformer-core@npm:8.1.2" +"graphql-transformer-core@npm:8.2.13, graphql-transformer-core@npm:^8.2.13": + version: 8.2.13 + resolution: "graphql-transformer-core@npm:8.2.13" dependencies: - "@aws-amplify/graphql-transformer-core": 1.3.2 - "@aws-amplify/graphql-transformer-interfaces": 2.2.1 cloudform-types: ^4.2.0 deep-diff: ^1.0.2 fs-extra: ^8.1.0 - glob: ^7.2.0 + glob: ^10.3.0 graphql: ^15.5.0 - graphql-transformer-common: 4.24.6 + graphql-transformer-common: 4.31.1 lodash: ^4.17.21 - checksum: 5c798e2c9ffd27ee60c9fccac564f0624f7a3ba545ece746759cc9a88e6da80e059120335731168b0bc9f0f706508dc0cc271306a422ce85d40512a40c3f9532 + checksum: d26e4cd3f54bfca61f48540b146dddbea7627eb383125934f23c616814a94a3998eb5c23bc28ef8d4f08ab669f1d0f33de6e25b2a8829c37aac8185898dd6a00 languageName: node linkType: hard -"graphql-versioned-transformer@npm:5.2.55, graphql-versioned-transformer@npm:^5.2.55": - version: 5.2.55 - resolution: "graphql-versioned-transformer@npm:5.2.55" +"graphql-versioned-transformer@npm:5.2.80, graphql-versioned-transformer@npm:^5.2.80": + version: 5.2.80 + resolution: "graphql-versioned-transformer@npm:5.2.80" dependencies: graphql: ^15.5.0 - graphql-mapping-template: 4.20.8 - graphql-transformer-common: 4.24.6 - graphql-transformer-core: 8.1.2 - checksum: 8aa732997864f471002c5d404e6ce6baea4855e83b91588d26ebb24bb09c8799849e498fcb211ccd45e66520bb29223033db4af96571750aa59a75e98cd0f1ef + graphql-mapping-template: 4.20.16 + graphql-transformer-common: 4.31.1 + graphql-transformer-core: 8.2.13 + checksum: 847e0b0461d6a6af95a5bed36d9b103b1046fe1e50d634ddab5b6e5b63baa17612bb3e19c78125cd57c3c85650d8acbbc22d4d34039ed7485f07eb0a41cbfbc4 languageName: node linkType: hard -"graphql-ws@npm:^5.4.1": - version: 5.5.5 - resolution: "graphql-ws@npm:5.5.5" +"graphql-ws@npm:^5.14.3": + version: 5.16.0 + resolution: "graphql-ws@npm:5.16.0" peerDependencies: graphql: ">=0.11 <=16" - checksum: ac6244a23a362a8c2fef49885d07cfbc4d7c5166f32afa4fc8a60c3ec94c78983c42bfeb52a164ee30dd1137078316c29070e8568c2a2a9a9578190ec339c8ac + checksum: 5e538c3460ca997a1634bd0f64236d8d7aa6ac75c58aba549b49953faf0dd2497f4fa43eedb0bc82cfff50426c7ce47682a670d2571fd7f3af5dcf00911c9e1b languageName: node linkType: hard @@ -18493,7 +18838,7 @@ __metadata: languageName: node linkType: hard -"growl@npm:1.10.5, growl@npm:^1.10.5": +"growl@npm:^1.10.5": version: 1.10.5 resolution: "growl@npm:1.10.5" checksum: a6a8f4df1269ac321f9e41c310552f3568768160942b6c9a7c116fcff1e3921f6a48fb7520689660412f7d1e5d46f76214e05406b23eee9e213830fdc2f772fe @@ -18616,12 +18961,19 @@ __metadata: languageName: node linkType: hard -"has-property-descriptors@npm:^1.0.0": - version: 1.0.0 - resolution: "has-property-descriptors@npm:1.0.0" +"has-property-descriptors@npm:^1.0.0, has-property-descriptors@npm:^1.0.2": + version: 1.0.2 + resolution: "has-property-descriptors@npm:1.0.2" dependencies: - get-intrinsic: ^1.1.1 - checksum: d4ca882b6960d6257bd28baa3ddfa21f068d260411004a093b30ca357c740e11e985771c85216a6d1eef4161e862657f48c4758ec8ab515223b3895200ad164b + es-define-property: ^1.0.0 + checksum: 253c1f59e80bb476cf0dde8ff5284505d90c3bdb762983c3514d36414290475fe3fd6f574929d84de2a8eec00d35cf07cb6776205ff32efd7c50719125f00236 + languageName: node + linkType: hard + +"has-proto@npm:^1.0.1, has-proto@npm:^1.0.3": + version: 1.0.3 + resolution: "has-proto@npm:1.0.3" + checksum: 35a6989f81e9f8022c2f4027f8b48a552de714938765d019dbea6bb547bd49ce5010a3c7c32ec6ddac6e48fc546166a3583b128f5a7add8b058a6d8b4afec205 languageName: node linkType: hard @@ -18632,12 +18984,12 @@ __metadata: languageName: node linkType: hard -"has-tostringtag@npm:^1.0.0": - version: 1.0.0 - resolution: "has-tostringtag@npm:1.0.0" +"has-tostringtag@npm:^1.0.0, has-tostringtag@npm:^1.0.2": + version: 1.0.2 + resolution: "has-tostringtag@npm:1.0.2" dependencies: - has-symbols: ^1.0.2 - checksum: 1cdba76b7d13f65198a92b8ca1560ba40edfa09e85d182bf436d928f3588a9ebd260451d569f0ed1b849c4bf54f49c862aa0d0a77f9552b1855bb6deb526c011 + has-symbols: ^1.0.3 + checksum: a8b166462192bafe3d9b6e420a1d581d93dd867adb61be223a17a8d6dad147aa77a8be32c961bb2f27b3ef893cae8d36f564ab651f5e9b7938ae86f74027c48c languageName: node linkType: hard @@ -18692,7 +19044,16 @@ __metadata: languageName: node linkType: hard -"he@npm:1.2.0, he@npm:^1.2.0": +"hasown@npm:^2.0.0, hasown@npm:^2.0.1, hasown@npm:^2.0.2": + version: 2.0.2 + resolution: "hasown@npm:2.0.2" + dependencies: + function-bind: ^1.1.2 + checksum: 3769d434703b8ac66b209a4cca0737519925bbdb61dd887f93a16372b14694c63ff4e797686d87c90f08168e81082248b9b028bad60d4da9e0d1148766f56eb9 + languageName: node + linkType: hard + +"he@npm:^1.2.0": version: 1.2.0 resolution: "he@npm:1.2.0" bin: @@ -18874,16 +19235,16 @@ __metadata: languageName: node linkType: hard -"http-errors@npm:1.8.1": - version: 1.8.1 - resolution: "http-errors@npm:1.8.1" +"http-errors@npm:2.0.0": + version: 2.0.0 + resolution: "http-errors@npm:2.0.0" dependencies: - depd: ~1.1.2 + depd: 2.0.0 inherits: 2.0.4 setprototypeof: 1.2.0 - statuses: ">= 1.5.0 < 2" + statuses: 2.0.1 toidentifier: 1.0.1 - checksum: f01aeecd76260a6fe7f08e192fcbe9b2f39ed20fc717b852669a69930167053b01790998275c6297d44f435cf0e30edd50c05223d1bec9bc484e6cf35b2d6f43 + checksum: fc6f2715fe188d091274b5ffc8b3657bd85c63e969daa68ccb77afb05b071a4b62841acb7a21e417b5539014dff2ebf9550f0b14a9ff126f2734a7c1387f8e19 languageName: node linkType: hard @@ -18906,7 +19267,7 @@ __metadata: languageName: node linkType: hard -"http-proxy-agent@npm:^4.0.0, http-proxy-agent@npm:^4.0.1": +"http-proxy-agent@npm:^4.0.0": version: 4.0.1 resolution: "http-proxy-agent@npm:4.0.1" dependencies: @@ -18928,9 +19289,19 @@ __metadata: languageName: node linkType: hard +"http-proxy-agent@npm:^7.0.0": + version: 7.0.0 + resolution: "http-proxy-agent@npm:7.0.0" + dependencies: + agent-base: ^7.1.0 + debug: ^4.3.4 + checksum: a11574ff39436cee3c7bc67f259444097b09474605846ddd8edf0bf4ad8644be8533db1aa463426e376865047d05dc22755e638632819317c0c2f1b2196657c8 + languageName: node + linkType: hard + "http-proxy-middleware@npm:^2.0.3": - version: 2.0.4 - resolution: "http-proxy-middleware@npm:2.0.4" + version: 2.0.7 + resolution: "http-proxy-middleware@npm:2.0.7" dependencies: "@types/http-proxy": ^1.17.8 http-proxy: ^1.18.1 @@ -18942,7 +19313,7 @@ __metadata: peerDependenciesMeta: "@types/express": optional: true - checksum: 0e8ef36981110ed298d5c9de20c8617d61ae20044fdca3a9a245abfa06e92236a84fd3f0f83afef36e5b8ccaf84e095c1408c03f8e01ed666539f652e7d94e43 + checksum: 8d00a61eb215b83826460b07489d8bb095368ec16e02a9d63e228dcf7524e7c20d61561e5476de1391aecd4ec32ea093279cdc972115b311f8e0a95a24c9e47e languageName: node linkType: hard @@ -18978,7 +19349,7 @@ __metadata: languageName: node linkType: hard -"https-proxy-agent@npm:5, https-proxy-agent@npm:^5.0.0": +"https-proxy-agent@npm:^5.0.0": version: 5.0.1 resolution: "https-proxy-agent@npm:5.0.1" dependencies: @@ -18988,6 +19359,16 @@ __metadata: languageName: node linkType: hard +"https-proxy-agent@npm:^7.0.0": + version: 7.0.1 + resolution: "https-proxy-agent@npm:7.0.1" + dependencies: + agent-base: ^7.0.2 + debug: 4 + checksum: f08f646809c04803843534b5e0ea5b4034beaa065ef2f9505e4afaeb2fa962a15494e563357c819203cff07232d1631739947f031149eb837a16a2f3553fbe32 + languageName: node + linkType: hard + "human-signals@npm:^2.1.0": version: 2.1.0 resolution: "human-signals@npm:2.1.0" @@ -19013,25 +19394,12 @@ __metadata: languageName: node linkType: hard -"husky@npm:^3.1.0": - version: 3.1.0 - resolution: "husky@npm:3.1.0" - dependencies: - chalk: ^2.4.2 - ci-info: ^2.0.0 - cosmiconfig: ^5.2.1 - execa: ^1.0.0 - get-stdin: ^7.0.0 - opencollective-postinstall: ^2.0.2 - pkg-dir: ^4.2.0 - please-upgrade-node: ^3.2.0 - read-pkg: ^5.2.0 - run-node: ^1.0.0 - slash: ^3.0.0 +"husky@npm:^8.0.3": + version: 8.0.3 + resolution: "husky@npm:8.0.3" bin: - husky-run: ./run.js - husky-upgrade: ./lib/upgrader/bin.js - checksum: f88f41f2ca49780df339098310c8d6c68dba66219d32bf8530585f395eabee9e8bac31012ecaeb9daad3a0697f395a7e321855b8118c725dfc2c72164952aac6 + husky: lib/bin.js + checksum: 6722591771c657b91a1abb082e07f6547eca79144d678e586828ae806499d90dce2a6aee08b66183fd8b085f19d20e0990a2ad396961746b4c8bd5bdb619d668 languageName: node linkType: hard @@ -19133,10 +19501,10 @@ __metadata: languageName: node linkType: hard -"ignore@npm:^5.0.4, ignore@npm:^5.2.0, ignore@npm:^5.2.4": - version: 5.2.4 - resolution: "ignore@npm:5.2.4" - checksum: 7c7cd90edd9fea6e037f9b9da4b01bf0a86b198ce78345f9bbd983929d68ff14830be31111edc5d70c264921f4962404d75b7262b4d9cc3bc12381eccbd03096 +"ignore@npm:^5.0.4, ignore@npm:^5.2.0, ignore@npm:^5.3.2": + version: 5.3.2 + resolution: "ignore@npm:5.3.2" + checksum: f9f652c957983634ded1e7f02da3b559a0d4cc210fca3792cb67f1b153623c9c42efdc1c4121af171e295444459fc4a9201101fb041b1104a3c000bccb188337 languageName: node linkType: hard @@ -19168,16 +19536,6 @@ __metadata: languageName: node linkType: hard -"import-fresh@npm:^2.0.0": - version: 2.0.0 - resolution: "import-fresh@npm:2.0.0" - dependencies: - caller-path: ^2.0.0 - resolve-from: ^3.0.0 - checksum: 116c55ee5215a7839062285b60df85dbedde084c02111dc58c1b9d03ff7876627059f4beb16cdc090a3db21fea9022003402aa782139dc8d6302589038030504 - languageName: node - linkType: hard - "import-fresh@npm:^3.0.0, import-fresh@npm:^3.1.0, import-fresh@npm:^3.2.1": version: 3.3.0 resolution: "import-fresh@npm:3.3.0" @@ -19400,14 +19758,14 @@ __metadata: languageName: node linkType: hard -"internal-slot@npm:^1.0.3": - version: 1.0.3 - resolution: "internal-slot@npm:1.0.3" +"internal-slot@npm:^1.0.3, internal-slot@npm:^1.0.7": + version: 1.0.7 + resolution: "internal-slot@npm:1.0.7" dependencies: - get-intrinsic: ^1.1.0 - has: ^1.0.3 + es-errors: ^1.3.0 + hasown: ^2.0.0 side-channel: ^1.0.4 - checksum: bb41342a474c1b607458b0c716c742d779a6ed9dfaf7986e5d20d1e7f55b7f3676e4d9f416bc253af4fd78d367e1f83e586f74840302bcf2e60c424f9284dde5 + checksum: f8b294a4e6ea3855fc59551bbf35f2b832cf01fd5e6e2a97f5c201a071cc09b49048f856e484b67a6c721da5e55736c5b6ddafaf19e2dbeb4a3ff1821680de6c languageName: node linkType: hard @@ -19437,17 +19795,17 @@ __metadata: languageName: node linkType: hard -"ip@npm:^1.1.5": - version: 1.1.8 - resolution: "ip@npm:1.1.8" - checksum: ab32a5ecfa678d4c158c1381c4c6744fce89a1d793e1b6635ba79d0753c069030b672d765887b6fff55670c711dfa47475895e5d6013efbbcf04687c51cb8db9 +"ip@npm:^1.1.8": + version: 1.1.9 + resolution: "ip@npm:1.1.9" + checksum: 5af58bfe2110c9978acfd77a2ffcdf9d33a6ce1c72f49edbaf16958f7a8eb979b5163e43bb18938caf3aaa55cdacde4e470874c58ca3b4b112ea7a30461a0c27 languageName: node linkType: hard "ip@npm:^2.0.0": - version: 2.0.0 - resolution: "ip@npm:2.0.0" - checksum: 8d186cc5585f57372847ae29b6eba258c68862055e18a75cc4933327232cb5c107f89800ce29715d542eef2c254fbb68b382e780a7414f9ee7caf60b7a473958 + version: 2.0.1 + resolution: "ip@npm:2.0.1" + checksum: cab8eb3e88d0abe23e4724829621ec4c4c5cb41a7f936a2e626c947128c1be16ed543448d42af7cca95379f9892bfcacc1ccd8d09bc7e8bea0e86d492ce33616 languageName: node linkType: hard @@ -19485,6 +19843,16 @@ __metadata: languageName: node linkType: hard +"is-array-buffer@npm:^3.0.4": + version: 3.0.4 + resolution: "is-array-buffer@npm:3.0.4" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.2.1 + checksum: 42a49d006cc6130bc5424eae113e948c146f31f9d24460fc0958f855d9d810e6fd2e4519bf19aab75179af9c298ea6092459d8cafdec523cd19e529b26eab860 + languageName: node + linkType: hard + "is-arrayish@npm:^0.2.1": version: 0.2.1 resolution: "is-arrayish@npm:0.2.1" @@ -19534,10 +19902,10 @@ __metadata: languageName: node linkType: hard -"is-callable@npm:^1.1.4, is-callable@npm:^1.2.4": - version: 1.2.4 - resolution: "is-callable@npm:1.2.4" - checksum: bda3c67128741129d61e1cb7ca89025ca56b39bf3564657989567c9f6d1e20d6f5579750d3c1fa8887903c6dc669fbc695e33a1363e7c5ec944077e39d24f73d +"is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.2.7": + version: 1.2.7 + resolution: "is-callable@npm:1.2.7" + checksum: ceebaeb9d92e8adee604076971dd6000d38d6afc40bb843ea8e45c5579b57671c3f3b50d7f04869618242c6cee08d1b67806a8cb8edaaaf7c0748b3720d6066f languageName: node linkType: hard @@ -19581,6 +19949,15 @@ __metadata: languageName: node linkType: hard +"is-data-view@npm:^1.0.1": + version: 1.0.1 + resolution: "is-data-view@npm:1.0.1" + dependencies: + is-typed-array: ^1.1.13 + checksum: a3e6ec84efe303da859107aed9b970e018e2bee7ffcb48e2f8096921a493608134240e672a2072577e5f23a729846241d9634806e8a0e51d9129c56d5f65442d + languageName: node + linkType: hard + "is-date-object@npm:^1.0.1": version: 1.0.5 resolution: "is-date-object@npm:1.0.5" @@ -19597,13 +19974,6 @@ __metadata: languageName: node linkType: hard -"is-directory@npm:^0.3.1": - version: 0.3.1 - resolution: "is-directory@npm:0.3.1" - checksum: 1c39c7d1753b04e9483b89fb88908b8137ab4743b6f481947e97ccf93ecb384a814c8d3f0b95b082b149c5aa19c3e9e4464e2791d95174bce95998c26bb1974b - languageName: node - linkType: hard - "is-docker@npm:^2.0.0, is-docker@npm:^2.1.1": version: 2.2.1 resolution: "is-docker@npm:2.2.1" @@ -19713,10 +20083,10 @@ __metadata: languageName: node linkType: hard -"is-negative-zero@npm:^2.0.2": - version: 2.0.2 - resolution: "is-negative-zero@npm:2.0.2" - checksum: eda024c158f70f2017f3415e471b818d314da5ef5be68f801b16314d4a4b6304a74cbed778acf9e2f955bb9c1c5f2935c1be0c7c99e1ad12286f45366217b6a3 +"is-negative-zero@npm:^2.0.3": + version: 2.0.3 + resolution: "is-negative-zero@npm:2.0.3" + checksum: bcdcf6b8b9714063ffcfa9929c575ac69bfdabb8f4574ff557dfc086df2836cf07e3906f5bbc4f2a5c12f8f3ba56af640c843cdfc74da8caed86c7c7d66fd08e languageName: node linkType: hard @@ -19815,6 +20185,13 @@ __metadata: languageName: node linkType: hard +"is-primitive@npm:^3.0.1": + version: 3.0.1 + resolution: "is-primitive@npm:3.0.1" + checksum: 2e3b6f029fabbdda467ea51ea4fdd00e6552434108b863a08f296638072c506a7c195089e3e31f83e7fc14bebbd1c5c9f872fe127c9284a7665c8227b47ffdd6 + languageName: node + linkType: hard + "is-property@npm:^1.0.2": version: 1.0.2 resolution: "is-property@npm:1.0.2" @@ -19855,12 +20232,12 @@ __metadata: languageName: node linkType: hard -"is-shared-array-buffer@npm:^1.0.2": - version: 1.0.2 - resolution: "is-shared-array-buffer@npm:1.0.2" +"is-shared-array-buffer@npm:^1.0.2, is-shared-array-buffer@npm:^1.0.3": + version: 1.0.3 + resolution: "is-shared-array-buffer@npm:1.0.3" dependencies: - call-bind: ^1.0.2 - checksum: cfeee6f171f1b13e6cbc6f3b6cc44e192b93df39f3fcb31aa66ffb1d2df3b91e05664311659f9701baba62f5e98c83b0673c628e7adc30f55071c4874fcdccec + call-bind: ^1.0.7 + checksum: adc11ab0acbc934a7b9e5e9d6c588d4ec6682f6fea8cda5180721704fa32927582ede5b123349e32517fdadd07958973d24716c80e7ab198970c47acc09e59c7 languageName: node linkType: hard @@ -19880,13 +20257,6 @@ __metadata: languageName: node linkType: hard -"is-stream@npm:^1.1.0": - version: 1.1.0 - resolution: "is-stream@npm:1.1.0" - checksum: b8ae7971e78d2e8488d15f804229c6eed7ed36a28f8807a1815938771f4adff0e705218b7dab968270433f67103e4fef98062a0beea55d64835f705ee72c7002 - languageName: node - linkType: hard - "is-stream@npm:^2.0.0": version: 2.0.1 resolution: "is-stream@npm:2.0.1" @@ -19921,16 +20291,12 @@ __metadata: languageName: node linkType: hard -"is-typed-array@npm:^1.1.3, is-typed-array@npm:^1.1.7": - version: 1.1.8 - resolution: "is-typed-array@npm:1.1.8" +"is-typed-array@npm:^1.1.13, is-typed-array@npm:^1.1.3": + version: 1.1.13 + resolution: "is-typed-array@npm:1.1.13" dependencies: - available-typed-arrays: ^1.0.5 - call-bind: ^1.0.2 - es-abstract: ^1.18.5 - foreach: ^2.0.5 - has-tostringtag: ^1.0.0 - checksum: 31e0561cfc03b3e167b61f011de4eff12cda6a7d8a5f3e92e67c9043776e27df32f2ba4e690246711465ed1bef1917e7bdb09f68cc68b24666d2a3e7c5437af9 + which-typed-array: ^1.1.14 + checksum: fa5cb97d4a80e52c2cc8ed3778e39f175a1a2ae4ddf3adae3187d69586a1fd57cfa0b095db31f66aa90331e9e3da79184cea9c6abdcd1abc722dc3c3edd51cca languageName: node linkType: hard @@ -20019,6 +20385,13 @@ __metadata: languageName: node linkType: hard +"isarray@npm:^2.0.5": + version: 2.0.5 + resolution: "isarray@npm:2.0.5" + checksum: 4199f14a7a13da2177c66c31080008b7124331956f47bca57dd0b6ea9f11687aa25e565a2c7a2b519bc86988d10398e3049a1f5df13c9f6b7664154690ae79fd + languageName: node + linkType: hard + "isexe@npm:^2.0.0": version: 2.0.0 resolution: "isexe@npm:2.0.0" @@ -20053,15 +20426,6 @@ __metadata: languageName: node linkType: hard -"isomorphic-ws@npm:^4.0.1": - version: 4.0.1 - resolution: "isomorphic-ws@npm:4.0.1" - peerDependencies: - ws: "*" - checksum: 7cb90dc2f0eb409825558982fb15d7c1d757a88595efbab879592f9d2b63820d6bbfb5571ab8abe36c715946e165a413a99f6aafd9f40ab1f514d73487bc9996 - languageName: node - linkType: hard - "isstream@npm:~0.1.2": version: 0.1.2 resolution: "isstream@npm:0.1.2" @@ -20145,23 +20509,23 @@ __metadata: languageName: node linkType: hard -"iterall@npm:^1.2.1, iterall@npm:^1.3.0": +"iterall@npm:^1.3.0": version: 1.3.0 resolution: "iterall@npm:1.3.0" checksum: 40de624e5fe937c4c0e511981b91caea9ff2142bfc0316cccc8506eaa03aa253820cc17c5bc5f0a98706c7268a373e5ebee9af9a0c8a359730cf7c05938b57b5 languageName: node linkType: hard -"jackspeak@npm:^2.0.3": - version: 2.1.1 - resolution: "jackspeak@npm:2.1.1" +"jackspeak@npm:^3.1.2": + version: 3.4.3 + resolution: "jackspeak@npm:3.4.3" dependencies: + "@isaacs/cliui": ^8.0.2 "@pkgjs/parseargs": ^0.11.0 - cliui: ^8.0.1 dependenciesMeta: "@pkgjs/parseargs": optional: true - checksum: 3c5919d4e2d01d539c99d1ed5fde84c29ef170b7bc50dbb80ed712df348ef3ec87346197db1a86264128d220b357b8ab619c70ece26f08abe4b4de0c424b1334 + checksum: 6acc10d139eaefdbe04d2f679e6191b3abf073f111edf10b1de5302c97ec93fffeb2fdd8681ed17f16268aa9dd4f8c588ed9d1d3bffbbfa6e8bf897cbb3149b9 languageName: node linkType: hard @@ -20860,17 +21224,17 @@ __metadata: languageName: node linkType: hard -"jest-util@npm:^29.0.0, jest-util@npm:^29.5.0": - version: 29.5.0 - resolution: "jest-util@npm:29.5.0" +"jest-util@npm:^29.0.0, jest-util@npm:^29.5.0, jest-util@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-util@npm:29.7.0" dependencies: - "@jest/types": ^29.5.0 + "@jest/types": ^29.6.3 "@types/node": "*" chalk: ^4.0.0 ci-info: ^3.2.0 graceful-fs: ^4.2.9 picomatch: ^2.2.3 - checksum: c7f1dc8ae82cd9614a31e09806499560b4812beb57589b214241dd213d3cc6d24417593aef2caf2d3d9694925438849fec371ff36ca8a7f1be8438fd41e83373 + checksum: bc55a8f49fdbb8f51baf31d2a4f312fb66c9db1483b82f602c9c990e659cdd7ec529c8e916d5a89452ecbcfae4949b21b40a7a59d4ffc0cd813a973ab08c8150 languageName: node linkType: hard @@ -20961,7 +21325,7 @@ __metadata: languageName: node linkType: hard -"jest-worker@npm:^27.0.2, jest-worker@npm:^27.3.1, jest-worker@npm:^27.4.5, jest-worker@npm:^27.5.1": +"jest-worker@npm:^27.3.1, jest-worker@npm:^27.4.5, jest-worker@npm:^27.5.1": version: 27.5.1 resolution: "jest-worker@npm:27.5.1" dependencies: @@ -20972,15 +21336,15 @@ __metadata: languageName: node linkType: hard -"jest-worker@npm:^29.5.0": - version: 29.5.0 - resolution: "jest-worker@npm:29.5.0" +"jest-worker@npm:^29.4.3, jest-worker@npm:^29.5.0": + version: 29.7.0 + resolution: "jest-worker@npm:29.7.0" dependencies: "@types/node": "*" - jest-util: ^29.5.0 + jest-util: ^29.7.0 merge-stream: ^2.0.0 supports-color: ^8.0.0 - checksum: 4191ec3209cb1d838c931d47c7328fec7279eb7a5d40fa86bb3fac4d34cbad835349bc366150712259a274507fd210ddb450733032394d8e0b19640b3d3ac17d + checksum: 5570a3a005b16f46c131968b8a5b56d291f9bbb85ff4217e31c80bd8a02e7de799e59a54b95ca28d5c302f248b54cbffde2d177c2f0f52ffcee7504c6eabf660 languageName: node linkType: hard @@ -21017,10 +21381,17 @@ __metadata: languageName: node linkType: hard -"jose@npm:^4.3.7": - version: 4.9.2 - resolution: "jose@npm:4.9.2" - checksum: e992b623f1f6bed35e447593a2ef204373bffdc140e21b188d9297dc1e609c4a95fd87e481a34abcdf83594583e498d2b5b053f4751ceb9ef97c4bd17af348c5 +"jose@npm:^4.15.5": + version: 4.15.5 + resolution: "jose@npm:4.15.5" + checksum: 9f208492f55ae9c547fd407c36f67ec3385051b5ca390e24f5449740f17359640b3f96fabfd38bc132cc4292b964c31b921bf356253373b1bd3eb6df799b7433 + languageName: node + linkType: hard + +"jose@npm:^5.2.0": + version: 5.2.3 + resolution: "jose@npm:5.2.3" + checksum: 7cf02e1d1d6226b6ee136fb6c53fd4dde9cfdaf1613ceaab3a5629803eaa80cbfd77cddc38a54c55c82b8f63428677660c93fc87493818a07adc9c0c77ef16ff languageName: node linkType: hard @@ -21250,25 +21621,13 @@ __metadata: languageName: node linkType: hard -"jsonschema@npm:^1.4.1": +"jsonschema@npm:^1.4.1, jsonschema@npm:~1.4.1": version: 1.4.1 resolution: "jsonschema@npm:1.4.1" checksum: c3422d3fc7d33ff7234a806ffa909bb6fb5d1cd664bea229c64a1785dc04cbccd5fc76cf547c6ab6dd7881dbcaf3540a6a9f925a5956c61a9cd3e23a3c1796ef languageName: node linkType: hard -"jsonwebtoken@npm:^9.0.0": - version: 9.0.0 - resolution: "jsonwebtoken@npm:9.0.0" - dependencies: - jws: ^3.2.2 - lodash: ^4.17.21 - ms: ^2.1.1 - semver: ^7.3.8 - checksum: 60c30d90d8a69b8e7148306e0c299ac120dbde9c032add48d26df928fe349e952cf4b09f12d7942257681a936e3374e4d49280ab20f8a4578688c7f08d87f9bc - languageName: node - linkType: hard - "jsprim@npm:^1.2.2": version: 1.4.2 resolution: "jsprim@npm:1.4.2" @@ -21312,31 +21671,10 @@ __metadata: languageName: node linkType: hard -"just-extend@npm:^4.0.2": - version: 4.2.1 - resolution: "just-extend@npm:4.2.1" - checksum: ab01b807ae064eee016001df7e958fab9d878a6e2e32119f5f5a94e986daca9d940aa6176889f04c2658e6e3edd75000d7bab1a2376d473ccb20ae571f4b8cbc - languageName: node - linkType: hard - -"jwa@npm:^1.4.1": - version: 1.4.1 - resolution: "jwa@npm:1.4.1" - dependencies: - buffer-equal-constant-time: 1.0.1 - ecdsa-sig-formatter: 1.0.11 - safe-buffer: ^5.0.1 - checksum: 5c533540bf38702e73cf14765805a94027c66a0aa8b16bc3e89d8d905e61a4ce2791e87e21be97d1293a5ee9d4f3e5e47737e671768265ca4f25706db551d5e9 - languageName: node - linkType: hard - -"jws@npm:^3.2.2": - version: 3.2.2 - resolution: "jws@npm:3.2.2" - dependencies: - jwa: ^1.4.1 - safe-buffer: ^5.0.1 - checksum: e770704533d92df358adad7d1261fdecad4d7b66fa153ba80d047e03ca0f1f73007ce5ed3fbc04d2eba09ba6e7e6e645f351e08e5ab51614df1b0aa4f384dfff +"just-extend@npm:^6.2.0": + version: 6.2.0 + resolution: "just-extend@npm:6.2.0" + checksum: d41cbdb6d85b986d4deaf2144d81d4f7266cd408fc95189d046d63f610c2dc486b141aeb6ef319c2d76fe904d45a6bb31f19b098ff0427c35688e0c383fc0511 languageName: node linkType: hard @@ -21471,6 +21809,16 @@ __metadata: languageName: node linkType: hard +"launch-editor@npm:^2.6.0": + version: 2.6.1 + resolution: "launch-editor@npm:2.6.1" + dependencies: + picocolors: ^1.0.0 + shell-quote: ^1.8.1 + checksum: 82d0bd9a44e7a972157719e63dac1b8196db6ec7066c1ec57a495f6c3d6e734f3c4da89549e7b33eb3b0356668ad02a9e7782b6733f5ebd7a61b7c5f635a3ee9 + languageName: node + linkType: hard + "lazystream@npm:^1.0.0": version: 1.0.1 resolution: "lazystream@npm:1.0.1" @@ -21634,10 +21982,10 @@ __metadata: languageName: node linkType: hard -"lilconfig@npm:^2.0.3, lilconfig@npm:^2.0.5": - version: 2.0.5 - resolution: "lilconfig@npm:2.0.5" - checksum: eed9afcecf1b864405f4b7299abefb87945edba250c70896de54b19b08b87333abc268cc6689539bc33f0e8d098139578704bf51af8077d358f1ac95d58beef0 +"lilconfig@npm:^2.0.5, lilconfig@npm:^2.1.0": + version: 2.1.0 + resolution: "lilconfig@npm:2.1.0" + checksum: 64645641aa8d274c99338e130554abd6a0190533c0d9eb2ce7ebfaf2e05c7d9961f3ffe2bfa39efd3b60c521ba3dd24fa236fe2775fc38501bf82bf49d4678b8 languageName: node linkType: hard @@ -21805,7 +22153,7 @@ __metadata: languageName: node linkType: hard -"lodash.get@npm:^4, lodash.get@npm:^4.4.2": +"lodash.get@npm:^4.4.2": version: 4.4.2 resolution: "lodash.get@npm:4.4.2" checksum: 48f40d471a1654397ed41685495acb31498d5ed696185ac8973daef424a749ca0c7871bf7b665d5c14f5cc479394479e0307e781f61d5573831769593411be6e @@ -21868,13 +22216,6 @@ __metadata: languageName: node linkType: hard -"lodash.set@npm:^4.3.2": - version: 4.3.2 - resolution: "lodash.set@npm:4.3.2" - checksum: c641d31905e51df43170dce8a1d11a1cff11356e2e2e75fe2615995408e9687d58c3e1d64c3c284c2df2bc519f79a98af737d2944d382ff82ffd244ff6075c29 - languageName: node - linkType: hard - "lodash.snakecase@npm:^4.1.1": version: 4.1.1 resolution: "lodash.snakecase@npm:4.1.1" @@ -21931,7 +22272,7 @@ __metadata: languageName: node linkType: hard -"lodash@npm:^4.17.12, lodash@npm:^4.17.13, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.20, lodash@npm:^4.17.21, lodash@npm:^4.17.4, lodash@npm:^4.2.0, lodash@npm:^4.2.1, lodash@npm:~4.17.0, lodash@npm:~4.17.15": +"lodash@npm:^4.17.12, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.20, lodash@npm:^4.17.21, lodash@npm:^4.17.4, lodash@npm:^4.2.0, lodash@npm:^4.2.1, lodash@npm:~4.17.0, lodash@npm:~4.17.15": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: d8cbea072bb08655bb4c989da418994b073a608dffa608b09ac04b43a791b12aeae7cd7ad919aa4c925f33b48490b5cfe6c1f71d827956071dae2e7bb3a6b74c @@ -21945,16 +22286,6 @@ __metadata: languageName: node linkType: hard -"log-symbols@npm:4.1.0, log-symbols@npm:^4.1.0": - version: 4.1.0 - resolution: "log-symbols@npm:4.1.0" - dependencies: - chalk: ^4.1.0 - is-unicode-supported: ^0.1.0 - checksum: 67f445a9ffa76db1989d0fa98586e5bc2fd5247260dafb8ad93d9f0ccd5896d53fb830b0e54dade5ad838b9de2006c826831a3c528913093af20dff8bd24aca6 - languageName: node - linkType: hard - "log-symbols@npm:^3.0.0": version: 3.0.0 resolution: "log-symbols@npm:3.0.0" @@ -21964,6 +22295,16 @@ __metadata: languageName: node linkType: hard +"log-symbols@npm:^4.1.0": + version: 4.1.0 + resolution: "log-symbols@npm:4.1.0" + dependencies: + chalk: ^4.1.0 + is-unicode-supported: ^0.1.0 + checksum: 67f445a9ffa76db1989d0fa98586e5bc2fd5247260dafb8ad93d9f0ccd5896d53fb830b0e54dade5ad838b9de2006c826831a3c528913093af20dff8bd24aca6 + languageName: node + linkType: hard + "logdown@npm:^3.3.0": version: 3.3.1 resolution: "logdown@npm:3.3.1" @@ -21986,26 +22327,10 @@ __metadata: languageName: node linkType: hard -"lolex@npm:^4.2.0": - version: 4.2.0 - resolution: "lolex@npm:4.2.0" - checksum: b56fbffec393eaaff0f950e528ab7762507527743e4678646a485a0049c830d078960a66a2ddc68ddfde72cbbdde5bc98d9fbe7c487b419317d293d978e8ab20 - languageName: node - linkType: hard - -"lolex@npm:^5.0.1": - version: 5.1.2 - resolution: "lolex@npm:5.1.2" - dependencies: - "@sinonjs/commons": ^1.7.0 - checksum: 310f55bb9b756b3b5661eff9532843d7bbc9e3b82fe51f7330d17ab258c2b43101f98c6650778cf81827c13d6d239b878a95d87a06eeef2349b1c074b37ee8ee - languageName: node - linkType: hard - -"long@npm:^4.0.0": - version: 4.0.0 - resolution: "long@npm:4.0.0" - checksum: 50a6417d15b06104dbe4e3d4a667c39b137f130a9108ea8752b352a4cfae047531a3ac351c181792f3f8768fe17cca6b0f406674a541a86fb638aaac560d83ed +"long@npm:^5.2.1": + version: 5.2.3 + resolution: "long@npm:5.2.3" + checksum: 6a0da658f5ef683b90330b1af76f06790c623e148222da9d75b60e266bbf88f803232dd21464575681638894a84091616e7f89557aa087fd14116c0f4e0e43d9 languageName: node linkType: hard @@ -22045,6 +22370,13 @@ __metadata: languageName: node linkType: hard +"lru-cache@npm:^10.2.0": + version: 10.4.3 + resolution: "lru-cache@npm:10.4.3" + checksum: ebd04fbca961e6c1d6c0af3799adcc966a1babe798f685bb84e6599266599cd95d94630b10262f5424539bc4640107e8a33aa28585374abf561d30d16f4b39fb + languageName: node + linkType: hard + "lru-cache@npm:^5.1.1": version: 5.1.1 resolution: "lru-cache@npm:5.1.1" @@ -22070,10 +22402,10 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:^9.0.0": - version: 9.1.1 - resolution: "lru-cache@npm:9.1.1" - checksum: a70630bccc94e6d6bf5523de8103302407a3b0090f4e245d126569ba96f85b4fa10ad537fb5d9435c58ba3762c0880361f8f5a92d7c9d10b59c8fcc8a0c615e5 +"lru-cache@npm:^8.0.0": + version: 8.0.5 + resolution: "lru-cache@npm:8.0.5" + checksum: cd95a9c38497611c5a6453de39a881f6eb5865851a2a01b5f14104ff3fee515362a7b1e7de28606028f423802910ba05bdb8ae1aa7b0d54eae70c92f0cec10b2 languageName: node linkType: hard @@ -22114,7 +22446,7 @@ __metadata: languageName: node linkType: hard -"make-error@npm:1.x, make-error@npm:^1, make-error@npm:^1.1.1, make-error@npm:^1.3.2": +"make-error@npm:1.x, make-error@npm:^1.1.1, make-error@npm:^1.3.2": version: 1.3.6 resolution: "make-error@npm:1.3.6" checksum: 171e458d86854c6b3fc46610cfacf0b45149ba043782558c6875d9f42f222124384ad0b468c92e996d815a8a2003817a710c0a160e49c1c394626f76fa45396f @@ -22242,6 +22574,20 @@ __metadata: languageName: node linkType: hard +"mdn-data@npm:2.0.28": + version: 2.0.28 + resolution: "mdn-data@npm:2.0.28" + checksum: 20000932bc4cd1cde9cba4e23f08cc4f816398af4c15ec81040ed25421d6bf07b5cf6b17095972577fb498988f40f4cb589e3169b9357bb436a12d8e07e5ea7b + languageName: node + linkType: hard + +"mdn-data@npm:2.0.30": + version: 2.0.30 + resolution: "mdn-data@npm:2.0.30" + checksum: a2c472ea16cee3911ae742593715aa4c634eb3d4b9f1e6ada0902aa90df13dcbb7285d19435f3ff213ebaa3b2e0c0265c1eb0e3fb278fda7f8919f046a410cd9 + languageName: node + linkType: hard + "mdn-data@npm:2.0.4": version: 2.0.4 resolution: "mdn-data@npm:2.0.4" @@ -22263,12 +22609,12 @@ __metadata: languageName: node linkType: hard -"memfs@npm:^3.1.2, memfs@npm:^3.4.1": - version: 3.4.11 - resolution: "memfs@npm:3.4.11" +"memfs@npm:^3.1.2, memfs@npm:^3.4.3": + version: 3.5.3 + resolution: "memfs@npm:3.5.3" dependencies: - fs-monkey: ^1.0.3 - checksum: 31792e27e6622d63e44aafccf9650d432ba51bcdfddf6ebefcf5fe7c5279da8a3d5481b1597bd21331e68f37c2040a496066c972cc66f18a5022d265c800d395 + fs-monkey: ^1.0.4 + checksum: 038fc81bce17ea92dde15aaa68fa0fdaf4960c721ce3ffc7c2cb87a259333f5159784ea48b3b72bf9e054254d9d0d0d5209d0fdc3d07d08653a09933b168fbd7 languageName: node linkType: hard @@ -22291,10 +22637,10 @@ __metadata: languageName: node linkType: hard -"merge-descriptors@npm:1.0.1": - version: 1.0.1 - resolution: "merge-descriptors@npm:1.0.1" - checksum: b67d07bd44cfc45cebdec349bb6e1f7b077ee2fd5beb15d1f7af073849208cb6f144fe403e29a36571baf3f4e86469ac39acf13c318381e958e186b2766f54ec +"merge-descriptors@npm:1.0.3": + version: 1.0.3 + resolution: "merge-descriptors@npm:1.0.3" + checksum: 866b7094afd9293b5ea5dcd82d71f80e51514bed33b4c4e9f516795dc366612a4cbb4dc94356e943a8a6914889a914530badff27f397191b9b75cda20b6bae93 languageName: node linkType: hard @@ -22332,12 +22678,12 @@ __metadata: linkType: hard "micromatch@npm:^4.0.2, micromatch@npm:^4.0.4, micromatch@npm:~4.0.0": - version: 4.0.5 - resolution: "micromatch@npm:4.0.5" + version: 4.0.8 + resolution: "micromatch@npm:4.0.8" dependencies: - braces: ^3.0.2 + braces: ^3.0.3 picomatch: ^2.3.1 - checksum: 3d6505b20f9fa804af5d8c596cb1c5e475b9b0cd05f652c5b56141cf941bd72adaeb7a436fda344235cef93a7f29b7472efc779fcdb83b478eab0867b95cdeff + checksum: 166fa6eb926b9553f32ef81f5f531d27b4ce7da60e5baf8c021d043b27a388fb95e46a8038d5045877881e673f8134122b59624d5cecbd16eb50a42e7a6b5ca8 languageName: node linkType: hard @@ -22360,7 +22706,7 @@ __metadata: languageName: node linkType: hard -"mime-types@npm:^2.1.12, mime-types@npm:^2.1.26, mime-types@npm:^2.1.27, mime-types@npm:^2.1.31, mime-types@npm:~2.1.17, mime-types@npm:~2.1.19, mime-types@npm:~2.1.24, mime-types@npm:~2.1.34": +"mime-types@npm:^2.1.12, mime-types@npm:^2.1.26, mime-types@npm:^2.1.27, mime-types@npm:^2.1.31, mime-types@npm:^2.1.35, mime-types@npm:~2.1.17, mime-types@npm:~2.1.19, mime-types@npm:~2.1.24, mime-types@npm:~2.1.34": version: 2.1.35 resolution: "mime-types@npm:2.1.35" dependencies: @@ -22447,15 +22793,6 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:3.0.4": - version: 3.0.4 - resolution: "minimatch@npm:3.0.4" - dependencies: - brace-expansion: ^1.1.7 - checksum: d0a2bcd93ebec08a9eef3ca83ba33c9fb6feb93932e0b4dc6aa46c5f37a9404bea7ad9ff7cafe23ce6634f1fe3b206f5315ecbb05812da6e692c21d8ecfd3dae - languageName: node - linkType: hard - "minimatch@npm:3.0.5": version: 3.0.5 resolution: "minimatch@npm:3.0.5" @@ -22465,12 +22802,12 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^5.0.1, minimatch@npm:^5.1.0": - version: 5.1.0 - resolution: "minimatch@npm:5.1.0" +"minimatch@npm:^5.0.1, minimatch@npm:^5.1.0, minimatch@npm:^5.1.6": + version: 5.1.6 + resolution: "minimatch@npm:5.1.6" dependencies: brace-expansion: ^2.0.1 - checksum: 21c4877438068da0728eeb678107ea716fd3c76fcde713c9d11b01d7d15c276071aa2fecfcd353b970a290cffd572c3ed43e0a64804470ab9ae97717ed13fb18 + checksum: 3defdfd230914f22a8da203747c42ee3c405c39d4d37ffda284dac5e45b7e1f6c49aa8be606509002898e73091ff2a3bbfc59c2c6c71d4660609f63aa92f98e3 languageName: node linkType: hard @@ -22501,12 +22838,12 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^9.0.0": - version: 9.0.0 - resolution: "minimatch@npm:9.0.0" +"minimatch@npm:^9.0.0, minimatch@npm:^9.0.4": + version: 9.0.5 + resolution: "minimatch@npm:9.0.5" dependencies: brace-expansion: ^2.0.1 - checksum: d966656c280a994f89c3711e8cdac0c78d8703d028a26722d0229e3e92bf515a065165caa64cbccdd7ca89bb0338a3094920f8d42d36295c4d55922e19ae366e + checksum: de96cf5e35bdf0eab3e2c853522f98ffbe9a36c37797778d2665231ec1f20a9447a7e567cb640901f89e4daaa95ae5d70c65a9e8aa2bb0019b6facbc3c0575ed languageName: node linkType: hard @@ -22636,6 +22973,13 @@ __metadata: languageName: node linkType: hard +"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.1.2": + version: 7.1.2 + resolution: "minipass@npm:7.1.2" + checksum: b0fd20bb9fb56e5fa9a8bfac539e8915ae07430a619e4b86ff71f5fc757ef3924b23b2c4230393af1eda647ed3d75739e4e0acb250a6b1eb277cf7f8fe449557 + languageName: node + linkType: hard + "minizlib@npm:^2.1.1, minizlib@npm:^2.1.2": version: 2.1.2 resolution: "minizlib@npm:2.1.2" @@ -22664,7 +23008,7 @@ __metadata: languageName: node linkType: hard -"mkdirp@npm:0.5.x, mkdirp@npm:^0.5.0, mkdirp@npm:^0.5.5, mkdirp@npm:~0.5.1": +"mkdirp@npm:0.5.x, mkdirp@npm:^0.5.0, mkdirp@npm:~0.5.1": version: 0.5.5 resolution: "mkdirp@npm:0.5.5" dependencies: @@ -22700,38 +23044,34 @@ __metadata: languageName: node linkType: hard -"mocha@npm:>=7.0.0": - version: 9.1.3 - resolution: "mocha@npm:9.1.3" +"mocha@npm:^11.0.1": + version: 11.0.2 + resolution: "mocha@npm:11.0.2" dependencies: - "@ungap/promise-all-settled": 1.1.2 - ansi-colors: 4.1.1 - browser-stdout: 1.3.1 - chokidar: 3.5.2 - debug: 4.3.2 - diff: 5.0.0 - escape-string-regexp: 4.0.0 - find-up: 5.0.0 - glob: 7.1.7 - growl: 1.10.5 - he: 1.2.0 - js-yaml: 4.1.0 - log-symbols: 4.1.0 - minimatch: 3.0.4 - ms: 2.1.3 - nanoid: 3.1.25 - serialize-javascript: 6.0.0 - strip-json-comments: 3.1.1 - supports-color: 8.1.1 - which: 2.0.2 - workerpool: 6.1.5 - yargs: 16.2.0 - yargs-parser: 20.2.4 - yargs-unparser: 2.0.0 + ansi-colors: ^4.1.3 + browser-stdout: ^1.3.1 + chokidar: ^3.5.3 + debug: ^4.3.5 + diff: ^5.2.0 + escape-string-regexp: ^4.0.0 + find-up: ^5.0.0 + glob: ^10.4.5 + he: ^1.2.0 + js-yaml: ^4.1.0 + log-symbols: ^4.1.0 + minimatch: ^5.1.6 + ms: ^2.1.3 + serialize-javascript: ^6.0.2 + strip-json-comments: ^3.1.1 + supports-color: ^8.1.1 + workerpool: ^6.5.1 + yargs: ^16.2.0 + yargs-parser: ^20.2.9 + yargs-unparser: ^2.0.0 bin: _mocha: bin/_mocha - mocha: bin/mocha - checksum: 40b0a498c4bcb0a6d67831beb8c18dbea1e8af6997398355e21e5b4e8b650d4ecf6f92a846baa11ff8087e443e91e7af64d42fe2a91bac637c4bffc5c4a03f60 + mocha: bin/mocha.js + checksum: 3d4b775eb02080fc9e32872c3958cf60fa690ee9fe59af78a365788d0c7ae44d8f42101b75dcf062a08cbf0b4902d73293f1a81b96949f8aaed82df71380100d languageName: node linkType: hard @@ -22779,7 +23119,7 @@ __metadata: languageName: node linkType: hard -"ms@npm:2.1.3, ms@npm:^2.0.0, ms@npm:^2.1.1": +"ms@npm:2.1.3, ms@npm:^2.0.0, ms@npm:^2.1.1, ms@npm:^2.1.3": version: 2.1.3 resolution: "ms@npm:2.1.3" checksum: d924b57e7312b3b63ad21fc5b3dc0af5e78d61a1fc7cfb5457edaf26326bf62be5307cc87ffb6862ef1c2b33b0233cdb5d4f01c4c958cc0d660948b65a287a48 @@ -22835,23 +23175,23 @@ __metadata: languageName: node linkType: hard -"mysql2@npm:~2.3.3": - version: 2.3.3 - resolution: "mysql2@npm:2.3.3" +"mysql2@npm:^3.9.8": + version: 3.10.0 + resolution: "mysql2@npm:3.10.0" dependencies: - denque: ^2.0.1 + denque: ^2.1.0 generate-function: ^2.3.1 iconv-lite: ^0.6.3 - long: ^4.0.0 - lru-cache: ^6.0.0 - named-placeholders: ^1.1.2 + long: ^5.2.1 + lru-cache: ^8.0.0 + named-placeholders: ^1.1.3 seq-queue: ^0.0.5 sqlstring: ^2.3.2 - checksum: cc5c68a564fb20a1c5afbf98a0875b3ba563d50046307f36aa7b9d24622f1f8ba0f2b26526d836a4e416d6d172662f0ef76d62c7db0d7d09d6956e7394c290b9 + checksum: 0e54fea1349ca3df82acd43a1402e5c4d2dc42f8ed797441973385af566ff0060dc7316ecc49fab5081eaeb0f433dfffe719caca62b166bf6f788e6acf8b7bec languageName: node linkType: hard -"named-placeholders@npm:^1.1.2": +"named-placeholders@npm:^1.1.3": version: 1.1.3 resolution: "named-placeholders@npm:1.1.3" dependencies: @@ -22860,12 +23200,12 @@ __metadata: languageName: node linkType: hard -"nan@npm:^2.14.0": - version: 2.15.0 - resolution: "nan@npm:2.15.0" +"nan@npm:^2.17.0": + version: 2.20.0 + resolution: "nan@npm:2.20.0" dependencies: node-gyp: latest - checksum: 797924e8dd64c32d571f322f998d5aa5a732012a23315976456017ea37515b21a808020995d7f48b716476b7e9a6a1ba9cce43bee30399016b9ac7257454ea04 + checksum: 75775309a21ad179a55250d62ce47322c33ca03d8ddb5ad4c555bd820dd72484b3c59253dd9f41cc68dd63453ef04017407fbd081a549bc030d977079bb798b7 languageName: node linkType: hard @@ -22876,21 +23216,12 @@ __metadata: languageName: node linkType: hard -"nanoid@npm:3.1.25": - version: 3.1.25 - resolution: "nanoid@npm:3.1.25" +"nanoid@npm:^3.3.6": + version: 3.3.8 + resolution: "nanoid@npm:3.3.8" bin: nanoid: bin/nanoid.cjs - checksum: 5f9b564ec6c65fa15b51d9dcb8ad9cd409959ad4cd805478e1f52f0ff1c56b24c790811175d9ae67597555bf9a40fd40f21d53fdc7a7ebc754a723db44a4ce56 - languageName: node - linkType: hard - -"nanoid@npm:^3.3.1": - version: 3.3.1 - resolution: "nanoid@npm:3.3.1" - bin: - nanoid: bin/nanoid.cjs - checksum: 1034d71e438490e620bfc2419bb203e7dccbc122fd2e62a6101227b50d08992fdc114de197e77604c419dbcf4f41b142e6ff61d0516db4d24cd32f9bbc390f6b + checksum: 4b1bb29f6cfebf3be3bc4ad1f1296fb0a10a3043a79f34fbffe75d1621b4318319211cd420549459018ea3592f0d2f159247a6f874911d6d26eaaadda2478120 languageName: node linkType: hard @@ -22922,43 +23253,30 @@ __metadata: languageName: node linkType: hard -"netmask@npm:^2.0.1, netmask@npm:^2.0.2": - version: 2.0.2 - resolution: "netmask@npm:2.0.2" - checksum: cafd28388e698e1138ace947929f842944d0f1c0b87d3fa2601a61b38dc89397d33c0ce2c8e7b99e968584b91d15f6810b91bef3f3826adf71b1833b61d4bf4f - languageName: node - linkType: hard - -"nice-try@npm:^1.0.4": - version: 1.0.5 - resolution: "nice-try@npm:1.0.5" - checksum: 95568c1b73e1d0d4069a3e3061a2102d854513d37bcfda73300015b7ba4868d3b27c198d1dbbd8ebdef4112fc2ed9e895d4a0f2e1cce0bd334f2a1346dc9205f +"neotraverse@npm:^0.6.15": + version: 0.6.18 + resolution: "neotraverse@npm:0.6.18" + checksum: 46f4c53cbbdc53671150916b544a9f46e27781f8003985237507542190173bec131168d89b846535f9c34c0a2a7debb1ab3a4f7a93d08218e2c194a363708ffa languageName: node linkType: hard -"nise@npm:^1.5.2": - version: 1.5.3 - resolution: "nise@npm:1.5.3" - dependencies: - "@sinonjs/formatio": ^3.2.1 - "@sinonjs/text-encoding": ^0.7.1 - just-extend: ^4.0.2 - lolex: ^5.0.1 - path-to-regexp: ^1.7.0 - checksum: c142f35719f2d1e173d1bb041aeeaff42045ba665dc2e41393c3a9c102829ad3c555ec4271b41c66bf2ed8d2fbd56dbd29fbd5a3467ac743d46966161898357c +"netmask@npm:^2.0.2": + version: 2.0.2 + resolution: "netmask@npm:2.0.2" + checksum: cafd28388e698e1138ace947929f842944d0f1c0b87d3fa2601a61b38dc89397d33c0ce2c8e7b99e968584b91d15f6810b91bef3f3826adf71b1833b61d4bf4f languageName: node linkType: hard -"nise@npm:^5.1.1": - version: 5.1.1 - resolution: "nise@npm:5.1.1" +"nise@npm:^6.0.0": + version: 6.1.1 + resolution: "nise@npm:6.1.1" dependencies: - "@sinonjs/commons": ^1.8.3 - "@sinonjs/fake-timers": ">=5" - "@sinonjs/text-encoding": ^0.7.1 - just-extend: ^4.0.2 - path-to-regexp: ^1.7.0 - checksum: 06695980f590bc626974f758f5faa02f29daf432e7f2b2720591890b007e2542e6e5d46755be4a5941ba4fa91a5bfdaca8f28fe1e0409d0463678d194389214d + "@sinonjs/commons": ^3.0.1 + "@sinonjs/fake-timers": ^13.0.1 + "@sinonjs/text-encoding": ^0.7.3 + just-extend: ^6.2.0 + path-to-regexp: ^8.1.0 + checksum: 09471adb738dc3be2981cc7815c90879ed6a5a3e162202ca66e12f9a5a0956bea718d0ec2f0c07acc26e3f958481b8fb30c30da76c13620e922f3b9dcd249c50 languageName: node linkType: hard @@ -22972,27 +23290,14 @@ __metadata: languageName: node linkType: hard -"nock@npm:^12.0.3": - version: 12.0.3 - resolution: "nock@npm:12.0.3" - dependencies: - debug: ^4.1.0 - json-stringify-safe: ^5.0.1 - lodash: ^4.17.13 - propagate: ^2.0.0 - checksum: a0a76707762daac50a442d82fd96faac9e80fbd48a5a8fc491d405903d6ae5fc755d5ccbd27d2d7997e69ad409699c9e1a172aedf527c94a4278d855a6fe730b - languageName: node - linkType: hard - -"nock@npm:^13.0.11": - version: 13.2.1 - resolution: "nock@npm:13.2.1" +"nock@npm:^13.5.0": + version: 13.5.0 + resolution: "nock@npm:13.5.0" dependencies: debug: ^4.1.0 json-stringify-safe: ^5.0.1 - lodash.set: ^4.3.2 propagate: ^2.0.0 - checksum: e6be01052fccc619274a85485ada84b225ed483846b040d0d85fd4f41d753218f363e9be08aae051d12ea2759ffdd6b8803f3346a23b50b0cb05d73410033b13 + checksum: ba98390042a61b8687da9174fa07282d14f8b0cb5ac50c310eba9bb70a0beb5ea8257ba1f2a3e324db5570111689485a1f16746c2527f3050357e6917666bdef languageName: node linkType: hard @@ -23014,13 +23319,6 @@ __metadata: languageName: node linkType: hard -"node-domexception@npm:1.0.0": - version: 1.0.0 - resolution: "node-domexception@npm:1.0.0" - checksum: 5e5d63cda29856402df9472335af4bb13875e1927ad3be861dc5ebde38917aecbf9ae337923777af52a48c426b70148815e890a5d72760f1b4d758cc671b1a2b - languageName: node - linkType: hard - "node-emoji@npm:^1.10.0": version: 1.11.0 resolution: "node-emoji@npm:1.11.0" @@ -23030,7 +23328,7 @@ __metadata: languageName: node linkType: hard -"node-fetch@npm:2.6.7, node-fetch@npm:^2.1.2, node-fetch@npm:^2.6.1, node-fetch@npm:^2.6.5, node-fetch@npm:^2.6.6, node-fetch@npm:^2.6.7": +"node-fetch@npm:2.6.7, node-fetch@npm:^2.6.1, node-fetch@npm:^2.6.6, node-fetch@npm:^2.6.7": version: 2.6.7 resolution: "node-fetch@npm:2.6.7" dependencies: @@ -23089,30 +23387,20 @@ __metadata: languageName: node linkType: hard -"node-localstorage@npm:~1.3.0": - version: 1.3.1 - resolution: "node-localstorage@npm:1.3.1" - dependencies: - write-file-atomic: ^1.1.4 - checksum: 78eb29d4fa36bd7fc1f48a6e197201beb46d75532ad5ba11932f29fd60ed7e0d83018977a31e0bea44ef49d3c8448f5ddf0eb7566fcc5f6321b29d45f36663a6 - languageName: node - linkType: hard - -node-pty@beta: - version: 0.11.0-beta19 - resolution: "node-pty@npm:0.11.0-beta19" +"node-pty@npm:^1.0.0": + version: 1.0.0 + resolution: "node-pty@npm:1.0.0" dependencies: - nan: ^2.14.0 - peerDependencies: - node-gyp: ^8.3.0 - checksum: e6e50fa854a404b9e0ef9b621df7c30b5b6f92defed6692b7a63955bd2de7910a5d9f3b2024ed30cdcac5b276deea9bf0826542d0197d0e372dbe399c2b4571b + nan: ^2.17.0 + node-gyp: latest + checksum: c308686826eb2f7616735f4c71e6e41ff630346b14319972dbdf9711640bc6975ce21eab66a47b7ce9a88c70308fe81bfd9840127388d5fa26c52afbad255871 languageName: node linkType: hard -"node-releases@npm:^2.0.6": - version: 2.0.6 - resolution: "node-releases@npm:2.0.6" - checksum: 25b08960cdf6a85075baf312f7cdcb4f9190c87abf42649ac441448a02486df3798363896bf2f0f9c6a1c7e26b3ca298c8a9295f7dd5e5eff6b6a78574a88350 +"node-releases@npm:^2.0.18": + version: 2.0.18 + resolution: "node-releases@npm:2.0.18" + checksum: 786ac9db9d7226339e1dc84bbb42007cb054a346bd9257e6aa154d294f01bc6a6cddb1348fa099f079be6580acbb470e3c048effd5f719325abd0179e566fd27 languageName: node linkType: hard @@ -23207,15 +23495,6 @@ node-pty@beta: languageName: node linkType: hard -"normalize-path@npm:^2.1.1": - version: 2.1.1 - resolution: "normalize-path@npm:2.1.1" - dependencies: - remove-trailing-separator: ^1.0.1 - checksum: db814326ff88057437233361b4c7e9cac7b54815b051b57f2d341ce89b1d8ec8cbd43e7fa95d7652b3b69ea8fcc294b89b8530d556a84d1bdace94229e1e9a8b - languageName: node - linkType: hard - "normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0": version: 3.0.0 resolution: "normalize-path@npm:3.0.0" @@ -23482,15 +23761,6 @@ node-pty@beta: languageName: node linkType: hard -"npm-run-path@npm:^2.0.0": - version: 2.0.2 - resolution: "npm-run-path@npm:2.0.2" - dependencies: - path-key: ^2.0.0 - checksum: 95549a477886f48346568c97b08c4fda9cdbf7ce8a4fbc2213f36896d0d19249e32d68d7451bdcbca8041b5fba04a6b2c4a618beaf19849505c05b700740f1de - languageName: node - linkType: hard - "npm-run-path@npm:^4.0.1": version: 4.0.1 resolution: "npm-run-path@npm:4.0.1" @@ -23649,10 +23919,10 @@ node-pty@beta: languageName: node linkType: hard -"object-inspect@npm:^1.12.0, object-inspect@npm:^1.9.0": - version: 1.12.2 - resolution: "object-inspect@npm:1.12.2" - checksum: e1bd625f4c44a2f733bd69cfccce6469f71333fb09c6de151f4f346c16d658ef7555727b12652c108e20c2afb908ae7cd165f52ca53745a1d6cbf228cdb46ebe +"object-inspect@npm:^1.13.1": + version: 1.13.2 + resolution: "object-inspect@npm:1.13.2" + checksum: b97835b4c91ec37b5fd71add84f21c3f1047d1d155d00c0fcd6699516c256d4fcc6ff17a1aced873197fe447f91a3964178fd2a67a1ee2120cdaf60e81a050b4 languageName: node linkType: hard @@ -23674,15 +23944,15 @@ node-pty@beta: languageName: node linkType: hard -"object.assign@npm:^4.1.0, object.assign@npm:^4.1.2": - version: 4.1.2 - resolution: "object.assign@npm:4.1.2" +"object.assign@npm:^4.1.0, object.assign@npm:^4.1.2, object.assign@npm:^4.1.5": + version: 4.1.5 + resolution: "object.assign@npm:4.1.5" dependencies: - call-bind: ^1.0.0 - define-properties: ^1.1.3 - has-symbols: ^1.0.1 + call-bind: ^1.0.5 + define-properties: ^1.2.1 + has-symbols: ^1.0.3 object-keys: ^1.1.1 - checksum: ee0e796fad8952f05644d11632f046dc4b424f9a41d3816e11a612163b12a873c800456be9acdaec6221b72590ab5267e5fe4bf4cf1c67f88b05f82f133ac829 + checksum: 60108e1fa2706f22554a4648299b0955236c62b3685c52abf4988d14fffb0e7731e00aa8c6448397e3eb63d087dcc124a9f21e1980f36d0b2667f3c18bacd469 languageName: node linkType: hard @@ -23754,12 +24024,12 @@ node-pty@beta: languageName: node linkType: hard -"on-finished@npm:~2.3.0": - version: 2.3.0 - resolution: "on-finished@npm:2.3.0" +"on-finished@npm:2.4.1": + version: 2.4.1 + resolution: "on-finished@npm:2.4.1" dependencies: ee-first: 1.1.1 - checksum: c904f9e518b11941eb60279a3cbfaf1289bd0001f600a950255b1dede9fe3df8cd74f38483550b3bb9485165166acb5db500c3b4c4337aec2815c88c96fcc2ea + checksum: 46fb11b9063782f2d9968863d9cbba33d77aa13c17f895f56129c274318b86500b22af3a160fe9995aa41317efcd22941b6eba747f718ced08d9a73afdb087b4 languageName: node linkType: hard @@ -23817,23 +24087,12 @@ node-pty@beta: languageName: node linkType: hard -"opencollective-postinstall@npm:^2.0.2": - version: 2.0.3 - resolution: "opencollective-postinstall@npm:2.0.3" - bin: - opencollective-postinstall: index.js - checksum: 8a0104a218bc1afaae943f0af378461eeb2836f9848bad872bbd067ec5d1d9791636f307454ab77d0746f10341366f295384656a340ebdb87a2585058e8567e5 - languageName: node - linkType: hard - -"openpgp@npm:^4.10.10": - version: 4.10.10 - resolution: "openpgp@npm:4.10.10" +"openpgp@npm:^5.10.2": + version: 5.10.2 + resolution: "openpgp@npm:5.10.2" dependencies: asn1.js: ^5.0.0 - node-fetch: ^2.1.2 - node-localstorage: ~1.3.0 - checksum: abec215d19bc2d6c7a4a7fbf970f8003c495338d948ef3a6abd36bab5a5036a7217e2ea89d899c313e70a7c54ae819f1550c6ae657095d334e8acaec743578bf + checksum: 2978a8f3b39c74da92aea268def44a75e9e41665157f6a60bd753d5c0d44d2ea659ae17c6095be6d3d1485fd556d65a31403ef63cf24451fc113794e7f2e74a9 languageName: node linkType: hard @@ -23935,15 +24194,6 @@ node-pty@beta: languageName: node linkType: hard -"p-limit@npm:3.1.0, p-limit@npm:^3.0.2, p-limit@npm:^3.1.0": - version: 3.1.0 - resolution: "p-limit@npm:3.1.0" - dependencies: - yocto-queue: ^0.1.0 - checksum: 9db675949dbdc9c3763c89e748d0ef8bdad0afbb24d49ceaf4c46c02c77d30db4e0652ed36d0a0a7a95154335fab810d95c86153105bb73b3a90448e2bb14e1a - languageName: node - linkType: hard - "p-limit@npm:^1.1.0": version: 1.3.0 resolution: "p-limit@npm:1.3.0" @@ -23962,6 +24212,15 @@ node-pty@beta: languageName: node linkType: hard +"p-limit@npm:^3.0.2, p-limit@npm:^3.1.0": + version: 3.1.0 + resolution: "p-limit@npm:3.1.0" + dependencies: + yocto-queue: ^0.1.0 + checksum: 9db675949dbdc9c3763c89e748d0ef8bdad0afbb24d49ceaf4c46c02c77d30db4e0652ed36d0a0a7a95154335fab810d95c86153105bb73b3a90448e2bb14e1a + languageName: node + linkType: hard + "p-locate@npm:^2.0.0": version: 2.0.0 resolution: "p-locate@npm:2.0.0" @@ -24080,31 +24339,37 @@ node-pty@beta: languageName: node linkType: hard -"pac-proxy-agent@npm:^5.0.0": - version: 5.0.0 - resolution: "pac-proxy-agent@npm:5.0.0" +"pac-proxy-agent@npm:^7.0.0": + version: 7.0.0 + resolution: "pac-proxy-agent@npm:7.0.0" dependencies: - "@tootallnate/once": 1 - agent-base: 6 - debug: 4 - get-uri: 3 - http-proxy-agent: ^4.0.1 - https-proxy-agent: 5 - pac-resolver: ^5.0.0 - raw-body: ^2.2.0 - socks-proxy-agent: 5 - checksum: 993ea53f78af6233720bfa1ab82b748dad5eba514f45a6eb2128ee71b4417835e591823c9c4895327d2390c6bccb2924e849308a40d456ce15f88e3b3db073bf + "@tootallnate/quickjs-emscripten": ^0.23.0 + agent-base: ^7.0.2 + debug: ^4.3.4 + get-uri: ^6.0.1 + http-proxy-agent: ^7.0.0 + https-proxy-agent: ^7.0.0 + pac-resolver: ^7.0.0 + socks-proxy-agent: ^8.0.1 + checksum: de7f26fbf970a7a8050df2331ebd3fef42a84a63c7c907c7f2601863737fc8dc1b7de616a5c9401b462966bfb1a94ca49efb75ec7cae0cbdc6bcb3d77aa9e8a6 languageName: node linkType: hard -"pac-resolver@npm:^5.0.0": - version: 5.0.0 - resolution: "pac-resolver@npm:5.0.0" +"pac-resolver@npm:^7.0.0": + version: 7.0.0 + resolution: "pac-resolver@npm:7.0.0" dependencies: - degenerator: ^3.0.1 - ip: ^1.1.5 - netmask: ^2.0.1 - checksum: 5b24c8f620fd1ac805b316063f4b355c6e8f092118f901756b04aef219545d98aab4abbc74fcf06a79298757968b646a2410c6ad45ad0e78280faa55e31c22e2 + degenerator: ^5.0.0 + ip: ^1.1.8 + netmask: ^2.0.2 + checksum: a5ac1bf1f33f667a1c85fd61744672d9364534a1bb68a676ef920091b735ed8a10fc2b57385909e34822a2147b10a898dd79139b07dae0dbd568561d5c40a81b + languageName: node + linkType: hard + +"package-json-from-dist@npm:^1.0.0": + version: 1.0.1 + resolution: "package-json-from-dist@npm:1.0.1" + checksum: 62ba2785eb655fec084a257af34dbe24292ab74516d6aecef97ef72d4897310bc6898f6c85b5cd22770eaa1ce60d55a0230e150fb6a966e3ecd6c511e23d164b languageName: node linkType: hard @@ -24132,6 +24397,13 @@ node-pty@beta: languageName: node linkType: hard +"packet-reader@npm:1.0.0": + version: 1.0.0 + resolution: "packet-reader@npm:1.0.0" + checksum: c86c3321bb07e0f03cc2db59f7701184e0bbfcb914f1fdc963993b03262486deb402292adcef39b64e3530ea66b3b2e2163d6da7b3792a730bdd1c6df3175aaa + languageName: node + linkType: hard + "pacote@npm:13.6.2, pacote@npm:^13.6.1": version: 13.6.2 resolution: "pacote@npm:13.6.2" @@ -24191,10 +24463,10 @@ node-pty@beta: languageName: node linkType: hard -"paho-mqtt@npm:^1.1.0": - version: 1.1.0 - resolution: "paho-mqtt@npm:1.1.0" - checksum: 499a130b8daf3712a91efad4ce3856a067571de7b5dd2c13d872ab209558903332ba961198dab458d09fc3a64e8a7bc9d374f929e4cffa0b23bbce944d4cb1d8 +"pako@npm:2.0.4": + version: 2.0.4 + resolution: "pako@npm:2.0.4" + checksum: ed174cb1102c461d6ade055757b4ae4151a4b6f1a351461dc1309eca6abfdaa3a45496c49eab7018211a2ec0b2cefa7afa0ffd277ee21fe50d7f97266c7c303f languageName: node linkType: hard @@ -24224,7 +24496,7 @@ node-pty@beta: languageName: node linkType: hard -"parse-asn1@npm:^5.0.0, parse-asn1@npm:^5.1.5": +"parse-asn1@npm:^5.0.0, parse-asn1@npm:^5.1.6": version: 5.1.6 resolution: "parse-asn1@npm:5.1.6" dependencies: @@ -24356,13 +24628,6 @@ node-pty@beta: languageName: node linkType: hard -"path-key@npm:^2.0.0, path-key@npm:^2.0.1": - version: 2.0.1 - resolution: "path-key@npm:2.0.1" - checksum: dd2044f029a8e58ac31d2bf34c34b93c3095c1481942960e84dd2faa95bbb71b9b762a106aead0646695330936414b31ca0bd862bf488a937ad17c8c5d73b32b - languageName: node - linkType: hard - "path-key@npm:^3.0.0, path-key@npm:^3.1.0": version: 3.1.1 resolution: "path-key@npm:3.1.1" @@ -24393,29 +24658,27 @@ node-pty@beta: languageName: node linkType: hard -"path-scurry@npm:^1.6.1, path-scurry@npm:^1.7.0": - version: 1.7.0 - resolution: "path-scurry@npm:1.7.0" +"path-scurry@npm:^1.11.1, path-scurry@npm:^1.6.1": + version: 1.11.1 + resolution: "path-scurry@npm:1.11.1" dependencies: - lru-cache: ^9.0.0 - minipass: ^5.0.0 - checksum: a8d1fd105b5b1bb0b86c73e3e1433d8227b8075c4868453529611ed8b0ba768d1195c54690c1de125277c4e8f09c7459b0e98f99fbd357c9b34dd566cbe6b55b + lru-cache: ^10.2.0 + minipass: ^5.0.0 || ^6.0.2 || ^7.0.0 + checksum: 32a13711a2a505616ae1cc1b5076801e453e7aae6ac40ab55b388bb91b9d0547a52f5aaceff710ea400205f18691120d4431e520afbe4266b836fadede15872d languageName: node linkType: hard -"path-to-regexp@npm:0.1.7": - version: 0.1.7 - resolution: "path-to-regexp@npm:0.1.7" - checksum: 50a1ddb1af41a9e68bd67ca8e331a705899d16fb720a1ea3a41e310480948387daf603abb14d7b0826c58f10146d49050a1291ba6a82b78a382d1c02c0b8f905 +"path-to-regexp@npm:0.1.12": + version: 0.1.12 + resolution: "path-to-regexp@npm:0.1.12" + checksum: 1c6ff10ca169b773f3bba943bbc6a07182e332464704572962d277b900aeee81ac6aa5d060ff9e01149636c30b1f63af6e69dd7786ba6e0ddb39d4dee1f0645b languageName: node linkType: hard -"path-to-regexp@npm:^1.7.0": - version: 1.8.0 - resolution: "path-to-regexp@npm:1.8.0" - dependencies: - isarray: 0.0.1 - checksum: 7b25d6f27a8de03f49406d16195450f5ced694398adea1510b0f949d9660600d1769c5c6c83668583b7e6b503f3caf1ede8ffc08135dbe3e982f034f356fbb5c +"path-to-regexp@npm:^8.1.0": + version: 8.2.0 + resolution: "path-to-regexp@npm:8.2.0" + checksum: ef7d0a887b603c0a142fad16ccebdcdc42910f0b14830517c724466ad676107476bba2fe9fffd28fd4c141391ccd42ea426f32bb44c2c82ecaefe10c37b90f5a languageName: node linkType: hard @@ -24473,6 +24736,13 @@ node-pty@beta: languageName: node linkType: hard +"pg-cloudflare@npm:^1.1.1": + version: 1.1.1 + resolution: "pg-cloudflare@npm:1.1.1" + checksum: a68b957f755be6af813d68ccaf4c906a000fd2ecb362cd281220052cc9e2f6c26da3b88792742387008c30b3bf0d2fa3a0eff04aeb8af4414023c99ae78e07bd + languageName: node + linkType: hard + "pg-connection-string@npm:2.5.0": version: 2.5.0 resolution: "pg-connection-string@npm:2.5.0" @@ -24480,17 +24750,86 @@ node-pty@beta: languageName: node linkType: hard -"picocolors@npm:^0.2.1": - version: 0.2.1 - resolution: "picocolors@npm:0.2.1" - checksum: 98a83c77912c80aea0fc518aec184768501bfceafa490714b0f43eda9c52e372b844ce0a591e822bbfe5df16dcf366be7cbdb9534d39cf54a80796340371ee17 +"pg-connection-string@npm:^2.6.2": + version: 2.6.2 + resolution: "pg-connection-string@npm:2.6.2" + checksum: e8fdea74fcc8bdc3d7c5c6eadd9425fdba7e67fb7fe836f9c0cecad94c8984e435256657d1d8ce0483d1fedef667e7a57e32449a63cb805cb0289fc34b62da35 languageName: node linkType: hard -"picocolors@npm:^1.0.0": - version: 1.0.0 - resolution: "picocolors@npm:1.0.0" - checksum: 20a5b249e331c14479d94ec6817a182fd7a5680debae82705747b2db7ec50009a5f6648d0621c561b0572703f84dbef0858abcbd5856d3c5511426afcb1961f7 +"pg-int8@npm:1.0.1": + version: 1.0.1 + resolution: "pg-int8@npm:1.0.1" + checksum: be6a02d851fc2a4ae3e9de81710d861de3ba35ac927268973eb3cb618873a05b9424656df464dd43bd7dc3fc5295c3f5b3c8349494f87c7af50ec59ef14e0b98 + languageName: node + linkType: hard + +"pg-pool@npm:^3.6.1": + version: 3.6.1 + resolution: "pg-pool@npm:3.6.1" + peerDependencies: + pg: ">=8.0" + checksum: 47837c4e4c2b9e195cec01bd58b6e276acc915537191707ad4d6ed975fd9bc03c73f63cb7fde4cb0e08ed059e35faf60fbd03744dee3af71d4b4631ab40eeb7f + languageName: node + linkType: hard + +"pg-protocol@npm:^1.6.0": + version: 1.6.0 + resolution: "pg-protocol@npm:1.6.0" + checksum: 318a4d1e9cebd3927b10a8bc412f5017117a1f9a5fafb628d75847da7d1ab81c33250de58596bd0990029e14e92a995a851286d60fc236692299faf509572213 + languageName: node + linkType: hard + +"pg-types@npm:^2.1.0": + version: 2.2.0 + resolution: "pg-types@npm:2.2.0" + dependencies: + pg-int8: 1.0.1 + postgres-array: ~2.0.0 + postgres-bytea: ~1.0.0 + postgres-date: ~1.0.4 + postgres-interval: ^1.1.0 + checksum: ab3f8069a323f601cd2d2279ca8c425447dab3f9b61d933b0601d7ffc00d6200df25e26a4290b2b0783b59278198f7dd2ed03e94c4875797919605116a577c65 + languageName: node + linkType: hard + +"pg@npm:~8.11.3": + version: 8.11.3 + resolution: "pg@npm:8.11.3" + dependencies: + buffer-writer: 2.0.0 + packet-reader: 1.0.0 + pg-cloudflare: ^1.1.1 + pg-connection-string: ^2.6.2 + pg-pool: ^3.6.1 + pg-protocol: ^1.6.0 + pg-types: ^2.1.0 + pgpass: 1.x + peerDependencies: + pg-native: ">=3.0.1" + dependenciesMeta: + pg-cloudflare: + optional: true + peerDependenciesMeta: + pg-native: + optional: true + checksum: 07e6967fc8bd5d72bab9be6620626e8e3ab59128ebf56bf0de83d67f10801a19221d88b3317e90b93339ba48d0498b39967b782ae39686aabda6bc647bceb438 + languageName: node + linkType: hard + +"pgpass@npm:1.x": + version: 1.0.5 + resolution: "pgpass@npm:1.0.5" + dependencies: + split2: ^4.1.0 + checksum: 5ea6c9b2de04c33abb08d33a2dded303c4a3c7162a9264519cbe85c0a9857d712463140ba42fad0c7cd4b21f644dd870b45bb2e02fcbe505b4de0744fd802c1d + languageName: node + linkType: hard + +"picocolors@npm:^1.0.0, picocolors@npm:^1.0.1": + version: 1.0.1 + resolution: "picocolors@npm:1.0.1" + checksum: c63cdad2bf812ef0d66c8db29583802355d4ca67b9285d846f390cc15c2f6ccb94e8cb7eb6a6e97fc5990a6d3ad4ae42d86c84d3146e667c739a4234ed50d400 languageName: node linkType: hard @@ -24545,9 +24884,9 @@ node-pty@beta: languageName: node linkType: hard -"pkg-fetch@https://github.com/aws-amplify/pkg-fetch#ad4a21feb533d338bf951e7ba28cea7256aedeff": - version: 3.4.2 - resolution: "pkg-fetch@https://github.com/aws-amplify/pkg-fetch.git#commit=ad4a21feb533d338bf951e7ba28cea7256aedeff" +"pkg-fetch@npm:^3.5.2": + version: 3.5.2 + resolution: "pkg-fetch@npm:3.5.2" dependencies: chalk: ^4.1.2 fs-extra: ^9.1.0 @@ -24559,7 +24898,7 @@ node-pty@beta: yargs: ^16.2.0 bin: pkg-fetch: lib-es5/bin.js - checksum: 24e2b385b6510538b4253aba62f243f7a1783fa544970c0712bcc3dd3c10159f7eab741f8dfaf409afed5ed8e0c334ea2c046ffbd11b93901c41847142a34b5e + checksum: 8105cf28178e0b325417a9dee6ec0f0f124ba7fe3608d8ad86628ef2f2a12d1490550a007d5be42e34f0c8573dcb9655737b4d07a177ce4ee278e762ccb42b9e languageName: node linkType: hard @@ -24601,15 +24940,6 @@ node-pty@beta: languageName: node linkType: hard -"please-upgrade-node@npm:^3.2.0": - version: 3.2.0 - resolution: "please-upgrade-node@npm:3.2.0" - dependencies: - semver-compare: ^1.0.0 - checksum: 222514d2841022be4b843f38d415beadcc6409c0545d6d153778d71c601bba7bbf1cd5827d650c7fae6a9a2ba7cf00f4b6729b40d015a3a5ba2937e57bc1c435 - languageName: node - linkType: hard - "plist@npm:^3.0.5": version: 3.0.5 resolution: "plist@npm:3.0.5" @@ -24627,14 +24957,10 @@ node-pty@beta: languageName: node linkType: hard -"portfinder@npm:^1.0.28": - version: 1.0.28 - resolution: "portfinder@npm:1.0.28" - dependencies: - async: ^2.6.2 - debug: ^3.1.1 - mkdirp: ^0.5.5 - checksum: fefd3d65a6464b498e0e9b4a4b82f29489441bb1892a3350403cfdf6e591e583d9e75bac1c6ae8ca2cdf1a942ae18890831a0a855bb1bb977678acdf9e5a560f +"possible-typed-array-names@npm:^1.0.0": + version: 1.0.0 + resolution: "possible-typed-array-names@npm:1.0.0" + checksum: d9aa22d31f4f7680e20269db76791b41c3a32c01a373e25f8a4813b4d45f7456bfc2b6d68f752dc4aab0e0bb0721cb3d76fb678c9101cb7a16316664bc2c73fd languageName: node linkType: hard @@ -24659,15 +24985,15 @@ node-pty@beta: languageName: node linkType: hard -"postcss-calc@npm:^8.2.3": - version: 8.2.4 - resolution: "postcss-calc@npm:8.2.4" +"postcss-calc@npm:^9.0.0": + version: 9.0.1 + resolution: "postcss-calc@npm:9.0.1" dependencies: - postcss-selector-parser: ^6.0.9 + postcss-selector-parser: ^6.0.11 postcss-value-parser: ^4.2.0 peerDependencies: postcss: ^8.2.2 - checksum: 8518a429488c3283ff1560c83a511f6f772329bc61d88875eb7c83e13a8683b7ccbdccaa9946024cf1553da3eacd2f40fcbcebf1095f7fdeb432bf86bc6ba6ba + checksum: e0df07337162dbcaac5d6e030c7fd289e21da8766a9daca5d6b2b3c8094bb524ae5d74c70048ea7fe5fe4960ce048c60ac97922d917c3bbff34f58e9d2b0eb0e languageName: node linkType: hard @@ -24715,28 +25041,29 @@ node-pty@beta: languageName: node linkType: hard -"postcss-colormin@npm:^5.3.0": - version: 5.3.0 - resolution: "postcss-colormin@npm:5.3.0" +"postcss-colormin@npm:^6.0.0": + version: 6.0.0 + resolution: "postcss-colormin@npm:6.0.0" dependencies: - browserslist: ^4.16.6 + browserslist: ^4.21.4 caniuse-api: ^3.0.0 colord: ^2.9.1 postcss-value-parser: ^4.2.0 peerDependencies: postcss: ^8.2.15 - checksum: ac03b47b1d76f46fa3621d9b066217e92105869af6e57245b85b304d1e866ded2818c8dc92891b84e9099f4f31f3555a5344d000beedcb2aa766faf0d52844b6 + checksum: b05763b68f7f23333f408734f13be4bde641934ecbde25ac7d7fa648ab5e826716bffac0193067b317e861c6dabad81db9c012e865a83f81b6bce5c7e25c0fdd languageName: node linkType: hard -"postcss-convert-values@npm:^5.1.0": - version: 5.1.0 - resolution: "postcss-convert-values@npm:5.1.0" +"postcss-convert-values@npm:^6.0.0": + version: 6.0.0 + resolution: "postcss-convert-values@npm:6.0.0" dependencies: + browserslist: ^4.21.4 postcss-value-parser: ^4.2.0 peerDependencies: postcss: ^8.2.15 - checksum: 1934ff229accd5587413bc75ff6692238042b927d538b5d1923849908847b81aff1d7b92b38af82bcae538bc8e1c5cf2fb6ad6d44913f08260c52bbe97de62a0 + checksum: 8c20d31a39e0ddf7db4fde0da62e293279b5ee84c36919f2e5760650fa6f2984f1a40bfdbe8d1f7829bd37b17e5e589535f0aaaf71d4df29ad203cef830b9d7a languageName: node linkType: hard @@ -24782,39 +25109,39 @@ node-pty@beta: languageName: node linkType: hard -"postcss-discard-comments@npm:^5.1.1": - version: 5.1.1 - resolution: "postcss-discard-comments@npm:5.1.1" +"postcss-discard-comments@npm:^6.0.0": + version: 6.0.0 + resolution: "postcss-discard-comments@npm:6.0.0" peerDependencies: postcss: ^8.2.15 - checksum: c99b2cbfbe84d22d99887eecbc0c16f48f610f9d76b21e5d96b97c4361ffdd61429398042aa0df0af88eb5732dd2a6170750ba9644d6731f038ebe3427576488 + checksum: c8792cd99c7696b21917d55937e02fb854a82ee308edf7564f18ad19bec4abf4756ba234e17f7d129d6b0dbaf6253bcddc435b1aeee190d4d26dcc2448f5453a languageName: node linkType: hard -"postcss-discard-duplicates@npm:^5.1.0": - version: 5.1.0 - resolution: "postcss-discard-duplicates@npm:5.1.0" +"postcss-discard-duplicates@npm:^6.0.0": + version: 6.0.0 + resolution: "postcss-discard-duplicates@npm:6.0.0" peerDependencies: postcss: ^8.2.15 - checksum: 3d3a49536c56097c06b4f085412e0cda0854fac1c559563ccb922d9fab6305ff13058cd6fee422aa66c1d7e466add4e7672d7ae2ff551a4af6f1a8d2142d471f + checksum: 5fb0de3b187b09538a8c10f25bcc3e7b0865337a96a0599f8213864f0d52812f6c90142d170258293a30484b95e096dee28fc8fddb302016f93d4a8d269bb18f languageName: node linkType: hard -"postcss-discard-empty@npm:^5.1.1": - version: 5.1.1 - resolution: "postcss-discard-empty@npm:5.1.1" +"postcss-discard-empty@npm:^6.0.0": + version: 6.0.0 + resolution: "postcss-discard-empty@npm:6.0.0" peerDependencies: postcss: ^8.2.15 - checksum: 36c8b2197af836dbd93168c72cde4edc1f10fe00e564824119da076d3764909745bb60e4ada04052322e26872d1bce6a37c56815f1c48c813a21adca1a41fbdc + checksum: 5dfe01f93ee2bb85e71f7832498bd051b772b9c724a5630f749237b07a14b47c2b2800b4215ab4cf0d8cba29552725b40334f3ef9d349f7aacf410ad351715dc languageName: node linkType: hard -"postcss-discard-overridden@npm:^5.1.0": - version: 5.1.0 - resolution: "postcss-discard-overridden@npm:5.1.0" +"postcss-discard-overridden@npm:^6.0.0": + version: 6.0.0 + resolution: "postcss-discard-overridden@npm:6.0.0" peerDependencies: postcss: ^8.2.15 - checksum: 7d3fc0b0d90599606fc083327a7c24390f90270a94a0119af4b74815d518948581579281f63b9bfa62e2644edf59bc9e725dc04ea5ba213f697804f3fb4dd8dc + checksum: 3a0c91241a95a887ef10227c761fb2c48870966bda5530de635002e485abc2743dfbfdc96e3b6a21f10c6231f0cfbe1a0eae0a01a89629d64a711eab3ee008c6 languageName: node linkType: hard @@ -24983,77 +25310,77 @@ node-pty@beta: languageName: node linkType: hard -"postcss-merge-longhand@npm:^5.1.4": - version: 5.1.4 - resolution: "postcss-merge-longhand@npm:5.1.4" +"postcss-merge-longhand@npm:^6.0.0": + version: 6.0.0 + resolution: "postcss-merge-longhand@npm:6.0.0" dependencies: postcss-value-parser: ^4.2.0 - stylehacks: ^5.1.0 + stylehacks: ^6.0.0 peerDependencies: postcss: ^8.2.15 - checksum: 895fc05108a947fb49dd0a90599d3902da93b7e6cfe1173f99ac88a79f02b61982e7a34af263088f866a6a38c15b7b34af389d8e22771ae47dab33a61d4242df + checksum: 0b67c590d301ab7f087ea7421e1eac0cccd2ff1c146a2dfa16d3f32b770d12a5999b8c6ea177efc443f4fb9df13b941c401365c634533878eef1982ad9d0bb98 languageName: node linkType: hard -"postcss-merge-rules@npm:^5.1.1": - version: 5.1.1 - resolution: "postcss-merge-rules@npm:5.1.1" +"postcss-merge-rules@npm:^6.0.1": + version: 6.0.1 + resolution: "postcss-merge-rules@npm:6.0.1" dependencies: - browserslist: ^4.16.6 + browserslist: ^4.21.4 caniuse-api: ^3.0.0 - cssnano-utils: ^3.1.0 + cssnano-utils: ^4.0.0 postcss-selector-parser: ^6.0.5 peerDependencies: postcss: ^8.2.15 - checksum: 76b98816653eeb4350e0ef7ac5184b1c5ef0cfa97ff337d83b08c5cf4806e98bbd417bbb80c5667fd9fb7472586bfd34aff716e524b5dcb3c881e689cd7f4309 + checksum: b6a2a196905cd170757aa7b8bc74dab1fc7e2b2ca6a19c6d355fb7c41ff736023b4176c1008a7049f6a1b24a94a30d066c4e51229c1282a941f7fd6056085af7 languageName: node linkType: hard -"postcss-minify-font-values@npm:^5.1.0": - version: 5.1.0 - resolution: "postcss-minify-font-values@npm:5.1.0" +"postcss-minify-font-values@npm:^6.0.0": + version: 6.0.0 + resolution: "postcss-minify-font-values@npm:6.0.0" dependencies: postcss-value-parser: ^4.2.0 peerDependencies: postcss: ^8.2.15 - checksum: 7aa4f93a853b657f79a8b28d0e924cafce3720086d9da02ce04b8b2f8de42e18ce32c8f7f1078390fb5ec82468e2d8e771614387cea3563f05fd9fa1798e1c59 + checksum: 6b74b1ec19bf76dcae7947c42145cb200b38767680512728f76168ae246db453798760e56111bd28ade9011d3655a79da4b33a93e5349f98fb0c1b22cc65ff36 languageName: node linkType: hard -"postcss-minify-gradients@npm:^5.1.1": - version: 5.1.1 - resolution: "postcss-minify-gradients@npm:5.1.1" +"postcss-minify-gradients@npm:^6.0.0": + version: 6.0.0 + resolution: "postcss-minify-gradients@npm:6.0.0" dependencies: colord: ^2.9.1 - cssnano-utils: ^3.1.0 + cssnano-utils: ^4.0.0 postcss-value-parser: ^4.2.0 peerDependencies: postcss: ^8.2.15 - checksum: bcb2802d7c8f0f76c7cff089884844f26c24b95f35c3ec951d7dec8c212495d1873d6ba62d6225ce264570e8e0668e271f9bc79bb6f5d2429c1f8933f4e3021d + checksum: 59046acd470bee151291ba99421846d776c4ed243acb05a005e74f64f92b968d712d35e727f5e4a90e632d6d6aeb3a01083469f50bfdf1fb9ecae7f4ae52d9b8 languageName: node linkType: hard -"postcss-minify-params@npm:^5.1.2": - version: 5.1.2 - resolution: "postcss-minify-params@npm:5.1.2" +"postcss-minify-params@npm:^6.0.0": + version: 6.0.0 + resolution: "postcss-minify-params@npm:6.0.0" dependencies: - browserslist: ^4.16.6 - cssnano-utils: ^3.1.0 + browserslist: ^4.21.4 + cssnano-utils: ^4.0.0 postcss-value-parser: ^4.2.0 peerDependencies: postcss: ^8.2.15 - checksum: 02e2ea49f36c14360a1fc53c606b7aa22dafb743233debe33013b4b8f3d25a2d48e13da40ba03b58afe5e58c5b96c6adf4cd1bfa12f14e1870e3345b64036836 + checksum: d4d1469b7ad7fe53900eb19c156ec6dcfeaf71641d29ba4df31f47d8fa8ac700df5b8d3e3768e66d695d5356ed348cea901314653046c8e48422962f165a1933 languageName: node linkType: hard -"postcss-minify-selectors@npm:^5.2.0": - version: 5.2.0 - resolution: "postcss-minify-selectors@npm:5.2.0" +"postcss-minify-selectors@npm:^6.0.0": + version: 6.0.0 + resolution: "postcss-minify-selectors@npm:6.0.0" dependencies: postcss-selector-parser: ^6.0.5 peerDependencies: postcss: ^8.2.15 - checksum: f684d8c461fd64fe33db87ef5cc810b3ac8e5e68f0e479b27ae2304624e2d2933e84d7def777d2179c562f5e7a7ecc0003d3284f7d89d2ee06b15b1539da6e6d + checksum: 1cdd3bd231cf25f54ab370d959f727dfcbe839a1d97bcfd65add9df73747a45d299a009ff16111bbe78943e8f81dcf5f84ae4106847b23dd3652de7aadc0b297 languageName: node linkType: hard @@ -25066,16 +25393,16 @@ node-pty@beta: languageName: node linkType: hard -"postcss-modules-local-by-default@npm:^4.0.0": - version: 4.0.0 - resolution: "postcss-modules-local-by-default@npm:4.0.0" +"postcss-modules-local-by-default@npm:^4.0.3": + version: 4.0.3 + resolution: "postcss-modules-local-by-default@npm:4.0.3" dependencies: icss-utils: ^5.0.0 postcss-selector-parser: ^6.0.2 postcss-value-parser: ^4.1.0 peerDependencies: postcss: ^8.1.0 - checksum: 8ee9c0d9918fd838854d434731371874b25c412dde135df981cc28d37d0660496389b0f8653dbcdbb6ee81f2bec90cb5b14668f6208f6f517400ac064e234c5a + checksum: be49b86efbfb921f42287e227584aac91af9826fc1083db04958ae283dfe215ca539421bfba71f9da0f0b10651f28e95a64b5faca7166f578a1933b8646051f7 languageName: node linkType: hard @@ -25123,102 +25450,101 @@ node-pty@beta: languageName: node linkType: hard -"postcss-normalize-charset@npm:^5.1.0": - version: 5.1.0 - resolution: "postcss-normalize-charset@npm:5.1.0" +"postcss-normalize-charset@npm:^6.0.0": + version: 6.0.0 + resolution: "postcss-normalize-charset@npm:6.0.0" peerDependencies: postcss: ^8.2.15 - checksum: aa481584d4db48e0dbf820f992fa235e6c41ff3d4701a62d349f33c1ad4c5c7dcdea3096db9ff2a5c9497e9bed2186d594ccdb1b42d57b30f58affba5829ad9c + checksum: 5232eac7f62097b1d349546182af2db7db34989867c147517cd407ab23c8450558a7f858eb8dac130959dae2d02d3460c5afa510e0ffe22221cb218f2bd79adb languageName: node linkType: hard -"postcss-normalize-display-values@npm:^5.1.0": - version: 5.1.0 - resolution: "postcss-normalize-display-values@npm:5.1.0" +"postcss-normalize-display-values@npm:^6.0.0": + version: 6.0.0 + resolution: "postcss-normalize-display-values@npm:6.0.0" dependencies: postcss-value-parser: ^4.2.0 peerDependencies: postcss: ^8.2.15 - checksum: 70b164fda885c097c02c98914fba4cd19b2382ff5f85f77e5315d88a1d477b4803f0f271d95a38e044e2a6c3b781c5c9bfb83222fc577199f2aeb0b8f4254e2f + checksum: 58163258a52610fa0d2b61bd6e872b9a2b25da1f2209cbf34fad3b62a4139fff9e0e6b298dcd1adfe6ac556098aad8b79c387280f3a949180f8fb12e6b41fecf languageName: node linkType: hard -"postcss-normalize-positions@npm:^5.1.0": - version: 5.1.0 - resolution: "postcss-normalize-positions@npm:5.1.0" +"postcss-normalize-positions@npm:^6.0.0": + version: 6.0.0 + resolution: "postcss-normalize-positions@npm:6.0.0" dependencies: postcss-value-parser: ^4.2.0 peerDependencies: postcss: ^8.2.15 - checksum: c17c28c3b6562672fe99058f138210e4c91145eec0f76bda3685fd46072710f3da7090588d6d6007e6ab40db1e7b402b54fe0ad664c53b50951e3015a347b141 + checksum: de2ced6cfdf2931d7cbc8f9c96bb12487119dba1b454c7ac01fd19f7afdaa9bf6c63f59624281293379ead5a3d5e883007a3f192f02c40ab41528ccc5a399f5c languageName: node linkType: hard -"postcss-normalize-repeat-style@npm:^5.1.0": - version: 5.1.0 - resolution: "postcss-normalize-repeat-style@npm:5.1.0" +"postcss-normalize-repeat-style@npm:^6.0.0": + version: 6.0.0 + resolution: "postcss-normalize-repeat-style@npm:6.0.0" dependencies: postcss-value-parser: ^4.2.0 peerDependencies: postcss: ^8.2.15 - checksum: 9cfb63dc6c382b7bf27b7032fe14ec92a84bba37a25d2b819f9bea734078381fe659213a3f676970365e51ba3f05fe40e39925463dbf3d2b92f1bc32f3aebe65 + checksum: 1643132094067709ca7d1fa2beededd28565c83bc8a6c2a4dec879a97e1d425ca1293a8832a45732eef12b52960f024330cfb654a8a222fb7ea768a75989c31e languageName: node linkType: hard -"postcss-normalize-string@npm:^5.1.0": - version: 5.1.0 - resolution: "postcss-normalize-string@npm:5.1.0" +"postcss-normalize-string@npm:^6.0.0": + version: 6.0.0 + resolution: "postcss-normalize-string@npm:6.0.0" dependencies: postcss-value-parser: ^4.2.0 peerDependencies: postcss: ^8.2.15 - checksum: a5e9979998f478d385ddff865bdd8a4870af69fa8c91c9398572a299ff39b39a6bda922a48fab0d2cddc639f30159c39baaed880ed7d13cd27cc64eaa9400b3b + checksum: d586ce274451229c6a3d625edef882b342ab7702babb632845c8c201c7bcc08481f282000d19d17edb7b5ef0b1982e715a16ab60990d124e937c4aef3304151e languageName: node linkType: hard -"postcss-normalize-timing-functions@npm:^5.1.0": - version: 5.1.0 - resolution: "postcss-normalize-timing-functions@npm:5.1.0" +"postcss-normalize-timing-functions@npm:^6.0.0": + version: 6.0.0 + resolution: "postcss-normalize-timing-functions@npm:6.0.0" dependencies: postcss-value-parser: ^4.2.0 peerDependencies: postcss: ^8.2.15 - checksum: afb34d8e313004ae8cd92910bf1a6eb9885f29ae803cd9032b6dfe7b67a9ad93f800976f10e55170b2b08fe9484825e9272629971186812c2764c73843268237 + checksum: a70742648cec15eea031096f2ad99c21c79228ce4c4ccc9f63c277c07e9e3add96298cc67b0b1797896507248153e0a662f85f490f53147ded7008b459dd5ba3 languageName: node linkType: hard -"postcss-normalize-unicode@npm:^5.1.0": - version: 5.1.0 - resolution: "postcss-normalize-unicode@npm:5.1.0" +"postcss-normalize-unicode@npm:^6.0.0": + version: 6.0.0 + resolution: "postcss-normalize-unicode@npm:6.0.0" dependencies: - browserslist: ^4.16.6 + browserslist: ^4.21.4 postcss-value-parser: ^4.2.0 peerDependencies: postcss: ^8.2.15 - checksum: 422d05542b186bb731ed220d10e435422998732ed0638cca3382052e876c6bec4809cdbd8854db7f2f6e7006bf9eda8349677d1691a0eb948fb60a1f2011f64e + checksum: cd9b06ed09c29ccc0b2cb222044d7ec49fb710fdd6f0878b26d7f3324478d8271a555ba3d82fc8d9fdcf8671a83c499cdfa09c0e73d4dee928adff4042ed8b22 languageName: node linkType: hard -"postcss-normalize-url@npm:^5.1.0": - version: 5.1.0 - resolution: "postcss-normalize-url@npm:5.1.0" +"postcss-normalize-url@npm:^6.0.0": + version: 6.0.0 + resolution: "postcss-normalize-url@npm:6.0.0" dependencies: - normalize-url: ^6.0.1 postcss-value-parser: ^4.2.0 peerDependencies: postcss: ^8.2.15 - checksum: a016cefd1ef80f74ef9dbed50593d3b533101e93aaadfc292896fddd8d6c3eb732a9fc5cb2e0d27f79c1f60f0fdfc40b045a494b514451e9610c6acf9392eb98 + checksum: 719a7feee4adf638cc0b4bc204d89485388ca81f0ad0a181a225122f488f956abd29f429d69e5a57fffe93fbd2a22eab7737bd8b55b19979efba26e008b2ec11 languageName: node linkType: hard -"postcss-normalize-whitespace@npm:^5.1.1": - version: 5.1.1 - resolution: "postcss-normalize-whitespace@npm:5.1.1" +"postcss-normalize-whitespace@npm:^6.0.0": + version: 6.0.0 + resolution: "postcss-normalize-whitespace@npm:6.0.0" dependencies: postcss-value-parser: ^4.2.0 peerDependencies: postcss: ^8.2.15 - checksum: d7b53dd90fe369bfb9838a40096db904a41f50dadfd04247ec07d7ab5588c3d4e70d1c7f930523bd061cb74e6683cef45c6e6c4eb57ea174ee3fc99f3de222d1 + checksum: 8421dd5813c1e555d7c2847dd8b71a5138ee2091341ebd1ea686d5b00cd46d249a29027e142289f873ca7f5fc995b51eb68f9693fec6d61cf951c759d109c37d languageName: node linkType: hard @@ -25243,15 +25569,15 @@ node-pty@beta: languageName: node linkType: hard -"postcss-ordered-values@npm:^5.1.1": - version: 5.1.1 - resolution: "postcss-ordered-values@npm:5.1.1" +"postcss-ordered-values@npm:^6.0.0": + version: 6.0.0 + resolution: "postcss-ordered-values@npm:6.0.0" dependencies: - cssnano-utils: ^3.1.0 + cssnano-utils: ^4.0.0 postcss-value-parser: ^4.2.0 peerDependencies: postcss: ^8.2.15 - checksum: e9101200fdc7c4489dfc6c948f3b309781da00fa6660ec38e2c0f930bf7475bde1a01913c4c616a8c2622d1f6bb6d2d8f8eacbcda49688bfab5012961816218d + checksum: b01352b0ea014e0037a5b8b3bd866696924bfb2cf3b47b73547786a1954e6771c04790fbe4c651bf029bafdbfde70f49e611f9ef309e945f753425841f343017 languageName: node linkType: hard @@ -25348,26 +25674,26 @@ node-pty@beta: languageName: node linkType: hard -"postcss-reduce-initial@npm:^5.1.0": - version: 5.1.0 - resolution: "postcss-reduce-initial@npm:5.1.0" +"postcss-reduce-initial@npm:^6.0.0": + version: 6.0.0 + resolution: "postcss-reduce-initial@npm:6.0.0" dependencies: - browserslist: ^4.16.6 + browserslist: ^4.21.4 caniuse-api: ^3.0.0 peerDependencies: postcss: ^8.2.15 - checksum: c97abb0747798eb924a621b9ccb27c34353570624c3bcd2444413e410f9e80123dd58644ccf30c4a14378693356f3923e5f4abaf090c3605a486e296a05ae66a + checksum: 7cf6340bde9f70c7d9b20bc3ee53e883bf27ed56fcc3bb2a2c736b311d977098a7c3a6b9e4be4d2c159d0042bf7742bb5af59628cd89cf838968dacc5ae15c80 languageName: node linkType: hard -"postcss-reduce-transforms@npm:^5.1.0": - version: 5.1.0 - resolution: "postcss-reduce-transforms@npm:5.1.0" +"postcss-reduce-transforms@npm:^6.0.0": + version: 6.0.0 + resolution: "postcss-reduce-transforms@npm:6.0.0" dependencies: postcss-value-parser: ^4.2.0 peerDependencies: postcss: ^8.2.15 - checksum: caefaeb78652ad8701b94e91500e38551255e4899fa298a7357519a36cbeebae088eab4535e00f17675a1230f448c4a7077045639d496da4614a46bc41df4add + checksum: 6da900d22dd8760b8a2ace32013036e3c4c4d9d560c31255eceea54563e3ddb2ca830bc9072fe2a1abacb8c48a008656887fc2f6ba1873e590342ad8e6bc269d languageName: node linkType: hard @@ -25391,36 +25717,36 @@ node-pty@beta: languageName: node linkType: hard -"postcss-selector-parser@npm:^6.0.10, postcss-selector-parser@npm:^6.0.2, postcss-selector-parser@npm:^6.0.4, postcss-selector-parser@npm:^6.0.5, postcss-selector-parser@npm:^6.0.6, postcss-selector-parser@npm:^6.0.9": - version: 6.0.10 - resolution: "postcss-selector-parser@npm:6.0.10" +"postcss-selector-parser@npm:^6.0.10, postcss-selector-parser@npm:^6.0.11, postcss-selector-parser@npm:^6.0.2, postcss-selector-parser@npm:^6.0.4, postcss-selector-parser@npm:^6.0.5, postcss-selector-parser@npm:^6.0.6, postcss-selector-parser@npm:^6.0.9": + version: 6.0.13 + resolution: "postcss-selector-parser@npm:6.0.13" dependencies: cssesc: ^3.0.0 util-deprecate: ^1.0.2 - checksum: a0b27c5e3f7604c8dc7cd83f145fdd7b21448e0d86072da99e0d78e536ba27aa9db2d42024c50aa530408ee517c4bdc0260529e1afb56608f9a82e839c207e82 + checksum: 51f099b27f7c7198ea1826470ef0adfa58b3bd3f59b390fda123baa0134880a5fa9720137b6009c4c1373357b144f700b0edac73335d0067422063129371444e languageName: node linkType: hard -"postcss-svgo@npm:^5.1.0": - version: 5.1.0 - resolution: "postcss-svgo@npm:5.1.0" +"postcss-svgo@npm:^6.0.0": + version: 6.0.0 + resolution: "postcss-svgo@npm:6.0.0" dependencies: postcss-value-parser: ^4.2.0 - svgo: ^2.7.0 + svgo: ^3.0.2 peerDependencies: postcss: ^8.2.15 - checksum: 309634a587e38fef244648bc9cd1817e12144868d24f1173d87b1edc14a4a7fca614962b2cb9d93f4801e11bd8d676083986ad40ebab4438cb84731ce1571994 + checksum: ec567cd5e982e3c0393695628bc508b87dcfe4e4b2049930e79e6c629c349fad19403f0d39d76ceda3e0f15ffd065304e76152f397fae2f3f848cdb847a0b564 languageName: node linkType: hard -"postcss-unique-selectors@npm:^5.1.1": - version: 5.1.1 - resolution: "postcss-unique-selectors@npm:5.1.1" +"postcss-unique-selectors@npm:^6.0.0": + version: 6.0.0 + resolution: "postcss-unique-selectors@npm:6.0.0" dependencies: postcss-selector-parser: ^6.0.5 peerDependencies: postcss: ^8.2.15 - checksum: 484f6409346d6244c134c5cdcd62f4f2751b269742f95222f13d8bac5fb224471ffe04e28a354670cbe0bdc2707778ead034fc1b801b473ffcbea5436807de30 + checksum: 63e81a7965ff8874fdf39ef0ae0f12cc21352548733538f52eda73f0ed5a7fab7fda9090facf50395d07873c5a6f02d31a6171fd476c80858b03090ec4c61d31 languageName: node linkType: hard @@ -25431,24 +25757,44 @@ node-pty@beta: languageName: node linkType: hard -"postcss@npm:^7.0.35": - version: 7.0.39 - resolution: "postcss@npm:7.0.39" +"postcss@npm:^8.2.14, postcss@npm:^8.4.12, postcss@npm:^8.4.21, postcss@npm:^8.4.24, postcss@npm:^8.4.31": + version: 8.4.31 + resolution: "postcss@npm:8.4.31" dependencies: - picocolors: ^0.2.1 - source-map: ^0.6.1 - checksum: fd27ee808c0d02407582cccfad4729033e2b439d56cd45534fb39aaad308bb35a290f3b7db5f2394980e8756f9381b458a625618550808c5ff01a125f51efc53 + nanoid: ^3.3.6 + picocolors: ^1.0.0 + source-map-js: ^1.0.2 + checksum: 748b82e6e5fc34034dcf2ae88ea3d11fd09f69b6c50ecdd3b4a875cfc7cdca435c958b211e2cb52355422ab6fccb7d8f2f2923161d7a1b281029e4a913d59acf + languageName: node + linkType: hard + +"postgres-array@npm:~2.0.0": + version: 2.0.0 + resolution: "postgres-array@npm:2.0.0" + checksum: cbd56207e4141d7fbf08c86f2aebf21fa7064943d3f808ec85f442ff94b48d891e7a144cc02665fb2de5dbcb9b8e3183a2ac749959e794b4a4cfd379d7a21d08 + languageName: node + linkType: hard + +"postgres-bytea@npm:~1.0.0": + version: 1.0.0 + resolution: "postgres-bytea@npm:1.0.0" + checksum: febf2364b8a8953695cac159eeb94542ead5886792a9627b97e33f6b5bb6e263bc0706ab47ec221516e79fbd6b2452d668841830fb3b49ec6c0fc29be61892ce + languageName: node + linkType: hard + +"postgres-date@npm:~1.0.4": + version: 1.0.7 + resolution: "postgres-date@npm:1.0.7" + checksum: 0ff91fccc64003e10b767fcfeefb5eaffbc522c93aa65d5051c49b3c4ce6cb93ab091a7d22877a90ad60b8874202c6f1d0f935f38a7235ed3b258efd54b97ca9 languageName: node linkType: hard -"postcss@npm:^8.3.5, postcss@npm:^8.4.12, postcss@npm:^8.4.4, postcss@npm:^8.4.7": - version: 8.4.12 - resolution: "postcss@npm:8.4.12" +"postgres-interval@npm:^1.1.0": + version: 1.2.0 + resolution: "postgres-interval@npm:1.2.0" dependencies: - nanoid: ^3.3.1 - picocolors: ^1.0.0 - source-map-js: ^1.0.2 - checksum: f5aea065c84efef236e9f387eb4fceaab3cc932c25ce480bb82f75b36a6c1a7720cc4c5ef2fb82a5d216aecb5c436af36dae45191e94a7a5b53c2b999610430f + xtend: ^4.0.0 + checksum: c1734c3cb79e7f22579af0b268a463b1fa1d084e742a02a7a290c4f041e349456f3bee3b4ee0bb3f226828597f7b76deb615c1b857db9a742c45520100456272 languageName: node linkType: hard @@ -25764,33 +26110,33 @@ node-pty@beta: languageName: node linkType: hard -"proxy-agent@npm:^5.0.0": - version: 5.0.0 - resolution: "proxy-agent@npm:5.0.0" +"proxy-agent@npm:^6.3.0": + version: 6.3.0 + resolution: "proxy-agent@npm:6.3.0" dependencies: - agent-base: ^6.0.0 - debug: 4 - http-proxy-agent: ^4.0.0 - https-proxy-agent: ^5.0.0 - lru-cache: ^5.1.1 - pac-proxy-agent: ^5.0.0 - proxy-from-env: ^1.0.0 - socks-proxy-agent: ^5.0.0 - checksum: e6504b085fce8fd62c4c61a4da8a86b6eabe2dd9caae52954a289581903c070343511d55e92ff008ccbb872b1374aef7ab96a5054c3d5bce379732272b7eae30 + agent-base: ^7.0.2 + debug: ^4.3.4 + http-proxy-agent: ^7.0.0 + https-proxy-agent: ^7.0.0 + lru-cache: ^7.14.1 + pac-proxy-agent: ^7.0.0 + proxy-from-env: ^1.1.0 + socks-proxy-agent: ^8.0.1 + checksum: 40a0df2c9af5da8e6fcb95268f3e93181d8dd5c5ee9493517793fe75f847641f44a962d25a49d7208ec3b68cf1998fcd0d976bae773796e2023c71cddd76b642 languageName: node linkType: hard -"proxy-from-env@npm:^1.0.0, proxy-from-env@npm:^1.1.0": +"proxy-from-env@npm:^1.1.0": version: 1.1.0 resolution: "proxy-from-env@npm:1.1.0" checksum: fe7dd8b1bdbbbea18d1459107729c3e4a2243ca870d26d34c2c1bcd3e4425b7bcc5112362df2d93cc7fb9746f6142b5e272fd1cc5c86ddf8580175186f6ad42b languageName: node linkType: hard -"psl@npm:^1.1.28": - version: 1.8.0 - resolution: "psl@npm:1.8.0" - checksum: b5f1956f7530860e1918e7238291689fdc3cab9c2c0cdbc47cde21addcc7f62495d794692cc1e43e54728d273f78037e8e73ac43009509a1a7f823341f4039c8 +"psl@npm:^1.1.33": + version: 1.9.0 + resolution: "psl@npm:1.9.0" + checksum: 6a3f805fdab9442f44de4ba23880c4eba26b20c8e8e0830eff1cb31007f6825dace61d17203c58bfe36946842140c97a1ba7f67bc63ca2d88a7ee052b65d97ab languageName: node linkType: hard @@ -25853,10 +26199,10 @@ node-pty@beta: languageName: node linkType: hard -"punycode@npm:^2.1.0, punycode@npm:^2.1.1, punycode@npm:^2.3.0": - version: 2.3.0 - resolution: "punycode@npm:2.3.0" - checksum: 8e6f7abdd3a6635820049e3731c623bbef3fedbf63bbc696b0d7237fdba4cefa069bc1fa62f2938b0fbae057550df7b5318f4a6bcece27f1907fc75c54160bee +"punycode@npm:^2.1.0, punycode@npm:^2.1.1, punycode@npm:^2.3.1": + version: 2.3.1 + resolution: "punycode@npm:2.3.1" + checksum: 14f76a8206bc3464f794fb2e3d3cc665ae416c01893ad7a02b23766eb07159144ee612ad67af5e84fa4479ccfe67678c4feb126b0485651b302babf66f04f9e9 languageName: node linkType: hard @@ -25892,10 +26238,12 @@ node-pty@beta: languageName: node linkType: hard -"qs@npm:6.9.7": - version: 6.9.7 - resolution: "qs@npm:6.9.7" - checksum: d0274b3c2daa9e7b350fb695fc4b5f7a1e65e266d5798a07936975f0848bdca6d7ad41cded19ad4af6a6253b97e43b497e988e728eab7a286f277b6dddfbade4 +"qs@npm:6.13.0": + version: 6.13.0 + resolution: "qs@npm:6.13.0" + dependencies: + side-channel: ^1.0.6 + checksum: 62372cdeec24dc83a9fb240b7533c0fdcf0c5f7e0b83343edd7310f0ab4c8205a5e7c56406531f2e47e1b4878a3821d652be4192c841de5b032ca83619d8f860 languageName: node linkType: hard @@ -25913,6 +26261,13 @@ node-pty@beta: languageName: node linkType: hard +"querystringify@npm:^2.1.1": + version: 2.2.0 + resolution: "querystringify@npm:2.2.0" + checksum: 3258bc3dbdf322ff2663619afe5947c7926a6ef5fb78ad7d384602974c467fadfc8272af44f5eb8cddd0d011aae8fabf3a929a8eee4b86edcc0a21e6bd10f9aa + languageName: node + linkType: hard + "queue-microtask@npm:^1.2.2": version: 1.2.3 resolution: "queue-microtask@npm:1.2.3" @@ -25969,15 +26324,15 @@ node-pty@beta: languageName: node linkType: hard -"raw-body@npm:2.4.3, raw-body@npm:^2.2.0": - version: 2.4.3 - resolution: "raw-body@npm:2.4.3" +"raw-body@npm:2.5.2": + version: 2.5.2 + resolution: "raw-body@npm:2.5.2" dependencies: bytes: 3.1.2 - http-errors: 1.8.1 + http-errors: 2.0.0 iconv-lite: 0.4.24 unpipe: 1.0.0 - checksum: e25ac143c0638dac75b7228de378f60d9438dd1a9b83ffcc6935d5a1e2d599ad3cdc9d24e80eb8cf07a7ec4f5d57a692d243abdcb2449cf11605ef9e5fe6af06 + checksum: b201c4b66049369a60e766318caff5cb3cc5a900efd89bdac431463822d976ad0670912c931fdbdcf5543207daf6f6833bca57aa116e1661d2ea91e12ca692c4 languageName: node linkType: hard @@ -26112,6 +26467,17 @@ node-pty@beta: languageName: node linkType: hard +"react-native-url-polyfill@npm:^1.3.0": + version: 1.3.0 + resolution: "react-native-url-polyfill@npm:1.3.0" + dependencies: + whatwg-url-without-unicode: 8.0.0-3 + peerDependencies: + react-native: "*" + checksum: d8167ad2cc17261906ffde19970279406db63d61b9ca85d85b02f5592e53a83db70aace3c1d89081ce46ddcfacbdac6a7faaa329b5235c6b980e1f533de5b318 + languageName: node + linkType: hard + "react-popper@npm:^2.3.0": version: 2.3.0 resolution: "react-popper@npm:2.3.0" @@ -26266,26 +26632,14 @@ node-pty@beta: languageName: node linkType: hard -"readable-stream@npm:1.1.x": - version: 1.1.14 - resolution: "readable-stream@npm:1.1.14" - dependencies: - core-util-is: ~1.0.0 - inherits: ~2.0.1 - isarray: 0.0.1 - string_decoder: ~0.10.x - checksum: b7f41b16b305103d598e3c8964fa30d52d6e0b5d9fdad567588964521691c24b279c7a8bb71f11927c3613acf355bac72d8396885a43d50425b2caafd49bc83d - languageName: node - linkType: hard - -"readable-stream@npm:3, readable-stream@npm:^3.0.0, readable-stream@npm:^3.0.2, readable-stream@npm:^3.0.6, readable-stream@npm:^3.1.1, readable-stream@npm:^3.4.0, readable-stream@npm:^3.5.0, readable-stream@npm:^3.6.0": - version: 3.6.0 - resolution: "readable-stream@npm:3.6.0" +"readable-stream@npm:3, readable-stream@npm:^3.0.0, readable-stream@npm:^3.0.2, readable-stream@npm:^3.0.6, readable-stream@npm:^3.1.1, readable-stream@npm:^3.4.0, readable-stream@npm:^3.5.0, readable-stream@npm:^3.6.0, readable-stream@npm:^3.6.2": + version: 3.6.2 + resolution: "readable-stream@npm:3.6.2" dependencies: inherits: ^2.0.3 string_decoder: ^1.1.1 util-deprecate: ^1.0.1 - checksum: 937bedd29ac8a68331666291922bea892fa2be1a33269e582de9f844a2002f146cf831e39cd49fe6a378d3f0c27358f259ed0e20d20f0bdc6a3f8fc21fce42dc + checksum: e37be5c79c376fdd088a45fa31ea2e423e5d48854be7a22a58869b4e84d25047b193f6acb54f1012331e1bcd667ffb569c01b99d36b0bd59658fb33f513511b7 languageName: node linkType: hard @@ -26452,14 +26806,15 @@ node-pty@beta: languageName: node linkType: hard -"regexp.prototype.flags@npm:^1.3.1, regexp.prototype.flags@npm:^1.4.3": - version: 1.4.3 - resolution: "regexp.prototype.flags@npm:1.4.3" +"regexp.prototype.flags@npm:^1.3.1, regexp.prototype.flags@npm:^1.5.2": + version: 1.5.2 + resolution: "regexp.prototype.flags@npm:1.5.2" dependencies: - call-bind: ^1.0.2 - define-properties: ^1.1.3 - functions-have-names: ^1.2.2 - checksum: 5d797c7fb95f72a52dd9685a485faf0af3c55a4d1f2fafc1153a7be3df036cc3274b195b3ae051ee3d896a01960b446d726206e0d9a90b749e90d93445bb781f + call-bind: ^1.0.6 + define-properties: ^1.2.1 + es-errors: ^1.3.0 + set-function-name: ^2.0.1 + checksum: 0f3fc4f580d9c349f8b560b012725eb9c002f36daa0041b3fbf6f4238cb05932191a4d7d5db3b5e2caa336d5150ad0402ed2be81f711f9308fe7e1a9bf9bd552 languageName: node linkType: hard @@ -26563,13 +26918,6 @@ node-pty@beta: languageName: node linkType: hard -"remove-trailing-separator@npm:^1.0.1": - version: 1.1.0 - resolution: "remove-trailing-separator@npm:1.1.0" - checksum: 3568f9f8f5af3737b4aee9e6e1e8ec4be65a92da9cb27f989e0893714d50aa95ed2ff02d40d1fa35e1b1a234dc9c2437050ef356704a3999feaca6667d9e9bfc - languageName: node - linkType: hard - "renderkid@npm:^3.0.0": version: 3.0.0 resolution: "renderkid@npm:3.0.0" @@ -26678,13 +27026,6 @@ node-pty@beta: languageName: node linkType: hard -"resolve-from@npm:^3.0.0": - version: 3.0.0 - resolution: "resolve-from@npm:3.0.0" - checksum: 24affcf8e81f4c62f0dcabc774afe0e19c1f38e34e43daac0ddb409d79435fc3037f612b0cc129178b8c220442c3babd673e88e870d27215c99454566e770ebc - languageName: node - linkType: hard - "resolve-from@npm:^4.0.0": version: 4.0.0 resolution: "resolve-from@npm:4.0.0" @@ -26701,24 +27042,16 @@ node-pty@beta: languageName: node linkType: hard -"resolve-url-loader@npm:^4.0.0": - version: 4.0.0 - resolution: "resolve-url-loader@npm:4.0.0" +"resolve-url-loader@npm:^5.0.0": + version: 5.0.0 + resolution: "resolve-url-loader@npm:5.0.0" dependencies: adjust-sourcemap-loader: ^4.0.0 convert-source-map: ^1.7.0 loader-utils: ^2.0.0 - postcss: ^7.0.35 + postcss: ^8.2.14 source-map: 0.6.1 - peerDependencies: - rework: 1.0.1 - rework-visit: 1.0.0 - peerDependenciesMeta: - rework: - optional: true - rework-visit: - optional: true - checksum: afecc67d26e88f3c648d83fd4634113e032eb6127e44c25a0c64933f5b8280683be999e8351e8442bd1663c19998b31571faba19748eaead6a586cebb0d2f288 + checksum: 53eef3620332f2fc35a4deffaa4395064b2ffd1bc28be380faa3f1e99c2fb7bbf0f705700b4539387d5b6c39586df54a92cd5d031606f19de4bf9e0ff1b6a522 languageName: node linkType: hard @@ -26931,8 +27264,8 @@ node-pty@beta: linkType: hard "rollup@npm:^2.43.1": - version: 2.70.2 - resolution: "rollup@npm:2.70.2" + version: 2.79.2 + resolution: "rollup@npm:2.79.2" dependencies: fsevents: ~2.3.2 dependenciesMeta: @@ -26940,7 +27273,7 @@ node-pty@beta: optional: true bin: rollup: dist/bin/rollup - checksum: 8ee99b255cf802608d67e0c55251bbfd4127fd9f3ee6b3c4e09d10f2a91c764064b8210beca0cf9b397421b34c5ec119ba13a0873b0e05d566c6c90f4abb990a + checksum: bc3746c988d903c2211266ddc539379d53d92689b9cc5c2b4e3ae161689de9af491957a567c629b6cc81f48d0928a7591fc4c383fba68a48d2966c9fb8a2bce9 languageName: node linkType: hard @@ -26951,15 +27284,6 @@ node-pty@beta: languageName: node linkType: hard -"run-node@npm:^1.0.0": - version: 1.0.0 - resolution: "run-node@npm:1.0.0" - bin: - run-node: run-node - checksum: ab32a065194903e5cd2e4c01e4a5568d22720b4eaa5c853d5386e8d116c59c313e84591f0375913dbe6cc973c2181aed4f54d6b32dba9f7d0d5d01a762de8b6b - languageName: node - linkType: hard - "run-parallel@npm:^1.1.9": version: 1.2.0 resolution: "run-parallel@npm:1.2.0" @@ -26979,11 +27303,23 @@ node-pty@beta: linkType: hard "rxjs@npm:^7.5.5": - version: 7.5.6 - resolution: "rxjs@npm:7.5.6" + version: 7.8.1 + resolution: "rxjs@npm:7.8.1" dependencies: tslib: ^2.1.0 - checksum: d8077fb4a06c05f52fcc974ab9884d163924b8085c661c92030a522920510bf0c75583caee70409ab11992320c31f562f5402afe8b81255370c09773209fec5c + checksum: 3c49c1ecd66170b175c9cacf5cef67f8914dcbc7cd0162855538d365c83fea631167cacb644b3ce533b2ea0e9a4d0b12175186985f89d75abe73dbd8f7f06f68 + languageName: node + linkType: hard + +"safe-array-concat@npm:^1.1.2": + version: 1.1.2 + resolution: "safe-array-concat@npm:1.1.2" + dependencies: + call-bind: ^1.0.7 + get-intrinsic: ^1.2.4 + has-symbols: ^1.0.3 + isarray: ^2.0.5 + checksum: 12f9fdb01c8585e199a347eacc3bae7b5164ae805cdc8c6707199dbad5b9e30001a50a43c4ee24dc9ea32dbb7279397850e9208a7e217f4d8b1cf5d90129dec9 languageName: node linkType: hard @@ -26994,13 +27330,24 @@ node-pty@beta: languageName: node linkType: hard -"safe-buffer@npm:5.2.1, safe-buffer@npm:>=5.1.0, safe-buffer@npm:^5.0.1, safe-buffer@npm:^5.1.0, safe-buffer@npm:^5.1.1, safe-buffer@npm:^5.1.2, safe-buffer@npm:^5.2.0, safe-buffer@npm:~5.2.0": +"safe-buffer@npm:5.2.1, safe-buffer@npm:>=5.1.0, safe-buffer@npm:^5.0.1, safe-buffer@npm:^5.1.0, safe-buffer@npm:^5.1.1, safe-buffer@npm:^5.1.2, safe-buffer@npm:^5.2.0, safe-buffer@npm:^5.2.1, safe-buffer@npm:~5.2.0": version: 5.2.1 resolution: "safe-buffer@npm:5.2.1" checksum: 6501914237c0a86e9675d4e51d89ca3c21ffd6a31642efeba25ad65720bce6921c9e7e974e5be91a786b25aa058b5303285d3c15dbabf983a919f5f630d349f3 languageName: node linkType: hard +"safe-regex-test@npm:^1.0.3": + version: 1.0.3 + resolution: "safe-regex-test@npm:1.0.3" + dependencies: + call-bind: ^1.0.6 + es-errors: ^1.3.0 + is-regex: ^1.1.4 + checksum: 900bf7c98dc58f08d8523b7012b468e4eb757afa624f198902c0643d7008ba777b0bdc35810ba0b758671ce887617295fb742b3f3968991b178ceca54cb07603 + languageName: node + linkType: hard + "safe-stable-stringify@npm:^1.1.0": version: 1.1.1 resolution: "safe-stable-stringify@npm:1.1.1" @@ -27009,9 +27356,9 @@ node-pty@beta: linkType: hard "safe-stable-stringify@npm:^2.2.0, safe-stable-stringify@npm:^2.4.0": - version: 2.4.1 - resolution: "safe-stable-stringify@npm:2.4.1" - checksum: 391dbab34964be0d0e63b91bc996ca23ef8daae440b18cb4132f7c3db1af206f88d047af1149ef7ea69db6b6cdb49472166bb35e43fe82db53a9a3ed315aab79 + version: 2.4.3 + resolution: "safe-stable-stringify@npm:2.4.3" + checksum: 81dede06b8f2ae794efd868b1e281e3c9000e57b39801c6c162267eb9efda17bd7a9eafa7379e1f1cacd528d4ced7c80d7460ad26f62ada7c9e01dec61b2e768 languageName: node linkType: hard @@ -27107,26 +27454,26 @@ node-pty@beta: languageName: node linkType: hard -"schema-utils@npm:^3.0.0, schema-utils@npm:^3.1.0, schema-utils@npm:^3.1.1": - version: 3.1.1 - resolution: "schema-utils@npm:3.1.1" +"schema-utils@npm:^3.0.0, schema-utils@npm:^3.1.1, schema-utils@npm:^3.2.0": + version: 3.3.0 + resolution: "schema-utils@npm:3.3.0" dependencies: "@types/json-schema": ^7.0.8 ajv: ^6.12.5 ajv-keywords: ^3.5.2 - checksum: 55a8da802a5f8f0ce6f68b6a139f3261cb423bd23795766da866a0f5738fc40303370fbe0c3eeba60b2a91c569ad7ce5318fea455f8fe866098c5a3a6b9050b0 + checksum: fafdbde91ad8aa1316bc543d4b61e65ea86970aebbfb750bfb6d8a6c287a23e415e0e926c2498696b242f63af1aab8e585252637fabe811fd37b604351da6500 languageName: node linkType: hard -"schema-utils@npm:^4.0.0": - version: 4.0.0 - resolution: "schema-utils@npm:4.0.0" +"schema-utils@npm:^4.0.0, schema-utils@npm:^4.0.1": + version: 4.2.0 + resolution: "schema-utils@npm:4.2.0" dependencies: "@types/json-schema": ^7.0.9 - ajv: ^8.8.0 + ajv: ^8.9.0 ajv-formats: ^2.1.1 - ajv-keywords: ^5.0.0 - checksum: d76f1b0724fb74fa9da19d4f98ebe89c2703d8d28df9dc44d66ab9a9cbca869b434181a36a2bc00ec53980f27e8fabe143759bdc8754692bbf7ef614fc6e9da4 + ajv-keywords: ^5.1.0 + checksum: 8dab7e7800316387fd8569870b4b668cfcecf95ac551e369ea799bbcbfb63fb0365366d4b59f64822c9f7904d8c5afcfaf5a6124a4b08783e558cd25f299a6b4 languageName: node linkType: hard @@ -27137,12 +27484,13 @@ node-pty@beta: languageName: node linkType: hard -"selfsigned@npm:^2.0.1": - version: 2.0.1 - resolution: "selfsigned@npm:2.0.1" +"selfsigned@npm:^2.1.1": + version: 2.4.1 + resolution: "selfsigned@npm:2.4.1" dependencies: + "@types/node-forge": ^1.3.0 node-forge: ^1 - checksum: 3f5d5b88f072db51d1c8184db571a466c5a60d46f888dee62b7396c9c27a10cc98c151fde5441140da29abc493a82530666911468d3a57bd8c6d81b8e6a8f830 + checksum: 521829ec36ea042f7e9963bf1da2ed040a815cf774422544b112ec53b7edc0bc50a0f8cc2ae7aa6cc19afa967c641fd96a15de0fc650c68651e41277d2e1df09 languageName: node linkType: hard @@ -27179,13 +27527,6 @@ node-pty@beta: languageName: node linkType: hard -"semver-compare@npm:^1.0.0": - version: 1.0.0 - resolution: "semver-compare@npm:1.0.0" - checksum: 9ef4d8b81847556f0865f46ddc4d276bace118c7cb46811867af82e837b7fc473911981d5a0abc561fa2db487065572217e5b06e18701c4281bcdd2a1affaff1 - languageName: node - linkType: hard - "semver-diff@npm:^3.1.1": version: 3.1.1 resolution: "semver-diff@npm:3.1.1" @@ -27211,84 +27552,35 @@ node-pty@beta: languageName: node linkType: hard -"semver@npm:2 || 3 || 4 || 5, semver@npm:^5.5.0, semver@npm:^5.6.0": - version: 5.7.1 - resolution: "semver@npm:5.7.1" - bin: - semver: ./bin/semver - checksum: d4884f2aeca28bff35d0bd40ff0a9b2dfc4b36a883bf0ea5dc15d10d9a01bdc9041035b05f825d4b5ac8a56e490703dbf0d986d054de82cc5e9bad3f02ca6e00 - languageName: node - linkType: hard - -"semver@npm:7.0.0": - version: 7.0.0 - resolution: "semver@npm:7.0.0" - bin: - semver: bin/semver.js - checksum: 7fd341680a967a0abfd66f3a7d36ba44e52ff5d3e799e9a6cdb01a68160b64ef09be82b4af05459effeecdd836f002c2462555d2821cd890dfdfe36a0d9f56a5 - languageName: node - linkType: hard - -"semver@npm:7.3.4": - version: 7.3.4 - resolution: "semver@npm:7.3.4" - dependencies: - lru-cache: ^6.0.0 - bin: - semver: bin/semver.js - checksum: 16b77752071597135b934bb33258badbac6c1cebbabe507ce31f68db3229acae7afa9602265c375c34df092339caa738b105e0c62240536ea1efd4767c36e674 - languageName: node - linkType: hard - -"semver@npm:7.3.8, semver@npm:~7.3.0": - version: 7.3.8 - resolution: "semver@npm:7.3.8" - dependencies: - lru-cache: ^6.0.0 - bin: - semver: bin/semver.js - checksum: 7e581d679530db31757301c2117721577a2bb36a301a443aac833b8efad372cda58e7f2a464fe4412ae1041cc1f63a6c1fe0ced8c57ce5aca1e0b57bb0d627b9 - languageName: node - linkType: hard - -"semver@npm:7.5.0, semver@npm:7.x, semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.2.1, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.0": - version: 7.5.0 - resolution: "semver@npm:7.5.0" +"semver@npm:^7.5.4": + version: 7.5.4 + resolution: "semver@npm:7.5.4" dependencies: lru-cache: ^6.0.0 bin: semver: bin/semver.js - checksum: 203a556d7189c277b9774a325fd2695187b2822069094e0dbfcc56dfd10a1fd646a94e73812f249802a661f6437b2370ccb8ee330e7b9888b38e53c5a8216222 - languageName: node - linkType: hard - -"semver@npm:^6.0.0, semver@npm:^6.1.1, semver@npm:^6.1.2, semver@npm:^6.2.0, semver@npm:^6.3.0": - version: 6.3.0 - resolution: "semver@npm:6.3.0" - bin: - semver: ./bin/semver.js - checksum: 1f4959e15bcfbaf727e964a4920f9260141bb8805b399793160da4e7de128e42a7d1f79c1b7d5cd21a6073fba0d55feb9966f5fef3e5ccb8e1d7ead3d7527458 + checksum: 5160b06975a38b11c1ab55950cb5b8a23db78df88275d3d8a42ccf1f29e55112ac995b3a26a522c36e3b5f76b0445f1eef70d696b8c7862a2b4303d7b0e7609e languageName: node linkType: hard -"send@npm:0.17.2": - version: 0.17.2 - resolution: "send@npm:0.17.2" +"send@npm:^0.19.0": + version: 0.19.0 + resolution: "send@npm:0.19.0" dependencies: debug: 2.6.9 - depd: ~1.1.2 - destroy: ~1.0.4 + depd: 2.0.0 + destroy: 1.2.0 encodeurl: ~1.0.2 escape-html: ~1.0.3 etag: ~1.8.1 fresh: 0.5.2 - http-errors: 1.8.1 + http-errors: 2.0.0 mime: 1.6.0 ms: 2.1.3 - on-finished: ~2.3.0 + on-finished: 2.4.1 range-parser: ~1.2.1 - statuses: ~1.5.0 - checksum: 0f92f0fcd298fcdd759dc7d501bfab79635f549ec3b885e26e4a62b3094420b355d73f2d59749b6004019a4c91db983fb1715378aa622f4bf4e21b0b79853e5c + statuses: 2.0.1 + checksum: ea3f8a67a8f0be3d6bf9080f0baed6d2c51d11d4f7b4470de96a5029c598a7011c497511ccc28968b70ef05508675cebff27da9151dd2ceadd60be4e6cf845e3 languageName: node linkType: hard @@ -27310,21 +27602,21 @@ node-pty@beta: languageName: node linkType: hard -"serialize-javascript@npm:6.0.0, serialize-javascript@npm:^6.0.0": - version: 6.0.0 - resolution: "serialize-javascript@npm:6.0.0" +"serialize-javascript@npm:^4.0.0": + version: 4.0.0 + resolution: "serialize-javascript@npm:4.0.0" dependencies: randombytes: ^2.1.0 - checksum: 73104922ef0a919064346eea21caab99de1a019a1f5fb54a7daa7fcabc39e83b387a2a363e52a889598c3b1bcf507c4b2a7b26df76e991a310657af20eea2e7c + checksum: 510dfe7f0311c0b2f7ab06311afa1668ba2969ab2f1faaac0a4924ede76b7f22ba85cfdeaa0052ec5a047bca42c8cd8ac8df8f0efe52f9bd290b3a39ae69fe9d languageName: node linkType: hard -"serialize-javascript@npm:^4.0.0": - version: 4.0.0 - resolution: "serialize-javascript@npm:4.0.0" +"serialize-javascript@npm:^6.0.1, serialize-javascript@npm:^6.0.2": + version: 6.0.2 + resolution: "serialize-javascript@npm:6.0.2" dependencies: randombytes: ^2.1.0 - checksum: 510dfe7f0311c0b2f7ab06311afa1668ba2969ab2f1faaac0a4924ede76b7f22ba85cfdeaa0052ec5a047bca42c8cd8ac8df8f0efe52f9bd290b3a39ae69fe9d + checksum: 2dd09ef4b65a1289ba24a788b1423a035581bef60817bea1f01eda8e3bda623f86357665fe7ac1b50f6d4f583f97db9615b3f07b2a2e8cbcb75033965f771dd2 languageName: node linkType: hard @@ -27343,15 +27635,15 @@ node-pty@beta: languageName: node linkType: hard -"serve-static@npm:1.14.2, serve-static@npm:^1.14.2": - version: 1.14.2 - resolution: "serve-static@npm:1.14.2" +"serve-static@npm:1.16.2, serve-static@npm:^1.14.2": + version: 1.16.2 + resolution: "serve-static@npm:1.16.2" dependencies: - encodeurl: ~1.0.2 + encodeurl: ~2.0.0 escape-html: ~1.0.3 parseurl: ~1.3.3 - send: 0.17.2 - checksum: 4583f8bec8daa74df58fd7415e6f58039223becbb6c7ac0e6386c4fbe5c825195df92c73f999a1404487ae1d1bd1d20dd7ae11bc19f8788225770d1960bbeaea + send: 0.19.0 + checksum: 528fff6f5e12d0c5a391229ad893910709bc51b5705962b09404a1d813857578149b8815f35d3ee5752f44cd378d0f31669d4b1d7e2d11f41e08283d5134bd1f languageName: node linkType: hard @@ -27362,6 +27654,42 @@ node-pty@beta: languageName: node linkType: hard +"set-function-length@npm:^1.2.1": + version: 1.2.2 + resolution: "set-function-length@npm:1.2.2" + dependencies: + define-data-property: ^1.1.4 + es-errors: ^1.3.0 + function-bind: ^1.1.2 + get-intrinsic: ^1.2.4 + gopd: ^1.0.1 + has-property-descriptors: ^1.0.2 + checksum: 82850e62f412a258b71e123d4ed3873fa9377c216809551192bb6769329340176f109c2eeae8c22a8d386c76739855f78e8716515c818bcaef384b51110f0f3c + languageName: node + linkType: hard + +"set-function-name@npm:^2.0.1": + version: 2.0.2 + resolution: "set-function-name@npm:2.0.2" + dependencies: + define-data-property: ^1.1.4 + es-errors: ^1.3.0 + functions-have-names: ^1.2.3 + has-property-descriptors: ^1.0.2 + checksum: fce59f90696c450a8523e754abb305e2b8c73586452619c2bad5f7bf38c7b6b4651895c9db895679c5bef9554339cf3ef1c329b66ece3eda7255785fbe299316 + languageName: node + linkType: hard + +"set-value@npm:^4.1.0": + version: 4.1.0 + resolution: "set-value@npm:4.1.0" + dependencies: + is-plain-object: ^2.0.4 + is-primitive: ^3.0.1 + checksum: dc186676b6cc0cfcf1656b8acdfe7a68591f0645dd2872250100817fb53e5e9298dc1727a95605ac03f82110e9b3820c90a0a02d84e0fb89f210922b08b37e02 + languageName: node + linkType: hard + "setimmediate@npm:^1.0.5": version: 1.0.5 resolution: "setimmediate@npm:1.0.5" @@ -27411,15 +27739,6 @@ node-pty@beta: languageName: node linkType: hard -"shebang-command@npm:^1.2.0": - version: 1.2.0 - resolution: "shebang-command@npm:1.2.0" - dependencies: - shebang-regex: ^1.0.0 - checksum: 7b20dbf04112c456b7fc258622dafd566553184ac9b6938dd30b943b065b21dabd3776460df534cc02480db5e1b6aec44700d985153a3da46e7db7f9bd21326d - languageName: node - linkType: hard - "shebang-command@npm:^2.0.0": version: 2.0.0 resolution: "shebang-command@npm:2.0.0" @@ -27429,13 +27748,6 @@ node-pty@beta: languageName: node linkType: hard -"shebang-regex@npm:^1.0.0": - version: 1.0.0 - resolution: "shebang-regex@npm:1.0.0" - checksum: 9abc45dee35f554ae9453098a13fdc2f1730e525a5eb33c51f096cc31f6f10a4b38074c1ebf354ae7bffa7229506083844008dfc3bb7818228568c0b2dc1fff2 - languageName: node - linkType: hard - "shebang-regex@npm:^3.0.0": version: 3.0.0 resolution: "shebang-regex@npm:3.0.0" @@ -27443,10 +27755,10 @@ node-pty@beta: languageName: node linkType: hard -"shell-quote@npm:^1.7.3": - version: 1.7.4 - resolution: "shell-quote@npm:1.7.4" - checksum: 54a9f16eee9449879290b9ab082d380ff229b9176608879087d1c21c423ad0bf954fe02941963ee80cafce6e09d629ae5b209ac7061de22cf8e1b9b3edf3e694 +"shell-quote@npm:^1.7.3, shell-quote@npm:^1.8.1": + version: 1.8.1 + resolution: "shell-quote@npm:1.8.1" + checksum: 8cec6fd827bad74d0a49347057d40dfea1e01f12a6123bf82c4649f3ef152fc2bc6d6176e6376bffcd205d9d0ccb4f1f9acae889384d20baff92186f01ea455a languageName: node linkType: hard @@ -27506,18 +27818,19 @@ node-pty@beta: languageName: node linkType: hard -"side-channel@npm:^1.0.4": - version: 1.0.4 - resolution: "side-channel@npm:1.0.4" +"side-channel@npm:^1.0.4, side-channel@npm:^1.0.6": + version: 1.0.6 + resolution: "side-channel@npm:1.0.6" dependencies: - call-bind: ^1.0.0 - get-intrinsic: ^1.0.2 - object-inspect: ^1.9.0 - checksum: 054a5d23ee35054b2c4609b9fd2a0587760737782b5d765a9c7852264710cc39c6dcb56a9bbd6c12cd84071648aea3edb2359d2f6e560677eedadce511ac1da5 + call-bind: ^1.0.7 + es-errors: ^1.3.0 + get-intrinsic: ^1.2.4 + object-inspect: ^1.13.1 + checksum: d2afd163dc733cc0a39aa6f7e39bf0c436293510dbccbff446733daeaf295857dbccf94297092ec8c53e2503acac30f0b78830876f0485991d62a90e9cad305f languageName: node linkType: hard -"signal-exit@npm:3.0.7, signal-exit@npm:^3.0.0, signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.3, signal-exit@npm:^3.0.7": +"signal-exit@npm:3.0.7, signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.3, signal-exit@npm:^3.0.7": version: 3.0.7 resolution: "signal-exit@npm:3.0.7" checksum: 25d272fa73e146048565e08f3309d5b942c1979a6f4a58a8c59d5fa299728e9c2fcd1a759ec870863b1fd38653670240cd420dad2ad9330c71f36608a6a1c912 @@ -27589,32 +27902,17 @@ node-pty@beta: languageName: node linkType: hard -"sinon@npm:^14.0.1": - version: 14.0.1 - resolution: "sinon@npm:14.0.1" - dependencies: - "@sinonjs/commons": ^1.8.3 - "@sinonjs/fake-timers": ^9.1.2 - "@sinonjs/samsam": ^6.1.1 - diff: ^5.0.0 - nise: ^5.1.1 - supports-color: ^7.2.0 - checksum: 085ca6f1c89ee7ba8a5020ff1518551dd27a27a817850cabe4287ba66c25ad9b62228d2d7be8385004744507314591d2b3a34fd23a91c5c819c107dd424cad9c - languageName: node - linkType: hard - -"sinon@npm:^7.5.0": - version: 7.5.0 - resolution: "sinon@npm:7.5.0" +"sinon@npm:^18.0.1": + version: 18.0.1 + resolution: "sinon@npm:18.0.1" dependencies: - "@sinonjs/commons": ^1.4.0 - "@sinonjs/formatio": ^3.2.1 - "@sinonjs/samsam": ^3.3.3 - diff: ^3.5.0 - lolex: ^4.2.0 - nise: ^1.5.2 - supports-color: ^5.5.0 - checksum: 44efbca7bc3ba7b91773f666a1a816a12f420aff1ddd7f62d894bfea37a0b6994224a89abf24f2a98cbca708b8a66a36bb96158e9f103a427483aa4b41236201 + "@sinonjs/commons": ^3.0.1 + "@sinonjs/fake-timers": 11.2.2 + "@sinonjs/samsam": ^8.0.0 + diff: ^5.2.0 + nise: ^6.0.0 + supports-color: ^7 + checksum: c4554b8d9654d42fc4baefecd3b5ac42bcce73ad926d58521233d9c355dc2c1a0d73c55e5b2c929b6814e528cd9b54bc61096b9288579f9b284edd6e3d2da3df languageName: node linkType: hard @@ -27657,13 +27955,6 @@ node-pty@beta: languageName: node linkType: hard -"slide@npm:^1.1.5": - version: 1.1.6 - resolution: "slide@npm:1.1.6" - checksum: f3bde70fd4c0a2ba6c23c674f010849865ddfacbc0ae3a57522d7ce88e4cc6c186d627943c34004d4f009a3fb477c03307b247ab69a266de4b3c72b271a6a03a - languageName: node - linkType: hard - "smart-buffer@npm:^4.2.0": version: 4.2.0 resolution: "smart-buffer@npm:4.2.0" @@ -27681,7 +27972,7 @@ node-pty@beta: languageName: node linkType: hard -"sockjs@npm:^0.3.21": +"sockjs@npm:^0.3.24": version: 0.3.24 resolution: "sockjs@npm:0.3.24" dependencies: @@ -27692,17 +27983,6 @@ node-pty@beta: languageName: node linkType: hard -"socks-proxy-agent@npm:5, socks-proxy-agent@npm:^5.0.0": - version: 5.0.1 - resolution: "socks-proxy-agent@npm:5.0.1" - dependencies: - agent-base: ^6.0.2 - debug: 4 - socks: ^2.3.3 - checksum: 2bc4d996d3e6cb65f69d84aa94d5dcfabac5c264e777ecdb24511703a614d0a426b40adc2c6b456a9c590e6d4c0a67da70e2d59742ac0411dd7f46a49ce07c73 - languageName: node - linkType: hard - "socks-proxy-agent@npm:^7.0.0": version: 7.0.0 resolution: "socks-proxy-agent@npm:7.0.0" @@ -27714,13 +27994,24 @@ node-pty@beta: languageName: node linkType: hard -"socks@npm:^2.3.3, socks@npm:^2.6.2": - version: 2.7.0 - resolution: "socks@npm:2.7.0" +"socks-proxy-agent@npm:^8.0.1": + version: 8.0.1 + resolution: "socks-proxy-agent@npm:8.0.1" + dependencies: + agent-base: ^7.0.1 + debug: ^4.3.4 + socks: ^2.7.1 + checksum: 3971e6af5717d986e0314a69285cf6ec70d320bc2e31bf0bc32cf1618ac7abd9fd8620d9904cc467ae530752213bbfc8b6cedfd0b1381c0cbd1aada75ac05c0a + languageName: node + linkType: hard + +"socks@npm:^2.6.2, socks@npm:^2.7.1": + version: 2.7.1 + resolution: "socks@npm:2.7.1" dependencies: ip: ^2.0.0 smart-buffer: ^4.2.0 - checksum: 5cc9ea8d0f1fae370d7ac319b5dd8973fa24bc58d0194a8140687fd10be53a1f348b1b02b97932ce67ddae0edf459e5da0fe4b13cd5dd22ce46ac4d1a83239ec + checksum: 43f69dbc9f34fc8220bc51c6eea1c39715ab3cfdb115d6e3285f6c7d1a603c5c75655668a5bbc11e3c7e2c99d60321fb8d7ab6f38cda6a215fadd0d6d0b52130 languageName: node linkType: hard @@ -27789,7 +28080,7 @@ node-pty@beta: languageName: node linkType: hard -"source-map-support@npm:^0.5.16, source-map-support@npm:^0.5.17, source-map-support@npm:^0.5.21, source-map-support@npm:~0.5.20": +"source-map-support@npm:^0.5.16, source-map-support@npm:^0.5.21, source-map-support@npm:~0.5.20": version: 0.5.21 resolution: "source-map-support@npm:0.5.21" dependencies: @@ -27922,6 +28213,13 @@ node-pty@beta: languageName: node linkType: hard +"split2@npm:^4.1.0": + version: 4.2.0 + resolution: "split2@npm:4.2.0" + checksum: b292beb8ce9215f8c642bb68be6249c5a4c7f332fc8ecadae7be5cbdf1ea95addc95f0459ef2e7ad9d45fd1064698a097e4eb211c83e772b49bc0ee423e91534 + languageName: node + linkType: hard + "split@npm:^1.0.0": version: 1.0.1 resolution: "split@npm:1.0.1" @@ -28023,7 +28321,14 @@ node-pty@beta: languageName: node linkType: hard -"statuses@npm:>= 1.4.0 < 2, statuses@npm:>= 1.5.0 < 2, statuses@npm:~1.5.0": +"statuses@npm:2.0.1": + version: 2.0.1 + resolution: "statuses@npm:2.0.1" + checksum: 34378b207a1620a24804ce8b5d230fea0c279f00b18a7209646d5d47e419d1cc23e7cbf33a25a1e51ac38973dc2ac2e1e9c647a8e481ef365f77668d72becfd0 + languageName: node + linkType: hard + +"statuses@npm:>= 1.4.0 < 2": version: 1.5.0 resolution: "statuses@npm:1.5.0" checksum: e433900956357b3efd79b1c547da4d291799ac836960c016d10a98f6a810b1b5c0dcc13b5a7aa609a58239b5190e1ea176ad9221c2157d2fd1c747393e6b2940 @@ -28080,16 +28385,9 @@ node-pty@beta: linkType: hard "string-argv@npm:~0.3.1": - version: 0.3.1 - resolution: "string-argv@npm:0.3.1" - checksum: f59582070f0a4a2d362d8331031f313771ad2b939b223b0593d7765de2689c975e0069186cef65977a29af9deec248c7e480ea4015d153ead754aea5e4bcfe7c - languageName: node - linkType: hard - -"string-env-interpolation@npm:1.0.1": - version: 1.0.1 - resolution: "string-env-interpolation@npm:1.0.1" - checksum: 410046e621e71678e71816377d799b40ba88d236708c0ad015114137fa3575f1b3cf14bfd63ec5eaa35ea43ac582308e60a8e1a3839a10f475b8db73470105bc + version: 0.3.2 + resolution: "string-argv@npm:0.3.2" + checksum: 75c02a83759ad1722e040b86823909d9a2fc75d15dd71ec4b537c3560746e33b5f5a07f7332d1e3f88319909f82190843aa2f0a0d8c8d591ec08e93d5b8dec82 languageName: node linkType: hard @@ -28120,7 +28418,7 @@ node-pty@beta: languageName: node linkType: hard -"string-width@npm:^1.0.2 || 2 || 3 || 4, string-width@npm:^4.0.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.2, string-width@npm:^4.2.3": +"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^1.0.2 || 2 || 3 || 4, string-width@npm:^4.0.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.2, string-width@npm:^4.2.3": version: 4.2.3 resolution: "string-width@npm:4.2.3" dependencies: @@ -28168,25 +28466,37 @@ node-pty@beta: languageName: node linkType: hard -"string.prototype.trimend@npm:^1.0.5": - version: 1.0.5 - resolution: "string.prototype.trimend@npm:1.0.5" +"string.prototype.trim@npm:^1.2.9": + version: 1.2.9 + resolution: "string.prototype.trim@npm:1.2.9" dependencies: - call-bind: ^1.0.2 - define-properties: ^1.1.4 - es-abstract: ^1.19.5 - checksum: efcb7d4e943366efde2786be9abf7a79ac9e427bb184aeb4c532ce81d7cb94e1a4d323b256f706dafe6ed5a4ee3d6025a65ec4337d47d07014802be5bcdd4864 + call-bind: ^1.0.7 + define-properties: ^1.2.1 + es-abstract: ^1.23.0 + es-object-atoms: ^1.0.0 + checksum: dcef1a0fb61d255778155006b372dff8cc6c4394bc39869117e4241f41a2c52899c0d263ffc7738a1f9e61488c490b05c0427faa15151efad721e1a9fb2663c2 languageName: node linkType: hard -"string.prototype.trimstart@npm:^1.0.5": - version: 1.0.5 - resolution: "string.prototype.trimstart@npm:1.0.5" +"string.prototype.trimend@npm:^1.0.8": + version: 1.0.8 + resolution: "string.prototype.trimend@npm:1.0.8" dependencies: - call-bind: ^1.0.2 - define-properties: ^1.1.4 - es-abstract: ^1.19.5 - checksum: c42d2f7732a98d9402aabcfb6ac05e4e36bbc429f5aa98bd199b5e55162b19b87db941ed68382c68ec6527a200a3d01cb3d4c16f668296c383e63693d8493772 + call-bind: ^1.0.7 + define-properties: ^1.2.1 + es-object-atoms: ^1.0.0 + checksum: 0a0b54c17c070551b38e756ae271865ac6cc5f60dabf2e7e343cceae7d9b02e1a1120a824e090e79da1b041a74464e8477e2da43e2775c85392be30a6f60963c + languageName: node + linkType: hard + +"string.prototype.trimstart@npm:^1.0.8": + version: 1.0.8 + resolution: "string.prototype.trimstart@npm:1.0.8" + dependencies: + call-bind: ^1.0.7 + define-properties: ^1.2.1 + es-object-atoms: ^1.0.0 + checksum: d53af1899959e53c83b64a5fd120be93e067da740e7e75acb433849aa640782fb6c7d4cd5b84c954c84413745a3764df135a8afeb22908b86a835290788d8366 languageName: node linkType: hard @@ -28226,6 +28536,15 @@ node-pty@beta: languageName: node linkType: hard +"strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": + version: 6.0.1 + resolution: "strip-ansi@npm:6.0.1" + dependencies: + ansi-regex: ^5.0.1 + checksum: 1ae5f212a126fe5b167707f716942490e3933085a5ff6c008ab97ab2f272c8025d3aa218b7bd6ab25729ca20cc81cddb252102f8751e13482a5199e873680952 + languageName: node + linkType: hard + "strip-ansi@npm:^4.0.0": version: 4.0.0 resolution: "strip-ansi@npm:4.0.0" @@ -28244,15 +28563,6 @@ node-pty@beta: languageName: node linkType: hard -"strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": - version: 6.0.1 - resolution: "strip-ansi@npm:6.0.1" - dependencies: - ansi-regex: ^5.0.1 - checksum: 1ae5f212a126fe5b167707f716942490e3933085a5ff6c008ab97ab2f272c8025d3aa218b7bd6ab25729ca20cc81cddb252102f8751e13482a5199e873680952 - languageName: node - linkType: hard - "strip-ansi@npm:^7.0.1": version: 7.0.1 resolution: "strip-ansi@npm:7.0.1" @@ -28283,13 +28593,6 @@ node-pty@beta: languageName: node linkType: hard -"strip-eof@npm:^1.0.0": - version: 1.0.0 - resolution: "strip-eof@npm:1.0.0" - checksum: f336beed8622f7c1dd02f2cbd8422da9208fae81daf184f73656332899978919d5c0ca84dc6cfc49ad1fc4dd7badcde5412a063cf4e0d7f8ed95a13a63f68f45 - languageName: node - linkType: hard - "strip-final-newline@npm:^2.0.0": version: 2.0.0 resolution: "strip-final-newline@npm:2.0.0" @@ -28306,7 +28609,7 @@ node-pty@beta: languageName: node linkType: hard -"strip-json-comments@npm:3.1.1, strip-json-comments@npm:^3.1.0, strip-json-comments@npm:^3.1.1, strip-json-comments@npm:~3.1.1": +"strip-json-comments@npm:^3.1.0, strip-json-comments@npm:^3.1.1, strip-json-comments@npm:~3.1.1": version: 3.1.1 resolution: "strip-json-comments@npm:3.1.1" checksum: 9681a6257b925a7fa0f285851c0e613cc934a50661fa7bb41ca9cbbff89686bb4a0ee366e6ecedc4daafd01e83eee0720111ab294366fe7c185e935475ebcecd @@ -28320,7 +28623,7 @@ node-pty@beta: languageName: node linkType: hard -"strnum@npm:^1.0.4, strnum@npm:^1.0.5": +"strnum@npm:^1.0.5": version: 1.0.5 resolution: "strnum@npm:1.0.5" checksum: 64fb8cc2effbd585a6821faa73ad97d4b553c8927e49086a162ffd2cc818787643390b89d567460a8e74300148d11ac052e21c921ef2049f2987f4b1b89a7ff1 @@ -28356,46 +28659,15 @@ node-pty@beta: languageName: node linkType: hard -"style-mod@npm:^4.0.0": - version: 4.0.0 - resolution: "style-mod@npm:4.0.0" - checksum: 9720b81d4023174ee7680c844b84aacf1026d96ab1d9fc42d09acaf9c82358860fbd9322308154c9449c86a612d94408a6978e1a3847b2cd38c7157443c9b437 - languageName: node - linkType: hard - -"stylehacks@npm:^5.1.0": - version: 5.1.0 - resolution: "stylehacks@npm:5.1.0" +"stylehacks@npm:^6.0.0": + version: 6.0.0 + resolution: "stylehacks@npm:6.0.0" dependencies: - browserslist: ^4.16.6 + browserslist: ^4.21.4 postcss-selector-parser: ^6.0.4 peerDependencies: postcss: ^8.2.15 - checksum: 2c46413f9c21617f2537522ee89bd88416cf0dd1d4a7998da4445666cbd01364ec371ae326c2978df36ea020d1f161aa478feb70c7bb32e8085b0857e552c603 - languageName: node - linkType: hard - -"subscriptions-transport-ws@npm:^0.11.0": - version: 0.11.0 - resolution: "subscriptions-transport-ws@npm:0.11.0" - dependencies: - backo2: ^1.0.2 - eventemitter3: ^3.1.0 - iterall: ^1.2.1 - symbol-observable: ^1.0.4 - ws: ^5.2.0 || ^6.0.0 || ^7.0.0 - peerDependencies: - graphql: ^15.7.2 || ^16.0.0 - checksum: 697441333e59b6932bff51212e29f8dcac477badb067971bd94c30c5f3f7a2e2ea72fb1a21f3c1abbf32774da01515aa24739e620be45f6d576784bd96fd10da - languageName: node - linkType: hard - -"supports-color@npm:8.1.1, supports-color@npm:^8.0.0": - version: 8.1.1 - resolution: "supports-color@npm:8.1.1" - dependencies: - has-flag: ^4.0.0 - checksum: ea1d3c275dd604c974670f63943ed9bd83623edc102430c05adb8efc56ba492746b6e95386e7831b872ec3807fd89dd8eb43f735195f37b5ec343e4234cc7e89 + checksum: 6ce277c816dd826fdc765258d612a160bad03dae52ab51ef1676efae07e96923ebeb6880d6522eefc50d2e81cb90b632615120c73aed190f345e8d836def67b6 languageName: node linkType: hard @@ -28408,7 +28680,7 @@ node-pty@beta: languageName: node linkType: hard -"supports-color@npm:^5.3.0, supports-color@npm:^5.5.0": +"supports-color@npm:^5.3.0": version: 5.5.0 resolution: "supports-color@npm:5.5.0" dependencies: @@ -28417,7 +28689,7 @@ node-pty@beta: languageName: node linkType: hard -"supports-color@npm:^7.0.0, supports-color@npm:^7.1.0, supports-color@npm:^7.2.0": +"supports-color@npm:^7, supports-color@npm:^7.0.0, supports-color@npm:^7.1.0": version: 7.2.0 resolution: "supports-color@npm:7.2.0" dependencies: @@ -28426,6 +28698,15 @@ node-pty@beta: languageName: node linkType: hard +"supports-color@npm:^8.0.0, supports-color@npm:^8.1.1": + version: 8.1.1 + resolution: "supports-color@npm:8.1.1" + dependencies: + has-flag: ^4.0.0 + checksum: ea1d3c275dd604c974670f63943ed9bd83623edc102430c05adb8efc56ba492746b6e95386e7831b872ec3807fd89dd8eb43f735195f37b5ec343e4234cc7e89 + languageName: node + linkType: hard + "supports-preserve-symlinks-flag@npm:^1.0.0": version: 1.0.0 resolution: "supports-preserve-symlinks-flag@npm:1.0.0" @@ -28463,20 +28744,19 @@ node-pty@beta: languageName: node linkType: hard -"svgo@npm:^2.7.0": - version: 2.8.0 - resolution: "svgo@npm:2.8.0" +"svgo@npm:^3.0.2": + version: 3.0.3 + resolution: "svgo@npm:3.0.3" dependencies: "@trysound/sax": 0.2.0 commander: ^7.2.0 - css-select: ^4.1.3 - css-tree: ^1.1.3 - csso: ^4.2.0 + css-select: ^5.1.0 + css-tree: ^2.2.1 + csso: 5.0.5 picocolors: ^1.0.0 - stable: ^0.1.8 bin: - svgo: bin/svgo - checksum: 0741f5d5cad63111a90a0ce7a1a5a9013f6d293e871b75efe39addb57f29a263e45294e485a4d2ff9cc260a5d142c8b5937b2234b4ef05efdd2706fb2d360ecc + svgo: ./bin/svgo + checksum: cf107e9fa29914504aa65f5f514e16b73aa76adb1c67c84312d3f2402f4bf00b8b6b0d62e3cce247cf16017c24b8191eb003c2f99f8e10844ad8803acb9d806c languageName: node linkType: hard @@ -28489,23 +28769,13 @@ node-pty@beta: languageName: node linkType: hard -"symbol-observable@npm:^1.0.2, symbol-observable@npm:^1.0.3, symbol-observable@npm:^1.0.4": +"symbol-observable@npm:^1.0.2, symbol-observable@npm:^1.0.3": version: 1.2.0 resolution: "symbol-observable@npm:1.2.0" checksum: 009fee50798ef80ed4b8195048288f108b03de162db07493f2e1fd993b33fafa72d659e832b584da5a2427daa78e5a738fb2a9ab027ee9454252e0bedbcd1fdc languageName: node linkType: hard -"sync-fetch@npm:^0.3.1": - version: 0.3.1 - resolution: "sync-fetch@npm:0.3.1" - dependencies: - buffer: ^5.7.0 - node-fetch: ^2.6.1 - checksum: 757d534e57f79420872a8fa71f335fd526150328cccd31db32631e0397fdd56450b3f5acf8e66b177c57ac4233d2536ab0aabef8c7e0802b46dfeef9c0d87b6a - languageName: node - linkType: hard - "synckit@npm:^0.8.5": version: 0.8.5 resolution: "synckit@npm:0.8.5" @@ -28516,16 +28786,16 @@ node-pty@beta: languageName: node linkType: hard -"table@npm:^6.0.9, table@npm:^6.8.1": - version: 6.8.1 - resolution: "table@npm:6.8.1" +"table@npm:^6.0.9, table@npm:^6.8.1, table@npm:^6.8.2": + version: 6.9.0 + resolution: "table@npm:6.9.0" dependencies: ajv: ^8.0.1 lodash.truncate: ^4.4.2 slice-ansi: ^4.0.0 string-width: ^4.2.3 strip-ansi: ^6.0.1 - checksum: 591ed84b2438b01c9bc02248e2238e21e8bfb73654bc5acca0d469053eb39be3db2f57d600dcf08ac983b6f50f80842c44612c03877567c2afee3aec4a033e5f + checksum: 35646185712bb65985fbae5975dda46696325844b78735f95faefae83e86df0a265277819a3e67d189de6e858c509b54e66ca3958ffd51bde56ef1118d455bf4 languageName: node linkType: hard @@ -28602,17 +28872,17 @@ node-pty@beta: languageName: node linkType: hard -"tar@npm:6.1.11, tar@npm:^6.1.11, tar@npm:^6.1.2": - version: 6.1.11 - resolution: "tar@npm:6.1.11" +"tar@npm:^6.2.1": + version: 6.2.1 + resolution: "tar@npm:6.2.1" dependencies: chownr: ^2.0.0 fs-minipass: ^2.0.0 - minipass: ^3.0.0 + minipass: ^5.0.0 minizlib: ^2.1.1 mkdirp: ^1.0.3 yallist: ^4.0.0 - checksum: 5a016f5330f43815420797b87ade578e2ea60affd47439c988a3fc8f7bb6b36450d627c31ba6a839346fae248b4c8c12bb06bb0716211f37476838c7eff91f05 + checksum: a5eca3eb50bc11552d453488344e6507156b9193efd7635e98e867fab275d527af53d8866e2370cd09dfe74378a18111622ace35af6a608e5223a7d27fe99537 languageName: node linkType: hard @@ -28682,15 +28952,15 @@ node-pty@beta: languageName: node linkType: hard -"terser-webpack-plugin@npm:^5.1.3, terser-webpack-plugin@npm:^5.2.5": - version: 5.3.1 - resolution: "terser-webpack-plugin@npm:5.3.1" +"terser-webpack-plugin@npm:^5.2.5, terser-webpack-plugin@npm:^5.3.10": + version: 5.3.10 + resolution: "terser-webpack-plugin@npm:5.3.10" dependencies: + "@jridgewell/trace-mapping": ^0.3.20 jest-worker: ^27.4.5 schema-utils: ^3.1.1 - serialize-javascript: ^6.0.0 - source-map: ^0.6.1 - terser: ^5.7.2 + serialize-javascript: ^6.0.1 + terser: ^5.26.0 peerDependencies: webpack: ^5.1.0 peerDependenciesMeta: @@ -28700,21 +28970,21 @@ node-pty@beta: optional: true uglify-js: optional: true - checksum: e23d849d40b1f062c839ba56b2c8af4837d8edf57fc8cbe2ebce7983476d20c687bdb201d38f1f001c3e40c800f7d7826397434ea36aab4f0fad671218902b6c + checksum: 66d1ed3174542560911cf96f4716aeea8d60e7caab212291705d50072b6ba844c7391442541b13c848684044042bea9ec87512b8506528c12854943da05faf91 languageName: node linkType: hard -"terser@npm:^5.0.0, terser@npm:^5.10.0, terser@npm:^5.7.2": - version: 5.14.2 - resolution: "terser@npm:5.14.2" +"terser@npm:^5.0.0, terser@npm:^5.10.0, terser@npm:^5.26.0": + version: 5.31.6 + resolution: "terser@npm:5.31.6" dependencies: - "@jridgewell/source-map": ^0.3.2 - acorn: ^8.5.0 + "@jridgewell/source-map": ^0.3.3 + acorn: ^8.8.2 commander: ^2.20.0 source-map-support: ~0.5.20 bin: terser: bin/terser - checksum: d83b2610ed60840a4ea84fb5b497a501730f55dfa92b8e018a5464b843d4fa23a8fbb0dfd5c28993abca1822c971047c291c6b8aca92af2d1fea074d2cad6a8c + checksum: b17d02b65a52a5041430572b3c514475820f5e7590fa93773c0f5b4be601ccf3f6d745bf5a79f3ee58187cf85edf61c24ddf4345783839fccb44c9c8fa9b427e languageName: node linkType: hard @@ -28899,13 +29169,15 @@ node-pty@beta: languageName: node linkType: hard -"tough-cookie@npm:~2.5.0": - version: 2.5.0 - resolution: "tough-cookie@npm:2.5.0" +"tough-cookie@npm:^4.1.3": + version: 4.1.3 + resolution: "tough-cookie@npm:4.1.3" dependencies: - psl: ^1.1.28 + psl: ^1.1.33 punycode: ^2.1.1 - checksum: e1cadfb24d40d64ca16de05fa8192bc097b66aeeb2704199b055ff12f450e4f30c927ce250f53d01f39baad18e1c11d66f65e545c5c6269de4c366fafa4c0543 + universalify: ^0.2.0 + url-parse: ^1.5.3 + checksum: 4fc0433a0cba370d57c4b240f30440c848906dee3180bb6e85033143c2726d322e7e4614abb51d42d111ebec119c4876ed8d7247d4113563033eebbc1739c831 languageName: node linkType: hard @@ -28925,13 +29197,6 @@ node-pty@beta: languageName: node linkType: hard -"traverse@npm:^0.6.6": - version: 0.6.6 - resolution: "traverse@npm:0.6.6" - checksum: 72b2c95463e991063cfa3603dc80e8ca35cae4bf1a736e5b6df3a50226dca341777699f702b55f61b9a329e7be0a76fb77d994f4981f49de98bb02065ca1e7d9 - languageName: node - linkType: hard - "treeify@npm:^1.1.0": version: 1.1.0 resolution: "treeify@npm:1.1.0" @@ -29085,27 +29350,6 @@ node-pty@beta: languageName: node linkType: hard -"ts-node@npm:^9": - version: 9.1.1 - resolution: "ts-node@npm:9.1.1" - dependencies: - arg: ^4.1.0 - create-require: ^1.1.0 - diff: ^4.0.1 - make-error: ^1.1.1 - source-map-support: ^0.5.17 - yn: 3.1.1 - peerDependencies: - typescript: ">=2.7" - bin: - ts-node: dist/bin.js - ts-node-script: dist/bin-script.js - ts-node-transpile-only: dist/bin-transpile.js - ts-script: dist/bin-script-deprecated.js - checksum: e0f904090aba4b3496fdfca640cfd92c1f5a41fa303b0ccb40f49be160699687a97a4dd5f57200646a3b83528952611d1c5ad5804ee25f338b017e7b1c13f0f4 - languageName: node - linkType: hard - "tsconfig-paths@npm:^3.14.1": version: 3.14.1 resolution: "tsconfig-paths@npm:3.14.1" @@ -29136,10 +29380,10 @@ node-pty@beta: languageName: node linkType: hard -"tslib@npm:^2, tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.3.0, tslib@npm:^2.4.0, tslib@npm:^2.5.0": - version: 2.5.0 - resolution: "tslib@npm:2.5.0" - checksum: e32fc99cc730dd514e53c44e668d76016e738f0bcc726aad5dbd2d335cf19b87a95a9b1e4f0a9993e370f1d702b5e471cdd4acabcac428a3099d496b9af2021e +"tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.3.0, tslib@npm:^2.3.1, tslib@npm:^2.4.0, tslib@npm:^2.5.0, tslib@npm:^2.6.2": + version: 2.8.0 + resolution: "tslib@npm:2.8.0" + checksum: 31e4d14dc1355e9b89e4d3c893a18abb7f90b6886b089c2da91224d0a7752c79f3ddc41bc1aa0a588ac895bd97bb99c5bc2bfdb2f86de849f31caeb3ba79bbe5 languageName: node linkType: hard @@ -29306,6 +29550,58 @@ node-pty@beta: languageName: node linkType: hard +"typed-array-buffer@npm:^1.0.2": + version: 1.0.2 + resolution: "typed-array-buffer@npm:1.0.2" + dependencies: + call-bind: ^1.0.7 + es-errors: ^1.3.0 + is-typed-array: ^1.1.13 + checksum: 9e043eb38e1b4df4ddf9dde1aa64919ae8bb909571c1cc4490ba777d55d23a0c74c7d73afcdd29ec98616d91bb3ae0f705fad4421ea147e1daf9528200b562da + languageName: node + linkType: hard + +"typed-array-byte-length@npm:^1.0.1": + version: 1.0.1 + resolution: "typed-array-byte-length@npm:1.0.1" + dependencies: + call-bind: ^1.0.7 + for-each: ^0.3.3 + gopd: ^1.0.1 + has-proto: ^1.0.3 + is-typed-array: ^1.1.13 + checksum: fcebeffb2436c9f355e91bd19e2368273b88c11d1acc0948a2a306792f1ab672bce4cfe524ab9f51a0505c9d7cd1c98eff4235c4f6bfef6a198f6cfc4ff3d4f3 + languageName: node + linkType: hard + +"typed-array-byte-offset@npm:^1.0.2": + version: 1.0.2 + resolution: "typed-array-byte-offset@npm:1.0.2" + dependencies: + available-typed-arrays: ^1.0.7 + call-bind: ^1.0.7 + for-each: ^0.3.3 + gopd: ^1.0.1 + has-proto: ^1.0.3 + is-typed-array: ^1.1.13 + checksum: d2628bc739732072e39269389a758025f75339de2ed40c4f91357023c5512d237f255b633e3106c461ced41907c1bf9a533c7e8578066b0163690ca8bc61b22f + languageName: node + linkType: hard + +"typed-array-length@npm:^1.0.6": + version: 1.0.6 + resolution: "typed-array-length@npm:1.0.6" + dependencies: + call-bind: ^1.0.7 + for-each: ^0.3.3 + gopd: ^1.0.1 + has-proto: ^1.0.3 + is-typed-array: ^1.1.13 + possible-typed-array-names: ^1.0.0 + checksum: 74253d7dc488eb28b6b2711cf31f5a9dcefc9c41b0681fd1c178ed0a1681b4468581a3626d39cd4df7aee3d3927ab62be06aa9ca74e5baf81827f61641445b77 + languageName: node + linkType: hard + "typedarray-to-buffer@npm:^3.1.5": version: 3.1.5 resolution: "typedarray-to-buffer@npm:3.1.5" @@ -29349,7 +29645,7 @@ node-pty@beta: languageName: node linkType: hard -"typescript@npm:^3 || ^4, typescript@npm:^4.9.5": +"typescript@npm:^3 || ^4, typescript@npm:^4.8.4, typescript@npm:^4.9.5": version: 4.9.5 resolution: "typescript@npm:4.9.5" bin: @@ -29360,12 +29656,12 @@ node-pty@beta: linkType: hard "typescript@npm:^4.6.4 || ^5.0.0": - version: 5.0.4 - resolution: "typescript@npm:5.0.4" + version: 5.1.3 + resolution: "typescript@npm:5.1.3" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 2f5bd1cead194905957cb34e220b1d6ff1662399adef8ec1864f74620922d860ee35b6e50eafb3b636ea6fd437195e454e1146cb630a4236b5095ed7617395c2 + checksum: 1faba8d5ffd4717864ddce767613c5ab77c1c8510c1ce21dc9b112a4c662357b9338dc0a6121615266d3a44ebec699f115ef2dabf18d9d7341ea1675692b9b24 languageName: node linkType: hard @@ -29389,7 +29685,7 @@ node-pty@beta: languageName: node linkType: hard -"typescript@patch:typescript@^3 || ^4#~builtin, typescript@patch:typescript@^4.9.5#~builtin": +"typescript@patch:typescript@^3 || ^4#~builtin, typescript@patch:typescript@^4.8.4#~builtin, typescript@patch:typescript@^4.9.5#~builtin": version: 4.9.5 resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=23ec76" bin: @@ -29400,12 +29696,12 @@ node-pty@beta: linkType: hard "typescript@patch:typescript@^4.6.4 || ^5.0.0#~builtin": - version: 5.0.4 - resolution: "typescript@patch:typescript@npm%3A5.0.4#~builtin::version=5.0.4&hash=85af82" + version: 5.1.3 + resolution: "typescript@patch:typescript@npm%3A5.1.3#~builtin::version=5.1.3&hash=85af82" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: eec385fd53e1800b0986bac2889deafee8e1910ce10108a5fe10644422426f71625c47b3e78e042371df16592881b1b1f97884ab45dc993f3b96a5c954f65dc2 + checksum: 6219383250b585b201c9ea10576164c9d5760c7a167bc761b118692c9fb8e88610f37730c0a1169d96ac19b29ed80418048763d0c1ff00ce48e051abbc213a9b languageName: node linkType: hard @@ -29470,12 +29766,10 @@ node-pty@beta: languageName: node linkType: hard -"undici@npm:^5.8.0": - version: 5.22.0 - resolution: "undici@npm:5.22.0" - dependencies: - busboy: ^1.6.0 - checksum: a9c1d5bdac6aa95fb623bd9bbba3f2c190556e5c03c7a5d904fbded257ca52de0cfcdfc921e4f8d82a349bacf6d6d2437e905fb9e14435a7347fd76f2303bf0a +"undici-types@npm:~5.26.4": + version: 5.26.5 + resolution: "undici-types@npm:5.26.5" + checksum: bb673d7876c2d411b6eb6c560e0c571eef4a01c1c19925175d16e3a30c4c428181fb8d7ae802a261f283e4166a0ac435e2f505743aa9e45d893f9a3df017b501 languageName: node linkType: hard @@ -29595,6 +29889,13 @@ node-pty@beta: languageName: node linkType: hard +"universalify@npm:^0.2.0": + version: 0.2.0 + resolution: "universalify@npm:0.2.0" + checksum: cedbe4d4ca3967edf24c0800cfc161c5a15e240dac28e3ce575c689abc11f2c81ccc6532c8752af3b40f9120fb5e454abecd359e164f4f6aa44c29cd37e194fe + languageName: node + linkType: hard + "universalify@npm:^2.0.0": version: 2.0.0 resolution: "universalify@npm:2.0.0" @@ -29602,15 +29903,6 @@ node-pty@beta: languageName: node linkType: hard -"unixify@npm:^1.0.0": - version: 1.0.0 - resolution: "unixify@npm:1.0.0" - dependencies: - normalize-path: ^2.1.1 - checksum: 8b89100619ebde9f0ab4024a4d402316fb7b1d4853723410fc828944e8d3d01480f210cddf94d9a1699559f8180d861eb6323da8011b7bcc1bbaf6a11a5b1f1e - languageName: node - linkType: hard - "unpipe@npm:1.0.0, unpipe@npm:~1.0.0": version: 1.0.0 resolution: "unpipe@npm:1.0.0" @@ -29646,17 +29938,17 @@ node-pty@beta: languageName: node linkType: hard -"update-browserslist-db@npm:^1.0.9": - version: 1.0.10 - resolution: "update-browserslist-db@npm:1.0.10" +"update-browserslist-db@npm:^1.1.0": + version: 1.1.0 + resolution: "update-browserslist-db@npm:1.1.0" dependencies: - escalade: ^3.1.1 - picocolors: ^1.0.0 + escalade: ^3.1.2 + picocolors: ^1.0.1 peerDependencies: browserslist: ">= 4.21.0" bin: - browserslist-lint: cli.js - checksum: e6fa55b515a674cc3b6c045d1f37f72780ddbbbb48b3094391fb2e43357b859ca5cee4c7d3055fd654d442ef032777d0972494a9a2e6c30d3660ee57b7138ae9 + update-browserslist-db: cli.js + checksum: a7452de47785842736fb71547651c5bbe5b4dc1e3722ccf48a704b7b34e4dcf633991eaa8e4a6a517ffb738b3252eede3773bef673ef9021baa26b056d63a5b9 languageName: node linkType: hard @@ -29731,6 +30023,16 @@ node-pty@beta: languageName: node linkType: hard +"url-parse@npm:^1.5.3": + version: 1.5.10 + resolution: "url-parse@npm:1.5.10" + dependencies: + querystringify: ^2.1.1 + requires-port: ^1.0.0 + checksum: bd5aa9389f896974beb851c112f63b466505a04b4807cea2e5a3b7092f6fbb75316f0491ea84e44f66fed55f1b440df5195d7e3a8203f64fcefa19d182f5be87 + languageName: node + linkType: hard + "url@npm:0.10.3": version: 0.10.3 resolution: "url@npm:0.10.3" @@ -29741,7 +30043,7 @@ node-pty@beta: languageName: node linkType: hard -"url@npm:^0.11.0": +"url@npm:0.11.0, url@npm:^0.11.0": version: 0.11.0 resolution: "url@npm:0.11.0" dependencies: @@ -29760,6 +30062,13 @@ node-pty@beta: languageName: node linkType: hard +"urlpattern-polyfill@npm:^9.0.0": + version: 9.0.0 + resolution: "urlpattern-polyfill@npm:9.0.0" + checksum: 1fecb4a7695ad7917b02193896ec7b5773bb730ee3fbbb583cfaf134cc99da054c18560a35e7e901ad4e2f7a6035b6754313a2bb84126a7f118201427d465185 + languageName: node + linkType: hard + "util-deprecate@npm:^1.0.1, util-deprecate@npm:^1.0.2, util-deprecate@npm:~1.0.1": version: 1.0.2 resolution: "util-deprecate@npm:1.0.2" @@ -29807,16 +30116,7 @@ node-pty@beta: languageName: node linkType: hard -"uuid@npm:3.3.2": - version: 3.3.2 - resolution: "uuid@npm:3.3.2" - bin: - uuid: ./bin/uuid - checksum: 847bd7b389f44d05cf5341134d52803116b616c7344f12c74040effd75280b58273ea3a2bee6ba6e5405688c5edbb0696f4adcbc89e1206dc1d8650bdaece7a6 - languageName: node - linkType: hard - -"uuid@npm:3.x, uuid@npm:^3.0.0, uuid@npm:^3.2.1, uuid@npm:^3.3.2": +"uuid@npm:3.4.0, uuid@npm:3.x, uuid@npm:^3.0.0, uuid@npm:^3.2.1, uuid@npm:^3.3.2": version: 3.4.0 resolution: "uuid@npm:3.4.0" bin: @@ -29843,6 +30143,15 @@ node-pty@beta: languageName: node linkType: hard +"uuid@npm:^9.0.1": + version: 9.0.1 + resolution: "uuid@npm:9.0.1" + bin: + uuid: dist/bin/uuid + checksum: 1607dd32ac7fc22f2d8f77051e6a64845c9bce5cd3dd8aa0070c074ec73e666a1f63c7b4e0f4bf2bc8b9d59dc85a15e17807446d9d2b17c8485fbc2147b27f9b + languageName: node + linkType: hard + "v8-compile-cache-lib@npm:^3.0.1": version: 3.0.1 resolution: "v8-compile-cache-lib@npm:3.0.1" @@ -29868,13 +30177,6 @@ node-pty@beta: languageName: node linkType: hard -"valid-url@npm:^1.0.9": - version: 1.0.9 - resolution: "valid-url@npm:1.0.9" - checksum: 3995e65f9942dbcb1621754c0f9790335cec61e9e9310c0a809e9ae0e2ae91bb7fc6a471fba788e979db0418d9806639f681ecebacc869bc8c3de88efa562ee6 - languageName: node - linkType: hard - "validate-npm-package-license@npm:3.0.4, validate-npm-package-license@npm:^3.0.1, validate-npm-package-license@npm:^3.0.4": version: 3.0.4 resolution: "validate-npm-package-license@npm:3.0.4" @@ -29926,7 +30228,7 @@ node-pty@beta: languageName: node linkType: hard -"value-or-promise@npm:1.0.12, value-or-promise@npm:^1.0.11": +"value-or-promise@npm:1.0.12": version: 1.0.12 resolution: "value-or-promise@npm:1.0.12" checksum: b75657b74e4d17552bd88e0c2857020fbab34a4d091dc058db18c470e7da0336067e72c130b3358e3321ac0a6ff11c0b92b67a382318a3705ad5d57de7ff3262 @@ -29960,29 +30262,10 @@ node-pty@beta: languageName: node linkType: hard -"vm2@npm:^3.9.19, vm2@npm:^3.9.3, vm2@npm:^3.9.8": - version: 3.9.19 - resolution: "vm2@npm:3.9.19" - dependencies: - acorn: ^8.7.0 - acorn-walk: ^8.2.0 - bin: - vm2: bin/vm2 - checksum: 16e8e6bb389ae88b8ffbc439e8d7c09db3b98f7f738440af5b78080d6cb35db66b41b0ad055cc59bcc45cb8e270ed850667207348e90760b430403741f72337a - languageName: node - linkType: hard - -"vscode-languageserver-types@npm:^3.15.1": - version: 3.16.0 - resolution: "vscode-languageserver-types@npm:3.16.0" - checksum: cc1bd68a7fe94152849e434cfc6fd8471f5c17198057fc6c95814d4b1655ab2b76d577b5fcd0f1f2a5df0285f054c96b9698e6d33e8183846f152d6e7d3ecc97 - languageName: node - linkType: hard - -"w3c-keyname@npm:^2.2.4": - version: 2.2.4 - resolution: "w3c-keyname@npm:2.2.4" - checksum: 22ea3a82788741db91342e3e224f39257b44809beb220353424e4cf03db8e615fbeee25b9a9ec2e1d803505ed69b674a1c1afe3c64a3abc0bb72353c41d3dfd3 +"vscode-languageserver-types@npm:^3.17.1": + version: 3.17.5 + resolution: "vscode-languageserver-types@npm:3.17.5" + checksum: 1e1260de79a2cc8de3e46f2e0182cdc94a7eddab487db5a3bd4ee716f67728e685852707d72c059721ce500447be9a46764a04f0611e94e4321ffa088eef36f8 languageName: node linkType: hard @@ -30024,13 +30307,13 @@ node-pty@beta: languageName: node linkType: hard -"watchpack@npm:^2.4.0": - version: 2.4.0 - resolution: "watchpack@npm:2.4.0" +"watchpack@npm:^2.4.1": + version: 2.4.2 + resolution: "watchpack@npm:2.4.2" dependencies: glob-to-regexp: ^0.4.1 graceful-fs: ^4.1.2 - checksum: c5e35f9fb9338d31d2141d9835643c0f49b5f9c521440bb648181059e5940d93dd8ed856aa8a33fbcdd4e121dad63c7e8c15c063cf485429cd9d427be197fe62 + checksum: ec60a5f0e9efaeca0102fd9126346b3b2d523e01c34030d3fddf5813a7125765121ebdc2552981136dcd2c852deb1af0b39340f2fcc235f292db5399d0283577 languageName: node linkType: hard @@ -30052,13 +30335,6 @@ node-pty@beta: languageName: node linkType: hard -"web-streams-polyfill@npm:4.0.0-beta.1": - version: 4.0.0-beta.1 - resolution: "web-streams-polyfill@npm:4.0.0-beta.1" - checksum: 4d7243a815c403d1960c78ff29411d12233a50beb90c87f95752b0e7cde24b2ae436ba9e5675a8b66922956ef06b50b1e651da59e2df23871833d1f68d4a2d95 - languageName: node - linkType: hard - "web-vitals@npm:^0.2.4": version: 0.2.4 resolution: "web-vitals@npm:0.2.4" @@ -30080,62 +30356,72 @@ node-pty@beta: languageName: node linkType: hard -"webpack-dev-middleware@npm:^5.3.1": - version: 5.3.1 - resolution: "webpack-dev-middleware@npm:5.3.1" +"webidl-conversions@npm:^5.0.0": + version: 5.0.0 + resolution: "webidl-conversions@npm:5.0.0" + checksum: bf31df332ed11e1114bfcae7712d9ab2c37e7faa60ba32d8fdbee785937c0b012eee235c19d2b5d84f5072db84a160e8d08dd382da7f850feec26a4f46add8ff + languageName: node + linkType: hard + +"webpack-dev-middleware@npm:^5.3.4": + version: 5.3.4 + resolution: "webpack-dev-middleware@npm:5.3.4" dependencies: colorette: ^2.0.10 - memfs: ^3.4.1 + memfs: ^3.4.3 mime-types: ^2.1.31 range-parser: ^1.2.1 schema-utils: ^4.0.0 peerDependencies: webpack: ^4.0.0 || ^5.0.0 - checksum: 705553c7af45eae6d8f93c5d8e6a6254085d7e1a7a789c58b1aec1c6c6c8f4bb65d5663a7c34c793920351d3c580cf566690d4fd5776a198d39a3b2c708e6ca5 + checksum: 257df7d6bc5494d1d3cb66bba70fbdf5a6e0423e39b6420f7631aeb52435afbfbff8410a62146dcdf3d2f945c62e03193aae2ac1194a2f7d5a2523b9d194e9e1 languageName: node linkType: hard -"webpack-dev-server@npm:^4.6.0": - version: 4.8.1 - resolution: "webpack-dev-server@npm:4.8.1" +"webpack-dev-server@npm:^4.15.2": + version: 4.15.2 + resolution: "webpack-dev-server@npm:4.15.2" dependencies: "@types/bonjour": ^3.5.9 "@types/connect-history-api-fallback": ^1.3.5 "@types/express": ^4.17.13 "@types/serve-index": ^1.9.1 + "@types/serve-static": ^1.13.10 "@types/sockjs": ^0.3.33 - "@types/ws": ^8.5.1 + "@types/ws": ^8.5.5 ansi-html-community: ^0.0.8 bonjour-service: ^1.0.11 chokidar: ^3.5.3 colorette: ^2.0.10 compression: ^1.7.4 - connect-history-api-fallback: ^1.6.0 + connect-history-api-fallback: ^2.0.0 default-gateway: ^6.0.3 express: ^4.17.3 graceful-fs: ^4.2.6 html-entities: ^2.3.2 http-proxy-middleware: ^2.0.3 ipaddr.js: ^2.0.1 + launch-editor: ^2.6.0 open: ^8.0.9 p-retry: ^4.5.0 - portfinder: ^1.0.28 rimraf: ^3.0.2 schema-utils: ^4.0.0 - selfsigned: ^2.0.1 + selfsigned: ^2.1.1 serve-index: ^1.9.1 - sockjs: ^0.3.21 + sockjs: ^0.3.24 spdy: ^4.0.2 - webpack-dev-middleware: ^5.3.1 - ws: ^8.4.2 + webpack-dev-middleware: ^5.3.4 + ws: ^8.13.0 peerDependencies: webpack: ^4.37.0 || ^5.0.0 peerDependenciesMeta: + webpack: + optional: true webpack-cli: optional: true bin: webpack-dev-server: bin/webpack-dev-server.js - checksum: 9ba5b127e3ef51f9a24df35563042b61f60473d319b895fa5877a1c1b4d5e03214605423db7c6a9ddb5c70616933e4a62eb5038acfe0beee2341c3bf792eeccf + checksum: 625bd5b79360afcf98782c8b1fd710b180bb0e96d96b989defff550c546890010ceea82ffbecb2a0a23f7f018bc72f2dee7b3070f7b448fb0110df6657fb2904 languageName: node linkType: hard @@ -30179,39 +30465,38 @@ node-pty@beta: linkType: hard "webpack@npm:^5.64.4": - version: 5.76.0 - resolution: "webpack@npm:5.76.0" - dependencies: - "@types/eslint-scope": ^3.7.3 - "@types/estree": ^0.0.51 - "@webassemblyjs/ast": 1.11.1 - "@webassemblyjs/wasm-edit": 1.11.1 - "@webassemblyjs/wasm-parser": 1.11.1 + version: 5.94.0 + resolution: "webpack@npm:5.94.0" + dependencies: + "@types/estree": ^1.0.5 + "@webassemblyjs/ast": ^1.12.1 + "@webassemblyjs/wasm-edit": ^1.12.1 + "@webassemblyjs/wasm-parser": ^1.12.1 acorn: ^8.7.1 - acorn-import-assertions: ^1.7.6 - browserslist: ^4.14.5 + acorn-import-attributes: ^1.9.5 + browserslist: ^4.21.10 chrome-trace-event: ^1.0.2 - enhanced-resolve: ^5.10.0 - es-module-lexer: ^0.9.0 + enhanced-resolve: ^5.17.1 + es-module-lexer: ^1.2.1 eslint-scope: 5.1.1 events: ^3.2.0 glob-to-regexp: ^0.4.1 - graceful-fs: ^4.2.9 + graceful-fs: ^4.2.11 json-parse-even-better-errors: ^2.3.1 loader-runner: ^4.2.0 mime-types: ^2.1.27 neo-async: ^2.6.2 - schema-utils: ^3.1.0 + schema-utils: ^3.2.0 tapable: ^2.1.1 - terser-webpack-plugin: ^5.1.3 - watchpack: ^2.4.0 + terser-webpack-plugin: ^5.3.10 + watchpack: ^2.4.1 webpack-sources: ^3.2.3 peerDependenciesMeta: webpack-cli: optional: true bin: webpack: bin/webpack.js - checksum: 0a287f725a0873dadd35c2318a651356934c9fd69ae2bcaaa4a177f8e65184fb2fd2c09434cb632673bcb8274f0c246d243f0b008720143f19d52ea43e06a038 + checksum: b4d1b751f634079bd177a89eef84d80fa5bb8d6fc15d72ab40fc2b9ca5167a79b56585e1a849e9e27e259803ee5c4365cb719e54af70a43c06358ec268ff4ebf languageName: node linkType: hard @@ -30247,6 +30532,17 @@ node-pty@beta: languageName: node linkType: hard +"whatwg-url-without-unicode@npm:8.0.0-3": + version: 8.0.0-3 + resolution: "whatwg-url-without-unicode@npm:8.0.0-3" + dependencies: + buffer: ^5.4.3 + punycode: ^2.1.1 + webidl-conversions: ^5.0.0 + checksum: c27a637ab7d01981b2e2f576fde2113b9c42247500e093d2f5ba94b515d5c86dbcf70e5cad4b21b8813185f21fa1b4846f53c79fa87995293457e28c889cc0fd + languageName: node + linkType: hard + "whatwg-url@npm:^5.0.0": version: 5.0.0 resolution: "whatwg-url@npm:5.0.0" @@ -30288,39 +30584,38 @@ node-pty@beta: languageName: node linkType: hard -"which-typed-array@npm:^1.1.2": - version: 1.1.7 - resolution: "which-typed-array@npm:1.1.7" +"which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.15, which-typed-array@npm:^1.1.2": + version: 1.1.15 + resolution: "which-typed-array@npm:1.1.15" dependencies: - available-typed-arrays: ^1.0.5 - call-bind: ^1.0.2 - es-abstract: ^1.18.5 - foreach: ^2.0.5 - has-tostringtag: ^1.0.0 - is-typed-array: ^1.1.7 - checksum: 3b22173c483037c672a2a82cf19dbbd9446bf34cf8d0a5b8f8eefdcda85f821a0f8352cdf1a8c6181b40b6cc55be58f53e90eb18523e96b6cef1bf0633454d7d + available-typed-arrays: ^1.0.7 + call-bind: ^1.0.7 + for-each: ^0.3.3 + gopd: ^1.0.1 + has-tostringtag: ^1.0.2 + checksum: 4465d5348c044032032251be54d8988270e69c6b7154f8fcb2a47ff706fe36f7624b3a24246b8d9089435a8f4ec48c1c1025c5d6b499456b9e5eff4f48212983 languageName: node linkType: hard -"which@npm:2.0.2, which@npm:^2.0.1, which@npm:^2.0.2": - version: 2.0.2 - resolution: "which@npm:2.0.2" +"which@npm:^1.1.1, which@npm:^1.3.1": + version: 1.3.1 + resolution: "which@npm:1.3.1" dependencies: isexe: ^2.0.0 bin: - node-which: ./bin/node-which - checksum: 66522872a768b60c2a65a57e8ad184e5372f5b6a9ca6d5f033d4b0dc98aff63995655a7503b9c0a2598936f532120e81dd8cc155e2e92ed662a2b9377cc4374f + which: ./bin/which + checksum: e945a8b6bbf6821aaaef7f6e0c309d4b615ef35699576d5489b4261da9539f70393c6b2ce700ee4321c18f914ebe5644bc4631b15466ffbaad37d83151f6af59 languageName: node linkType: hard -"which@npm:^1.1.1, which@npm:^1.2.9, which@npm:^1.3.1": - version: 1.3.1 - resolution: "which@npm:1.3.1" +"which@npm:^2.0.1, which@npm:^2.0.2": + version: 2.0.2 + resolution: "which@npm:2.0.2" dependencies: isexe: ^2.0.0 bin: - which: ./bin/which - checksum: e945a8b6bbf6821aaaef7f6e0c309d4b615ef35699576d5489b4261da9539f70393c6b2ce700ee4321c18f914ebe5644bc4631b15466ffbaad37d83151f6af59 + node-which: ./bin/node-which + checksum: 66522872a768b60c2a65a57e8ad184e5372f5b6a9ca6d5f033d4b0dc98aff63995655a7503b9c0a2598936f532120e81dd8cc155e2e92ed662a2b9377cc4374f languageName: node linkType: hard @@ -30413,10 +30708,10 @@ node-pty@beta: languageName: node linkType: hard -"word-wrap@npm:^1.2.3, word-wrap@npm:~1.2.3": - version: 1.2.3 - resolution: "word-wrap@npm:1.2.3" - checksum: 1cb6558996deb22c909330db1f01d672feee41d7f0664492912de3de282da3f28ba2d49e87b723024e99d56ba2dac2f3ab28f8db07ac199f5e5d5e2e437833de +"word-wrap@npm:^1.2.4": + version: 1.2.5 + resolution: "word-wrap@npm:1.2.5" + checksum: e0e4a1ca27599c92a6ca4c32260e8a92e8a44f4ef6ef93f803f8ed823f486e0889fc0b93be4db59c8d51b3064951d25e43d434e95dc8c960cc3a63d65d00ba20 languageName: node linkType: hard @@ -30632,43 +30927,43 @@ node-pty@beta: languageName: node linkType: hard -"workerpool@npm:6.1.5": - version: 6.1.5 - resolution: "workerpool@npm:6.1.5" - checksum: 151d9628d17162345f0da2af36f503938d10eeb8cc6652b714f88da52d962fcf86b740341a6420ddf7274ec1d9714868a7297f8951898c1ff98549204e98132b +"workerpool@npm:^6.5.1": + version: 6.5.1 + resolution: "workerpool@npm:6.5.1" + checksum: 58e8e969782292cb3a7bfba823f1179a7615250a0cefb4841d5166234db1880a3d0fe83a31dd8d648329ec92c2d0cd1890ad9ec9e53674bb36ca43e9753cdeac languageName: node linkType: hard -"wrap-ansi@npm:^6.2.0": - version: 6.2.0 - resolution: "wrap-ansi@npm:6.2.0" +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0": + version: 7.0.0 + resolution: "wrap-ansi@npm:7.0.0" dependencies: ansi-styles: ^4.0.0 string-width: ^4.1.0 strip-ansi: ^6.0.0 - checksum: baad244e6e33335ea24e86e51868fe6823626e3a3c88d9a6674642afff1d34d9a154c917e74af8d845fd25d170c4ea9cf69a47133c3f3656e1252b3d462d9f6c + checksum: d15fc12c11e4cbc4044a552129ebc75ee3f57aa9c1958373a4db0292d72282f54373b536103987a4a7594db1ef6a4f10acf92978f79b98c49306a4b58c77d4da languageName: node linkType: hard -"wrap-ansi@npm:^7.0.0": - version: 7.0.0 - resolution: "wrap-ansi@npm:7.0.0" +"wrap-ansi@npm:^6.2.0": + version: 6.2.0 + resolution: "wrap-ansi@npm:6.2.0" dependencies: ansi-styles: ^4.0.0 string-width: ^4.1.0 strip-ansi: ^6.0.0 - checksum: d15fc12c11e4cbc4044a552129ebc75ee3f57aa9c1958373a4db0292d72282f54373b536103987a4a7594db1ef6a4f10acf92978f79b98c49306a4b58c77d4da + checksum: baad244e6e33335ea24e86e51868fe6823626e3a3c88d9a6674642afff1d34d9a154c917e74af8d845fd25d170c4ea9cf69a47133c3f3656e1252b3d462d9f6c languageName: node linkType: hard -"wrap-ansi@npm:^8.0.1": - version: 8.0.1 - resolution: "wrap-ansi@npm:8.0.1" +"wrap-ansi@npm:^8.0.1, wrap-ansi@npm:^8.1.0": + version: 8.1.0 + resolution: "wrap-ansi@npm:8.1.0" dependencies: ansi-styles: ^6.1.0 string-width: ^5.0.1 strip-ansi: ^7.0.1 - checksum: f32dc32427920ff97b6e8265baecb79339dd4de2818f7a3e7bda60f32136a8bad7b9601b945b52552e1c46cece75dea967623a06dbc6a6e6604754c401b98820 + checksum: 138ff58a41d2f877eae87e3282c0630fc2789012fc1af4d6bd626eeb9a2f9a65ca92005e6e69a75c7b85a68479fe7443c7dbe1eb8fbaa681a4491364b7c55c60 languageName: node linkType: hard @@ -30689,17 +30984,6 @@ node-pty@beta: languageName: node linkType: hard -"write-file-atomic@npm:^1.1.4": - version: 1.3.4 - resolution: "write-file-atomic@npm:1.3.4" - dependencies: - graceful-fs: ^4.1.11 - imurmurhash: ^0.1.4 - slide: ^1.1.5 - checksum: 6f6270708f12e9bba36c527da3f06e4e11146681947b00732695f769f23651713e085e88a5e0f8d04f40d131ed1f1f588d9eeade3a0f862fe8a91f4b4a15a23c - languageName: node - linkType: hard - "write-file-atomic@npm:^2.4.2": version: 2.4.3 resolution: "write-file-atomic@npm:2.4.3" @@ -30782,9 +31066,9 @@ node-pty@beta: languageName: node linkType: hard -"ws@npm:^5.2.0 || ^6.0.0 || ^7.0.0, ws@npm:^7.5.7": - version: 7.5.7 - resolution: "ws@npm:7.5.7" +"ws@npm:^7.5.7": + version: 7.5.10 + resolution: "ws@npm:7.5.10" peerDependencies: bufferutil: ^4.0.1 utf-8-validate: ^5.0.2 @@ -30793,22 +31077,22 @@ node-pty@beta: optional: true utf-8-validate: optional: true - checksum: f856382d94dfa8d722337d79117fe4f16d48ef7d7f77a58e94af7d7f32e863fce8403c00992ddddbf1efd5a334c581c2a987aea66255f7ee368680e59f78ae15 + checksum: bd7d5f4aaf04fae7960c23dcb6c6375d525e00f795dd20b9385902bd008c40a94d3db3ce97d878acc7573df852056ca546328b27b39f47609f80fb22a0a9b61d languageName: node linkType: hard -"ws@npm:^8.3.0, ws@npm:^8.4.2, ws@npm:^8.5.0": - version: 8.8.1 - resolution: "ws@npm:8.8.1" +"ws@npm:^8.13.0, ws@npm:^8.5.0": + version: 8.17.1 + resolution: "ws@npm:8.17.1" peerDependencies: bufferutil: ^4.0.1 - utf-8-validate: ^5.0.2 + utf-8-validate: ">=5.0.2" peerDependenciesMeta: bufferutil: optional: true utf-8-validate: optional: true - checksum: ae7f679a0d43ee50c00f97df1165e4111d5434176bb1335c2cd8460ceb191324a09764d7409774c6c9420d58bf3047b9ca02f8be73042f6106b1f9908440c7dc + checksum: f4a49064afae4500be772abdc2211c8518f39e1c959640457dcee15d4488628620625c783902a52af2dd02f68558da2868fd06e6fd0e67ebcd09e6881b1b5bfe languageName: node linkType: hard @@ -30878,13 +31162,6 @@ node-pty@beta: languageName: node linkType: hard -"xregexp@npm:2.0.0": - version: 2.0.0 - resolution: "xregexp@npm:2.0.0" - checksum: 0a5f9134fad3f4d5bffce55eb8e4f00a20e29ad4d0355bf5579e7c5a386355d39e896d4bc941b4b19ea4a04f388980f05ef96cf33574961ba82416ffae78ad65 - languageName: node - linkType: hard - "xstate@npm:^4.14.0": version: 4.26.1 resolution: "xstate@npm:4.26.1" @@ -30892,7 +31169,7 @@ node-pty@beta: languageName: node linkType: hard -"xtend@npm:^4.0.2, xtend@npm:~4.0.1": +"xtend@npm:^4.0.0, xtend@npm:^4.0.2, xtend@npm:~4.0.1": version: 4.0.2 resolution: "xtend@npm:4.0.2" checksum: 366ae4783eec6100f8a02dff02ac907bf29f9a00b82ac0264b4d8b832ead18306797e283cf19de776538babfdcb2101375ec5646b59f08c52128ac4ab812ed0e @@ -30965,14 +31242,14 @@ node-pty@beta: languageName: node linkType: hard -"yargs-parser@npm:^20.2.2, yargs-parser@npm:^20.2.3": +"yargs-parser@npm:^20.2.2, yargs-parser@npm:^20.2.3, yargs-parser@npm:^20.2.9": version: 20.2.9 resolution: "yargs-parser@npm:20.2.9" checksum: 0685a8e58bbfb57fab6aefe03c6da904a59769bd803a722bb098bd5b0f29d274a1357762c7258fb487512811b8063fb5d2824a3415a0a4540598335b3b086c72 languageName: node linkType: hard -"yargs-unparser@npm:2.0.0": +"yargs-unparser@npm:^2.0.0": version: 2.0.0 resolution: "yargs-unparser@npm:2.0.0" dependencies: @@ -31018,7 +31295,7 @@ node-pty@beta: languageName: node linkType: hard -"yargs@npm:^17.0.0, yargs@npm:^17.1.1, yargs@npm:^17.3.1, yargs@npm:^17.6.2": +"yargs@npm:^17.0.0, yargs@npm:^17.1.1, yargs@npm:^17.3.1, yargs@npm:^17.6.2, yargs@npm:^17.7.2": version: 17.7.2 resolution: "yargs@npm:17.7.2" dependencies: @@ -31033,13 +31310,13 @@ node-pty@beta: languageName: node linkType: hard -"yauzl@npm:^2.10.0": - version: 2.10.0 - resolution: "yauzl@npm:2.10.0" +"yauzl@npm:^3.1.3": + version: 3.1.3 + resolution: "yauzl@npm:3.1.3" dependencies: buffer-crc32: ~0.2.3 - fd-slicer: ~1.1.0 - checksum: f265002af7541b9ec3589a27f5fb8f11cf348b53cc15e2751272e3c062cd73f3e715bc72d43257de71bbaecae446c3f1b14af7559e8ab0261625375541816422 + pend: ~1.2.0 + checksum: e04a2567860e1337798cd2570d776b4040520b20660e7ec5dfcce24b8be2b134d6a5ae835804a0186b1a58cb8b1741b37eaa6a86f7546b6219b62a265dbaf3fc languageName: node linkType: hard