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..05b53a755ee --- /dev/null +++ b/.circleci/cb-publish-step-1-set-versions.sh @@ -0,0 +1,30 @@ +#!/bin/bash -e + +git config --global user.name aws-amplify-bot +git config --global user.email aws@amazon.com + +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 + + 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 [[ "$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]" --no-commit-hooks --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/cb-publish-step-2-verdaccio.sh b/.circleci/cb-publish-step-2-verdaccio.sh new file mode 100755 index 00000000000..c27881e6d6d --- /dev/null +++ b/.circleci/cb-publish-step-2-verdaccio.sh @@ -0,0 +1,25 @@ +#!/bin/bash -e + +# 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 + # 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 +} + +npmRegistryUrl=$(npm get registry) +if [[ "$npmRegistryUrl" =~ ^http://localhost ]]; then + # registy URL update changes .yarnrc.yml file + git update-index --assume-unchanged .yarnrc.yml + + echo "Publishing to local registry under latest tag" + lernaPublishExitOnFailure from-git --yes --no-push +else + echo "NPM registry url is not pointing to localhost, $npmRegistryUrl" + exit 1 +fi diff --git a/.circleci/cb-publish-step-3-npm.sh b/.circleci/cb-publish-step-3-npm.sh new file mode 100755 index 00000000000..76a26c29dff --- /dev/null +++ b/.circleci/cb-publish-step-3-npm.sh @@ -0,0 +1,70 @@ +#!/bin/bash -e + +# 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 + # 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://$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 [[ "$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 + + # verify that binary has been uploaded + verifyPkgIsAvailable + + echo "Publishing to NPM under $NPM_TAG tag" + lernaPublishExitOnFailure from-git --yes --no-push --dist-tag=$NPM_TAG + +# @latest release +elif [[ "$BRANCH_NAME" == "release" ]]; then + # verify that binary has been uploaded + verifyPkgIsAvailable + + # publish versions that were just computed + lernaPublishExitOnFailure from-git --yes --no-push + +# release candidate or local publish for testing / building binary +elif [[ "$BRANCH_NAME" =~ ^run-e2e-with-rc\/.* ]] || [[ "$BRANCH_NAME" =~ ^release_rc\/.* ]]; then + + # verify that binary has been uploaded + verifyPkgIsAvailable + + # publish versions that were just computed + lernaPublishExitOnFailure from-git --yes --no-push --dist-tag rc +else + echo "branch name" "$BRANCH_NAME" "did not match any branch 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..4625fb966ab --- /dev/null +++ b/.circleci/cb-publish-step-4-push-to-git.sh @@ -0,0 +1,35 @@ +#!/bin/bash -e + +git config --global user.name aws-amplify-bot +git config --global user.email aws@amazon.com + +if [[ "$BRANCH_NAME" =~ ^tagged-release ]] || [[ "$BRANCH_NAME" =~ ^run-e2e-with-rc\/.* ]] || [[ "$BRANCH_NAME" =~ ^release_rc\/.* ]]; then + # push release commit + git push origin "$BRANCH_NAME" + + # push release tags + git tag --points-at HEAD | xargs git push origin + +# @latest release +elif [[ "$BRANCH_NAME" == "release" ]]; then + # 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 +else + echo "branch name" "$BRANCH_NAME" "did not match any branch publish rules." + exit 1 +fi diff --git a/.circleci/codebuild-checkout.sh b/.circleci/codebuild-checkout.sh index 023ed4a065f..e5a6bae2be0 100755 --- a/.circleci/codebuild-checkout.sh +++ b/.circleci/codebuild-checkout.sh @@ -14,13 +14,17 @@ if [[ "$CODEBUILD_SOURCE_VERSION" != "" ]]; then fi # Codebuild doesn't checkout the branch by default -if [[ "$CODEBUILD_WEBHOOK_TRIGGER" =~ ^pr/ || "$CODEBUILD_SOURCE_VERSION" =~ ^pr/ || "$CODEBUILD_SOURCE_VERSION_REF" =~ refs/pull/[0-9]+/head$ ]]; then +if [[ "$AMPLIFY_CI_MANUAL_PR_BUILD" == "true" || "$CODEBUILD_WEBHOOK_TRIGGER" =~ ^pr/ || "$CODEBUILD_SOURCE_VERSION" =~ ^pr/ || "$CODEBUILD_SOURCE_VERSION_REF" =~ refs/pull/[0-9]+/head$ ]]; then # If we're in PR workflow create temporary local branch. # We detect if we're in PR by looking for pr/ pattern in code build env variables # or by checking if commit is matching refs/pull//head. 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 @@ -29,5 +33,7 @@ else git checkout $BRANCH_NAME fi +git show --summary + echo "Fetching tags" git fetch --all --tags diff --git a/.circleci/config.base.yml b/.circleci/config.base.yml index 0eac836d3e7..1a83ae382d1 100644 --- a/.circleci/config.base.yml +++ b/.circleci/config.base.yml @@ -1469,7 +1469,9 @@ commands: source $BASH_ENV - run: name: Confirm Amplify CLI is installed and available in PATH - command: amplify version + command: | + which amplify + amplify version rename_binary_for_windows: description: 'Rename binary for windows' diff --git a/.circleci/config.yml b/.circleci/config.yml index d604dbc8b66..aa2b861c75b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -237,7 +237,12 @@ workflows: setup: when: << pipeline.parameters.setup >> jobs: - - setup + - setup: + filters: + branches: + only: + - /run-e2e\/.*/ + - /pull\/.* nightly_console_integration_tests: when: << pipeline.parameters.nightly_console_integration_tests >> jobs: diff --git a/.circleci/local_publish_helpers_codebuild.sh b/.circleci/local_publish_helpers_codebuild.sh new file mode 100644 index 00000000000..899930efcc7 --- /dev/null +++ b/.circleci/local_publish_helpers_codebuild.sh @@ -0,0 +1,333 @@ +#!/bin/bash + +custom_registry_url=http://localhost:4873 +default_verdaccio_package=verdaccio@5.1.2 + +function startLocalRegistry { + # Start local registry + tmp_registry_log="$(mktemp)" + echo "Registry output file: $tmp_registry_log" + (cd && nohup npx ${VERDACCIO_PACKAGE:-$default_verdaccio_package} -c $1 &>$tmp_registry_log &) + # Wait for Verdaccio to boot + attempts=0 + until grep -q 'http address' $tmp_registry_log + do + attempts=$((attempts+1)) + echo "Waiting for Verdaccio, attempt $attempts" + sleep 1 + + if (( attempts > 60 )); then + echo "Verdaccio didn't start"; + exit 1 + fi + done +} + +function uploadPkgCliCodeBuild { + cd out/ + export hash=$(git rev-parse HEAD | cut -c 1-12) + export version=$(./amplify-pkg-linux-x64 --version) + + if [[ "$BRANCH_NAME" == "release" ]] || [[ "$BRANCH_NAME" =~ ^run-e2e-with-rc\/.* ]] || [[ "$BRANCH_NAME" =~ ^release_rc\/.* ]] || [[ "$BRANCH_NAME" =~ ^tagged-release ]]; then + aws s3 cp amplify-pkg-win-x64.tgz s3://$PKG_CLI_BUCKET_NAME/$(echo $version)/amplify-pkg-win-x64-$(echo $hash).tgz + aws s3 cp amplify-pkg-macos-x64.tgz s3://$PKG_CLI_BUCKET_NAME/$(echo $version)/amplify-pkg-macos-x64-$(echo $hash).tgz + aws s3 cp amplify-pkg-linux-arm64.tgz s3://$PKG_CLI_BUCKET_NAME/$(echo $version)/amplify-pkg-linux-arm64-$(echo $hash).tgz + aws s3 cp amplify-pkg-linux-x64.tgz s3://$PKG_CLI_BUCKET_NAME/$(echo $version)/amplify-pkg-linux-x64-$(echo $hash).tgz + + ALREADY_EXISTING_FILES="$(set -o pipefail && aws s3 ls s3://$PKG_CLI_BUCKET_NAME/$(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://$PKG_CLI_BUCKET_NAME/$(echo $version)/amplify-pkg-linux-x64" + exit 1 + fi + + if [ ALREADY_EXISTING_FILES -ne "0" ]; then + echo "Cannot overwrite existing file at s3://$PKG_CLI_BUCKET_NAME/$(echo $version)/amplify-pkg-linux-x64.tgz" + exit 1 + fi + + 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 + + else + aws s3 cp amplify-pkg-linux-x64.tgz s3://$PKG_CLI_BUCKET_NAME/$(echo $version)/amplify-pkg-linux-x64-$(echo $hash).tgz + fi + + cd .. +} + +function generatePkgCli { + cd pkg + + # install package depedencies + cp ../yarn.lock ./ + yarn workspaces focus --production + + # Optimize package size + find . \ + -name "*.d.ts" -or -name "*.js.map" -or -name "*.d.ts.map" -or \ + -iname "readme.md" -or -iname "changelog.md" -or -iname "history.md" \ + | xargs rm + + # Restore .d.ts files required by @aws-amplify/codegen-ui at runtime + cp ../node_modules/typescript/lib/*.d.ts node_modules/typescript/lib/ + + # replace DEV binary entry point with production one + cp ../node_modules/@aws-amplify/cli-internal/bin/amplify.production.template node_modules/@aws-amplify/cli-internal/bin/amplify + + # Transpile code for packaging + npx babel node_modules --extensions '.js,.jsx,.es6,.es,.ts' --copy-files --include-dotfiles -d ../build/node_modules + + # Include third party licenses + cp ../Third_Party_Licenses.txt ../build/node_modules + + # Build pkg cli + cp package.json ../build/node_modules/package.json + + if [[ "$@" =~ 'arm' ]]; then + npx pkg --no-bytecode --public-packages "*" --public -t node18-linux-arm64 ../build/node_modules -o ../out/amplify-pkg-linux-arm64 + tar -czvf ../out/amplify-pkg-linux-arm64.tgz ../out/amplify-pkg-linux-arm64 + fi + + if [[ "$@" =~ 'linux' ]]; then + npx pkg -t node18-linux-x64 ../build/node_modules -o ../out/amplify-pkg-linux-x64 + tar -czvf ../out/amplify-pkg-linux-x64.tgz ../out/amplify-pkg-linux-x64 + fi + + if [[ "$@" =~ 'macos' ]]; then + npx pkg -t node18-macos-x64 ../build/node_modules -o ../out/amplify-pkg-macos-x64 + tar -czvf ../out/amplify-pkg-macos-x64.tgz ../out/amplify-pkg-macos-x64 + fi + + if [[ "$@" =~ 'win' ]]; then + npx pkg -t node18-win-x64 ../build/node_modules -o ../out/amplify-pkg-win-x64.exe + tar -czvf ../out/amplify-pkg-win-x64.tgz ../out/amplify-pkg-win-x64.exe + fi + + cd .. +} + +function verifyPkgCli { + echo "Human readable sizes" + du -h out/* + echo "Sizes in bytes" + wc -c out/* + + function verifySinglePkg { + binary_name=$1 + compressed_binary_name=$2 + binary_threshold_in_bytes=$3 + + # Compressed binary size is not deterministic enough to have stricter threshold. + # I.e. it depends on how compression algorithm can compress bytecode and there are cases where compressed size + # grows even if uncompressed size drops. We don't have control on bytecode and compression. + # Therefore we check if compression gets past half of original size as sanity check. + compressed_binary_threshold_in_bytes=$((binary_threshold_in_bytes/2)) + + binary_size=$(wc -c out/$binary_name | awk '{print $1}') + compressed_binary_size=$(wc -c out/$compressed_binary_name | awk '{print $1}') + + if (( binary_size > binary_threshold_in_bytes )); then + echo "$binary_name size has grown over $binary_threshold_in_bytes bytes" + exit 1 + fi + + if (( compressed_binary_size > compressed_binary_threshold_in_bytes )); then + echo "$compressed_binary_name size has grown over $compressed_binary_threshold_in_bytes bytes" + exit 1 + fi + } + + verifySinglePkg "amplify-pkg-linux-x64" "amplify-pkg-linux-x64.tgz" $((750 * 1024 * 1024)) + verifySinglePkg "amplify-pkg-macos-x64" "amplify-pkg-macos-x64.tgz" $((750 * 1024 * 1024)) + verifySinglePkg "amplify-pkg-win-x64.exe" "amplify-pkg-win-x64.tgz" $((750 * 1024 * 1024)) + verifySinglePkg "amplify-pkg-linux-arm64" "amplify-pkg-linux-arm64.tgz" $((600 * 1024 * 1024)) +} + +function unsetNpmRegistryUrl { + # Restore the original NPM and Yarn registry URLs + npm set registry "https://registry.npmjs.org/" + yarn config set npmRegistryServer "https://registry.npmjs.org/" +} + +function unsetSudoNpmRegistryUrl { + # Restore the original NPM and Yarn registry URLs + sudo npm set registry "https://registry.npmjs.org/" + sudo yarn config set npmRegistryServer "https://registry.npmjs.org/" +} + +function changeNpmGlobalPath { + mkdir -p ~/.npm-global/{bin,lib} + npm config set prefix '~/.npm-global' + export PATH=~/.npm-global/bin:$PATH +} + +function changeSudoNpmGlobalPath { + mkdir -p ~/.npm-global-sudo + npm config set prefix '~/.npm-global-sudo' + export PATH=~/.npm-global/bin:$PATH +} + +function setNpmRegistryUrlToLocal { + # Set registry to local registry + npm set registry "$custom_registry_url" + yarn config set npmRegistryServer "$custom_registry_url" +} + +function setSudoNpmRegistryUrlToLocal { + # Set registry to local registry + sudo npm set registry "$custom_registry_url" + sudo yarn config set npmRegistryServer "$custom_registry_url" +} + +function useChildAccountCredentials { + if [[ ! -z "$USE_PARENT_ACCOUNT" ]]; then + echo "Using parent account credentials" + return + fi + export AWS_PAGER="" + parent_acct=$(aws sts get-caller-identity | jq -cr '.Account') + child_accts=$(aws organizations list-accounts | jq -c "[.Accounts[].Id | select(. != \"$parent_acct\")]") + org_size=$(echo $child_accts | jq 'length') + pick_acct=$(echo $child_accts | jq -cr ".[$RANDOM % $org_size]") + session_id=$((1 + $RANDOM % 10000)) + if [[ -z "$pick_acct" || -z "$session_id" ]]; then + echo "Unable to find a child account. Falling back to parent AWS account" + return + fi + creds=$(aws sts assume-role --role-arn arn:aws:iam::${pick_acct}:role/OrganizationAccountAccessRole --role-session-name testSession${session_id} --duration-seconds 3600) + if [ -z $(echo $creds | jq -c -r '.AssumedRoleUser.Arn') ]; then + echo "Unable to assume child account role. Falling back to parent AWS account" + return + fi + echo "Using account credentials for $(echo $creds | jq -c -r '.AssumedRoleUser.Arn')" + export AWS_ACCESS_KEY_ID=$(echo $creds | jq -c -r ".Credentials.AccessKeyId") + export AWS_SECRET_ACCESS_KEY=$(echo $creds | jq -c -r ".Credentials.SecretAccessKey") + export AWS_SESSION_TOKEN=$(echo $creds | jq -c -r ".Credentials.SessionToken") +} + +function retry { + MAX_ATTEMPTS=2 + SLEEP_DURATION=5 + FIRST_RUN=true + n=0 + FAILED_TEST_REGEX_FILE="./amplify-e2e-reports/amplify-e2e-failed-test.txt" + rm -f $FAILED_TEST_REGEX_FILE + until [ $n -ge $MAX_ATTEMPTS ] + do + echo "Attempting $@ with max retries $MAX_ATTEMPTS" + setAwsAccountCredentials + "$@" && break + n=$[$n+1] + FIRST_RUN=false + echo "Attempt $n completed." + sleep $SLEEP_DURATION + done + if [ $n -ge $MAX_ATTEMPTS ]; then + echo "failed: ${@}" >&2 + exit 1 + fi + + resetAwsAccountCredentials + TEST_SUITE=${TEST_SUITE:-"TestSuiteNotSet"} + # 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 +} + +function resetAwsAccountCredentials { + if [ -z "$AWS_ACCESS_KEY_ID_ORIG" ]; then + echo "AWS Access Key environment variable is already set" + else + export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID_ORIG + fi + if [ -z "$AWS_SECRET_ACCESS_KEY_ORIG" ]; then + echo "AWS Secret Access Key environment variable is already set" + else + export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY_ORIG + fi + if [ -z "$AWS_SESSION_TOKEN_ORIG" ]; then + echo "AWS Session Token environment variable is already set" + else + export AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN_ORIG + fi +} + +function setAwsAccountCredentials { + resetAwsAccountCredentials + export AWS_ACCESS_KEY_ID_ORIG=$AWS_ACCESS_KEY_ID + export AWS_SECRET_ACCESS_KEY_ORIG=$AWS_SECRET_ACCESS_KEY + export AWS_SESSION_TOKEN_ORIG=$AWS_SESSION_TOKEN + # introduce a delay of up to 1 minute to allow for more even spread aws list-accounts calls due to throttling + sleep $[ ( $RANDOM % 60 ) + 1 ]s + if [[ "$OSTYPE" == "msys" ]]; then + # windows provided by circleci has this OSTYPE + useChildAccountCredentials + else + echo "OSTYPE is $OSTYPE" + curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" + unzip -o awscliv2.zip >/dev/null + export PATH=$PATH:$(pwd)/aws/dist + useChildAccountCredentials + fi +} + +function runE2eTestCb { + _setupCoverage + 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) + 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 + 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 +} + +function _setupCoverage { + _teardownCoverage + echo "Setup Coverage ($E2E_TEST_COVERAGE_DIR)" + if [ ! -d $E2E_TEST_COVERAGE_DIR ] + then + mkdir -p $E2E_TEST_COVERAGE_DIR + fi +} + +function _teardownCoverage { + if [ -d $E2E_TEST_COVERAGE_DIR ] + then + echo "Teardown Coverage ($E2E_TEST_COVERAGE_DIR)" + rm -r $E2E_TEST_COVERAGE_DIR + fi +} + +function checkPackageVersionsInLocalNpmRegistry { + cli_internal_version=$(npm view @aws-amplify/cli-internal version) + cli_version=$(npm view @aws-amplify/cli version) + + echo "@aws-amplify/cli-internal version: $cli_internal_version" + echo "@aws-amplify/cli version: $cli_version" + + 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" + exit 1 + else + echo "Versions matched." + fi +} 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/.eslintrc.js b/.eslintrc.js index a041ed01ef1..2a80cfe411a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -113,9 +113,9 @@ module.exports = { '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-inferrable-types': 'off', '@typescript-eslint/no-non-null-assertion': 'off', - '@typescript-eslint/no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': 'error', 'consistent-return': 'error', - 'import/no-extraneous-dependencies': 'off', + 'import/no-extraneous-dependencies': 'error', 'no-constant-condition': 'off', 'no-restricted-syntax': 'off', 'no-useless-catch': 'error', diff --git a/.husky/pre-push b/.husky/pre-push index 33f88e8c09b..9af535e1b0b 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -7,5 +7,5 @@ CYAN='\033[0;36m' NC='\033[0m' # No color echo "${GREEN}Running pre-push hook${NC}" -echo "${CYAN}Running yarn build-tests-changed && yarn split-e2e-tests${NC}" -yarn build-tests-changed && yarn split-e2e-tests +echo "${CYAN}Running yarn build-tests-changed" +yarn build-tests-changed diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c841549559d..c3c96552c65 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -121,9 +121,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)_ diff --git a/codebuild_specs/amplify_general_config_tests.yml b/codebuild_specs/amplify_general_config_tests.yml index cffa2c0785e..4b6b4006ae6 100644 --- a/codebuild_specs/amplify_general_config_tests.yml +++ b/codebuild_specs/amplify_general_config_tests.yml @@ -10,3 +10,6 @@ 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 index 2e9102193fb..dcdb663a6c7 100644 --- a/codebuild_specs/amplify_install_test.yml +++ b/codebuild_specs/amplify_install_test.yml @@ -15,5 +15,8 @@ phases: # i.e. not buffer content in memory while installing binary - ulimit -Sv 1000000 - npm install -g @aws-amplify/cli - - source .circleci/local_publish_helpers.sh && unsetNpmRegistryUrl + - 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 index 66caf8249fd..43756b5c2d5 100644 --- a/codebuild_specs/amplify_sudo_install_test.yml +++ b/codebuild_specs/amplify_sudo_install_test.yml @@ -11,5 +11,8 @@ phases: commands: - source ./shared-scripts.sh && _amplifySudoInstallTestSetup - sudo npm install -g @aws-amplify/cli - - source .circleci/local_publish_helpers.sh && unsetSudoNpmRegistryUrl + - source .circleci/local_publish_helpers_codebuild.sh && unsetSudoNpmRegistryUrl # - amplify version +artifacts: + files: + - 'shared-scripts.sh' diff --git a/codebuild_specs/build_tests_standalone.yml b/codebuild_specs/build_tests_standalone.yml index f2409d537b4..6953e269e4e 100644 --- a/codebuild_specs/build_tests_standalone.yml +++ b/codebuild_specs/build_tests_standalone.yml @@ -6,3 +6,6 @@ phases: commands: - echo "Build Tests Standalone" - source ./shared-scripts.sh && _buildTestsStandalone +artifacts: + files: + - 'shared-scripts.sh' diff --git a/codebuild_specs/cleanup_resources.yml b/codebuild_specs/cleanup_resources.yml index c9249fc7446..552912cfc6c 100644 --- a/codebuild_specs/cleanup_resources.yml +++ b/codebuild_specs/cleanup_resources.yml @@ -5,3 +5,6 @@ phases: build: commands: - echo cleanup running +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 12235137686..0a57b54106f 100644 --- a/codebuild_specs/e2e_workflow.yml +++ b/codebuild_specs/e2e_workflow.yml @@ -28,6 +28,10 @@ batch: buildspec: codebuild_specs/test.yml env: compute-type: BUILD_GENERAL1_LARGE + - identifier: lint + buildspec: codebuild_specs/lint.yml + env: + compute-type: BUILD_GENERAL1_LARGE - identifier: mock_e2e_tests buildspec: codebuild_specs/mock_e2e_tests.yml env: @@ -66,6 +70,10 @@ batch: compute-type: BUILD_GENERAL1_LARGE - identifier: verify_versions_match buildspec: codebuild_specs/verify_versions_match.yml + - identifier: verify_pkg_cli + buildspec: codebuild_specs/verify_pkg_cli.yml + env: + compute-type: BUILD_GENERAL1_LARGE - identifier: run_e2e_tests_linux buildspec: codebuild_specs/run_e2e_tests_linux.yml env: diff --git a/codebuild_specs/e2e_workflow_base.yml b/codebuild_specs/e2e_workflow_base.yml index a0b4bb72159..8ab4fcd29f3 100644 --- a/codebuild_specs/e2e_workflow_base.yml +++ b/codebuild_specs/e2e_workflow_base.yml @@ -32,6 +32,10 @@ batch: buildspec: codebuild_specs/test.yml env: compute-type: BUILD_GENERAL1_LARGE + - identifier: lint + buildspec: codebuild_specs/lint.yml + env: + compute-type: BUILD_GENERAL1_LARGE - identifier: mock_e2e_tests buildspec: codebuild_specs/mock_e2e_tests.yml env: @@ -70,6 +74,10 @@ batch: compute-type: BUILD_GENERAL1_LARGE - identifier: verify_versions_match buildspec: codebuild_specs/verify_versions_match.yml + - identifier: verify_pkg_cli + buildspec: codebuild_specs/verify_pkg_cli.yml + env: + compute-type: BUILD_GENERAL1_LARGE - identifier: integration_test buildspec: codebuild_specs/integration_test.yml env: diff --git a/codebuild_specs/e2e_workflow_generated.yml b/codebuild_specs/e2e_workflow_generated.yml index 84adefc7f23..b6ce438769f 100644 --- a/codebuild_specs/e2e_workflow_generated.yml +++ b/codebuild_specs/e2e_workflow_generated.yml @@ -32,6 +32,10 @@ batch: buildspec: codebuild_specs/test.yml env: compute-type: BUILD_GENERAL1_LARGE + - identifier: lint + buildspec: codebuild_specs/lint.yml + env: + compute-type: BUILD_GENERAL1_LARGE - identifier: mock_e2e_tests buildspec: codebuild_specs/mock_e2e_tests.yml env: @@ -123,7 +127,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/analytics-kinesis.test.ts|src/__tests__/analytics-pinpoint-flutter.test.ts|src/__tests__/analytics-pinpoint-js.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_auth_2a_auth_2b_auth_2d @@ -131,7 +135,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_2a.test.ts|src/__tests__/auth_2b.test.ts|src/__tests__/auth_2d.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_auth_2f_notifications_lifecycle_uibuilder @@ -139,7 +143,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_2f.test.ts|src/__tests__/notifications-lifecycle.test.ts|src/__tests__/uibuilder.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_notifications_analytics_compatibility_in_app_1_notifications_analytics_compatibility_sms_2_analytics_2 @@ -147,7 +151,7 @@ batch: env: 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 - CLI_REGION: eu-central-1 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_global_sandbox_c_hooks_b_notifications_analytics_compatibility_sms_1 @@ -155,7 +159,7 @@ batch: env: variables: TEST_SUITE: 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-west-2 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_plugin_studio_modelgen_custom_transformers @@ -163,7 +167,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/plugin.test.ts|src/__tests__/studio-modelgen.test.ts|src/__tests__/graphql-v2/custom-transformers.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_notifications_in_app_messaging_env_1_notifications_sms_pull_pull @@ -171,7 +175,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/notifications-in-app-messaging-env-1.test.ts|src/__tests__/notifications-sms-pull.test.ts|src/__tests__/pull.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_auth_10_container_hosting_init_b @@ -187,7 +191,7 @@ batch: env: variables: TEST_SUITE: 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-1 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_with_babel_config_amplify_configure_env_2 @@ -195,7 +199,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/with-babel-config.test.ts|src/__tests__/amplify-configure.test.ts|src/__tests__/env-2.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_init_d_init_f_auth_5d @@ -203,7 +207,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/init_d.test.ts|src/__tests__/init_f.test.ts|src/__tests__/auth_5d.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_configure_project_git_clone_attach_init_c @@ -211,7 +215,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/configure-project.test.ts|src/__tests__/git-clone-attach.test.ts|src/__tests__/init_c.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_layer_4_function_2c_function_3b @@ -219,7 +223,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/layer-4.test.ts|src/__tests__/function_2c.test.ts|src/__tests__/function_3b.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_function_4_interactions_schema_model_a @@ -235,7 +239,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/tags.test.ts|src/__tests__/auth_1a.test.ts|src/__tests__/auth-trigger.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_custom_policies_function_function_6_storage_2 @@ -243,7 +247,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/custom_policies_function.test.ts|src/__tests__/function_6.test.ts|src/__tests__/storage-2.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_export_iam_permissions_boundary_node_function @@ -259,7 +263,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/notifications-sms.test.ts|src/__tests__/schema-auth-4b.test.ts|src/__tests__/schema-model-e.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_schema_versioned_auth_1c_auth_5e @@ -267,7 +271,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-versioned.test.ts|src/__tests__/auth_1c.test.ts|src/__tests__/auth_5e.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_auth_8b_geo_add_b_s3_sse @@ -275,7 +279,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_8b.test.ts|src/__tests__/geo-add-b.test.ts|src/__tests__/s3-sse.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_schema_auth_4a_schema_model_b_schema_model_d @@ -283,7 +287,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-auth-4a.test.ts|src/__tests__/schema-model-b.test.ts|src/__tests__/schema-model-d.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_auth_5f_env_4_frontend_config_drift @@ -291,7 +295,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_5f.test.ts|src/__tests__/env-4.test.ts|src/__tests__/frontend_config_drift.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_schema_auth_4d_schema_auth_6a_schema_data_access_patterns @@ -299,7 +303,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-auth-4d.test.ts|src/__tests__/schema-auth-6a.test.ts|src/__tests__/schema-data-access-patterns.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_schema_model_c_schema_predictions_model_migration @@ -307,7 +311,7 @@ batch: env: variables: TEST_SUITE: 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 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_auth_3c_auth_4c_auth_5a @@ -323,7 +327,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_5c.test.ts|src/__tests__/env-1.test.ts|src/__tests__/geo-add-a.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_init_a_schema_auth_4c_schema_auth_5c @@ -331,7 +335,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/init_a.test.ts|src/__tests__/schema-auth-4c.test.ts|src/__tests__/schema-auth-5c.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_auth_5b_auth_9_custom_resources @@ -339,7 +343,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_5b.test.ts|src/__tests__/auth_9.test.ts|src/__tests__/custom_resources.test.ts - CLI_REGION: us-west-2 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_env_5_function_10_function_9c @@ -347,7 +351,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/env-5.test.ts|src/__tests__/function_10.test.ts|src/__tests__/function_9c.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_function_permissions_geo_import_1a_geo_import_2 @@ -363,7 +367,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/global_sandbox-b.test.ts|src/__tests__/schema-auth-5d.test.ts|src/__tests__/schema-auth-6b.test.ts - CLI_REGION: us-east-1 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_schema_auth_8c_auth_3a_auth_3b @@ -371,7 +375,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-auth-8c.test.ts|src/__tests__/auth_3a.test.ts|src/__tests__/auth_3b.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_auth_4a_auth_7a_auth_8c @@ -379,7 +383,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_4a.test.ts|src/__tests__/auth_7a.test.ts|src/__tests__/auth_8c.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_feature_flags_geo_import_1b_global_sandbox_a @@ -387,7 +391,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/feature-flags.test.ts|src/__tests__/geo-import-1b.test.ts|src/__tests__/global_sandbox-a.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_init_e_notifications_analytics_compatibility_in_app_2_schema_auth_11_c @@ -395,7 +399,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/init_e.test.ts|src/__tests__/notifications-analytics-compatibility-in-app-2.test.ts|src/__tests__/schema-auth-11-c.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_schema_auth_2b_schema_auth_6c_schema_auth_6d @@ -403,7 +407,7 @@ batch: env: variables: TEST_SUITE: 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 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_schema_auth_7c_schema_auth_8a_function_migration @@ -411,7 +415,7 @@ batch: env: 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 - CLI_REGION: us-east-1 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_api_10_api_7_export_pull_a @@ -419,7 +423,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/api_10.test.ts|src/__tests__/api_7.test.ts|src/__tests__/export-pull-a.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_function_9a_geo_headless_api_key_migration5 @@ -427,7 +431,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/function_9a.test.ts|src/__tests__/geo-headless.test.ts|src/__tests__/migration/api.key.migration5.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_schema_auth_1a_schema_auth_5b_schema_auth_8b @@ -435,7 +439,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-auth-1a.test.ts|src/__tests__/schema-auth-5b.test.ts|src/__tests__/schema-auth-8b.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_schema_auth_9_a_schema_auth_9_c_storage_3 @@ -443,7 +447,7 @@ batch: env: 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 - CLI_REGION: ap-southeast-1 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_auth_11_auth_1b_delete @@ -451,7 +455,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_11.test.ts|src/__tests__/auth_1b.test.ts|src/__tests__/delete.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_geo_add_c_geo_add_d_geo_import_3 @@ -459,7 +463,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/geo-add-c.test.ts|src/__tests__/geo-add-d.test.ts|src/__tests__/geo-import-3.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_hosting_layer_3_api_connection_migration @@ -467,7 +471,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/hosting.test.ts|src/__tests__/layer-3.test.ts|src/__tests__/migration/api.connection.migration.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_api_key_migration3_predictions_schema_auth_11_b @@ -475,7 +479,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/migration/api.key.migration3.test.ts|src/__tests__/predictions.test.ts|src/__tests__/schema-auth-11-b.test.ts - CLI_REGION: us-east-1 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_schema_auth_1b_schema_auth_2a_schema_auth_7a @@ -491,7 +495,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-auth-7b.test.ts|src/__tests__/schema-auth-9-b.test.ts|src/__tests__/schema-iterative-rollback-1.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_predictions_migration_api_6a_auth_7b @@ -499,7 +503,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/transformer-migrations/predictions-migration.test.ts|src/__tests__/api_6a.test.ts|src/__tests__/auth_7b.test.ts - CLI_REGION: us-west-2 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_export_pull_b_function_3a_init_special_case @@ -507,7 +511,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/export-pull-b.test.ts|src/__tests__/function_3a.test.ts|src/__tests__/init-special-case.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_http_migration_schema_auth_12_schema_auth_3 @@ -515,7 +519,7 @@ batch: 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 - CLI_REGION: us-east-2 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_schema_function_2_auth_4b_auth_8a @@ -523,7 +527,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-function-2.test.ts|src/__tests__/auth_4b.test.ts|src/__tests__/auth_8a.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_export_pull_d_schema_auth_5a_schema_iterative_rollback_2 @@ -539,7 +543,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/schema-iterative-update-3.test.ts|src/__tests__/transformer-migrations/auth-migration.test.ts|src/__tests__/api_2a.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_api_2b_api_6c_api_9a @@ -547,7 +551,7 @@ batch: env: variables: TEST_SUITE: src/__tests__/api_2b.test.ts|src/__tests__/api_6c.test.ts|src/__tests__/api_9a.test.ts - CLI_REGION: us-west-2 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_auth_12_auth_2g_auth_2h @@ -555,232 +559,231 @@ batch: env: variables: TEST_SUITE: src/__tests__/auth_12.test.ts|src/__tests__/auth_2g.test.ts|src/__tests__/auth_2h.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: us-west-2 depend-on: - upb - - identifier: l_auth_5g_hosted_ui_user_groups + - identifier: l_auth_5g_hosted_ui_user_groups_s3_access buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/auth_5g.test.ts|src/__tests__/auth/hosted-ui.test.ts|src/__tests__/auth/user-groups.test.ts - CLI_REGION: us-west-2 + TEST_SUITE: src/__tests__/auth_5g.test.ts|src/__tests__/auth/hosted-ui.test.ts|src/__tests__/auth/user-groups-s3-access.test.ts + CLI_REGION: us-east-2 depend-on: - upb - - identifier: l_build_function_custom_resource_with_storage_dynamodb_simulator + - identifier: l_user_groups_build_function_custom_resource_with_storage buildspec: codebuild_specs/run_e2e_tests_linux.yml env: 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 + TEST_SUITE: src/__tests__/auth/user-groups.test.ts|src/__tests__/build-function.test.ts|src/__tests__/custom-resource-with-storage.test.ts CLI_REGION: us-west-2 depend-on: - upb - - identifier: l_export_pull_c_function_12_function_13 + - identifier: l_dynamodb_simulator_export_pull_c_function_12 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 - CLI_REGION: eu-central-1 + TEST_SUITE: src/__tests__/dynamodb-simulator/dynamodb-simulator.test.ts|src/__tests__/export-pull-c.test.ts|src/__tests__/function_12.test.ts + CLI_REGION: ap-northeast-1 depend-on: - upb - - identifier: l_function_14_function_15_function_2d + - identifier: l_function_13_function_14_function_15 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 + TEST_SUITE: src/__tests__/function_13.test.ts|src/__tests__/function_14.test.ts|src/__tests__/function_15.test.ts CLI_REGION: us-west-2 depend-on: - upb - - identifier: l_general_config_headless_init_help_hooks_c + - identifier: l_function_2d_general_config_headless_init_help buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/general-config/general-config-headless-init.test.ts|src/__tests__/help.test.ts|src/__tests__/hooks-c.test.ts - CLI_REGION: ap-northeast-1 + TEST_SUITE: src/__tests__/function_2d.test.ts|src/__tests__/general-config/general-config-headless-init.test.ts|src/__tests__/help.test.ts + CLI_REGION: us-west-2 depend-on: - upb - - identifier: l_init_force_push_interactions_1_interactions_2 + - identifier: l_hooks_c_init_force_push_interactions_1 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/init-force-push.test.ts|src/__tests__/interactions-1.test.ts|src/__tests__/interactions-2.test.ts + TEST_SUITE: src/__tests__/hooks-c.test.ts|src/__tests__/init-force-push.test.ts|src/__tests__/interactions-1.test.ts CLI_REGION: us-west-2 depend-on: - upb - - identifier: l_minify_cloudformation_notifications_multi_env_notifications_sms_update + - identifier: l_interactions_2_minify_cloudformation_notifications_multi_env 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 - CLI_REGION: ap-southeast-1 + TEST_SUITE: src/__tests__/interactions-2.test.ts|src/__tests__/minify-cloudformation.test.ts|src/__tests__/notifications-multi-env.test.ts + CLI_REGION: us-west-2 depend-on: - upb - - identifier: l_opensearch_simulator_parameter_store_1_parameter_store_2 + - identifier: l_notifications_sms_update_opensearch_simulator_parameter_store_1 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 - CLI_REGION: eu-west-2 + TEST_SUITE: src/__tests__/notifications-sms-update.test.ts|src/__tests__/opensearch-simulator/opensearch-simulator.test.ts|src/__tests__/parameter-store-1.test.ts + CLI_REGION: us-east-2 depend-on: - upb - - identifier: l_android_analytics_pinpoint_config_android_notifications_pinpoint_config_flutter_analytics_pinpoint_config + - identifier: l_parameter_store_2_android_analytics_pinpoint_config_android_notifications_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 - CLI_REGION: us-east-1 + TEST_SUITE: 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: ap-southeast-1 depend-on: - upb - - identifier: l_flutter_notifications_pinpoint_config_ios_analytics_pinpoint_config_ios_notifications_pinpoint_config + - identifier: l_flutter_analytics_pinpoint_config_flutter_notifications_pinpoint_config_ios_analytics_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 - CLI_REGION: us-east-1 + 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 + CLI_REGION: eu-central-1 depend-on: - upb - - identifier: l_javascript_analytics_pinpoint_config_javascript_notifications_pinpoint_config_pr_previews_multi_env_1 + - identifier: l_ios_notifications_pinpoint_config_javascript_analytics_pinpoint_config_javascript_notifications_pinpoint_config 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 - CLI_REGION: ap-northeast-1 + TEST_SUITE: 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 + CLI_REGION: us-west-2 depend-on: - upb - - identifier: l_pull_2_push_smoketest + - identifier: l_pr_previews_multi_env_1_pull_2_push 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__/smoketest.test.ts - CLI_REGION: us-east-1 + TEST_SUITE: src/__tests__/pr-previews-multi-env-1.test.ts|src/__tests__/pull-2.test.ts|src/__tests__/push.test.ts + CLI_REGION: us-west-2 depend-on: - upb - - identifier: l_S3server_api_8_function_8 + - identifier: l_smoketest_S3server_api_8 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/storage-simulator/S3server.test.ts|src/__tests__/api_8.test.ts|src/__tests__/function_8.test.ts - CLI_REGION: us-west-2 + TEST_SUITE: src/__tests__/smoketest.test.ts|src/__tests__/storage-simulator/S3server.test.ts|src/__tests__/api_8.test.ts + CLI_REGION: ap-northeast-1 depend-on: - upb - - identifier: l_schema_iterative_update_locking_api_lambda_auth_2_layer_2 + - 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__/schema-iterative-update-locking.test.ts|src/__tests__/graphql-v2/api_lambda_auth_2.test.ts|src/__tests__/layer-2.test.ts - CLI_REGION: ap-southeast-2 + 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 + CLI_REGION: ap-northeast-1 depend-on: - upb - - identifier: l_schema_auth_13_function_5_schema_iterative_update_1 + - identifier: l_layer_2_schema_auth_13_function_5 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/schema-auth-13.test.ts|src/__tests__/function_5.test.ts|src/__tests__/schema-iterative-update-1.test.ts - CLI_REGION: ap-northeast-1 + TEST_SUITE: src/__tests__/layer-2.test.ts|src/__tests__/schema-auth-13.test.ts|src/__tests__/function_5.test.ts + CLI_REGION: eu-central-1 depend-on: - upb - - identifier: l_auth_6_function_2a_schema_connection_2 + - identifier: l_schema_iterative_update_1_auth_6_function_2a buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/auth_6.test.ts|src/__tests__/function_2a.test.ts|src/__tests__/schema-connection-2.test.ts - CLI_REGION: us-east-2 + TEST_SUITE: src/__tests__/schema-iterative-update-1.test.ts|src/__tests__/auth_6.test.ts|src/__tests__/function_2a.test.ts + CLI_REGION: ap-southeast-1 depend-on: - upb - - identifier: l_schema_function_1_api_9b_custom_policies_container + - 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-function-1.test.ts|src/__tests__/api_9b.test.ts|src/__tests__/custom_policies_container.test.ts + TEST_SUITE: src/__tests__/schema-connection-2.test.ts|src/__tests__/schema-function-1.test.ts|src/__tests__/api_9b.test.ts CLI_REGION: us-west-2 depend-on: - upb - - identifier: l_function_9b_schema_iterative_update_2_storage_1a + - 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__/function_9b.test.ts|src/__tests__/schema-iterative-update-2.test.ts|src/__tests__/storage-1a.test.ts - CLI_REGION: eu-central-1 + TEST_SUITE: src/__tests__/custom_policies_container.test.ts|src/__tests__/function_9b.test.ts|src/__tests__/schema-iterative-update-2.test.ts + CLI_REGION: ap-southeast-1 depend-on: - upb - - identifier: l_storage_1b_function_11_function_2b + - identifier: l_storage_1a_storage_1b_function_11 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/storage-1b.test.ts|src/__tests__/function_11.test.ts|src/__tests__/function_2b.test.ts - CLI_REGION: us-east-2 + TEST_SUITE: src/__tests__/storage-1a.test.ts|src/__tests__/storage-1b.test.ts|src/__tests__/function_11.test.ts + CLI_REGION: us-east-1 depend-on: - upb - - identifier: l_function_7_api_connection_migration2_api_4 + - identifier: l_function_2b_function_7_api_connection_migration2 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/function_7.test.ts|src/__tests__/migration/api.connection.migration2.test.ts|src/__tests__/api_4.test.ts - CLI_REGION: eu-west-2 + TEST_SUITE: src/__tests__/function_2b.test.ts|src/__tests__/function_7.test.ts|src/__tests__/migration/api.connection.migration2.test.ts + CLI_REGION: us-east-2 depend-on: - upb - - identifier: l_containers_api_secrets_storage_4_schema_auth_10 + - identifier: l_api_4_containers_api_secrets_storage_4 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/containers-api-secrets.test.ts|src/__tests__/storage-4.test.ts|src/__tests__/schema-auth-10.test.ts - CLI_REGION: us-west-2 + TEST_SUITE: src/__tests__/api_4.test.ts|src/__tests__/containers-api-secrets.test.ts|src/__tests__/storage-4.test.ts + CLI_REGION: us-east-1 depend-on: - upb - - identifier: l_geo_multi_env_searchable_datastore_resolvers + - identifier: l_schema_auth_10_geo_multi_env_searchable_datastore 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 - CLI_REGION: us-east-2 + TEST_SUITE: src/__tests__/schema-auth-10.test.ts|src/__tests__/geo-multi-env.test.ts|src/__tests__/graphql-v2/searchable-datastore.test.ts + CLI_REGION: eu-central-1 depend-on: - upb - - identifier: l_schema_key_api_5_apigw + - identifier: l_resolvers_schema_key_api_5 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/schema-key.test.ts|src/__tests__/api_5.test.ts|src/__tests__/apigw.test.ts - CLI_REGION: us-east-2 + TEST_SUITE: src/__tests__/resolvers.test.ts|src/__tests__/schema-key.test.ts|src/__tests__/api_5.test.ts + CLI_REGION: us-west-2 depend-on: - upb - - identifier: l_api_lambda_auth_1_api_key_migration2_schema_searchable + - identifier: l_apigw_api_lambda_auth_1_api_key_migration2 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: 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 + 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 CLI_REGION: eu-central-1 depend-on: - upb - - identifier: l_api_key_migration1_schema_auth_14_api_3 + - identifier: l_schema_searchable_api_key_migration1_schema_auth_14 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - TEST_SUITE: src/__tests__/migration/api.key.migration1.test.ts|src/__tests__/schema-auth-14.test.ts|src/__tests__/api_3.test.ts - CLI_REGION: ap-southeast-1 + TEST_SUITE: src/__tests__/schema-searchable.test.ts|src/__tests__/migration/api.key.migration1.test.ts|src/__tests__/schema-auth-14.test.ts + CLI_REGION: us-east-2 depend-on: - upb - - identifier: l_api_6b_api_1_layer_1 + - identifier: l_api_3_api_6b_api_1 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 + TEST_SUITE: src/__tests__/api_3.test.ts|src/__tests__/api_6b.test.ts|src/__tests__/api_1.test.ts CLI_REGION: us-west-2 depend-on: - upb - - identifier: l_api_key_migration4_schema_iterative_update_4_function_1 + - 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__/migration/api.key.migration4.test.ts|src/__tests__/schema-iterative-update-4.test.ts|src/__tests__/function_1.test.ts - CLI_REGION: ap-southeast-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 + CLI_REGION: us-west-2 depend-on: - upb - - identifier: l_storage_5 + - identifier: l_function_1_storage_5 buildspec: codebuild_specs/run_e2e_tests_linux.yml env: variables: - compute-type: BUILD_GENERAL1_SMALL - TEST_SUITE: src/__tests__/storage-5.test.ts - CLI_REGION: ap-southeast-2 + TEST_SUITE: src/__tests__/function_1.test.ts|src/__tests__/storage-5.test.ts + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_datastore_modelgen @@ -789,7 +792,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/datastore-modelgen.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-northeast-1 DISABLE_COVERAGE: 1 depend-on: - upb @@ -799,7 +802,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/amplify-app.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: us-east-2 DISABLE_COVERAGE: 1 depend-on: - upb @@ -818,7 +821,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/auth_2e.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_geo_remove_3 @@ -827,7 +830,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/geo-remove-3.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_geo_add_f @@ -836,7 +839,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/geo-add-f.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_geo_add_e @@ -854,7 +857,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_dynamodb_2c.test.ts - CLI_REGION: us-east-2 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_env_3 @@ -863,7 +866,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/env-3.test.ts - CLI_REGION: us-east-2 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_geo_remove_2 @@ -872,7 +875,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/geo-remove-2.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_notifications_in_app_messaging @@ -881,7 +884,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/notifications-in-app-messaging.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_import_auth_2a @@ -908,7 +911,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_auth_2b.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_import_s3_2a @@ -926,7 +929,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_s3_2c.test.ts - CLI_REGION: us-east-1 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_import_auth_1b @@ -935,7 +938,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_auth_1b.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_schema_auth_11_a @@ -944,7 +947,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/schema-auth-11-a.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_geo_update_1 @@ -953,7 +956,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/geo-update-1.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_geo_update_2 @@ -962,7 +965,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/geo-update-2.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_import_s3_3 @@ -971,7 +974,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_s3_3.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_import_dynamodb_2b @@ -980,7 +983,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_dynamodb_2b.test.ts - CLI_REGION: us-east-1 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_hostingPROD @@ -989,7 +992,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/hostingPROD.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_import_s3_2b @@ -998,7 +1001,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_s3_2b.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_containers_api_1 @@ -1007,7 +1010,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/containers-api-1.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: us-east-1 depend-on: - upb - identifier: l_schema_auth_15 @@ -1016,7 +1019,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/schema-auth-15.test.ts - CLI_REGION: us-east-1 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_schema_connection_1 @@ -1034,7 +1037,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_auth_3.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_import_dynamodb_2a @@ -1052,7 +1055,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/containers-api-2.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_import_s3_1 @@ -1061,7 +1064,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_s3_1.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-east-2 USE_PARENT_ACCOUNT: 1 depend-on: - upb @@ -1071,7 +1074,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/transformer-migrations/searchable-migration.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: ap-southeast-1 USE_PARENT_ACCOUNT: 1 depend-on: - upb @@ -1081,7 +1084,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/geo-remove-1.test.ts - CLI_REGION: us-west-2 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_import_dynamodb_1 @@ -1090,7 +1093,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/import_dynamodb_1.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: ap-southeast-2 USE_PARENT_ACCOUNT: 1 depend-on: - upb @@ -1101,7 +1104,7 @@ batch: 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 - CLI_REGION: eu-central-1 + CLI_REGION: ap-southeast-2 depend-on: - build_windows - upb @@ -1112,7 +1115,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/auth_2a.test.ts|src/__tests__/auth_2b.test.ts|src/__tests__/auth_2d.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: us-east-1 depend-on: - build_windows - upb @@ -1134,7 +1137,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/notifications-analytics-compatibility-sms-2.test.ts|src/__tests__/analytics-2.test.ts|src/__tests__/global_sandbox-c.test.ts - CLI_REGION: us-west-2 + CLI_REGION: eu-west-2 depend-on: - build_windows - upb @@ -1156,7 +1159,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: 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 - CLI_REGION: us-east-2 + CLI_REGION: eu-west-2 depend-on: - build_windows - upb @@ -1167,7 +1170,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/notifications-sms-pull.test.ts|src/__tests__/auth_10.test.ts|src/__tests__/container-hosting.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: eu-west-2 depend-on: - build_windows - upb @@ -1178,7 +1181,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/init_b.test.ts|src/__tests__/notifications-apns.test.ts|src/__tests__/notifications-fcm.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: ap-southeast-2 depend-on: - build_windows - upb @@ -1189,7 +1192,7 @@ batch: 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 - CLI_REGION: ap-southeast-2 + CLI_REGION: us-west-2 depend-on: - build_windows - upb @@ -1200,7 +1203,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/init_d.test.ts|src/__tests__/init_f.test.ts|src/__tests__/auth_5d.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-southeast-1 depend-on: - build_windows - upb @@ -1211,7 +1214,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/configure-project.test.ts|src/__tests__/init_c.test.ts|src/__tests__/layer-4.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: eu-central-1 depend-on: - build_windows - upb @@ -1233,7 +1236,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/tags.test.ts|src/__tests__/auth_1a.test.ts|src/__tests__/auth-trigger.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: eu-central-1 depend-on: - build_windows - upb @@ -1255,7 +1258,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/migration/node.function.test.ts|src/__tests__/notifications-sms.test.ts|src/__tests__/schema-auth-4b.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: us-east-2 depend-on: - build_windows - upb @@ -1266,7 +1269,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-model-e.test.ts|src/__tests__/schema-versioned.test.ts|src/__tests__/auth_1c.test.ts - CLI_REGION: us-east-2 + CLI_REGION: us-east-1 depend-on: - build_windows - upb @@ -1277,7 +1280,7 @@ batch: 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 - CLI_REGION: us-west-2 + CLI_REGION: ap-southeast-1 depend-on: - build_windows - upb @@ -1288,7 +1291,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/s3-sse.test.ts|src/__tests__/schema-auth-4a.test.ts|src/__tests__/schema-model-b.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: us-west-2 depend-on: - build_windows - upb @@ -1299,7 +1302,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-model-d.test.ts|src/__tests__/auth_5f.test.ts|src/__tests__/env-4.test.ts - CLI_REGION: us-east-1 + CLI_REGION: ap-southeast-1 depend-on: - build_windows - upb @@ -1310,7 +1313,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: 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 + CLI_REGION: us-east-1 depend-on: - build_windows - upb @@ -1321,7 +1324,7 @@ batch: 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 - CLI_REGION: ap-southeast-1 + CLI_REGION: us-west-2 depend-on: - build_windows - upb @@ -1332,7 +1335,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/transformer-migrations/model-migration.test.ts|src/__tests__/auth_3c.test.ts|src/__tests__/auth_4c.test.ts - CLI_REGION: us-east-1 + CLI_REGION: eu-central-1 depend-on: - build_windows - upb @@ -1343,7 +1346,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/auth_5a.test.ts|src/__tests__/auth_5c.test.ts|src/__tests__/env-1.test.ts - CLI_REGION: us-east-1 + CLI_REGION: ap-southeast-1 depend-on: - build_windows - upb @@ -1365,524 +1368,524 @@ batch: 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 - CLI_REGION: us-west-2 + CLI_REGION: us-east-1 depend-on: - build_windows - upb - - identifier: w_custom_resources_env_5_function_10 + - identifier: w_env_5_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__/custom_resources.test.ts|src/__tests__/env-5.test.ts|src/__tests__/function_10.test.ts - CLI_REGION: us-east-1 + TEST_SUITE: src/__tests__/env-5.test.ts|src/__tests__/function_10.test.ts|src/__tests__/function_9c.test.ts + CLI_REGION: ap-southeast-2 depend-on: - build_windows - upb - - identifier: w_function_9c_function_permissions_geo_import_1a + - identifier: w_function_permissions_geo_import_1a_geo_import_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_9c.test.ts|src/__tests__/function-permissions.test.ts|src/__tests__/geo-import-1a.test.ts + TEST_SUITE: src/__tests__/function-permissions.test.ts|src/__tests__/geo-import-1a.test.ts|src/__tests__/geo-import-2.test.ts CLI_REGION: eu-central-1 depend-on: - build_windows - upb - - identifier: w_geo_import_2_global_sandbox_b_schema_auth_5d + - identifier: w_global_sandbox_b_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__/geo-import-2.test.ts|src/__tests__/global_sandbox-b.test.ts|src/__tests__/schema-auth-5d.test.ts - CLI_REGION: eu-central-1 + TEST_SUITE: src/__tests__/global_sandbox-b.test.ts|src/__tests__/schema-auth-5d.test.ts|src/__tests__/schema-auth-6b.test.ts + CLI_REGION: us-west-2 depend-on: - build_windows - upb - - identifier: w_schema_auth_6b_schema_auth_8c_auth_3a + - identifier: w_schema_auth_8c_auth_3a_auth_3b 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 - CLI_REGION: ap-northeast-1 + TEST_SUITE: src/__tests__/schema-auth-8c.test.ts|src/__tests__/auth_3a.test.ts|src/__tests__/auth_3b.test.ts + CLI_REGION: us-west-2 depend-on: - build_windows - upb - - identifier: w_auth_3b_auth_4a_auth_7a + - identifier: w_auth_4a_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__/auth_3b.test.ts|src/__tests__/auth_4a.test.ts|src/__tests__/auth_7a.test.ts - CLI_REGION: ap-southeast-1 + TEST_SUITE: src/__tests__/auth_4a.test.ts|src/__tests__/auth_7a.test.ts|src/__tests__/auth_8c.test.ts + CLI_REGION: eu-central-1 depend-on: - build_windows - upb - - identifier: w_auth_8c_feature_flags_geo_import_1b + - identifier: w_feature_flags_geo_import_1b_global_sandbox_a buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/auth_8c.test.ts|src/__tests__/feature-flags.test.ts|src/__tests__/geo-import-1b.test.ts + TEST_SUITE: src/__tests__/feature-flags.test.ts|src/__tests__/geo-import-1b.test.ts|src/__tests__/global_sandbox-a.test.ts CLI_REGION: us-west-2 depend-on: - build_windows - upb - - identifier: w_global_sandbox_a_init_e_notifications_analytics_compatibility_in_app_2 + - identifier: w_init_e_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__/global_sandbox-a.test.ts|src/__tests__/init_e.test.ts|src/__tests__/notifications-analytics-compatibility-in-app-2.test.ts - CLI_REGION: us-east-2 + TEST_SUITE: src/__tests__/init_e.test.ts|src/__tests__/notifications-analytics-compatibility-in-app-2.test.ts|src/__tests__/schema-auth-11-c.test.ts + CLI_REGION: us-west-2 depend-on: - build_windows - upb - - identifier: w_schema_auth_11_c_schema_auth_2b_schema_auth_6c + - identifier: w_schema_auth_2b_schema_auth_6c_schema_auth_6d 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 + TEST_SUITE: 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-2 depend-on: - build_windows - upb - - identifier: w_schema_auth_6d_schema_auth_7c_schema_auth_8a + - identifier: w_schema_auth_7c_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__/schema-auth-6d.test.ts|src/__tests__/schema-auth-7c.test.ts|src/__tests__/schema-auth-8a.test.ts - CLI_REGION: ap-northeast-1 + TEST_SUITE: src/__tests__/schema-auth-7c.test.ts|src/__tests__/schema-auth-8a.test.ts|src/__tests__/transformer-migrations/function-migration.test.ts + CLI_REGION: eu-west-2 depend-on: - build_windows - upb - - identifier: w_function_migration_api_10_api_7 + - identifier: w_api_10_api_7_export_pull_a 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/function-migration.test.ts|src/__tests__/api_10.test.ts|src/__tests__/api_7.test.ts - CLI_REGION: us-east-2 + TEST_SUITE: src/__tests__/api_10.test.ts|src/__tests__/api_7.test.ts|src/__tests__/export-pull-a.test.ts + CLI_REGION: ap-northeast-1 depend-on: - build_windows - upb - - identifier: w_export_pull_a_function_9a_geo_headless + - identifier: w_function_9a_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__/export-pull-a.test.ts|src/__tests__/function_9a.test.ts|src/__tests__/geo-headless.test.ts + TEST_SUITE: src/__tests__/function_9a.test.ts|src/__tests__/geo-headless.test.ts|src/__tests__/migration/api.key.migration5.test.ts CLI_REGION: us-east-2 depend-on: - build_windows - upb - - identifier: w_api_key_migration5_schema_auth_1a_schema_auth_5b + - identifier: w_schema_auth_1a_schema_auth_5b_schema_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__/migration/api.key.migration5.test.ts|src/__tests__/schema-auth-1a.test.ts|src/__tests__/schema-auth-5b.test.ts - CLI_REGION: ap-southeast-2 + TEST_SUITE: src/__tests__/schema-auth-1a.test.ts|src/__tests__/schema-auth-5b.test.ts|src/__tests__/schema-auth-8b.test.ts + CLI_REGION: us-east-1 depend-on: - build_windows - upb - - identifier: w_schema_auth_8b_schema_auth_9_a_schema_auth_9_c + - identifier: w_schema_auth_9_a_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__/schema-auth-8b.test.ts|src/__tests__/schema-auth-9-a.test.ts|src/__tests__/schema-auth-9-c.test.ts - CLI_REGION: us-east-1 + TEST_SUITE: src/__tests__/schema-auth-9-a.test.ts|src/__tests__/schema-auth-9-c.test.ts|src/__tests__/storage-3.test.ts + CLI_REGION: eu-central-1 depend-on: - build_windows - upb - - identifier: w_storage_3_auth_11_auth_1b + - identifier: w_auth_11_auth_1b_delete buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/storage-3.test.ts|src/__tests__/auth_11.test.ts|src/__tests__/auth_1b.test.ts - CLI_REGION: us-west-2 + TEST_SUITE: src/__tests__/auth_11.test.ts|src/__tests__/auth_1b.test.ts|src/__tests__/delete.test.ts + CLI_REGION: eu-central-1 depend-on: - build_windows - upb - - identifier: w_delete_geo_add_c_geo_add_d + - identifier: w_geo_add_c_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__/delete.test.ts|src/__tests__/geo-add-c.test.ts|src/__tests__/geo-add-d.test.ts - CLI_REGION: eu-west-2 + TEST_SUITE: src/__tests__/geo-add-c.test.ts|src/__tests__/geo-add-d.test.ts|src/__tests__/geo-import-3.test.ts + CLI_REGION: ap-northeast-1 depend-on: - build_windows - upb - - identifier: w_geo_import_3_hosting_layer_3 + - identifier: w_hosting_layer_3_api_connection_migration 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 - CLI_REGION: ap-northeast-1 + TEST_SUITE: src/__tests__/hosting.test.ts|src/__tests__/layer-3.test.ts|src/__tests__/migration/api.connection.migration.test.ts + CLI_REGION: us-east-1 depend-on: - build_windows - upb - - identifier: w_api_connection_migration_api_key_migration3_predictions + - identifier: w_api_key_migration3_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__/migration/api.connection.migration.test.ts|src/__tests__/migration/api.key.migration3.test.ts|src/__tests__/predictions.test.ts - CLI_REGION: ap-northeast-1 + TEST_SUITE: src/__tests__/migration/api.key.migration3.test.ts|src/__tests__/predictions.test.ts|src/__tests__/schema-auth-11-b.test.ts + CLI_REGION: ap-southeast-1 depend-on: - build_windows - upb - - identifier: w_schema_auth_11_b_schema_auth_1b_schema_auth_2a + - identifier: w_schema_auth_1b_schema_auth_2a_schema_auth_7a 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-b.test.ts|src/__tests__/schema-auth-1b.test.ts|src/__tests__/schema-auth-2a.test.ts - CLI_REGION: us-west-2 + TEST_SUITE: src/__tests__/schema-auth-1b.test.ts|src/__tests__/schema-auth-2a.test.ts|src/__tests__/schema-auth-7a.test.ts + CLI_REGION: us-east-1 depend-on: - build_windows - upb - - identifier: w_schema_auth_7a_schema_auth_7b_schema_auth_9_b + - identifier: w_schema_auth_7b_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__/schema-auth-7a.test.ts|src/__tests__/schema-auth-7b.test.ts|src/__tests__/schema-auth-9-b.test.ts - CLI_REGION: us-east-1 + TEST_SUITE: src/__tests__/schema-auth-7b.test.ts|src/__tests__/schema-auth-9-b.test.ts|src/__tests__/transformer-migrations/predictions-migration.test.ts + CLI_REGION: us-west-2 depend-on: - build_windows - upb - - identifier: w_predictions_migration_api_6a_auth_7b + - identifier: w_api_6a_auth_7b_export_pull_b 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 - CLI_REGION: us-east-1 + TEST_SUITE: src/__tests__/api_6a.test.ts|src/__tests__/auth_7b.test.ts|src/__tests__/export-pull-b.test.ts + CLI_REGION: eu-central-1 depend-on: - build_windows - upb - - identifier: w_export_pull_b_init_special_case_http_migration + - identifier: w_init_special_case_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__/export-pull-b.test.ts|src/__tests__/init-special-case.test.ts|src/__tests__/transformer-migrations/http-migration.test.ts - CLI_REGION: eu-central-1 + TEST_SUITE: src/__tests__/init-special-case.test.ts|src/__tests__/transformer-migrations/http-migration.test.ts|src/__tests__/schema-auth-12.test.ts + CLI_REGION: eu-west-2 depend-on: - build_windows - upb - - identifier: w_schema_auth_12_schema_auth_3_schema_function_2 + - identifier: w_schema_auth_3_schema_function_2_auth_4b 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-12.test.ts|src/__tests__/schema-auth-3.test.ts|src/__tests__/schema-function-2.test.ts - CLI_REGION: ap-northeast-1 + TEST_SUITE: src/__tests__/schema-auth-3.test.ts|src/__tests__/schema-function-2.test.ts|src/__tests__/auth_4b.test.ts + CLI_REGION: ap-southeast-1 depend-on: - build_windows - upb - - identifier: w_auth_4b_auth_8a_export_pull_d + - identifier: w_auth_8a_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__/auth_4b.test.ts|src/__tests__/auth_8a.test.ts|src/__tests__/export-pull-d.test.ts - CLI_REGION: us-east-1 + TEST_SUITE: src/__tests__/auth_8a.test.ts|src/__tests__/export-pull-d.test.ts|src/__tests__/schema-auth-5a.test.ts + CLI_REGION: ap-southeast-1 depend-on: - build_windows - upb - - identifier: w_schema_auth_5a_schema_iterative_update_3_auth_migration + - identifier: w_schema_iterative_update_3_auth_migration_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__/schema-auth-5a.test.ts|src/__tests__/schema-iterative-update-3.test.ts|src/__tests__/transformer-migrations/auth-migration.test.ts - CLI_REGION: ap-southeast-2 + TEST_SUITE: 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 depend-on: - build_windows - upb - - identifier: w_api_2a_api_2b_api_6c + - identifier: w_api_2b_api_6c_api_9a buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/api_2a.test.ts|src/__tests__/api_2b.test.ts|src/__tests__/api_6c.test.ts - CLI_REGION: ap-southeast-1 + TEST_SUITE: src/__tests__/api_2b.test.ts|src/__tests__/api_6c.test.ts|src/__tests__/api_9a.test.ts + CLI_REGION: ap-northeast-1 depend-on: - build_windows - upb - - identifier: w_api_9a_auth_2h_auth_5g + - identifier: w_auth_2h_auth_5g_hosted_ui buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/api_9a.test.ts|src/__tests__/auth_2h.test.ts|src/__tests__/auth_5g.test.ts + TEST_SUITE: src/__tests__/auth_2h.test.ts|src/__tests__/auth_5g.test.ts|src/__tests__/auth/hosted-ui.test.ts CLI_REGION: ap-southeast-1 depend-on: - build_windows - upb - - identifier: w_hosted_ui_user_groups_build_function + - identifier: w_user_groups_s3_access_user_groups_build_function buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/auth/hosted-ui.test.ts|src/__tests__/auth/user-groups.test.ts|src/__tests__/build-function.test.ts - CLI_REGION: us-west-2 + TEST_SUITE: src/__tests__/auth/user-groups-s3-access.test.ts|src/__tests__/auth/user-groups.test.ts|src/__tests__/build-function.test.ts + CLI_REGION: ap-northeast-1 depend-on: - build_windows - upb - - identifier: w_custom_resource_with_storage_dynamodb_simulator_export_pull_c + - identifier: w_dynamodb_simulator_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__/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 + TEST_SUITE: src/__tests__/dynamodb-simulator/dynamodb-simulator.test.ts|src/__tests__/export-pull-c.test.ts|src/__tests__/function_12.test.ts + CLI_REGION: eu-central-1 depend-on: - build_windows - upb - - identifier: w_function_12_function_13_function_14 + - identifier: w_function_13_function_14_function_2d 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_13.test.ts|src/__tests__/function_14.test.ts - CLI_REGION: us-west-2 + TEST_SUITE: src/__tests__/function_13.test.ts|src/__tests__/function_14.test.ts|src/__tests__/function_2d.test.ts + CLI_REGION: ap-southeast-1 depend-on: - build_windows - upb - - identifier: w_function_2d_general_config_headless_init_help + - identifier: w_general_config_headless_init_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__/function_2d.test.ts|src/__tests__/general-config/general-config-headless-init.test.ts|src/__tests__/help.test.ts - CLI_REGION: ap-southeast-2 + TEST_SUITE: src/__tests__/general-config/general-config-headless-init.test.ts|src/__tests__/help.test.ts|src/__tests__/init-force-push.test.ts + CLI_REGION: us-east-1 depend-on: - build_windows - upb - - identifier: w_init_force_push_interactions_1_interactions_2 + - identifier: w_interactions_1_interactions_2_minify_cloudformation buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/init-force-push.test.ts|src/__tests__/interactions-1.test.ts|src/__tests__/interactions-2.test.ts + TEST_SUITE: src/__tests__/interactions-1.test.ts|src/__tests__/interactions-2.test.ts|src/__tests__/minify-cloudformation.test.ts CLI_REGION: us-west-2 depend-on: - build_windows - upb - - identifier: w_minify_cloudformation_notifications_multi_env_notifications_sms_update + - identifier: w_notifications_multi_env_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__/minify-cloudformation.test.ts|src/__tests__/notifications-multi-env.test.ts|src/__tests__/notifications-sms-update.test.ts - CLI_REGION: us-west-2 + TEST_SUITE: src/__tests__/notifications-multi-env.test.ts|src/__tests__/notifications-sms-update.test.ts|src/__tests__/parameter-store-1.test.ts + CLI_REGION: eu-west-2 depend-on: - build_windows - upb - - identifier: w_parameter_store_1_parameter_store_2_push + - identifier: w_parameter_store_2_push_api_8 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-1.test.ts|src/__tests__/parameter-store-2.test.ts|src/__tests__/push.test.ts + TEST_SUITE: src/__tests__/parameter-store-2.test.ts|src/__tests__/push.test.ts|src/__tests__/api_8.test.ts CLI_REGION: ap-southeast-1 depend-on: - build_windows - upb - - identifier: w_api_8_schema_iterative_update_locking_api_lambda_auth_2 + - identifier: w_schema_iterative_update_locking_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__/api_8.test.ts|src/__tests__/schema-iterative-update-locking.test.ts|src/__tests__/graphql-v2/api_lambda_auth_2.test.ts - CLI_REGION: us-west-2 + 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 + CLI_REGION: eu-west-2 depend-on: - build_windows - upb - - identifier: w_schema_auth_13_function_5_schema_iterative_update_1 + - identifier: w_function_5_schema_iterative_update_1_auth_6 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-13.test.ts|src/__tests__/function_5.test.ts|src/__tests__/schema-iterative-update-1.test.ts - CLI_REGION: us-east-2 + TEST_SUITE: src/__tests__/function_5.test.ts|src/__tests__/schema-iterative-update-1.test.ts|src/__tests__/auth_6.test.ts + CLI_REGION: eu-west-2 depend-on: - build_windows - upb - - identifier: w_auth_6_function_2a_schema_connection_2 + - identifier: w_function_2a_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__/auth_6.test.ts|src/__tests__/function_2a.test.ts|src/__tests__/schema-connection-2.test.ts - CLI_REGION: us-east-2 + TEST_SUITE: src/__tests__/function_2a.test.ts|src/__tests__/schema-connection-2.test.ts|src/__tests__/schema-function-1.test.ts + CLI_REGION: eu-west-2 depend-on: - build_windows - upb - - identifier: w_schema_function_1_api_9b_custom_policies_container + - identifier: w_api_9b_custom_policies_container_function_9b 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 - CLI_REGION: us-west-2 + TEST_SUITE: src/__tests__/api_9b.test.ts|src/__tests__/custom_policies_container.test.ts|src/__tests__/function_9b.test.ts + CLI_REGION: us-east-2 depend-on: - build_windows - upb - - identifier: w_function_9b_schema_iterative_update_2_storage_1a + - identifier: w_schema_iterative_update_2_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__/function_9b.test.ts|src/__tests__/schema-iterative-update-2.test.ts|src/__tests__/storage-1a.test.ts + TEST_SUITE: src/__tests__/schema-iterative-update-2.test.ts|src/__tests__/storage-1a.test.ts|src/__tests__/storage-1b.test.ts CLI_REGION: eu-central-1 depend-on: - build_windows - upb - - identifier: w_storage_1b_function_11_function_2b + - identifier: w_function_11_function_2b_api_connection_migration2 buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/storage-1b.test.ts|src/__tests__/function_11.test.ts|src/__tests__/function_2b.test.ts - CLI_REGION: ap-southeast-2 + TEST_SUITE: src/__tests__/function_11.test.ts|src/__tests__/function_2b.test.ts|src/__tests__/migration/api.connection.migration2.test.ts + CLI_REGION: us-east-1 depend-on: - build_windows - upb - - identifier: w_api_connection_migration2_api_4_containers_api_secrets + - identifier: w_api_4_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__/migration/api.connection.migration2.test.ts|src/__tests__/api_4.test.ts|src/__tests__/containers-api-secrets.test.ts - CLI_REGION: eu-west-2 + TEST_SUITE: src/__tests__/api_4.test.ts|src/__tests__/containers-api-secrets.test.ts|src/__tests__/storage-4.test.ts + CLI_REGION: ap-southeast-1 depend-on: - build_windows - upb - - identifier: w_storage_4_schema_auth_10_geo_multi_env + - identifier: w_schema_auth_10_geo_multi_env_searchable_datastore 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 - CLI_REGION: eu-central-1 + TEST_SUITE: 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-southeast-2 depend-on: - build_windows - upb - - identifier: w_searchable_datastore_resolvers_schema_key + - identifier: w_resolvers_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__/graphql-v2/searchable-datastore.test.ts|src/__tests__/resolvers.test.ts|src/__tests__/schema-key.test.ts - CLI_REGION: ap-southeast-1 + TEST_SUITE: src/__tests__/resolvers.test.ts|src/__tests__/schema-key.test.ts|src/__tests__/api_5.test.ts + CLI_REGION: us-west-2 depend-on: - build_windows - upb - - identifier: w_api_5_apigw_api_lambda_auth_1 + - identifier: w_apigw_api_lambda_auth_1_api_key_migration2 buildspec: codebuild_specs/run_e2e_tests_windows.yml env: type: WINDOWS_SERVER_2019_CONTAINER image: $WINDOWS_IMAGE_2019 variables: - TEST_SUITE: src/__tests__/api_5.test.ts|src/__tests__/apigw.test.ts|src/__tests__/graphql-v2/api_lambda_auth_1.test.ts - CLI_REGION: ap-northeast-1 + 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 + CLI_REGION: eu-west-2 depend-on: - build_windows - upb - - identifier: w_api_key_migration2_schema_searchable_api_key_migration1 + - identifier: w_schema_searchable_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.migration2.test.ts|src/__tests__/schema-searchable.test.ts|src/__tests__/migration/api.key.migration1.test.ts - CLI_REGION: ap-northeast-1 + TEST_SUITE: src/__tests__/schema-searchable.test.ts|src/__tests__/migration/api.key.migration1.test.ts|src/__tests__/schema-auth-14.test.ts + CLI_REGION: ap-southeast-2 depend-on: - build_windows - upb - - identifier: w_schema_auth_14_api_3_api_6b + - identifier: w_api_3_api_6b_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__/schema-auth-14.test.ts|src/__tests__/api_3.test.ts|src/__tests__/api_6b.test.ts + TEST_SUITE: src/__tests__/api_3.test.ts|src/__tests__/api_6b.test.ts|src/__tests__/api_1.test.ts CLI_REGION: ap-southeast-1 depend-on: - build_windows - upb - - identifier: w_api_1_layer_1_api_key_migration4 + - identifier: w_layer_1_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__/api_1.test.ts|src/__tests__/layer-1.test.ts|src/__tests__/migration/api.key.migration4.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 + CLI_REGION: ap-southeast-2 depend-on: - build_windows - upb - - identifier: w_schema_iterative_update_4_function_1 + - 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__/schema-iterative-update-4.test.ts|src/__tests__/function_1.test.ts - CLI_REGION: ap-northeast-1 + TEST_SUITE: src/__tests__/function_1.test.ts + CLI_REGION: us-east-2 depend-on: - build_windows - upb @@ -1893,7 +1896,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/auth_2c.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-east-1 depend-on: - build_windows - upb @@ -1904,7 +1907,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/auth_2e.test.ts - CLI_REGION: us-east-1 + CLI_REGION: us-west-2 depend-on: - build_windows - upb @@ -1915,7 +1918,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/env-3.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-east-2 depend-on: - build_windows - upb @@ -1926,7 +1929,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/notifications-in-app-messaging.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: eu-central-1 depend-on: - build_windows - upb @@ -1937,7 +1940,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-auth-11-a.test.ts - CLI_REGION: us-west-2 + CLI_REGION: eu-west-2 depend-on: - build_windows - upb @@ -1948,7 +1951,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/import_s3_3.test.ts - CLI_REGION: us-west-2 + CLI_REGION: us-east-1 depend-on: - build_windows - upb @@ -1959,7 +1962,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/hostingPROD.test.ts - CLI_REGION: us-east-1 + CLI_REGION: eu-central-1 depend-on: - build_windows - upb @@ -1970,7 +1973,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/containers-api-1.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: eu-central-1 depend-on: - build_windows - upb @@ -1981,7 +1984,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-auth-15.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: us-west-2 depend-on: - build_windows - upb @@ -1992,7 +1995,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/schema-connection-1.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-east-2 depend-on: - build_windows - upb @@ -2003,7 +2006,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/containers-api-2.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: ap-northeast-1 depend-on: - build_windows - upb @@ -2014,7 +2017,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/import_s3_1.test.ts - CLI_REGION: us-west-2 + CLI_REGION: eu-central-1 USE_PARENT_ACCOUNT: 1 depend-on: - build_windows @@ -2026,7 +2029,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/transformer-migrations/searchable-migration.test.ts - CLI_REGION: us-west-2 + CLI_REGION: eu-central-1 USE_PARENT_ACCOUNT: 1 depend-on: - build_windows @@ -2038,7 +2041,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/geo-remove-1.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: eu-west-2 depend-on: - build_windows - upb @@ -2049,7 +2052,7 @@ batch: image: $WINDOWS_IMAGE_2019 variables: TEST_SUITE: src/__tests__/import_dynamodb_1.test.ts - CLI_REGION: us-east-1 + CLI_REGION: ap-southeast-2 USE_PARENT_ACCOUNT: 1 depend-on: - build_windows @@ -2060,7 +2063,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests/notifications-migration/notifications-migration-4.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_api_key_migration_v8 @@ -2069,7 +2072,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests/transformer_migration/api.key.migration.test.ts - CLI_REGION: us-east-2 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_notifications_migration_v8 @@ -2078,7 +2081,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests/notifications-migration/notifications-migration.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_api_key_migration_2_v8 @@ -2087,7 +2090,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests/transformer_migration/api.key.migration-2.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_notifications_migration_2_v8 @@ -2096,7 +2099,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests/notifications-migration/notifications-migration-2.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_function_migration_update_v8 @@ -2105,7 +2108,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/update_tests/function_migration_update.test.ts - CLI_REGION: us-east-1 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_notifications_migration_3_v8 @@ -2114,7 +2117,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests/notifications-migration/notifications-migration-3.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_scaffold_v10 @@ -2132,7 +2135,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests_v10/api-graphql-v2.migration.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_api_rest_basic_migration_v10 @@ -2141,7 +2144,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests_v10/api-rest-basic.migration.test.ts - CLI_REGION: eu-west-2 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_api_rest_lambda_migration_v10 @@ -2150,7 +2153,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests_v10/api-rest-lambda.migration.test.ts - CLI_REGION: us-east-1 + CLI_REGION: eu-central-1 depend-on: - upb - identifier: l_api_rest_serverless_migration_v10 @@ -2159,7 +2162,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests_v10/api-rest-serverless.migration.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_auth_add_all_migration_v10 @@ -2168,7 +2171,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests_v10/auth-add-all.migration.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_auth_override_migration_v10 @@ -2177,7 +2180,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests_v10/auth-override.migration.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_custom_stack_migration_v10 @@ -2186,7 +2189,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests_v10/custom-stack.migration.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_geo_migration_v10 @@ -2195,7 +2198,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests_v10/geo.migration.test.ts - CLI_REGION: ap-southeast-2 + CLI_REGION: us-east-2 depend-on: - upb - identifier: l_git_clone_migration_tests_v10 @@ -2204,7 +2207,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests_v10/git-clone-migration-tests.test.ts - CLI_REGION: us-east-1 + CLI_REGION: ap-southeast-2 depend-on: - upb - identifier: l_pinpoint_region_migration_v10 @@ -2231,7 +2234,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests_v12/auth-app-client-secret-migration.test.ts - CLI_REGION: eu-central-1 + CLI_REGION: us-west-2 depend-on: - upb - identifier: l_auth_hosted_ui_lambda_migration_v12 @@ -2240,7 +2243,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests_v12/auth-hosted-ui-lambda-migration.test.ts - CLI_REGION: us-east-2 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_auth_lambda_callout_migration_rollback_v12 @@ -2249,7 +2252,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests_v12/auth-lambda-callout-migration-rollback.test.ts - CLI_REGION: ap-southeast-1 + CLI_REGION: ap-northeast-1 depend-on: - upb - identifier: l_auth_lambda_callout_migration_v12 @@ -2258,7 +2261,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests_v12/auth-lambda-callout-migration.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: eu-west-2 depend-on: - upb - identifier: l_auth_oauth_lambda_migration_v12 @@ -2267,7 +2270,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests_v12/auth-oauth-lambda-migration.test.ts - CLI_REGION: ap-northeast-1 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: l_auth_migration_v12 @@ -2276,7 +2279,7 @@ batch: variables: compute-type: BUILD_GENERAL1_SMALL TEST_SUITE: src/__tests__/migration_tests_v12/auth.migration.test.ts - CLI_REGION: us-west-2 + CLI_REGION: ap-southeast-1 depend-on: - upb - identifier: aggregate_e2e_reports diff --git a/codebuild_specs/lint.yml b/codebuild_specs/lint.yml index 7363c6c10d0..e57864c360c 100644 --- a/codebuild_specs/lint.yml +++ b/codebuild_specs/lint.yml @@ -4,4 +4,8 @@ env: phases: build: commands: + - source ./shared-scripts.sh && _waitForJobs build_linux requirePrevJobsToSucceed - source ./shared-scripts.sh && _lint +artifacts: + files: + - 'shared-scripts.sh' diff --git a/codebuild_specs/mock_e2e_tests.yml b/codebuild_specs/mock_e2e_tests.yml index df964536b1b..51f4cacf9f7 100644 --- a/codebuild_specs/mock_e2e_tests.yml +++ b/codebuild_specs/mock_e2e_tests.yml @@ -9,3 +9,6 @@ phases: commands: - source shared-scripts.sh && _waitForJobs build_linux requirePrevJobsToSucceed - 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 5fc6ab56355..50e57a5d91f 100644 --- a/codebuild_specs/pr_workflow.yml +++ b/codebuild_specs/pr_workflow.yml @@ -22,6 +22,10 @@ batch: buildspec: codebuild_specs/test.yml env: compute-type: BUILD_GENERAL1_LARGE + - identifier: lint + buildspec: codebuild_specs/lint.yml + env: + compute-type: BUILD_GENERAL1_LARGE - identifier: mock_e2e_tests buildspec: codebuild_specs/mock_e2e_tests.yml env: 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/hotfix_workflow.yml b/codebuild_specs/release_workflows/hotfix_workflow.yml new file mode 100644 index 00000000000..cff4c99c3d5 --- /dev/null +++ b/codebuild_specs/release_workflows/hotfix_workflow.yml @@ -0,0 +1,67 @@ +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 + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: mock_e2e_tests + buildspec: codebuild_specs/mock_e2e_tests.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: validate_cdk_version + buildspec: codebuild_specs/validate_cdk_version.yml + - identifier: verify_api_extract + buildspec: codebuild_specs/verify_api_extract.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: verify_yarn_lock + buildspec: codebuild_specs/verify_yarn_lock.yml + - identifier: publish_to_local_registry + buildspec: codebuild_specs/publish_to_local_registry.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_arm + buildspec: codebuild_specs/build_pkg_binaries_arm.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_linux + buildspec: codebuild_specs/build_pkg_binaries_linux.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_macos + buildspec: codebuild_specs/build_pkg_binaries_macos.yml + env: + compute-type: BUILD_GENERAL1_LARGE + 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: verify_versions_match + buildspec: codebuild_specs/verify_versions_match.yml + - identifier: verify_pkg_cli + buildspec: codebuild_specs/verify_pkg_cli.yml + 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..e20a0c7a6a5 --- /dev/null +++ b/codebuild_specs/release_workflows/post_publish_push_to_git.yml @@ -0,0 +1,8 @@ +version: 0.2 +env: + shell: bash + git-credential-helper: yes +phases: + build: + commands: + - source ./shared-scripts.sh && _postPublishPushToGit 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..31f1febf702 --- /dev/null +++ b/codebuild_specs/release_workflows/release_rc_workflow.yml @@ -0,0 +1,83 @@ +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 + - identifier: verify_yarn_lock + buildspec: codebuild_specs/verify_yarn_lock.yml + - identifier: publish_to_local_registry + buildspec: codebuild_specs/publish_to_local_registry.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_arm + buildspec: codebuild_specs/build_pkg_binaries_arm.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_linux + buildspec: codebuild_specs/build_pkg_binaries_linux.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_macos + buildspec: codebuild_specs/build_pkg_binaries_macos.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_win + buildspec: codebuild_specs/build_pkg_binaries_win.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: upb + buildspec: codebuild_specs/upload_pkg_binaries.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: verify_pkg_cli + buildspec: codebuild_specs/verify_pkg_cli.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: verify_versions_match + buildspec: codebuild_specs/verify_versions_match.yml + - 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..7324bc32f70 --- /dev/null +++ b/codebuild_specs/release_workflows/release_workflow.yml @@ -0,0 +1,100 @@ +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 + - identifier: verify_yarn_lock + buildspec: codebuild_specs/verify_yarn_lock.yml + - identifier: publish_to_local_registry + buildspec: codebuild_specs/publish_to_local_registry.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_arm + buildspec: codebuild_specs/build_pkg_binaries_arm.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_linux + buildspec: codebuild_specs/build_pkg_binaries_linux.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_macos + buildspec: codebuild_specs/build_pkg_binaries_macos.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_win + buildspec: codebuild_specs/build_pkg_binaries_win.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: upb + buildspec: codebuild_specs/upload_pkg_binaries.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: verify_pkg_cli + buildspec: codebuild_specs/verify_pkg_cli.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: verify_versions_match + buildspec: codebuild_specs/verify_versions_match.yml + - 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/tagged_release_without_e2e_workflow.yml b/codebuild_specs/release_workflows/tagged_release_without_e2e_workflow.yml new file mode 100644 index 00000000000..284627c01f8 --- /dev/null +++ b/codebuild_specs/release_workflows/tagged_release_without_e2e_workflow.yml @@ -0,0 +1,81 @@ +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 + - identifier: verify_yarn_lock + buildspec: codebuild_specs/verify_yarn_lock.yml + - identifier: publish_to_local_registry + buildspec: codebuild_specs/publish_to_local_registry.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_arm + buildspec: codebuild_specs/build_pkg_binaries_arm.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_linux + buildspec: codebuild_specs/build_pkg_binaries_linux.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_macos + buildspec: codebuild_specs/build_pkg_binaries_macos.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: build_pkg_binaries_win + buildspec: codebuild_specs/build_pkg_binaries_win.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: upb + buildspec: codebuild_specs/upload_pkg_binaries.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: verify_pkg_cli + buildspec: codebuild_specs/verify_pkg_cli.yml + env: + compute-type: BUILD_GENERAL1_LARGE + - identifier: verify_versions_match + buildspec: codebuild_specs/verify_versions_match.yml + - 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/scripts-windows/run-e2e-windows.sh b/codebuild_specs/scripts-windows/run-e2e-windows.sh index 36b6cfe0691..0e1304e59d5 100644 --- a/codebuild_specs/scripts-windows/run-e2e-windows.sh +++ b/codebuild_specs/scripts-windows/run-e2e-windows.sh @@ -8,9 +8,9 @@ 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=4096 +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 # source $BASH_ENV diff --git a/codebuild_specs/test.yml b/codebuild_specs/test.yml index f112bb8d21a..4e6cae52675 100644 --- a/codebuild_specs/test.yml +++ b/codebuild_specs/test.yml @@ -8,3 +8,6 @@ phases: commands: - source shared-scripts.sh && _waitForJobs build_linux requirePrevJobsToSucceed - source ./shared-scripts.sh && _testLinux +artifacts: + files: + - 'shared-scripts.sh' diff --git a/codebuild_specs/validate_cdk_version.yml b/codebuild_specs/validate_cdk_version.yml index 0919312000b..6c0dfd0ddb2 100644 --- a/codebuild_specs/validate_cdk_version.yml +++ b/codebuild_specs/validate_cdk_version.yml @@ -6,3 +6,6 @@ phases: commands: - source shared-scripts.sh && _waitForJobs build_linux requirePrevJobsToSucceed - source ./shared-scripts.sh && _validateCDKVersion +artifacts: + files: + - 'shared-scripts.sh' diff --git a/codebuild_specs/verify_api_extract.yml b/codebuild_specs/verify_api_extract.yml index 253eccb4c02..854f554a796 100644 --- a/codebuild_specs/verify_api_extract.yml +++ b/codebuild_specs/verify_api_extract.yml @@ -6,3 +6,6 @@ phases: commands: - source shared-scripts.sh && _waitForJobs build_linux requirePrevJobsToSucceed - source ./shared-scripts.sh && _verifyAPIExtract +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..b26a8849c6b --- /dev/null +++ b/codebuild_specs/verify_pkg_cli.yml @@ -0,0 +1,11 @@ +version: 0.2 +env: + shell: bash +phases: + build: + commands: + - source shared-scripts.sh && _waitForJobs $CODEBUILD_SRC_DIR/codebuild_specs/wait_upb.json requirePrevJobsToSucceed + - 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 175366e1bd4..a8d64d2321e 100644 --- a/codebuild_specs/verify_versions_match.yml +++ b/codebuild_specs/verify_versions_match.yml @@ -6,3 +6,6 @@ phases: commands: - source shared-scripts.sh && _waitForJobs publish_to_local_registry requirePrevJobsToSucceed - 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 ba66b74c16d..80bab34bdbe 100644 --- a/codebuild_specs/verify_yarn_lock.yml +++ b/codebuild_specs/verify_yarn_lock.yml @@ -6,3 +6,6 @@ phases: commands: - source shared-scripts.sh && _waitForJobs build_linux requirePrevJobsToSucceed - 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 11c4879d63b..83c773681ab 100644 --- a/codebuild_specs/wait_for_ids.json +++ b/codebuild_specs/wait_for_ids.json @@ -1,21 +1,18 @@ [ - "l_S3server_api_8_function_8", "l_amplify_app", "l_analytics_kinesis_analytics_pinpoint_flutter_analytics_pinpoint_js", - "l_android_analytics_pinpoint_config_android_notifications_pinpoint_config_flutter_analytics_pinpoint_config", "l_api_10_api_7_export_pull_a", "l_api_2b_api_6c_api_9a", - "l_api_6b_api_1_layer_1", + "l_api_3_api_6b_api_1", + "l_api_4_containers_api_secrets_storage_4", "l_api_graphql_v2_migration_v10", - "l_api_key_migration1_schema_auth_14_api_3", "l_api_key_migration3_predictions_schema_auth_11_b", - "l_api_key_migration4_schema_iterative_update_4_function_1", "l_api_key_migration_2_v8", "l_api_key_migration_v8", - "l_api_lambda_auth_1_api_key_migration2_schema_searchable", "l_api_rest_basic_migration_v10", "l_api_rest_lambda_migration_v10", "l_api_rest_serverless_migration_v10", + "l_apigw_api_lambda_auth_1_api_key_migration2", "l_auth_10_container_hosting_init_b", "l_auth_11_auth_1b_delete", "l_auth_12_auth_2g_auth_2h", @@ -28,8 +25,7 @@ "l_auth_5b_auth_9_custom_resources", "l_auth_5c_env_1_geo_add_a", "l_auth_5f_env_4_frontend_config_drift", - "l_auth_5g_hosted_ui_user_groups", - "l_auth_6_function_2a_schema_connection_2", + "l_auth_5g_hosted_ui_user_groups_s3_access", "l_auth_8b_geo_add_b_s3_sse", "l_auth_add_all_migration_v10", "l_auth_app_client_secret_migration_v12", @@ -39,36 +35,35 @@ "l_auth_migration_v12", "l_auth_oauth_lambda_migration_v12", "l_auth_override_migration_v10", - "l_build_function_custom_resource_with_storage_dynamodb_simulator", "l_configure_project_git_clone_attach_init_c", "l_containers_api_1", "l_containers_api_2", - "l_containers_api_secrets_storage_4_schema_auth_10", + "l_custom_policies_container_function_9b_schema_iterative_update_2", "l_custom_policies_function_function_6_storage_2", "l_custom_stack_migration_v10", "l_datastore_modelgen", "l_diagnose_hooks_a_mock_api", + "l_dynamodb_simulator_export_pull_c_function_12", "l_env_3", "l_env_5_function_10_function_9c", "l_export_iam_permissions_boundary_node_function", "l_export_pull_b_function_3a_init_special_case", - "l_export_pull_c_function_12_function_13", "l_export_pull_d_schema_auth_5a_schema_iterative_rollback_2", "l_feature_flags_geo_import_1b_global_sandbox_a", - "l_flutter_notifications_pinpoint_config_ios_analytics_pinpoint_config_ios_notifications_pinpoint_config", - "l_function_14_function_15_function_2d", + "l_flutter_analytics_pinpoint_config_flutter_notifications_pinpoint_config_ios_analytics_pinpoint_config", + "l_function_13_function_14_function_15", + "l_function_1_storage_5", + "l_function_2b_function_7_api_connection_migration2", + "l_function_2d_general_config_headless_init_help", "l_function_4_interactions_schema_model_a", - "l_function_7_api_connection_migration2_api_4", + "l_function_8_schema_iterative_update_locking_api_lambda_auth_2", "l_function_9a_geo_headless_api_key_migration5", - "l_function_9b_schema_iterative_update_2_storage_1a", "l_function_migration_update_v8", "l_function_permissions_geo_import_1a_geo_import_2", - "l_general_config_headless_init_help_hooks_c", "l_geo_add_c_geo_add_d_geo_import_3", "l_geo_add_e", "l_geo_add_f", "l_geo_migration_v10", - "l_geo_multi_env_searchable_datastore_resolvers", "l_geo_remove_1", "l_geo_remove_2", "l_geo_remove_3", @@ -77,6 +72,7 @@ "l_git_clone_migration_tests_v10", "l_global_sandbox_b_schema_auth_5d_schema_auth_6b", "l_global_sandbox_c_hooks_b_notifications_analytics_compatibility_sms_1", + "l_hooks_c_init_force_push_interactions_1", "l_hostingPROD", "l_hosting_layer_3_api_connection_migration", "l_http_migration_schema_auth_12_schema_auth_3", @@ -97,10 +93,11 @@ "l_init_a_schema_auth_4c_schema_auth_5c", "l_init_d_init_f_auth_5d", "l_init_e_notifications_analytics_compatibility_in_app_2_schema_auth_11_c", - "l_init_force_push_interactions_1_interactions_2", - "l_javascript_analytics_pinpoint_config_javascript_notifications_pinpoint_config_pr_previews_multi_env_1", + "l_interactions_2_minify_cloudformation_notifications_multi_env", + "l_ios_notifications_pinpoint_config_javascript_analytics_pinpoint_config_javascript_notifications_pinpoint_config", + "l_layer_1_api_key_migration4_schema_iterative_update_4", + "l_layer_2_schema_auth_13_function_5", "l_layer_4_function_2c_function_3b", - "l_minify_cloudformation_notifications_multi_env_notifications_sms_update", "l_notifications_analytics_compatibility_in_app_1_notifications_analytics_compatibility_sms_2_analytics_2", "l_notifications_apns_notifications_fcm_notifications_in_app_messaging_env_2", "l_notifications_in_app_messaging", @@ -110,14 +107,16 @@ "l_notifications_migration_4_v8", "l_notifications_migration_v8", "l_notifications_sms_schema_auth_4b_schema_model_e", - "l_opensearch_simulator_parameter_store_1_parameter_store_2", + "l_notifications_sms_update_opensearch_simulator_parameter_store_1", + "l_parameter_store_2_android_analytics_pinpoint_config_android_notifications_pinpoint_config", "l_pinpoint_region_migration_v10", "l_plugin_studio_modelgen_custom_transformers", + "l_pr_previews_multi_env_1_pull_2_push", "l_predictions_migration_api_6a_auth_7b", - "l_pull_2_push_smoketest", + "l_resolvers_schema_key_api_5", "l_scaffold_v10", + "l_schema_auth_10_geo_multi_env_searchable_datastore", "l_schema_auth_11_a", - "l_schema_auth_13_function_5_schema_iterative_update_1", "l_schema_auth_15", "l_schema_auth_1a_schema_auth_5b_schema_auth_8b", "l_schema_auth_1b_schema_auth_2a_schema_auth_7a", @@ -129,104 +128,105 @@ "l_schema_auth_8c_auth_3a_auth_3b", "l_schema_auth_9_a_schema_auth_9_c_storage_3", "l_schema_connection_1", - "l_schema_function_1_api_9b_custom_policies_container", + "l_schema_connection_2_schema_function_1_api_9b", "l_schema_function_2_auth_4b_auth_8a", + "l_schema_iterative_update_1_auth_6_function_2a", "l_schema_iterative_update_3_auth_migration_api_2a", - "l_schema_iterative_update_locking_api_lambda_auth_2_layer_2", - "l_schema_key_api_5_apigw", "l_schema_model_c_schema_predictions_model_migration", + "l_schema_searchable_api_key_migration1_schema_auth_14", "l_schema_versioned_auth_1c_auth_5e", "l_searchable_migration", - "l_storage_1b_function_11_function_2b", - "l_storage_5", + "l_smoketest_S3server_api_8", + "l_storage_1a_storage_1b_function_11", "l_storage_migration_v10", "l_tags_auth_1a_auth_trigger", + "l_user_groups_build_function_custom_resource_with_storage", "l_with_babel_config_amplify_configure_env_2", "w_analytics_kinesis_analytics_pinpoint_flutter_analytics_pinpoint_js", - "w_api_1_layer_1_api_key_migration4", - "w_api_2a_api_2b_api_6c", - "w_api_5_apigw_api_lambda_auth_1", - "w_api_8_schema_iterative_update_locking_api_lambda_auth_2", - "w_api_9a_auth_2h_auth_5g", - "w_api_connection_migration2_api_4_containers_api_secrets", - "w_api_connection_migration_api_key_migration3_predictions", - "w_api_key_migration2_schema_searchable_api_key_migration1", - "w_api_key_migration5_schema_auth_1a_schema_auth_5b", + "w_api_10_api_7_export_pull_a", + "w_api_2b_api_6c_api_9a", + "w_api_3_api_6b_api_1", + "w_api_4_containers_api_secrets_storage_4", + "w_api_6a_auth_7b_export_pull_b", + "w_api_9b_custom_policies_container_function_9b", + "w_api_key_migration3_predictions_schema_auth_11_b", + "w_apigw_api_lambda_auth_1_api_key_migration2", + "w_auth_11_auth_1b_delete", "w_auth_2a_auth_2b_auth_2d", "w_auth_2c", "w_auth_2e", "w_auth_2f_notifications_lifecycle_notifications_analytics_compatibility_in_app_1", - "w_auth_3b_auth_4a_auth_7a", - "w_auth_4b_auth_8a_export_pull_d", + "w_auth_2h_auth_5g_hosted_ui", + "w_auth_4a_auth_7a_auth_8c", "w_auth_5a_auth_5c_env_1", "w_auth_5e_auth_8b_geo_add_b", - "w_auth_6_function_2a_schema_connection_2", - "w_auth_8c_feature_flags_geo_import_1b", + "w_auth_8a_export_pull_d_schema_auth_5a", "w_configure_project_init_c_layer_4", "w_containers_api_1", "w_containers_api_2", "w_custom_policies_function_storage_2_iam_permissions_boundary", - "w_custom_resource_with_storage_dynamodb_simulator_export_pull_c", - "w_custom_resources_env_5_function_10", - "w_delete_geo_add_c_geo_add_d", + "w_dynamodb_simulator_export_pull_c_function_12", "w_env_3", - "w_export_pull_a_function_9a_geo_headless", - "w_export_pull_b_init_special_case_http_migration", + "w_env_5_function_10_function_9c", + "w_feature_flags_geo_import_1b_global_sandbox_a", "w_frontend_config_drift_schema_auth_4d_schema_auth_6a", - "w_function_12_function_13_function_14", + "w_function_1", + "w_function_11_function_2b_api_connection_migration2", + "w_function_13_function_14_function_2d", + "w_function_2a_schema_connection_2_schema_function_1", "w_function_2c_interactions_schema_model_a", - "w_function_2d_general_config_headless_init_help", - "w_function_9b_schema_iterative_update_2_storage_1a", - "w_function_9c_function_permissions_geo_import_1a", - "w_function_migration_api_10_api_7", + "w_function_5_schema_iterative_update_1_auth_6", + "w_function_9a_geo_headless_api_key_migration5", + "w_function_permissions_geo_import_1a_geo_import_2", + "w_general_config_headless_init_help_init_force_push", "w_geo_add_a_init_a_schema_auth_4c", - "w_geo_import_2_global_sandbox_b_schema_auth_5d", - "w_geo_import_3_hosting_layer_3", + "w_geo_add_c_geo_add_d_geo_import_3", "w_geo_remove_1", - "w_global_sandbox_a_init_e_notifications_analytics_compatibility_in_app_2", + "w_global_sandbox_b_schema_auth_5d_schema_auth_6b", "w_hooks_b_notifications_analytics_compatibility_sms_1_plugin", - "w_hosted_ui_user_groups_build_function", "w_hostingPROD", + "w_hosting_layer_3_api_connection_migration", "w_import_dynamodb_1", "w_import_s3_1", "w_import_s3_3", "w_init_b_notifications_apns_notifications_fcm", "w_init_d_init_f_auth_5d", - "w_init_force_push_interactions_1_interactions_2", - "w_minify_cloudformation_notifications_multi_env_notifications_sms_update", + "w_init_e_notifications_analytics_compatibility_in_app_2_schema_auth_11_c", + "w_init_special_case_http_migration_schema_auth_12", + "w_interactions_1_interactions_2_minify_cloudformation", + "w_layer_1_api_key_migration4_schema_iterative_update_4", "w_model_migration_auth_3c_auth_4c", "w_node_function_notifications_sms_schema_auth_4b", "w_notifications_analytics_compatibility_sms_2_analytics_2_global_sandbox_c", "w_notifications_in_app_messaging", "w_notifications_in_app_messaging_env_2_with_babel_config_amplify_configure", + "w_notifications_multi_env_notifications_sms_update_parameter_store_1", "w_notifications_sms_pull_auth_10_container_hosting", - "w_parameter_store_1_parameter_store_2_push", - "w_predictions_migration_api_6a_auth_7b", + "w_parameter_store_2_push_api_8", + "w_resolvers_schema_key_api_5", "w_s3_sse_schema_auth_4a_schema_model_b", + "w_schema_auth_10_geo_multi_env_searchable_datastore", "w_schema_auth_11_a", - "w_schema_auth_11_b_schema_auth_1b_schema_auth_2a", - "w_schema_auth_11_c_schema_auth_2b_schema_auth_6c", - "w_schema_auth_12_schema_auth_3_schema_function_2", - "w_schema_auth_13_function_5_schema_iterative_update_1", - "w_schema_auth_14_api_3_api_6b", "w_schema_auth_15", - "w_schema_auth_5a_schema_iterative_update_3_auth_migration", + "w_schema_auth_1a_schema_auth_5b_schema_auth_8b", + "w_schema_auth_1b_schema_auth_2a_schema_auth_7a", + "w_schema_auth_2b_schema_auth_6c_schema_auth_6d", + "w_schema_auth_3_schema_function_2_auth_4b", "w_schema_auth_5c_auth_5b_auth_9", - "w_schema_auth_6b_schema_auth_8c_auth_3a", - "w_schema_auth_6d_schema_auth_7c_schema_auth_8a", - "w_schema_auth_7a_schema_auth_7b_schema_auth_9_b", - "w_schema_auth_8b_schema_auth_9_a_schema_auth_9_c", + "w_schema_auth_7b_schema_auth_9_b_predictions_migration", + "w_schema_auth_7c_schema_auth_8a_function_migration", + "w_schema_auth_8c_auth_3a_auth_3b", + "w_schema_auth_9_a_schema_auth_9_c_storage_3", "w_schema_connection_1", "w_schema_data_access_patterns_schema_model_c_schema_predictions", - "w_schema_function_1_api_9b_custom_policies_container", - "w_schema_iterative_update_4_function_1", + "w_schema_iterative_update_2_storage_1a_storage_1b", + "w_schema_iterative_update_3_auth_migration_api_2a", + "w_schema_iterative_update_locking_api_lambda_auth_2_schema_auth_13", "w_schema_model_d_auth_5f_env_4", "w_schema_model_e_schema_versioned_auth_1c", - "w_searchable_datastore_resolvers_schema_key", + "w_schema_searchable_api_key_migration1_schema_auth_14", "w_searchable_migration", - "w_storage_1b_function_11_function_2b", - "w_storage_3_auth_11_auth_1b", - "w_storage_4_schema_auth_10_geo_multi_env", "w_studio_modelgen_custom_transformers_notifications_in_app_messaging_env_1", - "w_tags_auth_1a_auth_trigger" + "w_tags_auth_1a_auth_trigger", + "w_user_groups_s3_access_user_groups_build_function" ] diff --git a/package.json b/package.json index 3310d56f365..175c2f711a2 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "cloud-e2e-circleci": "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-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", @@ -35,16 +36,25 @@ "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", "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'", + "promote-rc-circleci": "./scripts/promote-rc.sh", "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'", + "release-rc-circleci": "./scripts/release-rc.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", @@ -62,9 +72,9 @@ "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", "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", @@ -158,7 +168,7 @@ }, "packageManager": "yarn@3.5.0", "resolutions": { - "aws-sdk": "^2.1405.0", + "aws-sdk": "^2.1426.0", "cross-fetch": "^2.2.6", "glob-parent": "^6.0.2", "got": "^11.8.5", 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/package.json b/packages/amplify-appsync-simulator/package.json index 2db22a30ceb..511efdfb387 100644 --- a/packages/amplify-appsync-simulator/package.json +++ b/packages/amplify-appsync-simulator/package.json @@ -35,7 +35,7 @@ "@graphql-tools/schema": "^8.3.1", "@graphql-tools/utils": "^8.5.1", "amplify-velocity-template": "1.4.12", - "aws-sdk": "^2.1405.0", + "aws-sdk": "^2.1426.0", "chalk": "^4.1.1", "cors": "^2.8.5", "dataloader": "^2.0.0", 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 48743c34f90..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 @@ -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); 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-category-auth/package.json b/packages/amplify-category-auth/package.json index 23141e2b8db..4cf54f600af 100644 --- a/packages/amplify-category-auth/package.json +++ b/packages/amplify-category-auth/package.json @@ -37,7 +37,7 @@ "amplify-headless-interface": "1.17.4", "amplify-util-headless-input": "1.9.14", "aws-cdk-lib": "~2.80.0", - "aws-sdk": "^2.1405.0", + "aws-sdk": "^2.1426.0", "axios": "^0.26.0", "chalk": "^4.1.1", "change-case": "^4.1.1", 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/utils/auth-defaults-appliers.test.ts b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/auth-defaults-appliers.test.ts index f160480eb17..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,7 +23,7 @@ jest.mock('@aws-amplify/amplify-cli-core', () => { return { ...(jest.requireActual('@aws-amplify/amplify-cli-core') as {}), FeatureFlags: { - getBoolean: jest.fn().mockImplementation((name, defaultValue) => { + getBoolean: jest.fn().mockImplementation((name) => { return name === 'auth.enableCaseInsensitivity'; }), getNumber: 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-cognito-app-client-secret.test.ts b/packages/amplify-category-auth/src/__tests__/provider-utils/awscloudformation/utils/generate-cognito-app-client-secret.test.ts index 77570be543c..04e26beac5c 100644 --- 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 @@ -1,4 +1,4 @@ -import { $TSContext, stateManager, pathManager, AmplifyFault } from '@aws-amplify/amplify-cli-core'; +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'; @@ -11,7 +11,6 @@ jest.mock('../../../../provider-utils/awscloudformation/utils/get-app-client-sec const stateManagerMock = stateManager as jest.Mocked; const pathManagerMock = pathManager as jest.Mocked; -const AmplifyFaultMock = AmplifyFault as jest.MockedClass; const projectHasAuthMock = projectHasAuth as jest.MockedFunction; const getAuthResourceNameMock = getAuthResourceName as jest.MockedFunction; const getAppClientSecretMock = getAppClientSecret as jest.MockedFunction; 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-custom/src/__tests__/utils/build-custom-resources.test.ts b/packages/amplify-category-custom/src/__tests__/utils/build-custom-resources.test.ts index 6f64bd21312..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 @@ -1,4 +1,4 @@ -import { $TSContext, AmplifyError } from '@aws-amplify/amplify-cli-core'; +import { $TSContext } from '@aws-amplify/amplify-cli-core'; import execa from 'execa'; import { buildCustomResources } from '../../utils/build-custom-resources'; 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-function/package.json b/packages/amplify-category-function/package.json index e55cfe96ef5..2e152d0f905 100644 --- a/packages/amplify-category-function/package.json +++ b/packages/amplify-category-function/package.json @@ -31,7 +31,7 @@ "@aws-amplify/amplify-function-plugin-interface": "1.11.0", "@aws-amplify/amplify-prompts": "2.8.1", "archiver": "^5.3.0", - "aws-sdk": "^2.1405.0", + "aws-sdk": "^2.1426.0", "chalk": "^4.1.1", "cloudform-types": "^4.2.0", "enquirer": "^2.3.6", 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-geo/package.json b/packages/amplify-category-geo/package.json index ba103f3afd0..c04e2d2ff2d 100644 --- a/packages/amplify-category-geo/package.json +++ b/packages/amplify-category-geo/package.json @@ -32,7 +32,7 @@ "amplify-headless-interface": "1.17.4", "amplify-util-headless-input": "1.9.14", "aws-cdk-lib": "~2.80.0", - "aws-sdk": "^2.1405.0", + "aws-sdk": "^2.1426.0", "constructs": "^10.0.5", "fs-extra": "^8.1.0", "lodash": "^4.17.21", 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-notifications/package.json b/packages/amplify-category-notifications/package.json index 603aab5bf9b..67db92954eb 100644 --- a/packages/amplify-category-notifications/package.json +++ b/packages/amplify-category-notifications/package.json @@ -30,7 +30,7 @@ "@aws-amplify/amplify-environment-parameters": "1.7.4", "@aws-amplify/amplify-prompts": "2.8.1", "@aws-amplify/amplify-provider-awscloudformation": "8.4.0", - "aws-sdk": "^2.1405.0", + "aws-sdk": "^2.1426.0", "chalk": "^4.1.1", "fs-extra": "^8.1.0", "lodash": "^4.17.21", diff --git a/packages/amplify-category-predictions/package.json b/packages/amplify-category-predictions/package.json index 282b165739c..531fa045e6e 100644 --- a/packages/amplify-category-predictions/package.json +++ b/packages/amplify-category-predictions/package.json @@ -27,7 +27,7 @@ "dependencies": { "@aws-amplify/amplify-cli-core": "4.2.4", "@aws-amplify/amplify-prompts": "2.8.1", - "aws-sdk": "^2.1405.0", + "aws-sdk": "^2.1426.0", "chalk": "^4.1.1", "fs-extra": "^8.1.0", "uuid": "^8.3.2" diff --git a/packages/amplify-category-storage/package.json b/packages/amplify-category-storage/package.json index 6acfbf13925..0205368ca03 100644 --- a/packages/amplify-category-storage/package.json +++ b/packages/amplify-category-storage/package.json @@ -35,7 +35,7 @@ "amplify-headless-interface": "1.17.4", "amplify-util-headless-input": "1.9.14", "aws-cdk-lib": "~2.80.0", - "aws-sdk": "^2.1405.0", + "aws-sdk": "^2.1426.0", "chalk": "^4.1.1", "constructs": "^10.0.5", "enquirer": "^2.3.6", 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 21565bc2eaa..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 @@ -165,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/s3-walkthrough.test.ts b/packages/amplify-category-storage/src/__tests__/provider-utils/awscloudformation/service-walkthroughs/s3-walkthrough.test.ts index 6bf52477869..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)); }), ); @@ -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-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__/featureFlags.test.ts b/packages/amplify-cli-core/src/__tests__/featureFlags.test.ts index ab18754feb3..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', }), }; @@ -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__/hooks/hooksExecutor.test.ts b/packages/amplify-cli-core/src/__tests__/hooks/hooksExecutor.test.ts index bed5f843141..6aca81697fc 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'; 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__/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/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/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 0155c1cbc1c..38386581d91 100644 --- a/packages/amplify-cli-core/src/utils/packageManager.ts +++ b/packages/amplify-cli-core/src/utils/packageManager.ts @@ -40,14 +40,14 @@ class NpmPackageManager implements PackageManager { class YarnPackageManager implements PackageManager { readonly packageManager: PackageManagerType = 'yarn'; readonly displayValue = 'Yarn'; - readonly executable = isWindows ? 'yarn.cmd' : 'yarn'; + readonly executable = 'yarn'; // Windows does not require `.cmd` extension to invoke yarn readonly lockFile = 'yarn.lock'; version?: SemVer; getRunScriptArgs = (scriptName: string) => [scriptName]; getInstallArgs = (buildType = BuildType.PROD) => { const useYarnModern = this.version?.major && this.version?.major > 1; - return useYarnModern ? ['install'] : ['--no-bin-links'].concat(buildType === 'PROD' ? ['--production'] : []); + return (useYarnModern ? ['install'] : ['--no-bin-links']).concat(buildType === 'PROD' ? ['--production'] : []); }; } diff --git a/packages/amplify-cli-logger/src/__tests__/TestFilePath.test.ts b/packages/amplify-cli-logger/src/__tests__/TestFilePath.test.ts index 25913e4ee1b..4434a001daf 100644 --- a/packages/amplify-cli-logger/src/__tests__/TestFilePath.test.ts +++ b/packages/amplify-cli-logger/src/__tests__/TestFilePath.test.ts @@ -1,4 +1,3 @@ -import os from 'os'; import path from 'path'; import { constants } from '../constants'; diff --git a/packages/amplify-cli-npm/index.ts b/packages/amplify-cli-npm/index.ts index 6f49e035acb..10713d6d500 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.3.0 +// force version bump to 12.4.0 diff --git a/packages/amplify-cli/package.json b/packages/amplify-cli/package.json index 3976facd4f6..9e1daeafc81 100644 --- a/packages/amplify-cli/package.json +++ b/packages/amplify-cli/package.json @@ -36,7 +36,7 @@ "dependencies": { "@aws-amplify/amplify-app": "5.0.14", "@aws-amplify/amplify-category-analytics": "5.0.16", - "@aws-amplify/amplify-category-api": "^5.5.0", + "@aws-amplify/amplify-category-api": "^5.5.2", "@aws-amplify/amplify-category-auth": "3.5.0", "@aws-amplify/amplify-category-custom": "3.1.4", "@aws-amplify/amplify-category-function": "5.4.4", @@ -66,7 +66,7 @@ "@aws-amplify/amplify-util-mock": "5.4.4", "@aws-amplify/amplify-util-uibuilder": "1.9.4", "@aws-cdk/cloudformation-diff": "~2.68.0", - "amplify-codegen": "^4.1.4", + "amplify-codegen": "^4.2.0", "amplify-dotnet-function-runtime-provider": "2.0.9", "amplify-go-function-runtime-provider": "2.3.27", "amplify-java-function-runtime-provider": "2.3.27", @@ -74,7 +74,7 @@ "amplify-nodejs-function-runtime-provider": "2.5.4", "amplify-python-function-runtime-provider": "2.4.27", "aws-cdk-lib": "~2.80.0", - "aws-sdk": "^2.1405.0", + "aws-sdk": "^2.1426.0", "chalk": "^4.1.1", "ci-info": "^3.8.0", "cli-table3": "^0.6.0", @@ -119,6 +119,7 @@ "@types/tar-fs": "^2.0.0", "@types/treeify": "^1.0.0", "@types/update-notifier": "^5.1.0", + "amplify-headless-interface": "1.17.4", "cloudform-types": "^4.2.0", "jest": "^29.5.0", "nock": "^12.0.3", 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..476106f2184 100644 --- a/packages/amplify-cli/src/__tests__/amplify-exception-handler.test.ts +++ b/packages/amplify-cli/src/__tests__/amplify-exception-handler.test.ts @@ -8,7 +8,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 +30,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 () => { 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/upgrade.pkg.test.ts b/packages/amplify-cli/src/__tests__/commands/upgrade.pkg.test.ts index 9ff6a66df2b..5d71361a074 100644 --- a/packages/amplify-cli/src/__tests__/commands/upgrade.pkg.test.ts +++ b/packages/amplify-cli/src/__tests__/commands/upgrade.pkg.test.ts @@ -2,7 +2,6 @@ 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'; 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..974266c19d7 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'; @@ -31,7 +30,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 +147,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', [ { @@ -210,9 +215,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 () => { 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__/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/extensions/amplify-helpers/remove-resource.ts b/packages/amplify-cli/src/extensions/amplify-helpers/remove-resource.ts index 975aa895f5b..3e1591b299f 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'; @@ -99,6 +99,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' }, diff --git a/packages/amplify-console-hosting/package.json b/packages/amplify-console-hosting/package.json index c5c1c0b1dc5..2124ec8e8f2 100644 --- a/packages/amplify-console-hosting/package.json +++ b/packages/amplify-console-hosting/package.json @@ -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 42931db8423..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!'; @@ -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-integration-tests/__tests__/pullAndInit.test.ts b/packages/amplify-console-integration-tests/__tests__/pullAndInit.test.ts index adfd58129f4..f0ed8c8c026 100644 --- a/packages/amplify-console-integration-tests/__tests__/pullAndInit.test.ts +++ b/packages/amplify-console-integration-tests/__tests__/pullAndInit.test.ts @@ -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 916f80b9c3e..492c154b70b 100644 --- a/packages/amplify-console-integration-tests/package.json +++ b/packages/amplify-console-integration-tests/package.json @@ -24,7 +24,7 @@ "@aws-amplify/amplify-cli-core": "4.2.4", "@aws-amplify/amplify-e2e-core": "5.2.0", "@types/ini": "^1.3.30", - "aws-sdk": "^2.1405.0", + "aws-sdk": "^2.1426.0", "dotenv": "^8.2.0", "execa": "^5.1.1", "fs-extra": "^8.1.0", diff --git a/packages/amplify-container-hosting/package.json b/packages/amplify-container-hosting/package.json index 256961c5dd5..5a30c6025af 100644 --- a/packages/amplify-container-hosting/package.json +++ b/packages/amplify-container-hosting/package.json @@ -26,7 +26,7 @@ "extract-api": "ts-node ../../scripts/extract-api.ts" }, "dependencies": { - "@aws-amplify/amplify-category-api": "^5.5.0", + "@aws-amplify/amplify-category-api": "^5.5.2", "@aws-amplify/amplify-cli-core": "4.2.4", "@aws-amplify/amplify-environment-parameters": "1.7.4", "fs-extra": "^8.1.0", diff --git a/packages/amplify-dynamodb-simulator/package.json b/packages/amplify-dynamodb-simulator/package.json index 4ea15ac3794..5ed3a37365a 100644 --- a/packages/amplify-dynamodb-simulator/package.json +++ b/packages/amplify-dynamodb-simulator/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "@aws-amplify/amplify-cli-core": "4.2.4", - "aws-sdk": "^2.1405.0", + "aws-sdk": "^2.1426.0", "detect-port": "^1.3.0", "execa": "^5.1.1", "fs-extra": "^8.1.0", diff --git a/packages/amplify-e2e-core/package.json b/packages/amplify-e2e-core/package.json index 49c25c99105..cc00632735b 100644 --- a/packages/amplify-e2e-core/package.json +++ b/packages/amplify-e2e-core/package.json @@ -23,10 +23,12 @@ }, "dependencies": { "@aws-amplify/amplify-cli-core": "4.2.4", + "@aws-sdk/client-sts": "^3.303.0", + "@aws-sdk/credential-providers": "^3.303.0", "amplify-headless-interface": "1.17.4", "aws-amplify": "^4.2.8", "aws-appsync": "^4.1.1", - "aws-sdk": "^2.1405.0", + "aws-sdk": "^2.1426.0", "chalk": "^4.1.1", "dotenv": "^8.2.0", "execa": "^5.1.1", 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 9a4023a984e..e19aeafe987 100644 --- a/packages/amplify-e2e-core/src/utils/index.ts +++ b/packages/amplify-e2e-core/src/utils/index.ts @@ -29,6 +29,7 @@ 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 diff --git a/packages/amplify-e2e-core/src/utils/nexpect.ts b/packages/amplify-e2e-core/src/utils/nexpect.ts index 902f7b68ce9..724246f8aea 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 { diff --git a/packages/amplify-e2e-core/src/utils/pinpoint.ts b/packages/amplify-e2e-core/src/utils/pinpoint.ts index 9589cccd4a9..6535984a62b 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 '..'; diff --git a/packages/amplify-e2e-core/src/utils/sdk-calls.ts b/packages/amplify-e2e-core/src/utils/sdk-calls.ts index 8f524cefedc..5e0f5f0acf4 100644 --- a/packages/amplify-e2e-core/src/utils/sdk-calls.ts +++ b/packages/amplify-e2e-core/src/utils/sdk-calls.ts @@ -1,7 +1,6 @@ /* eslint-disable @typescript-eslint/explicit-function-return-type */ /* eslint-disable no-return-await */ import { - config, DynamoDB, S3, CognitoIdentity, 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/package.json b/packages/amplify-e2e-tests/package.json index ed50875c8c2..0b5b83ca1dd 100644 --- a/packages/amplify-e2e-tests/package.json +++ b/packages/amplify-e2e-tests/package.json @@ -40,7 +40,7 @@ "aws-amplify": "^4.2.8", "aws-appsync": "^4.1.1", "aws-cdk-lib": "~2.80.0", - "aws-sdk": "^2.1405.0", + "aws-sdk": "^2.1426.0", "axios": "^0.26.0", "circleci-api": "^4.1.4", "constructs": "^10.0.5", @@ -49,12 +49,15 @@ "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.9", "isomorphic-fetch": "^3.0.0", "lodash": "^4.17.21", + "moment": "^2.24.0", "node-fetch": "^2.6.7", + "node-pty": "beta", "rimraf": "^3.0.0", "title-case": "^3.0.3", "upper-case": "^2.0.2", @@ -67,6 +70,7 @@ "@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", "ts-jest": "^29.1.0", diff --git a/packages/amplify-e2e-tests/sample.env b/packages/amplify-e2e-tests/sample.env index 44785f9214b..0fff6d4b533 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= @@ -21,8 +23,6 @@ APPLE_PRIVATE_KEY=----BEGIN PRIVATE KEY-----MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEH 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 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_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_3a.test.ts b/packages/amplify-e2e-tests/src/__tests__/auth_3a.test.ts index fb51f65caeb..583b78e541a 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', 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 index b7e973feba3..db5a3b4b1e9 100644 --- a/packages/amplify-e2e-tests/src/__tests__/auth_5g.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/auth_5g.test.ts @@ -1,5 +1,6 @@ /* eslint-disable import/no-extraneous-dependencies */ import { + assertAppClientSecretInFiles, deleteProject, amplifyPushNonInteractive, addHeadlessAuth, @@ -14,7 +15,6 @@ import { CognitoUserPoolSigninMethod, CognitoUserProperty, } from 'amplify-headless-interface'; -import { assertAppClientSecretInFiles } from '@aws-amplify/amplify-e2e-core/src/utils/auth-utils'; const PROJECT_NAME = 'authTest'; const defaultsSettings = { 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__/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__/delete.test.ts b/packages/amplify-e2e-tests/src/__tests__/delete.test.ts index 947640a040e..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'; @@ -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__/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_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_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_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 c03fd42396b..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; 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_2a.test.ts b/packages/amplify-e2e-tests/src/__tests__/import_auth_2a.test.ts index e681882255a..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); 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 9ddfe21f692..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); 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 f40648f04de..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 @@ -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); 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__/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__/resolvers.test.ts b/packages/amplify-e2e-tests/src/__tests__/resolvers.test.ts index 6f948a00945..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; 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 0b2ef268279..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 @@ -6,7 +6,6 @@ const port = 20005; // for testing const route = '/mock-testing'; const bucket = 'mock-testing'; const localDirS3 = __dirname + '/test-data/'; -const actual_file = __dirname + '/test-data/2.png'; let s3client; let simulator; @@ -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(); @@ -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__/transformer-migrations/auth-migration.test.ts b/packages/amplify-e2e-tests/src/__tests__/transformer-migrations/auth-migration.test.ts index e308c8c3be3..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 @@ -21,8 +21,6 @@ import { updateAuthAddUserGroups, } from '@aws-amplify/amplify-e2e-core'; import gql from 'graphql-tag'; -import moment from 'moment'; -import { IAM } from 'aws-sdk'; (global as any).fetch = require('node-fetch'); @@ -30,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'; @@ -58,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/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/typings/aws-matchers.d.ts b/packages/amplify-e2e-tests/typings/aws-matchers.d.ts index f9f835f7448..2887c49b616 100644 --- a/packages/amplify-e2e-tests/typings/aws-matchers.d.ts +++ b/packages/amplify-e2e-tests/typings/aws-matchers.d.ts @@ -1,4 +1,6 @@ +// 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; diff --git a/packages/amplify-environment-parameters/package.json b/packages/amplify-environment-parameters/package.json index d9eb3f7bb36..eaa5e107fc4 100644 --- a/packages/amplify-environment-parameters/package.json +++ b/packages/amplify-environment-parameters/package.json @@ -32,7 +32,7 @@ "lodash": "^4.17.21" }, "devDependencies": { - "aws-sdk": "^2.1405.0", + "aws-sdk": "^2.1426.0", "mkdirp": "^1.0.4", "ts-json-schema-generator": "~1.1.2" }, diff --git a/packages/amplify-frontend-ios/lib/amplify-xcode.js b/packages/amplify-frontend-ios/lib/amplify-xcode.js index 6604ed70b08..aea5b59c353 100644 --- a/packages/amplify-frontend-ios/lib/amplify-xcode.js +++ b/packages/amplify-frontend-ios/lib/amplify-xcode.js @@ -33,7 +33,7 @@ const amplifyXcodePath = () => path.join(pathManager.getAmplifyPackageLibDirPath async function importConfig(params) { let command = `${amplifyXcodePath()} import-config`; if (params['path']) { - command += ` --path="${params['path']}"`; + command += ` --path=${params['path']}`; } await execa.command(command, { stdout: 'inherit' }); } @@ -46,7 +46,7 @@ async function importConfig(params) { async function importModels(params) { let command = `${amplifyXcodePath()} import-models`; if (params['path']) { - command += ` --path="${params['path']}"`; + command += ` --path=${params['path']}`; } await execa.command(command, { stdout: 'inherit' }); } @@ -59,7 +59,7 @@ async function importModels(params) { async function generateSchema(params) { let command = `${amplifyXcodePath()} generate-schema`; if (params['output-path']) { - command += ` --output-path="${params['output-path']}"`; + command += ` --output-path=${params['output-path']}`; } await execa.command(command, { stdout: 'inherit' }); } diff --git a/packages/amplify-graphql-migration-tests/src/v2-transformer-provider.ts b/packages/amplify-graphql-migration-tests/src/v2-transformer-provider.ts index bbe6acd56f2..1d70ec63659 100644 --- a/packages/amplify-graphql-migration-tests/src/v2-transformer-provider.ts +++ b/packages/amplify-graphql-migration-tests/src/v2-transformer-provider.ts @@ -18,7 +18,9 @@ export const v2transformerProvider = (config: Partial = const transform = new GraphQLTransform({ transformers: config.transformers ?? getDefaultTransformers(), authConfig: defaultAuthConfig, - sandboxModeEnabled: true, + transformParameters: { + sandboxModeEnabled: true, + }, }); return transform; 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/package.json b/packages/amplify-migration-tests/package.json index b3d67579b43..97526d91493 100644 --- a/packages/amplify-migration-tests/package.json +++ b/packages/amplify-migration-tests/package.json @@ -30,6 +30,8 @@ "@aws-amplify/amplify-e2e-core": "5.2.0", "@aws-cdk/cloudformation-diff": "~2.68.0", "@aws-sdk/client-s3": "^3.303.0", + "amplify-headless-interface": "1.17.4", + "aws-amplify": "^4.2.8", "aws-cdk-lib": "~2.80.0", "constructs": "^10.0.5", "fs-extra": "^8.1.0", 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-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-opensearch-simulator/package.json b/packages/amplify-opensearch-simulator/package.json index 97cd6474a30..3995eea2605 100644 --- a/packages/amplify-opensearch-simulator/package.json +++ b/packages/amplify-opensearch-simulator/package.json @@ -27,7 +27,7 @@ "dependencies": { "@aws-amplify/amplify-cli-core": "4.2.4", "@aws-amplify/amplify-prompts": "2.8.1", - "aws-sdk": "^2.1405.0", + "aws-sdk": "^2.1426.0", "detect-port": "^1.3.0", "execa": "^5.1.1", "fs-extra": "^8.1.0", 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__/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-provider-awscloudformation/package.json b/packages/amplify-provider-awscloudformation/package.json index 5e734c8dbb7..a56f53ccb42 100644 --- a/packages/amplify-provider-awscloudformation/package.json +++ b/packages/amplify-provider-awscloudformation/package.json @@ -37,10 +37,10 @@ "@aws-amplify/cli-extensibility-helper": "3.0.14", "@aws-amplify/graphql-transformer-core": "^1.4.0", "@aws-amplify/graphql-transformer-interfaces": "^2.3.0", - "amplify-codegen": "^4.1.4", + "amplify-codegen": "^4.2.0", "archiver": "^5.3.0", "aws-cdk-lib": "~2.80.0", - "aws-sdk": "^2.1405.0", + "aws-sdk": "^2.1426.0", "bottleneck": "2.19.5", "chalk": "^4.1.1", "cloudform-types": "^4.2.0", 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 d374c03b76f..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', () => { 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__/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 84d53e1f21a..3e576d84b08 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')) { @@ -76,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; @@ -244,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'; } 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/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-storage-simulator/package.json b/packages/amplify-storage-simulator/package.json index 06e043c42e3..8af60b5609f 100644 --- a/packages/amplify-storage-simulator/package.json +++ b/packages/amplify-storage-simulator/package.json @@ -44,7 +44,7 @@ "@types/serve-static": "^1.13.3", "@types/uuid": "^8.3.1", "@types/xml": "^1.0.4", - "aws-sdk": "^2.1405.0" + "aws-sdk": "^2.1426.0" }, "berry": { "plugins": [ 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 6c31796f903..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')); diff --git a/packages/amplify-util-import/package.json b/packages/amplify-util-import/package.json index abff2c5e9b8..937b66c75a4 100644 --- a/packages/amplify-util-import/package.json +++ b/packages/amplify-util-import/package.json @@ -20,7 +20,7 @@ "author": "Amazon Web Services", "license": "Apache-2.0", "dependencies": { - "aws-sdk": "^2.1405.0" + "aws-sdk": "^2.1426.0" }, "devDependencies": { "@types/node": "^12.12.6" diff --git a/packages/amplify-util-mock/package.json b/packages/amplify-util-mock/package.json index b5d4700f8b9..915427b3eb3 100644 --- a/packages/amplify-util-mock/package.json +++ b/packages/amplify-util-mock/package.json @@ -39,7 +39,7 @@ "@aws-amplify/amplify-prompts": "2.8.1", "@aws-amplify/amplify-provider-awscloudformation": "8.4.0", "@hapi/topo": "^5.0.0", - "amplify-codegen": "^4.1.4", + "amplify-codegen": "^4.2.0", "amplify-dynamodb-simulator": "2.8.4", "amplify-storage-simulator": "1.10.0", "chokidar": "^3.5.3", @@ -76,7 +76,7 @@ "@types/which": "^1.3.2", "amplify-nodejs-function-runtime-provider": "2.5.4", "aws-appsync": "^4.1.4", - "aws-sdk": "^2.1405.0", + "aws-sdk": "^2.1426.0", "aws-sdk-mock": "^5.8.0", "axios": "^0.26.0", "graphql": "^15.5.0", 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 1d60b639779..0c8ef9b1307 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 @@ -128,8 +128,6 @@ 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(); 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 616d8668419..15535f0e12f 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 @@ -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..872d2193f97 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,8 +157,6 @@ 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, [ ADMIN_GROUP_NAME, PARTICIPANT_GROUP_NAME, @@ -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__/subscriptions-with-auth.e2e.test.ts b/packages/amplify-util-mock/src/__e2e__/subscriptions-with-auth.e2e.test.ts index a38a20f282a..6903236ab29 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'; @@ -181,7 +179,7 @@ beforeAll(async () => { Authorization: idToken2, }); const idToken3 = signUpAddToGroupAndGetJwtToken(USER_POOL_ID, USERNAME3, USERNAME3, []); - APPSYNC_CLIENT_3 = new AWSAppSyncClient({ + 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,7 +235,7 @@ test('Test that only authorized members are allowed to view subscriptions', asyn `, }); - const subscriptionPromise = new Promise((resolve, _) => { + const subscriptionPromise = new Promise((resolve) => { const subscription = observer.subscribe((event: any) => { const student = event.data.onCreateStudent; subscription.unsubscribe(); @@ -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 { @@ -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 { @@ -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 { 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 77cb96b63d9..a9b031282c1 100644 --- a/packages/amplify-util-mock/src/__tests__/api/api.test.ts +++ b/packages/amplify-util-mock/src/__tests__/api/api.test.ts @@ -27,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(() => { 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__/utils/dynamo-db/util.test.ts b/packages/amplify-util-mock/src/__tests__/utils/dynamo-db/util.test.ts index 6643ab99400..f5f91623156 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 * 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'; 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__/velocity/model-auth.test.ts b/packages/amplify-util-mock/src/__tests__/velocity/model-auth.test.ts index 82f653b13ed..0cbc1d3a654 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 @@ -724,7 +724,6 @@ describe('@model field auth', () => { }); describe('@model @primaryIndex @index auth', () => { - let vtlTemplate: VelocityTemplateSimulator; let transformer: GraphQLTransform; // eslint-disable-next-line @typescript-eslint/no-unused-vars @@ -746,8 +745,8 @@ describe('@model @primaryIndex @index auth', () => { authConfig, transformers: [new ModelTransformer(), new PrimaryKeyTransformer(), new IndexTransformer(), new AuthTransformer()], }); - // eslint-disable-next-line @typescript-eslint/no-unused-vars - vtlTemplate = new VelocityTemplateSimulator({ authConfig }); + + new VelocityTemplateSimulator({ authConfig }); }); test('listX operations', () => { diff --git a/packages/amplify-util-uibuilder/package.json b/packages/amplify-util-uibuilder/package.json index 583bec28fd3..352a3931e76 100644 --- a/packages/amplify-util-uibuilder/package.json +++ b/packages/amplify-util-uibuilder/package.json @@ -14,13 +14,13 @@ "access": "public" }, "dependencies": { - "@aws-amplify/amplify-category-api": "^5.5.0", + "@aws-amplify/amplify-category-api": "^5.5.2", "@aws-amplify/amplify-cli-core": "4.2.4", "@aws-amplify/amplify-prompts": "2.8.1", "@aws-amplify/codegen-ui": "2.14.2", "@aws-amplify/codegen-ui-react": "2.14.2", - "amplify-codegen": "^4.1.4", - "aws-sdk": "^2.1405.0", + "amplify-codegen": "^4.2.0", + "aws-sdk": "^2.1426.0", "fs-extra": "^8.1.0", "node-fetch": "^2.6.7", "ora": "^4.0.3", 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__/generateComponents.test.ts b/packages/amplify-util-uibuilder/src/__tests__/generateComponents.test.ts index 69d937987c4..493c7a6d1af 100644 --- a/packages/amplify-util-uibuilder/src/__tests__/generateComponents.test.ts +++ b/packages/amplify-util-uibuilder/src/__tests__/generateComponents.test.ts @@ -3,6 +3,8 @@ 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 { getCodegenConfig } from 'amplify-codegen'; +import { getUiBuilderComponentsPath } from '../commands/utils/getUiBuilderComponentsPath'; jest.mock('../commands/utils'); jest.mock('@aws-amplify/amplify-cli-core'); @@ -14,11 +16,22 @@ 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({}); @@ -32,18 +45,23 @@ 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({ @@ -53,6 +71,7 @@ describe('can generate components', () => { promise: startCodegenJobPromise, }); beforeEach(() => { + jest.clearAllMocks(); isDataStoreEnabledMocked.mockResolvedValue(true); getTransformerVersionMocked.mockResolvedValue(2); context = { @@ -65,6 +84,11 @@ describe('can generate components', () => { envName: 'testEnvName', }, }, + exeInfo: { + localEnvInfo: { + projectPath, + }, + }, }; schemas = { entities: [ @@ -81,6 +105,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, }); @@ -105,10 +139,10 @@ describe('can generate components', () => { 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(); @@ -120,7 +154,7 @@ describe('can generate components', () => { expect(mockedExport).toBeCalledTimes(3); expect(startCodegenJobPromise).toBeCalledTimes(1); expect(utilsMock.waitForSucceededJob).toBeCalledTimes(1); - expect(utilsMock.getUiBuilderComponentsPath).toBeCalledTimes(1); + expect(getUiBuilderComponentsPathMocked).toBeCalledTimes(1); expect(utilsMock.extractUIComponents).toBeCalledTimes(1); expect(utilsMock.deleteDetachedForms).toBeCalledTimes(1); }); @@ -130,34 +164,14 @@ 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(mockStartCodegenJob).toHaveBeenCalledWith({ appId: 'testAppId', environmentName: 'testEnvName', - codegenJobToCreate: { - renderConfig: { - react: { - module: 'es2020', - target: 'es2020', - script: 'jsx', - renderTypeDeclarations: true, - }, - }, - genericDataSchema: undefined, - autoGenerateForms: true, - features: { - isNonModelSupported: false, - isRelationshipSupported: false, - }, - }, + codegenJobToCreate: expect.objectContaining({ autoGenerateForms: true }), }); }); @@ -166,104 +180,163 @@ 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(mockStartCodegenJob).toHaveBeenCalledWith({ appId: 'testAppId', environmentName: 'testEnvName', - codegenJobToCreate: { - renderConfig: { - react: { - module: 'es2020', - target: 'es2020', - script: 'jsx', - renderTypeDeclarations: true, - }, - }, - genericDataSchema: undefined, - autoGenerateForms: false, - features: { - isNonModelSupported: false, - isRelationshipSupported: false, - }, + codegenJobToCreate: expect.objectContaining({ autoGenerateForms: false }), + }); + }); + + it('should not autogenerate forms if datastore is not enabled and GraphQL is not enabled', async () => { + isDataStoreEnabledMocked.mockResolvedValue(false); + getMetadataPromise.mockReturnValue({ + features: { + ...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', async () => { + it('should not autogenerate forms if datastore is not enabled and GraphQL is enabled with invalid config', async () => { isDataStoreEnabledMocked.mockResolvedValue(false); getMetadataPromise.mockReturnValue({ features: { - autoGenerateForms: 'true', - autoGenerateViews: 'true', - formFeatureFlags: { - isRelationshipSupported: 'false', - isNonModelSupported: 'false', - }, + ...defaultStudioFeatureFlags, + isGraphQLEnabled: 'true', }, }); + getCodegenConfigMocked.mockImplementation(() => { + throw new Error(); + }); await run(context, 'PostPull'); expect(mockStartCodegenJob).toHaveBeenCalledWith({ appId: 'testAppId', environmentName: 'testEnvName', - codegenJobToCreate: { - renderConfig: { - react: { - module: 'es2020', - target: 'es2020', - script: 'jsx', - renderTypeDeclarations: true, - }, - }, - genericDataSchema: undefined, - autoGenerateForms: false, - features: { - isNonModelSupported: false, - isRelationshipSupported: false, - }, + 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(mockStartCodegenJob).toHaveBeenCalledWith({ + appId: 'testAppId', + environmentName: 'testEnvName', + codegenJobToCreate: expect.objectContaining({ autoGenerateForms: true }), + }); }); 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(mockStartCodegenJob).toHaveBeenCalledWith({ appId: 'testAppId', environmentName: 'testEnvName', - codegenJobToCreate: { - renderConfig: { - react: { - module: 'es2020', - target: 'es2020', - script: 'jsx', - renderTypeDeclarations: true, + 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', }, - genericDataSchema: undefined, - autoGenerateForms: false, + }); + 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 inclue noApi configuration when dataStore is disabled and no valid GraphQL Api', async () => { + isDataStoreEnabledMocked.mockResolvedValue(false); + getMetadataPromise.mockReturnValue({ features: { - isNonModelSupported: false, - isRelationshipSupported: false, + ...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__/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 4ced90235ea..ef68d228d8a 100644 --- a/packages/amplify-util-uibuilder/src/clients/amplify-studio-client.ts +++ b/packages/amplify-util-uibuilder/src/clients/amplify-studio-client.ts @@ -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}`); diff --git a/packages/amplify-util-uibuilder/src/commands/generateComponents.ts b/packages/amplify-util-uibuilder/src/commands/generateComponents.ts index 323c4076852..64bbcca6e50 100644 --- a/packages/amplify-util-uibuilder/src/commands/generateComponents.ts +++ b/packages/amplify-util-uibuilder/src/commands/generateComponents.ts @@ -12,10 +12,11 @@ import { hasStorageField, mapGenericDataSchemaToCodegen, waitForSucceededJob, - getUiBuilderComponentsPath, extractUIComponents, } 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 @@ -34,10 +35,15 @@ 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; } @@ -52,9 +58,10 @@ export const run = async (context: $TSContext, eventType: 'PostPush' | 'PostPull target: 'es2020', script: 'jsx', renderTypeDeclarations: true, - }, + apiConfiguration, + } as AmplifyUIBuilder.ReactStartCodegenJobData, }, - autoGenerateForms: studioClient.metadata.autoGenerateForms && studioClient.isGraphQLSupported, + autoGenerateForms: studioClient.metadata.autoGenerateForms && studioClient.isGraphQLSupported && hasDataAPI, features: studioClient.metadata.formFeatureFlags, }; // SDK will throw if this is undefined 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/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/scripts/cloud-cli-utils.sh b/scripts/cloud-cli-utils.sh new file mode 100644 index 00000000000..949354b8d54 --- /dev/null +++ b/scripts/cloud-cli-utils.sh @@ -0,0 +1,33 @@ +#!/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... + mwinit --aea + 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 + authenticate $account_number $role_name $profile_name + echo AWS Account: $account_number + echo Project: $project_name + echo Target Branch: $target_branch + 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 \ + --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 1c2348ab828..e8b69ad6f90 100644 --- a/scripts/cloud-e2e.sh +++ b/scripts/cloud-e2e.sh @@ -1,49 +1,22 @@ #!/bin/bash -# 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 --aea - 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 --environment-variables-override name=BRANCH_NAME,value=$TARGET_BRANCH,type=PLAINTEXT --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 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..cf83426c595 --- /dev/null +++ b/scripts/cloud-pr.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +scriptDir=$(dirname -- "$(readlink -f -- "$BASH_SOURCE")") +source $scriptDir/.env set + +printf 'What is your PR number ? ' +read PR_NUMBER + +mwinit --aea +ada cred update --profile=cb-ci-account --account=$E2E_ACCOUNT_PROD --role=Admin --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..b5e14c91038 --- /dev/null +++ b/scripts/cloud-release.sh @@ -0,0 +1,101 @@ +#!/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 "$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 "$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) +# with the name tagged-release-without-e2e-tests/ +function TaggedRCLocal { + echo Running Local Tagged RC + branch_name=$(git branch --show-current) + triggerProjectBatch $RELEASE_ACCOUNT_LOCAL $RELEASE_ROLE_NAME "${RELEASE_PROFILE_NAME}Local" $TAGGED_RC_PROJECT_NAME $branch_name +} +function TaggedRCBeta { + echo Running Beta Tagged RC + branch_name=$(git branch --show-current) + triggerProjectBatch $RELEASE_ACCOUNT_BETA $RELEASE_ROLE_NAME "${RELEASE_PROFILE_NAME}Beta" $TAGGED_RC_PROJECT_NAME $branch_name +} +function TaggedRCProd { + echo Running Prod Tagged RC + branch_name=$(git branch --show-current) + triggerProjectBatch $RELEASE_ACCOUNT_PROD $RELEASE_ROLE_NAME "${RELEASE_PROFILE_NAME}Prod" $TAGGED_RC_PROJECT_NAME $branch_name +} +############################## 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 "$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 "$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/promote-rc-codebuild.sh b/scripts/promote-rc-codebuild.sh new file mode 100755 index 00000000000..1093f29e8be --- /dev/null +++ b/scripts/promote-rc-codebuild.sh @@ -0,0 +1,26 @@ +#!/bin/bash +set -e + +repo_name="aws-amplify/amplify-cli" + +git remote update + +if [[ -z ${1+x} ]]; 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 "$1") +remote_name=$(git remote -v | grep "$repo_name" | head -n1 | awk '{print $1;}') + +if [[ -z ${remote_name+x} ]]; then + echo "Could not determine remote name of" "$repo_name" "repository" + exit 1 +fi + +rc_branch="release_rc/$rc_sha" + +git fetch "$remote_name" "$rc_branch" +git checkout "$rc_branch" +git reset --hard "$remote_name"/"$rc_branch" +git push "$remote_name" "$rc_branch"~1:refs/heads/release diff --git a/scripts/release-rc-codebuild.sh b/scripts/release-rc-codebuild.sh new file mode 100755 index 00000000000..59fe9d9cfdd --- /dev/null +++ b/scripts/release-rc-codebuild.sh @@ -0,0 +1,35 @@ +#!/bin/bash +set -e + +repo_name="aws-amplify/amplify-cli" + +git remote update + + +if [[ -z ${1+x} ]]; 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 "$1") +remote_name=$(git remote -v | grep "$repo_name" | head -n1 | awk '{print $1;}') + +if [[ -z ${remote_name+x} ]]; then + echo "Could not determine remote name of" "$repo_name" "repository" + exit 1 +fi + +branch_name="release_rc/$rc_sha" + +git checkout -B "$branch_name" "$rc_sha" +git fetch "$remote_name" main +set +e +git merge "$remote_name"/main +merge_exit_code=$? +set -e +if [[ $merge_exit_code -gt 0 ]]; then + # could not automatically merge + echo "Resolve merge conflicts and resume release candidate publish by running 'kill -CONT $$'" + kill -TSTP $$ +fi +git push "$remote_name" "$branch_name" diff --git a/scripts/split-e2e-tests-codebuild.ts b/scripts/split-e2e-tests-codebuild.ts index 28d7aa6ef0a..8b36ddd1b42 100644 --- a/scripts/split-e2e-tests-codebuild.ts +++ b/scripts/split-e2e-tests-codebuild.ts @@ -46,6 +46,10 @@ const DISABLE_COVERAGE = ['src/__tests__/datastore-modelgen.test.ts', 'src/__tes 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', diff --git a/scripts/split-e2e-tests-v2.ts b/scripts/split-e2e-tests-v2.ts index 2063b78e7e0..21d749f5fd2 100644 --- a/scripts/split-e2e-tests-v2.ts +++ b/scripts/split-e2e-tests-v2.ts @@ -173,7 +173,7 @@ type CandidateJob = { tests: string[]; useParentAccount: boolean; // intentially leaving this here - accounts are randomly assigned to jobs - // by a via local_publish_helpers.sh script + // by a via local_publish_helpers_codebuild.sh script // account: string, }; diff --git a/shared-scripts.sh b/shared-scripts.sh index 314d6ad4d36..1a543c0a9c7 100644 --- a/shared-scripts.sh +++ b/shared-scripts.sh @@ -90,6 +90,7 @@ function _buildLinux { 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 } @@ -116,6 +117,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 @@ -142,7 +145,7 @@ function _verifyVersionsMatch { 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 @@ -154,7 +157,7 @@ function _mockE2ETests { # make repo directory accessible to codebuild-user chown -R codebuild-user . - source .circleci/local_publish_helpers.sh + source .circleci/local_publish_helpers_codebuild.sh cd packages/amplify-util-mock/ # 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' @@ -165,17 +168,16 @@ 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 @@ -206,8 +208,8 @@ function _uploadPkgBinaries { echo Done loading binaries ls $CODEBUILD_SRC_DIR/out - source .circleci/local_publish_helpers.sh - uploadPkgCliForE2E + source .circleci/local_publish_helpers_codebuild.sh + uploadPkgCliCodeBuild storeCache $CODEBUILD_SRC_DIR/out all-binaries } @@ -222,7 +224,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 @@ -242,7 +244,7 @@ function _install_packaged_cli_linux { 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 @@ -286,8 +288,9 @@ function _runE2ETestsLinux { _loadE2ECache _install_packaged_cli_linux # 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 @@ -304,7 +307,7 @@ function _unassumeTestAccountCredentials { function _runMigrationMultiEnvLayersTest { 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 _loadTestAccountCredentials @@ -313,7 +316,7 @@ function _runMigrationMultiEnvLayersTest { function _runMigrationNonMultiEnvLayersTest { 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 _loadTestAccountCredentials @@ -322,7 +325,7 @@ function _runMigrationNonMultiEnvLayersTest { 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 @@ -333,7 +336,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 @@ -344,7 +347,7 @@ function _runMigrationV10Test { function _runMigrationV12Test { 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 @@ -428,7 +431,7 @@ 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.sh && startLocalRegistry "$CODEBUILD_SRC_DIR/.circleci/verdaccio.yaml" + source .circleci/local_publish_helpers_codebuild.sh && startLocalRegistry "$CODEBUILD_SRC_DIR/.circleci/verdaccio.yaml" setSudoNpmRegistryUrlToLocal changeSudoNpmGlobalPath # sudo npm install -g @aws-amplify/cli @@ -439,7 +442,7 @@ 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.sh && startLocalRegistry "$CODEBUILD_SRC_DIR/.circleci/verdaccio.yaml" + source .circleci/local_publish_helpers_codebuild.sh && startLocalRegistry "$CODEBUILD_SRC_DIR/.circleci/verdaccio.yaml" setNpmRegistryUrlToLocal changeNpmGlobalPath # limit memory for new processes to 1GB @@ -453,7 +456,7 @@ function _amplifyInstallTestSetup { function _amplifyConsoleIntegrationTests { loadCache repo $CODEBUILD_SRC_DIR 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 npm install -g @aws-amplify/cli @@ -615,12 +618,72 @@ function _waitForJobs { ts-node ./wait-for-all-codebuild.ts $CODEBUILD_RESOLVED_SOURCE_VERSION $file_path $PROJECT_NAME $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 + echo "export PATH=$PATH:$HOME/.amplify/bin" >> $BASH_ENV + 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 _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 _amplifyGeneralConfigTests { _loadE2ECache _install_packaged_cli_linux 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 @@ -628,3 +691,17 @@ function _amplifyGeneralConfigTests { _loadTestAccountCredentials retry yarn general-config-e2e --no-cache --maxWorkers=3 --forceExit $TEST_SUITE } +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/yarn.lock b/yarn.lock index 6bc2b603478..628e60edc8f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -105,7 +105,7 @@ __metadata: "@types/node": ^12.12.6 "@types/ws": ^8.2.2 amplify-velocity-template: 1.4.12 - aws-sdk: ^2.1405.0 + aws-sdk: ^2.1426.0 chalk: ^4.1.1 cors: ^2.8.5 dataloader: ^2.0.0 @@ -143,9 +143,9 @@ __metadata: languageName: unknown linkType: soft -"@aws-amplify/amplify-category-api@npm:^5.5.0": - version: 5.5.0 - resolution: "@aws-amplify/amplify-category-api@npm:5.5.0" +"@aws-amplify/amplify-category-api@npm:^5.5.2": + version: 5.5.2 + resolution: "@aws-amplify/amplify-category-api@npm:5.5.2" dependencies: "@aws-amplify/graphql-auth-transformer": 2.1.13 "@aws-amplify/graphql-schema-generator": 0.3.0 @@ -193,7 +193,7 @@ __metadata: amplify-util-headless-input: ^1.9.12 aws-cdk-lib: ^2.80.0 constructs: ^10.0.5 - checksum: 0da5325ee0580cdf3d1ad69bc29ca9baac08af7e60f49ca64ca42d5d5c20635f138c4f5965b66906867d3bcf2760f5e3a51d5e692b2c55c3875a7a6907b07741 + checksum: c637cd7a70b858559bf5dd4f3437e71574d6405e6134470bbd6404c233f0a6cad5b1f8e15a890f59d3461884207cea2f3c82b0d14f557f37ec80f444754b860d languageName: node linkType: hard @@ -213,7 +213,7 @@ __metadata: amplify-headless-interface: 1.17.4 amplify-util-headless-input: 1.9.14 aws-cdk-lib: ~2.80.0 - aws-sdk: ^2.1405.0 + aws-sdk: ^2.1426.0 axios: ^0.26.0 chalk: ^4.1.1 change-case: ^4.1.1 @@ -260,7 +260,7 @@ __metadata: "@aws-amplify/amplify-prompts": 2.8.1 "@types/folder-hash": ^4.0.1 archiver: ^5.3.0 - aws-sdk: ^2.1405.0 + aws-sdk: ^2.1426.0 chalk: ^4.1.1 cloudform-types: ^4.2.0 enquirer: ^2.3.6 @@ -289,7 +289,7 @@ __metadata: amplify-headless-interface: 1.17.4 amplify-util-headless-input: 1.9.14 aws-cdk-lib: ~2.80.0 - aws-sdk: ^2.1405.0 + aws-sdk: ^2.1426.0 constructs: ^10.0.5 fs-extra: ^8.1.0 lodash: ^4.17.21 @@ -333,7 +333,7 @@ __metadata: "@aws-amplify/amplify-environment-parameters": 1.7.4 "@aws-amplify/amplify-prompts": 2.8.1 "@aws-amplify/amplify-provider-awscloudformation": 8.4.0 - aws-sdk: ^2.1405.0 + aws-sdk: ^2.1426.0 chalk: ^4.1.1 fs-extra: ^8.1.0 lodash: ^4.17.21 @@ -350,7 +350,7 @@ __metadata: "@aws-amplify/amplify-cli-core": 4.2.4 "@aws-amplify/amplify-prompts": 2.8.1 "@aws-sdk/client-rekognition": ^3.303.0 - aws-sdk: ^2.1405.0 + aws-sdk: ^2.1426.0 chalk: ^4.1.1 fs-extra: ^8.1.0 uuid: ^8.3.2 @@ -369,7 +369,7 @@ __metadata: amplify-headless-interface: 1.17.4 amplify-util-headless-input: 1.9.14 aws-cdk-lib: ~2.80.0 - aws-sdk: ^2.1405.0 + aws-sdk: ^2.1426.0 chalk: ^4.1.1 cloudform-types: ^4.2.0 constructs: ^10.0.5 @@ -465,6 +465,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,7 +476,7 @@ __metadata: "@aws-amplify/amplify-cli-core": 4.2.4 "@aws-amplify/amplify-e2e-core": 5.2.0 "@types/ini": ^1.3.30 - aws-sdk: ^2.1405.0 + aws-sdk: ^2.1426.0 dotenv: ^8.2.0 execa: ^5.1.1 fs-extra: ^8.1.0 @@ -492,7 +493,7 @@ __metadata: version: 0.0.0-use.local resolution: "@aws-amplify/amplify-container-hosting@workspace:packages/amplify-container-hosting" dependencies: - "@aws-amplify/amplify-category-api": ^5.5.0 + "@aws-amplify/amplify-category-api": ^5.5.2 "@aws-amplify/amplify-cli-core": 4.2.4 "@aws-amplify/amplify-environment-parameters": 1.7.4 fs-extra: ^8.1.0 @@ -520,11 +521,13 @@ __metadata: resolution: "@aws-amplify/amplify-e2e-core@workspace:packages/amplify-e2e-core" dependencies: "@aws-amplify/amplify-cli-core": 4.2.4 + "@aws-sdk/client-sts": ^3.303.0 + "@aws-sdk/credential-providers": ^3.303.0 "@types/glob": ^7.1.1 amplify-headless-interface: 1.17.4 aws-amplify: ^4.2.8 aws-appsync: ^4.1.1 - aws-sdk: ^2.1405.0 + aws-sdk: ^2.1426.0 chalk: ^4.1.1 dotenv: ^8.2.0 execa: ^5.1.1 @@ -551,7 +554,7 @@ __metadata: dependencies: "@aws-amplify/amplify-cli-core": 4.2.4 ajv: ^6.12.6 - aws-sdk: ^2.1405.0 + aws-sdk: ^2.1426.0 lodash: ^4.17.21 mkdirp: ^1.0.4 ts-json-schema-generator: ~1.1.2 @@ -716,6 +719,8 @@ __metadata: "@aws-amplify/amplify-e2e-core": 5.2.0 "@aws-cdk/cloudformation-diff": ~2.68.0 "@aws-sdk/client-s3": ^3.303.0 + amplify-headless-interface: 1.17.4 + aws-amplify: ^4.2.8 aws-cdk-lib: ~2.80.0 constructs: ^10.0.5 fs-extra: ^8.1.0 @@ -752,7 +757,7 @@ __metadata: "@aws-amplify/amplify-prompts": 2.8.1 "@types/node": ^12.12.6 "@types/openpgp": ^4.4.18 - aws-sdk: ^2.1405.0 + aws-sdk: ^2.1426.0 detect-port: ^1.3.0 execa: ^5.1.1 fs-extra: ^8.1.0 @@ -797,10 +802,10 @@ __metadata: "@types/lodash.throttle": ^4.1.6 "@types/node": ^12.12.6 "@types/uuid": ^8.0.0 - amplify-codegen: ^4.1.4 + amplify-codegen: ^4.2.0 archiver: ^5.3.0 aws-cdk-lib: ~2.80.0 - aws-sdk: ^2.1405.0 + aws-sdk: ^2.1426.0 bottleneck: 2.19.5 chalk: ^4.1.1 cloudform-types: ^4.2.0 @@ -849,7 +854,7 @@ __metadata: resolution: "@aws-amplify/amplify-util-import@workspace:packages/amplify-util-import" dependencies: "@types/node": ^12.12.6 - aws-sdk: ^2.1405.0 + aws-sdk: ^2.1426.0 languageName: unknown linkType: soft @@ -885,12 +890,12 @@ __metadata: "@types/node": ^12.12.6 "@types/semver": ^7.1.0 "@types/which": ^1.3.2 - amplify-codegen: ^4.1.4 + amplify-codegen: ^4.2.0 amplify-dynamodb-simulator: 2.8.4 amplify-nodejs-function-runtime-provider: 2.5.4 amplify-storage-simulator: 1.10.0 aws-appsync: ^4.1.4 - aws-sdk: ^2.1405.0 + aws-sdk: ^2.1426.0 aws-sdk-mock: ^5.8.0 axios: ^0.26.0 chokidar: ^3.5.3 @@ -924,7 +929,7 @@ __metadata: version: 0.0.0-use.local resolution: "@aws-amplify/amplify-util-uibuilder@workspace:packages/amplify-util-uibuilder" dependencies: - "@aws-amplify/amplify-category-api": ^5.5.0 + "@aws-amplify/amplify-category-api": ^5.5.2 "@aws-amplify/amplify-cli-core": 4.2.4 "@aws-amplify/amplify-prompts": 2.8.1 "@aws-amplify/appsync-modelgen-plugin": ^2.4.4 @@ -934,8 +939,8 @@ __metadata: "@types/jest": ^29.5.1 "@types/semver": ^7.1.0 "@types/tiny-async-pool": ^2.0.0 - amplify-codegen: ^4.1.4 - aws-sdk: ^2.1405.0 + amplify-codegen: ^4.2.0 + aws-sdk: ^2.1426.0 fs-extra: ^8.1.0 node-fetch: ^2.6.7 ora: ^4.0.3 @@ -997,9 +1002,9 @@ __metadata: languageName: node linkType: hard -"@aws-amplify/appsync-modelgen-plugin@npm:2.5.1, @aws-amplify/appsync-modelgen-plugin@npm:^2.4.4": - version: 2.5.1 - resolution: "@aws-amplify/appsync-modelgen-plugin@npm:2.5.1" +"@aws-amplify/appsync-modelgen-plugin@npm:2.5.3, @aws-amplify/appsync-modelgen-plugin@npm:^2.4.4": + version: 2.5.3 + resolution: "@aws-amplify/appsync-modelgen-plugin@npm:2.5.3" dependencies: "@graphql-codegen/plugin-helpers": ^1.18.8 "@graphql-codegen/visitor-plugin-common": ^1.22.0 @@ -1014,7 +1019,7 @@ __metadata: ts-dedent: ^1.1.0 peerDependencies: graphql: ^15.5.0 - checksum: 07fb5825ad89d95650f832a52cef82bc54a1cae3a421e3b0ccca29a75b7c859df8624c68c50aa66d30217f73a731e9d1651be403039bac8c5ddda01fe395d142 + checksum: a5ca3c82b5583bde43374f693034066aaf18b01323ba219ced0c4ef60b7a2810e47f1993d6c94c6eca09852b4e26952258eaf655c4cc78ed30e99ff0ec3d63f4 languageName: node linkType: hard @@ -1055,7 +1060,7 @@ __metadata: dependencies: "@aws-amplify/amplify-app": 5.0.14 "@aws-amplify/amplify-category-analytics": 5.0.16 - "@aws-amplify/amplify-category-api": ^5.5.0 + "@aws-amplify/amplify-category-api": ^5.5.2 "@aws-amplify/amplify-category-auth": 3.5.0 "@aws-amplify/amplify-category-custom": 3.1.4 "@aws-amplify/amplify-category-function": 5.4.4 @@ -1099,15 +1104,16 @@ __metadata: "@types/tar-fs": ^2.0.0 "@types/treeify": ^1.0.0 "@types/update-notifier": ^5.1.0 - amplify-codegen: ^4.1.4 + amplify-codegen: ^4.2.0 amplify-dotnet-function-runtime-provider: 2.0.9 amplify-go-function-runtime-provider: 2.3.27 + amplify-headless-interface: 1.17.4 amplify-java-function-runtime-provider: 2.3.27 amplify-java-function-template-provider: 1.5.22 amplify-nodejs-function-runtime-provider: 2.5.4 amplify-python-function-runtime-provider: 2.4.27 aws-cdk-lib: ~2.80.0 - aws-sdk: ^2.1405.0 + aws-sdk: ^2.1426.0 chalk: ^4.1.1 ci-info: ^3.8.0 cli-table3: ^0.6.0 @@ -1266,16 +1272,16 @@ __metadata: languageName: node linkType: hard -"@aws-amplify/graphql-docs-generator@npm:4.0.3": - version: 4.0.3 - resolution: "@aws-amplify/graphql-docs-generator@npm:4.0.3" +"@aws-amplify/graphql-docs-generator@npm:4.0.5": + version: 4.0.5 + resolution: "@aws-amplify/graphql-docs-generator@npm:4.0.5" dependencies: graphql: ^15.5.0 handlebars: 4.7.7 yargs: ^15.1.0 bin: graphql-docs-generator: bin/cli - checksum: 5486426ecc726b69820ecc610c36a61a8ee37477c05e2ef073264431ecb783e4ac63714fda000ae2c3e8568f0e3e00534b317c05698b31430c13d709f1cd8e09 + checksum: c7cf1b35b4bed6d0081ae9e67b76a0e91a961493ab2281c734e4dbd67c6d804b8484189b2d4371bbfc050fc5936a5c0cdf98f5d7c80e060031c66bda9275df44 languageName: node linkType: hard @@ -1500,9 +1506,9 @@ __metadata: languageName: node linkType: hard -"@aws-amplify/graphql-types-generator@npm:3.0.3": - version: 3.0.3 - resolution: "@aws-amplify/graphql-types-generator@npm:3.0.3" +"@aws-amplify/graphql-types-generator@npm:3.2.0": + version: 3.2.0 + resolution: "@aws-amplify/graphql-types-generator@npm:3.2.0" dependencies: "@babel/generator": 7.0.0-beta.4 "@babel/types": 7.0.0-beta.4 @@ -1525,7 +1531,7 @@ __metadata: yargs: ^15.1.0 bin: graphql-types-generator: lib/cli.js - checksum: 513e648bf98e27803bc0b1a9807cdf8db98b5c81f9b3ee8f822aaa02f8320fe043ee43b5de2a2a1f9a6bf91a2fbb211b0f0efb7dd1942288ef360139654d9936 + checksum: c9ce66b1e543722c5765cae9c5e02953f75378f4bad742f73596673aab93c348e996069ab1c1550d3bcc0813f413d8f4b317280fc0559316e292a9f185be9892 languageName: node linkType: hard @@ -2092,6 +2098,50 @@ __metadata: languageName: node linkType: hard +"@aws-sdk/client-cognito-identity@npm:3.382.0": + version: 3.382.0 + resolution: "@aws-sdk/client-cognito-identity@npm:3.382.0" + dependencies: + "@aws-crypto/sha256-browser": 3.0.0 + "@aws-crypto/sha256-js": 3.0.0 + "@aws-sdk/client-sts": 3.382.0 + "@aws-sdk/credential-provider-node": 3.382.0 + "@aws-sdk/middleware-host-header": 3.379.1 + "@aws-sdk/middleware-logger": 3.378.0 + "@aws-sdk/middleware-recursion-detection": 3.378.0 + "@aws-sdk/middleware-signing": 3.379.1 + "@aws-sdk/middleware-user-agent": 3.382.0 + "@aws-sdk/types": 3.378.0 + "@aws-sdk/util-endpoints": 3.382.0 + "@aws-sdk/util-user-agent-browser": 3.378.0 + "@aws-sdk/util-user-agent-node": 3.378.0 + "@smithy/config-resolver": ^2.0.1 + "@smithy/fetch-http-handler": ^2.0.1 + "@smithy/hash-node": ^2.0.1 + "@smithy/invalid-dependency": ^2.0.1 + "@smithy/middleware-content-length": ^2.0.1 + "@smithy/middleware-endpoint": ^2.0.1 + "@smithy/middleware-retry": ^2.0.1 + "@smithy/middleware-serde": ^2.0.1 + "@smithy/middleware-stack": ^2.0.0 + "@smithy/node-config-provider": ^2.0.1 + "@smithy/node-http-handler": ^2.0.1 + "@smithy/protocol-http": ^2.0.1 + "@smithy/smithy-client": ^2.0.1 + "@smithy/types": ^2.0.2 + "@smithy/url-parser": ^2.0.1 + "@smithy/util-base64": ^2.0.0 + "@smithy/util-body-length-browser": ^2.0.0 + "@smithy/util-body-length-node": ^2.0.0 + "@smithy/util-defaults-mode-browser": ^2.0.1 + "@smithy/util-defaults-mode-node": ^2.0.1 + "@smithy/util-retry": ^2.0.0 + "@smithy/util-utf8": ^2.0.0 + tslib: ^2.5.0 + checksum: 25682691a7d681eb6fc1104b9fcb3aba3014b57cdac20d89b66f51f23eaf7e2afd64034e39b2b94e102fc884831c0471ac5153608e72b0fec141dbf40b5d8109 + 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" @@ -3091,6 +3141,47 @@ __metadata: languageName: node linkType: hard +"@aws-sdk/client-sso-oidc@npm:3.382.0": + version: 3.382.0 + resolution: "@aws-sdk/client-sso-oidc@npm:3.382.0" + dependencies: + "@aws-crypto/sha256-browser": 3.0.0 + "@aws-crypto/sha256-js": 3.0.0 + "@aws-sdk/middleware-host-header": 3.379.1 + "@aws-sdk/middleware-logger": 3.378.0 + "@aws-sdk/middleware-recursion-detection": 3.378.0 + "@aws-sdk/middleware-user-agent": 3.382.0 + "@aws-sdk/types": 3.378.0 + "@aws-sdk/util-endpoints": 3.382.0 + "@aws-sdk/util-user-agent-browser": 3.378.0 + "@aws-sdk/util-user-agent-node": 3.378.0 + "@smithy/config-resolver": ^2.0.1 + "@smithy/fetch-http-handler": ^2.0.1 + "@smithy/hash-node": ^2.0.1 + "@smithy/invalid-dependency": ^2.0.1 + "@smithy/middleware-content-length": ^2.0.1 + "@smithy/middleware-endpoint": ^2.0.1 + "@smithy/middleware-retry": ^2.0.1 + "@smithy/middleware-serde": ^2.0.1 + "@smithy/middleware-stack": ^2.0.0 + "@smithy/node-config-provider": ^2.0.1 + "@smithy/node-http-handler": ^2.0.1 + "@smithy/protocol-http": ^2.0.1 + "@smithy/smithy-client": ^2.0.1 + "@smithy/types": ^2.0.2 + "@smithy/url-parser": ^2.0.1 + "@smithy/util-base64": ^2.0.0 + "@smithy/util-body-length-browser": ^2.0.0 + "@smithy/util-body-length-node": ^2.0.0 + "@smithy/util-defaults-mode-browser": ^2.0.1 + "@smithy/util-defaults-mode-node": ^2.0.1 + "@smithy/util-retry": ^2.0.0 + "@smithy/util-utf8": ^2.0.0 + tslib: ^2.5.0 + checksum: 9f018767027d73427a6267afcfb214c8f8c137d786913f8bde1f0d90890487357d98d6e9773526518ae0479e31f4943b1bbbcc5efaa188e4b2b868b57a823ff2 + 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" @@ -3213,6 +3304,47 @@ __metadata: languageName: node linkType: hard +"@aws-sdk/client-sso@npm:3.382.0": + version: 3.382.0 + resolution: "@aws-sdk/client-sso@npm:3.382.0" + dependencies: + "@aws-crypto/sha256-browser": 3.0.0 + "@aws-crypto/sha256-js": 3.0.0 + "@aws-sdk/middleware-host-header": 3.379.1 + "@aws-sdk/middleware-logger": 3.378.0 + "@aws-sdk/middleware-recursion-detection": 3.378.0 + "@aws-sdk/middleware-user-agent": 3.382.0 + "@aws-sdk/types": 3.378.0 + "@aws-sdk/util-endpoints": 3.382.0 + "@aws-sdk/util-user-agent-browser": 3.378.0 + "@aws-sdk/util-user-agent-node": 3.378.0 + "@smithy/config-resolver": ^2.0.1 + "@smithy/fetch-http-handler": ^2.0.1 + "@smithy/hash-node": ^2.0.1 + "@smithy/invalid-dependency": ^2.0.1 + "@smithy/middleware-content-length": ^2.0.1 + "@smithy/middleware-endpoint": ^2.0.1 + "@smithy/middleware-retry": ^2.0.1 + "@smithy/middleware-serde": ^2.0.1 + "@smithy/middleware-stack": ^2.0.0 + "@smithy/node-config-provider": ^2.0.1 + "@smithy/node-http-handler": ^2.0.1 + "@smithy/protocol-http": ^2.0.1 + "@smithy/smithy-client": ^2.0.1 + "@smithy/types": ^2.0.2 + "@smithy/url-parser": ^2.0.1 + "@smithy/util-base64": ^2.0.0 + "@smithy/util-body-length-browser": ^2.0.0 + "@smithy/util-body-length-node": ^2.0.0 + "@smithy/util-defaults-mode-browser": ^2.0.1 + "@smithy/util-defaults-mode-node": ^2.0.1 + "@smithy/util-retry": ^2.0.0 + "@smithy/util-utf8": ^2.0.0 + tslib: ^2.5.0 + checksum: 4efd88ddcedb05a926e4ec0436c51e67edd4a0ff88a8eb389fdf28daaf6a2bee6826ad385061d0fe3d47e006bd06d2f449765b7815c0634290641cf90c13f0d0 + 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" @@ -3383,6 +3515,51 @@ __metadata: languageName: node linkType: hard +"@aws-sdk/client-sts@npm:3.382.0, @aws-sdk/client-sts@npm:^3.303.0": + version: 3.382.0 + resolution: "@aws-sdk/client-sts@npm:3.382.0" + dependencies: + "@aws-crypto/sha256-browser": 3.0.0 + "@aws-crypto/sha256-js": 3.0.0 + "@aws-sdk/credential-provider-node": 3.382.0 + "@aws-sdk/middleware-host-header": 3.379.1 + "@aws-sdk/middleware-logger": 3.378.0 + "@aws-sdk/middleware-recursion-detection": 3.378.0 + "@aws-sdk/middleware-sdk-sts": 3.379.1 + "@aws-sdk/middleware-signing": 3.379.1 + "@aws-sdk/middleware-user-agent": 3.382.0 + "@aws-sdk/types": 3.378.0 + "@aws-sdk/util-endpoints": 3.382.0 + "@aws-sdk/util-user-agent-browser": 3.378.0 + "@aws-sdk/util-user-agent-node": 3.378.0 + "@smithy/config-resolver": ^2.0.1 + "@smithy/fetch-http-handler": ^2.0.1 + "@smithy/hash-node": ^2.0.1 + "@smithy/invalid-dependency": ^2.0.1 + "@smithy/middleware-content-length": ^2.0.1 + "@smithy/middleware-endpoint": ^2.0.1 + "@smithy/middleware-retry": ^2.0.1 + "@smithy/middleware-serde": ^2.0.1 + "@smithy/middleware-stack": ^2.0.0 + "@smithy/node-config-provider": ^2.0.1 + "@smithy/node-http-handler": ^2.0.1 + "@smithy/protocol-http": ^2.0.1 + "@smithy/smithy-client": ^2.0.1 + "@smithy/types": ^2.0.2 + "@smithy/url-parser": ^2.0.1 + "@smithy/util-base64": ^2.0.0 + "@smithy/util-body-length-browser": ^2.0.0 + "@smithy/util-body-length-node": ^2.0.0 + "@smithy/util-defaults-mode-browser": ^2.0.1 + "@smithy/util-defaults-mode-node": ^2.0.1 + "@smithy/util-retry": ^2.0.0 + "@smithy/util-utf8": ^2.0.0 + fast-xml-parser: 4.2.5 + tslib: ^2.5.0 + checksum: e06805e6d3f60b7c7980875131fe2f0325de5b4393af047ceda59b2c01241499755a9ba0a93622b246403fc96771e56b714bcb17dc0b0b8389eb7759c7ee2a64 + 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" @@ -3550,6 +3727,19 @@ __metadata: languageName: node linkType: hard +"@aws-sdk/credential-provider-cognito-identity@npm:3.382.0": + version: 3.382.0 + resolution: "@aws-sdk/credential-provider-cognito-identity@npm:3.382.0" + dependencies: + "@aws-sdk/client-cognito-identity": 3.382.0 + "@aws-sdk/types": 3.378.0 + "@smithy/property-provider": ^2.0.0 + "@smithy/types": ^2.0.2 + tslib: ^2.5.0 + checksum: d162179760f0631b121f97cac97366ae9afffb71ef14aca6d84c1cbcebb53e1ec383c26b66d865a23d665a7a4920d6d90a4b986420003e1e12b3b283497eae70 + 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" @@ -3596,6 +3786,18 @@ __metadata: languageName: node linkType: hard +"@aws-sdk/credential-provider-env@npm:3.378.0": + version: 3.378.0 + resolution: "@aws-sdk/credential-provider-env@npm:3.378.0" + dependencies: + "@aws-sdk/types": 3.378.0 + "@smithy/property-provider": ^2.0.0 + "@smithy/types": ^2.0.2 + tslib: ^2.5.0 + checksum: bc6aa45384b92c8055a4075dbc56319140adf4b2e1b42edded500f6f335466bf4c16ed83629086e06947efe02751a796c0f67b01094033e7833e4703177a99a1 + 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" @@ -3720,6 +3922,24 @@ __metadata: languageName: node linkType: hard +"@aws-sdk/credential-provider-ini@npm:3.382.0": + version: 3.382.0 + resolution: "@aws-sdk/credential-provider-ini@npm:3.382.0" + dependencies: + "@aws-sdk/credential-provider-env": 3.378.0 + "@aws-sdk/credential-provider-process": 3.378.0 + "@aws-sdk/credential-provider-sso": 3.382.0 + "@aws-sdk/credential-provider-web-identity": 3.378.0 + "@aws-sdk/types": 3.378.0 + "@smithy/credential-provider-imds": ^2.0.0 + "@smithy/property-provider": ^2.0.0 + "@smithy/shared-ini-file-loader": ^2.0.0 + "@smithy/types": ^2.0.2 + tslib: ^2.5.0 + checksum: 00f05dc46890d956a11962fd12a70b085f25d06dbc44eccf3b079ea8d46638f398282270a8cf5b75c8387f72e02e642e8c508517baa23aacf013e6fd2f6bfe86 + 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" @@ -3804,6 +4024,25 @@ __metadata: languageName: node linkType: hard +"@aws-sdk/credential-provider-node@npm:3.382.0": + version: 3.382.0 + resolution: "@aws-sdk/credential-provider-node@npm:3.382.0" + dependencies: + "@aws-sdk/credential-provider-env": 3.378.0 + "@aws-sdk/credential-provider-ini": 3.382.0 + "@aws-sdk/credential-provider-process": 3.378.0 + "@aws-sdk/credential-provider-sso": 3.382.0 + "@aws-sdk/credential-provider-web-identity": 3.378.0 + "@aws-sdk/types": 3.378.0 + "@smithy/credential-provider-imds": ^2.0.0 + "@smithy/property-provider": ^2.0.0 + "@smithy/shared-ini-file-loader": ^2.0.0 + "@smithy/types": ^2.0.2 + tslib: ^2.5.0 + checksum: 518f3df4ea3c3275ac7010c3c0f9b6f1452f573cf4ade81cadb3cd8f29ee4c838c9b0cd731d3c0b6620a3897134c2935a3e7c29ad8ecbb8ec50f3fe0cea61dde + 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" @@ -3876,6 +4115,19 @@ __metadata: languageName: node linkType: hard +"@aws-sdk/credential-provider-process@npm:3.378.0": + version: 3.378.0 + resolution: "@aws-sdk/credential-provider-process@npm:3.378.0" + dependencies: + "@aws-sdk/types": 3.378.0 + "@smithy/property-provider": ^2.0.0 + "@smithy/shared-ini-file-loader": ^2.0.0 + "@smithy/types": ^2.0.2 + tslib: ^2.5.0 + checksum: 214868f3d5dcb2ecf51f0662c4cf95be720cca72cd56c6f4a6a23a15d1bca91451983f0018bef38eb2bffb427ecc87ecc277ff5db884d20418b427d5852a5251 + 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" @@ -3945,6 +4197,21 @@ __metadata: languageName: node linkType: hard +"@aws-sdk/credential-provider-sso@npm:3.382.0": + version: 3.382.0 + resolution: "@aws-sdk/credential-provider-sso@npm:3.382.0" + dependencies: + "@aws-sdk/client-sso": 3.382.0 + "@aws-sdk/token-providers": 3.382.0 + "@aws-sdk/types": 3.378.0 + "@smithy/property-provider": ^2.0.0 + "@smithy/shared-ini-file-loader": ^2.0.0 + "@smithy/types": ^2.0.2 + tslib: ^2.5.0 + checksum: 4d9fe2bc95c8b7debc1addd0f72127724a44c7481b11e186e973f1516e45766f8803a8a3db0a80f399c92f919d27fdf0a36e38a3b62c02d51e477bac6a0e2feb + 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" @@ -3993,6 +4260,18 @@ __metadata: languageName: node linkType: hard +"@aws-sdk/credential-provider-web-identity@npm:3.378.0": + version: 3.378.0 + resolution: "@aws-sdk/credential-provider-web-identity@npm:3.378.0" + dependencies: + "@aws-sdk/types": 3.378.0 + "@smithy/property-provider": ^2.0.0 + "@smithy/types": ^2.0.2 + tslib: ^2.5.0 + checksum: 32d6d72aa1d2599f918a48311f1ebda03d47c35872c899bbfb332f3973e6db08e047d32794a1c67ad1833177c57c25e708811ed81b1fcb440667b327f54eb1dd + 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" @@ -4004,6 +4283,29 @@ __metadata: languageName: node linkType: hard +"@aws-sdk/credential-providers@npm:^3.303.0": + version: 3.382.0 + resolution: "@aws-sdk/credential-providers@npm:3.382.0" + dependencies: + "@aws-sdk/client-cognito-identity": 3.382.0 + "@aws-sdk/client-sso": 3.382.0 + "@aws-sdk/client-sts": 3.382.0 + "@aws-sdk/credential-provider-cognito-identity": 3.382.0 + "@aws-sdk/credential-provider-env": 3.378.0 + "@aws-sdk/credential-provider-ini": 3.382.0 + "@aws-sdk/credential-provider-node": 3.382.0 + "@aws-sdk/credential-provider-process": 3.378.0 + "@aws-sdk/credential-provider-sso": 3.382.0 + "@aws-sdk/credential-provider-web-identity": 3.378.0 + "@aws-sdk/types": 3.378.0 + "@smithy/credential-provider-imds": ^2.0.0 + "@smithy/property-provider": ^2.0.0 + "@smithy/types": ^2.0.2 + tslib: ^2.5.0 + checksum: 8320a0744d34208b21d8de0c65d2c1dfa6539804091f62d6f0e3c5eb387823346bd60699eceb092f0df335454f706df9fe6b6cf2940a2030c3ef2ec45eb05bed + 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" @@ -4555,6 +4857,18 @@ __metadata: languageName: node linkType: hard +"@aws-sdk/middleware-host-header@npm:3.379.1": + version: 3.379.1 + resolution: "@aws-sdk/middleware-host-header@npm:3.379.1" + dependencies: + "@aws-sdk/types": 3.378.0 + "@smithy/protocol-http": ^2.0.1 + "@smithy/types": ^2.0.2 + tslib: ^2.5.0 + checksum: 7c3074faceae0246b23a51ca4e6244a8180fe9617deae073769f34e25818cc6b80b2a3ad82421200f3f144474e889b72310b86ebe5f66bef3782e85bfb50f811 + 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" @@ -4629,6 +4943,17 @@ __metadata: languageName: node linkType: hard +"@aws-sdk/middleware-logger@npm:3.378.0": + version: 3.378.0 + resolution: "@aws-sdk/middleware-logger@npm:3.378.0" + dependencies: + "@aws-sdk/types": 3.378.0 + "@smithy/types": ^2.0.2 + tslib: ^2.5.0 + checksum: 63a073a6211e29e31193487c30486a7b9a6fbeb82651012c14dfd7030adb300294f434d2eb46e3031a30961260551fd5825b8794b8de2bd15ce0d2cc0a512ec9 + 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" @@ -4683,6 +5008,18 @@ __metadata: languageName: node linkType: hard +"@aws-sdk/middleware-recursion-detection@npm:3.378.0": + version: 3.378.0 + resolution: "@aws-sdk/middleware-recursion-detection@npm:3.378.0" + dependencies: + "@aws-sdk/types": 3.378.0 + "@smithy/protocol-http": ^2.0.1 + "@smithy/types": ^2.0.2 + tslib: ^2.5.0 + checksum: 68c715283febef7037cac36eba2cc5d7368ddddb0485a7cb7ddbab12812e843dca5b067bb5975e96021cc12bf988fa27d37bff6e67c683e655cb2371081c0fca + 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" @@ -4813,6 +5150,18 @@ __metadata: languageName: node linkType: hard +"@aws-sdk/middleware-sdk-sts@npm:3.379.1": + version: 3.379.1 + resolution: "@aws-sdk/middleware-sdk-sts@npm:3.379.1" + dependencies: + "@aws-sdk/middleware-signing": 3.379.1 + "@aws-sdk/types": 3.378.0 + "@smithy/types": ^2.0.2 + tslib: ^2.5.0 + checksum: d885e6949ddab968325bc2ce40c0f9332e9ce1c71f7d4c3c2d51bff29f1e36474efbb75b6f9bf2ed5210130b5f3cc04be0dcb93ddec530694026c5cfe78dd04a + 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" @@ -4910,6 +5259,21 @@ __metadata: languageName: node linkType: hard +"@aws-sdk/middleware-signing@npm:3.379.1": + version: 3.379.1 + resolution: "@aws-sdk/middleware-signing@npm:3.379.1" + dependencies: + "@aws-sdk/types": 3.378.0 + "@smithy/property-provider": ^2.0.0 + "@smithy/protocol-http": ^2.0.1 + "@smithy/signature-v4": ^2.0.0 + "@smithy/types": ^2.0.2 + "@smithy/util-middleware": ^2.0.0 + tslib: ^2.5.0 + checksum: 71ac8f0062212cf7488f3a62217f9224b7aee21ad9429abac79383da58b5588cf046294640fdab8a8651f532c71b43b9ae76a67483948097b4875adb8b450beb + 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" @@ -5029,6 +5393,19 @@ __metadata: languageName: node linkType: hard +"@aws-sdk/middleware-user-agent@npm:3.382.0": + version: 3.382.0 + resolution: "@aws-sdk/middleware-user-agent@npm:3.382.0" + dependencies: + "@aws-sdk/types": 3.378.0 + "@aws-sdk/util-endpoints": 3.382.0 + "@smithy/protocol-http": ^2.0.1 + "@smithy/types": ^2.0.2 + tslib: ^2.5.0 + checksum: eb0702140db1a11f1a414ae95d3c7fb1b959c08293d4396587037c18d483e606d439a85795482f76275766c80b62e3106d0941f34216956ecfe4737763f18256 + 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" @@ -5554,6 +5931,20 @@ __metadata: languageName: node linkType: hard +"@aws-sdk/token-providers@npm:3.382.0": + version: 3.382.0 + resolution: "@aws-sdk/token-providers@npm:3.382.0" + dependencies: + "@aws-sdk/client-sso-oidc": 3.382.0 + "@aws-sdk/types": 3.378.0 + "@smithy/property-provider": ^2.0.0 + "@smithy/shared-ini-file-loader": ^2.0.0 + "@smithy/types": ^2.0.2 + tslib: ^2.5.0 + checksum: 63257a675fe87962eac6bf0015c192f839ec5e9d9c47b2aa82dc781377a1bf00f286910c3d75eb946ca1b2bd2d7d2a5100e8cd6d70f18b241067cbdfe910bb0b + languageName: node + linkType: hard + "@aws-sdk/types@npm:3.310.0": version: 3.310.0 resolution: "@aws-sdk/types@npm:3.310.0" @@ -5572,7 +5963,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/types@npm:3.370.0, @aws-sdk/types@npm:^3.1.0, @aws-sdk/types@npm:^3.222.0, @aws-sdk/types@npm:^3.25.0": +"@aws-sdk/types@npm:3.370.0": version: 3.370.0 resolution: "@aws-sdk/types@npm:3.370.0" dependencies: @@ -5582,6 +5973,16 @@ __metadata: languageName: node linkType: hard +"@aws-sdk/types@npm:3.378.0, @aws-sdk/types@npm:^3.1.0, @aws-sdk/types@npm:^3.222.0, @aws-sdk/types@npm:^3.25.0": + version: 3.378.0 + resolution: "@aws-sdk/types@npm:3.378.0" + dependencies: + "@smithy/types": ^2.0.2 + tslib: ^2.5.0 + checksum: 2d32d0b19ad75f506e37efc207aae2135bb0630d666861c1afcfa073403c10472953ea127cb32b9eddf36800b5ecda3c7e08d8e4d5de883114871d9572ce5a18 + languageName: node + linkType: hard + "@aws-sdk/types@npm:3.40.0": version: 3.40.0 resolution: "@aws-sdk/types@npm:3.40.0" @@ -5931,6 +6332,16 @@ __metadata: languageName: node linkType: hard +"@aws-sdk/util-endpoints@npm:3.382.0": + version: 3.382.0 + resolution: "@aws-sdk/util-endpoints@npm:3.382.0" + dependencies: + "@aws-sdk/types": 3.378.0 + tslib: ^2.5.0 + checksum: b03b0b31fb723a48ec133cb7d19f6bb8d3d3a32ff97b9583f1b1909d7426d6a96c858e69b1c05a8de9c729e78657ed5aa638386fc6848ac98dbcabb217ed6fc5 + languageName: node + linkType: hard + "@aws-sdk/util-format-url@npm:3.338.0": version: 3.338.0 resolution: "@aws-sdk/util-format-url@npm:3.338.0" @@ -6088,6 +6499,18 @@ __metadata: languageName: node linkType: hard +"@aws-sdk/util-user-agent-browser@npm:3.378.0": + version: 3.378.0 + resolution: "@aws-sdk/util-user-agent-browser@npm:3.378.0" + dependencies: + "@aws-sdk/types": 3.378.0 + "@smithy/types": ^2.0.2 + bowser: ^2.11.0 + tslib: ^2.5.0 + checksum: 9e42412baf1ce8b3b5a0861185f17e365c29f205cb03995a2cc5c0baa3f8e07b63e0ba7efeab72a149a74384673f88bd6c13514306f1301cd79d8d686731976e + 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" @@ -6159,6 +6582,23 @@ __metadata: languageName: node linkType: hard +"@aws-sdk/util-user-agent-node@npm:3.378.0": + version: 3.378.0 + resolution: "@aws-sdk/util-user-agent-node@npm:3.378.0" + dependencies: + "@aws-sdk/types": 3.378.0 + "@smithy/node-config-provider": ^2.0.1 + "@smithy/types": ^2.0.2 + tslib: ^2.5.0 + peerDependencies: + aws-crt: ">=1.0.0" + peerDependenciesMeta: + aws-crt: + optional: true + checksum: f3bcf036cb05034c0c93f739655b4189fa2fdf18a6714a85221ef51111477694f541a373aff8ce85b3c12fe9e80a8a9a8e16ebadef4fe779e427e0eebe745784 + 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" @@ -10545,6 +10985,16 @@ __metadata: languageName: node linkType: hard +"@smithy/abort-controller@npm:^2.0.1": + version: 2.0.1 + resolution: "@smithy/abort-controller@npm:2.0.1" + dependencies: + "@smithy/types": ^2.0.2 + tslib: ^2.5.0 + checksum: 995c3a719edec798b057f961b321b41471543f72cb567413b37cca5400cbe177da18392ae734ab8603016616fa326e0c08138bfcb454287bfc8cc8356649698d + languageName: node + linkType: hard + "@smithy/chunked-blob-reader-native@npm:^1.0.2": version: 1.0.2 resolution: "@smithy/chunked-blob-reader-native@npm:1.0.2" @@ -10576,6 +11026,18 @@ __metadata: languageName: node linkType: hard +"@smithy/config-resolver@npm:^2.0.1": + version: 2.0.1 + resolution: "@smithy/config-resolver@npm:2.0.1" + dependencies: + "@smithy/types": ^2.0.2 + "@smithy/util-config-provider": ^2.0.0 + "@smithy/util-middleware": ^2.0.0 + tslib: ^2.5.0 + checksum: c58266a9b00486d84b9e7e14cba72fd32b14860d028f7322fe197dfed705798ee8bef22f069a7dacbd273894ff64d7afbc60a585792f4345e1e3fd17ac52a90a + languageName: node + linkType: hard + "@smithy/credential-provider-imds@npm:^1.0.1, @smithy/credential-provider-imds@npm:^1.0.2": version: 1.0.2 resolution: "@smithy/credential-provider-imds@npm:1.0.2" @@ -10589,6 +11051,19 @@ __metadata: languageName: node linkType: hard +"@smithy/credential-provider-imds@npm:^2.0.0, @smithy/credential-provider-imds@npm:^2.0.1": + version: 2.0.1 + resolution: "@smithy/credential-provider-imds@npm:2.0.1" + dependencies: + "@smithy/node-config-provider": ^2.0.1 + "@smithy/property-provider": ^2.0.1 + "@smithy/types": ^2.0.2 + "@smithy/url-parser": ^2.0.1 + tslib: ^2.5.0 + checksum: e795f3a91fa079495d809e082fba1e5871a45c4a1774e25a1e6a7f0664889ad5b8a1b32f1e2254bad93c074c8ab5b194ab2c02e3a53a900c8f8a2d907859f5d2 + languageName: node + linkType: hard + "@smithy/eventstream-codec@npm:^1.0.2": version: 1.0.2 resolution: "@smithy/eventstream-codec@npm:1.0.2" @@ -10601,6 +11076,18 @@ __metadata: languageName: node linkType: hard +"@smithy/eventstream-codec@npm:^2.0.1": + version: 2.0.1 + resolution: "@smithy/eventstream-codec@npm:2.0.1" + dependencies: + "@aws-crypto/crc32": 3.0.0 + "@smithy/types": ^2.0.2 + "@smithy/util-hex-encoding": ^2.0.0 + tslib: ^2.5.0 + checksum: ba78a170cd714a6e6c1990415e7817f3fbce6d9f20d8dadc29edabc2666746b56381e8ed52079ce0a07e5ef44ab59d2b378a98781698de19fd4de7268e4de885 + languageName: node + linkType: hard + "@smithy/eventstream-serde-browser@npm:^1.0.1": version: 1.0.2 resolution: "@smithy/eventstream-serde-browser@npm:1.0.2" @@ -10657,6 +11144,19 @@ __metadata: languageName: node linkType: hard +"@smithy/fetch-http-handler@npm:^2.0.1": + version: 2.0.1 + resolution: "@smithy/fetch-http-handler@npm:2.0.1" + dependencies: + "@smithy/protocol-http": ^2.0.1 + "@smithy/querystring-builder": ^2.0.1 + "@smithy/types": ^2.0.2 + "@smithy/util-base64": ^2.0.0 + tslib: ^2.5.0 + checksum: 7bae59b44772496677eb1de11b3ab48ac9e0a3e6d4011d83271e08e7414fa2116d812479d05c8052ad498f496159ce34488b873ed22b6561fd20a8a5933eef8b + languageName: node + linkType: hard + "@smithy/hash-blob-browser@npm:^1.0.1": version: 1.0.2 resolution: "@smithy/hash-blob-browser@npm:1.0.2" @@ -10681,6 +11181,18 @@ __metadata: languageName: node linkType: hard +"@smithy/hash-node@npm:^2.0.1": + version: 2.0.1 + resolution: "@smithy/hash-node@npm:2.0.1" + dependencies: + "@smithy/types": ^2.0.2 + "@smithy/util-buffer-from": ^2.0.0 + "@smithy/util-utf8": ^2.0.0 + tslib: ^2.5.0 + checksum: 516eb7f62def0ca507ffe808d6ba192d3c4f804c76439c85719e0487a3610255b68085922c4bbd5ef64f1992ab75cf21a8af899685968999291e88f3441a2dc3 + languageName: node + linkType: hard + "@smithy/invalid-dependency@npm:^1.0.1": version: 1.0.2 resolution: "@smithy/invalid-dependency@npm:1.0.2" @@ -10691,6 +11203,16 @@ __metadata: languageName: node linkType: hard +"@smithy/invalid-dependency@npm:^2.0.1": + version: 2.0.1 + resolution: "@smithy/invalid-dependency@npm:2.0.1" + dependencies: + "@smithy/types": ^2.0.2 + tslib: ^2.5.0 + checksum: f7bc61822206379db94c343df056df743947c1842aff3f8581917fe4dd7a6f79b0cf6f5b4a46998110845ee63569921389262f5614bde8e284b1a823f2971332 + languageName: node + linkType: hard + "@smithy/is-array-buffer@npm:^1.0.1, @smithy/is-array-buffer@npm:^1.0.2": version: 1.0.2 resolution: "@smithy/is-array-buffer@npm:1.0.2" @@ -10700,6 +11222,15 @@ __metadata: 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/md5-js@npm:^1.0.1": version: 1.0.2 resolution: "@smithy/md5-js@npm:1.0.2" @@ -10722,6 +11253,17 @@ __metadata: languageName: node linkType: hard +"@smithy/middleware-content-length@npm:^2.0.1": + version: 2.0.1 + resolution: "@smithy/middleware-content-length@npm:2.0.1" + dependencies: + "@smithy/protocol-http": ^2.0.1 + "@smithy/types": ^2.0.2 + tslib: ^2.5.0 + checksum: e0c0f919ffa0f50fe02fbc9b6350b93c349410fef73d13a26e7b1d8e840de921f5c89082931bb53cb609c4d29360f006a8066501226774f16d3b1d470310c0fa + languageName: node + linkType: hard + "@smithy/middleware-endpoint@npm:^1.0.2": version: 1.0.3 resolution: "@smithy/middleware-endpoint@npm:1.0.3" @@ -10735,6 +11277,19 @@ __metadata: languageName: node linkType: hard +"@smithy/middleware-endpoint@npm:^2.0.1": + version: 2.0.1 + resolution: "@smithy/middleware-endpoint@npm:2.0.1" + dependencies: + "@smithy/middleware-serde": ^2.0.1 + "@smithy/types": ^2.0.2 + "@smithy/url-parser": ^2.0.1 + "@smithy/util-middleware": ^2.0.0 + tslib: ^2.5.0 + checksum: ad557e680eb64cdeb9c867ff227e62b98bf781b77c284dfc9ed17b19e67d86b782a1cc39282c4b9a1bc11783fff862b04418b789a6398816b26a09d44492c0c9 + languageName: node + linkType: hard + "@smithy/middleware-retry@npm:^1.0.3": version: 1.0.4 resolution: "@smithy/middleware-retry@npm:1.0.4" @@ -10750,6 +11305,21 @@ __metadata: languageName: node linkType: hard +"@smithy/middleware-retry@npm:^2.0.1": + version: 2.0.1 + resolution: "@smithy/middleware-retry@npm:2.0.1" + dependencies: + "@smithy/protocol-http": ^2.0.1 + "@smithy/service-error-classification": ^2.0.0 + "@smithy/types": ^2.0.2 + "@smithy/util-middleware": ^2.0.0 + "@smithy/util-retry": ^2.0.0 + tslib: ^2.5.0 + uuid: ^8.3.2 + checksum: 55aef1ad76cfcff3717114875e2b978ac4f250550acb3ea81447e91bce8fa78e1a90b52b810f220808433d1587ef13caa30912574b34a82947902157de89733d + languageName: node + linkType: hard + "@smithy/middleware-serde@npm:^1.0.1, @smithy/middleware-serde@npm:^1.0.2": version: 1.0.2 resolution: "@smithy/middleware-serde@npm:1.0.2" @@ -10760,6 +11330,16 @@ __metadata: languageName: node linkType: hard +"@smithy/middleware-serde@npm:^2.0.1": + version: 2.0.1 + resolution: "@smithy/middleware-serde@npm:2.0.1" + dependencies: + "@smithy/types": ^2.0.2 + tslib: ^2.5.0 + checksum: 0d50d635cdb4ab5b688499c3e4ab0ec12066a9b40e0d31c9011f4f7f8d90b2c1dae72f4491c5ec19309e81b2d5c88484492e3333ae2ba6ab854f6d06d6de8471 + languageName: node + linkType: hard + "@smithy/middleware-stack@npm:^1.0.1, @smithy/middleware-stack@npm:^1.0.2": version: 1.0.2 resolution: "@smithy/middleware-stack@npm:1.0.2" @@ -10769,6 +11349,15 @@ __metadata: languageName: node linkType: hard +"@smithy/middleware-stack@npm:^2.0.0": + version: 2.0.0 + resolution: "@smithy/middleware-stack@npm:2.0.0" + dependencies: + tslib: ^2.5.0 + checksum: dd1507d599f9fa70d720f0be7e5ecf3aa24f0f0f23879c19a2d65fe6ba60184f641944116724612a240212361bb2b533c6aac8de4c1f4417611cf951d8001ccb + languageName: node + linkType: hard + "@smithy/node-config-provider@npm:^1.0.1, @smithy/node-config-provider@npm:^1.0.2": version: 1.0.2 resolution: "@smithy/node-config-provider@npm:1.0.2" @@ -10781,6 +11370,18 @@ __metadata: languageName: node linkType: hard +"@smithy/node-config-provider@npm:^2.0.1": + version: 2.0.1 + resolution: "@smithy/node-config-provider@npm:2.0.1" + dependencies: + "@smithy/property-provider": ^2.0.1 + "@smithy/shared-ini-file-loader": ^2.0.1 + "@smithy/types": ^2.0.2 + tslib: ^2.5.0 + checksum: 2ea3ab568bb3871ad87a760e7889668e6662aeb96662f4d040dd32e12437c8168fb2989d2aa51e16b3544d521b29aa1d61f9c93a905f23dee96a3d97242b4ac2 + languageName: node + linkType: hard + "@smithy/node-http-handler@npm:^1.0.2, @smithy/node-http-handler@npm:^1.0.3": version: 1.0.3 resolution: "@smithy/node-http-handler@npm:1.0.3" @@ -10794,6 +11395,19 @@ __metadata: languageName: node linkType: hard +"@smithy/node-http-handler@npm:^2.0.1": + version: 2.0.1 + resolution: "@smithy/node-http-handler@npm:2.0.1" + dependencies: + "@smithy/abort-controller": ^2.0.1 + "@smithy/protocol-http": ^2.0.1 + "@smithy/querystring-builder": ^2.0.1 + "@smithy/types": ^2.0.2 + tslib: ^2.5.0 + checksum: beb561b4c01791faa1a5c7f11b39777ae28011a69ea5baf032830226f8dba2a572d8ec846d06dd922bda5ac4f38159f7f1b388d9bab9cabbe0929530d623c016 + languageName: node + linkType: hard + "@smithy/property-provider@npm:^1.0.1, @smithy/property-provider@npm:^1.0.2": version: 1.0.2 resolution: "@smithy/property-provider@npm:1.0.2" @@ -10804,6 +11418,16 @@ __metadata: languageName: node linkType: hard +"@smithy/property-provider@npm:^2.0.0, @smithy/property-provider@npm:^2.0.1": + version: 2.0.1 + resolution: "@smithy/property-provider@npm:2.0.1" + dependencies: + "@smithy/types": ^2.0.2 + tslib: ^2.5.0 + checksum: f1ba9c699ea0113e866ecd7da34454a0e47e7f378353f008f399b0764c87fca55099d47d1b8c5fceedb3e4242b65eca635091071b48657ce7bf3ba0cc98895b8 + languageName: node + linkType: hard + "@smithy/protocol-http@npm:^1.0.1, @smithy/protocol-http@npm:^1.1.0, @smithy/protocol-http@npm:^1.1.1": version: 1.1.1 resolution: "@smithy/protocol-http@npm:1.1.1" @@ -10814,6 +11438,16 @@ __metadata: languageName: node linkType: hard +"@smithy/protocol-http@npm:^2.0.1": + version: 2.0.1 + resolution: "@smithy/protocol-http@npm:2.0.1" + dependencies: + "@smithy/types": ^2.0.2 + tslib: ^2.5.0 + checksum: 350f59d2a92afe711115dd3ff52571c9b7d31bb652d39f44c1012947ff26b46bbe00edaeaa1a001b974b62c32c88fa54798244819029b82b7744535c509fed2e + languageName: node + linkType: hard + "@smithy/querystring-builder@npm:^1.0.2": version: 1.0.2 resolution: "@smithy/querystring-builder@npm:1.0.2" @@ -10825,6 +11459,17 @@ __metadata: languageName: node linkType: hard +"@smithy/querystring-builder@npm:^2.0.1": + version: 2.0.1 + resolution: "@smithy/querystring-builder@npm:2.0.1" + dependencies: + "@smithy/types": ^2.0.2 + "@smithy/util-uri-escape": ^2.0.0 + tslib: ^2.5.0 + checksum: 288a0c5084b7394020882130ae20f1bd61089816af686123067787845555f81e7f7436b00638fa3f0530b5557e81417e34aea297f7dbe5a4203792890509e315 + languageName: node + linkType: hard + "@smithy/querystring-parser@npm:^1.0.2": version: 1.0.2 resolution: "@smithy/querystring-parser@npm:1.0.2" @@ -10835,6 +11480,16 @@ __metadata: languageName: node linkType: hard +"@smithy/querystring-parser@npm:^2.0.1": + version: 2.0.1 + resolution: "@smithy/querystring-parser@npm:2.0.1" + dependencies: + "@smithy/types": ^2.0.2 + tslib: ^2.5.0 + checksum: 465ebb4ee87d3225dbc88b0adf45e2cc29ed7bdaaad84bdcf4f0ddd513be40940c75acd326c42b66a34babe2575ea1435c307f21202119b6ebe6ccdc782f0206 + languageName: node + linkType: hard + "@smithy/service-error-classification@npm:^1.0.3": version: 1.0.3 resolution: "@smithy/service-error-classification@npm:1.0.3" @@ -10842,6 +11497,13 @@ __metadata: languageName: node linkType: hard +"@smithy/service-error-classification@npm:^2.0.0": + version: 2.0.0 + resolution: "@smithy/service-error-classification@npm:2.0.0" + checksum: 01eff69704f8d3c0a4e556b06d7566d905856ab069517b81e232b08e966c303bd24f2441f62518c0bd0ecb7e25069afd47db442223bb80b455e8f6c6a77bb57b + languageName: node + linkType: hard + "@smithy/shared-ini-file-loader@npm:^1.0.1, @smithy/shared-ini-file-loader@npm:^1.0.2": version: 1.0.2 resolution: "@smithy/shared-ini-file-loader@npm:1.0.2" @@ -10852,6 +11514,16 @@ __metadata: languageName: node linkType: hard +"@smithy/shared-ini-file-loader@npm:^2.0.0, @smithy/shared-ini-file-loader@npm:^2.0.1": + version: 2.0.1 + resolution: "@smithy/shared-ini-file-loader@npm:2.0.1" + dependencies: + "@smithy/types": ^2.0.2 + tslib: ^2.5.0 + checksum: 53840d0524adfed2a2ad9887014c357df0ccf07b3bf23f775d999c8c7f0c0b314c1b01992cd2901f6b44a3e59a3f3c7fcaf71aa8a2c4c1948d2fe153af320679 + languageName: node + linkType: hard + "@smithy/signature-v4@npm:^1.0.1": version: 1.0.2 resolution: "@smithy/signature-v4@npm:1.0.2" @@ -10868,6 +11540,22 @@ __metadata: languageName: node linkType: hard +"@smithy/signature-v4@npm:^2.0.0": + version: 2.0.1 + resolution: "@smithy/signature-v4@npm:2.0.1" + dependencies: + "@smithy/eventstream-codec": ^2.0.1 + "@smithy/is-array-buffer": ^2.0.0 + "@smithy/types": ^2.0.2 + "@smithy/util-hex-encoding": ^2.0.0 + "@smithy/util-middleware": ^2.0.0 + "@smithy/util-uri-escape": ^2.0.0 + "@smithy/util-utf8": ^2.0.0 + tslib: ^2.5.0 + checksum: b5262f7f6e69b18a8c2b2024eb6890585f892de05b8f27bf63725d4ce005cb5093d420cb420e51bbe70f2a185720082ef6b4680086af172cd0634584aaeebd83 + languageName: node + linkType: hard + "@smithy/smithy-client@npm:^1.0.3": version: 1.0.4 resolution: "@smithy/smithy-client@npm:1.0.4" @@ -10880,6 +11568,18 @@ __metadata: languageName: node linkType: hard +"@smithy/smithy-client@npm:^2.0.1": + version: 2.0.1 + resolution: "@smithy/smithy-client@npm:2.0.1" + dependencies: + "@smithy/middleware-stack": ^2.0.0 + "@smithy/types": ^2.0.2 + "@smithy/util-stream": ^2.0.1 + tslib: ^2.5.0 + checksum: c9157b3a9ba718a1f9760d00eaa5bb5b42d1ea72c0a86395c00409484232abc01c21b03e0ad84caecbfb3f09343e3b2a5d02e429c96b02c9eabc59585ea2bb0c + languageName: node + linkType: hard + "@smithy/types@npm:^1.0.0, @smithy/types@npm:^1.1.0, @smithy/types@npm:^1.1.1": version: 1.1.1 resolution: "@smithy/types@npm:1.1.1" @@ -10889,6 +11589,15 @@ __metadata: languageName: node linkType: hard +"@smithy/types@npm:^2.0.2": + version: 2.0.2 + resolution: "@smithy/types@npm:2.0.2" + dependencies: + tslib: ^2.5.0 + checksum: 2decf04dd0c2f9f5976485eb40392227ee8c0cd68f2433a7c38ccc47b10af39cdc21a26368ede26871ac02701f58828aecb6ab091074cc0468e3913104835794 + languageName: node + linkType: hard + "@smithy/url-parser@npm:^1.0.1, @smithy/url-parser@npm:^1.0.2": version: 1.0.2 resolution: "@smithy/url-parser@npm:1.0.2" @@ -10900,6 +11609,17 @@ __metadata: languageName: node linkType: hard +"@smithy/url-parser@npm:^2.0.1": + version: 2.0.1 + resolution: "@smithy/url-parser@npm:2.0.1" + dependencies: + "@smithy/querystring-parser": ^2.0.1 + "@smithy/types": ^2.0.2 + tslib: ^2.5.0 + checksum: b0b765b17b7e41ca72829bd9943dbfb33924f7bdec5e622b87e8d2d83ee570a305ed7a948c9cd085d4ab04afd7286e7e70470b912c5fad07cc60507bbc9f62e6 + languageName: node + linkType: hard + "@smithy/util-base64@npm:^1.0.1, @smithy/util-base64@npm:^1.0.2": version: 1.0.2 resolution: "@smithy/util-base64@npm:1.0.2" @@ -10910,6 +11630,16 @@ __metadata: languageName: node linkType: hard +"@smithy/util-base64@npm:^2.0.0": + version: 2.0.0 + resolution: "@smithy/util-base64@npm:2.0.0" + dependencies: + "@smithy/util-buffer-from": ^2.0.0 + tslib: ^2.5.0 + checksum: 89ca476b119e9cb14563c4b0c901d4b54b93732be7a56bf16f192cc17ecefaa782423bc10e22b92e7dd96b4a191fa90141e615460d2797a640478b2dc1be0681 + languageName: node + linkType: hard + "@smithy/util-body-length-browser@npm:^1.0.1": version: 1.0.2 resolution: "@smithy/util-body-length-browser@npm:1.0.2" @@ -10919,6 +11649,15 @@ __metadata: languageName: node linkType: hard +"@smithy/util-body-length-browser@npm:^2.0.0": + version: 2.0.0 + resolution: "@smithy/util-body-length-browser@npm:2.0.0" + dependencies: + tslib: ^2.5.0 + checksum: a0ce4a9615b750a9fbcfc2e7fe025afb4e583f6500b7c532d758c4585e17425d2825c99cf24cd0eea5ccbb2f7e98e71060105075493db8d0b190c4fb70b89a6f + languageName: node + linkType: hard + "@smithy/util-body-length-node@npm:^1.0.1": version: 1.0.2 resolution: "@smithy/util-body-length-node@npm:1.0.2" @@ -10928,6 +11667,15 @@ __metadata: languageName: node linkType: hard +"@smithy/util-body-length-node@npm:^2.0.0": + version: 2.0.0 + resolution: "@smithy/util-body-length-node@npm:2.0.0" + dependencies: + tslib: ^2.5.0 + checksum: ce6437f2aa3079e8ecca93300c1712c3296f0ede6792323365566d7382c3b26aff1713cdee19ce3bf56a516d23c17792982af3621f077181ce4a6bd6cfc23dad + languageName: node + linkType: hard + "@smithy/util-buffer-from@npm:^1.0.2": version: 1.0.2 resolution: "@smithy/util-buffer-from@npm:1.0.2" @@ -10938,6 +11686,16 @@ __metadata: languageName: node linkType: hard +"@smithy/util-buffer-from@npm:^2.0.0": + version: 2.0.0 + resolution: "@smithy/util-buffer-from@npm:2.0.0" + dependencies: + "@smithy/is-array-buffer": ^2.0.0 + tslib: ^2.5.0 + checksum: 21bcfe8f9dc66775970cd5d0fb401bcda39715e558f3309d0a5c1d6dc2d2cb40ed0a259748346f282b40398707f222791e6e9637174d82a510bd5eaad69dd0ca + languageName: node + linkType: hard + "@smithy/util-config-provider@npm:^1.0.1, @smithy/util-config-provider@npm:^1.0.2": version: 1.0.2 resolution: "@smithy/util-config-provider@npm:1.0.2" @@ -10947,6 +11705,15 @@ __metadata: languageName: node linkType: hard +"@smithy/util-config-provider@npm:^2.0.0": + version: 2.0.0 + resolution: "@smithy/util-config-provider@npm:2.0.0" + dependencies: + tslib: ^2.5.0 + checksum: cc48532787a75f45a6959b8ad8fc018d0793fb8ed9969cf9cc8e348bfd8997b82a2ee9cce368d0df1c42d8ebd5ca866de34079ba2364777d572ddb4c2b8e71b9 + languageName: node + linkType: hard + "@smithy/util-defaults-mode-browser@npm:^1.0.1": version: 1.0.2 resolution: "@smithy/util-defaults-mode-browser@npm:1.0.2" @@ -10959,6 +11726,18 @@ __metadata: languageName: node linkType: hard +"@smithy/util-defaults-mode-browser@npm:^2.0.1": + version: 2.0.1 + resolution: "@smithy/util-defaults-mode-browser@npm:2.0.1" + dependencies: + "@smithy/property-provider": ^2.0.1 + "@smithy/types": ^2.0.2 + bowser: ^2.11.0 + tslib: ^2.5.0 + checksum: 2b03444cb341524254aec005da05eb6a42824fae254694446ae1ae34b41e055daa77afaefa70cb5aabbb21fa6bb61ba6211c8c636c335254b4b45501cb8918a1 + languageName: node + linkType: hard + "@smithy/util-defaults-mode-node@npm:^1.0.1": version: 1.0.2 resolution: "@smithy/util-defaults-mode-node@npm:1.0.2" @@ -10973,6 +11752,20 @@ __metadata: languageName: node linkType: hard +"@smithy/util-defaults-mode-node@npm:^2.0.1": + version: 2.0.1 + resolution: "@smithy/util-defaults-mode-node@npm:2.0.1" + dependencies: + "@smithy/config-resolver": ^2.0.1 + "@smithy/credential-provider-imds": ^2.0.1 + "@smithy/node-config-provider": ^2.0.1 + "@smithy/property-provider": ^2.0.1 + "@smithy/types": ^2.0.2 + tslib: ^2.5.0 + checksum: 3cb749c692c4bb09e494b3d48c463e008b53b31f8df24cfd5f725fab168c063315131aedcb1b72eefd794e69a2c9ef5a31fdfb3ec20ae99499f379c89f56f405 + languageName: node + linkType: hard + "@smithy/util-hex-encoding@npm:^1.0.2": version: 1.0.2 resolution: "@smithy/util-hex-encoding@npm:1.0.2" @@ -10982,6 +11775,15 @@ __metadata: languageName: node linkType: hard +"@smithy/util-hex-encoding@npm:^2.0.0": + version: 2.0.0 + resolution: "@smithy/util-hex-encoding@npm:2.0.0" + dependencies: + tslib: ^2.5.0 + checksum: 50c3d855b8f3e7a6ef087969e451327cb5ebc1e582ba34f0523d73341f944ae1afa80bb950d2bc6298f4021146193dc84c892d5932f4e47275c3818e8426b338 + languageName: node + linkType: hard + "@smithy/util-middleware@npm:^1.0.1, @smithy/util-middleware@npm:^1.0.2": version: 1.0.2 resolution: "@smithy/util-middleware@npm:1.0.2" @@ -10991,6 +11793,15 @@ __metadata: languageName: node linkType: hard +"@smithy/util-middleware@npm:^2.0.0": + version: 2.0.0 + resolution: "@smithy/util-middleware@npm:2.0.0" + dependencies: + tslib: ^2.5.0 + checksum: 2720983153d77d18815d67eefabe24afa4c4fdde15435817dabb574fda7ba602491fc1efb5de2c05a1882ff2f2b7d17fb1eb8590202d6299cb93a258fdce989d + languageName: node + linkType: hard + "@smithy/util-retry@npm:^1.0.3, @smithy/util-retry@npm:^1.0.4": version: 1.0.4 resolution: "@smithy/util-retry@npm:1.0.4" @@ -11001,6 +11812,16 @@ __metadata: languageName: node linkType: hard +"@smithy/util-retry@npm:^2.0.0": + version: 2.0.0 + resolution: "@smithy/util-retry@npm:2.0.0" + dependencies: + "@smithy/service-error-classification": ^2.0.0 + tslib: ^2.5.0 + checksum: 03b69046d7736f11430147772463685246918560b70ff54799b8dee59a4819fa4349917fa9df841953224f5ec95ef1aa3e5ee5818450ad2f92a2397caede41bd + languageName: node + linkType: hard + "@smithy/util-stream@npm:^1.0.1, @smithy/util-stream@npm:^1.0.2": version: 1.0.2 resolution: "@smithy/util-stream@npm:1.0.2" @@ -11017,6 +11838,22 @@ __metadata: languageName: node linkType: hard +"@smithy/util-stream@npm:^2.0.1": + version: 2.0.1 + resolution: "@smithy/util-stream@npm:2.0.1" + dependencies: + "@smithy/fetch-http-handler": ^2.0.1 + "@smithy/node-http-handler": ^2.0.1 + "@smithy/types": ^2.0.2 + "@smithy/util-base64": ^2.0.0 + "@smithy/util-buffer-from": ^2.0.0 + "@smithy/util-hex-encoding": ^2.0.0 + "@smithy/util-utf8": ^2.0.0 + tslib: ^2.5.0 + checksum: e3121b02575dea55c0bfa59ad25aaca4b6f4cd4dc7091966f78635a57b7b5765ce9fe94eda66de50fe68ba3544c94c59691b7f18085bb7fdb29ee62cce2f5237 + languageName: node + linkType: hard + "@smithy/util-uri-escape@npm:^1.0.2": version: 1.0.2 resolution: "@smithy/util-uri-escape@npm:1.0.2" @@ -11026,6 +11863,15 @@ __metadata: languageName: node linkType: hard +"@smithy/util-uri-escape@npm:^2.0.0": + version: 2.0.0 + resolution: "@smithy/util-uri-escape@npm:2.0.0" + dependencies: + tslib: ^2.5.0 + checksum: 4a82a7ee35ddce9d509ed2d2d07bbfc8def085af759e7b17212e94bc7415fc9dcbd386d8f3212a14dd7225beed5411b887077f02c29cb56a2407db0a728e543e + languageName: node + linkType: hard + "@smithy/util-utf8@npm:^1.0.1, @smithy/util-utf8@npm:^1.0.2": version: 1.0.2 resolution: "@smithy/util-utf8@npm:1.0.2" @@ -11036,6 +11882,16 @@ __metadata: 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-waiter@npm:^1.0.1": version: 1.0.2 resolution: "@smithy/util-waiter@npm:1.0.2" @@ -12983,13 +13839,13 @@ __metadata: languageName: unknown linkType: soft -"amplify-codegen@npm:^4.1.4": - version: 4.1.4 - resolution: "amplify-codegen@npm:4.1.4" +"amplify-codegen@npm:^4.2.0": + version: 4.2.0 + resolution: "amplify-codegen@npm:4.2.0" dependencies: - "@aws-amplify/appsync-modelgen-plugin": 2.5.1 - "@aws-amplify/graphql-docs-generator": 4.0.3 - "@aws-amplify/graphql-types-generator": 3.0.3 + "@aws-amplify/appsync-modelgen-plugin": 2.5.3 + "@aws-amplify/graphql-docs-generator": 4.0.5 + "@aws-amplify/graphql-types-generator": 3.2.0 "@graphql-codegen/core": 2.6.6 chalk: ^3.0.0 fs-extra: ^8.1.0 @@ -13006,7 +13862,7 @@ __metadata: peerDependencies: "@aws-amplify/amplify-cli-core": "*" graphql-transformer-core: ^8.0.0 - checksum: 7f47747ae825817401f331f4f135b7c1ea01e9d1e2f2fed68436ce0292b9d990af29711fd4ff87ce70d20ab66c49b7b10e3c73419907408e0708bcb2a54091f3 + checksum: 24b4d19b3d40315368ecba06531d2646ab56612e2aa9c74332276c677ea41525455790317d3fde932628ce3ba4b2d64c4b17d87fe8bd844de4c0780599434026 languageName: node linkType: hard @@ -13031,7 +13887,7 @@ __metadata: resolution: "amplify-dynamodb-simulator@workspace:packages/amplify-dynamodb-simulator" dependencies: "@aws-amplify/amplify-cli-core": 4.2.4 - aws-sdk: ^2.1405.0 + aws-sdk: ^2.1426.0 detect-port: ^1.3.0 execa: ^5.1.1 fs-extra: ^8.1.0 @@ -13064,6 +13920,7 @@ __metadata: "@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.8.4 amplify-headless-interface: 1.17.4 @@ -13071,7 +13928,7 @@ __metadata: aws-amplify: ^4.2.8 aws-appsync: ^4.1.1 aws-cdk-lib: ~2.80.0 - aws-sdk: ^2.1405.0 + aws-sdk: ^2.1426.0 axios: ^0.26.0 circleci-api: ^4.1.4 constructs: ^10.0.5 @@ -13080,13 +13937,16 @@ __metadata: 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.9 isomorphic-fetch: ^3.0.0 jest: ^29.5.0 lodash: ^4.17.21 + moment: ^2.24.0 node-fetch: ^2.6.7 + node-pty: beta rimraf: ^3.0.0 title-case: ^3.0.3 ts-jest: ^29.1.0 @@ -13230,7 +14090,7 @@ __metadata: "@types/serve-static": ^1.13.3 "@types/uuid": ^8.3.1 "@types/xml": ^1.0.4 - aws-sdk: ^2.1405.0 + aws-sdk: ^2.1426.0 body-parser: ^1.19.2 cors: ^2.8.5 etag: ^1.8.1 @@ -14006,9 +14866,9 @@ __metadata: languageName: node linkType: hard -"aws-sdk@npm:^2.1405.0": - version: 2.1405.0 - resolution: "aws-sdk@npm:2.1405.0" +"aws-sdk@npm:^2.1426.0": + version: 2.1426.0 + resolution: "aws-sdk@npm:2.1426.0" dependencies: buffer: 4.9.2 events: 1.1.1 @@ -14020,7 +14880,7 @@ __metadata: util: ^0.12.4 uuid: 8.0.0 xml2js: 0.5.0 - checksum: e7e06ba1d4b37cd10dae568bc17526c3d5d17532d37c1743f8589420ce9a4a489ff87cdb5ff53baa6138dbca79048d8b2f26d1a2fce8d2b11eb4eec6e9b12cb8 + checksum: 4d79be6a7ea7436989d8dc183f4a5a881a8935e8ab93270b6c1d5caac7f93e640b979c48a0af2569a9b063175ec3137427ba8a6545cada1f858b938d3cbab46b languageName: node linkType: hard